From c6e38616022a6e2bf80e4b5026bf66eee8238211 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 28 Sep 2017 16:06:49 -0400 Subject: mq_window_set_current_tab(): New function --- (limited to 'src') diff --git a/src/window.c b/src/window.c index 6a44ae1..15230ba 100644 --- a/src/window.c +++ b/src/window.c @@ -121,6 +121,13 @@ mq_window_insert_tab(MqWindow *window, GtkWidget *tab_page, gtk_widget_show_all(tab_label); } +void +mq_window_set_current_tab(MqWindow *window, guint tab) +{ + window->current_tab = tab; + gtk_notebook_set_current_page(GTK_NOTEBOOK(window->notebook), tab - 1); +} + guint mq_window_get_current_tab(MqWindow *window) { diff --git a/src/window.h b/src/window.h index 24cd8a1..e5a6314 100644 --- a/src/window.h +++ b/src/window.h @@ -47,6 +47,9 @@ void mq_window_insert_tab(MqWindow *window, GtkWidget *tab_page, GtkWidget *tab_label, gint position); +void +mq_window_set_current_tab(MqWindow *window, guint tab); + guint mq_window_get_current_tab(MqWindow *window); -- cgit v0.9.1