Transparent menu (new opacity setting)

This commit is contained in:
Clement Lefebvre 2010-03-16 14:56:55 +00:00
parent edd91d8d02
commit 6e018b34ef
4 changed files with 123 additions and 62 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-24 10:56+0000\n"
"POT-Creation-Date: 2010-03-16 14:53+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -20,35 +20,35 @@ msgstr ""
msgid "Menu"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:271
#: usr/lib/linuxmint/mintMenu/mintMenu.py:283
msgid "Couldn't load plugin:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:345
#: usr/lib/linuxmint/mintMenu/mintMenu.py:357
msgid "Couldn't initialize plugin"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:595
#: usr/lib/linuxmint/mintMenu/mintMenu.py:607
msgid "Preferences"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:595
#: usr/lib/linuxmint/mintMenu/mintMenu.py:607
msgid "Edit menu"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:595
#: usr/lib/linuxmint/mintMenu/mintMenu.py:607
msgid "Reload plugins"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:595
#: usr/lib/linuxmint/mintMenu/mintMenu.py:607
msgid "About"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:785
#: usr/lib/linuxmint/mintMenu/mintMenu.py:797
msgid "Advanced Gnome Menu"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:788
#: usr/lib/linuxmint/mintMenu/mintMenu.py:800
msgid "Based on USP from S.Chanderbally"
msgstr ""
@ -129,189 +129,193 @@ msgstr ""
msgid "pixels"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:58
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:59
msgid "Opacity:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:62
msgid "Button text:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:59
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:63
msgid "Options"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:60
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:64
#: usr/lib/linuxmint/mintMenu/plugins/applications.py:243
msgid "Applications"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:62
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:66
msgid "Colors"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:63
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:67
#: usr/lib/linuxmint/mintMenu/plugins/applications.py:229
#: usr/lib/linuxmint/mintMenu/plugins/applications.py:234
msgid "Favorites"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:64
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:68
msgid "Main button"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:66
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:70
msgid "Background:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:67
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:71
msgid "Headings:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:68
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:72
msgid "Borders:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:72
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:76
msgid "Number of columns:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:73
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:74
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:75
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:77
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:78
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:79
msgid "Icon size:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:76
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:80
msgid "Hover delay (ms):"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:77
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:81
msgid "Button icon:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:78
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:82
msgid "Search command:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:80
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:84
#: usr/lib/linuxmint/mintMenu/plugins/places.py:40
msgid "Places"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:81
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:92
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:85
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:96
msgid "Allow Scrollbar"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:82
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:93
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:86
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:97
msgid "Height:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:83
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:87
msgid "Toggle Default Places:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:84
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:88
#: usr/lib/linuxmint/mintMenu/plugins/places.py:144
msgid "Computer"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:85
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:89
#: usr/lib/linuxmint/mintMenu/plugins/places.py:151
msgid "Home Folder"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:86
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:90
#: usr/lib/linuxmint/mintMenu/plugins/places.py:158
msgid "Network"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:87
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:91
#: usr/lib/linuxmint/mintMenu/plugins/places.py:178
msgid "Desktop"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:88
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:92
#: usr/lib/linuxmint/mintMenu/plugins/places.py:185
msgid "Trash"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:89
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:93
msgid "Custom Places:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:91
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:95
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:38
msgid "System"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:94
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:98
msgid "Toggle Default Items:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:95
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:99
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:134
msgid "Software Manager"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:96
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:100
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:141
msgid "Package Manager"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:97
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:101
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:148
msgid "Control Center"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:98
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:102
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:155
msgid "Terminal"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:99
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:103
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:162
msgid "Lock Screen"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:100
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:104
msgid "Log Out"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:101
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:105
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:176
msgid "Quit"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:103
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:107
msgid "Edit Place"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:104
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:108
msgid "New Place"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:105
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:109
msgid "Select a folder"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:107
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:111
msgid "Keyboard shortcut:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:231
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:237
msgid "Name"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:232
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:238
msgid "Path"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:331
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:365
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:337
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:371
msgid "Name:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:332
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:366
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:338
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:372
msgid "Path:"
msgstr ""

