# HG changeset patch
# Node ID cc92ec177835
# Parent  dcfc73ec61c7
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -43,7 +43,6 @@
 
 #include <math.h>
 
-#include "gtkdnd-hints.h"
 #include "gtkblist.h"
 #include "gtkconv.h"
 #include "gtkconvwin.h"
@@ -4120,7 +4119,6 @@
 
 #include <purple.h>
 
-#include "gtkdnd-hints.h"
 #include "gtkblist.h"
 #include "gtkconv.h"
 #include "gtkdialogs.h"
diff --git a/pidgin/gtkdnd-hints.h b/pidgin/gtkdnd-hints.h
deleted file mode 100644
--- a/pidgin/gtkdnd-hints.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Pidgin is the legal property of its developers, whose names are too numerous
- * to list here.  Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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 General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
- */
-
-#if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
-# error "only <pidgin.h> may be included directly"
-#endif
-
-#ifndef _PIDGIN_DND_HINTS_H_
-#define _PIDGIN_DND_HINTS_H_
-
-#include <glib.h>
-#include <gtk/gtk.h>
-
-/**
- * PidginDndHintWindowId:
- * @HINT_ARROW_UP:    Up arrow.
- * @HINT_ARROW_DOWN:  Down arrow.
- * @HINT_ARROW_LEFT:  Left arrow.
- * @HINT_ARROW_RIGHT: Right arrow.
- *
- * Conversation drag-and-drop arrow types.
- */
-typedef enum
-{
-	HINT_ARROW_UP,
-	HINT_ARROW_DOWN,
-	HINT_ARROW_LEFT,
-	HINT_ARROW_RIGHT
-
-} PidginDndHintWindowId;
-
-/**
- * PidginDndHintPosition:
- * @HINT_POSITION_RIGHT:  Position to the right of a tab.
- * @HINT_POSITION_LEFT:   Position to the left of a tab.
- * @HINT_POSITION_TOP:    Position above a tab.
- * @HINT_POSITION_BOTTOM: Position below a tab.
- * @HINT_POSITION_CENTER: Position in the center of a tab.
- *
- * Conversation drag-and-drop arrow positions.
- */
-typedef enum {
-
-	HINT_POSITION_RIGHT,
-	HINT_POSITION_LEFT,
-	HINT_POSITION_TOP,
-	HINT_POSITION_BOTTOM,
-	HINT_POSITION_CENTER
-
-} PidginDndHintPosition;
-
-G_BEGIN_DECLS
-
-/**
- * pidgin_dnd_hints_show:
- * @id: The ID of the hint to show.
- * @x:  The X location to show it at.
- * @y:  The Y location to show it at.
- *
- * Shows a drag-and-drop hint at the specified location.
- */
-void pidgin_dnd_hints_show(PidginDndHintWindowId id, gint x, gint y);
-
-/**
- * pidgin_dnd_hints_hide:
- * @id: The ID of the hint to hide.
- *
- * Hides the specified drag-and-drop hint.
- */
-void pidgin_dnd_hints_hide(PidginDndHintWindowId id);
-
-/**
- * pidgin_dnd_hints_hide_all:
- *
- * Hides all drag-and-drop hints.
- */
-void pidgin_dnd_hints_hide_all(void);
-
-/**
- * pidgin_dnd_hints_show_relative:
- * @id:     The ID of the hint.
- * @widget: The widget that the hint is relative to.
- * @horiz:  The horizontal relative position.
- * @vert:   The vertical relative position.
- *
- * Shows a drag-and-drop hint relative to a widget.
- */
-void pidgin_dnd_hints_show_relative(PidginDndHintWindowId id, GtkWidget *widget,
-							 PidginDndHintPosition horiz, PidginDndHintPosition vert);
-
-G_END_DECLS
-
-#endif /* _PIDGIN_DND_HINTS_H_ */
diff --git a/pidgin/gtkdnd-hints.c b/pidgin/gtkdnd-hints.c
deleted file mode 100644
--- a/pidgin/gtkdnd-hints.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/* pidgin
- *
- * Pidgin is the legal property of its developers, whose names are too numerous
- * to list here.  Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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 General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <purple.h>
-
-#include "gtkdnd-hints.h"
-
-#include <gdk/gdk.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-
-typedef struct
-{
-	GtkWidget *widget;
-	gchar *filename;
-	gint ox;
-	gint oy;
-
-} HintWindowInfo;
-
-/*
- * Info about each hint widget. See PidginDndHintWindowId enum.
- */
-static HintWindowInfo hint_windows[] = {
-	{ NULL, "arrow-up.xpm",   -13/2,     0 },
-	{ NULL, "arrow-down.xpm", -13/2,   -16 },
-	{ NULL, "arrow-left.xpm",     0, -13/2 },
-	{ NULL, "arrow-right.xpm",  -16, -13/2 },
-	{ NULL, NULL, 0, 0 }
-};
-
-static void
-dnd_hints_realized_cb(GtkWidget *window, GtkWidget *pix)
-{
-	GdkPixbuf *pixbuf;
-	cairo_surface_t *surface;
-	cairo_region_t *region;
-	cairo_t *cr;
-
-	pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(pix));
-
-	surface = cairo_image_surface_create(CAIRO_FORMAT_A1,
-	                                     gdk_pixbuf_get_width(pixbuf),
-	                                     gdk_pixbuf_get_height(pixbuf));
-
-	cr = cairo_create(surface);
-	gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0);
-	cairo_paint(cr);
-	cairo_destroy(cr);
-
-	region = gdk_cairo_region_create_from_surface(surface);
-	gtk_widget_shape_combine_region(window, region);
-	cairo_region_destroy(region);
-
-	cairo_surface_destroy(surface);
-}
-
-static GtkWidget *
-dnd_hints_init_window(const gchar *fname)
-{
-	GdkPixbuf *pixbuf;
-	GtkWidget *pix;
-	GtkWidget *win;
-
-	pixbuf = gdk_pixbuf_new_from_file(fname, NULL);
-	g_return_val_if_fail(pixbuf, NULL);
-
-	win = gtk_window_new(GTK_WINDOW_POPUP);
-	pix = gtk_image_new_from_pixbuf(pixbuf);
-	gtk_container_add(GTK_CONTAINER(win), pix);
-	gtk_widget_show_all(pix);
-
-	g_object_unref(G_OBJECT(pixbuf));
-
-	g_signal_connect(G_OBJECT(win), "realize",
-	                 G_CALLBACK(dnd_hints_realized_cb), pix);
-
-	return win;
-}
-
-static void
-get_widget_coords(GtkWidget *w, gint *x1, gint *y1, gint *x2, gint *y2)
-{
-	gint ox, oy, width, height;
-	GtkWidget *parent = gtk_widget_get_parent(w);
-
-	if (parent && gtk_widget_get_window(parent) == gtk_widget_get_window(w))
-	{
-		GtkAllocation allocation;
-
-		gtk_widget_get_allocation(w, &allocation);
-		get_widget_coords(parent, &ox, &oy, NULL, NULL);
-		height = allocation.height;
-		width = allocation.width;
-	}
-	else
-	{
-		GdkWindow *win = gtk_widget_get_window(w);
-		gdk_window_get_origin(win, &ox, &oy);
-		width = gdk_window_get_width(win);
-		height = gdk_window_get_height(win);
-	}
-
-	if (x1) *x1 = ox;
-	if (y1) *y1 = oy;
-	if (x2) *x2 = ox + width;
-	if (y2) *y2 = oy + height;
-}
-
-static void
-dnd_hints_init(void)
-{
-	static gboolean done = FALSE;
-	gint i;
-
-	if (done)
-		return;
-
-	done = TRUE;
-
-	for (i = 0; hint_windows[i].filename != NULL; i++) {
-		gchar *fname;
-
-		fname = g_build_filename(PURPLE_DATADIR, "pixmaps", "pidgin",
-			hint_windows[i].filename, NULL);
-
-		hint_windows[i].widget = dnd_hints_init_window(fname);
-
-		g_free(fname);
-	}
-}
-
-void
-pidgin_dnd_hints_hide_all(void)
-{
-	gint i;
-
-	for (i = 0; hint_windows[i].filename != NULL; i++)
-		pidgin_dnd_hints_hide(i);
-}
-
-void
-pidgin_dnd_hints_hide(PidginDndHintWindowId i)
-{
-	GtkWidget *w = hint_windows[i].widget;
-
-	if (w && GTK_IS_WIDGET(w))
-		gtk_widget_hide(w);
-}
-
-void
-pidgin_dnd_hints_show(PidginDndHintWindowId id, gint x, gint y)
-{
-	GtkWidget *w;
-
-	dnd_hints_init();
-
-	w = hint_windows[id].widget;
-
-	if (w && GTK_IS_WIDGET(w))
-	{
-		gtk_window_move(GTK_WINDOW(w), hint_windows[id].ox + x,
-								 hint_windows[id].oy + y);
-		gtk_widget_show(w);
-	}
-}
-
-void
-pidgin_dnd_hints_show_relative(PidginDndHintWindowId id, GtkWidget *widget,
-						PidginDndHintPosition horiz, PidginDndHintPosition vert)
-{
-	gint x1, x2, y1, y2;
-	gint x = 0, y = 0;
-	GtkAllocation allocation;
-
-	gtk_widget_get_allocation(widget, &allocation);
-
-	get_widget_coords(widget, &x1, &y1, &x2, &y2);
-	x1 += allocation.x;	x2 += allocation.x;
-	y1 += allocation.y;	y2 += allocation.y;
-
-	switch (horiz)
-	{
-		case HINT_POSITION_RIGHT:  x = x2;            break;
-		case HINT_POSITION_LEFT:   x = x1;            break;
-		case HINT_POSITION_CENTER: x = (x1 + x2) / 2; break;
-		default:
-			/* should not happen */
-			g_warning("Invalid parameter to pidgin_dnd_hints_show_relative");
-			break;
-	}
-
-	switch (vert)
-	{
-		case HINT_POSITION_TOP:    y = y1;            break;
-		case HINT_POSITION_BOTTOM: y = y2;            break;
-		case HINT_POSITION_CENTER: y = (y1 + y2) / 2; break;
-		default:
-			/* should not happen */
-			g_warning("Invalid parameter to pidgin_dnd_hints_show_relative");
-			break;
-	}
-
-	pidgin_dnd_hints_show(id, x, y);
-}
-
diff --git a/pidgin/meson.build b/pidgin/meson.build
--- a/pidgin/meson.build
+++ b/pidgin/meson.build
@@ -5,7 +5,6 @@
 	'gtkconn.c',
 	'gtkconv.c',
 	'gtkdialogs.c',
