diff options
author | Julien Valroff <julien@kirya.net> | 2011-10-02 07:08:31 +0200 |
---|---|---|
committer | Julien Valroff <julien@kirya.net> | 2011-10-02 07:08:31 +0200 |
commit | da2cce92a7eed706d04d6cbe778fd1bf32f18eeb (patch) | |
tree | 046d586f82a8fc8f960c32eb3ff4e0814efd21ad /rapid/preferencesdialog.py | |
parent | 4cfe0196b5ac9147560b8d3730aec9a1c615c67e (diff) |
Imported Upstream version 0.4.2upstream/0.4.2
Diffstat (limited to 'rapid/preferencesdialog.py')
-rw-r--r-- | rapid/preferencesdialog.py | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/rapid/preferencesdialog.py b/rapid/preferencesdialog.py index ea66c8d..1509630 100644 --- a/rapid/preferencesdialog.py +++ b/rapid/preferencesdialog.py @@ -435,8 +435,8 @@ class RemoveAllJobCodeDialog(QuestionDialog): class RemoveAllRemeberedDevicesDialog(QuestionDialog): def __init__(self, parent_window, post_choice_callback): QuestionDialog.__init__(self, parent_window, - _('Remove all Remembered Devices?'), - _('Should all remembered devices be removed?'), + _('Remove all Remembered Paths?'), + _('Should all remembered paths be removed?'), post_choice_callback) class RemoveAllIgnoredPathsDialog(QuestionDialog): @@ -972,6 +972,10 @@ class PreferencesDialog(): self.prefs.backup_location = widget.get_current_folder() self.update_backup_example() + def on_backup_video_folder_filechooser_button_selection_changed(self, widget): + self.prefs.backup_video_location = widget.get_current_folder() + self.update_backup_example() + def on_device_location_filechooser_button_selection_changed(self, widget): self.prefs.device_location = widget.get_current_folder() @@ -1337,8 +1341,12 @@ class PreferencesDialog(): def _setup_backup_tab(self): + """ + Setup and configure backup tab + """ + #Manual backup location for photos file chooser self.backup_folder_filechooser_button = gtk.FileChooserButton( - _("Select a folder in which to backup %(file_types)s") % {'file_types':self.file_types}) + _("Select a folder in which to backup photos")) self.backup_folder_filechooser_button.set_current_folder( self.prefs.backup_location) self.backup_folder_filechooser_button.set_action( @@ -1348,6 +1356,20 @@ class PreferencesDialog(): self.backup_table.attach(self.backup_folder_filechooser_button, 3, 4, 8, 9, yoptions = gtk.SHRINK) self.backup_folder_filechooser_button.show() + + #Manual backup location for videos file chooser + self.backup_video_folder_filechooser_button = gtk.FileChooserButton( + _("Select a folder in which to backup videos")) + self.backup_video_folder_filechooser_button.set_current_folder( + self.prefs.backup_video_location) + self.backup_video_folder_filechooser_button.set_action( + gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) + self.backup_video_folder_filechooser_button.connect("selection-changed", + self.on_backup_video_folder_filechooser_button_selection_changed) + self.backup_table.attach(self.backup_video_folder_filechooser_button, + 3, 4, 9, 10, yoptions = gtk.SHRINK) + self.backup_video_folder_filechooser_button.show() + self.backup_identifier_entry.set_text(self.prefs.backup_identifier) self.video_backup_identifier_entry.set_text(self.prefs.video_backup_identifier) @@ -1361,6 +1383,14 @@ class PreferencesDialog(): self._backup_controls2 = [self.backup_location_label, self.backup_folder_filechooser_button, self.backup_location_explanation_label] + + if metadatavideo.DOWNLOAD_VIDEO: + self._backup_controls2 += [self.backup_video_folder_filechooser_button, + self.backup_video_location_label] + else: + self.backup_video_folder_filechooser_button.set_sensitive(False) + self.backup_video_location_label.set_sensitive(False) + self._backup_controls = self._backup_controls0 + self._backup_controls1 + \ self._backup_controls2 |