diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-08 03:35:35 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-08 03:36:28 (EDT) |
commit | 268478883c505394b223fbc7c34d1966f8f61867 (patch) | |
tree | 2469fd51e6f00678a9797432b1d3fd97741a9f85 | |
parent | 191776cbbe59d886a4a8c8c5ef2cb50ce7e87e64 (diff) | |
download | marquee-268478883c505394b223fbc7c34d1966f8f61867.zip marquee-268478883c505394b223fbc7c34d1966f8f61867.tar.gz marquee-268478883c505394b223fbc7c34d1966f8f61867.tar.bz2 |
MqTabChrome: Unify find bar closing code
-rw-r--r-- | src/tab-chrome.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 4a0e076..e9f5cc7 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -582,6 +582,14 @@ find_search_finished(MqTabChrome *chrome) } static void +find_close(MqTabChrome *chrome) +{ + gtk_revealer_set_reveal_child(GTK_REVEALER(chrome->find_revealer), + FALSE); + find_search_finished(chrome); +} + +static void find_search_changed_cb(GtkSearchEntry G_GNUC_UNUSED *entry, MqTabChrome *chrome) { find_search(chrome, TRUE); @@ -593,9 +601,7 @@ find_search_key_press_event_cb(GtkSearchEntry G_GNUC_UNUSED *entry, { switch (event->keyval) { case GDK_KEY_Escape: - gtk_revealer_set_reveal_child( - GTK_REVEALER(chrome->find_revealer), FALSE); - find_search_finished(chrome); + find_close(chrome); return TRUE; case GDK_KEY_Return: case GDK_KEY_KP_Enter: @@ -641,9 +647,7 @@ find_match_case_toggled_cb(GtkToggleButton *toggle_button, MqTabChrome *chrome) static void find_close_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - gtk_revealer_set_reveal_child(GTK_REVEALER(chrome->find_revealer), - FALSE); - find_search_finished(chrome); + find_close(chrome); } static GtkWidget * |