No more sidepane ;)

This commit is contained in:
Clement Lefebvre 2010-09-13 12:10:43 +01:00
parent ec4866b1ab
commit 7539249468
7 changed files with 1256 additions and 1298 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
mintmenu (5.0.6) julia; urgency=low
* Removed sidepane (confusing), plugins are now enabled/disabled in preferences
* UI improvements (dotted separators, layout)
-- Clement Lefebvre <root@linuxmint.com> Mon, 13 Sep 2010 12:09:00 +0000
mintmenu (5.0.5) julia; urgency=low
* Multi-threaded search

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--*- mode: xml -*-->
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.10 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="mainWindow">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK</property>
<property name="type">GTK_WINDOW_POPUP</property>
<property name="type">popup</property>
<property name="resizable">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_MENU</property>
<property name="type_hint">menu</property>
<property name="skip_taskbar_hint">True</property>
<property name="skip_pager_hint">True</property>
<property name="decorated">False</property>
@ -18,40 +18,6 @@
<child>
<widget class="GtkHBox" id="paneholder">
<property name="visible">True</property>
<child>
<widget class="GtkEventBox" id="sidepane">
<property name="width_request">35</property>
<property name="visible">True</property>
<child>
<widget class="GtkVBox" id="pinholder">
<property name="visible">True</property>
<property name="border_width">3</property>
<property name="spacing">5</property>
<child>
<widget class="GtkToggleButton" id="pin_button">
<property name="width_request">32</property>
<property name="height_request">20</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
<signal name="toggled" handler="on_pin_button_toggled"/>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>

View File

