Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hginit: use native folder select dialog

Changeset d7f160dd1dad

Parent 4eb7b70b162a

by Steve Borho

Changes to one file · Browse files at d7f160dd1dad Showing diff from parent 4eb7b70b162a Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​hginit.py Stacked
 
100
101
102
103
104
105
106
107
108
109
110
111
 
 
 
 
 
112
113
114
115
116
 
100
101
102
 
 
 
 
 
 
 
 
 
103
104
105
106
107
108
 
109
110
111
@@ -100,17 +100,12 @@
    def _btn_dest_clicked(self, button):   """ select source folder to clone """ - dlg = gtk.FileChooserDialog(title=None, - action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, - buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN,gtk.RESPONSE_OK)) - dlg.set_default_response(gtk.RESPONSE_OK) - dlg.set_current_folder(self.cwd) - response = dlg.run() - if response == gtk.RESPONSE_OK: - self._dest_input.set_text(dlg.get_filename()) + response = gtklib.NativeFolderSelectDialog( + initial=self.cwd, + title='Select Destination Folder').run() + if response: + self._dest_input.set_text(response)   self._dest_input.set_position(-1) - dlg.destroy()     def _btn_init_clicked(self, toolbutton, data=None):   # gather input data