From: Sergio Villar SenĂ­n Date: Wed, 29 Apr 2009 16:16:41 +0000 (+0200) Subject: Fixes NB#112983, do not show last updated time as 01/01/1970 for newly created accounts X-Git-Tag: modest-3.0.15-rc3~3 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=b0e8adb465457bcf4d8717f16b7937e6b46b095f Fixes NB#112983, do not show last updated time as 01/01/1970 for newly created accounts --- diff --git a/src/widgets/modest-account-view.c b/src/widgets/modest-account-view.c index 88e5739..28e28ba 100644 --- a/src/widgets/modest-account-view.c +++ b/src/widgets/modest-account-view.c @@ -219,7 +219,8 @@ get_last_updated_string(ModestAccountView *self, ModestAccountMgr* account_mgr, struct tm *localtime_tm; time (&now); localtime_tm = localtime (&now); - last_updated -= time_get_utc_offset (localtime_tm->tm_zone); + if (last_updated) + last_updated -= time_get_utc_offset (localtime_tm->tm_zone); #endif g_object_unref (server_settings); account_name = modest_account_settings_get_account_name (settings); @@ -234,7 +235,7 @@ get_last_updated_string(ModestAccountView *self, ModestAccountMgr* account_mgr, } else { last_updated_string = _("mcen_va_refreshing"); } - + return last_updated_string; } @@ -243,9 +244,9 @@ update_account_view (ModestAccountMgr *account_mgr, ModestAccountView *view) { GSList *account_names, *cursor; GtkListStore *model; - + model = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(view))); - + /* Get the ID of the currently-selected account, * so we can select it again after rebuilding the list. * Note that the name doesn't change even when the display name changes.