/soc/2013/ankitkv/gobjectification: e83ad7c340e7: Merged soc.201...

Ankit Vani a at nevitus.org
Wed Sep 18 03:28:22 EDT 2013


Changeset: e83ad7c340e73795a861ac6f180aaf905081a656
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-18 12:57 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/e83ad7c340e7

Description:

Merged soc.2013.gobjectification branch

diffstat:

 pidgin/gtkrequest.c |  11 +++++++----
 pidgin/gtkutils.c   |  12 +++++++-----
 2 files changed, 14 insertions(+), 9 deletions(-)

diffs (73 lines):

diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -127,6 +127,7 @@ generic_response_start(PidginRequestData
 
 	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 @@ create_string_field(PurpleRequestField *
 {
 	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 @@ create_string_field(PurpleRequestField *
 
 		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 @@ create_string_field(PurpleRequestField *
 			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);
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -2942,6 +2942,13 @@ gboolean pidgin_auto_parent_window(GtkWi
 		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;
@@ -2955,11 +2962,6 @@ gboolean pidgin_auto_parent_window(GtkWi
 	}
 	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;



More information about the Commits mailing list