[cheese/wip/hans-fixes: 30/35] cheese: Move reading of widemode setting to cheese-main
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/wip/hans-fixes: 30/35] cheese: Move reading of widemode setting to cheese-main
- Date: Fri, 14 Jun 2013 22:26:12 +0000 (UTC)
commit 83a9541aa1ef3cf5cb9571244bf92673a98c9b31
Author: Hans de Goede <hdegoede redhat com>
Date: Thu Jun 13 09:48:11 2013 +0200
cheese: Move reading of widemode setting to cheese-main
So that the actiontoggle's state always properly reflects the actual
wide-mode setting.
Signed-off-by: Hans de Goede <hdegoede redhat com>
src/cheese-main.vala | 4 ++++
src/cheese-window.vala | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/cheese-main.vala b/src/cheese-main.vala
index 2adfdc0..d0f9b41 100644
--- a/src/cheese-main.vala
+++ b/src/cheese-main.vala
@@ -129,6 +129,10 @@ public class Cheese.Main : Gtk.Application
main_window.setup_ui ();
main_window.start_thumbview_monitors ();
+ /* If not set from the cmdline, get the settings from config file */
+ if (!wide)
+ wide = main_window.settings.get_boolean ("wide-mode");
+
if (wide)
change_action_state("widemode", true);
if (fullscreen)
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index 7a3db6b..c75c5f0 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -44,7 +44,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
private Gtk.Builder gtk_builder;
private Clutter.Script clutter_builder;
- private GLib.Settings settings;
+ public GLib.Settings settings;
private Gtk.Widget thumbnails;
private GtkClutter.Embed viewport_widget;
@@ -1440,7 +1440,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow
* if the widget is not realized */
viewport_widget.realize ();
- set_wide_mode (settings.get_boolean ("wide-mode"));
+ set_wide_mode (false);
set_mode (MediaMode.PHOTO);
setup_effects_selector ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]