[gnome-settings-daemon] Several fixes
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] Several fixes
- Date: Thu, 7 Oct 2010 09:57:12 +0000 (UTC)
commit 24e0b310dcc24807ceeb7fd1227f369c2118b0cb
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Wed Oct 6 11:33:18 2010 +0200
Several fixes
plugins/housekeeping/gsd-disk-space.c | 10 +++-------
plugins/media-keys/gsd-media-keys-manager.c | 27 +++++++++++++++------------
plugins/xrandr/gsd-xrandr-manager.c | 2 +-
3 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c
index 51440e9..e1385ea 100644
--- a/plugins/housekeeping/gsd-disk-space.c
+++ b/plugins/housekeeping/gsd-disk-space.c
@@ -628,13 +628,9 @@ gsd_ldsm_setup (gboolean check_now)
ldsm_free_mount_info);
settings = g_settings_new (SETTINGS_HOUSEKEEPING_DIR);
- if (settings != NULL) {
- gsd_ldsm_get_config ();
- g_signal_connect (G_OBJECT (settings), "changed",
- G_CALLBACK (gsd_ldsm_update_config), NULL);
- } else {
- g_warning ("Failed to get settings client");
- }
+ gsd_ldsm_get_config ();
+ g_signal_connect (G_OBJECT (settings), "changed",
+ G_CALLBACK (gsd_ldsm_update_config), NULL);
ldsm_monitor = g_unix_mount_monitor_new ();
g_unix_mount_monitor_set_rate_limit (ldsm_monitor, 1000);
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index debc6f8..0ade755 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -151,25 +151,21 @@ acme_error (char * msg)
static char *
get_term_command (GsdMediaKeysManager *manager)
{
- char *cmd_term;
+ char *cmd_term, *cmd_args;;
char *cmd = NULL;
GSettings *settings;
settings = g_settings_new ("org.gnome.desktop.applications.terminal");
cmd_term = g_settings_get_string (settings, "exec");
- if ((cmd_term != NULL) && (strcmp (cmd_term, "") != 0)) {
- char *cmd_args;
- cmd_args = g_settings_get_string (settings, "exec-arg");
- if ((cmd_args != NULL) && (strcmp (cmd_term, "") != 0)) {
- cmd = g_strdup_printf ("%s %s -e", cmd_term, cmd_args);
- } else {
- cmd = g_strdup_printf ("%s -e", cmd_term);
- }
-
- g_free (cmd_args);
+ cmd_args = g_settings_get_string (settings, "exec-arg");
+ if (strcmp (cmd_term, "") != 0) {
+ cmd = g_strdup_printf ("%s %s -e", cmd_term, cmd_args);
+ } else {
+ cmd = g_strdup_printf ("%s -e", cmd_term);
}
+ g_free (cmd_args);
g_free (cmd_term);
g_object_unref (settings);
@@ -446,7 +442,14 @@ do_url_action (GsdMediaKeysManager *manager,
app_info = g_app_info_get_default_for_uri_scheme (scheme);
if (app_info != NULL) {
- execute (manager, g_app_info_get_commandline (app_info), FALSE, /* FIXME */ FALSE);
+ GError *error = NULL;
+
+ if (!g_app_info_launch (app_info, NULL, NULL, &error)) {
+ g_warning ("Could not launch '%s': %s",
+ g_app_info_get_commandline (app_info),
+ error->message);
+ g_error_free (error);
+ }
} else {
g_warning ("Could not find default application for '%s' scheme", scheme);
}
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 0d34ce1..1d6f6bb 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -59,7 +59,7 @@
#define GSD_XRANDR_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_XRANDR_MANAGER, GsdXrandrManagerPrivate))
-#define CONF_DIR "org.gnome.settings-daemon.xrandr"
+#define CONF_DIR "org.gnome.settings-daemon.plugins.xrandr"
#define CONF_KEY_SHOW_NOTIFICATION_ICON ("show-notification-icon")
#define CONF_KEY_TURN_ON_EXTERNAL_MONITORS_AT_STARTUP ("turn-on-external-monitors-at-startup")
#define CONF_KEY_TURN_ON_LAPTOP_MONITOR_AT_STARTUP ("turn-on-laptop-monitor-at-startup")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]