Commit b9a63e1b authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/display/gimpdisplayshell-dnd.c app/widgets/gimpdnd-xds.c use

2007-11-15  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpselectiondata.c: use GIMP_LOG(DND) here too.


svn path=/trunk/; revision=24164
parent df792bf8
2007-11-15 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-dnd.c
* app/widgets/gimpdnd-xds.c
* app/widgets/gimpselectiondata.c: use GIMP_LOG(DND) here too.
2007-11-15 Michael Natterer <mitch@gimp.org>
* app/gimp-log.[ch]: add DND log domain.
......
......@@ -56,18 +56,10 @@
#include "gimpdisplayshell-dnd.h"
#include "gimpdisplayshell-transform.h"
#include "gimp-log.h"
#include "gimp-intl.h"
/* #define DEBUG_DND */
#ifdef DEBUG_DND
#define D(stmnt) stmnt
#else
#define D(stmnt)
#endif
/* local function prototypes */
static void gimp_display_shell_drop_drawable (GtkWidget *widget,
......@@ -193,7 +185,7 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
GType new_type;
GimpItem *new_item;
D (g_print ("drop drawable on canvas\n"));
GIMP_LOG (DND, NULL);
if (image->gimp->busy)
return;
......@@ -246,7 +238,7 @@ gimp_display_shell_drop_vectors (GtkWidget *widget,
GimpImage *image = shell->display->image;
GimpItem *new_item;
D (g_print ("drop vectors on canvas\n"));
GIMP_LOG (DND, NULL);
if (image->gimp->busy)
return;
......@@ -281,7 +273,7 @@ gimp_display_shell_drop_svg (GtkWidget *widget,
GimpImage *image = shell->display->image;
GError *error = NULL;
D (g_print ("drop SVG on canvas\n"));
GIMP_LOG (DND, NULL);
if (image->gimp->busy)
return;
......@@ -349,7 +341,7 @@ gimp_display_shell_drop_pattern (GtkWidget *widget,
GimpViewable *viewable,
gpointer data)
{
D (g_print ("drop pattern on canvas\n"));
GIMP_LOG (DND, NULL);
if (GIMP_IS_PATTERN (viewable))
gimp_display_shell_dnd_bucket_fill (GIMP_DISPLAY_SHELL (data),
......@@ -364,7 +356,7 @@ gimp_display_shell_drop_color (GtkWidget *widget,
const GimpRGB *color,
gpointer data)
{
D (g_print ("drop color on canvas\n"));
GIMP_LOG (DND, NULL);
gimp_display_shell_dnd_bucket_fill (GIMP_DISPLAY_SHELL (data),
GIMP_FG_BUCKET_FILL,
......@@ -383,7 +375,7 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
GimpBuffer *buffer;
gint x, y, width, height;
D (g_print ("drop buffer on canvas\n"));
GIMP_LOG (DND, NULL);
if (image->gimp->busy)
return;
......@@ -413,7 +405,7 @@ gimp_display_shell_drop_uri_list (GtkWidget *widget,
GimpContext *context = gimp_get_user_context (image->gimp);
GList *list;
D (g_print ("drop uri list on canvas\n"));
GIMP_LOG (DND, NULL);
for (list = uri_list; list; list = g_list_next (list))
{
......@@ -473,7 +465,7 @@ gimp_display_shell_drop_component (GtkWidget *widget,
GimpItem *new_item;
const gchar *desc;
D (g_print ("drop component on canvas\n"));
GIMP_LOG (DND, NULL);
if (dest_image->gimp->busy)
return;
......@@ -527,7 +519,7 @@ gimp_display_shell_drop_pixbuf (GtkWidget *widget,
GimpImage *image = shell->display->image;
GimpLayer *new_layer;
D (g_print ("drop pixbuf on canvas\n"));
GIMP_LOG (DND, NULL);
if (image->gimp->busy)
return;
......
......@@ -49,16 +49,10 @@
#include "gimpmessagebox.h"
#include "gimpmessagedialog.h"
#include "gimp-log.h"
#include "gimp-intl.h"
#ifdef DEBUG_DND
#define D(stmnt) stmnt
#else
#define D(stmnt)
#endif
#define MAX_URI_LEN 4096
......@@ -79,7 +73,7 @@ gimp_dnd_xds_source_set (GdkDragContext *context,
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
g_return_if_fail (image == NULL || GIMP_IS_IMAGE (image));
D (g_printerr ("\ngimp_dnd_xds_source_set\n"));
GIMP_LOG (DND, NULL);
property = gdk_atom_intern_static_string ("XdndDirectSave0");
......@@ -131,7 +125,7 @@ gimp_dnd_xds_save_image (GdkDragContext *context,
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
g_return_if_fail (GIMP_IS_IMAGE (image));
D (g_printerr ("\ngimp_dnd_xds_save_image\n"));
GIMP_LOG (DND, NULL);
property = gdk_atom_intern_static_string ("XdndDirectSave0");
type = gdk_atom_intern_static_string ("text/plain");
......
......@@ -52,18 +52,10 @@
#include "gimpselectiondata.h"
#include "gimp-log.h"
#include "gimp-intl.h"
/* #define DEBUG_DND */
#ifdef DEBUG_DND
#define D(stmnt) stmnt
#else
#define D(stmnt)
#endif
/* local function prototypes */
static gchar * gimp_selection_data_get_name (GtkSelectionData *selection);
......@@ -131,7 +123,7 @@ gimp_selection_data_get_uri_list (GtkSelectionData *selection)
buffer = (const gchar *) selection->data;
D (g_print ("%s: raw buffer >>%s<<\n", G_STRFUNC, buffer));
GIMP_LOG (DND, "raw buffer >>%s<<", buffer);
{
gchar name_buffer[1024];
......@@ -174,8 +166,7 @@ gimp_selection_data_get_uri_list (GtkSelectionData *selection)
gchar *uri = NULL;
GError *error = NULL;
D (g_print ("%s: trying to convert \"%s\" to an uri.\n",
G_STRFUNC, dnd_crap));
GIMP_LOG (DND, "trying to convert \"%s\" to an uri", dnd_crap);
filename = g_filename_from_uri (dnd_crap, &hostname, NULL);
......@@ -668,7 +659,7 @@ gimp_selection_data_get_name (GtkSelectionData *selection)
return NULL;
}
D (g_printerr ("%s: name = '%s'\n", G_STRFUNC, name));
GIMP_LOG (DND, "name = '%s'", name);
return name;
}
......@@ -693,8 +684,8 @@ gimp_selection_data_get_object (GtkSelectionData *selection,
{
gchar *name = str + name_offset;
D (g_printerr ("%s: pid = %d, addr = %p, name = '%s'\n",
G_STRFUNC, pid, object_addr, name));
GIMP_LOG (DND, "pid = %d, addr = %p, name = '%s'",
pid, object_addr, name);
if (additional &&
strcmp (name, gimp_object_get_name (additional)) == 0 &&
......
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