/dev/tomkiewicz/new-smileys: e5707ffa8f29: Fix smiley-related wa...

Tomasz Wasilczyk twasilczyk at pidgin.im
Thu Apr 3 13:48:23 EDT 2014


Changeset: e5707ffa8f2997d82dce6db7f00753ec0079f038
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-03 19:48 +0200
Branch:	 default
URL: https://hg.pidgin.im/dev/tomkiewicz/new-smileys/rev/e5707ffa8f29

Description:

Fix smiley-related warnings

diffstat:

 libpurple/protocols/jabber/message.c |   3 +
 libpurple/protocols/msn/msn.c        |   3 +
 libpurple/protocols/msn/slpcall.c    |   2 +-
 pidgin/gtkprefs.c                    |  58 +++++++++++++++++++----------------
 4 files changed, 39 insertions(+), 27 deletions(-)

diffs (172 lines):

diff --git a/libpurple/protocols/jabber/message.c b/libpurple/protocols/jabber/message.c
--- a/libpurple/protocols/jabber/message.c
+++ b/libpurple/protocols/jabber/message.c
@@ -980,6 +980,9 @@ jabber_message_smileyfy_xhtml(JabberMess
 							JABBER_DATA_MAX_SIZE);
 				}
 			}
+#else
+			(void)iterator;
+			(void)jabber_message_get_mimetype_from_ext;
 #endif
 
 			if (has_too_large_smiley) {
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -2077,6 +2077,9 @@ msn_chat_send(PurpleConnection *gc, int 
 		msn_emoticon_destroy(smile);
 		smileys = g_slist_delete_link(smileys, smileys);
 	}
+#else
+	(void)smile;
+	(void)smileys;
 #endif
 
 	if (emoticons) {
diff --git a/libpurple/protocols/msn/slpcall.c b/libpurple/protocols/msn/slpcall.c
--- a/libpurple/protocols/msn/slpcall.c
+++ b/libpurple/protocols/msn/slpcall.c
@@ -235,11 +235,11 @@ get_token(const char *str, const char *s
 static PurpleStoredImage *
 find_valid_emoticon(PurpleAccount *account, const char *path)
 {
+#if 0
 	GList *smileys;
 
 	if (!purple_account_get_bool(account, "custom_smileys", TRUE))
 		return NULL;
-#if 0
 	smileys = purple_smileys_get_all();
 
 	for (; smileys; smileys = g_list_delete_link(smileys, smileys)) {
diff --git a/pidgin/gtkprefs.c b/pidgin/gtkprefs.c
--- a/pidgin/gtkprefs.c
+++ b/pidgin/gtkprefs.c
@@ -2466,7 +2466,8 @@ static GtkWidget *
 proxy_page(void)
 {
 	GtkWidget *ret = NULL, *vbox = NULL, *hbox = NULL;
-	GtkWidget *table = NULL, *entry = NULL, *label = NULL, *proxy_button = NULL;
+	GtkWidget *table = NULL, *entry = NULL, *proxy_button = NULL;
+	GtkLabel *label = NULL;
 	GtkWidget *prefs_proxy_frame = NULL;
 	PurpleProxyInfo *proxy_info;
 
@@ -2479,9 +2480,10 @@ proxy_page(void)
 		gchar *path = NULL;
 
 		hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PIDGIN_HIG_BOX_SPACE);
-		label = gtk_label_new(_("Proxy preferences are configured in GNOME preferences"));
+		label = GTK_LABEL(gtk_label_new(_("Proxy preferences "
+			"are configured in GNOME preferences")));
 		gtk_container_add(GTK_CONTAINER(vbox), hbox);
-		gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+		gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0);
 
 		hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, PIDGIN_HIG_BOX_SPACE);
 		gtk_container_add(GTK_CONTAINER(vbox), hbox);
@@ -2499,10 +2501,10 @@ proxy_page(void)
 		}
 
 		if (path == NULL) {
-			label = gtk_label_new(NULL);
-			gtk_label_set_markup(GTK_LABEL(label),
-								 _("<b>Proxy configuration program was not found.</b>"));
-			gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+			label = GTK_LABEL(gtk_label_new(NULL));
+			gtk_label_set_markup(label, _("<b>Proxy configuration "
+				"program was not found.</b>"));
+			gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(label), FALSE, FALSE, 0);
 		} else {
 			proxy_button = gtk_button_new_with_mnemonic(_("Configure _Proxy"));
 			g_signal_connect(G_OBJECT(proxy_button), "clicked",
@@ -2546,12 +2548,13 @@ proxy_page(void)
 		gtk_table_set_row_spacings(GTK_TABLE(table), 10);
 		gtk_container_add(GTK_CONTAINER(prefs_proxy_subframe), table);
 
-		label = gtk_label_new_with_mnemonic(_("_Host:"));
+		label = GTK_LABEL(gtk_label_new_with_mnemonic(_("_Host:")));
 		gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-		gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
+		gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(label),
+			0, 1, 0, 1, GTK_FILL, 0, 0, 0);
 
 		entry = gtk_entry_new();
-		gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
+		gtk_label_set_mnemonic_widget(label, entry);
 		gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
 		g_signal_connect(G_OBJECT(entry), "changed",
 				 G_CALLBACK(proxy_print_option), (void *)PROXYHOST);
@@ -2563,14 +2566,15 @@ proxy_page(void)
 		hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
 		gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE);
 		gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
-		pidgin_set_accessible_label (entry, label);
-
-		label = gtk_label_new_with_mnemonic(_("P_ort:"));
+		pidgin_set_accessible_label(entry, label);
+
+		label = GTK_LABEL(gtk_label_new_with_mnemonic(_("P_ort:")));
 		gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-		gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
+		gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(label),
+			2, 3, 0, 1, GTK_FILL, 0, 0, 0);
 
 		entry = gtk_spin_button_new_with_range(0, 65535, 1);
