summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/window.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index be034f8..32105a3 100644
--- a/src/window.c
+++ b/src/window.c
@@ -28,11 +28,24 @@
#include "tab.h"
static void
+set_title(MqWindow *window, const gchar *title)
+{
+ gchar *window_title;
+
+ window_title = g_strdup_printf("%s - Marquee", title);
+ gtk_window_set_title(GTK_WINDOW(window->window), window_title);
+ g_free(window_title);
+}
+
+static void
switch_page_cb(GtkNotebook __attribute__((unused)) *notebook,
GtkWidget __attribute__((unused)) *page, guint page_num,
MqWindow *window)
{
window->current_tab = page_num;
+
+ set_title(window, mq_tab_get_title(mq_tab_seek(window->root_tab,
+ page_num + 1)));
}
static void