DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Python (http://www.daniweb.com/forums/forum114.html)
-   -   PyGTK tray menu has annoying scroll arrows (http://www.daniweb.com/forums/thread160906.html)

ewall Dec 5th, 2008 1:30 pm
PyGTK tray menu has annoying scroll arrows
 
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


All times are GMT -4. The time now is 8:17 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC