GtkNotebook question

From: Date: Sun, 16 Jun 2002 21:43:41 +0000
Subject: GtkNotebook question
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2134@lists.php.net to get a copy of this message
I'm trying to write an irc client in php-gtk, with a GtkNotebook for the different windows (think something similar to xchat). append_page() doesn't seem to be completely working, though -- when I create the main window, I add an empty tab for a server. That works without a problem. However, if I try to add a tab for a channel after joining it, the new tab doesn't appear. Here are the two functions (actually methods of the main window class) that are supposed to add the tabs: function create_server_tab($sd) { global $g_main_notebook; if (($serverName = $sd->get_server()) != null) { $this->m_servs[strtolower($serverName)] = $sd; } else { $serverName = '(none)'; } $g_main_notebook->append_page($sd, new GtkLabel($serverName)); } function create_channel_tab($cd) { global $g_main_notebook; $channelName = $cd->get_channel(); $serverName = $cd->get_server(); echo "Making new tab for $channelName on $serverName\n"; if (($channelName != '') && ($serverName != '')) { $this->m_chans[strtolower($serverName)][strtolower($channelName)] = $cd; } else { $channelName = '(none)'; } $g_main_notebook->append_page($cd, new GtkLabel($channelName)); } The append_page() calls work happily when they come before the window is shown, but not after that. Is there anything special that needs to be done after append_page() that I'm missing? Thanks for looking. -- Bryan A. Clark http://furless.sytes.net

« previous php.gtk.general (#2134) next »