From 9b6d3f48d205de9b5744c5448e9e784a526a406d Mon Sep 17 00:00:00 2001 From: Kang Kai Date: Wed, 30 May 2012 16:13:47 +0800 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/hig.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib/bb/ui') 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): def entry_widget_select_path_cb(self, action, parent, entry): dialog = gtk.FileChooserDialog("", parent, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) + text = entry.get_text() + dialog.set_current_folder(text if len(text) > 0 else os.getcwd()) button = dialog.add_button("Cancel", gtk.RESPONSE_NO) HobAltButton.style_button(button) button = dialog.add_button("Open", gtk.RESPONSE_YES) @@ -1180,6 +1182,8 @@ class ImageSelectionDialog (CrumbsDialog): def select_path_cb(self, action, parent, entry): dialog = gtk.FileChooserDialog("", parent, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) + text = entry.get_text() + dialog.set_current_folder(text if len(text) > 0 else os.getcwd()) button = dialog.add_button("Cancel", gtk.RESPONSE_NO) HobAltButton.style_button(button) button = dialog.add_button("Open", gtk.RESPONSE_YES) -- cgit v1.2.3-54-g00ecf