summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-24 22:32:19 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-24 22:32:19 (EDT)
commit904e28e0fc0906fc010fb11eac36fad3f78ca11a (patch)
tree33f201ac536e334ca6a9b9d42f6990c59cbac634
parent55f47c853564ecad73e5790c512b085e87c75f11 (diff)
downloadmarquee-904e28e0fc0906fc010fb11eac36fad3f78ca11a.zip
marquee-904e28e0fc0906fc010fb11eac36fad3f78ca11a.tar.gz
marquee-904e28e0fc0906fc010fb11eac36fad3f78ca11a.tar.bz2
MqTab: Add callback for "New tab" button
-rw-r--r--src/tab.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tab.c b/src/tab.c
index 63af87b..913b34f 100644
--- a/src/tab.c
+++ b/src/tab.c
@@ -111,6 +111,13 @@ reload_tab_clicked_cb(GtkWidget __attribute__((unused)) *button, MqTab *tab)
}
static void
+new_tab_clicked_cb(GtkWidget __attribute__((unused)) *button, MqTab *tab)
+{
+ mq_tab_new(tab->application, NULL, tab);
+ gtk_widget_hide(tab->popover);
+}
+
+static void
new_window_clicked_cb(GtkWidget __attribute__((unused)) *button, MqTab *tab)
{
mq_application_add_window(tab->application, NULL);
@@ -183,6 +190,7 @@ tab_label_button_press_cb(GtkWidget *widget, GdkEvent *event, MqTab *tab)
NEW_TOGGLE(1, 3, "view-list-symbolic", "Tab list...");
CLICKED_CB(0, 0, G_CALLBACK(reload_tab_clicked_cb));
+ CLICKED_CB(1, 0, G_CALLBACK(new_tab_clicked_cb));
CLICKED_CB(1, 1, G_CALLBACK(new_window_clicked_cb));
/* Set up the tab list. */