def choose_patch_path(self): path = "" dialog = gtk.FileChooserDialog(_("Create Patch"), None, gtk.FILE_CHOOSER_ACTION_SAVE, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK)) dialog.set_do_overwrite_confirmation(True) dialog.set_default_response(gtk.RESPONSE_OK) dialog.set_current_folder_uri( get_common_directory(self.paths).replace("file://", "")) response = dialog.run() if response == gtk.RESPONSE_OK: path = dialog.get_filename() dialog.destroy() return path
def choose_patch_path(self): path = "" dialog = Gtk.FileChooserDialog(title=_("Create Patch"), parent=None, action=Gtk.FileChooserAction.SAVE) dialog.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL) dialog.add_button(_("_Create"), Gtk.ResponseType.OK) dialog.set_do_overwrite_confirmation(True) dialog.set_default_response(Gtk.ResponseType.OK) dialog.set_current_folder_uri( helper.get_common_directory(self.paths).replace("file://", "")) response = dialog.run() if response == Gtk.ResponseType.OK: path = dialog.get_filename() dialog.destroy() return path
def choose_patch_path(self): path = "" dialog = gtk.FileChooserDialog( _("Create Patch"), None, gtk.FILE_CHOOSER_ACTION_SAVE,(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_SAVE, gtk.RESPONSE_OK)) dialog.set_do_overwrite_confirmation(True) dialog.set_default_response(gtk.RESPONSE_OK) dialog.set_current_folder_uri( get_common_directory(self.paths).replace("file://", "") ) response = dialog.run() if response == gtk.RESPONSE_OK: path = dialog.get_filename() dialog.destroy() return path
def choose_patch_path(self): path = "" dialog = Gtk.FileChooserDialog( title = _("Create Patch"), parent = None, action = Gtk.FileChooserAction.SAVE) dialog.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL) dialog.add_button(_("_Create"), Gtk.ResponseType.OK) dialog.set_do_overwrite_confirmation(True) dialog.set_default_response(Gtk.ResponseType.OK) dialog.set_current_folder_uri( helper.get_common_directory(self.paths).replace("file://", "") ) response = dialog.run() if response == Gtk.ResponseType.OK: path = dialog.get_filename() dialog.destroy() return path