From e896b5da1446fe57362a4522c26efbe89b4662a9 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 24 Oct 2017 00:57:49 -0400 Subject: MqNotebook: Add comment and debugging output for bug --- (limited to 'src/notebook.c') diff --git a/src/notebook.c b/src/notebook.c index d3583b8..56f6a0d 100644 --- a/src/notebook.c +++ b/src/notebook.c @@ -171,6 +171,19 @@ tab_tree_row_activated_cb(GtkTreeView G_GNUC_UNUSED *tree_view, gint depth; indices = gtk_tree_path_get_indices_with_depth(tree_path, &depth); + /* + * FIXME: gtk_tree_path_get_indices_with_depth() sometimes returns two + * indices, both always 0. Steps to reproduce: + * + * 1. Open a new tab (i.e. a child of another tab) + * 2. Show the tab tree menu + * 3. Activate the row representing the new (child) tab + * + * Obviously this seems to be a recursion issue. + */ + g_print("depth = %d\n", depth); + for (gint i = 0; i < depth; ++i) + g_print("indices[%d] = %d\n", i, indices[i]); g_assert(depth == 1); mq_notebook_set_current_page(notebook, indices[0]); gtk_widget_hide(notebook->tab_tree_popover); -- cgit v0.9.1