don't forget to offset the pointer by x/y_offset into the new window when

Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>

        * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
        the pointer by x/y_offset into the new window when we found
        the drag destination.

        * gtk/gtkaccelmap.c (internal_change_entry): fix return code
        for simulation when the entry already contains the required
        accel key and mod.
This commit is contained in:
Tim Janik 2002-01-07 07:59:08 +00:00 committed by Tim Janik
parent ed29c8ddd8
commit 1901d4ebd7
13 changed files with 102 additions and 24 deletions

View File

@ -1,3 +1,13 @@
Mon Jan 7 08:48:23 2002 Tim Janik <timj@gtk.org>
* gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
the pointer by x/y_offset into the new window when we found
the drag destination.
* gtk/gtkaccelmap.c (internal_change_entry): fix return code
for simulation when the entry already contains the required
accel key and mod.
2002-01-06 Matthias Clasen <matthiasc@poet.de>
* docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by

View File

@ -1,3 +1,13 @@
Mon Jan 7 08:48:23 2002 Tim Janik <timj@gtk.org>
* gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
the pointer by x/y_offset into the new window when we found
the drag destination.
* gtk/gtkaccelmap.c (internal_change_entry): fix return code
for simulation when the entry already contains the required
accel key and mod.
2002-01-06 Matthias Clasen <matthiasc@poet.de>
* docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by

View File

@ -1,3 +1,13 @@
Mon Jan 7 08:48:23 2002 Tim Janik <timj@gtk.org>
* gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
the pointer by x/y_offset into the new window when we found
the drag destination.
* gtk/gtkaccelmap.c (internal_change_entry): fix return code
for simulation when the entry already contains the required
accel key and mod.
2002-01-06 Matthias Clasen <matthiasc@poet.de>
* docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by

View File

@ -1,3 +1,13 @@
Mon Jan 7 08:48:23 2002 Tim Janik <timj@gtk.org>
* gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
the pointer by x/y_offset into the new window when we found
the drag destination.
* gtk/gtkaccelmap.c (internal_change_entry): fix return code
for simulation when the entry already contains the required
accel key and mod.
2002-01-06 Matthias Clasen <matthiasc@poet.de>
* docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by

View File

@ -1,3 +1,13 @@
Mon Jan 7 08:48:23 2002 Tim Janik <timj@gtk.org>
* gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
the pointer by x/y_offset into the new window when we found
the drag destination.
* gtk/gtkaccelmap.c (internal_change_entry): fix return code
for simulation when the entry already contains the required
accel key and mod.
2002-01-06 Matthias Clasen <matthiasc@poet.de>
* docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by

View File

@ -1,3 +1,13 @@
Mon Jan 7 08:48:23 2002 Tim Janik <timj@gtk.org>
* gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
the pointer by x/y_offset into the new window when we found
the drag destination.
* gtk/gtkaccelmap.c (internal_change_entry): fix return code
for simulation when the entry already contains the required
accel key and mod.
2002-01-06 Matthias Clasen <matthiasc@poet.de>
* docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by

View File

@ -1,3 +1,13 @@
Mon Jan 7 08:48:23 2002 Tim Janik <timj@gtk.org>
* gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
the pointer by x/y_offset into the new window when we found
the drag destination.
* gtk/gtkaccelmap.c (internal_change_entry): fix return code
for simulation when the entry already contains the required
accel key and mod.
2002-01-06 Matthias Clasen <matthiasc@poet.de>
* docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by

View File

@ -1471,6 +1471,13 @@ If the window shrinks automatically when widgets within it shrink.
@accel_mods:
@Returns:
<!-- ##### FUNCTION gtk_accel_group_get_type ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gtk_accel_group_handle_add ##### -->
<para>
@ -2527,6 +2534,12 @@ Internal function used by #GtkHPaned and #GtkVPaned
@child1_req:
@child2_req:
<!-- ##### MACRO gtk_paned_handle_size ##### -->
<para>
Old name for gtk_paned_set_handle_size().
</para>
<!-- ##### FUNCTION gtk_paned_set_handle_size ##### -->
<para>
Set the the handle size to @size x @size pixels.

