[evolution-patches] [addressbook]Bug 305678: Unable to tell that the search is working.



Hi,

Name selector dialog shows "searching" at the bottom of the dialog box,
while performing a search.
This feature was there previously in 2.0.x but maybe was lost during
code migration from 2.0 to 2.2

thanks
Devashish Sharma
Index: libedataserverui/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/ChangeLog,v
retrieving revision 1.62
diff -u -p -r1.62 ChangeLog
--- libedataserverui/ChangeLog	26 Aug 2005 11:44:47 -0000	1.62
+++ libedataserverui/ChangeLog	23 Sep 2005 12:12:16 -0000
@@ -1,3 +1,9 @@
+2005-09-23  Devashish Sharma <sdevashish novell com>
+
+	* e-name-selector-dialog.c: Name selector dialog shows "searching" at
+	the bottom of the dialog box, while performing a search.
+	Fixes #305678.
+	
 2005-08-26  Harish Krishnaswamy  <kharish novell com>
 
 	* e-name-selector-dialog.c: (e_name_selector_dialog_init):
Index: libedataserverui/e-name-selector-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-name-selector-dialog.c,v
retrieving revision 1.20
diff -u -p -r1.20 e-name-selector-dialog.c
--- libedataserverui/e-name-selector-dialog.c	31 Aug 2005 04:26:10 -0000	1.20
+++ libedataserverui/e-name-selector-dialog.c	23 Sep 2005 12:17:00 -0000
@@ -654,6 +654,10 @@ search_changed (ENameSelectorDialog *nam
 	const gchar   *text;
 	gchar         *text_escaped;
 	gchar         *query_string;
+	GtkWidget     *status_message ;
+
+	status_message = glade_xml_get_widget (name_selector_dialog->gui, "status-message");
+	gtk_label_set_text ( GTK_LABEL (status_message), "Searching") ;
 
 	text = gtk_entry_get_text (name_selector_dialog->search_entry);
 	text_escaped = escape_sexp_string (text);
@@ -874,6 +878,15 @@ transfer_button_clicked (ENameSelectorDi
  * --------------------- */
 
 static void
+search_complete (ENameSelectorDialog *name_selector_dialog)
+{
+	GtkWidget     *status_message ;
+
+	status_message = glade_xml_get_widget (name_selector_dialog->gui, "status-message");
+	gtk_label_set_text ( GTK_LABEL (status_message), "") ;
+}
+
+static void
 setup_name_selector_model (ENameSelectorDialog *name_selector_dialog)
 {
 	EContactStore       *contact_store;
@@ -881,6 +894,7 @@ setup_name_selector_model (ENameSelector
 	GList               *new_sections;
 	GList               *l;
 	gint                 i;
+	GtkTreeModel        *tree_model;
 
 	/* Rid UI of previous destination sections */
 
@@ -932,6 +946,12 @@ setup_name_selector_model (ENameSelector
 					      E_CONTACT_FILE_AS, GTK_SORT_ASCENDING);
 	gtk_tree_view_set_model (name_selector_dialog->contact_view,
 				 GTK_TREE_MODEL (name_selector_dialog->contact_sort));
+
+	tree_model = gtk_tree_view_get_model (name_selector_dialog->contact_view);
+	g_signal_connect_swapped (tree_model, "row-deleted",
+				  G_CALLBACK (search_complete), name_selector_dialog);
+	g_signal_connect_swapped (tree_model, "row-inserted",
+				  G_CALLBACK (search_complete), name_selector_dialog);
 
 	/* Make sure UI is consistent */
 


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