- store = GTK_TREE_STORE (gtk_tree_view_get_model (viewer->overview));
-
- ds_init_empty (&title);
- if (is_text_item (item)
- && text_item_get_type (to_text_item (item)) == TEXT_ITEM_COMMAND_OPEN)
- {
- gtk_tree_store_append (store, &iter, NULL);
- viewer->cur_command = iter; /* XXX shouldn't save a GtkTreeIter */
- viewer->in_command = true;
- }
- else
- {
- GtkTreeIter *p = viewer->in_command ? &viewer->cur_command : NULL;
- gtk_tree_store_append (store, &iter, p);
- }
-
- ds_clear (&title);
- if (is_text_item (item))
- ds_put_cstr (&title, text_item_get_text (to_text_item (item)));
- else if (is_table_item (item))
- {
- const char *caption = table_item_get_caption (to_table_item (item));
- if (caption != NULL)
- ds_put_format (&title, "Table: %s", caption);
- else
- ds_put_cstr (&title, "Table");
- }
- else if (is_chart_item (item))
- {
- const char *s = chart_item_get_title (to_chart_item (item));
- if (s != NULL)
- ds_put_format (&title, "Chart: %s", s);
- else
- ds_put_cstr (&title, "Chart");
- }
- gtk_tree_store_set (store, &iter,
- COL_TITLE, ds_cstr (&title),
- COL_Y, viewer->y,
- -1);
- ds_destroy (&title);
-
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
- gtk_tree_view_expand_row (viewer->overview, path, TRUE);
- gtk_tree_path_free (path);
+ /* We could have called this earlier in the previous "if (new)" block,
+ but doing it here finds, in a plain GTK+ environment, a bug that
+ otherwise only showed up on an Ubuntu Unity desktop. See bug
+ #43362. */
+ gtk_widget_show_all (GTK_WIDGET (pod->window));