Usability improvements for custom places/cleanup

* Added folder browser button in new/edit place dialog
* Better layout of new/edit place dialogs
* No longer adds a place with blank properties
* Enter Button works in new/edit place dialogs
This commit is contained in:
clhodapp 2009-10-09 12:35:36 -05:00
parent 93e769ef92
commit 5870921679
3 changed files with 293 additions and 130 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-07-29 22:50+0200\n" "POT-Creation-Date: 2009-10-09 12:23-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -20,35 +20,35 @@ msgstr ""
msgid "Menu" msgid "Menu"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:265 #: usr/lib/linuxmint/mintMenu/mintMenu.py:266
msgid "Couldn't load plugin:" msgid "Couldn't load plugin:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:339 #: usr/lib/linuxmint/mintMenu/mintMenu.py:340
msgid "Couldn't initialize plugin" msgid "Couldn't initialize plugin"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:584 #: usr/lib/linuxmint/mintMenu/mintMenu.py:585
msgid "Preferences" msgid "Preferences"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:584 #: usr/lib/linuxmint/mintMenu/mintMenu.py:585
msgid "Edit menu" msgid "Edit menu"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:584 #: usr/lib/linuxmint/mintMenu/mintMenu.py:585
msgid "Reload plugins" msgid "Reload plugins"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:584 #: usr/lib/linuxmint/mintMenu/mintMenu.py:585
msgid "About" msgid "About"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:762 #: usr/lib/linuxmint/mintMenu/mintMenu.py:763
msgid "Advanced Gnome Menu" msgid "Advanced Gnome Menu"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenu.py:765 #: usr/lib/linuxmint/mintMenu/mintMenu.py:766
msgid "Based on USP from S.Chanderbally" msgid "Based on USP from S.Chanderbally"
msgstr "" msgstr ""
@ -60,10 +60,6 @@ msgstr ""
msgid "Application removed successfully" msgid "Application removed successfully"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintRemove.py:81
msgid "Remove application"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintRemove.py:94 #: usr/lib/linuxmint/mintMenu/mintRemove.py:94
msgid "No matching package found" msgid "No matching package found"
msgstr "" msgstr ""
@ -74,119 +70,173 @@ msgstr ""
#: usr/lib/linuxmint/mintMenu/mintRemove.py:113 #: usr/lib/linuxmint/mintMenu/mintRemove.py:113
#, python-format #, python-format
msgid "Remove package %s and all its dependencies?" msgid "Remove %s?"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintRemove.py:117 #: usr/lib/linuxmint/mintMenu/mintRemove.py:116
msgid "The following packages will be removed:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintRemove.py:119
msgid "Packages to be removed" msgid "Packages to be removed"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:42 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:41
msgid "Menu preferences" msgid "Menu preferences"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:45 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:44
msgid "Show sidepane" msgid "Show sidepane"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:46 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:45
msgid "Show button icon" msgid "Show button icon"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:47 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:46
msgid "Use custom colors" msgid "Use custom colors"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:48 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:47
msgid "Show recent documents" msgid "Show recent documents"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:50 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:49
msgid "Show application comments" msgid "Show application comments"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:51 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:50
msgid "Show category icons" msgid "Show category icons"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:52 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:51
msgid "Hover" msgid "Hover"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:53 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:52
msgid "Swap name and generic name" msgid "Swap name and generic name"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:55 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:54
msgid "Border width:" msgid "Border width:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:56 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:55
msgid "pixels" msgid "pixels"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:57 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:56
msgid "Button text:" msgid "Button text:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:58 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:57
msgid "Options" msgid "Options"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:59 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:58
#: usr/lib/linuxmint/mintMenu/plugins/applications.py:193 #: usr/lib/linuxmint/mintMenu/plugins/applications.py:193
msgid "Applications" msgid "Applications"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:61 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:60
msgid "Colors" msgid "Colors"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:62 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:61
#: usr/lib/linuxmint/mintMenu/plugins/applications.py:179 #: usr/lib/linuxmint/mintMenu/plugins/applications.py:179
#: usr/lib/linuxmint/mintMenu/plugins/applications.py:184 #: usr/lib/linuxmint/mintMenu/plugins/applications.py:184
msgid "Favorites" msgid "Favorites"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:63 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:62
msgid "Main button" msgid "Main button"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:65 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:64
msgid "Background:" msgid "Background:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:66 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:65
msgid "Headings:" msgid "Headings:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:67 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:66
msgid "Borders:" msgid "Borders:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:71 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:70
msgid "Number of columns:" msgid "Number of columns:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:71
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:72 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:72
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:73 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:73
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:74
msgid "Icon size:" msgid "Icon size:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:75 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:74
msgid "Hover delay (ms):" msgid "Hover delay (ms):"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:76 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:75
msgid "Button icon:" msgid "Button icon:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:77 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:76
msgid "Search command:" msgid "Search command:"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:78
#: usr/lib/linuxmint/mintMenu/plugins/places.py:40
msgid "Places"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:79 #: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:79
msgid "Height:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:80
msgid "Toggle Default Places:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:81
#: usr/lib/linuxmint/mintMenu/plugins/places.py:123
msgid "Computer"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:82
#: usr/lib/linuxmint/mintMenu/plugins/places.py:130
msgid "Home Folder"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:83
#: usr/lib/linuxmint/mintMenu/plugins/places.py:137
msgid "Network"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:84
#: usr/lib/linuxmint/mintMenu/plugins/places.py:157
msgid "Desktop"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:85
#: usr/lib/linuxmint/mintMenu/plugins/places.py:164
msgid "Trash"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:86
msgid "Custom Places:"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:88
msgid "Edit Place"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:89
msgid "New Place"
msgstr ""
#: usr/lib/linuxmint/mintMenu/mintMenuConfig.py:91
msgid "Keyboard shortcut:" msgid "Keyboard shortcut:"
msgstr "" msgstr ""
@ -293,99 +343,75 @@ msgstr ""
msgid "System" msgid "System"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:100 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:101
msgid "Software manager" msgid "Software manager"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:104 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:105
msgid "Browse and install available software" msgid "Browse and install available software"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:106 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:107
msgid "Package manager" msgid "Package manager"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:110 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:111
msgid "Install, remove and upgrade software packages" msgid "Install, remove and upgrade software packages"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:112 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:113
msgid "Control center" msgid "Control center"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:116 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:117
msgid "Configure your system" msgid "Configure your system"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:118 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:119
msgid "Terminal" msgid "Terminal"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:122 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:123
msgid "Use the command line" msgid "Use the command line"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:124 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:125
msgid "Logout" msgid "Logout"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:128 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:129
msgid "Log out or switch user" msgid "Log out or switch user"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:130 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:131
msgid "Quit" msgid "Quit"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/system_management.py:134 #: usr/lib/linuxmint/mintMenu/plugins/system_management.py:135
msgid "Shutdown, restart, suspend or hibernate" msgid "Shutdown, restart, suspend or hibernate"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:40 #: usr/lib/linuxmint/mintMenu/plugins/places.py:127
msgid "Places"
msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:104
msgid "Computer"
msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:108
msgid "" msgid ""
"Browse all local and remote disks and folders accessible from this computer" "Browse all local and remote disks and folders accessible from this computer"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:110 #: usr/lib/linuxmint/mintMenu/plugins/places.py:134
msgid "Home Folder"
msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:114
msgid "Open your personal folder" msgid "Open your personal folder"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:116 #: usr/lib/linuxmint/mintMenu/plugins/places.py:141
msgid "Network"
msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:120
msgid "Browse bookmarked and local network locations" msgid "Browse bookmarked and local network locations"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:135 #: usr/lib/linuxmint/mintMenu/plugins/places.py:161
msgid "Desktop"
msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:139
msgid "Browse items placed on the desktop" msgid "Browse items placed on the desktop"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:141 #: usr/lib/linuxmint/mintMenu/plugins/places.py:170
msgid "Trash"
msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:148
msgid "Browse deleted files" msgid "Browse deleted files"
msgstr "" msgstr ""
#: usr/lib/linuxmint/mintMenu/plugins/places.py:153 #: usr/lib/linuxmint/mintMenu/plugins/places.py:183
msgid "Empty trash" msgid "Empty trash"
msgstr "" msgstr ""

