mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Add GTK_TARGET_OTHER_{APP,WIDGET} to restrict drags within an
2007-04-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtkdnd.[hc]: Add GTK_TARGET_OTHER_{APP,WIDGET} to restrict drags within an application/widget. (#163141, Jorn Baayen) svn path=/trunk/; revision=17676
This commit is contained in:
parent
2dcdcfe4df
commit
065d1560e6
@ -1,3 +1,9 @@
|
||||
2007-04-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkdnd.[hc]: Add GTK_TARGET_OTHER_{APP,WIDGET} to
|
||||
restrict drags within an application/widget. (#163141,
|
||||
Jorn Baayen)
|
||||
|
||||
2007-04-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* docs/tools/Makefile.am:
|
||||
|
@ -1,3 +1,7 @@
|
||||
2007-04-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkdnd.sgml: Document GTK_TARGET_OTHER_*
|
||||
|
||||
2007-04-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkcomboboxentry.sgml: Mention that the entry
|
||||
|
@ -69,6 +69,12 @@ constraints on an entry in a #GtkTargetTable.
|
||||
@GTK_TARGET_SAME_WIDGET:
|
||||
If this is set, the target will only be selected
|
||||
for drags within a single widget.
|
||||
@GTK_TARGET_OTHER_APP:
|
||||
If this is set, the target will not be selected
|
||||
for drags within a single application. Since 2.12
|
||||
@GTK_TARGET_OTHER_WIDGET:
|
||||
If this is set, the target will not be selected
|
||||
for drags withing a single widget. Since 2.12
|
||||
|
||||
<!-- ##### FUNCTION gtk_drag_dest_set ##### -->
|
||||
<para>
|
||||
|
@ -1520,7 +1520,9 @@ gtk_drag_dest_find_target (GtkWidget *widget,
|
||||
if (tmp_source->data == GUINT_TO_POINTER (pair->target))
|
||||
{
|
||||
if ((!(pair->flags & GTK_TARGET_SAME_APP) || source_widget) &&
|
||||
(!(pair->flags & GTK_TARGET_SAME_WIDGET) || (source_widget == widget)))
|
||||
(!(pair->flags & GTK_TARGET_SAME_WIDGET) || (source_widget == widget)) &&
|
||||
(!(pair->flags & GTK_TARGET_OTHER_APP) || !source_widget) &&
|
||||
(!(pair->flags & GTK_TARGET_OTHER_WIDGET) || (source_widget != widget)))
|
||||
return pair->target;
|
||||
else
|
||||
break;
|
||||
|
@ -46,7 +46,9 @@ typedef enum {
|
||||
*/
|
||||
typedef enum {
|
||||
GTK_TARGET_SAME_APP = 1 << 0, /*< nick=same-app >*/
|
||||
GTK_TARGET_SAME_WIDGET = 1 << 1 /*< nick=same-widget >*/
|
||||
GTK_TARGET_SAME_WIDGET = 1 << 1, /*< nick=same-widget >*/
|
||||
GTK_TARGET_OTHER_APP = 1 << 2, /*< nick=other-app >*/
|
||||
GTK_TARGET_OTHER_WIDGET = 1 << 3 /*< nick=other-widget >*/
|
||||
} GtkTargetFlags;
|
||||
|
||||
/* Destination side */
|
||||
|
Loading…
Reference in New Issue
Block a user