r16979 - gnucash/branches/2.2/src/gnome-search - [r16914] #513088: Do not show search dialog and hide it immediately afterwards.

Andreas Köhler andi5 at cvs.gnucash.org
Fri Feb 29 16:00:29 EST 2008


Author: andi5
Date: 2008-02-29 16:00:28 -0500 (Fri, 29 Feb 2008)
New Revision: 16979
Trac: http://svn.gnucash.org/trac/changeset/16979

Modified:
   gnucash/branches/2.2/src/gnome-search/dialog-search.c
Log:
[r16914] #513088: Do not show search dialog and hide it immediately afterwards.

Previously, gtk_widget_show_all() and gtk_widget_hide() were called on
the dialog, so that everything except the dialog widget itself were set
visible.  That way the user did not see the dialog filling up and
resizing on initialization.  Buggy window managers do not like
subsequent map&unmaps though and do not make the search dialog pop up
correctly.

This change removes both calls and depends on the interesting subwidgets
being visible.  For search.glade and the widgets inside dialog-search.c
this is guaranteed now.

Approved by andrewsw.


Modified: gnucash/branches/2.2/src/gnome-search/dialog-search.c
===================================================================
--- gnucash/branches/2.2/src/gnome-search/dialog-search.c	2008-02-29 21:00:18 UTC (rev 16978)
+++ gnucash/branches/2.2/src/gnome-search/dialog-search.c	2008-02-29 21:00:28 UTC (rev 16979)
@@ -293,7 +293,7 @@
 
     /* But maybe hide the select button */
     if (!sw->selected_cb)
-      gtk_widget_hide_all (sw->select_button);
+      gtk_widget_hide (sw->select_button);
   }
 
   /* Update the query in the list */
@@ -416,11 +416,11 @@
 gnc_search_dialog_show_close_cancel (GNCSearchWindow *sw)
 {
   if (sw->selected_cb) {
-    gtk_widget_show_all (sw->cancel_button);
-    gtk_widget_hide_all (sw->close_button);
+    gtk_widget_show (sw->cancel_button);
+    gtk_widget_hide (sw->close_button);
   } else {
-    gtk_widget_hide_all (sw->cancel_button);
-    gtk_widget_show_all (sw->close_button);
+    gtk_widget_hide (sw->cancel_button);
+    gtk_widget_show (sw->close_button);
   }
 }
 
@@ -800,6 +800,7 @@
   g_signal_connect (G_OBJECT (add), "clicked", G_CALLBACK (add_criterion), sw);
   box = glade_xml_get_widget (xml, "add_button_box");
   gtk_box_pack_start (GTK_BOX (box), add, FALSE, FALSE, 3);
+  gtk_widget_show (add);
   
   /* Set the match-type menu */
   combo_box = GTK_COMBO_BOX(gtk_combo_box_new_text());
@@ -810,6 +811,7 @@
 
   box = glade_xml_get_widget (xml, "type_menu_box");
   gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET(combo_box), FALSE, FALSE, 3);
+  gtk_widget_show(GTK_WIDGET(combo_box));
 
   /* if there's no original query, make the narrow, add, delete 
    * buttons inaccessible */
@@ -846,15 +848,9 @@
   /* add the first criterion */
   gnc_search_dialog_add_criterion (sw);
 
-  /* show it all */
-  gtk_widget_show_all (sw->dialog);
-
-  /* hide the dialog */
-  gtk_widget_hide (sw->dialog);
-
   /* Hide the 'new' button if there is no new_item_cb */
   if (!sw->new_item_cb)
-    gtk_widget_hide_all (new_item_button);
+    gtk_widget_hide (new_item_button);
 
   /* Connect XML signals */
 
@@ -1003,9 +999,9 @@
   /* Show or hide the select button */
   if (sw->select_button) {
     if (selected_cb)
-      gtk_widget_show_all (sw->select_button);
+      gtk_widget_show (sw->select_button);
     else
-      gtk_widget_hide_all (sw->select_button);
+      gtk_widget_hide (sw->select_button);
   }
 
   /* Show the proper close/cancel button */



More information about the gnucash-changes mailing list