summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-09-08 10:57:41 -0500
committerFederico Mena Quintero <federico@novell.com>2010-09-08 11:36:25 -0500
commitabcd2c1536f4064d464eddacdca8296ccfb8abd3 (patch)
tree2c9ae3e227ea016cd9d138ac4d869d2510a08723
parent3877a7e6eef68c02d859820a68e0960d541d7218 (diff)
downloadgnome-settings-daemon-abcd2c1536f4064d464eddacdca8296ccfb8abd3.tar.gz
Log the configurations when handling the XF86Display hotkey
Signed-off-by: Federico Mena Quintero <federico@novell.com>
-rw-r--r--plugins/xrandr/gsd-xrandr-manager.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 700a4cc5..3e2ea519 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -363,6 +363,8 @@ apply_configuration_and_display_error (GsdXrandrManager *manager, GnomeRRConfig
error = NULL;
success = gnome_rr_config_apply_with_time (config, priv->rw_screen, timestamp, &error);
if (!success) {
+ log_msg ("Could not switch to the following configuration (timestamp %u): %s\n", timestamp, error->message);
+ log_configuration (config);
error_message (manager, _("Could not switch the monitor configuration"), error, NULL);
g_error_free (error);
}
@@ -1127,6 +1129,9 @@ handle_fn_f7 (GsdXrandrManager *mgr, guint32 timestamp)
*/
g_debug ("Handling fn-f7");
+ log_open ();
+ log_msg ("Handling XF86Display hotkey - timestamp %u\n", timestamp);
+
error = NULL;
if (!gnome_rr_screen_refresh (screen, &error) && error) {
char *str;
@@ -1134,12 +1139,16 @@ handle_fn_f7 (GsdXrandrManager *mgr, guint32 timestamp)
str = g_strdup_printf (_("Could not refresh the screen information: %s"), error->message);
g_error_free (error);
+ log_msg ("%s\n", str);
error_message (mgr, str, NULL, _("Trying to switch the monitor configuration anyway."));
g_free (str);
}
- if (!priv->fn_f7_configs)
+ if (!priv->fn_f7_configs) {
+ log_msg ("Generating stock configurations:\n");
generate_fn_f7_configs (mgr);
+ log_configurations (priv->fn_f7_configs);
+ }
current = gnome_rr_config_new_current (screen);
@@ -1150,12 +1159,15 @@ handle_fn_f7 (GsdXrandrManager *mgr, guint32 timestamp)
* configurations
*/
generate_fn_f7_configs (mgr);
+ log_msg ("Regenerated stock configurations:\n");
+ log_configurations (priv->fn_f7_configs);
}
gnome_rr_config_free (current);
if (priv->fn_f7_configs) {
guint32 server_timestamp;
+ gboolean success;
mgr->priv->current_fn_f7_config++;
@@ -1184,11 +1196,19 @@ handle_fn_f7 (GsdXrandrManager *mgr, guint32 timestamp)
if (timestamp < server_timestamp)
timestamp = server_timestamp;
- apply_configuration_and_display_error (mgr, priv->fn_f7_configs[mgr->priv->current_fn_f7_config], timestamp);
+ success = apply_configuration_and_display_error (mgr, priv->fn_f7_configs[mgr->priv->current_fn_f7_config], timestamp);
+
+ if (success) {
+ log_msg ("Successfully switched to configuration (timestamp %u):\n", timestamp);
+ log_configuration (priv->fn_f7_configs[mgr->priv->current_fn_f7_config]);
+ }
}
else {
g_debug ("no configurations generated");
}
+
+ log_close ();
+
g_debug ("done handling fn-f7");
}