2007-04-16 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Mon, 16 Apr 2007 13:26:17 +0000 (13:26 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Mon, 16 Apr 2007 13:26:17 +0000 (13:26 +0000)
* 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
po/en_GB.po
src/widgets/modest-account-view.c

index 1890ab6..e898afc 100644 (file)
@@ -1,5 +1,11 @@
 2007-04-16  Murray Cumming  <murrayc@murrayc.com>
 
+       * 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  <murrayc@murrayc.com>
+
        * configure.ac:
        * src/maemo/easysetup/Makefile.am:
        * src/maemo/easysetup/modest-easysetup-wizard.c:
index 1622fb7..bd235ee 100644 (file)
@@ -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.\r
 msgid "mcen_ti_account_settings"
 msgstr "%s account settings for %s"
index decd89c..99c0756 100644 (file)
@@ -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);