Updating branch refs/heads/master to f67680befa81f562943b591a7143e25baea1fb17 (commit) from 72415680ea141554b03f505d5f9a96861957c5a0 (commit)
commit f67680befa81f562943b591a7143e25baea1fb17 Author: Nick Schermer <n...@xfce.org> Date: Sat Dec 8 10:31:50 2007 +0000 * mousepad/mousepad-{search-bar,window}.c: Remove highlight when hiding the search bar. Search ahead when opening the search bar. (Old svn revision: 26450) ChangeLog | 6 ++++++ mousepad/mousepad-search-bar.c | 5 ++++- mousepad/mousepad-window.c | 13 +++++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ac7eef..724b54b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-08 Nick Schermer <n...@xfce.org> + + * mousepad/mousepad-{search-bar,window}.c: Remove highlight when + hiding the search bar. Search ahead when opening the search bar. + + 2007-12-07 Nick Schermer <n...@xfce.org> * mousepad/mousepad-search-bar.c: Fix red entry when toggling the diff --git a/mousepad/mousepad-search-bar.c b/mousepad/mousepad-search-bar.c index 4fa61dc..be06618 100644 --- a/mousepad/mousepad-search-bar.c +++ b/mousepad/mousepad-search-bar.c @@ -152,7 +152,7 @@ mousepad_search_bar_class_init (MousepadSearchBarClass *klass) search_bar_signals[SEARCH] = g_signal_new (I_("search"), G_TYPE_FROM_CLASS (gobject_class), - G_SIGNAL_NO_HOOKS , + G_SIGNAL_NO_HOOKS, 0, NULL, NULL, _mousepad_marshal_INT__FLAGS_STRING_STRING, G_TYPE_INT, 3, @@ -514,6 +514,9 @@ mousepad_search_bar_focus (MousepadSearchBar *bar) /* focus the entry field */ gtk_widget_grab_focus (bar->entry); + /* trigger search function */ + mousepad_search_bar_entry_changed (NULL, bar); + /* update the highlight */ mousepad_search_bar_highlight_schedule (bar); } diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 9adf5a5..9defb9d 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -2654,19 +2654,24 @@ mousepad_window_search (MousepadWindow *window, static void mousepad_window_hide_search_bar (MousepadWindow *window) { + MousepadSearchFlags flags; + _mousepad_return_if_fail (MOUSEPAD_IS_WINDOW (window)); + _mousepad_return_if_fail (MOUSEPAD_IS_DOCUMENT (window->active)); _mousepad_return_if_fail (MOUSEPAD_IS_SEARCH_BAR (window->search_bar)); + /* setup flags */ + flags = MOUSEPAD_SEARCH_FLAGS_ACTION_HIGHTLIGHT + | MOUSEPAD_SEARCH_FLAGS_ACTION_CLEANUP; + /* remove the highlight */ - //mousepad_search_bar_reset_highlight (MOUSEPAD_SEARCH_BAR (window->search_bar)); - /* TODO */ + mousepad_window_search (window, flags, NULL, NULL); /* hide the search bar */ gtk_widget_hide (window->search_bar); /* focus the active document's text view */ - if (G_LIKELY (window->active)) - mousepad_document_focus_textview (window->active); + mousepad_document_focus_textview (window->active); } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits