def __init__(self, value_dict=None): gtk.VBox.__init__(self) box, self.name_entry = dialogs.box_add( self, [(gtk.Entry(), True, None)], 'Collection Name: ') self.path_entry = dialogs.PathnameEntry( '', 'Path to Images: ', 'Choose a Directory', directory=True) self.pack_start(self.path_entry, False) self.name_entry.connect("changed", self.name_changed) self.path_entry.path_entry.connect("changed", self.path_changed) self.a_frame = gtk.Expander("Advanced Options") self.a_box = gtk.VBox() self.a_frame.add(self.a_box) self.recursive_button = gtk.CheckButton("Include sub-directories") self.recursive_button.set_active(True) self.rescan_check = gtk.CheckButton("Rescan for changes after opening") self.rescan_check.set_active(True) self.load_meta_check = gtk.CheckButton("Load metadata") self.load_meta_check.set_active(True) self.monitor_images_check = gtk.CheckButton( "Monitor image folders for changes") self.monitor_images_check.set_active(True) self.use_internal_thumbnails_check = gtk.CheckButton( "Use embedded thumbnails if available") self.use_internal_thumbnails_check.set_active(False) self.store_thumbs_combo = wb.LabeledComboBox("Thumbnail storage", [ "Gnome Desktop Thumbnail Cache (User's Home)", "Hidden Folder in Collection Folder"]) if settings.is_windows: self.store_thumbs_combo.set_sensitive(False) self.store_thumbs_combo.set_form_data(1) else: self.store_thumbs_combo.set_form_data(0) self.trash_location_combo = wb.LabeledComboBox("Trash Location", [ "User's Trash Folder", "Hidden .trash Folder in Collection Folder"]) self.trash_location_combo.set_form_data(0) self.store_thumbnails_check = gtk.CheckButton( "Store thumbnails in cache") self.store_thumbnails_check.set_active(True) self.store_thumbnails_check.connect( "clicked", self.store_thumbnails_clicked) self.sidecar_check = gtk.CheckButton( "Use metadata sidecars for unsupported formats") self.sidecar_check.set_active(False) self.a_box.pack_start(self.recursive_button, False) self.a_box.pack_start(self.rescan_check, False) self.a_box.pack_start(self.monitor_images_check, False) self.a_box.pack_start(self.load_meta_check, False) self.a_box.pack_start(self.sidecar_check, False) self.a_box.pack_start(self.use_internal_thumbnails_check, False) self.a_box.pack_start(self.store_thumbnails_check, False) self.a_box.pack_start(self.store_thumbs_combo, False) self.a_box.pack_start(self.trash_location_combo, False) self.pack_start(self.a_frame, False) self.show_all() if value_dict: self.set_values(value_dict)
def __init__(self, main_dialog, value_dict): gtk.VBox.__init__(self) self.main_dialog = main_dialog label = gtk.Label() label.set_markup("<b>Webalbums Settings</b>") self.pack_start(label, False) box, self.name_entry = dialogs.box_add(self, [(gtk.Entry(), True, None)],'Theme Name: ') self.name_entry.connect("changed", self.name_changed) self.show_all() if value_dict: self.set_values(value_dict)
def __init__(self, main_dialog, value_dict): gtk.VBox.__init__(self) self.main_dialog = main_dialog label = gtk.Label() label.set_markup("<b>Webalbums Settings</b>") self.pack_start(label, False) box, self.name_entry = dialogs.box_add(self, [(gtk.Entry(), True, None)], 'Theme Name: ') self.name_entry.connect("changed", self.name_changed) self.show_all() if value_dict: self.set_values(value_dict)
def __init__(self, main_dialog, value_dict): gtk.VBox.__init__(self) self.main_dialog = main_dialog label = gtk.Label() label.set_markup("<b>Local Store Settings</b>") self.pack_start(label, False) box, self.name_entry = dialogs.box_add(self, [(gtk.Entry(), True, None)], 'Collection Name: ') self.path_entry = dialogs.PathnameEntry('', 'Path to Images: ', 'Choose a Directory', directory=True) self.pack_start(self.path_entry, False) self.name_entry.connect("changed", self.name_changed) self.path_entry.path_entry.connect("changed", self.path_changed) self.a_frame = gtk.Expander("Advanced Options") self.a_box = gtk.VBox() self.a_frame.add(self.a_box) self.recursive_button = gtk.CheckButton('Include sub-directories') self.recursive_button.set_active(True) self.rescan_check = gtk.CheckButton("Rescan for changes after opening") self.rescan_check.set_active(True) self.load_meta_check = gtk.CheckButton("Load image metadata") self.load_meta_check.set_active(True) self.use_internal_thumbnails_check = gtk.CheckButton( "Use embedded thumbnails if available") self.use_internal_thumbnails_check.set_active(False) self.store_thumbs_combo = wb.LabeledComboBox("Thumbnail storage", [ "Gnome Desktop Thumbnail Cache (User's Home)", "Hidden Folder in Collection Folder" ]) if settings.is_windows: self.store_thumbs_combo.set_sensitive(False) self.store_thumbs_combo.set_form_data(1) else: self.store_thumbs_combo.set_form_data(0) self.store_thumbnails_check = gtk.CheckButton( "Store thumbnails in cache") #todo: need to implement in backend self.store_thumbnails_check.set_active(True) self.store_thumbnails_check.connect("clicked", self.store_thumbnails_clicked) self.monitor_images_check = gtk.CheckButton( "Monitor image folders for changes" ) #todo: need to implement in backend self.monitor_images_check.set_active(True) self.trash_location_combo = wb.LabeledComboBox("Trash Location", [ "User's Trash Folder", "Hidden .trash Folder in Collection Folder" ]) self.trash_location_combo.set_form_data(0) self.sidecar_check = gtk.CheckButton( "Use metadata sidecars for unsupported formats" ) #todo: need to implement in backend self.sidecar_check.set_active(False) self.a_box.pack_start(self.recursive_button, False) self.a_box.pack_start(self.rescan_check, False) self.a_box.pack_start(self.monitor_images_check, False) self.a_box.pack_start(self.load_meta_check, False) self.a_box.pack_start(self.sidecar_check, False) self.a_box.pack_start(self.use_internal_thumbnails_check, False) self.a_box.pack_start(self.store_thumbnails_check, False) self.a_box.pack_start(self.store_thumbs_combo, False) self.a_box.pack_start(self.trash_location_combo, False) self.pack_start(self.a_frame, False) self.show_all() # self.main_dialog.create_button.set_sensitive(False) if value_dict: self.set_values(value_dict)