No more sidepane ;)
This commit is contained in:
parent
ec4866b1ab
commit
7539249468
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -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
|
mintmenu (5.0.5) julia; urgency=low
|
||||||
|
|
||||||
* Multi-threaded search
|
* Multi-threaded search
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
|
||||||
<!--*- mode: xml -*-->
|
|
||||||
<glade-interface>
|
<glade-interface>
|
||||||
|
<!-- interface-requires gtk+ 2.10 -->
|
||||||
|
<!-- interface-naming-policy toplevel-contextual -->
|
||||||
<widget class="GtkWindow" id="mainWindow">
|
<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="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="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_taskbar_hint">True</property>
|
||||||
<property name="skip_pager_hint">True</property>
|
<property name="skip_pager_hint">True</property>
|
||||||
<property name="decorated">False</property>
|
<property name="decorated">False</property>
|
||||||
@ -18,40 +18,6 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="paneholder">
|
<widget class="GtkHBox" id="paneholder">
|
||||||
<property name="visible">True</property>
|
<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>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
</child>
|
</child>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,6 @@
|
|||||||
<widget class="GtkVBox" id="vbox1">
|
<widget class="GtkVBox" id="vbox1">
|
||||||
<property name="visible">True</property>
|
<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="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>
|
<child>
|
||||||
<widget class="GtkNotebook" id="notebook1">
|
<widget class="GtkNotebook" id="notebook1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -221,7 +220,6 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox7">
|
<widget class="GtkVBox" id="vbox7">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">5</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="startWithFavorites">
|
<widget class="GtkCheckButton" id="startWithFavorites">
|
||||||
@ -238,8 +236,8 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="showSidepane">
|
<widget class="GtkCheckButton" id="showApplicationsPlugin">
|
||||||
<property name="label" translatable="yes">Show sidepane</property>
|
<property name="label" translatable="yes">Show applications plugin</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
@ -253,8 +251,8 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="showRecentPlugin">
|
<widget class="GtkCheckButton" id="showSystemPlugin">
|
||||||
<property name="label" translatable="yes">Show recent documents</property>
|
<property name="label" translatable="yes">Show system plugin</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
@ -267,6 +265,36 @@
|
|||||||
<property name="position">2</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</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>
|
<child>
|
||||||
<widget class="GtkTable" id="table2">
|
<widget class="GtkTable" id="table2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -346,7 +374,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="position">3</property>
|
<property name="position">5</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
@ -372,7 +400,7 @@
|
|||||||
<widget class="GtkLabel" id="label1">
|
<widget class="GtkLabel" id="label1">
|
||||||
<property name="visible">True</property>
|
<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="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>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
@ -600,7 +628,6 @@
|
|||||||
<widget class="GtkVBox" id="vbox13">
|
<widget class="GtkVBox" id="vbox13">
|
||||||
<property name="visible">True</property>
|
<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="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>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="useCustomColors">
|
<widget class="GtkCheckButton" id="useCustomColors">
|
||||||
<property name="label" translatable="yes">Use custom colors</property>
|
<property name="label" translatable="yes">Use custom colors</property>
|
||||||
@ -887,7 +914,6 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox2">
|
<widget class="GtkVBox" id="vbox2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="allowscrollbarcheckbutton">
|
<widget class="GtkCheckButton" id="allowscrollbarcheckbutton">
|
||||||
<property name="label" translatable="yes">Allow Scrollbar</property>
|
<property name="label" translatable="yes">Allow Scrollbar</property>
|
||||||
@ -963,7 +989,6 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox4">
|
<widget class="GtkVBox" id="vbox4">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="computercheckbutton">
|
<widget class="GtkCheckButton" id="computercheckbutton">
|
||||||
<property name="label" translatable="yes">Computer</property>
|
<property name="label" translatable="yes">Computer</property>
|
||||||
@ -1081,11 +1106,9 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox3">
|
<widget class="GtkVBox" id="vbox3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkVButtonBox" id="vbuttonbox1">
|
<widget class="GtkVButtonBox" id="vbuttonbox1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">5</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="newButton">
|
<widget class="GtkButton" id="newButton">
|
||||||
@ -1126,7 +1149,6 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkVButtonBox" id="vbuttonbox2">
|
<widget class="GtkVButtonBox" id="vbuttonbox2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="upButton">
|
<widget class="GtkButton" id="upButton">
|
||||||
<property name="label">gtk-go-up</property>
|
<property name="label">gtk-go-up</property>
|
||||||
@ -1257,7 +1279,6 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox5">
|
<widget class="GtkVBox" id="vbox5">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="allowscrollbarcheckbutton1">
|
<widget class="GtkCheckButton" id="allowscrollbarcheckbutton1">
|
||||||
<property name="label" translatable="yes">Allow Scrollbar</property>
|
<property name="label" translatable="yes">Allow Scrollbar</property>
|
||||||
@ -1331,7 +1352,6 @@
|
|||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox6">
|
<widget class="GtkVBox" id="vbox6">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="softwaremanagercheckbutton">
|
<widget class="GtkCheckButton" id="softwaremanagercheckbutton">
|
||||||
<property name="label" translatable="yes">Software Manager</property>
|
<property name="label" translatable="yes">Software Manager</property>
|
||||||
@ -1518,7 +1538,6 @@
|
|||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
<widget class="GtkVBox" id="dialog-vbox2">
|
<widget class="GtkVBox" id="dialog-vbox2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">2</property>
|
<property name="spacing">2</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkTable" id="table1">
|
<widget class="GtkTable" id="table1">
|
||||||
@ -1663,7 +1682,6 @@
|
|||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
<widget class="GtkVBox" id="dialog-vbox2">
|
<widget class="GtkVBox" id="dialog-vbox2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="spacing">2</property>
|
<property name="spacing">2</property>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
|
@ -3,19 +3,19 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pygtk
|
import pygtk
|
||||||
pygtk.require( "2.0" )
|
pygtk.require( "2.0" )
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
import gettext
|
import gettext
|
||||||
import os
|
import os
|
||||||
import commands
|
import commands
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print e
|
print e
|
||||||
sys.exit( 1 )
|
sys.exit( 1 )
|
||||||
|
|
||||||
PATH = os.path.abspath( os.path.dirname( sys.argv[0] ) )
|
PATH = os.path.abspath( os.path.dirname( sys.argv[0] ) )
|
||||||
|
|
||||||
@ -29,433 +29,467 @@ from easygconf import EasyGConf
|
|||||||
|
|
||||||
class mintMenuConfig( object ):
|
class mintMenuConfig( object ):
|
||||||
|
|
||||||
def __init__( self ):
|
def __init__( self ):
|
||||||
|
|
||||||
self.path = os.path.abspath( os.path.dirname( sys.argv[0] ) )
|
self.path = os.path.abspath( os.path.dirname( sys.argv[0] ) )
|
||||||
|
|
||||||
# Load glade file and extract widgets
|
# Load glade file and extract widgets
|
||||||
gladefile = os.path.join( self.path, "mintMenuConfig.glade" )
|
gladefile = os.path.join( self.path, "mintMenuConfig.glade" )
|
||||||
wTree = gtk.glade.XML( gladefile, "mainWindow" )
|
wTree = gtk.glade.XML( gladefile, "mainWindow" )
|
||||||
self.mainWindow=wTree.get_widget("mainWindow")
|
self.mainWindow=wTree.get_widget("mainWindow")
|
||||||
|
|
||||||
#i18n
|
#i18n
|
||||||
self.mainWindow.set_title(_("Menu preferences"))
|
self.mainWindow.set_title(_("Menu preferences"))
|
||||||
self.mainWindow.set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg")
|
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("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("showButtonIcon").set_label(_("Show button icon"))
|
wTree.get_widget("useCustomColors").set_label(_("Use custom colors"))
|
||||||
wTree.get_widget("useCustomColors").set_label(_("Use custom colors"))
|
wTree.get_widget("showRecentPlugin").set_label(_("Show recent documents plugin"))
|
||||||
wTree.get_widget("showRecentPlugin").set_label(_("Show recent documents"))
|
wTree.get_widget("showApplicationsPlugin").set_label(_("Show applications plugin"))
|
||||||
|
wTree.get_widget("showSystemPlugin").set_label(_("Show system plugin"))
|
||||||
wTree.get_widget("showAppComments").set_label(_("Show application comments"))
|
wTree.get_widget("showPlacesPlugin").set_label(_("Show places plugin"))
|
||||||
wTree.get_widget("showCategoryIcons").set_label(_("Show category icons"))
|
|
||||||
wTree.get_widget("hover").set_label(_("Hover"))
|
wTree.get_widget("showAppComments").set_label(_("Show application comments"))
|
||||||
wTree.get_widget("swapGeneric").set_label(_("Swap name and generic name"))
|
wTree.get_widget("showCategoryIcons").set_label(_("Show category icons"))
|
||||||
|
wTree.get_widget("hover").set_label(_("Hover"))
|
||||||
wTree.get_widget("label11").set_text(_("Border width:"))
|
wTree.get_widget("swapGeneric").set_label(_("Swap name and generic name"))
|
||||||
wTree.get_widget("label2").set_text(_("pixels"))
|
|
||||||
|
wTree.get_widget("label11").set_text(_("Border width:"))
|
||||||
wTree.get_widget("label8").set_text(_("Opacity:"))
|
wTree.get_widget("label2").set_text(_("pixels"))
|
||||||
wTree.get_widget("label9").set_text("%")
|
|
||||||
|
wTree.get_widget("label8").set_text(_("Opacity:"))
|
||||||
wTree.get_widget("buttonTextLabel").set_text(_("Button text:"))
|
wTree.get_widget("label9").set_text("%")
|
||||||
wTree.get_widget("label1").set_text(_("Options"))
|
|
||||||
wTree.get_widget("label23").set_text(_("Applications"))
|
wTree.get_widget("buttonTextLabel").set_text(_("Button text:"))
|
||||||
|
wTree.get_widget("label1").set_text(_("Options"))
|
||||||
wTree.get_widget("colorsLabel").set_text(_("Colors"))
|
wTree.get_widget("label23").set_text(_("Applications"))
|
||||||
wTree.get_widget("favLabel").set_text(_("Favorites"))
|
|
||||||
wTree.get_widget("label3").set_text(_("Main button"))
|
wTree.get_widget("colorsLabel").set_text(_("Colors"))
|
||||||
|
wTree.get_widget("favLabel").set_text(_("Favorites"))
|
||||||
wTree.get_widget("backgroundColorLabel").set_text(_("Background:"))
|
wTree.get_widget("label3").set_text(_("Main button"))
|
||||||
wTree.get_widget("headingColorLabel").set_text(_("Headings:"))
|
|
||||||
wTree.get_widget("borderColorLabel").set_text(_("Borders:"))
|
wTree.get_widget("backgroundColorLabel").set_text(_("Background:"))
|
||||||
|
wTree.get_widget("headingColorLabel").set_text(_("Headings:"))
|
||||||
#wTree.get_widget("applicationsLabel").set_text(_("Applications"))
|
wTree.get_widget("borderColorLabel").set_text(_("Borders:"))
|
||||||
#wTree.get_widget("favoritesLabel").set_text(_("Favorites"))
|
|
||||||
wTree.get_widget("numberColumnsLabel").set_text(_("Number of columns:"))
|
#wTree.get_widget("applicationsLabel").set_text(_("Applications"))
|
||||||
wTree.get_widget("iconSizeLabel").set_text(_("Icon size:"))
|
#wTree.get_widget("favoritesLabel").set_text(_("Favorites"))
|
||||||
wTree.get_widget("iconSizeLabel2").set_text(_("Icon size:"))
|
wTree.get_widget("numberColumnsLabel").set_text(_("Number of columns:"))
|
||||||
wTree.get_widget("label44").set_text(_("Icon size:"))
|
wTree.get_widget("iconSizeLabel").set_text(_("Icon size:"))
|
||||||
wTree.get_widget("hoverLabel").set_text(_("Hover delay (ms):"))
|
wTree.get_widget("iconSizeLabel2").set_text(_("Icon size:"))
|
||||||
wTree.get_widget("label4").set_text(_("Button icon:"))
|
wTree.get_widget("label44").set_text(_("Icon size:"))
|
||||||
wTree.get_widget("label5").set_text(_("Search command:"))
|
wTree.get_widget("hoverLabel").set_text(_("Hover delay (ms):"))
|
||||||
|
wTree.get_widget("label4").set_text(_("Button icon:"))
|
||||||
wTree.get_widget("placesLabel").set_text(_("Places"))
|
wTree.get_widget("label5").set_text(_("Search command:"))
|
||||||
wTree.get_widget("allowscrollbarcheckbutton").set_label(_("Allow Scrollbar"))
|
|
||||||
wTree.get_widget("placesHeightEntryLabel").set_text(_("Height:"))
|
wTree.get_widget("placesLabel").set_text(_("Places"))
|
||||||
wTree.get_widget("defaultPlacesFrameLabel").set_text(_("Toggle Default Places:"))
|
wTree.get_widget("allowscrollbarcheckbutton").set_label(_("Allow Scrollbar"))
|
||||||
wTree.get_widget("computercheckbutton").set_label(_("Computer"))
|
wTree.get_widget("placesHeightEntryLabel").set_text(_("Height:"))
|
||||||
wTree.get_widget("homecheckbutton").set_label(_("Home Folder"))
|
wTree.get_widget("defaultPlacesFrameLabel").set_text(_("Toggle Default Places:"))
|
||||||
wTree.get_widget("networkcheckbutton").set_label(_("Network"))
|
wTree.get_widget("computercheckbutton").set_label(_("Computer"))
|
||||||
wTree.get_widget("desktopcheckbutton").set_label(_("Desktop"))
|
wTree.get_widget("homecheckbutton").set_label(_("Home Folder"))
|
||||||
wTree.get_widget("trashcheckbutton").set_label(_("Trash"))
|
wTree.get_widget("networkcheckbutton").set_label(_("Network"))
|
||||||
wTree.get_widget("customPlacesFrameLabel").set_text(_("Custom Places:"))
|
wTree.get_widget("desktopcheckbutton").set_label(_("Desktop"))
|
||||||
|
wTree.get_widget("trashcheckbutton").set_label(_("Trash"))
|
||||||
wTree.get_widget("systemLabel").set_text(_("System"))
|
wTree.get_widget("customPlacesFrameLabel").set_text(_("Custom Places:"))
|
||||||
wTree.get_widget("allowscrollbarcheckbutton1").set_label(_("Allow Scrollbar"))
|
|
||||||
wTree.get_widget("systemHeightEntryLabel").set_text(_("Height:"))
|
wTree.get_widget("systemLabel").set_text(_("System"))
|
||||||
wTree.get_widget("defaultItemsFrameLabel").set_text(_("Toggle Default Items:"))
|
wTree.get_widget("allowscrollbarcheckbutton1").set_label(_("Allow Scrollbar"))
|
||||||
wTree.get_widget("softwaremanagercheckbutton").set_label(_("Software Manager"))
|
wTree.get_widget("systemHeightEntryLabel").set_text(_("Height:"))
|
||||||
wTree.get_widget("packagemanagercheckbutton").set_label(_("Package Manager"))
|
wTree.get_widget("defaultItemsFrameLabel").set_text(_("Toggle Default Items:"))
|
||||||
wTree.get_widget("controlcentercheckbutton").set_label(_("Control Center"))
|
wTree.get_widget("softwaremanagercheckbutton").set_label(_("Software Manager"))
|
||||||
wTree.get_widget("terminalcheckbutton").set_label(_("Terminal"))
|
wTree.get_widget("packagemanagercheckbutton").set_label(_("Package Manager"))
|
||||||
wTree.get_widget("lockcheckbutton").set_label(_("Lock Screen"))
|
wTree.get_widget("controlcentercheckbutton").set_label(_("Control Center"))
|
||||||
wTree.get_widget("logoutcheckbutton").set_label(_("Log Out"))
|
wTree.get_widget("terminalcheckbutton").set_label(_("Terminal"))
|
||||||
wTree.get_widget("quitcheckbutton").set_label(_("Quit"))
|
wTree.get_widget("lockcheckbutton").set_label(_("Lock Screen"))
|
||||||
|
wTree.get_widget("logoutcheckbutton").set_label(_("Log Out"))
|
||||||
self.editPlaceDialogTitle = (_("Edit Place"))
|
wTree.get_widget("quitcheckbutton").set_label(_("Quit"))
|
||||||
self.newPlaceDialogTitle = (_("New Place"))
|
|
||||||
self.folderChooserDialogTitle = (_("Select a folder"))
|
self.editPlaceDialogTitle = (_("Edit Place"))
|
||||||
|
self.newPlaceDialogTitle = (_("New Place"))
|
||||||
wTree.get_widget("hotkey_label").set_text(_("Keyboard shortcut:"))
|
self.folderChooserDialogTitle = (_("Select a folder"))
|
||||||
|
|
||||||
self.startWithFavorites = wTree.get_widget( "startWithFavorites" )
|
wTree.get_widget("hotkey_label").set_text(_("Keyboard shortcut:"))
|
||||||
self.showSidepane = wTree.get_widget( "showSidepane" )
|
|
||||||
self.showAppComments = wTree.get_widget( "showAppComments" )
|
self.startWithFavorites = wTree.get_widget( "startWithFavorites" )
|
||||||
self.showCategoryIcons = wTree.get_widget( "showCategoryIcons" )
|
self.showAppComments = wTree.get_widget( "showAppComments" )
|
||||||
self.showRecentPlugin = wTree.get_widget( "showRecentPlugin" )
|
self.showCategoryIcons = wTree.get_widget( "showCategoryIcons" )
|
||||||
self.swapGeneric = wTree.get_widget("swapGeneric")
|
self.showRecentPlugin = wTree.get_widget( "showRecentPlugin" )
|
||||||
self.hover = wTree.get_widget( "hover" )
|
self.showApplicationsPlugin = wTree.get_widget( "showApplicationsPlugin" )
|
||||||
self.hoverDelay = wTree.get_widget( "hoverDelay" )
|
self.showSystemPlugin = wTree.get_widget( "showSystemPlugin" )
|
||||||
self.bttniconSize = wTree.get_widget( "main_button_icon_size" )
|
self.showPlacesPlugin = wTree.get_widget( "showPlacesPlugin" )
|
||||||
self.iconSize = wTree.get_widget( "iconSize" )
|
self.swapGeneric = wTree.get_widget("swapGeneric")
|
||||||
self.favIconSize = wTree.get_widget( "favIconSize" )
|
self.hover = wTree.get_widget( "hover" )
|
||||||
self.favCols = wTree.get_widget( "numFavCols" )
|
self.hoverDelay = wTree.get_widget( "hoverDelay" )
|
||||||
self.borderWidth = wTree.get_widget( "borderWidth" )
|
self.bttniconSize = wTree.get_widget( "main_button_icon_size" )
|
||||||
self.opacity = wTree.get_widget( "opacity" )
|
self.iconSize = wTree.get_widget( "iconSize" )
|
||||||
self.useCustomColors = wTree.get_widget( "useCustomColors" )
|
self.favIconSize = wTree.get_widget( "favIconSize" )
|
||||||
self.backgroundColor = wTree.get_widget( "backgroundColor" )
|
self.favCols = wTree.get_widget( "numFavCols" )
|
||||||
self.borderColor = wTree.get_widget( "borderColor" )
|
self.borderWidth = wTree.get_widget( "borderWidth" )
|
||||||
self.headingColor = wTree.get_widget( "headingColor" )
|
self.opacity = wTree.get_widget( "opacity" )
|
||||||
self.backgroundColorLabel = wTree.get_widget( "backgroundColorLabel" )
|
self.useCustomColors = wTree.get_widget( "useCustomColors" )
|
||||||
self.borderColorLabel = wTree.get_widget( "borderColorLabel" )
|
self.backgroundColor = wTree.get_widget( "backgroundColor" )
|
||||||
self.headingColorLabel = wTree.get_widget( "headingColorLabel" )
|
self.borderColor = wTree.get_widget( "borderColor" )
|
||||||
self.showButtonIcon = wTree.get_widget( "showButtonIcon" )
|
self.headingColor = wTree.get_widget( "headingColor" )
|
||||||
self.buttonText = wTree.get_widget( "buttonText" )
|
self.backgroundColorLabel = wTree.get_widget( "backgroundColorLabel" )
|
||||||
self.hotkeyText = wTree.get_widget( "hotkeyText" )
|
self.borderColorLabel = wTree.get_widget( "borderColorLabel" )
|
||||||
self.buttonIcon = wTree.get_widget( "buttonIcon" )
|
self.headingColorLabel = wTree.get_widget( "headingColorLabel" )
|
||||||
self.buttonIconImage = wTree.get_widget( "image_button_icon" )
|
self.showButtonIcon = wTree.get_widget( "showButtonIcon" )
|
||||||
self.searchCommand = wTree.get_widget( "search_command" )
|
self.buttonText = wTree.get_widget( "buttonText" )
|
||||||
self.computertoggle = wTree.get_widget( "computercheckbutton" )
|
self.hotkeyText = wTree.get_widget( "hotkeyText" )
|
||||||
self.homefoldertoggle = wTree.get_widget( "homecheckbutton" )
|
self.buttonIcon = wTree.get_widget( "buttonIcon" )
|
||||||
self.networktoggle = wTree.get_widget( "networkcheckbutton" )
|
self.buttonIconImage = wTree.get_widget( "image_button_icon" )
|
||||||
self.desktoptoggle = wTree.get_widget( "desktopcheckbutton" )
|
self.searchCommand = wTree.get_widget( "search_command" )
|
||||||
self.trashtoggle = wTree.get_widget( "trashcheckbutton" )
|
self.computertoggle = wTree.get_widget( "computercheckbutton" )
|
||||||
self.customplacestree = wTree.get_widget( "customplacestree" )
|
self.homefoldertoggle = wTree.get_widget( "homecheckbutton" )
|
||||||
self.allowPlacesScrollbarToggle = wTree.get_widget( "allowscrollbarcheckbutton" )
|
self.networktoggle = wTree.get_widget( "networkcheckbutton" )
|
||||||
self.placesHeightButton = wTree.get_widget( "placesHeightSpinButton" )
|
self.desktoptoggle = wTree.get_widget( "desktopcheckbutton" )
|
||||||
if (self.allowPlacesScrollbarToggle.get_active() == False):
|
self.trashtoggle = wTree.get_widget( "trashcheckbutton" )
|
||||||
self.placesHeightButton.set_sensitive(False)
|
self.customplacestree = wTree.get_widget( "customplacestree" )
|
||||||
self.allowPlacesScrollbarToggle.connect("toggled", self.togglePlacesHeightEnabled )
|
self.allowPlacesScrollbarToggle = wTree.get_widget( "allowscrollbarcheckbutton" )
|
||||||
self.softwareManagerToggle = wTree.get_widget( "softwaremanagercheckbutton" )
|
self.placesHeightButton = wTree.get_widget( "placesHeightSpinButton" )
|
||||||
self.packageManagerToggle = wTree.get_widget( "packagemanagercheckbutton" )
|
if (self.allowPlacesScrollbarToggle.get_active() == False):
|
||||||
self.controlCenterToggle = wTree.get_widget( "controlcentercheckbutton" )
|
self.placesHeightButton.set_sensitive(False)
|
||||||
self.packageManagerToggle = wTree.get_widget( "packagemanagercheckbutton" )
|
self.allowPlacesScrollbarToggle.connect("toggled", self.togglePlacesHeightEnabled )
|
||||||
self.terminalToggle = wTree.get_widget( "terminalcheckbutton" )
|
self.softwareManagerToggle = wTree.get_widget( "softwaremanagercheckbutton" )
|
||||||
self.lockToggle = wTree.get_widget( "lockcheckbutton" )
|
self.packageManagerToggle = wTree.get_widget( "packagemanagercheckbutton" )
|
||||||
self.logoutToggle = wTree.get_widget( "logoutcheckbutton" )
|
self.controlCenterToggle = wTree.get_widget( "controlcentercheckbutton" )
|
||||||
self.quitToggle = wTree.get_widget( "quitcheckbutton" )
|
self.packageManagerToggle = wTree.get_widget( "packagemanagercheckbutton" )
|
||||||
self.allowSystemScrollbarToggle = wTree.get_widget( "allowscrollbarcheckbutton1" )
|
self.terminalToggle = wTree.get_widget( "terminalcheckbutton" )
|
||||||
self.systemHeightButton = wTree.get_widget( "systemHeightSpinButton" )
|
self.lockToggle = wTree.get_widget( "lockcheckbutton" )
|
||||||
if (self.allowSystemScrollbarToggle.get_active() == False): self.systemHeightButton.set_sensitive(False)
|
self.logoutToggle = wTree.get_widget( "logoutcheckbutton" )
|
||||||
self.allowSystemScrollbarToggle.connect("toggled", self.toggleSystemHeightEnabled )
|
self.quitToggle = wTree.get_widget( "quitcheckbutton" )
|
||||||
if os.path.exists("/usr/lib/linuxmint/mintInstall/icon.svg"):
|
self.allowSystemScrollbarToggle = wTree.get_widget( "allowscrollbarcheckbutton1" )
|
||||||
wTree.get_widget( "softwaremanagercheckbutton" ).show()
|
self.systemHeightButton = wTree.get_widget( "systemHeightSpinButton" )
|
||||||
else:
|
if (self.allowSystemScrollbarToggle.get_active() == False): self.systemHeightButton.set_sensitive(False)
|
||||||
wTree.get_widget( "softwaremanagercheckbutton" ).hide()
|
self.allowSystemScrollbarToggle.connect("toggled", self.toggleSystemHeightEnabled )
|
||||||
|
if os.path.exists("/usr/lib/linuxmint/mintInstall/icon.svg"):
|
||||||
wTree.get_widget( "closeButton" ).connect("clicked", gtk.main_quit )
|
wTree.get_widget( "softwaremanagercheckbutton" ).show()
|
||||||
|
else:
|
||||||
|
wTree.get_widget( "softwaremanagercheckbutton" ).hide()
|
||||||
self.gconf = EasyGConf( "/apps/mintMenu/" )
|
|
||||||
self.gconfApplications = EasyGConf( "/apps/mintMenu/plugins/applications/" )
|
wTree.get_widget( "closeButton" ).connect("clicked", gtk.main_quit )
|
||||||
self.gconfPlaces = EasyGConf( "/apps/mintMenu/plugins/places/" )
|
|
||||||
self.gconfSystem = EasyGConf( "/apps/mintMenu/plugins/system-management/" )
|
|
||||||
|
self.gconf = EasyGConf( "/apps/mintMenu/" )
|
||||||
self.useCustomColors.connect( "toggled", self.toggleUseCustomColors )
|
self.gconfApplications = EasyGConf( "/apps/mintMenu/plugins/applications/" )
|
||||||
|
self.gconfPlaces = EasyGConf( "/apps/mintMenu/plugins/places/" )
|
||||||
self.bindGconfValueToWidget( self.gconf, "bool", "start_with_favorites", self.startWithFavorites, "toggled", self.startWithFavorites.set_active, self.startWithFavorites.get_active )
|
self.gconfSystem = EasyGConf( "/apps/mintMenu/plugins/system-management/" )
|
||||||
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.useCustomColors.connect( "toggled", self.toggleUseCustomColors )
|
||||||
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 )
|
self.bindGconfValueToWidget( self.gconf, "bool", "start_with_favorites", self.startWithFavorites, "toggled", self.startWithFavorites.set_active, self.startWithFavorites.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconfApplications, "bool", "swap_generic_name", self.swapGeneric, "toggled", self.swapGeneric.set_active, self.swapGeneric.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, "int", "category_hover_delay", self.hoverDelay, "value-changed", self.hoverDelay.set_value, self.hoverDelay.get_value )
|
self.bindGconfValueToWidget( self.gconfApplications, "bool", "categories_mouse_over", self.hover, "toggled", self.hover.set_active, self.hover.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconfApplications, "int", "icon_size", self.iconSize, "value-changed", self.iconSize.set_value, self.iconSize.get_value )
|
self.bindGconfValueToWidget( self.gconfApplications, "bool", "swap_generic_name", self.swapGeneric, "toggled", self.swapGeneric.set_active, self.swapGeneric.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconf, "int", "applet_icon_size", self.bttniconSize, "value-changed", self.bttniconSize.set_value, self.bttniconSize.get_value )
|
|
||||||
self.bindGconfValueToWidget( self.gconfApplications, "int", "favicon_size", self.favIconSize, "value-changed", self.favIconSize.set_value, self.favIconSize.get_value )
|
self.bindGconfValueToWidget( self.gconfApplications, "int", "category_hover_delay", self.hoverDelay, "value-changed", self.hoverDelay.set_value, self.hoverDelay.get_value )
|
||||||
self.bindGconfValueToWidget( self.gconfApplications, "int", "fav_cols", self.favCols, "value-changed", self.favCols.set_value, self.favCols.get_value )
|
self.bindGconfValueToWidget( self.gconfApplications, "int", "icon_size", self.iconSize, "value-changed", self.iconSize.set_value, self.iconSize.get_value )
|
||||||
|
self.bindGconfValueToWidget( self.gconf, "int", "applet_icon_size", self.bttniconSize, "value-changed", self.bttniconSize.set_value, self.bttniconSize.get_value )
|
||||||
self.bindGconfValueToWidget( self.gconf, "int", "border_width", self.borderWidth, "value-changed", self.borderWidth.set_value, self.borderWidth.get_value_as_int )
|
self.bindGconfValueToWidget( self.gconfApplications, "int", "favicon_size", self.favIconSize, "value-changed", self.favIconSize.set_value, self.favIconSize.get_value )
|
||||||
self.bindGconfValueToWidget( self.gconf, "int", "opacity", self.opacity, "value-changed", self.opacity.set_value, self.opacity.get_value_as_int )
|
self.bindGconfValueToWidget( self.gconfApplications, "int", "fav_cols", self.favCols, "value-changed", self.favCols.set_value, self.favCols.get_value )
|
||||||
self.bindGconfValueToWidget( self.gconf, "bool", "use_custom_color", self.useCustomColors, "toggled", self.useCustomColors.set_active, self.useCustomColors.get_active )
|
|
||||||
self.bindGconfValueToWidget( self.gconf, "color", "custom_color", self.backgroundColor, "color-set", self.backgroundColor.set_color, self.getBackgroundColor )
|
self.bindGconfValueToWidget( self.gconf, "int", "border_width", self.borderWidth, "value-changed", self.borderWidth.set_value, self.borderWidth.get_value_as_int )
|
||||||
self.bindGconfValueToWidget( self.gconf, "color", "custom_heading_color", self.headingColor, "color-set", self.headingColor.set_color, self.getHeadingColor )
|
self.bindGconfValueToWidget( self.gconf, "int", "opacity", self.opacity, "value-changed", self.opacity.set_value, self.opacity.get_value_as_int )
|
||||||
self.bindGconfValueToWidget( self.gconf, "color", "custom_border_color", self.borderColor, "color-set", self.borderColor.set_color, self.getBorderColor )
|
self.bindGconfValueToWidget( self.gconf, "bool", "use_custom_color", self.useCustomColors, "toggled", self.useCustomColors.set_active, self.useCustomColors.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconf, "bool", "hide_applet_icon", self.showButtonIcon, "toggled", self.setShowButtonIcon, self.getShowButtonIcon )
|
self.bindGconfValueToWidget( self.gconf, "color", "custom_color", self.backgroundColor, "color-set", self.backgroundColor.set_color, self.getBackgroundColor )
|
||||||
self.bindGconfValueToWidget( self.gconf, "string", "applet_text", self.buttonText, "changed", self.buttonText.set_text, self.buttonText.get_text )
|
self.bindGconfValueToWidget( self.gconf, "color", "custom_heading_color", self.headingColor, "color-set", self.headingColor.set_color, self.getHeadingColor )
|
||||||
self.bindGconfValueToWidget( self.gconf, "string", "hot_key", self.hotkeyText, "changed", self.hotkeyText.set_text, self.hotkeyText.get_text )
|
self.bindGconfValueToWidget( self.gconf, "color", "custom_border_color", self.borderColor, "color-set", self.borderColor.set_color, self.getBorderColor )
|
||||||
self.bindGconfValueToWidget( self.gconf, "string", "applet_icon", self.buttonIcon, "changed", self.setButtonIcon, self.buttonIcon.get_text )
|
self.bindGconfValueToWidget( self.gconf, "bool", "hide_applet_icon", self.showButtonIcon, "toggled", self.setShowButtonIcon, self.getShowButtonIcon )
|
||||||
self.bindGconfValueToWidget( self.gconfApplications, "string", "search_command", self.searchCommand, "changed", self.searchCommand.set_text, self.searchCommand.get_text )
|
self.bindGconfValueToWidget( self.gconf, "string", "applet_text", self.buttonText, "changed", self.buttonText.set_text, self.buttonText.get_text )
|
||||||
|
self.bindGconfValueToWidget( self.gconf, "string", "hot_key", self.hotkeyText, "changed", self.hotkeyText.set_text, self.hotkeyText.get_text )
|
||||||
self.showRecentPlugin.connect("toggled", self.toggleRecent )
|
self.bindGconfValueToWidget( self.gconf, "string", "applet_icon", self.buttonIcon, "changed", self.setButtonIcon, self.buttonIcon.get_text )
|
||||||
self.showRecentPlugin.set_active( self.getRecentToggle() )
|
self.bindGconfValueToWidget( self.gconfApplications, "string", "search_command", self.searchCommand, "changed", self.searchCommand.set_text, self.searchCommand.get_text )
|
||||||
|
|
||||||
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_computer", self.computertoggle, "toggled", self.computertoggle.set_active, self.computertoggle.get_active )
|
self.getPluginsToggle()
|
||||||
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_home_folder", self.homefoldertoggle, "toggled", self.homefoldertoggle.set_active, self.homefoldertoggle.get_active )
|
self.showRecentPlugin.connect("toggled", self.setPluginsLayout )
|
||||||
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_network", self.networktoggle, "toggled", self.networktoggle.set_active, self.networktoggle.get_active )
|
self.showApplicationsPlugin.connect("toggled", self.setPluginsLayout )
|
||||||
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_desktop", self.desktoptoggle, "toggled", self.desktoptoggle.set_active, self.desktoptoggle.get_active )
|
self.showSystemPlugin.connect("toggled", self.setPluginsLayout )
|
||||||
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_trash", self.trashtoggle, "toggled", self.trashtoggle.set_active, self.trashtoggle.get_active )
|
self.showPlacesPlugin.connect("toggled", self.setPluginsLayout )
|
||||||
self.bindGconfValueToWidget( self.gconfPlaces, "int", "height", self.placesHeightButton, "value-changed", self.placesHeightButton.set_value, self.placesHeightButton.get_value_as_int )
|
|
||||||
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "allowScrollbar", self.allowPlacesScrollbarToggle, "toggled", self.allowPlacesScrollbarToggle.set_active, self.allowPlacesScrollbarToggle.get_active )
|
|
||||||
|
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_computer", self.computertoggle, "toggled", self.computertoggle.set_active, self.computertoggle.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_software_manager", self.softwareManagerToggle, "toggled", self.softwareManagerToggle.set_active, self.softwareManagerToggle.get_active )
|
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_home_folder", self.homefoldertoggle, "toggled", self.homefoldertoggle.set_active, self.homefoldertoggle.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_package_manager", self.packageManagerToggle, "toggled", self.packageManagerToggle.set_active, self.packageManagerToggle.get_active )
|
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_network", self.networktoggle, "toggled", self.networktoggle.set_active, self.networktoggle.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_control_center", self.controlCenterToggle, "toggled", self.controlCenterToggle.set_active, self.controlCenterToggle.get_active )
|
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_desktop", self.desktoptoggle, "toggled", self.desktoptoggle.set_active, self.desktoptoggle.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_terminal", self.terminalToggle, "toggled", self.terminalToggle.set_active, self.terminalToggle.get_active )
|
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "show_trash", self.trashtoggle, "toggled", self.trashtoggle.set_active, self.trashtoggle.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_lock_screen", self.lockToggle, "toggled", self.lockToggle.set_active, self.lockToggle.get_active )
|
self.bindGconfValueToWidget( self.gconfPlaces, "int", "height", self.placesHeightButton, "value-changed", self.placesHeightButton.set_value, self.placesHeightButton.get_value_as_int )
|
||||||
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_logout", self.logoutToggle, "toggled", self.logoutToggle.set_active, self.logoutToggle.get_active )
|
self.bindGconfValueToWidget( self.gconfPlaces, "bool", "allowScrollbar", self.allowPlacesScrollbarToggle, "toggled", self.allowPlacesScrollbarToggle.set_active, self.allowPlacesScrollbarToggle.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_quit", self.quitToggle, "toggled", self.quitToggle.set_active, self.quitToggle.get_active )
|
|
||||||
self.bindGconfValueToWidget( self.gconfSystem, "int", "height", self.systemHeightButton, "value-changed", self.systemHeightButton.set_value, self.systemHeightButton.get_value_as_int )
|
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_software_manager", self.softwareManagerToggle, "toggled", self.softwareManagerToggle.set_active, self.softwareManagerToggle.get_active )
|
||||||
self.bindGconfValueToWidget( self.gconfSystem, "bool", "allowScrollbar", self.allowSystemScrollbarToggle, "toggled", self.allowSystemScrollbarToggle.set_active, self.allowSystemScrollbarToggle.get_active )
|
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_package_manager", self.packageManagerToggle, "toggled", self.packageManagerToggle.set_active, self.packageManagerToggle.get_active )
|
||||||
|
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_control_center", self.controlCenterToggle, "toggled", self.controlCenterToggle.set_active, self.controlCenterToggle.get_active )
|
||||||
self.customplacepaths = self.gconfPlaces.get( "list-string", "custom_paths", [ ] )
|
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_terminal", self.terminalToggle, "toggled", self.terminalToggle.set_active, self.terminalToggle.get_active )
|
||||||
self.customplacenames = self.gconfPlaces.get( "list-string", "custom_names", [ ] )
|
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_lock_screen", self.lockToggle, "toggled", self.lockToggle.set_active, self.lockToggle.get_active )
|
||||||
|
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_logout", self.logoutToggle, "toggled", self.logoutToggle.set_active, self.logoutToggle.get_active )
|
||||||
self.customplacestreemodel = gtk.ListStore( str, str)
|
self.bindGconfValueToWidget( self.gconfSystem, "bool", "show_quit", self.quitToggle, "toggled", self.quitToggle.set_active, self.quitToggle.get_active )
|
||||||
self.cell = gtk.CellRendererText()
|
self.bindGconfValueToWidget( self.gconfSystem, "int", "height", self.systemHeightButton, "value-changed", self.systemHeightButton.set_value, self.systemHeightButton.get_value_as_int )
|
||||||
|
self.bindGconfValueToWidget( self.gconfSystem, "bool", "allowScrollbar", self.allowSystemScrollbarToggle, "toggled", self.allowSystemScrollbarToggle.set_active, self.allowSystemScrollbarToggle.get_active )
|
||||||
for count in range( len(self.customplacepaths) ):
|
|
||||||
self.customplacestreemodel.append( [ self.customplacenames[count], self.customplacepaths[count] ] )
|
self.customplacepaths = self.gconfPlaces.get( "list-string", "custom_paths", [ ] )
|
||||||
|
self.customplacenames = self.gconfPlaces.get( "list-string", "custom_names", [ ] )
|
||||||
self.customplacestreemodel.connect("row-changed", self.updatePlacesGconf)
|
|
||||||
self.customplacestreemodel.connect("row-deleted", self.updatePlacesGconf)
|
self.customplacestreemodel = gtk.ListStore( str, str)
|
||||||
self.customplacestreemodel.connect("rows-reordered", self.updatePlacesGconf)
|
self.cell = gtk.CellRendererText()
|
||||||
self.customplacestree.set_model( self.customplacestreemodel )
|
|
||||||
self.namescolumn = gtk.TreeViewColumn( _("Name"), self.cell, text = 0 )
|
for count in range( len(self.customplacepaths) ):
|
||||||
self.placescolumn = gtk.TreeViewColumn( _("Path"), self.cell, text = 1 )
|
self.customplacestreemodel.append( [ self.customplacenames[count], self.customplacepaths[count] ] )
|
||||||
self.customplacestree.append_column( self.namescolumn )
|
|
||||||
self.customplacestree.append_column( self.placescolumn )
|
self.customplacestreemodel.connect("row-changed", self.updatePlacesGconf)
|
||||||
wTree.get_widget("newButton").connect("clicked", self.newPlace)
|
self.customplacestreemodel.connect("row-deleted", self.updatePlacesGconf)
|
||||||
wTree.get_widget("editButton").connect("clicked", self.editPlace)
|
self.customplacestreemodel.connect("rows-reordered", self.updatePlacesGconf)
|
||||||
wTree.get_widget("upButton").connect("clicked", self.moveUp)
|
self.customplacestree.set_model( self.customplacestreemodel )
|
||||||
wTree.get_widget("downButton").connect("clicked", self.moveDown)
|
self.namescolumn = gtk.TreeViewColumn( _("Name"), self.cell, text = 0 )
|
||||||
wTree.get_widget("removeButton").connect("clicked", self.removePlace)
|
self.placescolumn = gtk.TreeViewColumn( _("Path"), self.cell, text = 1 )
|
||||||
|
self.customplacestree.append_column( self.namescolumn )
|
||||||
self.mainWindow.present()
|
self.customplacestree.append_column( self.placescolumn )
|
||||||
|
wTree.get_widget("newButton").connect("clicked", self.newPlace)
|
||||||
self.getBackgroundColor()
|
wTree.get_widget("editButton").connect("clicked", self.editPlace)
|
||||||
|
wTree.get_widget("upButton").connect("clicked", self.moveUp)
|
||||||
def toggleRecent(self, widget):
|
wTree.get_widget("downButton").connect("clicked", self.moveDown)
|
||||||
if self.showRecentPlugin.get_active():
|
wTree.get_widget("removeButton").connect("clicked", self.removePlace)
|
||||||
os.system("gconftool-2 --type list --list-type string --set /apps/mintMenu/plugins_list [newpane,places,system_management,newpane,applications,newpane,recent]")
|
|
||||||
else:
|
self.mainWindow.present()
|
||||||
os.system("gconftool-2 --type list --list-type string --set /apps/mintMenu/plugins_list [newpane,places,system_management,newpane,applications]")
|
|
||||||
|
self.getBackgroundColor()
|
||||||
def getRecentToggle(self):
|
|
||||||
if (commands.getoutput("gconftool-2 --get /apps/mintMenu/plugins_list | grep recent | wc -l") == "0"):
|
def getPluginsToggle(self):
|
||||||
return False
|
if (commands.getoutput("gconftool-2 --get /apps/mintMenu/plugins_list | grep recent | wc -l") == "0"):
|
||||||
else:
|
self.showRecentPlugin.set_active(False)
|
||||||
return True
|
else:
|
||||||
|
self.showRecentPlugin.set_active(True)
|
||||||
def setShowButtonIcon( self, value ):
|
if (commands.getoutput("gconftool-2 --get /apps/mintMenu/plugins_list | grep applications | wc -l") == "0"):
|
||||||
self.showButtonIcon.set_active(not value )
|
self.showApplicationsPlugin.set_active(False)
|
||||||
|
else:
|
||||||
def setButtonIcon( self, value ):
|
self.showApplicationsPlugin.set_active(True)
|
||||||
self.buttonIcon.set_text(value)
|
if (commands.getoutput("gconftool-2 --get /apps/mintMenu/plugins_list | grep system_management | wc -l") == "0"):
|
||||||
self.buttonIconImage.set_from_file(value)
|
self.showSystemPlugin.set_active(False)
|
||||||
|
else:
|
||||||
def getShowButtonIcon( self ):
|
self.showSystemPlugin.set_active(True)
|
||||||
return not self.showButtonIcon.get_active()
|
if (commands.getoutput("gconftool-2 --get /apps/mintMenu/plugins_list | grep places | wc -l") == "0"):
|
||||||
|
self.showPlacesPlugin.set_active(False)
|
||||||
def bindGconfValueToWidget( self, gconf, gconfType, gconfPath, widget, changeEvent, setter, getter ):
|
else:
|
||||||
widget.connect( changeEvent, lambda *args: self.callGetter( gconf, gconfType, gconfPath, getter ) )
|
self.showPlacesPlugin.set_active(True)
|
||||||
|
|
||||||
gconf.notifyAdd( gconfPath, self.callSetter, args = [ gconfType, setter ] )
|
def setPluginsLayout (self, widget):
|
||||||
if gconfType == "color":
|
visiblePlugins = []
|
||||||
setter( gtk.gdk.color_parse( gconf.get( gconfType, gconfPath ) ) )
|
if self.showPlacesPlugin.get_active():
|
||||||
else:
|
visiblePlugins.append("places")
|
||||||
setter( gconf.get( gconfType, gconfPath ) )
|
if self.showSystemPlugin.get_active():
|
||||||
|
visiblePlugins.append("system_management")
|
||||||
def callSetter( self, client, connection_id, entry, args ):
|
if self.showApplicationsPlugin.get_active():
|
||||||
if args[0] == "bool":
|
if self.showPlacesPlugin.get_active() or self.showSystemPlugin.get_active():
|
||||||
args[1]( entry.get_value().get_bool() )
|
visiblePlugins.append("newpane")
|
||||||
elif args[0] == "string":
|
visiblePlugins.append("applications")
|
||||||
args[1]( entry.get_value().get_string() )
|
if self.showRecentPlugin.get_active():
|
||||||
elif args[0] == "int":
|
if self.showApplicationsPlugin.get_active() or self.showPlacesPlugin.get_active() or self.showSystemPlugin.get_active():
|
||||||
args[1]( entry.get_value().get_int() )
|
visiblePlugins.append("newpane")
|
||||||
elif args[0] == "color":
|
visiblePlugins.append("recent")
|
||||||
args[1]( gtk.gdk.color_parse( entry.get_value().get_string() ) )
|
layout = ""
|
||||||
|
for plugin in visiblePlugins:
|
||||||
def callGetter( self, gconf, gconfType, gconfPath, getter ):
|
layout = layout + plugin + ","
|
||||||
gconf.set( gconfType, gconfPath, getter() )
|
if len(layout) > 0 and layout[-1] == ",":
|
||||||
|
layout = layout[0:-1]
|
||||||
def toggleUseCustomColors( self, widget ):
|
os.system("gconftool-2 --type list --list-type string --set /apps/mintMenu/plugins_list [%s]" % layout)
|
||||||
self.backgroundColor.set_sensitive( widget.get_active() )
|
|
||||||
self.borderColor.set_sensitive( widget.get_active() )
|
def setShowButtonIcon( self, value ):
|
||||||
self.headingColor.set_sensitive( widget.get_active() )
|
self.showButtonIcon.set_active(not value )
|
||||||
self.backgroundColorLabel.set_sensitive( widget.get_active() )
|
|
||||||
self.borderColorLabel.set_sensitive( widget.get_active() )
|
def setButtonIcon( self, value ):
|
||||||
self.headingColorLabel.set_sensitive( widget.get_active() )
|
self.buttonIcon.set_text(value)
|
||||||
|
self.buttonIconImage.set_from_file(value)
|
||||||
def getBackgroundColor( self ):
|
|
||||||
return self.gdkColorToString( self.backgroundColor.get_color() )
|
def getShowButtonIcon( self ):
|
||||||
|
return not self.showButtonIcon.get_active()
|
||||||
def getBorderColor( self ):
|
|
||||||
return self.gdkColorToString( self.borderColor.get_color() )
|
def bindGconfValueToWidget( self, gconf, gconfType, gconfPath, widget, changeEvent, setter, getter ):
|
||||||
|
widget.connect( changeEvent, lambda *args: self.callGetter( gconf, gconfType, gconfPath, getter ) )
|
||||||
def getHeadingColor( self ):
|
|
||||||
return self.gdkColorToString( self.headingColor.get_color() )
|
gconf.notifyAdd( gconfPath, self.callSetter, args = [ gconfType, setter ] )
|
||||||
|
if gconfType == "color":
|
||||||
def gdkColorToString( self, gdkColor ):
|
setter( gtk.gdk.color_parse( gconf.get( gconfType, gconfPath ) ) )
|
||||||
return "#%.2X%.2X%.2X" % ( gdkColor.red / 256, gdkColor.green / 256, gdkColor.blue / 256 )
|
else:
|
||||||
|
setter( gconf.get( gconfType, gconfPath ) )
|
||||||
def moveUp( self, upButton ):
|
|
||||||
|
def callSetter( self, client, connection_id, entry, args ):
|
||||||
treeselection = self.customplacestree.get_selection()
|
if args[0] == "bool":
|
||||||
currentiter = (treeselection.get_selected())[1]
|
args[1]( entry.get_value().get_bool() )
|
||||||
|
elif args[0] == "string":
|
||||||
if ( treeselection != None ):
|
args[1]( entry.get_value().get_string() )
|
||||||
|
elif args[0] == "int":
|
||||||
lagiter = self.customplacestreemodel.get_iter_first()
|
args[1]( entry.get_value().get_int() )
|
||||||
nextiter = self.customplacestreemodel.get_iter_first()
|
elif args[0] == "color":
|
||||||
|
args[1]( gtk.gdk.color_parse( entry.get_value().get_string() ) )
|
||||||
while ( (self.customplacestreemodel.get_path(nextiter) != self.customplacestreemodel.get_path(currentiter)) & (nextiter != None)):
|
|
||||||
lagiter = nextiter
|
def callGetter( self, gconf, gconfType, gconfPath, getter ):
|
||||||
nextiter = self.customplacestreemodel.iter_next(nextiter)
|
gconf.set( gconfType, gconfPath, getter() )
|
||||||
|
|
||||||
if (nextiter != None):
|
def toggleUseCustomColors( self, widget ):
|
||||||
self.customplacestreemodel.swap(currentiter, lagiter)
|
self.backgroundColor.set_sensitive( widget.get_active() )
|
||||||
|
self.borderColor.set_sensitive( widget.get_active() )
|
||||||
return
|
self.headingColor.set_sensitive( widget.get_active() )
|
||||||
|
self.backgroundColorLabel.set_sensitive( widget.get_active() )
|
||||||
def newPlace(self, newButton):
|
self.borderColorLabel.set_sensitive( widget.get_active() )
|
||||||
gladefile = os.path.join( self.path, "mintMenuConfig.glade" )
|
self.headingColorLabel.set_sensitive( widget.get_active() )
|
||||||
wTree = gtk.glade.XML( gladefile, "editPlaceDialog" )
|
|
||||||
wTree.get_widget("label2").set_text(_("Name:"))
|
def getBackgroundColor( self ):
|
||||||
wTree.get_widget("label1").set_text(_("Path:"))
|
return self.gdkColorToString( self.backgroundColor.get_color() )
|
||||||
folderChooserTree = gtk.glade.XML( gladefile, "fileChooserDialog" )
|
|
||||||
newPlaceDialog = wTree.get_widget( "editPlaceDialog" )
|
def getBorderColor( self ):
|
||||||
folderChooserDialog = folderChooserTree.get_widget( "fileChooserDialog" )
|
return self.gdkColorToString( self.borderColor.get_color() )
|
||||||
newPlaceDialog.set_transient_for(self.mainWindow)
|
|
||||||
newPlaceDialog.set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg")
|
def getHeadingColor( self ):
|
||||||
newPlaceDialog.set_title(self.newPlaceDialogTitle)
|
return self.gdkColorToString( self.headingColor.get_color() )
|
||||||
folderChooserDialog.set_title(self.folderChooserDialogTitle)
|
|
||||||
newPlaceDialog.set_default_response(gtk.RESPONSE_OK)
|
def gdkColorToString( self, gdkColor ):
|
||||||
newPlaceName = wTree.get_widget( "nameEntryBox" )
|
return "#%.2X%.2X%.2X" % ( gdkColor.red / 256, gdkColor.green / 256, gdkColor.blue / 256 )
|
||||||
newPlacePath = wTree.get_widget( "pathEntryBox" )
|
|
||||||
folderButton = wTree.get_widget( "folderButton" )
|
def moveUp( self, upButton ):
|
||||||
def chooseFolder(folderButton):
|
|
||||||
currentPath = newPlacePath.get_text()
|
treeselection = self.customplacestree.get_selection()
|
||||||
if (currentPath!=""):
|
currentiter = (treeselection.get_selected())[1]
|
||||||
folderChooserDialog.select_filename(currentPath)
|
|
||||||
response = folderChooserDialog.run()
|
if ( treeselection != None ):
|
||||||
folderChooserDialog.hide()
|
|
||||||
if (response == gtk.RESPONSE_OK):
|
lagiter = self.customplacestreemodel.get_iter_first()
|
||||||
newPlacePath.set_text( folderChooserDialog.get_filenames()[0] )
|
nextiter = self.customplacestreemodel.get_iter_first()
|
||||||
folderButton.connect("clicked", chooseFolder)
|
|
||||||
|
while ( (self.customplacestreemodel.get_path(nextiter) != self.customplacestreemodel.get_path(currentiter)) & (nextiter != None)):
|
||||||
response = newPlaceDialog.run()
|
lagiter = nextiter
|
||||||
newPlaceDialog.hide()
|
nextiter = self.customplacestreemodel.iter_next(nextiter)
|
||||||
if (response == gtk.RESPONSE_OK ):
|
|
||||||
name = newPlaceName.get_text()
|
if (nextiter != None):
|
||||||
path = newPlacePath.get_text()
|
self.customplacestreemodel.swap(currentiter, lagiter)
|
||||||
if (name != "" and path !=""):
|
|
||||||
self.customplacestreemodel.append( (name, path) )
|
return
|
||||||
|
|
||||||
def editPlace(self, editButton):
|
def newPlace(self, newButton):
|
||||||
gladefile = os.path.join( self.path, "mintMenuConfig.glade" )
|
gladefile = os.path.join( self.path, "mintMenuConfig.glade" )
|
||||||
wTree = gtk.glade.XML( gladefile, "editPlaceDialog" )
|
wTree = gtk.glade.XML( gladefile, "editPlaceDialog" )
|
||||||
wTree.get_widget("label2").set_text(_("Name:"))
|
wTree.get_widget("label2").set_text(_("Name:"))
|
||||||
wTree.get_widget("label1").set_text(_("Path:"))
|
wTree.get_widget("label1").set_text(_("Path:"))
|
||||||
folderChooserTree = gtk.glade.XML( gladefile, "fileChooserDialog" )
|
folderChooserTree = gtk.glade.XML( gladefile, "fileChooserDialog" )
|
||||||
editPlaceDialog = wTree.get_widget( "editPlaceDialog" )
|
newPlaceDialog = wTree.get_widget( "editPlaceDialog" )
|
||||||
folderChooserDialog = folderChooserTree.get_widget( "fileChooserDialog" )
|
folderChooserDialog = folderChooserTree.get_widget( "fileChooserDialog" )
|
||||||
editPlaceDialog.set_transient_for(self.mainWindow)
|
newPlaceDialog.set_transient_for(self.mainWindow)
|
||||||
editPlaceDialog.set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg")
|
newPlaceDialog.set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg")
|
||||||
editPlaceDialog.set_title(self.editPlaceDialogTitle)
|
newPlaceDialog.set_title(self.newPlaceDialogTitle)
|
||||||
folderChooserDialog.set_title(self.folderChooserDialogTitle)
|
folderChooserDialog.set_title(self.folderChooserDialogTitle)
|
||||||
editPlaceDialog.set_default_response(gtk.RESPONSE_OK)
|
newPlaceDialog.set_default_response(gtk.RESPONSE_OK)
|
||||||
editPlaceName = wTree.get_widget( "nameEntryBox" )
|
newPlaceName = wTree.get_widget( "nameEntryBox" )
|
||||||
editPlacePath = wTree.get_widget( "pathEntryBox" )
|
newPlacePath = wTree.get_widget( "pathEntryBox" )
|
||||||
folderButton = wTree.get_widget( "folderButton" )
|
folderButton = wTree.get_widget( "folderButton" )
|
||||||
treeselection = self.customplacestree.get_selection()
|
def chooseFolder(folderButton):
|
||||||
currentiter = (treeselection.get_selected())[1]
|
currentPath = newPlacePath.get_text()
|
||||||
|
if (currentPath!=""):
|
||||||
if (currentiter != None):
|
folderChooserDialog.select_filename(currentPath)
|
||||||
|
response = folderChooserDialog.run()
|
||||||
initName = self.customplacestreemodel.get_value(currentiter, 0)
|
folderChooserDialog.hide()
|
||||||
initPath = self.customplacestreemodel.get_value(currentiter, 1)
|
if (response == gtk.RESPONSE_OK):
|
||||||
|
newPlacePath.set_text( folderChooserDialog.get_filenames()[0] )
|
||||||
editPlaceName.set_text(initName)
|
folderButton.connect("clicked", chooseFolder)
|
||||||
editPlacePath.set_text(initPath)
|
|
||||||
def chooseFolder(folderButton):
|
response = newPlaceDialog.run()
|
||||||
currentPath = editPlacePath.get_text()
|
newPlaceDialog.hide()
|
||||||
if (currentPath!=""):
|
if (response == gtk.RESPONSE_OK ):
|
||||||
folderChooserDialog.select_filename(currentPath)
|
name = newPlaceName.get_text()
|
||||||
response = folderChooserDialog.run()
|
path = newPlacePath.get_text()
|
||||||
folderChooserDialog.hide()
|
if (name != "" and path !=""):
|
||||||
if (response == gtk.RESPONSE_OK):
|
self.customplacestreemodel.append( (name, path) )
|
||||||
editPlacePath.set_text( folderChooserDialog.get_filenames()[0] )
|
|
||||||
folderButton.connect("clicked", chooseFolder)
|
def editPlace(self, editButton):
|
||||||
response = editPlaceDialog.run()
|
gladefile = os.path.join( self.path, "mintMenuConfig.glade" )
|
||||||
editPlaceDialog.hide()
|
wTree = gtk.glade.XML( gladefile, "editPlaceDialog" )
|
||||||
if (response == gtk.RESPONSE_OK):
|
wTree.get_widget("label2").set_text(_("Name:"))
|
||||||
name = editPlaceName.get_text()
|
wTree.get_widget("label1").set_text(_("Path:"))
|
||||||
path = editPlacePath.get_text()
|
folderChooserTree = gtk.glade.XML( gladefile, "fileChooserDialog" )
|
||||||
if (name != "" and path != ""):
|
editPlaceDialog = wTree.get_widget( "editPlaceDialog" )
|
||||||
self.customplacestreemodel.set_value(currentiter, 0, name)
|
folderChooserDialog = folderChooserTree.get_widget( "fileChooserDialog" )
|
||||||
self.customplacestreemodel.set_value(currentiter, 1, path)
|
editPlaceDialog.set_transient_for(self.mainWindow)
|
||||||
|
editPlaceDialog.set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg")
|
||||||
def moveDown(self, downButton):
|
editPlaceDialog.set_title(self.editPlaceDialogTitle)
|
||||||
|
folderChooserDialog.set_title(self.folderChooserDialogTitle)
|
||||||
treeselection = self.customplacestree.get_selection()
|
editPlaceDialog.set_default_response(gtk.RESPONSE_OK)
|
||||||
currentiter = (treeselection.get_selected())[1]
|
editPlaceName = wTree.get_widget( "nameEntryBox" )
|
||||||
|
editPlacePath = wTree.get_widget( "pathEntryBox" )
|
||||||
nextiter = self.customplacestreemodel.iter_next(currentiter)
|
folderButton = wTree.get_widget( "folderButton" )
|
||||||
|
treeselection = self.customplacestree.get_selection()
|
||||||
if (nextiter != None):
|
currentiter = (treeselection.get_selected())[1]
|
||||||
self.customplacestreemodel.swap(currentiter, nextiter)
|
|
||||||
|
if (currentiter != None):
|
||||||
return
|
|
||||||
|
initName = self.customplacestreemodel.get_value(currentiter, 0)
|
||||||
|
initPath = self.customplacestreemodel.get_value(currentiter, 1)
|
||||||
def removePlace(self, removeButton):
|
|
||||||
|
editPlaceName.set_text(initName)
|
||||||
treeselection = self.customplacestree.get_selection()
|
editPlacePath.set_text(initPath)
|
||||||
currentiter = (treeselection.get_selected())[1]
|
def chooseFolder(folderButton):
|
||||||
|
currentPath = editPlacePath.get_text()
|
||||||
if (currentiter != None):
|
if (currentPath!=""):
|
||||||
self.customplacestreemodel.remove(currentiter)
|
folderChooserDialog.select_filename(currentPath)
|
||||||
|
response = folderChooserDialog.run()
|
||||||
return
|
folderChooserDialog.hide()
|
||||||
|
if (response == gtk.RESPONSE_OK):
|
||||||
def togglePlacesHeightEnabled(self, toggle):
|
editPlacePath.set_text( folderChooserDialog.get_filenames()[0] )
|
||||||
if (toggle.get_active() == True):
|
folderButton.connect("clicked", chooseFolder)
|
||||||
self.placesHeightButton.set_sensitive(True)
|
response = editPlaceDialog.run()
|
||||||
else:
|
editPlaceDialog.hide()
|
||||||
self.placesHeightButton.set_sensitive(False)
|
if (response == gtk.RESPONSE_OK):
|
||||||
|
name = editPlaceName.get_text()
|
||||||
def toggleSystemHeightEnabled(self, toggle):
|
path = editPlacePath.get_text()
|
||||||
if (toggle.get_active() == True):
|
if (name != "" and path != ""):
|
||||||
self.systemHeightButton.set_sensitive(True)
|
self.customplacestreemodel.set_value(currentiter, 0, name)
|
||||||
else:
|
self.customplacestreemodel.set_value(currentiter, 1, path)
|
||||||
self.systemHeightButton.set_sensitive(False)
|
|
||||||
|
def moveDown(self, downButton):
|
||||||
def updatePlacesGconf(self, treemodel, path, iter = None, new_order = None):
|
|
||||||
|
treeselection = self.customplacestree.get_selection()
|
||||||
|
currentiter = (treeselection.get_selected())[1]
|
||||||
|
|
||||||
|
nextiter = self.customplacestreemodel.iter_next(currentiter)
|
||||||
|
|
||||||
|
if (nextiter != None):
|
||||||
|
self.customplacestreemodel.swap(currentiter, nextiter)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
def removePlace(self, removeButton):
|
||||||
|
|
||||||
|
treeselection = self.customplacestree.get_selection()
|
||||||
|
currentiter = (treeselection.get_selected())[1]
|
||||||
|
|
||||||
|
if (currentiter != None):
|
||||||
|
self.customplacestreemodel.remove(currentiter)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
def togglePlacesHeightEnabled(self, toggle):
|
||||||
|
if (toggle.get_active() == True):
|
||||||
|
self.placesHeightButton.set_sensitive(True)
|
||||||
|
else:
|
||||||
|
self.placesHeightButton.set_sensitive(False)
|
||||||
|
|
||||||
|
def toggleSystemHeightEnabled(self, toggle):
|
||||||
|
if (toggle.get_active() == True):
|
||||||
|
self.systemHeightButton.set_sensitive(True)
|
||||||
|
else:
|
||||||
|
self.systemHeightButton.set_sensitive(False)
|
||||||
|
|
||||||
|
def updatePlacesGconf(self, treemodel, path, iter = None, new_order = None):
|
||||||
# Do only if not partway though an append operation; Append = insert+change+change and each creates a signal
|
# Do only if not partway though an append operation; Append = insert+change+change and each creates a signal
|
||||||
if ((iter == None) or (self.customplacestreemodel.get_value(iter, 1) != None)):
|
if ((iter == None) or (self.customplacestreemodel.get_value(iter, 1) != None)):
|
||||||
treeiter = self.customplacestreemodel.get_iter_first()
|
treeiter = self.customplacestreemodel.get_iter_first()
|
||||||
customplacenames = [ ]
|
customplacenames = [ ]
|
||||||
customplacepaths = [ ]
|
customplacepaths = [ ]
|
||||||
while( treeiter != None ):
|
while( treeiter != None ):
|
||||||
customplacenames = customplacenames + [ self.customplacestreemodel.get_value(treeiter, 0 ) ]
|
customplacenames = customplacenames + [ self.customplacestreemodel.get_value(treeiter, 0 ) ]
|
||||||
customplacepaths = customplacepaths + [ self.customplacestreemodel.get_value(treeiter, 1 ) ]
|
customplacepaths = customplacepaths + [ self.customplacestreemodel.get_value(treeiter, 1 ) ]
|
||||||
treeiter = self.customplacestreemodel.iter_next(treeiter)
|
treeiter = self.customplacestreemodel.iter_next(treeiter)
|
||||||
self.gconfPlaces.set( "list-string", "custom_paths", customplacepaths)
|
self.gconfPlaces.set( "list-string", "custom_paths", customplacepaths)
|
||||||
self.gconfPlaces.set( "list-string", "custom_names", customplacenames)
|
self.gconfPlaces.set( "list-string", "custom_names", customplacenames)
|
||||||
|
|
||||||
|
|
||||||
window = mintMenuConfig()
|
window = mintMenuConfig()
|
||||||
|
@ -252,12 +252,12 @@ class pluginclass( object ):
|
|||||||
#i18n
|
#i18n
|
||||||
self.wTree.get_widget("searchLabel").set_text("<span weight='bold'>" + _("Search:") + "</span>")
|
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("searchLabel").set_use_markup(True)
|
||||||
self.wTree.get_widget("label6").set_text("<span weight='bold'>" + _("Favorites") + "</span>")
|
self.wTree.get_widget("label6").set_text(_("Favorites"))
|
||||||
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("label3").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
|
self.numApps = 0
|
||||||
# These properties are NECESSARY to maintain consistency
|
# These properties are NECESSARY to maintain consistency
|
||||||
@ -266,7 +266,7 @@ class pluginclass( object ):
|
|||||||
self.window = self.wTree.get_widget( "mainWindow" )
|
self.window = self.wTree.get_widget( "mainWindow" )
|
||||||
|
|
||||||
# Set 'heading' property for plugin
|
# Set 'heading' property for plugin
|
||||||
self.heading = _("Applications")
|
self.heading = ""#_("Applications")
|
||||||
|
|
||||||
# This should be the first item added to the window in glade
|
# This should be the first item added to the window in glade
|
||||||
self.content_holder = self.wTree.get_widget( "Applications" )
|
self.content_holder = self.wTree.get_widget( "Applications" )
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
|
||||||
<!--*- mode: xml -*-->
|
|
||||||
<glade-interface>
|
<glade-interface>
|
||||||
|
<!-- interface-requires gtk+ 2.6 -->
|
||||||
|
<!-- interface-naming-policy toplevel-contextual -->
|
||||||
<widget class="GtkWindow" id="mainWindow">
|
<widget class="GtkWindow" id="mainWindow">
|
||||||
<signal name="destroy" handler="on_window1_destroy"/>
|
<signal name="destroy" handler="on_window1_destroy"/>
|
||||||
<child>
|
<child>
|
||||||
@ -11,15 +11,15 @@
|
|||||||
<widget class="GtkScrolledWindow" id="scrolledwindow2">
|
<widget class="GtkScrolledWindow" id="scrolledwindow2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
<property name="hscrollbar_policy">automatic</property>
|
||||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
<property name="vscrollbar_policy">automatic</property>
|
||||||
<signal name="drag_motion" handler="on_scrolledwindow_drag_motion"/>
|
<signal name="drag_motion" handler="on_scrolledwindow_drag_motion"/>
|
||||||
<signal name="drag_drop" handler="on_scrolledwindow_drag_drop"/>
|
<signal name="drag_drop" handler="on_scrolledwindow_drag_drop"/>
|
||||||
<signal name="drag_data_received" handler="on_scrolledwindow_drag_data_received"/>
|
<signal name="drag_data_received" handler="on_scrolledwindow_drag_data_received"/>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkViewport" id="viewport2">
|
<widget class="GtkViewport" id="viewport2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
<property name="shadow_type">none</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox1">
|
<widget class="GtkVBox" id="vbox1">
|
||||||
<property name="visible">True</property>
|
<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="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
<property name="spacing">2</property>
|
<property name="spacing">2</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkVButtonBox" id="editable_button_holder">
|
<widget class="GtkVButtonBox" id="editable_button_holder">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="layout_style">GTK_BUTTONBOX_START</property>
|
<property name="layout_style">start</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user