Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Restore the app-sys functions for settings so nothing gets broken -

just return null or empty where appropriate.
  • Loading branch information...
commit 06738103c8413bfc336fe1ed10b3f3baa7dbb692 1 parent 21f20ca
@mtwebster mtwebster authored
Showing with 88 additions and 2 deletions.
  1. +76 −2 src/cinnamon-app-system.c
  2. +12 −0 src/cinnamon-app-system.h
View
78 src/cinnamon-app-system.c
@@ -49,6 +49,7 @@ struct _CinnamonAppSystemPrivate {
GSList *known_vendor_prefixes;
+ GMenuTree *settings_tree;
GHashTable *setting_id_to_app;
};
@@ -113,10 +114,10 @@ cinnamon_app_system_finalize (GObject *object)
CinnamonAppSystemPrivate *priv = self->priv;
g_object_unref (priv->apps_tree);
-
+ g_object_unref (priv->settings_tree);
g_hash_table_destroy (priv->running_apps);
g_hash_table_destroy (priv->id_to_app);
-
+ g_hash_table_destroy (priv->setting_id_to_app);
g_slist_foreach (priv->known_vendor_prefixes, (GFunc)g_free, NULL);
g_slist_free (priv->known_vendor_prefixes);
priv->known_vendor_prefixes = NULL;
@@ -397,6 +398,36 @@ cinnamon_app_system_get_tree (CinnamonAppSystem *self)
}
/**
+ * cinnamon_app_system_get_settings_tree:
+ *
+ * OBSOLETE - ONLY LEFT IN FOR COMPATIBILITY
+ * RETURNS EMPTY GMenuTree
+ */
+GMenuTree *
+cinnamon_app_system_get_settings_tree (CinnamonAppSystem *self)
+{
+ return self->priv->settings_tree;
+}
+/**
+ * cinnamon_app_system_lookup_setting:
+ *
+ * OBSOLETE - ONLY LEFT IN FOR COMPATIBILITY
+ * RETURNS NULL IF NOT FOUND IN STANDARD APPS
+ *
+ */
+CinnamonApp *
+cinnamon_app_system_lookup_setting (CinnamonAppSystem *self,
+ const char *id)
+{
+ CinnamonApp *app;
+ /* Actually defer to the main app set if there's overlap */
+ app = cinnamon_app_system_lookup_app (self, id);
+ if (app != NULL)
+ return app;
+ return NULL;
+}
+
+/**
* cinnamon_app_system_get_default:
*
* Return Value: (transfer none): The global #CinnamonAppSystem singleton
@@ -447,6 +478,20 @@ cinnamon_app_system_lookup_app (CinnamonAppSystem *self,
}
/**
+ * cinnamon_app_system_lookup_settings_app:
+ *
+ * OBSOLETE - ONLY LEFT IN FOR COMPATIBILITY
+ * RETURNS NULL
+ *
+ */
+CinnamonApp *
+cinnamon_app_system_lookup_settings_app (CinnamonAppSystem *self,
+ const char *id)
+{
+ return NULL;
+}
+
+/**
* cinnamon_app_system_lookup_app_by_tree_entry:
* @system: a #CinnamonAppSystem
* @entry: a #GMenuTreeEntry
@@ -465,6 +510,21 @@ cinnamon_app_system_lookup_app_by_tree_entry (CinnamonAppSystem *self,
return cinnamon_app_system_lookup_app (self, gmenu_tree_entry_get_desktop_file_id (entry));
}
+
+/**
+ * cinnamon_app_system_lookup_settings_app_by_tree_entry:
+ *
+ * OBSOLETE - ONLY LEFT IN FOR COMPATIBILITY
+ * RETURNS NULL
+ *
+ */
+CinnamonApp *
+cinnamon_app_system_lookup_settings_app_by_tree_entry (CinnamonAppSystem *self,
+ GMenuTreeEntry *entry)
+{
+ return NULL;
+}
+
/**
* cinnamon_app_system_lookup_app_for_path:
* @system: a #CinnamonAppSystem
@@ -748,3 +808,17 @@ cinnamon_app_system_subsearch (CinnamonAppSystem *system,
return sort_and_concat_results (system, prefix_results, substring_results);
}
+/**
+ * cinnamon_app_system_search_settings:
+ *
+ * OBSOLETE - ONLY LEFT IN FOR COMPATIBILITY
+ * RETURNS EMPTY LIST
+ *
+ */
+GSList *
+cinnamon_app_system_search_settings (CinnamonAppSystem *self,
+ GSList *terms)
+{
+ GSList *null_list;
+ return null_list;
+}
View
12 src/cinnamon-app-system.h
@@ -43,8 +43,14 @@ GMenuTree *cinnamon_app_system_get_tree (CinnamonAppSys
CinnamonApp *cinnamon_app_system_lookup_app (CinnamonAppSystem *system,
const char *id);
+CinnamonApp *cinnamon_app_system_lookup_settings_app (CinnamonAppSystem *system,
+ const char *id);
+
+
CinnamonApp *cinnamon_app_system_lookup_app_by_tree_entry (CinnamonAppSystem *system,
GMenuTreeEntry *entry);
+CinnamonApp *cinnamon_app_system_lookup_settings_app_by_tree_entry (CinnamonAppSystem *system,
+ GMenuTreeEntry *entry);
CinnamonApp *cinnamon_app_system_lookup_app_for_path (CinnamonAppSystem *system,
const char *desktop_path);
CinnamonApp *cinnamon_app_system_lookup_heuristic_basename (CinnamonAppSystem *system,
@@ -61,5 +67,11 @@ GSList *cinnamon_app_system_subsearch (CinnamonAppSystem
GSList *previous_results,
GSList *terms);
+GMenuTree *cinnamon_app_system_get_settings_tree (CinnamonAppSystem *system);
+
+GSList *cinnamon_app_system_search_settings (CinnamonAppSystem *system,
+ GSList *terms);
+CinnamonApp *cinnamon_app_system_lookup_setting (CinnamonAppSystem *system,
+ const char *id);
#endif /* __CINNAMON_APP_SYSTEM_H__ */
Please sign in to comment.
Something went wrong with that request. Please try again.