[PATCH 1/2] Drop the useless global variable signalCredParam



---
 src/vncdisplay.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index 0b63220..d7835da 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -164,7 +164,6 @@ typedef enum
 static guint signals[LAST_SIGNAL] = { 0, 0, 0, 0,
 				      0, 0, 0, 0,
 				      0, 0, 0, 0, 0,};
-static GParamSpec *signalCredParam;
 gboolean debug_enabled = FALSE;
 
 static const GOptionEntry gtk_vnc_args[] =
@@ -1119,17 +1118,17 @@ static gboolean on_auth_cred(void *opaque)
 
 	cred_list = g_value_array_new(0);
 	if (gvnc_wants_credential_username(obj->priv->gvnc)) {
-		g_value_init(&username, G_PARAM_SPEC_VALUE_TYPE(signalCredParam));
+		g_value_init(&username, VNC_TYPE_DISPLAY_CREDENTIAL);
 		g_value_set_enum(&username, VNC_DISPLAY_CREDENTIAL_USERNAME);
 		cred_list = g_value_array_append(cred_list, &username);
 	}
 	if (gvnc_wants_credential_password(obj->priv->gvnc)) {
-		g_value_init(&password, G_PARAM_SPEC_VALUE_TYPE(signalCredParam));
+		g_value_init(&password, VNC_TYPE_DISPLAY_CREDENTIAL);
 		g_value_set_enum(&password, VNC_DISPLAY_CREDENTIAL_PASSWORD);
 		cred_list = g_value_array_append(cred_list, &password);
 	}
 	if (gvnc_wants_credential_x509(obj->priv->gvnc)) {
-		g_value_init(&clientname, G_PARAM_SPEC_VALUE_TYPE(signalCredParam));
+		g_value_init(&clientname, VNC_TYPE_DISPLAY_CREDENTIAL);
 		g_value_set_enum(&clientname, VNC_DISPLAY_CREDENTIAL_CLIENTNAME);
 		cred_list = g_value_array_append(cred_list, &clientname);
 	}
@@ -1810,13 +1809,6 @@ static void vnc_display_class_init(VncDisplayClass *klass)
 								G_PARAM_STATIC_NICK |
 								G_PARAM_STATIC_BLURB));
 
-	signalCredParam = g_param_spec_enum("credential",
-					    "credential",
-					    "credential",
-					    VNC_TYPE_DISPLAY_CREDENTIAL,
-					    0,
-					    G_PARAM_READABLE);
-
 	signals[VNC_CONNECTED] =
 		g_signal_new ("vnc-connected",
 			      G_OBJECT_CLASS_TYPE (object_class),
-- 
1.6.3.3


--=-wnnUhOqSSrhRZZtkvKeH
Content-Disposition: attachment; filename*0=0002-Only-memcpy-if-source-and-destination-are-different.patc; filename*1=h
Content-Type: text/x-patch; name="0002-Only-memcpy-if-source-and-destination-are-different.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]