summaryrefslogtreecommitdiff
path: root/src/dialogs/Preferences.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
commit31804433d72460cbe0a39f9f8ea5e76058d84cda (patch)
tree2084a84c39f159c6aea254775dc0880d52579d45 /src/dialogs/Preferences.vala
parenta9898fb3f39c44a85876930ef6b2558052569ae6 (diff)
parentd443a3c2509889533ca812c163056bace396b586 (diff)
Update upstream source from tag 'upstream/0.32.1'
Update to upstream version '0.32.1' with Debian dir c460ad6e13d3c39eaa2d5399059385e64e6fba4c
Diffstat (limited to 'src/dialogs/Preferences.vala')
-rw-r--r--src/dialogs/Preferences.vala46
1 files changed, 24 insertions, 22 deletions
diff --git a/src/dialogs/Preferences.vala b/src/dialogs/Preferences.vala
index 17b16cf..efd9589 100644
--- a/src/dialogs/Preferences.vala
+++ b/src/dialogs/Preferences.vala
@@ -19,49 +19,49 @@ public class PreferencesDialog : Gtk.Dialog {
private static PreferencesDialog preferences_dialog;
[GtkChild]
- private Gtk.Switch switch_dark;
+ private unowned Gtk.Switch switch_dark;
[GtkChild]
- private Gtk.ComboBox photo_editor_combo;
+ private unowned Gtk.ComboBox photo_editor_combo;
[GtkChild]
- private Gtk.ComboBox raw_editor_combo;
+ private unowned Gtk.ComboBox raw_editor_combo;
private SortedList<AppInfo> external_raw_apps;
private SortedList<AppInfo> external_photo_apps;
[GtkChild]
- private Gtk.FileChooserButton library_dir_button;
+ private unowned Gtk.FileChooserButton library_dir_button;
[GtkChild]
- private Gtk.ComboBoxText dir_pattern_combo;
+ private unowned Gtk.ComboBoxText dir_pattern_combo;
[GtkChild]
- private Gtk.Entry dir_pattern_entry;
+ private unowned Gtk.Entry dir_pattern_entry;
[GtkChild]
- private Gtk.Label dir_pattern_example;
+ private unowned Gtk.Label dir_pattern_example;
private bool allow_closing = false;
private string? lib_dir = null;
private Gee.ArrayList<PathFormat> path_formats = new Gee.ArrayList<PathFormat>();
private GLib.DateTime example_date = new GLib.DateTime.local(2009, 3, 10, 18, 16, 11);
[GtkChild]
- private Gtk.CheckButton lowercase;
+ private unowned Gtk.CheckButton lowercase;
private Plugins.ManifestWidgetMediator plugins_mediator = new Plugins.ManifestWidgetMediator();
[GtkChild]
- private Gtk.ComboBoxText default_raw_developer_combo;
+ private unowned Gtk.ComboBoxText default_raw_developer_combo;
[GtkChild]
- private Gtk.CheckButton autoimport;
+ private unowned Gtk.CheckButton autoimport;
[GtkChild]
- private Gtk.CheckButton write_metadata;
+ private unowned Gtk.CheckButton write_metadata;
[GtkChild]
- private Gtk.Label pattern_help;
+ private unowned Gtk.Label pattern_help;
[GtkChild]
- private Gtk.Notebook preferences_notebook;
+ private unowned Gtk.Stack preferences_stack;
[GtkChild]
- private Gtk.RadioButton transparent_checker_radio;
+ private unowned Gtk.RadioButton transparent_checker_radio;
[GtkChild]
- private Gtk.RadioButton transparent_solid_radio;
+ private unowned Gtk.RadioButton transparent_solid_radio;
[GtkChild]
- private Gtk.ColorButton transparent_solid_color;
+ private unowned Gtk.ColorButton transparent_solid_color;
[GtkChild]
- private Gtk.RadioButton transparent_none_radio;
+ private unowned Gtk.RadioButton transparent_none_radio;
private PreferencesDialog() {
Object (use_header_bar: Resources.use_header_bar());
@@ -81,7 +81,7 @@ public class PreferencesDialog : Gtk.Dialog {
Gdk.RGBA color = Gdk.RGBA();
color.parse(Config.Facade.get_instance().get_transparent_background_color());
- (transparent_solid_color as Gtk.ColorChooser).rgba = color;
+ ((Gtk.ColorChooser) transparent_solid_color).rgba = color;
transparent_solid_color.color_set.connect(on_color_changed);
switch (Config.Facade.get_instance().get_transparent_background_type()) {
@@ -105,11 +105,11 @@ public class PreferencesDialog : Gtk.Dialog {
if (help_path == null) {
// We're installed system-wide, so use the system help.
- pattern_help.set_markup("<a href=\"" + Resources.DIR_PATTERN_URI_SYSWIDE + "\">" + _("(Help)") + "</a>");
+ pattern_help.set_markup("<a href=\"%s\">%s</a>".printf(Resources.DIR_PATTERN_URI_SYSWIDE, _("(Help)")));
} else {
// We're being run from the build directory; we'll have to handle clicks to this
// link manually ourselves, due to a limitation of help: URIs.
- pattern_help.set_markup("<a href=\"dummy:\">" + _("(Help)") + "</a>");
+ pattern_help.set_markup("<a href=\"dummy:\">%s</a>".printf(_("(Help)")));
pattern_help.activate_link.connect(on_local_pattern_help);
}
@@ -126,7 +126,9 @@ public class PreferencesDialog : Gtk.Dialog {
lowercase.toggled.connect(on_lowercase_toggled);
- (preferences_notebook.get_nth_page (2) as Gtk.Container).add (plugins_mediator);
+ ((Gtk.Box)preferences_stack.get_child_by_name("plugins")).add(plugins_mediator);
+ ((Gtk.Box)preferences_stack.get_child_by_name("profiles")).add(new Shotwell.ProfileBrowser());
+
populate_preference_options();
@@ -177,7 +179,7 @@ public class PreferencesDialog : Gtk.Dialog {
}
private void on_color_changed() {
- var color = (transparent_solid_color as Gtk.ColorChooser).rgba.to_string();
+ var color = ((Gtk.ColorChooser) transparent_solid_color).rgba.to_string();
Config.Facade.get_instance().set_transparent_background_color(color);
}