gnome-terminal r3230 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r3230 - trunk/src
- Date: Sat, 29 Nov 2008 21:24:06 +0000 (UTC)
Author: chpe
Date: Sat Nov 29 21:24:06 2008
New Revision: 3230
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3230&view=rev
Log:
Oops. Fix the build by actually committing the new source files.
Added:
trunk/src/terminal-debug.c
trunk/src/terminal-debug.h
Modified:
trunk/src/terminal.c
Added: trunk/src/terminal-debug.c
==============================================================================
--- (empty file)
+++ trunk/src/terminal-debug.c Sat Nov 29 21:24:06 2008
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2002,2003 Red Hat, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <config.h>
+
+#include <glib.h>
+
+#include "terminal-debug.h"
+
+TerminalDebugFlags _terminal_debug_flags;
+
+void
+_terminal_debug_init(void)
+{
+#ifdef GNOME_ENABLE_DEBUG
+ const GDebugKey keys[] = {
+ { "accels", TERMINAL_DEBUG_ACCELS },
+ { "encodings", TERMINAL_DEBUG_ENCODINGS },
+ { "geometry", TERMINAL_DEBUG_GEOMETRY },
+ { "profile", TERMINAL_DEBUG_PROFILE }
+ };
+
+ _terminal_debug_flags = g_parse_debug_string (g_getenv ("GNOME_TERMINAL_DEBUG"),
+ keys, G_N_ELEMENTS (keys));
+#endif /* GNOME_ENABLE_DEBUG */
+}
+
Added: trunk/src/terminal-debug.h
==============================================================================
--- (empty file)
+++ trunk/src/terminal-debug.h Sat Nov 29 21:24:06 2008
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2002 Red Hat, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/* The interfaces in this file are subject to change at any time. */
+
+#ifndef GNOME_ENABLE_DEBUG_H
+#define GNOME_ENABLE_DEBUG_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef enum {
+ TERMINAL_DEBUG_ACCELS = 1 << 0,
+ TERMINAL_DEBUG_ENCODINGS = 1 << 1,
+ TERMINAL_DEBUG_GEOMETRY = 1 << 2,
+ TERMINAL_DEBUG_PROFILE = 1 << 3
+} TerminalDebugFlags;
+
+void _terminal_debug_init(void);
+
+extern TerminalDebugFlags _terminal_debug_flags;
+static inline gboolean _terminal_debug_on (TerminalDebugFlags flags) G_GNUC_CONST G_GNUC_UNUSED;
+
+static inline gboolean
+_terminal_debug_on (TerminalDebugFlags flags)
+{
+ return (_terminal_debug_flags & flags) == flags;
+}
+
+#ifdef GNOME_ENABLE_DEBUG
+#define _TERMINAL_DEBUG_IF(flags) if (G_UNLIKELY (_terminal_debug_on (flags)))
+#else
+#define _TERMINAL_DEBUG_IF(flags) if (0)
+#endif
+
+#if defined(__GNUC__) && G_HAVE_GNUC_VARARGS
+#define _terminal_debug_print(flags, fmt, ...) \
+ G_STMT_START { _TERMINAL_DEBUG_IF(flags) g_printerr(fmt, ##__VA_ARGS__); } G_STMT_END
+#else
+#include <stdarg.h>
+#include <glib/gstdio.h>
+static void _terminal_debug_print (guint flags, const char *fmt, ...)
+{
+ if (_terminal_debug_on (flags)) {
+ va_list ap;
+ va_start (ap, fmt);
+ g_vfprintf (stderr, fmt, ap);
+ va_end (ap);
+ }
+}
+#endif
+
+G_END_DECLS
+
+#endif /* !GNOME_ENABLE_DEBUG_H */
Modified: trunk/src/terminal.c
==============================================================================
--- trunk/src/terminal.c (original)
+++ trunk/src/terminal.c Sat Nov 29 21:24:06 2008
@@ -388,7 +388,8 @@
/* If the gconf daemon isn't available (e.g. because there's no dbus
* session bus running), we'd crash later on. Tell the user about it
- * now, and exit. See bug #561663. */
+ * now, and exit. See bug #561663.
+ */
if (!gconf_ping_daemon ())
{
g_printerr ("Failed to contact the GConf daemon; exiting.\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]