@ -72,9 +72,6 @@ class MainWindow( object ):
wTree = gtk.glade.XML( gladefile, "mainWindow" )
self.window = wTree.get_widget( "mainWindow" )
self.paneholder = wTree.get_widget( "paneholder" )
self.sidepane = wTree.get_widget( "sidepane" )
self.pinbutton = wTree.get_widget( "pin_button" )
self.pinholder = wTree.get_widget( "pinholder" )
self.border = wTree.get_widget( "border" )
self.panesToColor = [ ]
@ -92,8 +89,7 @@ class MainWindow( object ):
plugindir = os.path.join( os.path.expanduser( "~" ), ".linuxmint/mintMenu/plugins" )
sys.path.append( plugindir )
dic = {"on_window1_destroy" : self.quit_cb,
"on_pin_button_toggled" : self.PinMenu}
dic = {"on_window1_destroy" : self.quit_cb}
wTree.signal_autoconnect( dic )
self.gconf = EasyGConf( "/apps/mintMenu/" )
@ -114,7 +110,6 @@ class MainWindow( object ):
self.gconf.notifyAdd( "plugins_list", self.RegenPlugins )
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 )
@ -150,13 +145,6 @@ class MainWindow( object ):
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:
self.sidepane.hide()
else:
self.sidepane.show()
def toggleBorderWidth( self, client, connection_id, entry, args ):
self.borderwidth = entry.get_value().get_int()
self.SetupMintMenuBorder()
@ -186,7 +174,7 @@ class MainWindow( object ):
def getSetGconfEntries( self ):
self.pluginlist = self.gconf.get( "list-string", "plugins_list",['newpane','places', 'system_management', 'newpane', 'applications'] )
self.pluginlist = self.gconf.get( "list-string", "plugins_list",['places', 'system_management', 'newpane', 'applications'] )
self.dottedfile = os.path.join( self.path, "dotted.png")
self.usecustomcolor = self.gconf.get( "bool", "use_custom_color", False )
@ -197,37 +185,16 @@ class MainWindow( object ):
self.borderwidth = self.gconf.get( "int", "border_width", 1 )
self.opacity = self.gconf.get( "int", "opacity", 100 )
self.offset = self.gconf.get( "int", "mintMenu_offset", 0 )
self.pinmenu = self.gconf.get( "bool", "pin_menu", False )
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):
self.pinmenu = self.pinbutton.get_active()
self.gconf.set("bool", "pin_menu", self.pinmenu)
if self.pinmenu == True:
self.sidepane.show()
elif not self.sidepanevisible:
self.sidepane.hide()
def SetupMintMenuBorder( self ):
if self.usecustomcolor:
self.window.modify_bg( gtk.STATE_NORMAL, gtk.gdk.color_parse( self.custombordercolor ) )
else:
self.window.modify_bg( gtk.STATE_NORMAL, self.window.rc_get_style().bg[ gtk.STATE_SELECTED ] )
self.border.set_padding( self.borderwidth, self.borderwidth, self.borderwidth, self.borderwidth )
self.SetPaneColors( [ self.sidepane ] )
self.pinbutton.set_active( self.pinmenu )
if self.sidepanevisible == False and self.pinmenu == False:
self.sidepane.hide()
else:
self.sidepane.show()
def SetupMintMenuOpacity( self ):
print "Opacity is: " + str(self.opacity)
@ -270,12 +237,12 @@ class MainWindow( object ):
if not MyPlugin.icon:
MyPlugin.icon = "gnome-logo-icon.png"
if hasattr( MyPlugin, "hideseparator" ) and not MyPlugin.hideseparator:
Image1 = gtk.Image()
Image1.set_from_pixbuf( seperatorImage )
if not ImageBox.get_child():
ImageBox.add( Image1 )
Image1.show()
#if hasattr( MyPlugin, "hideseparator" ) and not MyPlugin.hideseparator:
# Image1 = gtk.Image()
# Image1.set_from_pixbuf( seperatorImage )
# if not ImageBox.get_child():
# ImageBox.add( Image1 )
# Image1.show()
#print u"Loading plugin '" + plugin + "' : sucessful"
except Exception, e:
@ -305,11 +272,11 @@ class MainWindow( object ):
MyPlugin.content_holder.show()
if MyPlugin.heading != "":
VBox1 = gtk.VBox( False, 0 )
if MyPlugin.heading != "":
Label1 = gtk.Label( MyPlugin.heading )
Align1 = gtk.Alignment( 0, 0.5, 0, 0 )
Align1.set_padding( 0, 0, 0, 0 )
Align1 = gtk.Alignment( 0, 0, 0, 0 )
Align1.set_padding( 10, 5, 10, 0 )
Align1.add( Label1 )
self.SetHeadingStyle( [Label1] )
Align1.show()
@ -321,10 +288,11 @@ class MainWindow( object ):
self.SetPaneColors( [heading] )
heading.set_size_request( MyPlugin.width, 30 )
else:
heading = gtk.Button()
heading.set_relief( gtk.RELIEF_NONE )
heading = gtk.HBox()
#heading.set_relief( gtk.RELIEF_NONE )
heading.set_size_request( MyPlugin.width, -1 )
heading.connect( "button_press_event", self.TogglePluginView, VBox1, MyPlugin.icon, MyPlugin.heading, MyPlugin )
#heading.set_sensitive(False)
#heading.connect( "button_press_event", self.TogglePluginView, VBox1, MyPlugin.icon, MyPlugin.heading, MyPlugin )
heading.add( Align1 )
heading.show()
@ -377,7 +345,13 @@ class MainWindow( object ):
Image1 = gtk.Image()
Image1.set_from_pixbuf( seperatorImage )
Image1.show()
ImageBox.add( Image1 )
#ImageBox.add( Image1 )
Align1 = gtk.Alignment()
Align1.set_padding( 0, 0, 6, 6 )
Align1.add(Image1)
ImageBox.add(Align1)
ImageBox.show_all()
self.paneholder.pack_start( ImageBox, False, False, 0 )
@ -386,54 +360,6 @@ class MainWindow( object ):
#print u"Loading", (time.time() - start), "s"
def HidePlugin( self , PluginData, icon, tooltip, plugin ):
if PluginData.flags() & gtk.VISIBLE:
PluginData.hide()
Button1 = gtk.Button()
Image1 = gtk.Image()
Image1.set_from_pixbuf( iconManager.getIcon( icon, gtk.ICON_SIZE_MENU ) )
Button1.add( Image1 )
Button1.show()
self.setTooltip( Button1, tooltip )
Image1.show()
#Show side pane if it is hidden
self.sidepane.show()
Button1.connect( "button_press_event", self.TogglePluginView, PluginData, icon, tooltip, plugin )
self.pinholder.pack_start( Button1, False, False, 0 )
def TogglePluginView( self, widget, event, PluginData, icon, tooltip, plugin ):
if event.button == 1:
if PluginData.flags() & gtk.VISIBLE:
PluginData.hide()
if hasattr( plugin, 'SetHidden' ):
plugin.SetHidden(True)
Button1 = gtk.Button()
Image1 = gtk.Image()
Image1.set_from_pixbuf( iconManager.getIcon( icon, gtk.ICON_SIZE_MENU ) )
Button1.add( Image1 )
Button1.show()
self.setTooltip( Button1, tooltip )
Image1.show()
#Show side pane if it is hidden
self.sidepane.show()
Button1.connect( "button_press_event", self.TogglePluginView, PluginData, icon, tooltip, plugin )
self.pinholder.pack_start( Button1, False, False, 0 )
else:
PluginData.show()
if hasattr( plugin, 'SetHidden' ):
plugin.SetHidden(False)
widget.destroy()
if len( self.pinholder.get_children() ) == 1:
if self.sidepanevisible == False and self.pinmenu == False:
self.sidepane.hide()
else:
self.sidepane.show()
def SetPaneColors( self, items ):
for item in items:
if item not in self.panesToColor:
@ -476,15 +402,21 @@ class MainWindow( object ):
#print
#print u"Reloading Plugins..."
for item in self.paneholder:
if item.name != "sidepane":
item.destroy()
for plugin in self.plugins.values():
if hasattr( plugin, "destroy" ):
plugin.destroy()
try:
del plugin
except:
pass
try:
del self.plugins
except:
pass
gc.collect()
@ -563,7 +495,7 @@ class MainWindow( object ):
self.grab()
def hide( self, forceHide = False ):
if not self.pinmenu or forceHide:
if forceHide:
self.window.hide()
class MenuWin( object ):
@ -903,5 +835,3 @@ else:
gnomeapplet.bonobo_factory("OAFIID:GNOME_mintMenu_Factory",
gnomeapplet.Applet.__gtype__,
"mintMenu", "0", menu_factory)

