diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ChangeLog.ja | 4 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | ltmain.sh | 2 | ||||
-rw-r--r-- | src/summaryview.c | 53 | ||||
-rw-r--r-- | src/summaryview.h | 2 |
7 files changed, 64 insertions, 4 deletions
@@ -1,5 +1,9 @@ 2006-03-24 + * src/summaryview.[ch]: added the clear button for quick search entry. + +2006-03-24 + * src/prefs_common_dialog.c: prefs_keybind_apply_clicked(): fixed "/View/Show all headers" menu string (thanks to Kyosuke Takayama). diff --git a/ChangeLog.ja b/ChangeLog.ja index ef55b02e..8862fa27 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,9 @@ 2006-03-24 + * src/summaryview.[ch]: クイックサーチエントリのクリアボタンを追加。 + +2006-03-24 + * src/prefs_common_dialog.c: prefs_keybind_apply_clicked(): メニュー 文字列 "/View/Show all headers" を修正(Takayama さん thanks)。 @@ -4,6 +4,7 @@ Changes of Sylpheed * MIME filename encoding with RFC 2322 parameter value extension was supported. + * The clear button for the quick search entry was added. * Win32: The bug that subfolders were duplicated when rebuilding folder tree while the settings were shared between Win32 and Unix was fixed. * Win32: The uninstaller was modified so that it only removes files and diff --git a/configure.in b/configure.in index 32c4f428..595586bf 100644 --- a/configure.in +++ b/configure.in @@ -6,7 +6,7 @@ PACKAGE=sylpheed dnl version number MAJOR_VERSION=2 MINOR_VERSION=2 -MICRO_VERSION=3 +MICRO_VERSION=4 INTERFACE_AGE=0 BINARY_AGE=0 EXTRA_VERSION= @@ -43,7 +43,7 @@ EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="1.5.22 Debian 1.5.22-2" +VERSION="1.5.22 Debian 1.5.22-4" TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" # See if we are running on zsh, and set the options which allow our diff --git a/src/summaryview.c b/src/summaryview.c index a49864ca..0dc149a4 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -242,6 +242,8 @@ static void summary_search_entry_changed(GtkWidget *entry, static void summary_search_entry_activated (GtkWidget *entry, SummaryView *summaryview); +static void summary_search_clear_clicked(GtkWidget *button, + SummaryView *summaryview); static gboolean summary_toggle_pressed (GtkWidget *eventbox, GdkEventButton *event, @@ -467,6 +469,9 @@ SummaryView *summary_create(void) GtkWidget *search_label; GtkWidget *search_entry; GtkTooltips *search_tip; + GtkWidget *search_vbox; + GtkWidget *search_clear_btn; + GtkWidget *image; GtkWidget *scrolledwin; GtkWidget *treeview; GtkTreeStore *store; @@ -490,7 +495,7 @@ SummaryView *summary_create(void) vbox = gtk_vbox_new(FALSE, 1); - search_hbox = gtk_hbox_new(FALSE, 4); + search_hbox = gtk_hbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(search_hbox), 2); gtk_box_pack_start(GTK_BOX(vbox), search_hbox, FALSE, FALSE, 0); @@ -517,12 +522,16 @@ SummaryView *summary_create(void) #undef COND_MENUITEM_ADD hbox = gtk_hbox_new(FALSE, 0); - gtk_widget_set_size_request(hbox, 4, -1); + gtk_widget_set_size_request(hbox, 8, -1); gtk_box_pack_start(GTK_BOX(search_hbox), hbox, FALSE, FALSE, 0); search_label = gtk_label_new(_("Search:")); gtk_box_pack_start(GTK_BOX(search_hbox), search_label, FALSE, FALSE, 0); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_set_size_request(hbox, 4, -1); + gtk_box_pack_start(GTK_BOX(search_hbox), hbox, FALSE, FALSE, 0); + search_entry = gtk_entry_new(); gtk_widget_set_size_request(search_entry, 200, -1); gtk_box_pack_start(GTK_BOX(search_hbox), search_entry, FALSE, FALSE, 0); @@ -536,6 +545,25 @@ SummaryView *summary_create(void) gtk_tooltips_set_tip(search_tip, search_entry, _("Search for Subject or From"), NULL); + hbox = gtk_hbox_new(FALSE, 0); + gtk_widget_set_size_request(hbox, 2, -1); + gtk_box_pack_start(GTK_BOX(search_hbox), hbox, FALSE, FALSE, 0); + + search_vbox = gtk_vbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(search_hbox), search_vbox, FALSE, FALSE, 0); + + search_clear_btn = gtk_button_new(); + gtk_button_set_relief(GTK_BUTTON(search_clear_btn), GTK_RELIEF_NONE); + gtk_widget_set_size_request(search_clear_btn, 20, 20); + image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, + GTK_ICON_SIZE_MENU); + gtk_container_add(GTK_CONTAINER(search_clear_btn), image); + GTK_WIDGET_UNSET_FLAGS(search_clear_btn, GTK_CAN_FOCUS); + gtk_box_pack_start(GTK_BOX(search_vbox), search_clear_btn, + TRUE, FALSE, 0); + g_signal_connect(G_OBJECT(search_clear_btn), "clicked", + G_CALLBACK(summary_search_clear_clicked), summaryview); + scrolledwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin), GTK_POLICY_AUTOMATIC, @@ -596,6 +624,7 @@ SummaryView *summary_create(void) summaryview->filter_menu = filter_menu; summaryview->search_label = search_label; summaryview->search_entry = search_entry; + summaryview->search_clear_btn = search_clear_btn; summaryview->scrolledwin = scrolledwin; summaryview->treeview = treeview; summaryview->store = store; @@ -619,6 +648,7 @@ SummaryView *summary_create(void) summaryview->reedit_separator = GTK_WIDGET(child->next->data); gtk_widget_show_all(vbox); + gtk_widget_hide(search_clear_btn); return summaryview; } @@ -5063,6 +5093,12 @@ void summary_qsearch_reset(SummaryView *summaryview) main_window_set_toolbar_sensitive(summaryview->mainwin); } +void summary_qsearch_clear_entry(SummaryView *summaryview) +{ + gtk_entry_set_text(GTK_ENTRY(summaryview->search_entry), ""); + summary_qsearch(summaryview); +} + void summary_qsearch(SummaryView *summaryview) { FilterCondType type; @@ -5191,6 +5227,13 @@ static void summary_filter_menu_activated(GtkWidget *menuitem, static void summary_search_entry_changed(GtkWidget *entry, SummaryView *summaryview) { + const gchar *text; + + text = gtk_entry_get_text(GTK_ENTRY(entry)); + if (text && *text != '\0') + gtk_widget_show(summaryview->search_clear_btn); + else + gtk_widget_hide(summaryview->search_clear_btn); } static void summary_search_entry_activated(GtkWidget *entry, @@ -5200,6 +5243,12 @@ static void summary_search_entry_activated(GtkWidget *entry, summary_qsearch(summaryview); } +static void summary_search_clear_clicked(GtkWidget *button, + SummaryView *summaryview) +{ + summary_qsearch_clear_entry(summaryview); +} + static gboolean summary_toggle_pressed(GtkWidget *eventbox, GdkEventButton *event, SummaryView *summaryview) diff --git a/src/summaryview.h b/src/summaryview.h index 1a2b6e7d..06e1f75d 100644 --- a/src/summaryview.h +++ b/src/summaryview.h @@ -64,6 +64,7 @@ struct _SummaryView GtkWidget *filter_menu; GtkWidget *search_label; GtkWidget *search_entry; + GtkWidget *search_clear_btn; GtkWidget *scrolledwin; GtkWidget *treeview; @@ -272,6 +273,7 @@ void summary_set_column_order (SummaryView *summaryview); void summary_get_column_order (SummaryView *summaryview); void summary_qsearch_reset (SummaryView *summaryview); +void summary_qsearch_clear_entry (SummaryView *summaryview); void summary_qsearch (SummaryView *summaryview); #endif /* __SUMMARY_H__ */ |