summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/window.c8
-rw-r--r--src/window.h3
2 files changed, 10 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index e7b7bac..f39a5cd 100644
--- a/src/window.c
+++ b/src/window.c
@@ -75,7 +75,7 @@ delete_event_cb(GtkWindow *widget, GdkEvent G_GNUC_UNUSED *event,
GtkWidget *hbox;
GtkWidget *dialog;
- num_tabs = mq_tab_get_tree_size(window->root_tab) - 1;
+ num_tabs = mq_window_get_num_tabs(window);
if (num_tabs == 1) {
return FALSE;
@@ -256,6 +256,12 @@ mq_window_get_current_tab(MqWindow *window)
return window->current_tab;
}
+guint
+mq_window_get_num_tabs(MqWindow *window)
+{
+ return mq_tab_get_tree_size(window->root_tab) - 1;
+}
+
void
mq_window_update_tab_title(MqWindow *window, guint position, const gchar *title)
{
diff --git a/src/window.h b/src/window.h
index 2cbdb1d..d81601d 100644
--- a/src/window.h
+++ b/src/window.h
@@ -54,6 +54,9 @@ mq_window_set_current_tab(MqWindow *window, guint tab);
guint
mq_window_get_current_tab(MqWindow *window);
+guint
+mq_window_get_num_tabs(MqWindow *window);
+
void
mq_window_update_tab_title(MqWindow *window, guint position,
const gchar *title);