From 4f0861abc36e28de329c0fc9c9e29710a6deda20 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Thu, 8 Oct 2009 13:42:57 +0100 Subject: [PATCH 1/4] Karmic compatibility, mint-common dependency --- debian/changelog | 8 ++++++++ debian/control | 2 +- usr/lib/linuxmint/mintMenu/mintMenu.py | 4 ++-- usr/lib/linuxmint/mintMenu/mintMenuConfig.glade | 2 +- usr/lib/linuxmint/mintMenu/mintRemove.py | 2 +- usr/lib/linuxmint/mintMenu/plugins/filemonitor.py | 7 +++---- usr/lib/linuxmint/mintMenu/plugins/places.py | 2 +- usr/lib/linuxmint/mintMenu/version.py | 13 ------------- usr/lib/linuxmint/mintMenu/version.pyc | Bin 264 -> 0 bytes 9 files changed, 17 insertions(+), 23 deletions(-) delete mode 100755 usr/lib/linuxmint/mintMenu/version.py delete mode 100644 usr/lib/linuxmint/mintMenu/version.pyc diff --git a/debian/changelog b/debian/changelog index f8446e9..0826676 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +mintmenu (4.8.1) helena; urgency=low + + * Dependency on mint-common + * Updated calls to newer pyinotify API + * Updated path of keybinder API + + -- Clement Lefebvre Thu, 8 Oct 2009 10:26:00 +0000 + mintmenu (4.8.0) helena; urgency=low * Blueprint implemented: https://blueprints.launchpad.net/linuxmint/+spec/generic-branding diff --git a/debian/control b/debian/control index 966177a..8daa018 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,6 @@ Standards-Version: 3.7.2 Package: mintmenu Architecture: all -Depends: python (>= 2.4), python (<< 3), python-gtk2, python-glade2, mintinstall, deskbar-applet +Depends: python (>= 2.4), python (<< 3), python-gtk2, python-glade2, mintinstall, deskbar-applet, mint-common Description: Advanced Gnome menu One of the most advanced menus under Linux. MintMenu supports filtering, favorites, easy-uninstallation, autosession, and many other features. diff --git a/usr/lib/linuxmint/mintMenu/mintMenu.py b/usr/lib/linuxmint/mintMenu/mintMenu.py index 3b7791c..f451193 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenu.py +++ b/usr/lib/linuxmint/mintMenu/mintMenu.py @@ -22,7 +22,7 @@ except Exception, e: 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: - sys.path.append('/usr/lib/python2.5/site-packages/deskbar/core/keybinder') + sys.path.append('/usr/lib/pyshared/python2.6/deskbar/core/keybinder') from _keybinder import tomboy_keybinder_bind as bind_key except Exception, cause: print "*********** Keybind Driver Load Failure **************" @@ -747,7 +747,7 @@ class MenuWin( object ): about = gtk.AboutDialog() about.set_name("mintMenu") import commands - version = commands.getoutput("/usr/lib/linuxmint/mintMenu/version.py") + version = commands.getoutput("/usr/lib/linuxmint/common/version.py mintmenu") about.set_version(version) try: h = open('/usr/share/common-licenses/GPL','r') diff --git a/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade b/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade index d3e4e13..930a1e2 100644 --- a/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade +++ b/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade @@ -5,7 +5,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK center-always - /usr/lib/linuxmint/mintSystem/icon.png + /usr/share/linuxmint/logo.png True diff --git a/usr/lib/linuxmint/mintMenu/mintRemove.py b/usr/lib/linuxmint/mintMenu/mintRemove.py index 56407cd..830bee1 100755 --- a/usr/lib/linuxmint/mintMenu/mintRemove.py +++ b/usr/lib/linuxmint/mintMenu/mintRemove.py @@ -87,7 +87,7 @@ class mintRemoveWindow: warnDlg = gtk.Dialog(title="MintMenu", parent=None, flags=0, buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)) warnDlg.add_button(gtk.STOCK_REMOVE, gtk.RESPONSE_OK) warnDlg.vbox.set_spacing(10) - warnDlg.set_icon_from_file("/usr/lib/linuxmint/mintSystem/icon.png") + warnDlg.set_icon_from_file("/usr/share/linuxmint/logo.png") labelSpc = gtk.Label(" ") warnDlg.vbox.pack_start(labelSpc) labelSpc.show() diff --git a/usr/lib/linuxmint/mintMenu/plugins/filemonitor.py b/usr/lib/linuxmint/mintMenu/plugins/filemonitor.py index 9868c44..57bd228 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/filemonitor.py +++ b/usr/lib/linuxmint/mintMenu/plugins/filemonitor.py @@ -22,14 +22,13 @@ if hasInotify: self.notifier.start() - def addMonitor( self, filename, callback, args = None ): - - mask = pyinotify.EventsCodes.IN_DELETE | pyinotify.EventsCodes.IN_CREATE | pyinotify.EventsCodes.IN_MODIFY + def addMonitor( self, filename, callback, args = None ): + mask = pyinotify.IN_DELETE | pyinotify.IN_CREATE | pyinotify.IN_MODIFY mId = self.wm.add_watch( filename, mask, rec = True)[filename] if mId >= 0: self.callbacks[mId] = ( callback, args ) - return mId + return mId def removeMonitor( self, monitorId ): if monitorId in self.callbacks: diff --git a/usr/lib/linuxmint/mintMenu/plugins/places.py b/usr/lib/linuxmint/mintMenu/plugins/places.py index 7012de4..66845d1 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/places.py +++ b/usr/lib/linuxmint/mintMenu/plugins/places.py @@ -123,7 +123,7 @@ class pluginclass( object ): desktopDir = home + "/Desktop" try: import sys - sys.path.append('/usr/lib/linuxmint/mintSystem/python') + sys.path.append('/usr/lib/linuxmint/common') from configobj import ConfigObj config = ConfigObj(home + "/.config/user-dirs.dirs") tmpdesktopDir = config['XDG_DESKTOP_DIR'] diff --git a/usr/lib/linuxmint/mintMenu/version.py b/usr/lib/linuxmint/mintMenu/version.py deleted file mode 100755 index f5b01a9..0000000 --- a/usr/lib/linuxmint/mintMenu/version.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/python - -import apt -import sys - -try: - cache = apt.Cache() - pkg = cache["mintmenu"] - print pkg.installedVersion -except: - pass - - diff --git a/usr/lib/linuxmint/mintMenu/version.pyc b/usr/lib/linuxmint/mintMenu/version.pyc deleted file mode 100644 index 3334c74dd9e15fbf69ea5516e42143f6fc4e0389..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmYLCy9&ZE6g{``MXBQI>eQ+JfQaCrIJgKZ-AWrYw2j3?p|d~aZ#eoZ{(#61IEQ$}ZR&lMWH$}R)eP*SNjj~K8 r8+kJ7sC~Y}AB@K~7+pSLP?YtTOpn1M&k^L2%PZ&&n&LCE From 07432a39b2ac3bbadf7fb4c27c815ab7194fdda8 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Thu, 8 Oct 2009 13:46:39 +0100 Subject: [PATCH 2/4] Removed dependency on mintinstall --- debian/changelog | 1 + debian/control | 2 +- .../linuxmint/mintMenu/plugins/system_management.py | 11 ++++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0826676..5b0cec2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ mintmenu (4.8.1) helena; urgency=low * Dependency on mint-common * Updated calls to newer pyinotify API * Updated path of keybinder API + * Removed dependency on mintinstall -- Clement Lefebvre Thu, 8 Oct 2009 10:26:00 +0000 diff --git a/debian/control b/debian/control index 8daa018..e3f5274 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,6 @@ Standards-Version: 3.7.2 Package: mintmenu Architecture: all -Depends: python (>= 2.4), python (<< 3), python-gtk2, python-glade2, mintinstall, deskbar-applet, mint-common +Depends: python (>= 2.4), python (<< 3), python-gtk2, python-glade2, deskbar-applet, mint-common Description: Advanced Gnome menu One of the most advanced menus under Linux. MintMenu supports filtering, favorites, easy-uninstallation, autosession, and many other features. diff --git a/usr/lib/linuxmint/mintMenu/plugins/system_management.py b/usr/lib/linuxmint/mintMenu/plugins/system_management.py index f9de343..c3fec75 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/system_management.py +++ b/usr/lib/linuxmint/mintMenu/plugins/system_management.py @@ -97,11 +97,12 @@ class pluginclass( object ): #Add standard items def do_standard_items( self ): - Button1 = easyButton( "/usr/lib/linuxmint/mintInstall/icon.svg", self.iconsize, [_("Software manager")], -1, -1 ) - Button1.connect( "clicked", self.ButtonClicked, "mintinstall" ) - Button1.show() - self.systemBtnHolder.pack_start( Button1, False, False ) - self.mintMenuWin.setTooltip( Button1, _("Browse and install available software") ) + if os.path.exists("/usr/lib/linuxmint/mintInstall/icon.svg"): + Button1 = easyButton( "/usr/lib/linuxmint/mintInstall/icon.svg", self.iconsize, [_("Software manager")], -1, -1 ) + Button1.connect( "clicked", self.ButtonClicked, "mintinstall" ) + Button1.show() + self.systemBtnHolder.pack_start( Button1, False, False ) + self.mintMenuWin.setTooltip( Button1, _("Browse and install available software") ) Button2 = easyButton( "synaptic", self.iconsize, [_("Package manager")], -1, -1 ) Button2.connect( "clicked", self.ButtonClicked, "gksu /usr/sbin/synaptic" ) From 35fc24fdaceeee32590ae304bd65263dc39ae682 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Thu, 8 Oct 2009 14:05:28 +0100 Subject: [PATCH 3/4] Removed suggestions.glade (gone to mintinstall) --- usr/lib/linuxmint/mintMenu/suggestions.glade | 74 -------------------- 1 file changed, 74 deletions(-) delete mode 100644 usr/lib/linuxmint/mintMenu/suggestions.glade diff --git a/usr/lib/linuxmint/mintMenu/suggestions.glade b/usr/lib/linuxmint/mintMenu/suggestions.glade deleted file mode 100644 index bc34350..0000000 --- a/usr/lib/linuxmint/mintMenu/suggestions.glade +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - 640 - 480 - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - center-always - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - automatic - automatic - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - - - 640 - 480 - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - center - - - True - False - False - - - True - True - 6 - automatic - automatic - in - - - True - True - True - - - - - - - - - - True - No results - - - 2 - - - - - - - - - From 91bedba29d302f902484793825c093a7c9bef068 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Thu, 8 Oct 2009 14:16:43 +0100 Subject: [PATCH 4/4] No suggestions if mintInstall isn't installed --- usr/lib/linuxmint/mintMenu/plugins/applications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/plugins/applications.py b/usr/lib/linuxmint/mintMenu/plugins/applications.py index d5e8642..1295ac2 100755 --- a/usr/lib/linuxmint/mintMenu/plugins/applications.py +++ b/usr/lib/linuxmint/mintMenu/plugins/applications.py @@ -270,7 +270,7 @@ class pluginclass( object ): return ( 0, 0 ) #sizeIcon = gtk.icon_size_lookup( sizeIcon ) - + self.suggestSearchAppButton = SuggestionButton(gtk.STOCK_FIND, self.iconSize, "") self.suggestSearchButton = SuggestionButton(gtk.STOCK_FIND, self.iconSize, "") self.suggestShowButton = SuggestionButton(gtk.STOCK_INFO, self.iconSize, "") @@ -561,7 +561,7 @@ class pluginclass( object ): if (shown): showns = True - if (not showns): + if (not showns and os.path.exists("/usr/lib/linuxmint/mintInstall/icon.svg")): self.suggestion = text self.applicationsBox.add(self.suggestSearchAppButton)