View File

@ -101,6 +101,7 @@ class MainWindow( object ):
self.getSetGconfEntries()
self.SetupMintMenuBorder()
self.SetupMintMenuOpacity()
self.tooltips = gtk.Tooltips()
if self.globalEnableTooltips and self.enableTooltips:
@ -123,6 +124,7 @@ class MainWindow( object ):
self.gconf.notifyAdd( "custom_heading_color", self.toggleCustomHeadingColor )
self.gconf.notifyAdd( "custom_color", self.toggleCustomBackgroundColor )
self.gconf.notifyAdd( "border_width", self.toggleBorderWidth )
self.gconf.notifyAdd( "opacity", self.toggleOpacity )
def quit_cb (self):
gtk.main_quit()
@ -159,6 +161,10 @@ class MainWindow( object ):
self.borderwidth = entry.get_value().get_int()
self.SetupMintMenuBorder()
def toggleOpacity( self, client, connection_id, entry, args ):
self.opacity = entry.get_value().get_int()
self.SetupMintMenuOpacity()
def toggleUseCustomColor( self, client, connection_id, entry, args ):
self.usecustomcolor = entry.get_value().get_bool()
self.SetupMintMenuBorder()
@ -189,6 +195,7 @@ class MainWindow( object ):
self.custombordercolor = self.gconf.get( "color", "custom_border_color", "#001155" )
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 )
@ -222,6 +229,11 @@ class MainWindow( object ):
else:
self.sidepane.show()
def SetupMintMenuOpacity( self ):
print "Opacity is: " + str(self.opacity)
opacity = float(self.opacity) / float(100)
print "Setting opacity to: " + str(opacity)
self.window.set_opacity(opacity)
def PopulatePlugins( self ):
self.panesToColor = [ ]

View File

@ -270,17 +270,27 @@
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox5">
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="spacing">5</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="row_spacing">8</property>
<child>
<widget class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Border width:</property>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Opacity:</property>
</widget>
<packing>
<property name="position">0</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
@ -293,7 +303,36 @@
<property name="climb_rate">1</property>
</widget>
<packing>
<property name="position">1</property>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="opacity">
<property name="visible">True</property>
<property name="can_focus">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="invisible_char">&#x25CF;</property>
<property name="adjustment">0 0 100 1 0 0</property>
<property name="climb_rate">1</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="label" translatable="yes">%</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
@ -302,13 +341,13 @@
<property name="label" translatable="yes">px</property>
</widget>
<packing>
<property name="position">2</property>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>

View File

@ -55,6 +55,10 @@ class mintMenuConfig( object ):
wTree.get_widget("label11").set_text(_("Border width:"))
wTree.get_widget("label2").set_text(_("pixels"))
wTree.get_widget("label8").set_text(_("Opacity:"))
wTree.get_widget("label9").set_text("%")
wTree.get_widget("buttonTextLabel").set_text(_("Button text:"))
wTree.get_widget("label1").set_text(_("Options"))
wTree.get_widget("label23").set_text(_("Applications"))
@ -119,6 +123,7 @@ class mintMenuConfig( object ):
self.favIconSize = wTree.get_widget( "favIconSize" )
self.favCols = wTree.get_widget( "numFavCols" )
self.borderWidth = wTree.get_widget( "borderWidth" )
self.opacity = wTree.get_widget( "opacity" )
self.useCustomColors = wTree.get_widget( "useCustomColors" )
self.backgroundColor = wTree.get_widget( "backgroundColor" )
self.borderColor = wTree.get_widget( "borderColor" )
@ -184,6 +189,7 @@ class mintMenuConfig( object ):
self.bindGconfValueToWidget( self.gconfApplications, "int", "fav_cols", self.favCols, "value-changed", self.favCols.set_value, self.favCols.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.gconf, "int", "opacity", self.opacity, "value-changed", self.opacity.set_value, self.opacity.get_value_as_int )
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, "color", "custom_heading_color", self.headingColor, "color-set", self.headingColor.set_color, self.getHeadingColor )