aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-accounts.c14
2 files changed, 14 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8e8a3fca00..27c2c71bfb 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
2002-12-12 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-accounts.c (mail_accounts_tab_construct): Setup
+ double-click here.
+
+2002-12-12 Jeffrey Stedfast <fejj@ximian.com>
+
* mail-accounts.c (account_delete_clicked): Get rid of the ETable
#ifdef's - we won't ever be using ETable.
(account_default_clicked): Same.
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index 25a238ea0a..f9f802a2c3 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -314,6 +314,13 @@ account_able_clicked (GtkButton *button, gpointer user_data)
}
static void
+account_double_click (GtkTreeView *treeview, GtkTreePath *path,
+ GtkTreeViewColumn *column, MailAccountsTab *prefs)
+{
+ account_edit_clicked (NULL, prefs);
+}
+
+static void
account_cursor_change (GtkTreeSelection *selection, MailAccountsTab *prefs)
{
const MailConfigAccount *account;
@@ -328,10 +335,6 @@ account_cursor_change (GtkTreeSelection *selection, MailAccountsTab *prefs)
gtk_button_set_label (prefs->mail_able, _("Disable"));
else
gtk_button_set_label (prefs->mail_able, _("Enable"));
- /* FIXME: how do we get double clicks?? */
-#warning "how to get double-clicks from gtktreeview"
- /*if (event && event->type == GDK_2BUTTON_PRESS)
- account_edit_clicked (NULL, user_data);*/
} else {
gtk_widget_grab_focus (GTK_WIDGET (prefs->mail_add));
}
@@ -458,9 +461,10 @@ mail_accounts_tab_construct (MailAccountsTab *prefs)
widget = glade_xml_get_widget (gui, "etableMailAccounts");
- prefs->table = GTK_TREE_VIEW (g_object_get_data ((GObject *) widget, "table"));
+ prefs->table = (GtkTreeView *) g_object_get_data ((GObject *) widget, "table");
g_signal_connect (gtk_tree_view_get_selection (prefs->table),
"changed", G_CALLBACK (account_cursor_change), prefs);
+ g_signal_connect (prefs->table, "row-activated", G_CALLBACK (account_double_click), prefs);
mail_accounts_load (prefs);