From 30bc434dde744f24165fda080bce286d69a20ff0 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 12 Oct 2017 18:19:48 -0400 Subject: MqTabChrome: Close menu first in button click callbacks Although this doesn't really have any effect. --- (limited to 'src/tab-chrome.c') diff --git a/src/tab-chrome.c b/src/tab-chrome.c index 703dab1..8164846 100644 --- a/src/tab-chrome.c +++ b/src/tab-chrome.c @@ -333,30 +333,30 @@ zoom_in_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) static void find_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - mq_find_toolbar_reveal(chrome->find_toolbar); gtk_widget_hide(chrome->menu_popover); + mq_find_toolbar_reveal(chrome->find_toolbar); } static void fullscreen_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - mq_window_toggle_fullscreen(mq_tab_get_window(chrome->tab)); gtk_widget_hide(chrome->menu_popover); + mq_window_toggle_fullscreen(mq_tab_get_window(chrome->tab)); } static void developer_tools_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { + gtk_widget_hide(chrome->menu_popover); webkit_web_inspector_show(webkit_web_view_get_inspector( WEBKIT_WEB_VIEW(chrome->web_view))); - gtk_widget_hide(chrome->menu_popover); } static void preferences_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - mq_tab_new("about:preferences", chrome->tab); gtk_widget_hide(chrome->menu_popover); + mq_tab_new("about:preferences", chrome->tab); /* TODO: Hack: */ gtk_notebook_next_page(GTK_NOTEBOOK(chrome->tab->window->notebook)); } @@ -364,8 +364,8 @@ preferences_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) static void about_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - mq_tab_new("about:", chrome->tab); gtk_widget_hide(chrome->menu_popover); + mq_tab_new("about:", chrome->tab); /* TODO: Hack: */ gtk_notebook_next_page(GTK_NOTEBOOK(chrome->tab->window->notebook)); } @@ -373,10 +373,10 @@ about_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) static void quit_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqTabChrome *chrome) { - mq_tab_quit(chrome->tab); /* mq_tab_quit() just calls mq_window_quit(), which just calls * mq_application_quit(), which is asynchronous. So close the menu. */ gtk_widget_hide(chrome->menu_popover); + mq_tab_quit(chrome->tab); } #define BUTTON_ROWS 6 -- cgit v0.9.1