View File

@ -38,14 +38,6 @@ An object representing and maintaining a group of accelerators.
</para>
<!-- ##### FUNCTION gtk_accel_group_get_type ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gtk_accel_group_new ##### -->
<para>
@ -68,6 +60,7 @@ Deprecated equivalent of g_object_unref().
</para>
<!-- ##### FUNCTION gtk_accel_group_connect ##### -->
<para>

View File

@ -95,13 +95,6 @@ parameters. This is equivalent to
@child: the child to add
<!-- ##### MACRO gtk_paned_handle_size ##### -->
<para>
Old name for gtk_paned_set_handle_size().
</para>
<!-- ##### MACRO gtk_paned_gutter_size ##### -->
<para>
Old name for gtk_paned_set_gutter_size().

View File

@ -146,6 +146,7 @@ Determines whether @type_class is a type of @otype.
Gets the class of @tobj.
</para>
<!-- # Unused Parameters # -->
@tobj: a #GtkObject.

View File

@ -212,6 +212,10 @@ g_hash_table_slist_values (GHashTable *hash_table)
return slist;
}
/* if simulate==TRUE, return whether accel_path can be changed to
* accel_key && accel_mods. otherwise, return whether accel_path
* was actually changed.
*/
static gboolean
internal_change_entry (const gchar *accel_path,
guint accel_key,
@ -220,7 +224,7 @@ internal_change_entry (const gchar *accel_path,
gboolean simulate)
{
GSList *node, *slist, *win_list, *group_list, *replace_list = NULL;
GHashTable *group_hm, *win_hm;
GHashTable *group_hm, *window_hm;
gboolean change_accel, removable, can_change = TRUE, seen_accel = FALSE;
GQuark entry_quark;
AccelEntry *entry = accel_path_lookup (accel_path);
@ -241,7 +245,11 @@ internal_change_entry (const gchar *accel_path,
/* if there's nothing to change, not much todo either */
if (entry->accel_key == accel_key && entry->accel_mods == accel_mods)
return FALSE;
{
if (!simulate)
entry->changed = TRUE;
return simulate ? TRUE : FALSE;
}
/* nobody's interested, easy going */
if (!entry->groups)
@ -258,7 +266,7 @@ internal_change_entry (const gchar *accel_path,
/* 1) fetch all accel groups affected by this entry */
entry_quark = g_quark_try_string (entry->accel_path);
group_hm = g_hash_table_new (NULL, NULL);
win_hm = g_hash_table_new (NULL, NULL);
window_hm = g_hash_table_new (NULL, NULL);
for (slist = entry->groups; slist; slist = slist->next)
g_hash_table_insert (group_hm, slist->data, slist->data);
@ -269,13 +277,13 @@ internal_change_entry (const gchar *accel_path,
GtkAccelGroup *group = slist->data;
for (node = group->acceleratables; node; node = node->next)
g_hash_table_insert (win_hm, node->data, node->data);
g_hash_table_insert (window_hm, node->data, node->data);
}
g_slist_free (group_list);
/* 3) include all accel groups used by acceleratables */
win_list = g_hash_table_slist_values (win_hm);
g_hash_table_destroy (win_hm);
win_list = g_hash_table_slist_values (window_hm);
g_hash_table_destroy (window_hm);
for (slist = win_list; slist; slist = slist->next)
for (node = gtk_accel_groups_from_object (slist->data); node; node = node->next)
g_hash_table_insert (group_hm, node->data, node->data);

View File

@ -1266,7 +1266,7 @@ gtk_drag_find_widget (GtkWidget *widget,
new_allocation.x -= tx;
new_allocation.y -= ty;
}
while (window && window != widget->parent->window)
{
gdk_window_get_size (window, &twidth, &theight);
@ -1342,8 +1342,8 @@ gtk_drag_find_widget (GtkWidget *widget,
{
data->found = data->callback (widget,
data->context,
data->x - new_allocation.x,
data->y - new_allocation.y,
data->x - new_allocation.x - x_offset,
data->y - new_allocation.y - y_offset,
data->time);
/* If so, send a "drag_leave" to the last widget */
if (data->found)