diff options
author | Kang Kai <kai.kang@windriver.com> | 2012-05-30 16:13:47 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 17:23:29 +0100 |
commit | 9b6d3f48d205de9b5744c5448e9e784a526a406d (patch) | |
tree | 2a867e6bc8ada38997cb0e5f70eac5ed212a8b5f /bitbake | |
parent | 0d9e89371158c4c329eebab3bc6609250b4c86c0 (diff) | |
download | poky-9b6d3f48d205de9b5744c5448e9e784a526a406d.tar.gz |
hob2: set beginning folders for FileChooserDialog
Set begining folders FileChooserDialog for the select images and
some local directory configurations. That may make user feel more
convenient.
(Bitbake rev: 047ad35c0c869883509557aeb982e0b784ad2e71)
Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index 38f890b9f1..42e88338bb 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/lib/bb/ui/crumbs/hig.py | |||
@@ -137,6 +137,8 @@ class AdvancedSettingDialog (CrumbsDialog): | |||
137 | def entry_widget_select_path_cb(self, action, parent, entry): | 137 | def entry_widget_select_path_cb(self, action, parent, entry): |
138 | dialog = gtk.FileChooserDialog("", parent, | 138 | dialog = gtk.FileChooserDialog("", parent, |
139 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) | 139 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) |
140 | text = entry.get_text() | ||
141 | dialog.set_current_folder(text if len(text) > 0 else os.getcwd()) | ||
140 | button = dialog.add_button("Cancel", gtk.RESPONSE_NO) | 142 | button = dialog.add_button("Cancel", gtk.RESPONSE_NO) |
141 | HobAltButton.style_button(button) | 143 | HobAltButton.style_button(button) |
142 | button = dialog.add_button("Open", gtk.RESPONSE_YES) | 144 | button = dialog.add_button("Open", gtk.RESPONSE_YES) |
@@ -1180,6 +1182,8 @@ class ImageSelectionDialog (CrumbsDialog): | |||
1180 | def select_path_cb(self, action, parent, entry): | 1182 | def select_path_cb(self, action, parent, entry): |
1181 | dialog = gtk.FileChooserDialog("", parent, | 1183 | dialog = gtk.FileChooserDialog("", parent, |
1182 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) | 1184 | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) |
1185 | text = entry.get_text() | ||
1186 | dialog.set_current_folder(text if len(text) > 0 else os.getcwd()) | ||
1183 | button = dialog.add_button("Cancel", gtk.RESPONSE_NO) | 1187 | button = dialog.add_button("Cancel", gtk.RESPONSE_NO) |
1184 | HobAltButton.style_button(button) | 1188 | HobAltButton.style_button(button) |
1185 | button = dialog.add_button("Open", gtk.RESPONSE_YES) | 1189 | button = dialog.add_button("Open", gtk.RESPONSE_YES) |