I've been working on a simple little PyGTK app that shows an icon in the system tray. When you right-click, the pop-up menu appears as expected. However, first the menu appears with just some up and down scroll arrows, and I have to scroll down before it fills in and shows the 3 items, and then the scroll arrows disappear.
I've searched everywhere (GTK+ API, etc.) and can't seem to find a way to disable those scroll arrows, which are clearly not needed. The relevant code snippet is below...
def _createMenu(self):
"""
Creates the pop-up menu for the icon.
"""
self.menu = gtk.Menu()
quit = gtk.ImageMenuItem(gtk.STOCK_QUIT)
quit.connect("activate", self.destroy)
about = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
about.connect("activate", self.ShowAbout)
configure = gtk.ImageMenuItem(gtk.STOCK_PROPERTIES)
configure.connect("activate", self._edit_config)
self.menu.add(about)
self.menu.add(configure)
self.menu.add(quit)
self.menu.show_all()
def _showMenu(self, status_icon, button, activate_time):
self.menu.popup(None, None, gtk.status_icon_position_menu, button, activate_time, status_icon)
Further info: I'm using Python 2.52 with GTK+ 2.12.9r2 on Windoze, if that makes any difference.
TIA-- ~ewall