/pidgin/main: c6efc471c8a1: GTK Request: fix is_editable focusin...

Tomasz Wasilczyk twasilczyk at pidgin.im
Tue Sep 17 15:48:32 EDT 2013


Changeset: c6efc471c8a1e16add531a2b1d45a788e17381f1
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2013-09-17 21:48 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/c6efc471c8a1

Description:

GTK Request: fix is_editable focusing and display

diffstat:

 pidgin/gtkrequest.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (36 lines):

diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -977,8 +977,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 +1008,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 +1039,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);



More information about the Commits mailing list