[evolution-patches] [addressbook] : Patch for Bug #241219



Hi,

This patch solves the bug #241219.
It makes the edit categories dialog non-modal.
Please review.

Thanks 
devashish 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1976
diff -u -p -r1.1976 ChangeLog
--- ChangeLog	13 Aug 2005 06:22:23 -0000	1.1976
+++ ChangeLog	16 Aug 2005 11:48:29 -0000
@@ -1,3 +1,9 @@
+2005-08-16  Devashish Sharma <sdevashish novell com>
+	
+	* gui/contact-editor/e-contact-editor.c (categories_clicked): Makes Edit
+	categories dialog non-modal.
+	Fixes Bug #241219
+
 2005-03-13  Sushma Rai  <rsushma novell com>
 
 	* gui/component/addressbook-config.c (do_ldap_root_dse_query): Checking
Index: e-contact-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-editor/e-contact-editor.c,v
retrieving revision 1.240
diff -u -p -r1.240 e-contact-editor.c
--- e-contact-editor.c	10 Aug 2005 11:47:39 -0000	1.240
+++ e-contact-editor.c	16 Aug 2005 11:49:08 -0000
@@ -2543,12 +2543,26 @@ full_name_clicked (GtkWidget *button, EC
 	gtk_widget_destroy (GTK_WIDGET (dialog));
 }
 
+response (GtkDialog *dialog, int response, EContactEditor *editor)
+{
+	char *categories = NULL;
+	GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories");
+	
+	if (response == GTK_RESPONSE_OK) {
+		categories = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog));
+		if (entry && GTK_IS_ENTRY(entry))
+			gtk_entry_set_text (GTK_ENTRY (entry), categories);
+		else
+			e_contact_set (editor->contact, E_CONTACT_CATEGORIES, categories);
+	}
+	gtk_widget_destroy(GTK_WIDGET(dialog));
+}
+
 static void
 categories_clicked (GtkWidget *button, EContactEditor *editor)
 {
 	char *categories = NULL;
 	GtkDialog *dialog;
-	int result;
 	GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories");
 
 	if (entry && GTK_IS_ENTRY(entry))
@@ -2561,18 +2575,12 @@ categories_clicked (GtkWidget *button, E
 		g_free (categories);
 		return;
 	}
+
+	g_signal_connect(dialog, "response",
+			G_CALLBACK (response), editor);	
 	
 	gtk_widget_show(GTK_WIDGET(dialog));
-	result = gtk_dialog_run (dialog);
 	g_free (categories);
-	if (result == GTK_RESPONSE_OK) {
-		categories = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog));
-		if (entry && GTK_IS_ENTRY(entry))
-			gtk_entry_set_text (GTK_ENTRY (entry), categories);
-		else
-			e_contact_set (editor->contact, E_CONTACT_CATEGORIES, categories);
-	}
-	gtk_widget_destroy(GTK_WIDGET(dialog));
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]