pidgin/pidgin

Rename PidginBuddyList->tip_rect to drag_rect.

2021-06-07, Elliott Sales de Andrade
2405744f8193
Parents 60f4b2a6d66a
Children 1c25eac61c19
Rename PidginBuddyList->tip_rect to drag_rect.

It's not used for tooltips at all, but during drag'n'drop.

Testing Done:
Compile only.

Reviewed at https://reviews.imfreedom.org/r/732/
--- a/pidgin/gtkblist.c Mon Jun 07 22:15:46 2021 -0500
+++ b/pidgin/gtkblist.c Mon Jun 07 23:10:41 2021 -0500
@@ -3094,9 +3094,14 @@
PurpleBlistNode *node;
PidginBlistNode *gtknode;
- if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), gtkblist->tip_rect.x, gtkblist->tip_rect.y + (gtkblist->tip_rect.height/2),
- &path, NULL, NULL, NULL))
+ if (!gtk_tree_view_get_path_at_pos(
+ GTK_TREE_VIEW(tv),
+ gtkblist->drag_rect.x,
+ gtkblist->drag_rect.y + (gtkblist->drag_rect.height/2),
+ &path, NULL, NULL, NULL))
+ {
return FALSE;
+ }
gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &iter, path);
gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &node, -1);
@@ -3163,8 +3168,11 @@
delay = 900;
if (gtkblist->drag_timeout) {
- if ((y > gtkblist->tip_rect.y) && ((y - gtkblist->tip_rect.height) < gtkblist->tip_rect.y))
+ if (y > gtkblist->drag_rect.y &&
+ (y - gtkblist->drag_rect.height) < gtkblist->drag_rect.y)
+ {
return FALSE;
+ }
/* We've left the cell. Remove the timeout and create a new one below */
g_source_remove(gtkblist->drag_timeout);
}
@@ -3183,8 +3191,7 @@
rect.height = rect.height / 3;
rect.y += rect.height;
- gtkblist->tip_rect = rect;
-
+ gtkblist->drag_rect = rect;
gtkblist->drag_timeout = g_timeout_add(delay, (GSourceFunc)pidgin_blist_expand_timeout, tv);
if (gtkblist->mouseover_contact) {
--- a/pidgin/gtkblist.h Mon Jun 07 22:15:46 2021 -0500
+++ b/pidgin/gtkblist.h Mon Jun 07 23:10:41 2021 -0500
@@ -62,8 +62,8 @@
* @refresh_timer: The timer for refreshing every 30 seconds
* @timeout: The timeout for the tooltip.
* @drag_timeout: The timeout for expanding contacts on drags
- * @tip_rect: This is the bounding rectangle of the cell we're
- * currently hovering over. This is used for tooltips.
+ * @drag_rect: This is the bounding rectangle of the cell we're
+ * currently hovering over. This is used for drag'n'drop.
* @contact_rect: This is the bounding rectangle of the contact node and
* its children. This is used for auto-expand on mouseover.
* @mouseover_contact: This is the contact currently mouse-over expanded
@@ -105,7 +105,7 @@
guint timeout;
guint drag_timeout;
- GdkRectangle tip_rect;
+ GdkRectangle drag_rect;
GdkRectangle contact_rect;
PurpleBlistNode *mouseover_contact;