aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-16 09:39:59 -0600
committerTed Gould <ted@gould.cx>2010-02-16 09:39:59 -0600
commit21c3a88382bb4a1e911456c633aa4730bbb7cdff (patch)
tree0a766f7e0dfb13e98b46100540bb63085bb102a5
parent55145548b36ce11274eb7083760a0913c6731615 (diff)
downloadlibayatana-indicator-21c3a88382bb4a1e911456c633aa4730bbb7cdff.tar.gz
libayatana-indicator-21c3a88382bb4a1e911456c633aa4730bbb7cdff.tar.bz2
libayatana-indicator-21c3a88382bb4a1e911456c633aa4730bbb7cdff.zip
Checking for our shortcuts key, we don't really want a desktop file without it.
-rw-r--r--libindicator/indicator-desktop-shortcuts.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libindicator/indicator-desktop-shortcuts.c b/libindicator/indicator-desktop-shortcuts.c
index a87316f..eeb97be 100644
--- a/libindicator/indicator-desktop-shortcuts.c
+++ b/libindicator/indicator-desktop-shortcuts.c
@@ -29,6 +29,7 @@ License along with this library. If not, see
#include "indicator-desktop-shortcuts.h"
#define GROUP_SUFFIX "Shortcut Group"
+#define SHORTCUTS_KEY "X-Ayatana-Desktop-Shortcuts"
#define PROP_DESKTOP_FILE_S "desktop-file"
#define PROP_IDENTITY_S "identity"
@@ -160,6 +161,13 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec
g_warning("Unable to load keyfile from file '%s': %s", g_value_get_string(value), error->message);
g_error_free(error);
g_key_file_free(keyfile);
+ break;
+ }
+
+ if (!g_key_file_has_key(keyfile, G_KEY_FILE_DESKTOP_GROUP, SHORTCUTS_KEY, NULL)) {
+ g_warning("Keyfile from file '%s' does not have '" SHORTCUTS_KEY "' key", g_value_get_string(value));
+ g_key_file_free(keyfile);
+ break;
}
priv->keyfile = keyfile;