Re: [evolution-patches] patch for 49702




see ettore's followup.  I think greying out the 'find' button should be sufficient, if thats what other apps are doing.

On Thu, 2003-10-16 at 21:43, Charles Zhang wrote:
En, I cannot master the custom in evolution well.
What do you think of this?
If this bug is reasonable, what should we indicate the user and in which way, what words?

Not Zed wrote:
ugh, do we really want to do this?  another popup?

On Thu, 2003-10-16 at 03:45, Charles Zhang wrote:

  
Hello all
       This is a patch for #49702.

       This bug says that after searing in a composer, if nothing found, 
there is no indicating but close the searching dialog.
       So in this patch, I popup a message dialog to indicate the user 
while found nothing after searching.

       Please review.

Best Regards
Charles Zhang


______________________________________________________________________

? components/html-editor/GNOME_GtkHTML_Editor-emacs.xml
? components/html-editor/test_editor
Index: components/html-editor/ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.410.2.9
diff -u -p -r1.410.2.9 ChangeLog
--- components/html-editor/ChangeLog	15 Sep 2003 16:19:12 -0000	1.410.2.9
+++ components/html-editor/ChangeLog	15 Oct 2003 18:06:05 -0000
@@ -0,0 +0,5 @@
+2003-10-14  Charles Zhang  <charles zhang sun com>
+
+	* search.c (search_dialog_response): if found nothing, indicate 
+	the user. [49702]
+
Index: components/html-editor/search.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/search.c,v
retrieving revision 1.22
diff -u -p -r1.22 search.c
--- components/html-editor/search.c	12 May 2003 20:46:48 -0000	1.22
+++ components/html-editor/search.c	15 Oct 2003 18:06:06 -0000
@@ -55,12 +55,25 @@ entry_activate (GtkWidget *entry, GtkHTM
 static void
 search_dialog_response (GtkDialog *dialog, gint response_id, GtkHTMLSearchDialog *d)
 {
+	gboolean found;
+	GtkWidget *notfound;
+
 	switch (response_id) {
 	case 0: /* Search */
 		gtk_widget_hide (GTK_WIDGET (d->dialog));
-		html_engine_search (d->html->engine, gtk_entry_get_text (GTK_ENTRY (d->entry)),
-				    GTK_TOGGLE_BUTTON (d->case_sensitive)->active,
-				    GTK_TOGGLE_BUTTON (d->backward)->active == 0, d->cd->regular);
+		found = html_engine_search (d->html->engine, gtk_entry_get_text (GTK_ENTRY (d->entry)),
+					    GTK_TOGGLE_BUTTON (d->case_sensitive)->active,
+					    GTK_TOGGLE_BUTTON (d->backward)->active == 0, d->cd->regular);
+		
+		if (!found) {
+			notfound = gtk_message_dialog_new (GTK_WINDOW (dialog),
+							   GTK_DIALOG_DESTROY_WITH_PARENT,
+							   GTK_MESSAGE_INFO,
+							   GTK_BUTTONS_CLOSE,
+							   _("Searching text not found."));
+			gtk_dialog_run (GTK_DIALOG (notfound));
+			gtk_widget_destroy (notfound);
+		}
 		break;
 	}
 }
    
  


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