View File

@ -11,7 +11,6 @@
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
@ -221,7 +220,6 @@
<child>
<widget class="GtkVBox" id="vbox7">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<widget class="GtkCheckButton" id="startWithFavorites">
@ -238,8 +236,8 @@
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="showSidepane">
<property name="label" translatable="yes">Show sidepane</property>
<widget class="GtkCheckButton" id="showApplicationsPlugin">
<property name="label" translatable="yes">Show applications plugin</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@ -253,8 +251,8 @@
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="showRecentPlugin">
<property name="label" translatable="yes">Show recent documents</property>
<widget class="GtkCheckButton" id="showSystemPlugin">
<property name="label" translatable="yes">Show system plugin</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@ -267,6 +265,36 @@
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="showPlacesPlugin">
<property name="label" translatable="yes">Show places plugin</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="showRecentPlugin">
<property name="label" translatable="yes">Show recent documents plugin</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
@ -346,7 +374,7 @@
</widget>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
<property name="position">5</property>
</packing>
</child>
</widget>
@ -372,7 +400,7 @@
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">Options</property>
<property name="label" translatable="yes">Plugins</property>
</widget>
<packing>
<property name="position">1</property>
@ -600,7 +628,6 @@
<widget class="GtkVBox" id="vbox13">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkCheckButton" id="useCustomColors">
<property name="label" translatable="yes">Use custom colors</property>
@ -887,7 +914,6 @@
<child>
<widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkCheckButton" id="allowscrollbarcheckbutton">
<property name="label" translatable="yes">Allow Scrollbar</property>
@ -963,7 +989,6 @@
<child>
<widget class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkCheckButton" id="computercheckbutton">
<property name="label" translatable="yes">Computer</property>
@ -1081,11 +1106,9 @@
<child>
<widget class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkVButtonBox" id="vbuttonbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<widget class="GtkButton" id="newButton">
@ -1126,7 +1149,6 @@
<child>
<widget class="GtkVButtonBox" id="vbuttonbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkButton" id="upButton">
<property name="label">gtk-go-up</property>
@ -1257,7 +1279,6 @@
<child>
<widget class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkCheckButton" id="allowscrollbarcheckbutton1">
<property name="label" translatable="yes">Allow Scrollbar</property>
@ -1331,7 +1352,6 @@
<child>
<widget class="GtkVBox" id="vbox6">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkCheckButton" id="softwaremanagercheckbutton">
<property name="label" translatable="yes">Software Manager</property>
@ -1518,7 +1538,6 @@
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<widget class="GtkTable" id="table1">
@ -1663,7 +1682,6 @@
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<placeholder/>

