Mercurial > pidgin.yaz
changeset 11113:a5efa067eaca
[gaim-migrate @ 13166]
Patch #1239122, from Levi Bard
"When you disable/reenable an account in HEAD by
clicking off/on the checkbox, it triggers the
treeview's double-click event and pulls up the modify
account dialog.
This patch suppresses that for disabling/reenabling an
account, but leaves it intact for the other parts of
the treeview."
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 18 Jul 2005 00:13:06 +0000 |
parents | 92f7b92e866b |
children | 2ace374369d1 |
files | src/gtkaccount.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkaccount.c Mon Jul 18 00:04:31 2005 +0000 +++ b/src/gtkaccount.c Mon Jul 18 00:13:06 2005 +0000 @@ -2210,20 +2210,25 @@ { AccountsWindow *dialog; GtkTreePath *path; + GtkTreeViewColumn *column; GtkTreeIter iter; GaimAccount *account; + const gchar *title; dialog = (AccountsWindow *)user_data; /* Figure out which node was clicked */ - if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(dialog->treeview), event->x, event->y, &path, NULL, NULL, NULL)) + if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(dialog->treeview), event->x, event->y, &path, &column, NULL, NULL)) return FALSE; + title = gtk_tree_view_column_get_title(column); + column = gtk_tree_view_get_column(treeview, COLUMN_ENABLED-1); /* -1 required by weirdness in GtkTreeView */ gtk_tree_model_get_iter(GTK_TREE_MODEL(dialog->model), &iter, path); gtk_tree_path_free(path); gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, COLUMN_DATA, &account, -1); if ((account != NULL) && (event->button == 1) && - (event->type == GDK_2BUTTON_PRESS)) + (event->type == GDK_2BUTTON_PRESS) && + (strcmp(gtk_tree_view_column_get_title(column), title))) { gaim_gtk_account_dialog_show(GAIM_GTK_MODIFY_ACCOUNT_DIALOG, account); return TRUE;