-	'gtkdnd-hints.c',
 	'gtkicon-theme.c',
 	'gtkicon-theme-loader.c',
 	'gtkidle.c',
@@ -71,7 +70,6 @@
 	'gtkconv.h',
 	'gtkconvwin.h',
 	'gtkdialogs.h',
-	'gtkdnd-hints.h',
 	'gtkicon-theme.h',
 	'gtkicon-theme-loader.h',
 	'gtkidle.h',
@@ -137,7 +135,6 @@
 	'gtkaccount.h',
 	'gtkblist.h',
 	'gtkconv.h',
-	'gtkdnd-hints.h',
 	'gtkutils.h',
 	'pidginaccountstore.h',
 	'pidginprotocolstore.h',
diff --git a/pidgin/pixmaps/arrow-down.xpm b/pidgin/pixmaps/arrow-down.xpm
deleted file mode 100644
--- a/pidgin/pixmaps/arrow-down.xpm
+++ /dev/null
@@ -1,49 +0,0 @@
-/* XPM */
-static char * arrow_down_xpm[] = {
-"13 16 30 1",
-" 	c None",
-".	c #5C3566",
-"+	c #D3BBD1",
-"@	c #D5BDD2",
-"#	c #D5BED3",
-"$	c #CFB5CC",
-"%	c #C9ABC6",
-"&	c #623C6C",
-"*	c #D4BDD2",
-"=	c #C2A0BE",
-"-	c #613A6A",
-";	c #BC9FBB",
-">	c #C8AAC5",
-",	c #BB95B7",
-"'	c #623B6B",
-")	c #BEA2BD",
-"!	c #B48BB0",
-"~	c #B58BB0",
-"{	c #BDA1BC",
-"]	c #BEA2BE",
-"^	c #C5A5C2",
-"/	c #AE81A9",
-"(	c #C7A8C3",
-"_	c #BFA3BE",
-":	c #D0B6CD",
-"<	c #BB9FBB",
-"[	c #623C6B",
-"}	c #A787A8",
-"|	c #603A6A",
-"1	c #5E3667",
-"    .....    ",
-"    .+@+.    ",
-"    .@#@.    ",
-"    .@#@.    ",
-"    .@#@.    ",
-"    .@#@.    ",
-"    .@#@.    ",
-"    .@$@.    ",
-"    .@%@.    ",
-"....&*=*&....",
-" -;**>,>**;- ",
-"  ')%!!~%{-  ",
-"   ']^/(;-   ",
-"    '_:<-    ",
-"     [}|     ",
-"      1      "};
diff --git a/pidgin/pixmaps/arrow-left.xpm b/pidgin/pixmaps/arrow-left.xpm
deleted file mode 100644
--- a/pidgin/pixmaps/arrow-left.xpm
+++ /dev/null
@@ -1,46 +0,0 @@
-/* XPM */
-static char * arrow_left_xpm[] = {
-"16 13 30 1",
-" 	c None",
-".	c #5C3566",
-"+	c #613A6A",
-"@	c #623B6B",
-"#	c #BC9FBB",
-"$	c #C0A5BF",
-"%	c #D5BDD2",
-"&	c #C0A5C0",
-"*	c #D4BCD1",
-"=	c #623C6C",
-"-	c #623C6B",
-";	c #C2A6C1",
-">	c #D5BED3",
-",	c #D3BBD1",
-"'	c #5E3667",
-")	c #A787A8",
-"!	c #D2B9CF",
-"~	c #C2A0BE",
-"{	c #C19FBE",
-"]	c #C2A1BF",
-"^	c #C3A1BF",
-"/	c #C3A2C0",
-"(	c #603A6A",
-"_	c #BB9FBB",
-":	c #C7A8C3",
-"<	c #AE81A9",
-"[	c #D4BDD2",
-"}	c #D3BBD0",
-"|	c #C7A7C3",
-"1	c #BDA1BC",
-"      .         ",
-"     +.         ",
-"    @#.         ",
-"   @$%.         ",
-"  @&*%=.........",
-" -;*>*%%%%%%%%,.",
-"')!~{{]^^^^^^/%.",
-" (_:<]*[[[[[[[}.",
-"  +#|*=.........",
-"   +1[.         ",
-"    +#.         ",
-"     +.         ",
-"      .         "};
diff --git a/pidgin/pixmaps/arrow-right.xpm b/pidgin/pixmaps/arrow-right.xpm
deleted file mode 100644
--- a/pidgin/pixmaps/arrow-right.xpm
+++ /dev/null
@@ -1,46 +0,0 @@
-/* XPM */
-static char * arrow_right_xpm[] = {
-"16 13 30 1",
-" 	c None",
-".	c #5C3566",
-"+	c #613A6A",
-"@	c #BC9FBB",
-"#	c #623B6B",
-"$	c #D5BDD2",
-"%	c #C0A5BF",
-"&	c #623C6C",
-"*	c #D4BCD1",
-"=	c #C0A5C0",
-"-	c #D3BBD1",
-";	c #D5BED3",
-">	c #C2A6C1",
-",	c #623C6B",
-"'	c #C3A2C0",
-")	c #C3A1BF",
-"!	c #C2A1BF",
-"~	c #C19FBE",
-"{	c #C2A0BE",
-"]	c #D2B9CF",
-"^	c #A787A8",
-"/	c #5E3667",
-"(	c #D3BBD0",
-"_	c #D4BDD2",
-":	c #AE81A9",
-"<	c #C7A8C3",
-"[	c #BB9FBB",
-"}	c #603A6A",
-"|	c #C7A7C3",
-"1	c #BDA1BC",
-"         .      ",
-"         .+     ",
-"         .@#    ",
-"         .$%#   ",
-".........&$*=#  ",
-".-$$$$$$$$*;*>, ",
-".$'))))))!~~{]^/",
-".(_______*!:<[} ",
-".........&*|@+  ",
-"         ._1+   ",
-"         .@+    ",
-"         .+     ",
-"         .      "};
diff --git a/pidgin/pixmaps/arrow-up.xpm b/pidgin/pixmaps/arrow-up.xpm
deleted file mode 100644
--- a/pidgin/pixmaps/arrow-up.xpm
+++ /dev/null
@@ -1,49 +0,0 @@
-/* XPM */
-static char * arrow_up_xpm[] = {
-"13 16 30 1",
-" 	c None",
-".	c #5E3667",
-"+	c #623C6B",
-"@	c #A787A8",
-"#	c #603A6A",
-"$	c #623B6B",
-"%	c #C2A6C1",
-"&	c #D4BDD2",
-"*	c #BEA2BD",
-"=	c #613A6A",
-"-	c #C0A5C0",
-";	c #D4BCD1",
-">	c #D5BED3",
-",	c #BEA3BE",
-"'	c #C0A5BF",
-")	c #BFA3BE",
-"!	c #BC9FBB",
-"~	c #D5BDD2",
-"{	c #D1B8CF",
-"]	c #CFB5CC",
-"^	c #5C3566",
-"/	c #623C6C",
-"(	c #C9ACC6",
-"_	c #C4A4C1",
-":	c #BF9BBB",
-"<	c #B992B4",
-"[	c #B389AE",
-"}	c #AF83AA",
-"|	c #B084AB",
-"1	c #D3BBD0",
-"      .      ",
-"     +@#     ",
-"    $%&*=    ",
-"   $-;>;,=   ",
-"  $';>>>;)=  ",
-" =!~~{]{~~!= ",
-"^^^^/~(~/^^^^",
-"    ^~_~^    ",
-"    ^&:&^    ",
-"    ^&<&^    ",
-"    ^&[&^    ",
-"    ^&}&^    ",
-"    ^&}&^    ",
-"    ^&|&^    ",
-"    ^1&1^    ",
-"    ^^^^^    "};
diff --git a/pidgin/pixmaps/meson.build b/pidgin/pixmaps/meson.build
--- a/pidgin/pixmaps/meson.build
+++ b/pidgin/pixmaps/meson.build
@@ -3,8 +3,7 @@
 subdir('emotes')
 
 if INSTALL_PIXMAPS
-	install_data('logo.png', 'arrow-down.xpm', 'arrow-left.xpm', 'arrow-right.xpm', 'arrow-up.xpm',
-	    install_dir : pidginpixmapdir)
+	install_data('logo.png', install_dir : pidginpixmapdir)
 
 	# Some of these don't use install_subdir because it deletes the target,
 	# and some target directories probably have something in them, for those
