im.pidgin.pidgin: edf0d391d778af94bc536403190c19eafedd6142

sadrul at pidgin.im sadrul at pidgin.im
Tue Dec 25 21:45:50 EST 2007


-----------------------------------------------------------------
Revision: edf0d391d778af94bc536403190c19eafedd6142
Ancestor: 805ad6c9cbaed8c9a8072671f82c248a4209ee43
Author: sadrul at pidgin.im
Date: 2007-12-25T08:49:35
Branch: im.pidgin.pidgin

Modified files:
        pidgin/gtkaccount.c

ChangeLog: 

Double clicking the column header/divider, or in the 'enabled' column shouldn't bring up the account-modify window. Fixes #3733.

-------------- next part --------------
============================================================
--- pidgin/gtkaccount.c	2e6393eea89aa7f08bb44bffb18ab2e670d9b094
+++ pidgin/gtkaccount.c	75f93068b9f1da0d72cca4687f75b506c761c88c
@@ -1759,16 +1759,14 @@ drag_data_received_cb(GtkWidget *widget,
 	}
 }
 
-static gint
+static gboolean
 accedit_win_destroy_cb(GtkWidget *w, GdkEvent *event, AccountsWindow *dialog)
 {
-	/* Since this is called as the window is closing, we don't need
-	 * pidgin_accounts_window_hide() to also dispose of the window */
 	dialog->window = NULL;
 
 	pidgin_accounts_window_hide();
 
-	return 0;
+	return FALSE;
 }
 
 static gboolean
@@ -2102,24 +2100,24 @@ account_treeview_double_click_cb(GtkTree
 	GtkTreeViewColumn *column;
 	GtkTreeIter iter;
 	PurpleAccount *account;
-	const gchar *title;
 
 	dialog = (AccountsWindow *)user_data;
 
+	if (event->window != gtk_tree_view_get_bin_window(treeview))
+	    return FALSE;
+
 	/* Figure out which node was clicked */
 	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);
-	/* The -1 is required because the first two columns of the list
-	 * store are displayed as only one column in the tree view. */
-	column = gtk_tree_view_get_column(treeview, COLUMN_ENABLED-1);
+	if (column == gtk_tree_view_get_column(treeview, 0))
+		return FALSE;
+
 	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) &&
-		(strcmp(gtk_tree_view_column_get_title(column), title)))
+		(event->type == GDK_2BUTTON_PRESS))
 	{
 		pidgin_account_dialog_show(PIDGIN_MODIFY_ACCOUNT_DIALOG, account);
 		return TRUE;


More information about the Commits mailing list