View File

@ -4,8 +4,8 @@
<!-- interface-naming-policy toplevel-contextual --> <!-- 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</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="window_position">center-always</property> <property name="window_position">center-on-parent</property>
<property name="icon">/usr/share/linuxmint/logo.png</property> <property name="destroy_with_parent">True</property>
<child> <child>
<widget class="GtkVBox" id="vbox1"> <widget class="GtkVBox" id="vbox1">
<property name="visible">True</property> <property name="visible">True</property>
@ -1206,8 +1206,9 @@
<property name="border_width">5</property> <property name="border_width">5</property>
<property name="title" translatable="yes">Edit Place</property> <property name="title" translatable="yes">Edit Place</property>
<property name="modal">True</property> <property name="modal">True</property>
<property name="icon">/usr/lib/linuxmint/mintSystem/icon.png</property> <property name="window_position">center-on-parent</property>
<property name="type_hint">normal</property> <property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<property name="has_separator">False</property> <property name="has_separator">False</property>
<child internal-child="vbox"> <child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox2"> <widget class="GtkVBox" id="dialog-vbox2">
@ -1219,28 +1220,19 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">2</property> <property name="n_rows">2</property>
<property name="n_columns">2</property> <property name="n_columns">2</property>
<property name="column_spacing">2</property>
<property name="row_spacing">5</property>
<child> <child>
<widget class="GtkEntry" id="nameEntryBox"> <widget class="GtkEntry" id="nameEntryBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property> <property name="invisible_char">&#x25CF;</property>
<property name="activates_default">True</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
</packing> <property name="y_options">GTK_EXPAND</property>
</child>
<child>
<widget class="GtkEntry" id="pathEntryBox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</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> </packing>
</child> </child>
<child> <child>
@ -1251,6 +1243,7 @@
<packing> <packing>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
<property name="y_options">GTK_EXPAND</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -1258,6 +1251,50 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Name:</property> <property name="label" translatable="yes">Name:</property>
</widget> </widget>
<packing>
<property name="y_options">GTK_EXPAND</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<child>
<widget class="GtkEntry" id="pathEntryBox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">&#x25CF;</property>
<property name="activates_default">True</property>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="folderButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<widget class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-directory</property>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</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>
<property name="y_options"></property>
</packing>
</child> </child>
</widget> </widget>
<packing> <packing>
@ -1271,9 +1308,10 @@
<child> <child>
<widget class="GtkButton" id="okButton"> <widget class="GtkButton" id="okButton">
<property name="label" translatable="yes">gtk-ok</property> <property name="label" translatable="yes">gtk-ok</property>
<property name="response_id">1</property> <property name="response_id">-5</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="can_default">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
</widget> </widget>
@ -1286,8 +1324,71 @@
<child> <child>
<widget class="GtkButton" id="cancelButton"> <widget class="GtkButton" id="cancelButton">
<property name="label" translatable="yes">gtk-cancel</property> <property name="label" translatable="yes">gtk-cancel</property>
<property name="response_id">-6</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="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</child>
</widget>
<widget class="GtkFileChooserDialog" id="fileChooserDialog">
<property name="border_width">5</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<property name="action">select-folder</property>
<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/>
</child>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<widget class="GtkButton" id="button1">
<property name="label" translatable="yes">gtk-ok</property>
<property name="response_id">-5</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button2">
<property name="label" translatable="yes">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
</widget> </widget>

