* set the local folders name to the device name if it exists,
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 27 Feb 2007 16:21:17 +0000 (16:21 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 27 Feb 2007 16:21:17 +0000 (16:21 +0000)
  not fully working yet.

pmo-trunk-r860

src/modest-conf.c
src/modest-defs.h
src/modest-runtime.c
src/modest-tny-account.c
src/modest-ui-actions.c

index 86a9ef1..d276082 100644 (file)
@@ -404,8 +404,7 @@ modest_conf_key_is_valid (const gchar* key)
 }
 
 
-
-
+/* hmmm... might need to make specific callback for specific keys */
 static void
 modest_conf_on_change (GConfClient *client, guint conn_id, GConfEntry *entry,
                       gpointer data)
index 1a57444..7dedda9 100644 (file)
@@ -46,7 +46,6 @@
 #define MODEST_LOCAL_FOLDERS_ACCOUNT_ID   "local_folders"
 #define MODEST_LOCAL_FOLDERS_ACCOUNT_NAME MODEST_LOCAL_FOLDERS_ACCOUNT_ID
 #define MODEST_LOCAL_FOLDERS_MAILDIR      MODEST_LOCAL_FOLDERS_ACCOUNT_ID
-#define MODEST_LOCAL_FOLDERS_DISPLAY_NAME  N_("Local folders")
 
 
 /* configuration key definitions for modest */
 #define MODEST_CONF_SHOW_BCC             MODEST_CONF_NAMESPACE "/show_bcc"           
 
 
+/*
+ * in the maemo case, we try to replace this
+ * with the device name
+ */
+#define MODEST_LOCAL_FOLDERS_DEFAULT_DISPLAY_NAME  N_("Local folders")
+
+/* the name of the device; in case of maemo this is set and updated
+ * using dbus; see modest-maemo-utils.[ch]
+ */
+#define MODEST_CONF_DEVICE_NAME       MODEST_CONF_NAMESPACE "/device_name"
+
+
 /* place for widget settings */
 #define MODEST_CONF_WIDGET_NAMESPACE     MODEST_CONF_NAMESPACE "/widgets"
 
index 7663de3..687c573 100644 (file)
@@ -144,7 +144,7 @@ modest_runtime_init (void)
                g_printerr ("modest: failed to init header columns\n");
                return FALSE;
        }
-
+       
        if (!init_local_folders()) {
                modest_runtime_uninit ();
                g_printerr ("modest: failed to init local folders\n");
index 19a22d8..641f076 100644 (file)
@@ -250,11 +250,12 @@ modest_tny_account_new_for_local_folders (ModestAccountMgr *account_mgr, TnySess
        url_string = camel_url_to_string (url, 0);
        
        tny_account_set_url_string (TNY_ACCOUNT(tny_account), url_string);
-       tny_account_set_name (TNY_ACCOUNT(tny_account), _(MODEST_LOCAL_FOLDERS_ACCOUNT_NAME)); 
+
+       tny_account_set_name (TNY_ACCOUNT(tny_account), MODEST_LOCAL_FOLDERS_DEFAULT_DISPLAY_NAME); 
        tny_account_set_id (TNY_ACCOUNT(tny_account), MODEST_LOCAL_FOLDERS_ACCOUNT_ID); 
         tny_account_set_forget_pass_func (TNY_ACCOUNT(tny_account), forget_pass_dummy);
        tny_account_set_pass_func (TNY_ACCOUNT(tny_account), get_pass_dummy);
-
+       
        g_object_set_data (G_OBJECT(tny_account), "modest_account",
                           (gpointer*)MODEST_LOCAL_FOLDERS_ACCOUNT_ID);
        
index e0e4bff..d371659 100644 (file)
@@ -567,7 +567,6 @@ read_msg_func (gpointer data, gpointer user_data)
        if (!msg_preview)
                return;
        
-       /* mark message as seen; _set_flags crashes, bug in tinymail? */
        header = TNY_HEADER (tny_iterator_get_current (helper->iter));
        header_flags = tny_header_get_flags (header);
        tny_header_set_flags (header, header_flags | TNY_HEADER_FLAG_SEEN);