diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/window.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/window.c b/src/window.c index ecad69a..d8860c8 100644 --- a/src/window.c +++ b/src/window.c @@ -188,8 +188,10 @@ switch_page_cb(GtkNotebook G_GNUC_UNUSED *notebook, { window->current_tab = ++page_num; + /* TODO: Use MqNotebook function. */ set_title(window, mq_tab_page_get_title( - mq_tab_page_seek(window->root_tab, page_num))); + MQ_TAB_PAGE(gtk_notebook_get_nth_page( + GTK_NOTEBOOK(window->notebook), page_num)))); } static void @@ -223,15 +225,12 @@ constructed(GObject *object) mq_config_get_integer(window->config, "window.width"), mq_config_get_integer(window->config, "window.height")); - window->root_tab = mq_tab_page_new_root(window); - if (window->uris && window->uris[0]) { for (i = 0; window->uris && window->uris[i]; ++i) { - mq_tab_page_new_relative(window->uris[i], - window->root_tab); + mq_tab_page_new(window, window->uris[i]); } } else { - mq_tab_page_new_relative(NULL, window->root_tab); + mq_tab_page_new(window, NULL); } gtk_widget_show_all(GTK_WIDGET(window)); @@ -396,7 +395,8 @@ mq_window_get_current_tab(MqWindow *window) guint mq_window_get_num_tabs(MqWindow *window) { - return mq_tab_page_get_tree_size(window->root_tab) - 1; + /* TODO: Use MqNotebook function. */ + return gtk_notebook_get_n_pages(GTK_NOTEBOOK(window->notebook)); } void |