[gnome-settings-daemon/gnome-2-32] (randr) bnc#647304 - If the stored configuration fails at startup, use the fallback configurations



commit 86a6538977f439ab74c4d9a3e2ba5dd20c7112bd
Author: Gary Lin <glin novell com>
Date:   Fri Oct 29 12:31:07 2010 -0500

    (randr) bnc#647304 - If the stored configuration fails at startup, use the fallback configurations
    
    Previously, if a stored configuration existed but it could not be applied due
    to nonmatching monitors, we would do nothing else - potentially leaving the user
    in whatever startup state was used by the X server.  Now, in that condition
    we simply fall back to trying the system-global configuration or the boot-time
    configuration.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 plugins/xrandr/gsd-xrandr-manager.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 5e3a877..06ef2b8 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -2168,10 +2168,11 @@ apply_intended_configuration (GsdXrandrManager *manager, const char *intended_fi
 	gboolean result;
 
         my_error = NULL;
-        result = apply_configuration_from_filename (manager, intended_filename, FALSE, timestamp, &my_error);
+        result = apply_configuration_from_filename (manager, intended_filename, TRUE, timestamp, &my_error);
         if (!result) {
                 if (my_error) {
-                        if (!g_error_matches (my_error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+                        if (!g_error_matches (my_error, G_FILE_ERROR, G_FILE_ERROR_NOENT) &&
+                            !g_error_matches (my_error, GNOME_RR_ERROR, GNOME_RR_ERROR_NO_MATCHING_CONFIG))
                                 error_message (manager, _("Could not apply the stored configuration for monitors"), my_error, NULL);
 
                         g_error_free (my_error);



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