Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show own e-mail-address instead of "Me" (configuarable) #866

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions content/options.xul
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<setting title="&title.hide_sigs;" desc="&desc.hide_sigs;" pref="conversations.hide_sigs" type="bool" />

<setting title="&title.friendly_date;" desc="&option.no_friendly_date2;" pref="conversations.no_friendly_date" type="bool" />
<setting title="&title.friendly_address;" desc="&option.no_friendly_address;" pref="conversations.no_friendly_address" type="bool" />

<setting title="&title.customize_keys;" desc="&desc.customize_keys;" type="control">
<vbox>
Expand Down
1 change: 1 addition & 0 deletions defaults/preferences/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pref("conversations.hide_quote_length", 5);
pref("conversations.expand_who", 4); // kExpandAuto
pref("conversations.monospaced_senders", "bugzilla-daemon@mozilla.org");
pref("conversations.no_friendly_date", false);
pref("conversations.no_friendly_address", false);
pref("conversations.version", 0);
pref("conversations.nruns", 0);
pref("conversations.uninstall_infos", "{}");
Expand Down
2 changes: 2 additions & 0 deletions locale/en-US/options.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<!ENTITY option.assistant "Start the setup assistant">
<!ENTITY title.friendly_date "Friendly dates">
<!ENTITY option.no_friendly_date2 "In the top right corner, use &quot;normal&quot; dates, just like the message list, instead of &quot;yesterday&quot; and others.">
<!ENTITY title.friendly_address "Friendly addresses">
<!ENTITY option.no_friendly_address "In the &quot;Between&quot;-column and the conversation window header, show own e-mail-address, instead of &quot;to me&quot; or &quot;from me&quot;.">
<!ENTITY title.customize_keys "Customize keys">
<!ENTITY desc.customize_keys "Customize the hotkeys of this extension">
<!ENTITY label.expand_keys "Expand keysettings">
Expand Down
14 changes: 9 additions & 5 deletions modules/contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,15 @@ let ContactMixIn = {
getName: function _ContactMixIn_getName (aPosition, aIsDetail) {
Log.assert(aPosition === Contacts.kFrom || aPosition === Contacts.kTo,
"Someone did not set the 'position' properly");
if ((this._email in gIdentities) && !aIsDetail)
return ((aPosition === Contacts.kFrom)
? strings.get("meFromMeToSomeone")
: strings.get("meFromSomeoneToMe")
);
if ((this._email in gIdentities) && !aIsDetail) {
if(Prefs["no_friendly_address"])
return this._email;
else
return ((aPosition === Contacts.kFrom)
? strings.get("meFromMeToSomeone")
: strings.get("meFromSomeoneToMe")
);
}
else
return this._name || this._email;
},
Expand Down
14 changes: 9 additions & 5 deletions modules/monkeypatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,15 @@ MonkeyPatch.prototype = {
// Helper for formatting; depending on the locale, we may need a different
// for me as in "to me" or as in "from me".
let format = function (x, p) {
if ((x.email+"").toLowerCase() in gIdentities)
return (p
? strings.get("meBetweenMeAndSomeone")
: strings.get("meBetweenSomeoneAndMe")
);
if ((x.email+"").toLowerCase() in gIdentities) {
if(Prefs["no_friendly_address"])
return x.email;
else
return (p
? strings.get("meBetweenMeAndSomeone")
: strings.get("meBetweenSomeoneAndMe")
);
}
else
return x.name || x.email;
};
Expand Down
2 changes: 2 additions & 0 deletions modules/prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function PrefManager() {

this.expand_who = prefsService.getIntPref("expand_who");
this.no_friendly_date = prefsService.getBoolPref("no_friendly_date");
this.no_friendly_address = prefsService.getBoolPref("no_friendly_address");
this.logging_enabled = prefsService.getBoolPref("logging_enabled");
this.tweak_bodies = prefsService.getBoolPref("tweak_bodies");
this.tweak_chrome = prefsService.getBoolPref("tweak_chrome");
Expand Down Expand Up @@ -102,6 +103,7 @@ PrefManager.prototype = {

switch (aData) {
case "no_friendly_date":
case "no_friendly_address":
case "logging_enabled":
case "tweak_bodies":
case "tweak_chrome":
Expand Down