summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-04-08 16:56:09 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-04-08 16:56:09 (GMT)
commit35436b655975ac849c7432d736ef379f500c545b (patch)
treef9c7078e7dbff73ad6ca86bc002204f15f09ba22 /src/main.c
parent4f2f4cd9a26e08a68bec5da303e30341b8cae264 (diff)
Avoided to create a hidden main window in batch mode.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/main.c b/src/main.c
index f112842..98d1263 100644
--- a/src/main.c
+++ b/src/main.c
@@ -232,8 +232,6 @@ int main(int argc, char **argv)
/* Lancement des choses sérieuses */
-
-
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALE_DIR);
textdomain(PACKAGE);
@@ -252,14 +250,15 @@ int main(int argc, char **argv)
/* Création de l'interface */
-
-
- editor = create_editor();
- if (editor == NULL) goto failed_to_load_editor;
-
if (!batch_mode)
+ {
+ editor = create_editor();
+ if (editor == NULL) goto failed_to_load_editor;
+
gtk_widget_show_now(editor);
+ }
+
init_all_plugins(true);
config = get_main_configuration();
@@ -267,8 +266,6 @@ int main(int argc, char **argv)
status = complete_loading_of_all_gui_components(config);
if (!status) goto exit_complete_gui;
-
-
/* Utilisateur représenté */
if (!g_generic_config_get_value(config, MPK_AUTHOR_NAME, &author))
@@ -316,7 +313,7 @@ int main(int argc, char **argv)
exit_all_plugins();
- if (!batch_mode) /* FIXME */
+ if (!batch_mode)
gtk_widget_destroy(editor);
failed_to_load_editor: