Commit b5defd4e authored by Martin Nordholts's avatar Martin Nordholts

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.
parent 86e14c2c
......@@ -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));
......
......@@ -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',
......
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment