Comment 2 for bug 1575058

Revision history for this message
Attila Hammer (hammera) wrote : Re: [Bug 1575058] [NEW] If I using Mate Menu applet my panel, always me presents an Unbound Local Error exception

I think I founded why happening this exception.
After installation, I removed the mate-welcome package. Because my
system not present following files, happened the reported exception:
/usr/bin/synaptic-pkexec, /usr/bin/software-center,
/usr/share/applications/ubuntu-mate-software.desktop
Real my machine not installed Synaptic, software-center or the
mate-welcome package, with ships the ubuntu-mate-software utility.
If I installing for example the synaptic package, the exception is not
happening.
Same result if I turning off the Show package manager related GSettings
preference the mate-plugin related, following the GSettings schema and name:
Schema name: org.mate.mate-menu.plugins.system_management
Setting name: show-package-manager
Default value: true

Following code part affected the exception related if one of the
examined packages not installed:
     def do_standard_items( self ):

         if ( self.showPackageManager == True ):
             if os.path.exists("/usr/bin/synaptic-pkexec"):
                 Button2 = easyButton("synaptic", self.iconsize,
[_("Package Manager")], -1, -1 )
                 Button2.connect( "clicked", self.ButtonClicked,
"/usr/bin/synaptic-pkexec" )
             elif os.path.exists("/usr/bin/software-center"):
                 Button2 = easyButton("softwarecenter", self.iconsize,
[_("Package Manager")], -1, -1 )
                 Button2.connect( "clicked", self.ButtonClicked,
"/usr/bin/software-center" )
             elif
os.path.exists("/usr/share/applications/ubuntu-mate-software.desktop"):
                 Button2 = easyButton("system-software-install",
self.iconsize, [_("Package Manager")], -1, -1 )
                 Button2.connect("clicked", self.ButtonClicked,
"/usr/bin/ubuntu-mate-welcome --software-only")
             Button2.show()
             self.systemBtnHolder.pack_start( Button2, False, False, 0 )
             self.mateMenuWin.setTooltip( Button2, _("Install, remove
and upgrade software packages") )

Attila