X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fopenbox.c;h=0782794c75c5d26e0460309916f408b6f5949f60;hb=33d9377773d1c10d78bade8a5856a7803b4c8bce;hp=ae0ba8ae7739aae155cceb7aff2b621f23b39980;hpb=1666d285d744173e03c585dd6525219732ba313a;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index ae0ba8ae..0782794c 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; @@ -258,8 +258,7 @@ gint main(gint argc, gchar **argv) gchar *p = g_filename_to_utf8(config_file, -1, NULL, NULL, NULL); if (p) - OBT_PROP_SETS(obt_root(ob_screen), OB_CONFIG_FILE, - utf8, p); + OBT_PROP_SETS(obt_root(ob_screen), OB_CONFIG_FILE, p); g_free(p); } else @@ -286,8 +285,8 @@ gint main(gint argc, gchar **argv) if (ob_rr_theme == NULL) ob_exit_with_error(_("Unable to load a theme.")); - OBT_PROP_SETS(obt_root(ob_screen), - OB_THEME, utf8, ob_rr_theme->name); + OBT_PROP_SETS(obt_root(ob_screen), OB_THEME, + ob_rr_theme->name); } if (reconfigure) { @@ -356,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 */ { @@ -590,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, @@ -630,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 */ @@ -664,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 */