Re: Problem swapping GtkScrolledWindow contents on the fly
- From: Andrew Wood <ajwood theiet org>
- To: gtk-app-devel-list gnome org
- Subject: Re: Problem swapping GtkScrolledWindow contents on the fly
- Date: Fri, 25 Dec 2009 23:25:05 +0000
I thought it was probably gtk_widget_ref but although that has cleared
the warnings the widgets dont display themselves the 2nd or 3rd time the
function is called, only the first time. The code is now:
void showGeneralPage()
{
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);
}
if (pagedisplayed!="INIT")
{
gtk_container_remove (GTK_CONTAINER
(rightpanescrollview),gtk_bin_get_child(GTK_BIN(rightpanescrollview)));
}
pagedisplayed = "General";
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(rightpanescrollview),GTK_WIDGET(generalpage));
gtk_widget_show_all(GTK_WIDGET(generalpage));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]