Exemplo n.º 1
0
 def _browse_folder(self, p):
     file_chooser = DirectoryChooserDialog(_("Select Scripts Directory"))
     response = file_chooser.run()
     dirname = file_chooser.get_filename()
     file_chooser.destroy()
     if not response == gtk.RESPONSE_OK:
         return False
     self.entry.set_text(dirname)
    def _select_saveto(self, event):
        """
        Select directory to save file.
        """
        dir_chooser = DirectoryChooserDialog(_("Select a directory"))

        dir_chooser.run()
        dir_chosen = dir_chooser.get_filename()
        dir_chooser.destroy()
        self.setting_saveto_entry.set_text(dir_chosen)
Exemplo n.º 3
0
    def _select_saveto(self, event):
        """
        Select directory to save file.
        """
        dir_chooser = DirectoryChooserDialog(_("Select a directory"))

        dir_chooser.run()
        dir_chosen = dir_chooser.get_filename()
        dir_chooser.destroy()
        self.setting_saveto_entry.set_text(dir_chosen)
Exemplo n.º 4
0
 def open_dialog(self, widget):
     dialog = DirectoryChooserDialog(title=_("Choose the path to search in"))
     dialog.run()
     self.path = dialog.get_filename()
     self.entry.grab_focus()
     dialog.destroy()