changeset 27234:13d0a8097a94

Fix the Add button sensitivity for the add smiley window when using the "Add Custom Smiley" menu item on an in-conversation custom smiley.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 03 Jul 2009 02:21:42 +0000
parents 0af18d18de0d
children 5b20267a61d3
files pidgin/gtksmiley.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtksmiley.c	Fri Jul 03 02:10:53 2009 +0000
+++ b/pidgin/gtksmiley.c	Fri Jul 03 02:21:42 2009 +0000
@@ -491,8 +491,15 @@
 	if (editor->custom_pixbuf)
 		g_object_unref(G_OBJECT(editor->custom_pixbuf));
 	editor->custom_pixbuf = image ? g_object_ref(G_OBJECT(image)) : NULL;
-	if (image)
+	if (image) {
 		gtk_image_set_from_pixbuf(GTK_IMAGE(editor->smiley_image), image);
+		if (editor->entry_len > 0)
+			gtk_dialog_set_response_sensitive(GTK_DIALOG(editor->parent),
+			                                  GTK_RESPONSE_ACCEPT, TRUE);
+	}
+	else
+		gtk_dialog_set_response_sensitive(GTK_DIALOG(editor->parent),
+		                                  GTK_RESPONSE_ACCEPT, FALSE);
 }
 
 void