[gimp] app: Add GIMP_LOG_FLOATING_SELECTION domain
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: Add GIMP_LOG_FLOATING_SELECTION domain
- Date: Sat, 2 Jan 2010 22:40:59 +0000 (UTC)
commit b5defd4e4a8a5b5364d91a406b96e24ccff8e69e
Author: Martin Nordholts <martinn src gnome org>
Date: Sat Jan 2 23:41:52 2010 +0100
app: Add GIMP_LOG_FLOATING_SELECTION domain
Add GIMP_LOG_FLOATING_SELECTION domain to get rid of the somewhat
annoying debug prints. Floating selection is likely to require further
debuggin later on, so instead of just removing the output, use
GIMP_LOG for it.
app/core/gimpdrawable.c | 6 ++++--
app/gimp-log.c | 23 ++++++++++++-----------
app/gimp-log.h | 46 ++++++++++++++++++++++++----------------------
3 files changed, 40 insertions(+), 35 deletions(-)
---
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index f7e2bd3..090a9a2 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -50,6 +50,8 @@
#include "gimppreviewcache.h"
#include "gimpprogress.h"
+#include "gimp-log.h"
+
#include "gimp-intl.h"
@@ -1936,7 +1938,7 @@ gimp_drawable_attach_floating_sel (GimpDrawable *drawable,
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
g_return_if_fail (GIMP_IS_LAYER (floating_sel));
- g_printerr ("%s\n", G_STRFUNC);
+ GIMP_LOG (FLOATING_SELECTION, "%s", G_STRFUNC);
image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -1967,7 +1969,7 @@ gimp_drawable_detach_floating_sel (GimpDrawable *drawable,
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (GIMP_IS_LAYER (floating_sel));
- g_printerr ("%s\n", G_STRFUNC);
+ GIMP_LOG (FLOATING_SELECTION, "%s", G_STRFUNC);
image = gimp_item_get_image (GIMP_ITEM (drawable));
diff --git a/app/gimp-log.c b/app/gimp-log.c
index e089e96..4820aa3 100644
--- a/app/gimp-log.c
+++ b/app/gimp-log.c
@@ -37,17 +37,18 @@ gimp_log_init (void)
{
const GDebugKey log_keys[] =
{
- { "tool-events", GIMP_LOG_TOOL_EVENTS },
- { "tool-focus", GIMP_LOG_TOOL_FOCUS },
- { "dnd", GIMP_LOG_DND },
- { "help", GIMP_LOG_HELP },
- { "dialog-factory", GIMP_LOG_DIALOG_FACTORY },
- { "menus", GIMP_LOG_MENUS },
- { "save-dialog", GIMP_LOG_SAVE_DIALOG },
- { "image-scale", GIMP_LOG_IMAGE_SCALE },
- { "shadow-tiles", GIMP_LOG_SHADOW_TILES },
- { "scale", GIMP_LOG_SCALE },
- { "wm", GIMP_LOG_WM }
+ { "tool-events", GIMP_LOG_TOOL_EVENTS },
+ { "tool-focus", GIMP_LOG_TOOL_FOCUS },
+ { "dnd", GIMP_LOG_DND },
+ { "help", GIMP_LOG_HELP },
+ { "dialog-factory", GIMP_LOG_DIALOG_FACTORY },
+ { "menus", GIMP_LOG_MENUS },
+ { "save-dialog", GIMP_LOG_SAVE_DIALOG },
+ { "image-scale", GIMP_LOG_IMAGE_SCALE },
+ { "shadow-tiles", GIMP_LOG_SHADOW_TILES },
+ { "scale", GIMP_LOG_SCALE },
+ { "wm", GIMP_LOG_WM },
+ { "floating-selection", GIMP_LOG_FLOATING_SELECTION }
};
/* g_parse_debug_string() has special treatment of the string 'help',
diff --git a/app/gimp-log.h b/app/gimp-log.h
index eecdb5f..8c19d96 100644
--- a/app/gimp-log.h
+++ b/app/gimp-log.h
@@ -21,17 +21,18 @@
typedef enum
{
- GIMP_LOG_TOOL_EVENTS = 1 << 0,
- GIMP_LOG_TOOL_FOCUS = 1 << 1,
- GIMP_LOG_DND = 1 << 2,
- GIMP_LOG_HELP = 1 << 3,
- GIMP_LOG_DIALOG_FACTORY = 1 << 4,
- GIMP_LOG_MENUS = 1 << 5,
- GIMP_LOG_SAVE_DIALOG = 1 << 6,
- GIMP_LOG_IMAGE_SCALE = 1 << 7,
- GIMP_LOG_SHADOW_TILES = 1 << 8,
- GIMP_LOG_SCALE = 1 << 9,
- GIMP_LOG_WM = 1 << 10
+ GIMP_LOG_TOOL_EVENTS = 1 << 0,
+ GIMP_LOG_TOOL_FOCUS = 1 << 1,
+ GIMP_LOG_DND = 1 << 2,
+ GIMP_LOG_HELP = 1 << 3,
+ GIMP_LOG_DIALOG_FACTORY = 1 << 4,
+ GIMP_LOG_MENUS = 1 << 5,
+ GIMP_LOG_SAVE_DIALOG = 1 << 6,
+ GIMP_LOG_IMAGE_SCALE = 1 << 7,
+ GIMP_LOG_SHADOW_TILES = 1 << 8,
+ GIMP_LOG_SCALE = 1 << 9,
+ GIMP_LOG_WM = 1 << 10,
+ GIMP_LOG_FLOATING_SELECTION = 1 << 11
} GimpLogFlags;
@@ -72,17 +73,18 @@ void gimp_logv (const gchar *function,
/* need to expand all the short forms
* to make them known constants at compile time
*/
-#define TOOL_EVENTS GIMP_LOG_TOOL_EVENTS
-#define TOOL_FOCUS GIMP_LOG_TOOL_FOCUS
-#define DND GIMP_LOG_DND
-#define HELP GIMP_LOG_HELP
-#define DIALOG_FACTORY GIMP_LOG_DIALOG_FACTORY
-#define MENUS GIMP_LOG_MENUS
-#define SAVE_DIALOG GIMP_LOG_SAVE_DIALOG
-#define IMAGE_SCALE GIMP_LOG_IMAGE_SCALE
-#define SHADOW_TILES GIMP_LOG_SHADOW_TILES
-#define SCALE GIMP_LOG_SCALE
-#define WM GIMP_LOG_WM
+#define TOOL_EVENTS GIMP_LOG_TOOL_EVENTS
+#define TOOL_FOCUS GIMP_LOG_TOOL_FOCUS
+#define DND GIMP_LOG_DND
+#define HELP GIMP_LOG_HELP
+#define DIALOG_FACTORY GIMP_LOG_DIALOG_FACTORY
+#define MENUS GIMP_LOG_MENUS
+#define SAVE_DIALOG GIMP_LOG_SAVE_DIALOG
+#define IMAGE_SCALE GIMP_LOG_IMAGE_SCALE
+#define SHADOW_TILES GIMP_LOG_SHADOW_TILES
+#define SCALE GIMP_LOG_SCALE
+#define WM GIMP_LOG_WM
+#define FLOATING_SELECTION GIMP_LOG_FLOATING_SELECTION
#if 0 /* last resort */
# define GIMP_LOG /* nothing => no varargs, no log */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]