Otherwise glib will make internal calls before setlocale is called:
** (process:1124144): WARNING **: 10:16:58.983: dcgettext("(null)", "", 5) called before setlocale()
#0 0x00007ffff7c80f77 in g_logv () at /lib64/libglib-2.0.so.0
#1 0x00007ffff7c81233 in g_log () at /lib64/libglib-2.0.so.0
#2 0x00007ffff7fbb6c6 in dcgettext (__domainname=<optimized out>, __msgid=0x7ffff7ce6c5a "", __category=<optimized out>) at ../../../../Projects/jhbuild/gettext-pseudolocale/gettext-pseudolocale.c:194
#3 0x00007ffff7c6478e in _g_dgettext_should_translate () at /lib64/libglib-2.0.so.0
#4 0x00007ffff7c6484b in g_dgettext () at /lib64/libglib-2.0.so.0
#5 0x00007ffff7e98974 in g_application_class_intern_init () at /lib64/libgio-2.0.so.0
#6 0x00007ffff7d9cfb8 in g_type_class_ref () at /lib64/libgobject-2.0.so.0
#7 0x00007ffff7d9cc95 in g_type_class_ref () at /lib64/libgobject-2.0.so.0
#8 0x00007ffff7d9cc95 in g_type_class_ref () at /lib64/libgobject-2.0.so.0
#9 0x00007ffff7d9cc95 in g_type_class_ref () at /lib64/libgobject-2.0.so.0
#10 0x00007ffff7d8671a in g_object_new_valist () at /lib64/libgobject-2.0.so.0
#11 0x00007ffff7d867fd in g_object_new () at /lib64/libgobject-2.0.so.0
#12 0x0000000000449bcc in cc_application_new () at ../../../../Projects/jhbuild/gnome-control-center/shell/cc-application.c:294
#13 0x0000000000448fa6 in main (argc=1, argv=0x7fffffffd138) at ../../../../Projects/jhbuild/gnome-control-center/shell/main.c:55
Add initialize_dependencies() to factorize the dependecies
initialization functions for better readability as another dependency
to initialize will be added in a following commit.
Now that we handle local command line arguments, the 'command_line'
vfunc can no longer get the initial argc/argv passed to the process.
Now, cheese_gtk_init() is called unconditionally from main()
where argc/argv are available.
https://bugzilla.gnome.org/show_bug.cgi?id=751597
Since GOA is still using WebKit1, we need to set the environment
variable ourself. We can stop setting it once we port to WebKit2
because the network process will handle it for us.
https://bugzilla.gnome.org/show_bug.cgi?id=739960
This promotes better encapsulation and allows us to move
application logic out of main() and rename the confusingly
named control-center.c to main.c
https://bugzilla.gnome.org/show_bug.cgi?id=692174