#ifdef MODEST_PLATFORM_MAEMO
#include "modest-hildon-includes.h"
#endif
+#include <locale.h>
static gboolean init_header_columns (ModestConf *conf, gboolean overwrite);
static gboolean init_default_account_maybe (ModestAccountMgr *acc_mgr);
return result;
}
-GList * modest_init_get_default_header_view_column_ids (TnyFolderType folder_type, ModestHeaderViewStyle style)
+GList*
+modest_init_get_default_header_view_column_ids (TnyFolderType folder_type, ModestHeaderViewStyle style)
{
GList *result = NULL;
init_i18n();
init_debug_g_type();
init_debug_logging();
-
- if (!g_thread_supported())
- g_thread_init(NULL);
-
- gdk_threads_init ();
if (!modest_runtime_init()) {
modest_init_uninit ();
return FALSE;
}
- /* based on the debug settings, we decide whether to overwrite old settings */
reset = modest_runtime_get_debug_flags () & MODEST_RUNTIME_DEBUG_FACTORY_SETTINGS;
if (!init_header_columns(modest_runtime_get_conf(), reset)) {
modest_init_uninit ();
init_stock_icons ();
/* Init notification system */
- #ifndef MODEST_HILDON_VERSION_0
+ #ifdef MODEST_HAVE_HILDON_NOTIFY
notify_init ("Basics");
#endif
{
int i;
gchar *key;
+ gchar *sort_key;
+ gchar *sort_value;
GString *str;
g_return_val_if_fail (cols, FALSE);
key = _modest_widget_memory_get_keyname_with_double_type ("header-view",
type, style,
MODEST_WIDGET_MEMORY_PARAM_COLUMN_WIDTH);
+ sort_key = _modest_widget_memory_get_keyname_with_double_type ("header-view",
+ type, style,
+ MODEST_WIDGET_MEMORY_PARAM_COLUMN_SORT);
/* if we're not in overwrite mode, only write stuff it
* there was nothing before */
if (!overwrite && modest_conf_key_exists(conf, key, NULL)) {
modest_conf_set_string (conf, key, str->str, NULL);
g_free (key);
g_string_free (str, TRUE);
+
+ if ( col_num > 0 ) {
+ gint sort_col_id;
+ if (cols[i].col == MODEST_HEADER_VIEW_COLUMN_COMPACT_HEADER_OUT)
+ sort_col_id = TNY_GTK_HEADER_LIST_MODEL_DATE_SENT_TIME_T_COLUMN;
+ else
+ sort_col_id = TNY_GTK_HEADER_LIST_MODEL_DATE_RECEIVED_TIME_T_COLUMN;
+ sort_value = g_strdup_printf("%d:%d:%d", sort_col_id, GTK_SORT_DESCENDING, 0);
+ modest_conf_set_string (conf, sort_key, sort_value, NULL);
+ g_free (sort_value);
+ }
+ g_free (sort_key);
return TRUE;
}
const gchar* gettext_package;
/* Setup gettext, to use our .po files: */
/* GETTEXT_PACKAGE and MODEST_LOCALE_DIR are defined in config.h */
-#ifdef MODEST_HILDON_VERSION_0
- gettext_package = GETTEXT_PACKAGE;
- bindtextdomain (gettext_package, MODEST_LOCALE_DIR);
-#else
- gettext_package = "osso-email"; /* HACK to use the localizations */
- bindtextdomain (gettext_package, "/usr/share/locale");
-#endif /*MODEST_HILDON_VERSION_0*/
+/* #ifdef MODEST_HILDON_VERSION_0 */
+/* gettext_package = GETTEXT_PACKAGE; */
+/* bindtextdomain (gettext_package, MODEST_LOCALE_DIR); */
+/* #else */
+/* gettext_package = "osso-email"; /\* HACK to use the localizations *\/ */
+/* bindtextdomain (gettext_package, "/usr/share/locale"); */
+/* #endif /\*MODEST_HILDON_VERSION_0*\/ */
+ gettext_package = GETTEXT_PACKAGE;
+
bind_textdomain_codeset (gettext_package, "UTF-8");
textdomain (gettext_package);