Merged default branch soc.2013.gobjectification

Wed, 18 Sep 2013 12:57:19 +0530

author
Ankit Vani <a@nevitus.org>
date
Wed, 18 Sep 2013 12:57:19 +0530
branch
soc.2013.gobjectification
changeset 34949
aa59f6a5b751
parent 34948
e31ee6f00ff8 (current diff)
parent 34447
be84e0a7e68d (diff)
child 34950
be2efb56ab73
child 36762
e83ad7c340e7

Merged default branch

pidgin/gtkrequest.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkrequest.c	Tue Sep 17 22:22:20 2013 +0530
+++ b/pidgin/gtkrequest.c	Wed Sep 18 12:57:19 2013 +0530
@@ -127,6 +127,7 @@
 
 	g_object_set_data(G_OBJECT(data->dialog),
 		"pidgin-window-is-closing", GINT_TO_POINTER(TRUE));
+	gtk_widget_set_visible(GTK_WIDGET(data->dialog), FALSE);
 }
 
 static void
@@ -977,8 +978,10 @@
 {
 	const char *value;
 	GtkWidget *widget;
+	gboolean is_editable;
 
 	value = purple_request_field_string_get_default_value(field);
+	is_editable = purple_request_field_string_is_editable(field);
 
 	if (purple_request_field_string_is_multiline(field))
 	{
@@ -1006,8 +1009,8 @@
 
 		gtk_widget_set_tooltip_text(textview, purple_request_field_get_tooltip(field));
 
-		gtk_text_view_set_editable(GTK_TEXT_VIEW(textview),
-			purple_request_field_string_is_editable(field));
+		gtk_text_view_set_editable(GTK_TEXT_VIEW(textview), is_editable);
+		gtk_widget_set_sensitive(textview, is_editable);
 
 		g_signal_connect(G_OBJECT(textview), "focus-out-event",
 						 G_CALLBACK(field_string_focus_out_cb), field);
@@ -1037,8 +1040,8 @@
 			gtk_entry_set_visibility(GTK_ENTRY(widget), FALSE);
 		}
 
-		gtk_editable_set_editable(GTK_EDITABLE(widget),
-			purple_request_field_string_is_editable(field));
+		gtk_editable_set_editable(GTK_EDITABLE(widget), is_editable);
+		gtk_widget_set_sensitive(widget, is_editable);
 
 		g_signal_connect(G_OBJECT(widget), "focus-out-event",
 						 G_CALLBACK(field_string_focus_out_cb), field);
--- a/pidgin/gtkutils.c	Tue Sep 17 22:22:20 2013 +0530
+++ b/pidgin/gtkutils.c	Wed Sep 18 12:57:19 2013 +0530
@@ -2958,6 +2958,13 @@
 		GtkWindow *window = GTK_WINDOW(windows->data);
 		windows = g_list_delete_link(windows, windows);
 
+		if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(window),
+			"pidgin-window-is-closing")))
+		{
+			parent = gtk_window_get_transient_for(window);
+			break;
+		}
+
 		if (GTK_WIDGET(window) == widget ||
 				!gtk_widget_get_visible(GTK_WIDGET(window))) {
 			continue;
@@ -2971,11 +2978,6 @@
 	}
 	if (windows)
 		g_list_free(windows);
-	if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(parent),
-		"pidgin-window-is-closing")))
-	{
-		parent = gtk_window_get_transient_for(parent);
-	}
 	if (parent) {
 		gtk_window_set_transient_for(GTK_WINDOW(widget), parent);
 		return TRUE;

mercurial