Make ShellAppMonitor and ShellAppSystem singletons, remove unused code in appDisplay

We shouldn't create multiple instances of either.  Also remove a bit
of unused code in appDisplay.
This commit is contained in:
Colin Walters
2009-06-18 12:27:19 -04:00
parent dd1c95b3ce
commit e7771b4eb0
6 changed files with 37 additions and 31 deletions

View File

@@ -299,3 +299,19 @@ shell_app_system_get_all_settings (ShellAppSystem *monitor)
{
return monitor->priv->cached_setting_ids;
}
/**
* shell_app_system_get_default:
*
* Return Value: (transfer none): The global #ShellAppSystem singleton
*/
ShellAppSystem *
shell_app_system_get_default ()
{
static ShellAppSystem *instance = NULL;
if (instance == NULL)
instance = g_object_new (SHELL_TYPE_APP_SYSTEM, NULL);
return instance;
}