diff options
author | Federico Mena Quintero <federico@ximian.com> | 2003-06-04 04:46:35 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2003-06-04 04:46:35 +0800 |
commit | a6fcdd3630c2aec9cc7f727923715a4de9ded104 (patch) | |
tree | 27c54a83cdb48b6ebb7b94fec26522a7a2b84d54 | |
parent | 33f79427df1890ed16f422693c8144ffee727073 (diff) | |
download | gsoc2013-evolution-a6fcdd3630c2aec9cc7f727923715a4de9ded104.tar.gz gsoc2013-evolution-a6fcdd3630c2aec9cc7f727923715a4de9ded104.tar.zst gsoc2013-evolution-a6fcdd3630c2aec9cc7f727923715a4de9ded104.zip |
Put the buttons in HIG order; don't replace the label of the stock Find
2003-06-03 Federico Mena Quintero <federico@ximian.com>
* mail-search.c (mail_search_construct): Put the buttons in HIG
order; don't replace the label of the stock Find button. Also,
add Escape as a keybinding for the Close button (see why GTK+ is
on crack on b.g.o #74221 and #101293).
svn path=/trunk/; revision=21379
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-search.c | 14 |
2 files changed, 16 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 5933f09baa..1658c3a7ec 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2003-06-03 Federico Mena Quintero <federico@ximian.com> + + * mail-search.c (mail_search_construct): Put the buttons in HIG + order; don't replace the label of the stock Find button. Also, + add Escape as a keybinding for the Close button (see why GTK+ is + on crack on b.g.o #74221 and #101293). + 2003-06-02 Not Zed <NotZed@Ximian.com> ** This and jeffs patch for #43862. diff --git a/mail/mail-search.c b/mail/mail-search.c index 4e79cf2fd1..424ccee991 100644 --- a/mail/mail-search.c +++ b/mail/mail-search.c @@ -32,6 +32,7 @@ #include <gtkhtml/gtkhtml-search.h> #include <gtkhtml/htmlengine.h> #include <libgnomeui/gnome-window-icon.h> +#include <gdk/gdkkeysyms.h> static ESearchingTokenizer *mail_search_tokenizer (MailSearch *ms); @@ -273,6 +274,7 @@ mail_search_construct (MailSearch *ms, MailDisplay *mail) GtkWidget *button; GtkWidget *msg_hbox; GtkWidget *msg_frame; + GtkAccelGroup *accel_group; g_return_if_fail (ms != NULL && IS_MAIL_SEARCH (ms)); g_return_if_fail (mail != NULL && IS_MAIL_DISPLAY (mail)); @@ -284,12 +286,14 @@ mail_search_construct (MailSearch *ms, MailDisplay *mail) gtk_window_set_title ((GtkWindow *) ms, _("Find in Message")); - button = gtk_button_new_from_stock (GTK_STOCK_FIND); - gtk_button_set_label ((GtkButton *) button, _("Search")); - gtk_dialog_add_action_widget ((GtkDialog*) ms, button, GTK_RESPONSE_ACCEPT); - gtk_dialog_add_button ((GtkDialog *) ms, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); + button = gtk_dialog_add_button ((GtkDialog *) ms, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); gtk_dialog_set_default_response ((GtkDialog *) ms, GTK_RESPONSE_ACCEPT); - + accel_group = gtk_accel_group_new (); + gtk_window_add_accel_group (GTK_WINDOW (ms), accel_group); + gtk_widget_add_accelerator (button, "activate", accel_group, GDK_Escape, 0, GTK_ACCEL_LOCKED); + + gtk_dialog_add_button ((GtkDialog *) ms, GTK_STOCK_FIND, GTK_RESPONSE_ACCEPT); + ms->search_forward = TRUE; ms->case_sensitive = FALSE; |