View File

@ -43,10 +43,12 @@ class mintMenuConfig( object ):
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"))
wTree.get_widget("showRecentPlugin").set_label(_("Show recent documents"))
wTree.get_widget("showRecentPlugin").set_label(_("Show recent documents plugin"))
wTree.get_widget("showApplicationsPlugin").set_label(_("Show applications plugin"))
wTree.get_widget("showSystemPlugin").set_label(_("Show system plugin"))
wTree.get_widget("showPlacesPlugin").set_label(_("Show places plugin"))
wTree.get_widget("showAppComments").set_label(_("Show application comments"))
wTree.get_widget("showCategoryIcons").set_label(_("Show category icons"))
@ -111,10 +113,12 @@ 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" )
self.showRecentPlugin = wTree.get_widget( "showRecentPlugin" )
self.showApplicationsPlugin = wTree.get_widget( "showApplicationsPlugin" )
self.showSystemPlugin = wTree.get_widget( "showSystemPlugin" )
self.showPlacesPlugin = wTree.get_widget( "showPlacesPlugin" )
self.swapGeneric = wTree.get_widget("swapGeneric")
self.hover = wTree.get_widget( "hover" )
self.hoverDelay = wTree.get_widget( "hoverDelay" )
@ -176,7 +180,6 @@ 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 )
self.bindGconfValueToWidget( self.gconfApplications, "bool", "categories_mouse_over", self.hover, "toggled", self.hover.set_active, self.hover.get_active )
@ -200,8 +203,12 @@ class mintMenuConfig( object ):
self.bindGconfValueToWidget( self.gconf, "string", "applet_icon", self.buttonIcon, "changed", self.setButtonIcon, self.buttonIcon.get_text )
self.bindGconfValueToWidget( self.gconfApplications, "string", "search_command", self.searchCommand, "changed", self.searchCommand.set_text, self.searchCommand.get_text )
self.showRecentPlugin.connect("toggled", self.toggleRecent )
self.showRecentPlugin.set_active( self.getRecentToggle() )
self.getPluginsToggle()
self.showRecentPlugin.connect("toggled", self.setPluginsLayout )
self.showApplicationsPlugin.connect("toggled", self.setPluginsLayout )
self.showSystemPlugin.connect("toggled", self.setPluginsLayout )
self.showPlacesPlugin.connect("toggled", self.setPluginsLayout )
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_computer", self.computertoggle, "toggled", self.computertoggle.set_active, self.computertoggle.get_active )
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_home_folder", self.homefoldertoggle, "toggled", self.homefoldertoggle.set_active, self.homefoldertoggle.get_active )
@ -248,17 +255,44 @@ class mintMenuConfig( object ):
self.getBackgroundColor()
def toggleRecent(self, widget):
if self.showRecentPlugin.get_active():
os.system("gconftool-2 --type list --list-type string --set /apps/mintMenu/plugins_list [newpane,places,system_management,newpane,applications,newpane,recent]")
else:
os.system("gconftool-2 --type list --list-type string --set /apps/mintMenu/plugins_list [newpane,places,system_management,newpane,applications]")
def getRecentToggle(self):
def getPluginsToggle(self):
if (commands.getoutput("gconftool-2 --get /apps/mintMenu/plugins_list | grep recent | wc -l") == "0"):
return False
self.showRecentPlugin.set_active(False)
else:
return True
self.showRecentPlugin.set_active(True)
if (commands.getoutput("gconftool-2 --get /apps/mintMenu/plugins_list | grep applications | wc -l") == "0"):
self.showApplicationsPlugin.set_active(False)
else:
self.showApplicationsPlugin.set_active(True)
if (commands.getoutput("gconftool-2 --get /apps/mintMenu/plugins_list | grep system_management | wc -l") == "0"):
self.showSystemPlugin.set_active(False)
else:
self.showSystemPlugin.set_active(True)
if (commands.getoutput("gconftool-2 --get /apps/mintMenu/plugins_list | grep places | wc -l") == "0"):
self.showPlacesPlugin.set_active(False)
else:
self.showPlacesPlugin.set_active(True)
def setPluginsLayout (self, widget):
visiblePlugins = []
if self.showPlacesPlugin.get_active():
visiblePlugins.append("places")
if self.showSystemPlugin.get_active():
visiblePlugins.append("system_management")
if self.showApplicationsPlugin.get_active():
if self.showPlacesPlugin.get_active() or self.showSystemPlugin.get_active():
visiblePlugins.append("newpane")
visiblePlugins.append("applications")
if self.showRecentPlugin.get_active():
if self.showApplicationsPlugin.get_active() or self.showPlacesPlugin.get_active() or self.showSystemPlugin.get_active():
visiblePlugins.append("newpane")
visiblePlugins.append("recent")
layout = ""
for plugin in visiblePlugins:
layout = layout + plugin + ","
if len(layout) > 0 and layout[-1] == ",":
layout = layout[0:-1]
os.system("gconftool-2 --type list --list-type string --set /apps/mintMenu/plugins_list [%s]" % layout)
def setShowButtonIcon( self, value ):
self.showButtonIcon.set_active(not value )

