X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fopenbox.c;h=4ac09cd6665f02cb47870a40acbb61e057542691;hb=2391410e3fd7767e266c0efe84fd34244ea29dc6;hp=9fd5fe40b451a188249ba6ca6af7416b2321e1df;hpb=5d5714f01e1a7140847f6e7f2922d457f6bbe66a;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index 9fd5fe40..4ac09cd6 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -196,7 +196,7 @@ gint main(gint argc, gchar **argv) /* set the DISPLAY environment variable for any lauched children, to the display we're using, so they open in the right place. */ - setenv("DISPLAY", DisplayString(obt_display), TRUE); + g_setenv("DISPLAY", DisplayString(obt_display), TRUE); /* create available cursors */ cursors[OB_CURSOR_NONE] = None; @@ -355,11 +355,11 @@ gint main(gint argc, gchar **argv) } } - reconfigure = FALSE; - ob_set_state(OB_STATE_RUNNING); - if (startup_cmd) run_startup_cmd(); + if (!reconfigure && startup_cmd) run_startup_cmd(); + + reconfigure = FALSE; /* look for parsing errors */ { @@ -515,9 +515,9 @@ static void print_version(void) { g_print("Openbox %s\n", PACKAGE_VERSION); g_print(_("Copyright (c)")); - g_print(" 2008 Mikael Magnusson\n"); + g_print(" 2004 Mikael Magnusson\n"); g_print(_("Copyright (c)")); - g_print(" 2003-2006 Dana Jansens\n\n"); + g_print(" 2002 Dana Jansens\n\n"); g_print("This program comes with ABSOLUTELY NO WARRANTY.\n"); g_print("This is free software, and you are welcome to redistribute it\n"); g_print("under certain conditions. See the file COPYING for details.\n\n"); @@ -576,7 +576,7 @@ static void run_startup_cmd(void) G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, NULL, &e); - if (!g_shell_parse_argv(startup_cmd, NULL, &argv, &e)) { + if (!ok) { g_message("Error launching startup command: %s", e->message); g_error_free(e); @@ -589,12 +589,12 @@ static void parse_env(void) const gchar *id; /* unset this so we don't pass it on unknowingly */ - unsetenv("DESKTOP_STARTUP_ID"); + g_unsetenv("DESKTOP_STARTUP_ID"); /* this is how gnome-session passes in a session client id */ id = g_getenv("DESKTOP_AUTOSTART_ID"); if (id) { - unsetenv("DESKTOP_AUTOSTART_ID"); + g_unsetenv("DESKTOP_AUTOSTART_ID"); if (ob_sm_id) g_free(ob_sm_id); ob_sm_id = g_strdup(id); ob_debug_type(OB_DEBUG_SM, @@ -629,7 +629,7 @@ static void parse_args(gint *argc, gchar **argv) } else if (!strcmp(argv[i], "--startup")) { if (i == *argc - 1) /* no args left */ - g_printerr(_("--startup requires an argument\n")); + g_printerr(_("%s requires an argument\n"), "--startup"); else { /* this will be in the current locale encoding, which is what we want */ @@ -663,7 +663,7 @@ static void parse_args(gint *argc, gchar **argv) } else if (!strcmp(argv[i], "--config-file")) { if (i == *argc - 1) /* no args left */ - g_printerr(_("--config-file requires an argument\n")); + g_printerr(_("%s requires an argument\n"), "--config-file"); else { /* this will be in the current locale encoding, which is what we want */