[gnome-settings-daemon/randr-set-as-default: 3/4] Add GConf key to define a default configuration file



commit b89796b2d1a66b814337141d5fbefe06b2b5cac2
Author: Federico Mena Quintero <federico novell com>
Date:   Mon Mar 8 18:27:01 2010 -0600

    Add GConf key to define a default configuration file
    
    This is /apps/gnome_settings_daemon/xrandr/default_configuration_file and by
    default points to /etc/gnome-settings-daemon/xrandr/monitors.xml.
    
    The RANDR plugin will try to use this file at login time if the user does
    not have a suitable ~/.config/monitors.xml.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 data/apps_gnome_settings_daemon_xrandr.schemas.in |   18 ++++++++++++++++++
 plugins/xrandr/gsd-xrandr-manager.c               |    1 +
 2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/data/apps_gnome_settings_daemon_xrandr.schemas.in b/data/apps_gnome_settings_daemon_xrandr.schemas.in
index ca3657e..48ea44d 100644
--- a/data/apps_gnome_settings_daemon_xrandr.schemas.in
+++ b/data/apps_gnome_settings_daemon_xrandr.schemas.in
@@ -40,5 +40,23 @@
 		</long>
             </locale>
         </schema>
+	<schema>
+	    <key>/schemas/apps/gnome_settings_daemon/xrandr/default_configuration_file</key>
+	    <applyto>/apps/gnome_settings_daemon/xrandr/default_configuration_file</applyto>
+            <owner>gnome</owner>
+	    <type>string</type>
+            <default>/etc/gnome-settings-daemon/xrandr/monitors.xml</default>
+            <locale name="C">
+	        <short>File for default configuration for RANDR</short>
+	        <long>The XRANDR plugin will look for a default
+                configuration in the file specified by this key.  This
+                is similar to the ~/.config/monitors.xml that normally
+                gets stored in users' home directories.  If a user
+                does not have such a file, or has one that does not
+                match the user's setup of monitors, then the file
+                specified by this key will be used instead.
+	        </long>
+            </locale>
+        </schema>
     </schemalist>
 </gconfschemafile>
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 7821146..b07dcdb 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -62,6 +62,7 @@
 #define CONF_KEY_SHOW_NOTIFICATION_ICON (CONF_DIR "/show_notification_icon")
 #define CONF_KEY_TURN_ON_EXTERNAL_MONITORS_AT_STARTUP	(CONF_DIR "/turn_on_external_monitors_at_startup")
 #define CONF_KEY_TURN_ON_LAPTOP_MONITOR_AT_STARTUP	(CONF_DIR "/turn_on_laptop_monitor_at_startup")
+#define CONF_KEY_DEFAULT_CONFIGURATION_FILE             (CONF_DIR "/default_configuration_file")
 
 #define VIDEO_KEYSYM    "XF86Display"
 #define ROTATE_KEYSYM   "XF86RotateWindows"



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