Last Comment Bug 720735 - Sync certain global mailnews.* preferences
: Sync certain global mailnews.* preferences
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: MailNews: General (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: seamonkey2.10
Assigned To: Jens Hatlak (:InvisibleSmiley)
:
Mentors:
Depends on:
Blocks: 728949
  Show dependency treegraph
 
Reported: 2012-01-24 09:50 PST by Jens Hatlak (:InvisibleSmiley)
Modified: 2012-02-20 14:40 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (3.21 KB, patch)
2012-02-09 13:50 PST, Jens Hatlak (:InvisibleSmiley)
mnyromyr: review+
mnyromyr: superreview+
Details | Diff | Splinter Review
patch v1a [Checkin: Comment 5] (5.02 KB, patch)
2012-02-20 14:38 PST, Jens Hatlak (:InvisibleSmiley)
jh: review+
jh: superreview+
Details | Diff | Splinter Review

Description Jens Hatlak (:InvisibleSmiley) 2012-01-24 09:50:08 PST
SeaMonkey Sync is able to sync the values of any preferences provided the preference names are fixed (which excludes servers and identities). All you have to do is define a matching boolean preference with the prefix "services.sync.prefs.sync." and set the preference to "true". Default preferences are to be found in suite/browser/browser-prefs.js.

We should look at all mailnews.* preferences and check which ones to add here. Likely candidates would be those that users are likely to change and take with them as they switch devices.

Examples for which I have user-set preferences:
* mailnews.confirm.moveFoldersToTrash
* mailnews.display.html_as
* mailnews.display.prefer_plaintext
* mailnews.emptyTrash.dontAskAgain
* mailnews.mark_message_read.auto
* mailnews.mark_message_read.delay
* mailnews.nav_crosses_folders
* mailnews.show_send_progress
* mailnews.start_page.enabled

Other candidates:
* mailnews.filters.confirm_delete
* mailnews.mark_message_read.delay.interval
* mailnews.message_display.allow_plugins
* mailnews.message_display.disable_remote_image
* mailnews.offline_sync_mail
* mailnews.offline_sync_news
* mailnews.offline_sync_send_unsent
* mailnews.offline_sync_work_offline
* mailnews.remember_selected_message
* mailnews.reply_header_type
* mailnews.scroll_to_new_message
* mailnews.sendInBackground
* mailnews.send_plaintext_flowed
* mailnews.thread_pane_column_unthreads
* mailnews.ui.deleteMarksRead
* mailnews.ui.junk.manualMarkAsJunkMarksRead
* mailnews.wraplength
Comment 1 Jens Hatlak (:InvisibleSmiley) 2012-02-09 13:50:03 PST
Created attachment 595872 [details] [diff] [review]
patch
Comment 2 Karsten Düsterloh 2012-02-20 13:29:07 PST
Comment on attachment 595872 [details] [diff] [review]
patch

Looking at my about:config, I'd add these:

mailnews.customDBHeaders
mailnews.customHeaders
mailnews.display.ALL
mailnews.headers.ALL 
mailnews.localizedRe
mailnews.messageid.openInNewWindow
mailnews.remember_selected_message
mailnews.reply_header_ALL 
mailnews.scroll_to_new_message
mailnews.send_default_charset
mailnews.view_default_charset

r/moa=me with these added
(and let's file new bugs for missing ones and especially for mail.*)

It's especially poor that we can't sync accounts/identities or even tags (which gets requested often!). :-(

Why _do_ have pref names to be fixed?
Is that a bug in the upstream Sync or can we fix it?
Comment 3 Jens Hatlak (:InvisibleSmiley) 2012-02-20 14:08:02 PST
(In reply to Karsten Düsterloh from comment #2)
> mailnews.display.ALL
> mailnews.headers.ALL 
> (...)
> mailnews.reply_header_ALL 

FTR as discussed on IRC: ALL is meant to expand to everything with that prefix.

> (and let's file new bugs for missing ones and especially for mail.*)

The latter I already filed, for the rest we'll see.

> Why _do_ have pref names to be fixed?
> Is that a bug in the upstream Sync or can we fix it?

It's a limitation of current services/sync:

http://mxr.mozilla.org/comm-central/source/mozilla/services/sync/modules/engines/prefs.js#116

I guess one could either extend the implementation or create a new engine.
Comment 4 Jens Hatlak (:InvisibleSmiley) 2012-02-20 14:38:09 PST
Created attachment 598963 [details] [diff] [review]
patch v1a [Checkin: Comment 5]
Comment 5 Jens Hatlak (:InvisibleSmiley) 2012-02-20 14:39:46 PST
Comment on attachment 598963 [details] [diff] [review]
patch v1a [Checkin: Comment 5]

http://hg.mozilla.org/comm-central/rev/5df553de0a84

Note You need to log in before you can comment on or make changes to this bug.