View File

@ -36,13 +36,11 @@ class mintMenuConfig( object ):
# 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" )
editTree = gtk.glade.XML( gladefile, "editPlaceDialog" ) self.mainWindow=wTree.get_widget("mainWindow")
#i18n #i18n
wTree.get_widget("mainWindow").set_title(_("Menu preferences")) self.mainWindow.set_title(_("Menu preferences"))
wTree.get_widget("mainWindow").set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg") self.mainWindow.set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg")
editTree.get_widget("editPlaceDialog").set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg")
wTree.get_widget("showSidepane").set_label(_("Show sidepane")) 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"))
@ -125,9 +123,6 @@ class mintMenuConfig( object ):
self.trashtoggle = wTree.get_widget( "trashcheckbutton" ) self.trashtoggle = wTree.get_widget( "trashcheckbutton" )
self.customplacestree = wTree.get_widget( "customplacestree" ) self.customplacestree = wTree.get_widget( "customplacestree" )
self.placesHeightBox = wTree.get_widget( "placesHeightSpinBox" ) self.placesHeightBox = wTree.get_widget( "placesHeightSpinBox" )
self.editPlaceDialog = editTree.get_widget( "editPlaceDialog" )
self.editPlaceName = editTree.get_widget( "nameEntryBox" )
self.editPlacePath = editTree.get_widget( "pathEntryBox" )
wTree.get_widget( "closeButton" ).connect("clicked", gtk.main_quit ) wTree.get_widget( "closeButton" ).connect("clicked", gtk.main_quit )
@ -189,7 +184,7 @@ class mintMenuConfig( object ):
wTree.get_widget("downButton").connect("clicked", self.moveDown) wTree.get_widget("downButton").connect("clicked", self.moveDown)
wTree.get_widget("removeButton").connect("clicked", self.removePlace) wTree.get_widget("removeButton").connect("clicked", self.removePlace)
wTree.get_widget( "mainWindow" ).present() self.mainWindow.present()
self.getBackgroundColor() self.getBackgroundColor()
@ -278,19 +273,50 @@ class mintMenuConfig( object ):
return return
def newPlace(self, newButton): def newPlace(self, newButton):
self.editPlaceDialog.set_title(self.newPlaceDialogTitle) gladefile = os.path.join( self.path, "mintMenuConfig.glade" )
self.editPlaceName.set_text("") wTree = gtk.glade.XML( gladefile, "editPlaceDialog" )
self.editPlacePath.set_text("") folderChooserTree = gtk.glade.XML( gladefile, "fileChooserDialog" )
response = self.editPlaceDialog.run() newPlaceDialog = wTree.get_widget( "editPlaceDialog" )
self.editPlaceDialog.hide() folderChooserDialog = folderChooserTree.get_widget( "fileChooserDialog" )
if (response == 1 ): newPlaceDialog.set_transient_for(self.mainWindow)
name = self.editPlaceName.get_text() newPlaceDialog.set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg")
path = self.editPlacePath.get_text() newPlaceDialog.set_title(self.newPlaceDialogTitle)
self.customplacestreemodel.append( (name, path) ) newPlaceDialog.set_default_response(gtk.RESPONSE_OK)
self.updatePlacesGconf() newPlaceName = wTree.get_widget( "nameEntryBox" )
newPlacePath = wTree.get_widget( "pathEntryBox" )
folderButton = wTree.get_widget( "folderButton" )
def chooseFolder(folderButton):
currentPath = newPlacePath.get_text()
if (currentPath!=""):
folderChooserDialog.select_filename(currentPath)
response = folderChooserDialog.run()
folderChooserDialog.hide()
if (response == gtk.RESPONSE_OK):
newPlacePath.set_text( folderChooserDialog.get_filenames()[0] )
folderButton.connect("clicked", chooseFolder)
response = newPlaceDialog.run()
newPlaceDialog.hide()
if (response == gtk.RESPONSE_OK ):
name = newPlaceName.get_text()
path = newPlacePath.get_text()
if (name != "" and path !=""):
self.customplacestreemodel.append( (name, path) )
self.updatePlacesGconf()
def editPlace(self, editButton): def editPlace(self, editButton):
self.editPlaceDialog.set_title(self.editPlaceDialogTitle) gladefile = os.path.join( self.path, "mintMenuConfig.glade" )
wTree = gtk.glade.XML( gladefile, "editPlaceDialog" )
folderChooserTree = gtk.glade.XML( gladefile, "fileChooserDialog" )
editPlaceDialog = wTree.get_widget( "editPlaceDialog" )
folderChooserDialog = folderChooserTree.get_widget( "fileChooserDialog" )
editPlaceDialog.set_transient_for(self.mainWindow)
editPlaceDialog.set_icon_from_file("/usr/lib/linuxmint/mintMenu/icon.svg")
editPlaceDialog.set_title(self.editPlaceDialogTitle)
editPlaceDialog.set_default_response(gtk.RESPONSE_OK)
editPlaceName = wTree.get_widget( "nameEntryBox" )
editPlacePath = wTree.get_widget( "pathEntryBox" )
folderButton = wTree.get_widget( "folderButton" )
treeselection = self.customplacestree.get_selection() treeselection = self.customplacestree.get_selection()
currentiter = (treeselection.get_selected())[1] currentiter = (treeselection.get_selected())[1]
@ -299,16 +325,26 @@ class mintMenuConfig( object ):
initName = self.customplacestreemodel.get_value(currentiter, 0) initName = self.customplacestreemodel.get_value(currentiter, 0)
initPath = self.customplacestreemodel.get_value(currentiter, 1) initPath = self.customplacestreemodel.get_value(currentiter, 1)
self.editPlaceName.set_text(initName) editPlaceName.set_text(initName)
self.editPlacePath.set_text(initPath) editPlacePath.set_text(initPath)
response = self.editPlaceDialog.run() def chooseFolder(folderButton):
self.editPlaceDialog.hide() currentPath = editPlacePath.get_text()
if (response == 1 ): if (currentPath!=""):
name = self.editPlaceName.get_text() folderChooserDialog.select_filename(currentPath)
path = self.editPlacePath.get_text() response = folderChooserDialog.run()
self.customplacestreemodel.set_value(currentiter, 0, name) folderChooserDialog.hide()
self.customplacestreemodel.set_value(currentiter, 1, path) if (response == gtk.RESPONSE_OK):
self.updatePlacesGconf() editPlacePath.set_text( folderChooserDialog.get_filenames()[0] )
folderButton.connect("clicked", chooseFolder)
response = editPlaceDialog.run()
editPlaceDialog.hide()
if (response == gtk.RESPONSE_OK):
name = editPlaceName.get_text()
path = editPlacePath.get_text()
if (name != "" and path != ""):
self.customplacestreemodel.set_value(currentiter, 0, name)
self.customplacestreemodel.set_value(currentiter, 1, path)
self.updatePlacesGconf()
def moveDown(self, downButton): def moveDown(self, downButton):