Another approach to setup completion window height (#86).
authorDaniel Carl <danielcarl@gmx.de>
Sun, 8 Jun 2014 22:43:06 +0000 (00:43 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sun, 8 Jun 2014 22:46:58 +0000 (00:46 +0200)
src/completion.c

index 562fb8c..0876d74 100644 (file)
@@ -126,11 +126,10 @@ gboolean completion_create(GtkTreeModel *model, CompletionSelectFunc selfunc,
 #endif
 
     /* to set the height for the treeview the tree must be realized first */
-    gtk_widget_show_all(comp.tree);
+    gtk_widget_show(comp.tree);
 
     /* this prevents the first item to be placed out of view if the completion
      * is shown */
-    gtk_widget_show_all(comp.win);
     while (gtk_events_pending()) {
         gtk_main_iteration();
     }
@@ -157,6 +156,8 @@ gboolean completion_create(GtkTreeModel *model, CompletionSelectFunc selfunc,
     comp.active = -1;
     completion_next(back);
 
+    gtk_widget_show(comp.win);
+
     return true;
 }