[gnome-terminal] build: Remove deprecated gnome-common macro
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] build: Remove deprecated gnome-common macro
- Date: Fri, 2 May 2014 17:50:11 +0000 (UTC)
commit 34f37dfbbb2c7ab4bf160f30fa024d56f0f8fc5c
Author: Christian Persch <chpe gnome org>
Date: Fri May 2 19:43:52 2014 +0200
build: Remove deprecated gnome-common macro
Instead just add a --enable-debug flag directly.
configure.ac | 17 +++++++++++++++--
src/terminal-accels.c | 4 ++--
src/terminal-app.c | 2 +-
src/terminal-debug.c | 4 ++--
src/terminal-debug.h | 8 ++++----
src/terminal-encoding.c | 2 +-
src/terminal-screen.c | 4 ++--
src/terminal-window.c | 8 ++++----
8 files changed, 31 insertions(+), 18 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ff97d3e..71780b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,8 +31,6 @@ AC_HEADER_STDC
AM_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.50.0])
-GNOME_DEBUG_CHECK
-
AM_GLIB_GNU_GETTEXT
GLIB_REQUIRED=2.40.0
@@ -293,6 +291,20 @@ CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \
-Wno-deprecated-declarations \
])
+# *********
+# Debugging
+# *********
+
+AC_MSG_CHECKING([whether to enable special debug support])
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],[Enable special debug support])],
+ [],[enable_debug=no])
+AC_MSG_RESULT([$enable_debug])
+
+if test "$enable_debug" = "yes"; then
+ AC_DEFINE([ENABLE_DEBUG],[1],[Define to 1 to enable special debug support])
+fi
+
# *************
# Documentation
# *************
@@ -331,6 +343,7 @@ gnome-terminal-$VERSION:
compiler: ${CC}
DBus interface dir: ${dbusinterfacedir}
DBus service dir: ${dbusservicedir}
+ Debug: ${enable_debug}
Prefs migration: ${enable_migration}
Search provider: ${enable_search_provider}
Nautilus extension: ${with_nautilus_extension}
diff --git a/src/terminal-accels.c b/src/terminal-accels.c
index 81f5c9a..8710c07 100644
--- a/src/terminal-accels.c
+++ b/src/terminal-accels.c
@@ -501,7 +501,7 @@ treeview_destroy_cb (GtkWidget *tree_view,
tree_view);
}
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
static void
row_changed (GtkTreeModel *tree_model,
GtkTreePath *path,
@@ -550,7 +550,7 @@ terminal_accels_fill_treeview (GtkWidget *tree_view)
tree = gtk_tree_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER);
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
_TERMINAL_DEBUG_IF (TERMINAL_DEBUG_ACCELS)
g_signal_connect (tree, "row-changed", G_CALLBACK (row_changed), NULL);
#endif
diff --git a/src/terminal-app.c b/src/terminal-app.c
index 01af322..33f6e6f 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -109,7 +109,7 @@ maybe_migrate_settings (TerminalApp *app)
#ifdef ENABLE_MIGRATION
const char * const argv[] = {
TERM_LIBEXECDIR "/gnome-terminal-migration",
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
"--verbose",
#endif
NULL
diff --git a/src/terminal-debug.c b/src/terminal-debug.c
index 9325c88..0ff321f 100644
--- a/src/terminal-debug.c
+++ b/src/terminal-debug.c
@@ -26,7 +26,7 @@ TerminalDebugFlags _terminal_debug_flags;
void
_terminal_debug_init(void)
{
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
const GDebugKey keys[] = {
{ "accels", TERMINAL_DEBUG_ACCELS },
{ "encodings", TERMINAL_DEBUG_ENCODINGS },
@@ -42,6 +42,6 @@ _terminal_debug_init(void)
_terminal_debug_flags = g_parse_debug_string (g_getenv ("GNOME_TERMINAL_DEBUG"),
keys, G_N_ELEMENTS (keys));
-#endif /* GNOME_ENABLE_DEBUG */
+#endif /* ENABLE_DEBUG */
}
diff --git a/src/terminal-debug.h b/src/terminal-debug.h
index ab47975..5dc3ca4 100644
--- a/src/terminal-debug.h
+++ b/src/terminal-debug.h
@@ -17,8 +17,8 @@
/* The interfaces in this file are subject to change at any time. */
-#ifndef GNOME_ENABLE_DEBUG_H
-#define GNOME_ENABLE_DEBUG_H
+#ifndef ENABLE_DEBUG_H
+#define ENABLE_DEBUG_H
#include <glib.h>
@@ -48,7 +48,7 @@ _terminal_debug_on (TerminalDebugFlags flags)
return (_terminal_debug_flags & flags) == flags;
}
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
#define _TERMINAL_DEBUG_IF(flags) if (G_UNLIKELY (_terminal_debug_on (flags)))
#else
#define _TERMINAL_DEBUG_IF(flags) if (0)
@@ -73,4 +73,4 @@ static void _terminal_debug_print (guint flags, const char *fmt, ...)
G_END_DECLS
-#endif /* !GNOME_ENABLE_DEBUG_H */
+#endif /* !ENABLE_DEBUG_H */
diff --git a/src/terminal-encoding.c b/src/terminal-encoding.c
index 2c85625..e7d5641 100644
--- a/src/terminal-encoding.c
+++ b/src/terminal-encoding.c
@@ -202,7 +202,7 @@ terminal_encoding_is_valid (TerminalEncoding *encoding)
(converted != NULL) &&
(strcmp (converted, ascii_sample) == 0);
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
_TERMINAL_DEBUG_IF (TERMINAL_DEBUG_ENCODINGS)
{
if (!encoding->valid)
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index c265869..e3309f8 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -262,7 +262,7 @@ terminal_screen_update_style (TerminalScreen *screen)
terminal_screen_set_font (screen);
}
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
static void
size_request (GtkWidget *widget,
GtkRequisition *req)
@@ -353,7 +353,7 @@ terminal_screen_init (TerminalScreen *screen)
g_signal_connect (terminal_app_get_desktop_interface_settings (app), "changed::" MONOSPACE_FONT_KEY_NAME,
G_CALLBACK (terminal_screen_system_font_changed_cb), screen);
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
_TERMINAL_DEBUG_IF (TERMINAL_DEBUG_GEOMETRY)
{
g_signal_connect_after (screen, "size-request", G_CALLBACK (size_request), NULL);
diff --git a/src/terminal-window.c b/src/terminal-window.c
index aac8de7..3b3ac81 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2135,7 +2135,7 @@ terminal_window_accel_activate_cb (GtkAccelGroup *accel_group,
/*****************************************/
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
static void
terminal_window_size_request_cb (GtkWidget *widget,
GtkRequisition *req)
@@ -2155,7 +2155,7 @@ terminal_window_size_allocate_cb (GtkWidget *widget,
allocation->width, allocation->height,
allocation->x, allocation->y);
}
-#endif /* GNOME_ENABLE_DEBUG */
+#endif /* ENABLE_DEBUG */
static void
terminal_window_realize (GtkWidget *widget)
@@ -2551,7 +2551,7 @@ terminal_window_init (TerminalWindow *window)
g_signal_connect (G_OBJECT (window), "delete_event",
G_CALLBACK(terminal_window_delete_event),
NULL);
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
_TERMINAL_DEBUG_IF (TERMINAL_DEBUG_GEOMETRY)
{
g_signal_connect_after (window, "size-request", G_CALLBACK (terminal_window_size_request_cb), NULL);
@@ -2847,7 +2847,7 @@ terminal_window_new (GApplication *app)
{
return g_object_new (TERMINAL_TYPE_WINDOW,
"application", app,
-#ifdef GNOME_ENABLE_DEBUG
+#ifdef ENABLE_DEBUG
"show-menubar", _terminal_debug_on (TERMINAL_DEBUG_APPMENU),
#else
"show-menubar", FALSE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]