diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-03-05 09:25:26 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-03-05 09:25:26 +0800 |
commit | e3075a8d20c2b0ea843408a2d91b20ff587c3097 (patch) | |
tree | b6ab1034764481aee19a4ba3a5e5968323695681 | |
parent | d4f86e526462653d01a82523ec92ce2e2c5ec837 (diff) | |
download | gsoc2013-evolution-e3075a8d20c2b0ea843408a2d91b20ff587c3097.tar gsoc2013-evolution-e3075a8d20c2b0ea843408a2d91b20ff587c3097.tar.gz gsoc2013-evolution-e3075a8d20c2b0ea843408a2d91b20ff587c3097.tar.bz2 gsoc2013-evolution-e3075a8d20c2b0ea843408a2d91b20ff587c3097.tar.lz gsoc2013-evolution-e3075a8d20c2b0ea843408a2d91b20ff587c3097.tar.xz gsoc2013-evolution-e3075a8d20c2b0ea843408a2d91b20ff587c3097.tar.zst gsoc2013-evolution-e3075a8d20c2b0ea843408a2d91b20ff587c3097.zip |
If the clicked column was column 0, enable/disable it. (mail_select):
2002-03-04 Jeffrey Stedfast <fejj@ximian.com>
* mail-accounts.c (mail_unselect): If the clicked column was
column 0, enable/disable it.
(mail_select): Same.
svn path=/trunk/; revision=15914
-rw-r--r-- | mail/ChangeLog | 4 | ||||
-rw-r--r-- | mail/mail-accounts.c | 24 |
2 files changed, 21 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 3d5ce177df..e8202074bd 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,9 @@ 2002-03-04 Jeffrey Stedfast <fejj@ximian.com> + * mail-accounts.c (mail_unselect): If the clicked column was + column 0, enable/disable it. + (mail_select): Same. + * mail-display.c (load_http): Added more debugging code to help figure out why a certain image isn't loading - looks like gnome-vfs is getting a premature EOF? diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index 79f7b49a79..eb74aa70ed 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -52,7 +52,8 @@ static void mail_accounts_dialog_class_init (MailAccountsDialogClass *class); static void mail_accounts_dialog_init (MailAccountsDialog *dialog); static void mail_accounts_dialog_finalise (GtkObject *obj); -static void mail_unselect (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer data); +static void mail_unselect (GtkCList *clist, int row, int column, GdkEventButton *event, gpointer data); +static void mail_able (GtkButton *button, gpointer data); static MailConfigDruid *druid = NULL; static MailAccountEditor *editor = NULL; @@ -180,7 +181,7 @@ load_accounts (MailAccountsDialog *dialog) /* mail callbacks */ static void -mail_select (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer data) +mail_select (GtkCList *clist, int row, int column, GdkEventButton *event, gpointer data) { MailAccountsDialog *dialog = data; MailConfigAccount *account = gtk_clist_get_row_data (clist, row); @@ -194,10 +195,14 @@ mail_select (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpoi gtk_label_set_text (GTK_LABEL (GTK_BIN (dialog->mail_able)->child), _("Disable")); else gtk_label_set_text (GTK_LABEL (GTK_BIN (dialog->mail_able)->child), _("Enable")); + + /* column 0 is the pixmap column */ + if (column == 0) + mail_able (dialog->mail_able, data); } static void -mail_unselect (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer data) +mail_unselect (GtkCList *clist, int row, int column, GdkEventButton *event, gpointer data) { MailAccountsDialog *dialog = data; @@ -207,6 +212,10 @@ mail_unselect (GtkCList *clist, gint row, gint column, GdkEventButton *event, gp gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_default), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_able), FALSE); + /* column 0 is the pixmap column */ + if (column == 0) + mail_able (dialog->mail_able, data); + /* * If an insensitive button in a button box has the focus, and if you hit tab, * there is a segfault. I think that this might be a gtk bug. Anyway, this @@ -322,7 +331,7 @@ mail_delete (GtkButton *button, gpointer data) if (len > 0) { row = sel >= len ? len - 1 : sel; load_accounts (dialog); - gtk_clist_select_row (dialog->mail_accounts, row, 0); + gtk_clist_select_row (dialog->mail_accounts, row, 1); } else { dialog->accounts_row = -1; gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_edit), FALSE); @@ -347,7 +356,7 @@ mail_default (GtkButton *button, gpointer data) mail_config_set_default_account (account); mail_config_write (); load_accounts (dialog); - gtk_clist_select_row (dialog->mail_accounts, row, 0); + gtk_clist_select_row (dialog->mail_accounts, row, 1); } } @@ -374,10 +383,11 @@ mail_able (GtkButton *button, gpointer data) mail_autoreceive_setup (); mail_config_write (); load_accounts (dialog); - gtk_clist_select_row (dialog->mail_accounts, row, 0); + gtk_clist_select_row (dialog->mail_accounts, row, 1); } } + #ifdef ENABLE_NNTP static void load_news (MailAccountsDialog *dialog) @@ -1011,7 +1021,7 @@ construct (MailAccountsDialog *dialog) dialog->accounts = mail_config_get_accounts (); if (dialog->accounts) { load_accounts (dialog); - gtk_clist_select_row (dialog->mail_accounts, 0, 0); + gtk_clist_select_row (dialog->mail_accounts, 0, 1); } else { gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_edit), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (dialog->mail_delete), FALSE); |