shell-global: require init call before shell_global_get()

shell_global_get() currently implicitly instantiates the shell
global singleton the first time it's called.  This means there's
no opportunity to set construction-time properties on the singleton.

This isn't an issue yet, because there aren't any.  We will need it
in the future, though, when we grow a --gdm-mode that gets exposed as
a property through the global singleton.

This commit adds a new _shell_global_init() function that must be
invoked before shell_global_get() can be called.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
This commit is contained in:
Ray Strode
2011-08-28 01:32:12 -04:00
parent b6c2399a17
commit 4156a4c2d0
3 changed files with 36 additions and 5 deletions

View File

@ -23,7 +23,7 @@
#include <telepathy-glib/debug-sender.h>
#include "shell-a11y.h"
#include "shell-global.h"
#include "shell-global-private.h"
#include "shell-perf-log.h"
#include "st.h"
@ -540,7 +540,7 @@ main (int argc, char **argv)
g_log_set_default_handler (default_log_handler, sender);
/* Initialize the global object */
shell_global_get ();
_shell_global_init (NULL);
ecode = meta_run ();