-		gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
+		gtk_label_set_mnemonic_widget(label, entry);
 		gtk_table_attach(GTK_TABLE(table), entry, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
 		g_signal_connect(G_OBJECT(entry), "changed",
 				 G_CALLBACK(proxy_print_option), (void *)PROXYPORT);
@@ -2579,14 +2583,15 @@ proxy_page(void)
 			gtk_spin_button_set_value(GTK_SPIN_BUTTON(entry),
 				purple_proxy_info_get_port(proxy_info));
 		}
-		pidgin_set_accessible_label (entry, label);
-
-		label = gtk_label_new_with_mnemonic(_("User_name:"));
+		pidgin_set_accessible_label(entry, label);
+
+		label = GTK_LABEL(gtk_label_new_with_mnemonic(_("User_name:")));
 		gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-		gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
+		gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(label),
+			0, 1, 1, 2, GTK_FILL, 0, 0, 0);
 
 		entry = gtk_entry_new();
-		gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
+		gtk_label_set_mnemonic_widget(label, entry);
 		gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
 		g_signal_connect(G_OBJECT(entry), "changed",
 				 G_CALLBACK(proxy_print_option), (void *)PROXYUSER);
@@ -2598,14 +2603,15 @@ proxy_page(void)
 		hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
 		gtk_box_set_homogeneous(GTK_BOX(hbox), TRUE);
 		gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
-		pidgin_set_accessible_label (entry, label);
-
-		label = gtk_label_new_with_mnemonic(_("Pa_ssword:"));
+		pidgin_set_accessible_label(entry, label);
+
+		label = GTK_LABEL(gtk_label_new_with_mnemonic(_("Pa_ssword:")));
 		gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-		gtk_table_attach(GTK_TABLE(table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
+		gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(label),
+			2, 3, 1, 2, GTK_FILL, 0, 0, 0);
 
 		entry = gtk_entry_new();
-		gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
+		gtk_label_set_mnemonic_widget(label, entry);
 		gtk_table_attach(GTK_TABLE(table), entry, 3, 4, 1, 2, GTK_FILL , 0, 0, 0);
 		gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
 		g_signal_connect(G_OBJECT(entry), "changed",
@@ -2614,7 +2620,7 @@ proxy_page(void)
 		if (proxy_info != NULL && purple_proxy_info_get_password(proxy_info) != NULL)
 			gtk_entry_set_text(GTK_ENTRY(entry),
 					   purple_proxy_info_get_password(proxy_info));
-		pidgin_set_accessible_label (entry, label);
+		pidgin_set_accessible_label(entry, label);
 
 		proxy_changed_cb("/purple/proxy/type", PURPLE_PREF_STRING,
 			purple_prefs_get_string("/purple/proxy/type"),



More information about the Commits mailing list