It figures that I find the answer right after I sent that email. menu.remove(MenuItem) is what I was looking for. I thought I had tried that and it didn't work. I guess the 2nd time is a charm.
On 6/2/06, Jay Graves <[EMAIL PROTECTED]> wrote:
Hello, I am writing an applet that displays a list of items and then refreshes them every so often. To do this I am using an EventBox that when clicked does a menu.popup(). This works fine until the refresh method is called. I try to destroy the menu and then build another one. After this happens when the EventBox is clicked on I get the following stacktrace. /usr/local/bin/applet.py:40: GtkWarning: gtk_window_set_accept_focus: assertion `GTK_IS_WINDOW (window)' failed theMenu.popup(None, None, None, ev.button, gtk.get_current_event_time()) /usr/local/bin/applet.py:40: GtkWarning: gtk_window_move: assertion `GTK_IS_WINDOW (window)' failed theMenu.popup(None, None, None, ev.button, gtk.get_current_event_time()) /usr/local/bin/applet.py:40: GtkWarning: gtk_widget_size_request: assertion `GTK_IS_WIDGET (widget)' failed theMenu.popup(None, None, None, ev.button, gtk.get_current_event_time()) /usr/local/bin/applet.py:40: GtkWarning: gtk_widget_size_allocate: assertion `GTK_IS_WIDGET (widget)' failed theMenu.popup(None, None, None, ev.button, gtk.get_current_event_time()) /usr/local/bin/applet.py:40: GtkWarning: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed theMenu.popup(None, None, None, ev.button, gtk.get_current_event_time()) I have attached an example script of that shows exactly how I am doing this. The script uses the GNOME_PythonAppletSample.server file that comes with the python gnome applet package. I was hoping someone could tell my what I am doing wrong, and what the proper way to achieve this is. Thanks -- Jay Graves [EMAIL PROTECTED] jay.skabber.com
-- Jay Graves [EMAIL PROTECTED] jay.skabber.com _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/