summaryrefslogtreecommitdiff
path: root/src/dialogs/Preferences.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-28 21:35:52 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-28 21:35:52 +0200
commitb86540b743f1a87a163ffb811c8fe22a01fefa38 (patch)
treeb47cb3bb83c2377234226fb3987ab3320a987dd9 /src/dialogs/Preferences.vala
parentac6e0b731b9f0b2efd392e3309a5c07e2a66adad (diff)
parente905d8e16eec152d19797937f13ba3cf4b8f8aca (diff)
Merge branch 'release/debian/0.32.1-1'debian/0.32.1-1
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);
}