diff --git a/usr/lib/linuxmint/mintMenu/mintMenu.py b/usr/lib/linuxmint/mintMenu/mintMenu.py index 0d5a4a5..302c372 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenu.py +++ b/usr/lib/linuxmint/mintMenu/mintMenu.py @@ -42,6 +42,7 @@ gettext.install("mintmenu", "/usr/share/linuxmint/locale") NAME = _("Menu") PATH = os.path.abspath( os.path.dirname( sys.argv[0] ) ) + ICON = "/usr/lib/linuxmint/mintMenu/mintMenu.png" sys.path.append( os.path.join( PATH , "plugins") ) @@ -60,7 +61,7 @@ class MainWindow( object ): def __init__( self, toggleButton ): - self.path = os.path.abspath( os.path.dirname( sys.argv[0] ) ) + self.path = PATH sys.path.append( os.path.join( self.path, "plugins") ) self.icon = ICON @@ -113,6 +114,7 @@ class MainWindow( object ): self.gconftheme.notifyAdd( "gtk_theme", self.RegenPlugins ) self.gconf.notifyAdd( "show_side_pane", self.toggleShowSidepane ) + self.gconf.notifyAdd( "start_with_favorites", self.toggleStartWithFavorites ) self.gconf.notifyAdd( "/apps/panel/global/tooltips_enabled", self.toggleTooltipsEnabled ) self.gconf.notifyAdd( "tooltips_enabled", self.toggleTooltipsEnabled ) @@ -143,6 +145,9 @@ class MainWindow( object ): else: self.tooltips.disable() + def toggleStartWithFavorites( self, client, connection_id, entry, args ): + self.startWithFavorites = entry.get_value().get_bool() + def toggleShowSidepane( self, client, connection_id, entry, args ): self.sidepanevisible = entry.get_value().get_bool() if self.sidepanevisible == False and self.pinmenu == False: @@ -189,6 +194,7 @@ class MainWindow( object ): self.enableTooltips = self.gconf.get( "bool", "tooltips_enabled", True ) self.globalEnableTooltips = self.gconf.get( "bool", "/apps/panel/global/tooltips_enabled", True ) self.sidepanevisible = self.gconf.get( "bool", "show_side_pane", False ) + self.startWithFavorites = self.gconf.get( "bool", "start_with_favorites", False ) def PinMenu(self, *args, **kargs): @@ -478,8 +484,10 @@ class MainWindow( object ): def show( self ): self.window.present() - + if ( "applications" in self.plugins ) and ( hasattr( self.plugins["applications"], "focusSearchEntry" ) ): + if (self.startWithFavorites): + self.plugins["applications"].changeTab(0) self.plugins["applications"].focusSearchEntry() def grab( self ): diff --git a/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade b/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade index 88c39ba..a272eb0 100644 --- a/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade +++ b/usr/lib/linuxmint/mintMenu/mintMenuConfig.glade @@ -217,117 +217,105 @@ True 5 - + True + 10 - + True - 0 - none + vertical + 5 - + + Always start with favorites pane True + True + False + True + + + False + False + 0 + + + + + Show sidepane + True + True + False + True + True + + + False + False + 1 + + + + + Show recent documents + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + + + False + False + 2 + + + + + True + 5 - + True - 3 - 3 - 3 - 5 - - - Show sidepane - True - True - False - True - True - - - 3 - GTK_FILL - GTK_FILL - 5 - - - - - True - 0 - Border width: - - - 2 - 3 - GTK_FILL - - 5 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 0 10 1 0 0 - 1 - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - - True - px - - - 2 - 3 - 2 - 3 - GTK_FILL - GTK_FILL - 5 - - - - - Show recent documents - True - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - 3 - 1 - 2 - GTK_FILL - GTK_FILL - 5 - - + 0 + Border width: + + 0 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + 0 0 10 1 0 0 + 1 + + + 1 + + + + + True + px + + + 2 + + + False + False + 3 + - - False - 5 - 0 - - False 0 @@ -402,7 +390,7 @@ 2 4 5 - + GTK_FILL 5 @@ -485,7 +473,7 @@ 2 3 4 - + GTK_FILL 5 @@ -575,6 +563,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical Use custom colors @@ -1686,4 +1675,4 @@ - \ No newline at end of file + diff --git a/usr/lib/linuxmint/mintMenu/mintMenuConfig.py b/usr/lib/linuxmint/mintMenu/mintMenuConfig.py index 75c67f6..49ac168 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenuConfig.py +++ b/usr/lib/linuxmint/mintMenu/mintMenuConfig.py @@ -42,6 +42,7 @@ class mintMenuConfig( object ): self.mainWindow.set_title(_("Menu preferences")) self.mainWindow.set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg") + wTree.get_widget("startWithFavorites").set_label(_("Always start with favorites pane")) wTree.get_widget("showSidepane").set_label(_("Show sidepane")) wTree.get_widget("showButtonIcon").set_label(_("Show button icon")) wTree.get_widget("useCustomColors").set_label(_("Use custom colors")) @@ -105,6 +106,7 @@ class mintMenuConfig( object ): wTree.get_widget("hotkey_label").set_text(_("Keyboard shortcut:")) + self.startWithFavorites = wTree.get_widget( "startWithFavorites" ) self.showSidepane = wTree.get_widget( "showSidepane" ) self.showAppComments = wTree.get_widget( "showAppComments" ) self.showCategoryIcons = wTree.get_widget( "showCategoryIcons" ) @@ -168,6 +170,7 @@ class mintMenuConfig( object ): self.useCustomColors.connect( "toggled", self.toggleUseCustomColors ) + self.bindGconfValueToWidget( self.gconf, "bool", "start_with_favorites", self.startWithFavorites, "toggled", self.startWithFavorites.set_active, self.startWithFavorites.get_active ) self.bindGconfValueToWidget( self.gconf, "bool", "show_side_pane", self.showSidepane, "toggled", self.showSidepane.set_active, self.showSidepane.get_active ) self.bindGconfValueToWidget( self.gconfApplications, "bool", "show_application_comments", self.showAppComments, "toggled", self.showAppComments.set_active, self.showAppComments.get_active ) self.bindGconfValueToWidget( self.gconfApplications, "bool", "show_category_icons", self.showCategoryIcons, "toggled", self.showCategoryIcons.set_active, self.showCategoryIcons.get_active )