[gtk+] Drop unused code
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Drop unused code
- Date: Sat, 13 Sep 2014 02:32:06 +0000 (UTC)
commit 6064fc343eedd34ecc4d8cba5ed6b3a03517deaf
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Sep 12 22:31:25 2014 -0400
Drop unused code
Not worth keeping this around.
gtk/gtkdnd.c | 78 ----------------------------------------------------------
1 files changed, 0 insertions(+), 78 deletions(-)
---
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 16a095d..6d2ad0e 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -935,84 +935,6 @@ gtk_drag_get_cursor (GtkWidget *widget,
ensure_drag_cursor_pixbuf (i);
cursor_surface = gdk_cairo_surface_create_from_pixbuf (drag_cursors[i].pixbuf, 1, NULL);
}
- else
- {
-#if 0
- /* The code below is an attempt to let cursor themes
- * determine the attachment of the icon to enable things
- * like the following:
- *
- * +-----+
- * | |
- * | ||
- * +-----+|
- * ---+
- *
- * It does not work since Xcursor doesn't allow to attach
- * any additional information to cursors in a retrievable
- * way (there are comments, but no way to get at them
- * short of searching for the actual cursor file).
- * If this code ever gets used, the icon_window placement
- * must be changed to recognize these placement options
- * as well. Note that this code ignores info->hot_x/y.
- */
- for (j = 0; j < 10; j++)
- {
- const gchar *opt;
- gchar key[32];
- gchar **toks;
- GtkAnchorType icon_anchor;
-
- g_snprintf (key, 32, "comment%d", j);
- opt = gdk_pixbuf_get_option (cursor_pixbuf, key);
- if (opt && g_str_has_prefix ("icon-attach:", opt))
- {
- toks = g_strsplit (opt + strlen ("icon-attach:"), "'", -1);
- if (g_strv_length (toks) != 3)
- {
- g_strfreev (toks);
- break;
- }
- icon_anchor = atoi (toks[0]);
- icon_x = atoi (toks[1]);
- icon_y = atoi (toks[2]);
-
- switch (icon_anchor)
- {
- case GTK_ANCHOR_NORTH:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_SOUTH:
- icon_x += icon_width / 2;
- break;
- case GTK_ANCHOR_NORTH_EAST:
- case GTK_ANCHOR_EAST:
- case GTK_ANCHOR_SOUTH_EAST:
- icon_x += icon_width;
- break;
- default: ;
- }
-
- switch (icon_anchor)
- {
- case GTK_ANCHOR_WEST:
- case GTK_ANCHOR_CENTER:
- case GTK_ANCHOR_EAST:
- icon_y += icon_height / 2;
- break;
- case GTK_ANCHOR_SOUTH_WEST:
- case GTK_ANCHOR_SOUTH:
- case GTK_ANCHOR_SOUTH_EAST:
- icon_x += icon_height;
- break;
- default: ;
- }
-
- g_strfreev (toks);
- break;
- }
- }
-#endif
- }
get_surface_size (cursor_surface, &cursor_width, &cursor_height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]