View File

@ -252,12 +252,12 @@ class pluginclass( object ):
#i18n
self.wTree.get_widget("searchLabel").set_text("<span weight='bold'>" + _("Search:") + "</span>")
self.wTree.get_widget("searchLabel").set_use_markup(True)
self.wTree.get_widget("label6").set_text("<span weight='bold'>" + _("Favorites") + "</span>")
self.wTree.get_widget("label6").set_use_markup(True)
self.wTree.get_widget("label7").set_text(_("All applications"))
self.wTree.get_widget("label2").set_text("<span weight='bold'>" + _("All applications") + "</span>")
self.wTree.get_widget("label2").set_use_markup(True)
self.wTree.get_widget("label6").set_text(_("Favorites"))
self.wTree.get_widget("label3").set_text(_("Favorites"))
self.wTree.get_widget("label7").set_text(_("All applications"))
self.wTree.get_widget("label2").set_text(_("Applications"))
self.mintMenuWin.SetHeadingStyle( [self.wTree.get_widget("label6"), self.wTree.get_widget("label2")] )
self.numApps = 0
# These properties are NECESSARY to maintain consistency
@ -266,7 +266,7 @@ class pluginclass( object ):
self.window = self.wTree.get_widget( "mainWindow" )
# Set 'heading' property for plugin
self.heading = _("Applications")
self.heading = ""#_("Applications")
# This should be the first item added to the window in glade
self.content_holder = self.wTree.get_widget( "Applications" )

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--*- mode: xml -*-->
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="mainWindow">
<signal name="destroy" handler="on_window1_destroy"/>
<child>
@ -11,15 +11,15 @@
<widget class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<signal name="drag_motion" handler="on_scrolledwindow_drag_motion"/>
<signal name="drag_drop" handler="on_scrolledwindow_drag_drop"/>
<signal name="drag_data_received" handler="on_scrolledwindow_drag_data_received"/>
<child>
<widget class="GtkViewport" id="viewport2">
<property name="visible">True</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
@ -29,11 +29,14 @@
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">2</property>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkVButtonBox" id="editable_button_holder">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_START</property>
<property name="layout_style">start</property>
</widget>
<packing>
<property name="expand">False</property>