--- a/ChangeLog.API Mon Mar 14 01:18:18 2022 -0500
+++ b/ChangeLog.API Thu Mar 17 21:41:10 2022 -0500
@@ -767,6 +767,7 @@
* PidginWindow renamed to PidginConvWindow
+ * conversation-dragging (gtkconv signal) * conversation-timestamp (gtkconv signal)
* conversation-hiding (gtkconv signal)
* GtkIMHtml.clipboard_html_string
--- a/pidgin/gtkaccount.c Mon Mar 14 01:18:18 2022 -0500
+++ b/pidgin/gtkaccount.c Thu Mar 17 21:41:10 2022 -0500
@@ -74,7 +74,6 @@
GtkWidget *delete_button;
GtkTreeViewColumn *username_col;
@@ -349,42 +348,6 @@
-account_dnd_recv(GtkWidget *widget, GdkDragContext *dc, gint x, gint y,
- GtkSelectionData *sd, guint info, guint t, AccountPrefsDialog *dialog)
- const gchar *name = (gchar *)gtk_selection_data_get_data(sd);
- gint length = gtk_selection_data_get_length(sd);
- gint format = gtk_selection_data_get_format(sd);
- if ((length >= 0) && (format == 8)) {
- /* Well, it looks like the drag event was cool.
- * Let's do something with it */
- if (!g_ascii_strncasecmp(name, "file://", 7)) {
- GError *converr = NULL;
- /* It looks like we're dealing with a local file. */
- if(!(tmp = g_filename_from_uri(name, NULL, &converr))) {
- purple_debug_error("buddyicon", "%s",
- converr ? converr->message :
- "g_filename_from_uri error");
- if ((rtmp = strchr(tmp, '\r')) || (rtmp = strchr(tmp, '\n')))
- data = pidgin_convert_buddy_icon(dialog->protocol, tmp, &len);
- /* This takes ownership of tmp */
- set_dialog_icon(dialog, data, len, tmp);
- gtk_drag_finish(dc, TRUE, FALSE, t);
- gtk_drag_finish(dc, FALSE, FALSE, t);
update_editable(PurpleConnection *gc, AccountPrefsDialog *dialog)
@@ -1514,12 +1477,6 @@
-static const GtkTargetEntry dnd_targets[] = {
- {"text/uri-list", 0, 1},
pidgin_account_dialog_show_continue(PidginAccountDialogType type,
@@ -1625,17 +1582,6 @@
gtk_widget_set_sensitive(dialog->ok_button, FALSE);
- gtk_drag_dest_set(dialog->window,
- GTK_DEST_DEFAULT_MOTION |
- sizeof(dnd_targets) / sizeof(GtkTargetEntry),
- g_signal_connect(G_OBJECT(dialog->window), "drag_data_received",
- G_CALLBACK(account_dnd_recv), dialog);
@@ -1801,141 +1747,6 @@
-drag_data_get_cb(GtkWidget *widget, GdkDragContext *ctx,
- GtkSelectionData *data, guint info, guint time,
- AccountsWindow *dialog)
- GdkAtom target = gtk_selection_data_get_target(data);
- if (target == gdk_atom_intern("PURPLE_ACCOUNT", FALSE)) {
- GtkTreeRowReference *ref;
- GtkTreePath *source_row;
- PurpleAccount *account = NULL;
- ref = g_object_get_data(G_OBJECT(ctx), "gtk-tree-view-source-row");
- source_row = gtk_tree_row_reference_get_path(ref);
- if (source_row == NULL)
- gtk_tree_model_get_iter(GTK_TREE_MODEL(dialog->model), &iter,
- gtk_tree_model_get_value(GTK_TREE_MODEL(dialog->model), &iter,
- dialog->drag_iter = iter;
- account = g_value_get_pointer(&val);
- gtk_selection_data_set(data, gdk_atom_intern("PURPLE_ACCOUNT", FALSE),
- 8, (void *)&account, sizeof(account));
- gtk_tree_path_free(source_row);
-move_account_after(GtkListStore *store, GtkTreeIter *iter,
- PurpleAccount *account;
- gtk_tree_model_get(GTK_TREE_MODEL(store), iter,
- gtk_list_store_insert_after(store, &new_iter, position);
- set_account(store, &new_iter, account, NULL);
- gtk_list_store_remove(store, iter);
-move_account_before(GtkListStore *store, GtkTreeIter *iter,
- PurpleAccount *account;
- gtk_tree_model_get(GTK_TREE_MODEL(store), iter,
- gtk_list_store_insert_before(store, &new_iter, position);
- set_account(store, &new_iter, account, NULL);
- gtk_list_store_remove(store, iter);
-drag_data_received_cb(GtkWidget *widget, GdkDragContext *ctx,
- guint x, guint y, GtkSelectionData *sd,
- guint info, guint t, AccountsWindow *dialog)
- GdkAtom target = gtk_selection_data_get_target(sd);
- const guchar *data = gtk_selection_data_get_data(sd);
- if (target == gdk_atom_intern("PURPLE_ACCOUNT", FALSE) && data) {
- PurpleAccount *a = NULL;
- GtkTreePath *path = NULL;
- GtkTreeViewDropPosition position;
- memcpy(&a, data, sizeof(a));
- if (gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(widget), x, y,
- PurpleAccount *account;
- PurpleAccountManager *manager = NULL;
- GList *accounts = NULL;
- gtk_tree_model_get_iter(GTK_TREE_MODEL(dialog->model), &iter, path);
- gtk_tree_model_get_value(GTK_TREE_MODEL(dialog->model), &iter,
- account = g_value_get_pointer(&val);
- manager = purple_account_manager_get_default();
- accounts = purple_account_manager_get_all(manager);
- case GTK_TREE_VIEW_DROP_AFTER:
- case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
- move_account_after(dialog->model, &dialog->drag_iter,
- dest_index = g_list_index(accounts, account) + 1;
- case GTK_TREE_VIEW_DROP_BEFORE:
- case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
- dest_index = g_list_index(accounts, account);
- move_account_before(dialog->model, &dialog->drag_iter,
- purple_account_manager_reorder(manager, a, dest_index);
accedit_win_destroy_cb(GtkWidget *w, GdkEvent *event, AccountsWindow *dialog)
@@ -2271,7 +2082,6 @@
- GtkTargetEntry gte[] = {{"PURPLE_ACCOUNT", GTK_TARGET_SAME_APP, 0}};
frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
@@ -2308,19 +2118,6 @@
populate_accounts_list(dialog);
- /* Setup DND. I wanna be an orc! */
- gtk_tree_view_enable_model_drag_source(
- GTK_TREE_VIEW(treeview), GDK_BUTTON1_MASK, gte,
- gtk_tree_view_enable_model_drag_dest(
- GTK_TREE_VIEW(treeview), gte, 1,
- GDK_ACTION_COPY | GDK_ACTION_MOVE);
- g_signal_connect(G_OBJECT(treeview), "drag-data-received",
- G_CALLBACK(drag_data_received_cb), dialog);
- g_signal_connect(G_OBJECT(treeview), "drag-data-get",
- G_CALLBACK(drag_data_get_cb), dialog);
gtk_widget_show_all(frame);
--- a/pidgin/gtkblist.c Mon Mar 14 01:18:18 2022 -0500
+++ b/pidgin/gtkblist.c Thu Mar 17 21:41:10 2022 -0500
@@ -46,7 +46,6 @@
#include "pidgin/pidgincontactlist.h"
#include "pidgin/pidgincore.h"
#include "pidgin/pidgindebug.h"
-#include "pidgin/pidgindnd.h"
#include "pidgin/pidgingdkpixbuf.h"
#include "pidgin/pidginmooddialog.h"
#include "pidgin/pidginplugininfo.h"
@@ -1909,495 +1908,6 @@
-add_buddies_from_vcard(const char *protocol_id, PurpleGroup *group, GList *list,
- PurpleAccount *account = NULL;
- for (l = purple_connections_get_all(); l != NULL; l = l->next)
- gc = (PurpleConnection *)l->data;
- account = purple_connection_get_account(gc);
- if (purple_strequal(purple_account_get_protocol_id(account), protocol_id))
- for (l = list; l != NULL; l = l->next)
- purple_blist_request_add_buddy(account, l->data,
- (group ? purple_group_get_name(group) : NULL),
- g_list_free_full(list, g_free);
-parse_vcard(const char *vcard, PurpleGroup *group)
- s = temp_vcard = g_strdup(vcard);
- while (*s != '\0' && strncmp(s, "END:vCard", strlen("END:vCard")))
- while (*s != '\r' && *s != '\n' && *s != '\0' && *s != ':')
- if (*s != '\0') *s++ = '\0';
- if ((c = strchr(field, ';')) != NULL)
- /* Proceed to the end of the line */
- while (*s != '\r' && *s != '\n' && *s != '\0')
- if (*s == '\r') *s++ = '\0';
- if (*s == '\n') *s++ = '\0';
- /* We only want to worry about a few fields here. */
- if (purple_strequal(field, "FN"))
- alias = g_strdup(value);
- else if (purple_strequal(field, "X-JABBER"))
- char **values = g_strsplit(value, ":", 0);
- for (im = values; *im != NULL; im++)
- jabbers = g_list_append(jabbers, g_strdup(*im));
- add_buddies_from_vcard("prpl-jabber", group, jabbers, alias);
-static void pidgin_blist_drag_data_get_cb(GtkWidget *widget,
- GtkSelectionData *data,
- GdkAtom target = gtk_selection_data_get_target(data);
- if (target == gdk_atom_intern("PURPLE_BLIST_NODE", FALSE)) {
- GtkTreeRowReference *ref = g_object_get_data(G_OBJECT(dc), "gtk-tree-view-source-row");
- GtkTreePath *sourcerow = gtk_tree_row_reference_get_path(ref);
- PurpleBlistNode *node = NULL;
- gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &iter, sourcerow);
- gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &node, -1);
- gtk_selection_data_set (data,
- gdk_atom_intern ("PURPLE_BLIST_NODE", FALSE),
- gtk_tree_path_free(sourcerow);
- } else if (target == gdk_atom_intern("application/x-im-contact", FALSE)) {
- GtkTreeRowReference *ref;
- GtkTreePath *sourcerow;
- PurpleBlistNode *node = NULL;
- ref = g_object_get_data(G_OBJECT(dc), "gtk-tree-view-source-row");
- sourcerow = gtk_tree_row_reference_get_path(ref);
- gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &iter,
- gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &node, -1);
- if (PURPLE_IS_CONTACT(node))
- buddy = purple_contact_get_priority_buddy((PurpleContact *)node);
- else if (!PURPLE_IS_BUDDY(node))
- gtk_tree_path_free(sourcerow);
- buddy = (PurpleBuddy *)node;
- gc = purple_account_get_connection(purple_buddy_get_account(buddy));
- gtk_tree_path_free(sourcerow);
- purple_protocol_get_list_icon(purple_connection_get_protocol(gc),
- purple_buddy_get_account(buddy), buddy);
- str = g_string_new(NULL);
- "MIME-Version: 1.0\r\n"
- "Content-Type: application/x-im-contact\r\n"
- "X-IM-Protocol: %s\r\n"
- "X-IM-Username: %s\r\n",
- purple_buddy_get_name(buddy));
- if (purple_buddy_get_local_alias(buddy) != NULL)
- g_string_append_printf(str,
- purple_buddy_get_local_alias(buddy));
- g_string_append(str, "\r\n");
- gtk_selection_data_set(data,
- gdk_atom_intern("application/x-im-contact", FALSE),
- (const guchar *)str->str,
- g_string_free(str, TRUE);
- gtk_tree_path_free(sourcerow);
-static void pidgin_blist_drag_data_rcv_cb(GtkWidget *widget, GdkDragContext *dc, guint x, guint y,
- GtkSelectionData *sd, guint info, guint t)
- GdkAtom target = gtk_selection_data_get_target(sd);
- const guchar *data = gtk_selection_data_get_data(sd);
- if (gtkblist->drag_timeout) {
- g_source_remove(gtkblist->drag_timeout);
- gtkblist->drag_timeout = 0;
- if (target == gdk_atom_intern("PURPLE_BLIST_NODE", FALSE) && data) {
- PurpleBlistNode *n = NULL;
- GtkTreePath *path = NULL;
- GtkTreeViewDropPosition position;
- memcpy(&n, data, sizeof(n));
- if(gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(widget), x, y, &path, &position)) {
- /* if we're here, I think it means the drop is ok */
- PidginBlistNode *gtknode;
- gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel),
- gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel),
- &iter, NODE_COLUMN, &node, -1);
- gtknode = g_object_get_data(G_OBJECT(node), UI_DATA);
- if (PURPLE_IS_CONTACT(n)) {
- PurpleContact *c = (PurpleContact*)n;
- if (PURPLE_IS_CONTACT(node) && gtknode->contact_expanded) {
- purple_contact_merge(c, node);
- } else if (PURPLE_IS_CONTACT(node) ||
- PURPLE_IS_CHAT(node)) {
- case GTK_TREE_VIEW_DROP_AFTER:
- case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
- purple_blist_add_contact(c, (PurpleGroup*)node->parent,
- case GTK_TREE_VIEW_DROP_BEFORE:
- case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
- purple_blist_add_contact(c, (PurpleGroup*)node->parent,
- } else if(PURPLE_IS_GROUP(node)) {
- purple_blist_add_contact(c, (PurpleGroup*)node, NULL);
- } else if(PURPLE_IS_BUDDY(node)) {
- purple_contact_merge(c, node);
- } else if (PURPLE_IS_BUDDY(n)) {
- PurpleBuddy *b = (PurpleBuddy*)n;
- if (PURPLE_IS_BUDDY(node)) {
- case GTK_TREE_VIEW_DROP_AFTER:
- case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
- purple_blist_add_buddy(b, (PurpleContact*)node->parent,
- (PurpleGroup*)node->parent->parent, node);
- case GTK_TREE_VIEW_DROP_BEFORE:
- case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
- purple_blist_add_buddy(b, (PurpleContact*)node->parent,
- (PurpleGroup*)node->parent->parent,
- } else if(PURPLE_IS_CHAT(node)) {
- purple_blist_add_buddy(b, NULL, (PurpleGroup*)node->parent,
- } else if (PURPLE_IS_GROUP(node)) {
- purple_blist_add_buddy(b, NULL, (PurpleGroup*)node, NULL);
- } else if (PURPLE_IS_CONTACT(node)) {
- if(gtknode->contact_expanded) {
- case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
- case GTK_TREE_VIEW_DROP_AFTER:
- case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
- purple_blist_add_buddy(b, (PurpleContact*)node,
- (PurpleGroup*)node->parent, NULL);
- case GTK_TREE_VIEW_DROP_BEFORE:
- purple_blist_add_buddy(b, NULL,
- (PurpleGroup*)node->parent, node->prev);
- case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
- case GTK_TREE_VIEW_DROP_AFTER:
- purple_blist_add_buddy(b, NULL,
- (PurpleGroup*)node->parent, NULL);
- case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
- case GTK_TREE_VIEW_DROP_BEFORE:
- purple_blist_add_buddy(b, NULL,
- (PurpleGroup*)node->parent, node->prev);
- } else if (PURPLE_IS_CHAT(n)) {
- PurpleChat *chat = (PurpleChat *)n;
- if (PURPLE_IS_BUDDY(node)) {
- case GTK_TREE_VIEW_DROP_AFTER:
- case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
- case GTK_TREE_VIEW_DROP_BEFORE:
- case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
- purple_blist_add_chat(chat,
- (PurpleGroup*)node->parent->parent,
- } else if(PURPLE_IS_CONTACT(node) ||
- PURPLE_IS_CHAT(node)) {
- case GTK_TREE_VIEW_DROP_AFTER:
- case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
- purple_blist_add_chat(chat, (PurpleGroup*)node->parent, node);
- case GTK_TREE_VIEW_DROP_BEFORE:
- case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
- purple_blist_add_chat(chat, (PurpleGroup*)node->parent, node->prev);
- } else if (PURPLE_IS_GROUP(node)) {
- purple_blist_add_chat(chat, (PurpleGroup*)node, NULL);
- } else if (PURPLE_IS_GROUP(n)) {
- PurpleGroup *g = (PurpleGroup*)n;
- if (PURPLE_IS_GROUP(node)) {
- case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
- case GTK_TREE_VIEW_DROP_AFTER:
- purple_blist_add_group(g, node);
- case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
- case GTK_TREE_VIEW_DROP_BEFORE:
- purple_blist_add_group(g, node->prev);
- } else if(PURPLE_IS_BUDDY(node)) {
- purple_blist_add_group(g, node->parent->parent);
- } else if(PURPLE_IS_CONTACT(node) ||
- PURPLE_IS_CHAT(node)) {
- purple_blist_add_group(g, node->parent);
- gtk_tree_path_free(path);
- gtk_drag_finish(dc, TRUE, (gdk_drag_context_get_actions(dc) == GDK_ACTION_MOVE), t);
- } else if (target == gdk_atom_intern("application/x-im-contact",
- PurpleGroup *group = NULL;
- GtkTreePath *path = NULL;
- GtkTreeViewDropPosition position;
- PurpleAccount *account;
- if (gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(widget),
- x, y, &path, &position))
- gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel),
- gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel),
- &iter, NODE_COLUMN, &node, -1);
- if (PURPLE_IS_BUDDY(node))
- group = (PurpleGroup *)node->parent->parent;
- else if (PURPLE_IS_CHAT(node) ||
- PURPLE_IS_CONTACT(node))
- group = (PurpleGroup *)node->parent;
- else if (PURPLE_IS_GROUP(node))
- group = (PurpleGroup *)node;
- if (pidgin_parse_x_im_contact((const char *)data, FALSE, &account,
- &protocol, &username, &alias))
- purple_notify_error(NULL, NULL,
- _("You are not currently signed on with an account that "
- "can add that buddy."), NULL, NULL);
- purple_blist_request_add_buddy(account, username,
- (group ? purple_group_get_name(group) : NULL),
- gtk_tree_path_free(path);
- gtk_drag_finish(dc, TRUE,
- gdk_drag_context_get_actions(dc) == GDK_ACTION_MOVE, t);
- else if (target == gdk_atom_intern("text/x-vcard", FALSE) && data)
- PurpleGroup *group = NULL;
- GtkTreePath *path = NULL;
- GtkTreeViewDropPosition position;
- if (gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(widget),
- x, y, &path, &position))
- gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel),
- gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel),
- &iter, NODE_COLUMN, &node, -1);
- if (PURPLE_IS_BUDDY(node))
- group = (PurpleGroup *)node->parent->parent;
- else if (PURPLE_IS_CHAT(node) ||
- PURPLE_IS_CONTACT(node))
- group = (PurpleGroup *)node->parent;
- else if (PURPLE_IS_GROUP(node))
- group = (PurpleGroup *)node;
- result = parse_vcard((const gchar *)data, group);
- gtk_drag_finish(dc, result,
- gdk_drag_context_get_actions(dc) == GDK_ACTION_MOVE, t);
- } else if (target == gdk_atom_intern("text/uri-list", FALSE) && data) {
- GtkTreePath *path = NULL;
- GtkTreeViewDropPosition position;
- if (gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(widget),
- x, y, &path, &position))
- gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel),
- gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel),
- &iter, NODE_COLUMN, &node, -1);
- if (PURPLE_IS_BUDDY(node) || PURPLE_IS_CONTACT(node)) {
- PurpleBuddy *b = PURPLE_IS_BUDDY(node) ? PURPLE_BUDDY(node) : purple_contact_get_priority_buddy(PURPLE_CONTACT(node));
- pidgin_dnd_file_manage(sd, purple_buddy_get_account(b), purple_buddy_get_name(b));
- gtk_drag_finish(dc, TRUE,
- gdk_drag_context_get_actions(dc) == GDK_ACTION_MOVE, t);
- gtk_drag_finish(dc, FALSE, FALSE, t);
/* Altered from do_colorshift in gnome-panel */
do_alphashift(GdkPixbuf *pixbuf, int shift)
@@ -2580,52 +2090,6 @@
-static gboolean pidgin_blist_expand_timeout(GtkWidget *tv)
- PidginBlistNode *gtknode;
- if (!gtk_tree_view_get_path_at_pos(
- gtkblist->drag_rect.y + (gtkblist->drag_rect.height/2),
- &path, NULL, NULL, NULL))
- 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);
- if(!PURPLE_IS_CONTACT(node)) {
- gtk_tree_path_free(path);
- gtknode = g_object_get_data(G_OBJECT(node), UI_DATA);
- if (!gtknode->contact_expanded) {
- pidgin_blist_expand_contact_cb(NULL, node);
- gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, >kblist->contact_rect);
- gtkblist->contact_rect.width =
- gdk_window_get_width(gtk_widget_get_window(tv));
- gtkblist->mouseover_contact = node;
- gtk_tree_path_down (path);
- while (gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &i, path)) {
- gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, &rect);
- gtkblist->contact_rect.height += rect.height;
- gtk_tree_path_next(path);
- gtk_tree_path_free(path);
static gboolean buddy_is_displayable(PurpleBuddy *buddy)
PidginBlistNode *gtknode;
@@ -2642,56 +2106,6 @@
purple_blist_node_get_bool(PURPLE_BLIST_NODE(buddy), "show_offline")));
-static gboolean pidgin_blist_drag_motion_cb(GtkWidget *tv, GdkDragContext *drag_context,
- gint x, gint y, guint time, gpointer user_data)
- * When dragging a buddy into a contact, this is the delay before
- * the contact auto-expands.
- if (gtkblist->drag_timeout) {
- if (y > gtkblist->drag_rect.y &&
- (y - gtkblist->drag_rect.height) < gtkblist->drag_rect.y)
- /* We've left the cell. Remove the timeout and create a new one below */
- g_source_remove(gtkblist->drag_timeout);
- gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), x, y, &path, NULL, NULL, NULL);
- gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, &rect);
- gtk_tree_path_free(path);
- /* Only autoexpand when in the middle of the cell to avoid annoying un-intended expands */
- if (y < rect.y + (rect.height / 3) ||
- y > rect.y + (2 * (rect.height /3)))
- rect.height = rect.height / 3;
- gtkblist->drag_rect = rect;
- gtkblist->drag_timeout = g_timeout_add(delay, (GSourceFunc)pidgin_blist_expand_timeout, tv);
- if (gtkblist->mouseover_contact) {
- if ((y < gtkblist->contact_rect.y) || ((y - gtkblist->contact_rect.height) > gtkblist->contact_rect.y)) {
- pidgin_blist_collapse_contact_cb(NULL, gtkblist->mouseover_contact);
- gtkblist->mouseover_contact = NULL;
@@ -2941,34 +2355,6 @@
-static gboolean pidgin_blist_motion_cb (GtkWidget *tv, GdkEventMotion *event, gpointer null)
- if (gtkblist->mouseover_contact) {
- if ((event->y < gtkblist->contact_rect.y) || ((event->y - gtkblist->contact_rect.height) > gtkblist->contact_rect.y)) {
- pidgin_blist_collapse_contact_cb(NULL, gtkblist->mouseover_contact);
- gtkblist->mouseover_contact = NULL;
-static gboolean pidgin_blist_leave_cb (GtkWidget *w, GdkEventCrossing *e, gpointer n)
- if (gtkblist->drag_timeout) {
- g_source_remove(gtkblist->drag_timeout);
- gtkblist->drag_timeout = 0;
- if (gtkblist->mouseover_contact &&
- !((e->x > gtkblist->contact_rect.x) && (e->x < (gtkblist->contact_rect.x + gtkblist->contact_rect.width)) &&
- (e->y > gtkblist->contact_rect.y) && (e->y < (gtkblist->contact_rect.y + gtkblist->contact_rect.height)))) {
- pidgin_blist_collapse_contact_cb(NULL, gtkblist->mouseover_contact);
- gtkblist->mouseover_contact = NULL;
/*********************************************************
* Private Utility functions *
*********************************************************/
@@ -3787,15 +3173,6 @@
return pidgin_node->contact_expanded;
void pidgin_blist_setup_sort_methods()
@@ -4520,14 +3897,7 @@
GtkTreeViewColumn *column;
GtkTreeSelection *selection;
- GtkTargetEntry dte[] = {{"PURPLE_BLIST_NODE", GTK_TARGET_SAME_APP, DRAG_ROW},
- {"application/x-im-contact", 0, DRAG_BUDDY},
- {"text/x-vcard", 0, DRAG_VCARD },
- {"text/uri-list", 0, DRAG_URI},
- {"text/plain", 0, DRAG_TEXT}};
- GtkTargetEntry ste[] = {{"PURPLE_BLIST_NODE", GTK_TARGET_SAME_APP, DRAG_ROW},
- {"application/x-im-contact", 0, DRAG_BUDDY},
- {"text/x-vcard", 0, DRAG_VCARD }};
if (gtkblist && gtkblist->window) {
purple_blist_set_visible(purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/list_visible"));
@@ -4588,20 +3958,6 @@
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkblist->treeview));
g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(pidgin_blist_selection_changed), NULL);
- gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(gtkblist->treeview),
- GDK_BUTTON1_MASK, ste, 3,
- gtk_tree_view_enable_model_drag_dest(GTK_TREE_VIEW(gtkblist->treeview),
- GDK_ACTION_COPY | GDK_ACTION_MOVE);
- g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-data-received", G_CALLBACK(pidgin_blist_drag_data_rcv_cb), NULL);
- g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-data-get", G_CALLBACK(pidgin_blist_drag_data_get_cb), NULL);
- g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-motion", G_CALLBACK(pidgin_blist_drag_motion_cb), NULL);
- g_signal_connect(G_OBJECT(gtkblist->treeview), "motion-notify-event", G_CALLBACK(pidgin_blist_motion_cb), NULL);
- g_signal_connect(G_OBJECT(gtkblist->treeview), "leave-notify-event", G_CALLBACK(pidgin_blist_leave_cb), NULL);
gtk_widget_set_has_tooltip(gtkblist->treeview, TRUE);
g_signal_connect(G_OBJECT(gtkblist->treeview), "query-tooltip",
@@ -5910,10 +5266,6 @@
g_source_remove(gtkblist->refresh_timer);
gtkblist->refresh_timer = 0;
- if (gtkblist->drag_timeout) {
- g_source_remove(gtkblist->drag_timeout);
- gtkblist->drag_timeout = 0;
gtkblist->window = gtkblist->vbox = gtkblist->treeview = NULL;
g_clear_object(>kblist->treemodel);
--- a/pidgin/gtkblist.h Mon Mar 14 01:18:18 2022 -0500
+++ b/pidgin/gtkblist.h Thu Mar 17 21:41:10 2022 -0500
@@ -55,9 +55,6 @@
* @treemodel: This is the treemodel.
* @refresh_timer: The timer for refreshing every 30 seconds
- * @drag_timeout: The timeout for expanding contacts on drags
- * @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
@@ -91,8 +88,6 @@
- GdkRectangle drag_rect;
GdkRectangle contact_rect;
PurpleBlistNode *mouseover_contact;
--- a/pidgin/gtkconv.c Mon Mar 14 01:18:18 2022 -0500
+++ b/pidgin/gtkconv.c Thu Mar 17 21:41:10 2022 -0500
@@ -3298,11 +3298,6 @@
/**********************************************************************
**********************************************************************/
- purple_signal_register(handle, "conversation-dragging",
- purple_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2,
- G_TYPE_POINTER, /* pointer to a (PidginConvWindow *) */
- G_TYPE_POINTER); /* pointer to a (PidginConvWindow *) */
purple_signal_register(handle, "displaying-im-msg",
purple_marshal_BOOLEAN__POINTER_POINTER,
G_TYPE_BOOLEAN, 2, PURPLE_TYPE_CONVERSATION, PURPLE_TYPE_MESSAGE);
--- a/pidgin/meson.build Mon Mar 14 01:18:18 2022 -0500
+++ b/pidgin/meson.build Thu Mar 17 21:41:10 2022 -0500
@@ -39,7 +39,6 @@
@@ -102,7 +101,6 @@
--- a/pidgin/plugins/notify.c Mon Mar 14 01:18:18 2022 -0500
+++ b/pidgin/plugins/notify.c Thu Mar 17 21:41:10 2022 -0500
@@ -448,55 +448,6 @@
-conversation_dragging(PurpleConversation *active_conv,
- PidginConvWindow *old_purplewin,
- PidginConvWindow *new_purplewin)
- if (old_purplewin != new_purplewin) {
- if (old_purplewin == NULL) {
- purple_conversation_autoset_title(active_conv);
- handle_urgent(new_purplewin, FALSE);
- if (count_messages(new_purplewin))
- notify_win(new_purplewin);
- printf("if else count = %d\n", count_messages(new_purplewin));
- printf("if else count = %d\n", count_messages(old_purplewin));
- PurpleConversation *old_active_conv = NULL;
- old_active_conv = purple_conversation_window_get_active_conversation(new_purplewin);
- purple_conversation_autoset_title(old_active_conv);
- handle_urgent(old_purplewin, FALSE);
- if (count_messages(old_purplewin))
- notify_win(old_purplewin);
- purple_conversation_autoset_title(active_conv);
- handle_urgent(new_purplewin, FALSE);
- if (count_messages(new_purplewin))
- notify_win(new_purplewin);
- printf("else count = %d\n", count_messages(new_purplewin));
- printf("else count = %d\n", count_messages(old_purplewin));
- purple_conversation_autoset_title(active_conv);
- handle_urgent(old_purplewin, FALSE);
- if (count_messages(old_purplewin))
- notify_win(old_purplewin);
handle_string(PidginConvWindow *purplewin)
@@ -933,10 +884,6 @@
PURPLE_CALLBACK(conv_created), NULL);
purple_signal_connect(conv_handle, "deleting-conversation", plugin,
PURPLE_CALLBACK(deleting_conv), NULL);
- purple_signal_connect(gtk_conv_handle, "conversation-dragging", plugin,
- PURPLE_CALLBACK(conversation_dragging), NULL);
PurpleConversation *conv = (PurpleConversation *)convs->data;
--- a/pidgin/plugins/transparency.c Mon Mar 14 01:18:18 2022 -0500
+++ b/pidgin/plugins/transparency.c Thu Mar 17 21:41:10 2022 -0500
@@ -612,9 +612,6 @@
purple_signal_connect(conv_handle, "deleting-conversation", plugin,
PURPLE_CALLBACK(conversation_delete_cb), NULL);
- purple_signal_connect(conv_handle, "conversation-dragging", plugin,
- PURPLE_CALLBACK(set_conv_window_trans), NULL);
purple_signal_connect(conv_handle, "conversation-updated", plugin,
PURPLE_CALLBACK(conv_updated_cb), NULL);