/pidgin/main: 9fb9057fc55c: Fix warnings about GtkAdjustments on...

Elliott Sales de Andrade qulogic at pidgin.im
Tue Jul 24 04:03:56 EDT 2012


Changeset: 9fb9057fc55c0fdd21509ccaf4b1936bc80f6924
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2012-07-24 01:01 -0400
Branch:	 cpw.qulogic.gtk3-required
URL: http://hg.pidgin.im/pidgin/main/rev/9fb9057fc55c

Description:

Fix warnings about GtkAdjustments on GTK+2.

diffstat:

 pidgin/gtkblist.c                 |  7 ++++---
 pidgin/gtkprefs.c                 |  4 ++--
 pidgin/plugins/contact_priority.c |  9 +++++----
 3 files changed, 11 insertions(+), 9 deletions(-)

diffs (57 lines):

diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -1092,9 +1092,10 @@
 		if (pce->is_int)
 		{
 			GtkAdjustment *adjust;
-			adjust = gtk_adjustment_new(pce->min, pce->min, pce->max,
-										1, 10, 10);
-			input = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0);
+			adjust = GTK_ADJUSTMENT(gtk_adjustment_new(pce->min,
+			                                           pce->min, pce->max,
+			                                           1, 10, 10));
+			input = gtk_spin_button_new(adjust, 1, 0);
 			gtk_widget_set_size_request(input, 50, -1);
 			pidgin_add_widget_to_vbox(GTK_BOX(data->rq_data.vbox), pce->label, data->rq_data.sg, input, FALSE, NULL);
 		}
diff --git a/pidgin/gtkprefs.c b/pidgin/gtkprefs.c
--- a/pidgin/gtkprefs.c
+++ b/pidgin/gtkprefs.c
@@ -130,8 +130,8 @@
 
 	val = purple_prefs_get_int(key);
 
-	adjust = gtk_adjustment_new(val, min, max, 1, 1, 0);
-	spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0);
+	adjust = GTK_ADJUSTMENT(gtk_adjustment_new(val, min, max, 1, 1, 0));
+	spin = gtk_spin_button_new(adjust, 1, 0);
 	g_object_set_data(G_OBJECT(spin), "val", (char *)key);
 	if (max < 10000)
 		gtk_widget_set_size_request(spin, 50, -1);
diff --git a/pidgin/plugins/contact_priority.c b/pidgin/plugins/contact_priority.c
--- a/pidgin/plugins/contact_priority.c
+++ b/pidgin/plugins/contact_priority.c
@@ -105,8 +105,9 @@
 		gtk_size_group_add_widget(sg, label);
 		gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
 
-		adj = gtk_adjustment_new(purple_prefs_get_int(pref), -500, 500, 1, 1, 1);
-		spin = gtk_spin_button_new((GtkAdjustment *)adj, 1, 0);
+		adj = GTK_ADJUSTMENT(gtk_adjustment_new(purple_prefs_get_int(pref),
+		                                        -500, 500, 1, 1, 1));
+		spin = gtk_spin_button_new(adj, 1, 0);
 		g_signal_connect(G_OBJECT(spin), "value-changed", G_CALLBACK(pref_update), pref);
 		gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0);
 
@@ -138,8 +139,8 @@
 
 	/* make this here so I can use it in the option menu callback, we'll
 	 * actually set it up later */
-	adj = gtk_adjustment_new(0, -500, 500, 1, 1, 1);
-	spin = gtk_spin_button_new((GtkAdjustment *)adj, 1, 0);
+	adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -500, 500, 1, 1, 1));
+	spin = gtk_spin_button_new(adj, 1, 0);
 
 	optmenu = pidgin_account_option_menu_new(NULL, TRUE,
 	                                         G_CALLBACK(select_account),



More information about the Commits mailing list