summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/notebook.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/notebook.c b/src/notebook.c
index b0854ee..8ef5733 100644
--- a/src/notebook.c
+++ b/src/notebook.c
@@ -176,7 +176,7 @@ tab_tree_row_activated_cb(GtkTreeView G_GNUC_UNUSED *tree_view,
tree_model = gtk_tree_view_get_model(tree_view);
if (gtk_tree_model_get_iter(tree_model, &tree_iter, tree_path)) {
gtk_tree_model_get(tree_model, &tree_iter, 0, &position, -1);
- mq_notebook_set_current_page(notebook, position - 1);
+ mq_notebook_set_current_page(notebook, position);
} else {
g_assert_not_reached();
}
@@ -403,9 +403,9 @@ mq_notebook_set_current_page(MqNotebook *notebook, gint page_num)
{
MqTabTree *node;
- node = MQ_TAB_TREE(mq_tree_seek(MQ_TREE(notebook->tree), page_num + 1));
+ node = MQ_TAB_TREE(mq_tree_seek(MQ_TREE(notebook->tree), page_num));
notebook->current_page = node->page;
- gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), page_num);
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), page_num - 1);
}
void