gnome-session r4949 - in trunk: . gnome-session
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r4949 - in trunk: . gnome-session
- Date: Wed, 13 Aug 2008 20:17:12 +0000 (UTC)
Author: mccann
Date: Wed Aug 13 20:17:12 2008
New Revision: 4949
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4949&view=rev
Log:
2008-08-13 William Jon McCann <jmccann redhat com>
* gnome-session/gsm-manager.c (append_app), (append_default_apps):
Correctly check if app-id has already been added to store.
Modified:
trunk/ChangeLog
trunk/gnome-session/gsm-manager.c
Modified: trunk/gnome-session/gsm-manager.c
==============================================================================
--- trunk/gnome-session/gsm-manager.c (original)
+++ trunk/gnome-session/gsm-manager.c Wed Aug 13 20:17:12 2008
@@ -1680,11 +1680,12 @@
GsmApp *app)
{
const char *id;
+ const char *app_id;
GsmApp *dup;
id = gsm_app_peek_id (app);
if (IS_STRING_EMPTY (id)) {
- g_debug ("GsmManager: not adding app: no ID");
+ g_debug ("GsmManager: not adding app: no id");
return;
}
@@ -1694,6 +1695,18 @@
return;
}
+ app_id = gsm_app_peek_app_id (app);
+ if (IS_STRING_EMPTY (app_id)) {
+ g_debug ("GsmManager: not adding app: no app-id");
+ return;
+ }
+
+ dup = find_app_for_app_id (manager, app_id);
+ if (dup != NULL) {
+ g_debug ("GsmManager: not adding app: app-id already exists");
+ return;
+ }
+
gsm_store_add (manager->priv->apps, id, G_OBJECT (app));
}
@@ -1772,11 +1785,11 @@
app = gsm_autostart_app_new (app_path);
if (app != NULL) {
- g_debug ("GsmManager: read %s\n", app_path);
+ g_debug ("GsmManager: read %s", app_path);
append_app (manager, app);
g_object_unref (app);
} else {
- g_warning ("could not read %s\n", app_path);
+ g_warning ("could not read %s", app_path);
}
g_free (app_path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]