diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 37 |
1 files changed, 18 insertions, 19 deletions
@@ -31,12 +31,11 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT # include <gtk/gtk.h> #endif -#include <config.h> #include <i18n.h> @@ -52,7 +51,7 @@ #include "core/paths.h" #include "core/queue.h" #include "glibext/delayed.h" -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT # include "gui/editor.h" # include "gui/core/core.h" # include "gui/core/global.h" @@ -67,7 +66,7 @@ static void show_chrysalide_help(const char *); /* Affiche des indications sur la version courante du programme. */ static void show_chrysalide_version(void); -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT /* Recharge le dernier projet ouvert s'il existe. */ static gboolean load_last_project(GGenConfig *); @@ -194,7 +193,7 @@ int main(int argc, char **argv) bool show_help; /* Affichage de l'aide ? */ bool show_version; /* Affichage de la version ? */ LogMessageType verbosity; /* Niveau de filtre de message */ -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT bool batch_mode; /* Exécution sans GUI ? */ #endif bool save; /* Sauvegarde du cache ? */ @@ -203,7 +202,7 @@ int main(int argc, char **argv) int ret; /* Bilan d'un appel */ char *edir; /* Répertoire de base effectif */ bool status; /* Bilan d'opérations */ -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT GtkWidget *editor; /* Fenêtre graphique */ GGenConfig *config; /* Configuration globale */ bool welcome; /* Affichage de la bienvenue ? */ @@ -237,7 +236,7 @@ int main(int argc, char **argv) show_version = false; verbosity = LMT_INFO; -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT batch_mode = false; #endif save = false; @@ -263,7 +262,7 @@ int main(int argc, char **argv) break; case 'b': -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT batch_mode = true; #endif break; @@ -310,13 +309,13 @@ int main(int argc, char **argv) /* Initialisation de GTK */ g_set_prgname("Chrysalide"); -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT gtk_init(&argc, &argv); #endif /* Initialisation du programme */ -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT if (batch_mode) #endif set_batch_mode(); @@ -328,7 +327,7 @@ int main(int argc, char **argv) /* Création de l'interface */ -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT if (!batch_mode) { @@ -356,7 +355,7 @@ int main(int argc, char **argv) init_all_plugins(true); -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT config = get_main_configuration(); @@ -382,7 +381,7 @@ int main(int argc, char **argv) /* Charge le dernier projet ? */ -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT if (batch_mode) welcome = true; @@ -415,7 +414,7 @@ int main(int argc, char **argv) if (ret == 0) { -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT project = g_study_project_open(prj_filename, !batch_mode); #else project = g_study_project_open(prj_filename, false); @@ -447,7 +446,7 @@ int main(int argc, char **argv) result = open_binaries(argv + optind, argc - optind); -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT if (batch_mode) @@ -464,7 +463,7 @@ int main(int argc, char **argv) } -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT else gtk_main(); @@ -477,7 +476,7 @@ int main(int argc, char **argv) no_internal_server: -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT exit_complete_gui: #endif @@ -487,7 +486,7 @@ int main(int argc, char **argv) exit_all_plugins(); -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT if (!batch_mode) unload_all_gui_components(); @@ -514,7 +513,7 @@ int main(int argc, char **argv) } -#ifdef HAVE_GTK_SUPPORT +#ifdef INCLUDE_GTK_SUPPORT /****************************************************************************** |