summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2001-12-09 22:41:12 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-12-09 22:41:12 +0000
commit6981a8198bdce947fa2f43a28babe427e740282b (patch)
treee247cdeeb2810c60ea00e7620e903fd82eca7668 /src/main.c
parentb3778e4470e08dab6017d0134c81607920110e74 (diff)
downloadmetacity-6981a8198bdce947fa2f43a28babe427e740282b.tar.gz
move SM init a bit later in the process, and init prefs
2001-12-09 Havoc Pennington <hp@pobox.com> * src/main.c (main): move SM init a bit later in the process, and init prefs * src/session.c: fix no SM case (though I hardly know why I'm bothering) * src/main.c (main): call bindtextdomain * src/util.h (_): actually call gettext * configure.in: put in AM_GLIB_GNU_GETTEXT and gconf stuff * src/prefs.c: Preferences - this marks the beginning of our doom. None of them are actually implemented yet, but we monitor some stuff from gconf.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 9d0d4029..f00d87e8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -19,12 +19,14 @@
* 02111-1307, USA.
*/
+#include <config.h>
#include "main.h"
#include "util.h"
#include "display.h"
#include "errors.h"
#include "ui.h"
#include "session.h"
+#include "prefs.h"
#include <glib-object.h>
@@ -74,7 +76,9 @@ main (int argc, char **argv)
act.sa_flags = 0;
sigaction (SIGPIPE, &act, 0);
- g_set_prgname (PACKAGE);
+ g_set_prgname (argv[0]);
+
+ bindtextdomain (GETTEXT_PACKAGE, METACITY_LOCALEDIR);
meta_set_verbose (TRUE);
meta_set_debugging (TRUE);
@@ -169,8 +173,8 @@ main (int argc, char **argv)
g_type_init ();
- if (!disable_sm)
- meta_session_init (client_id); /* client_id == NULL is fine */
+ /* Load prefs */
+ meta_prefs_init ();
meta_ui_init (&argc, &argv);
@@ -181,6 +185,13 @@ main (int argc, char **argv)
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_always_fatal (G_LOG_LEVEL_MASK);
+
+ /* Connect to SM as late as possible - but before managing display,
+ * or we might try to manage a window before we have the session
+ * info
+ */
+ if (!disable_sm)
+ meta_session_init (client_id); /* client_id == NULL is fine */
if (!meta_display_open (NULL))
meta_exit (META_EXIT_ERROR);