* [PATCH] hob2: set beginning folders for FileChooserDialog
@ 2012-05-30 8:13 Kang Kai
2012-05-30 16:19 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Kang Kai @ 2012-05-30 8:13 UTC (permalink / raw)
To: bitbake-devel
Set begining folders FileChooserDialog for the select images and
some local directory configurations. That may make user feel more
convenient.
Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
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 4baf960..38db466 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)
@@ -1092,6 +1094,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)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-30 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30 8:13 [PATCH] hob2: set beginning folders for FileChooserDialog Kang Kai
2012-05-30 16:19 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.