gucharmap r1666 - trunk/gucharmap



Author: chpe
Date: Fri Mar 21 10:53:03 2008
New Revision: 1666
URL: http://svn.gnome.org/viewvc/gucharmap?rev=1666&view=rev

Log:
Don't allow to DND from a cell that's not a valid unicode char (e.g. U+10FFFF).


Modified:
   trunk/gucharmap/gucharmap-chartable.c

Modified: trunk/gucharmap/gucharmap-chartable.c
==============================================================================
--- trunk/gucharmap/gucharmap-chartable.c	(original)
+++ trunk/gucharmap/gucharmap-chartable.c	Fri Mar 21 10:53:03 2008
@@ -1295,12 +1295,13 @@
   gboolean (* motion_notify_event) (GtkWidget *, GdkEventMotion *) =
     GTK_WIDGET_CLASS (gucharmap_chartable_parent_class)->motion_notify_event;
 
-  if ((event->state & GDK_BUTTON1_MASK) != 0 &&
+  if ((event->state & GDK_BUTTON1_MASK) &&
       gtk_drag_check_threshold (widget,
                                 chartable->click_x,
                                 chartable->click_y,
                                 event->x,
-                                event->y))
+                                event->y) &&
+      gucharmap_unichar_validate (gucharmap_chartable_get_active_character (chartable)))
     {
       gtk_drag_begin (widget, chartable->target_list,
                       GDK_ACTION_COPY, 1, (GdkEvent *) event);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]