[gnome-flashback] application: pass display config to shell



commit da5d8710181a4bc8b3cee3a7611b48421a077ccd
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Mar 30 13:45:42 2015 +0300

    application: pass display config to shell
    
    We need it to get access to monitor manager.

 gnome-flashback/flashback-application.c    |    3 +++
 gnome-flashback/libshell/flashback-shell.c |    9 +++++++++
 gnome-flashback/libshell/flashback-shell.h |    7 ++++++-
 3 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/gnome-flashback/flashback-application.c b/gnome-flashback/flashback-application.c
index 83b9cea..8d8bb37 100644
--- a/gnome-flashback/flashback-application.c
+++ b/gnome-flashback/flashback-application.c
@@ -134,6 +134,9 @@ settings_changed (GSettings   *settings,
   SETTING_CHANGED (applet, "sound-applet", gvc_applet_new)
 
 #undef SETTING_CHANGED
+
+  if (application->shell)
+    flashback_shell_set_display_config (application->shell, application->config);
 }
 
 static void
diff --git a/gnome-flashback/libshell/flashback-shell.c b/gnome-flashback/libshell/flashback-shell.c
index 8106fa1..ef30891 100644
--- a/gnome-flashback/libshell/flashback-shell.c
+++ b/gnome-flashback/libshell/flashback-shell.c
@@ -17,6 +17,7 @@
 
 #include <config.h>
 #include <gtk/gtk.h>
+#include <libdisplay-config/flashback-display-config.h>
 #include "flashback-dbus-shell.h"
 #include "flashback-key-bindings.h"
 #include "flashback-monitor-labeler.h"
@@ -46,6 +47,7 @@ struct _FlashbackShell
 
   /* monitor labeler */
   FlashbackMonitorLabeler *labeler;
+  FlashbackMonitorManager *manager;
 
   /* osd */
   FlashbackOsd            *osd;
@@ -457,3 +459,10 @@ flashback_shell_new (void)
 {
        return g_object_new (FLASHBACK_TYPE_SHELL, NULL);
 }
+
+void
+flashback_shell_set_display_config (FlashbackShell         *shell,
+                                    FlashbackDisplayConfig *config)
+{
+  shell->manager = flashback_display_config_get_monitor_manager (config);
+}
diff --git a/gnome-flashback/libshell/flashback-shell.h b/gnome-flashback/libshell/flashback-shell.h
index 948cea0..53848ad 100644
--- a/gnome-flashback/libshell/flashback-shell.h
+++ b/gnome-flashback/libshell/flashback-shell.h
@@ -22,10 +22,15 @@
 
 G_BEGIN_DECLS
 
+typedef struct _FlashbackDisplayConfig FlashbackDisplayConfig;
+
 #define FLASHBACK_TYPE_SHELL flashback_shell_get_type ()
 G_DECLARE_FINAL_TYPE (FlashbackShell, flashback_shell, FLASHBACK, SHELL, GObject)
 
-FlashbackShell *flashback_shell_new (void);
+FlashbackShell *flashback_shell_new                (void);
+
+void            flashback_shell_set_display_config (FlashbackShell         *shell,
+                                                    FlashbackDisplayConfig *config);
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]