about summary refs log tree commit diff stats
path: root/src/profanity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/profanity.c')
-rw-r--r--src/profanity.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/profanity.c b/src/profanity.c
index 42f5936b..2595f5f7 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -31,13 +31,13 @@
  * source files in the program, then also delete it here.
  *
  */
-#include "prof_config.h"
+#include "config.h"
 
-#ifdef PROF_HAVE_GIT_VERSION
+#ifdef HAVE_GIT_VERSION
 #include "gitversion.h"
 #endif
 
-#ifdef PROF_HAVE_GTK
+#ifdef HAVE_GTK
 #include <gtk/gtk.h>
 #include "tray.h"
 #endif
@@ -64,10 +64,10 @@
 #include "log.h"
 #include "muc.h"
 #include "plugins/plugins.h"
-#ifdef PROF_HAVE_LIBOTR
+#ifdef HAVE_LIBOTR
 #include "otr/otr.h"
 #endif
-#ifdef PROF_HAVE_LIBGPGME
+#ifdef HAVE_LIBGPGME
 #include "pgp/gpg.h"
 #endif
 #include "resource.h"
@@ -96,17 +96,19 @@ char *saved_status;
 
 static gboolean cont = TRUE;
 static gboolean force_quit = FALSE;
+#ifdef HAVE_GTK
 static gboolean gtk_ready = FALSE;
+#endif
 
 void
 prof_run(char *log_level, char *account_name)
 {
-#ifdef PROF_HAVE_GTK
+#ifdef HAVE_GTK
     gtk_ready = gtk_init_check(0, NULL);
     log_debug("Env is GTK-ready: %s", gtk_ready ? "true" : "false");
     if (gtk_ready) {
         gtk_init(0, NULL);
-        gtk_main_iteration_do(false);
+        gtk_main_iteration_do(FALSE);
     }
 #endif
     _init(log_level);
@@ -135,7 +137,7 @@ prof_run(char *log_level, char *account_name)
             cont = TRUE;
         }
 
-#ifdef PROF_HAVE_LIBOTR
+#ifdef HAVE_LIBOTR
         otr_poll();
 #endif
         plugins_run_timed();
@@ -143,9 +145,9 @@ prof_run(char *log_level, char *account_name)
         jabber_process_events(10);
         iq_autoping_check();
         ui_update();
-#ifdef PROF_HAVE_GTK
+#ifdef HAVE_GTK
         if (gtk_ready) {
-            gtk_main_iteration_do(false);
+            gtk_main_iteration_do(FALSE);
         }
 #endif
     }
@@ -340,14 +342,14 @@ _init(char *log_level)
     prefs_load();
     log_init(prof_log_level);
     log_stderr_init(PROF_LEVEL_ERROR);
-    if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) {
-#ifdef PROF_HAVE_GIT_VERSION
-            log_info("Starting Profanity (%sdev.%s.%s)...", PROF_PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
+    if (strcmp(PACKAGE_STATUS, "development") == 0) {
+#ifdef HAVE_GIT_VERSION
+            log_info("Starting Profanity (%sdev.%s.%s)...", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
 #else
-            log_info("Starting Profanity (%sdev)...", PROF_PACKAGE_VERSION);
+            log_info("Starting Profanity (%sdev)...", PACKAGE_VERSION);
 #endif
     } else {
-        log_info("Starting Profanity (%s)...", PROF_PACKAGE_VERSION);
+        log_info("Starting Profanity (%s)...", PACKAGE_VERSION);
     }
     chat_log_init();
     groupchat_log_init();
@@ -362,15 +364,15 @@ _init(char *log_level)
     muc_init();
     tlscerts_init();
     scripts_init();
-#ifdef PROF_HAVE_LIBOTR
+#ifdef HAVE_LIBOTR
     otr_init();
 #endif
-#ifdef PROF_HAVE_LIBGPGME
+#ifdef HAVE_LIBGPGME
     p_gpg_init();
 #endif
     atexit(_shutdown);
     plugins_init();
-#ifdef PROF_HAVE_GTK
+#ifdef HAVE_GTK
     if (gtk_ready) {
         log_debug("Building GTK icon");
         create_tray();
@@ -394,7 +396,7 @@ _shutdown(void)
     if (conn_status == JABBER_CONNECTED) {
         cl_ev_disconnect();
     }
-#ifdef PROF_HAVE_GTK
+#ifdef HAVE_GTK
     if (gtk_ready) {
         destroy_tray();
     }
@@ -404,10 +406,10 @@ _shutdown(void)
     muc_close();
     caps_close();
     ui_close();
-#ifdef PROF_HAVE_LIBOTR
+#ifdef HAVE_LIBOTR
     otr_shutdown();
 #endif
-#ifdef PROF_HAVE_LIBGPGME
+#ifdef HAVE_LIBGPGME
     p_gpg_close();
 #endif
     chat_log_close();