diff --git a/usr/bin/mintmenu b/usr/bin/mintmenu index cef8ad2..2f72a9c 100755 --- a/usr/bin/mintmenu +++ b/usr/bin/mintmenu @@ -10,4 +10,4 @@ if len(sys.argv) > 1: os.system("rm -rf ~/.linuxmint/mintMenu") print "All mintMenu settings are now restored to default" else: - os.system("/usr/lib/linuxmint/mintMenu/mintMenu.py run-in-window") + os.system("/usr/lib/linuxmint/mintMenu/mintMenu.py") diff --git a/usr/lib/linuxmint/mintMenu/mintMenu.py b/usr/lib/linuxmint/mintMenu/mintMenu.py index 930ceeb..3cb40de 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenu.py +++ b/usr/lib/linuxmint/mintMenu/mintMenu.py @@ -1,32 +1,33 @@ #!/usr/bin/env python +import gi +gi.require_version("Gtk", "2.0") + +from gi.repository import Gtk, Gdk +from gi.repository import MatePanelApplet + try: import sys - import gtk - import gtk.glade import pango import os import commands - import mateapplet import gettext import traceback import time import gc import xdg.Config - import pygtk - pygtk.require( "2.0" ) except Exception, e: print e sys.exit( 1 ) -global mbindkey +#global mbindkey # Load the key binding lib (developped by deskbar-applet, copied into mintMenu so we don't end up with an unnecessary dependency) -try: - from deskbar.core.keybinder import tomboy_keybinder_bind as bind_key -except Exception, cause: - print "*********** Keybind Driver Load Failure **************" - print "Error Report : ", str(cause) - pass +#try: +# from deskbar.core.keybinder import tomboy_keybinder_bind as bind_key +#except Exception, cause: +# print "*********** Keybind Driver Load Failure **************" +# print "Error Report : ", str(cause) +# pass # Rename the process architecture = commands.getoutput("uname -a") @@ -841,7 +842,7 @@ class MenuWin( object ): def create_menu(self): self.applet.setup_menu(self.propxml, self.verbs, None) -def menu_factory( applet, iid ): +def applet_factory( applet, iid, data ): MenuWin( applet, iid ) applet.show() return True @@ -850,19 +851,7 @@ def quit_all(widget): gtk.main_quit() sys.exit(0) -if len(sys.argv) == 2 and sys.argv[1] == "run-in-window": - gtk.gdk.threads_init() - main_window = gtk.Window( gtk.WINDOW_TOPLEVEL ) - main_window.set_title( NAME ) - main_window.connect( "destroy", quit_all ) - app = mateapplet.Applet() - menu_factory( app, None ) - app.reparent( main_window ) - main_window.show() - gtk.gdk.threads_enter() - gtk.main() - gtk.gdk.threads_leave() -else: - mateapplet.matecomponent_factory("OAFIID:MATE_mintMenu_Factory", - mateapplet.Applet.__gtype__, - "mintMenu", "0", menu_factory) +MatePanelApplet.Applet.factory_main("MintMenuAppletFactory", True, + MatePanelApplet.Applet.__gtype__, + applet_factory, None) + diff --git a/usr/lib/matecomponent/servers/mintMenu.server b/usr/lib/matecomponent/servers/mintMenu.server deleted file mode 100755 index 7844536..0000000 --- a/usr/lib/matecomponent/servers/mintMenu.server +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/usr/share/dbus-1/services/org.mate.panel.applet.MintMenuAppletFactory.service b/usr/share/dbus-1/services/org.mate.panel.applet.MintMenuAppletFactory.service new file mode 100755 index 0000000..8e85c6b --- /dev/null +++ b/usr/share/dbus-1/services/org.mate.panel.applet.MintMenuAppletFactory.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.mate.panel.applet.MintMenuAppletFactory +Exec=/usr/lib/linuxmint/mintMenu/mintMenu.py diff --git a/usr/share/mate-panel/applets/org.mate.panel.MintMenuApplet.mate-panel-applet b/usr/share/mate-panel/applets/org.mate.panel.MintMenuApplet.mate-panel-applet new file mode 100644 index 0000000..98bf165 --- /dev/null +++ b/usr/share/mate-panel/applets/org.mate.panel.MintMenuApplet.mate-panel-applet @@ -0,0 +1,13 @@ +[Applet Factory] +Id=MintMenuAppletFactory +InProcess=false +Location=/usr/lib/linuxmint/mintMenu/mintMenu.py +Name=MintMenu Applet Factory +Description=Advanced Menu + +[MintMenuApplet] +Name=mintMenu +Description=Advanced Menu +Icon=/usr/lib/linuxmint/mintMenu/mint-logo.svg +MateComponentId=OAFIID:MATE_MintMenuApplet; +