static void destroy( GtkWidget *widget,
gpointer data );
+#if GLIB_CHECK_VERSION (2, 32, 0)
+/* Callback to log message */
+static void log_debug(const gchar *log_domain,
+ GLogLevelFlags log_level,
+ const gchar *message,
+ gpointer user_data)
+{
+ g_print("** (viking): DEBUG: %s\n", message);
+}
+#else
/* Callback to mute log message */
static void mute_log(const gchar *log_domain,
GLogLevelFlags log_level,
{
/* Nothing to do, we just want to mute */
}
+#endif
/* Another callback */
static void destroy( GtkWidget *widget,
return EXIT_SUCCESS;
}
+#if GLIB_CHECK_VERSION (2, 32, 0)
+ if (vik_debug)
+ g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, log_debug, NULL);
+#else
if (!vik_debug)
g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, mute_log, NULL);
+#endif
a_preferences_init ();