Fix warnings about GtkAdjustments on GTK+2. cpw.qulogic.gtk3-required

Tue, 24 Jul 2012 01:01:18 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Tue, 24 Jul 2012 01:01:18 -0400
branch
cpw.qulogic.gtk3-required
changeset 33172
9fb9057fc55c
parent 33171
96a8f89214a3
child 33173
3c507e0e9ed5

Fix warnings about GtkAdjustments on GTK+2.

pidgin/gtkblist.c file | annotate | diff | comparison | revisions
pidgin/gtkprefs.c file | annotate | diff | comparison | revisions
pidgin/plugins/contact_priority.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkblist.c	Tue Jul 24 00:45:12 2012 -0400
+++ b/pidgin/gtkblist.c	Tue Jul 24 01:01:18 2012 -0400
@@ -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);
 		}
--- a/pidgin/gtkprefs.c	Tue Jul 24 00:45:12 2012 -0400
+++ b/pidgin/gtkprefs.c	Tue Jul 24 01:01:18 2012 -0400
@@ -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);
--- a/pidgin/plugins/contact_priority.c	Tue Jul 24 00:45:12 2012 -0400
+++ b/pidgin/plugins/contact_priority.c	Tue Jul 24 01:01:18 2012 -0400
@@ -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),

mercurial