From cb717e972a4ed8a4d973d908451a02ce0abd191c Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Mon, 16 Apr 2007 13:26:17 +0000 Subject: [PATCH] 2007-04-16 Murray Cumming * po/en_GB.po: Added needed logical ID and translation. * src/widgets/modest-account-view.c: (on_account_default_toggled), (init_view): Made the is-default column clicking work. pmo-trunk-r1567 --- ChangeLog2 | 6 ++++++ po/en_GB.po | 4 ++++ src/widgets/modest-account-view.c | 22 ++++------------------ 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/ChangeLog2 b/ChangeLog2 index 1890ab6..e898afc 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,5 +1,11 @@ 2007-04-16 Murray Cumming + * po/en_GB.po: Added needed logical ID and translation. + * src/widgets/modest-account-view.c: (on_account_default_toggled), + (init_view): Made the is-default column clicking work. + +2007-04-16 Murray Cumming + * configure.ac: * src/maemo/easysetup/Makefile.am: * src/maemo/easysetup/modest-easysetup-wizard.c: diff --git a/po/en_GB.po b/po/en_GB.po index 1622fb7..bd235ee 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -4188,6 +4188,10 @@ msgstr "Default" msgid "mcen_ti_account" msgstr "Account" +# column title +msgid "mcen_ti_lastupdated" +msgstr "Last Updated" + # Dialog title. First %s is "POP" or "IMAP" and second %s is the value of user defined 'Description' -field of the account. msgid "mcen_ti_account_settings" msgstr "%s account settings for %s" diff --git a/src/widgets/modest-account-view.c b/src/widgets/modest-account-view.c index decd89c..99c0756 100644 --- a/src/widgets/modest-account-view.c +++ b/src/widgets/modest-account-view.c @@ -265,9 +265,7 @@ static void on_account_default_toggled (GtkCellRendererToggle *cell_renderer, gchar *path, ModestAccountView *self) { - printf ("debug: on_account_default_toggled\n"); gboolean is_default = gtk_cell_renderer_toggle_get_active (cell_renderer); - printf ("debug: is_default: %d\n", is_default); if (is_default) { /* Do not allow an account to be marked non-default. * Only allow this to be changed by setting another account to default: */ @@ -288,16 +286,8 @@ on_account_default_toggled (GtkCellRendererToggle *cell_renderer, gchar *path, gtk_tree_model_get (model, &iter, MODEST_ACCOUNT_VIEW_NAME_COLUMN, &account_name, -1); - /* toggle: */ - if (is_default) { - printf ("debug2: is_default: %d\n", is_default); - /* TODO: Will the model will be updated */ - modest_account_mgr_set_default_account (priv->account_mgr, account_name); - } - - /* toggle: */ - if (is_default) - modest_account_mgr_set_default_account (priv->account_mgr, account_name); + /* Set this previously-non-default account as the default: */ + modest_account_mgr_set_default_account (priv->account_mgr, account_name); g_free (account_name); } @@ -340,20 +330,16 @@ init_view (ModestAccountView *self) text_renderer = gtk_cell_renderer_text_new (); /* the is_default column */ - g_object_set (G_OBJECT(toggle_renderer), "activatable", TRUE, "radio", FALSE, NULL); - printf("debug: connecting to toggled signal.\n"); + g_object_set (G_OBJECT(toggle_renderer), "activatable", TRUE, "radio", TRUE, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW(self), gtk_tree_view_column_new_with_attributes ( - _(" mcen_ti_default"), toggle_renderer, + _("mcen_ti_default"), toggle_renderer, "active", MODEST_ACCOUNT_VIEW_IS_DEFAULT_COLUMN, NULL)); /* Disable the Maemo GtkTreeView::allow-checkbox-mode Maemo modification, * which causes the model column to be updated automatically when the row is clicked. * Making this the default in Maemo's GTK+ is obviously a bug: * https://maemo.org/bugzilla/show_bug.cgi?id=146 - * - * This also stops the application's own signal handler from being called, - * though unsetting the Maemo properties does not seem to fix that: */ g_object_set(G_OBJECT(self), "allow-checkbox-mode", FALSE, NULL); g_object_set(G_OBJECT(toggle_renderer), "checkbox-mode", FALSE, NULL); -- 1.7.9.5