[evolution-patches] patch for 49702
- From: Charles Zhang <Charles Zhang Sun Com>
- To: evolution-patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] patch for 49702
- Date: Thu, 16 Oct 2003 02:15:52 +0800
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]