Re: Problem swapping GtkScrolledWindow contents on the fly



Ive just copied and pasted that code in and am getting exactly the same symptoms, so I dont know why what you're seeing is different. It shows the FIRST time showGeneralPage() is called but not the second or third. The second time its called the label is invisible

David NeÄas wrote:
On Wed, Jan 13, 2010 at 08:26:57PM +0000, Andrew Wood wrote:
Just tried it with a simple vbox and label created manually and am getting exactly the same problem so its not specific to libglade

If I do this:

--- main.cpp.orig       2010-01-13 22:36:25.000000000 +0100
+++ main.cpp    2010-01-13 22:36:38.000000000 +0100
@@ -116,10 +116,10 @@
        g_print("Showing General Page\n");
        if (generalpageinitialised==false)
        {
-               generalpage= glade_xml_get_widget(generalpagexml,"mainvbox");
-               glade_xml_signal_autoconnect(generalpagexml);
-               generalpageinitialised=true;
-               gtk_widget_ref(generalpage);
+        generalpage = gtk_vbox_new(FALSE, 0);
+        gtk_container_add(GTK_CONTAINER(generalpage),
+                          gtk_label_new("Just testing..."));
+        g_object_ref(generalpage);
                
        }
the General page content (i.e. the label) no longer disappears and stays
there -- and this is the behaviour I'd expect.

Yeti


P.S.: If you post a tarball it is more helpful to include a two-line
Makefile than Glade backup files and a.out that no one sane will run...

P.P.S: The code looks like a parade of obsolete and deprecated libraries
and functions (see http://live.gnome.org/LibgnomeMustDie).  I hope it is
not a new project...

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]