https://bugs.kde.org/show_bug.cgi?id=491076

            Bug ID: 491076
           Summary: Feature Request: do display one's own sender/recipient
                    email address and name
    Classification: Applications
           Product: kdepim
           Version: unspecified
          Platform: Manjaro
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: messagecore
          Assignee: kdepim-b...@kde.org
          Reporter: georg.schw...@freenet.de
  Target Milestone: ---

KDE PIM does not display one's own email address and name, but instead replaces
it with "me".
This is certainly a feature appreciated by many users, however in a language
like German this looks very awkward (for details see
https://bugs.kde.org/show_bug.cgi?id=469713). So it would be very desirable to
be able to switch off that feature.

I dug through the code to find out that it is a feature implemented in
messagecore's stringutil. 
It is quite easy to add a switch, e.g. like this to
messagelib/messagecore/src/utils/stringutil.cpp

Change line 443 from

const bool foundMe = onlyOneIdentity &&
(im->identityForAddress(prettyAddressStr) !=
KIdentityManagementCore::Identity::null());

to

const bool foundMe =
!(MessageCore::MessageCoreSettings::self()->displayOwnIdentity()) &&
onlyOneIdentity && (im->identityForAddress(prettyAddressStr) !=
KIdentityManagementCore::Identity::null());


and in messagelib/messagecore/src/settings/messagecore.kcfg add an item like
this:

<entry name="displayOwnIdentity" type="Bool">
      <default>false</default>
    </entry>

I added it to the General group, but I'm unsure whether this is the correct
approach. Moreover I'm not sure whether the messagecore settings is the right
spot for such a switch.
To test it, I set the default to true and opened an email sent by me (or sent
to me) in kmail2. Worked as expected.
There should also be an easy way to change the setting via the CLI, isn't
there?
In addition,  it would be nice to have a UI to toggle this setting. There seems
to be a convenient way in messageviewer/src/ui/settings.ui, but I could not
come up with an equivalent for messagecore.
Or is having that setting in
messagelib/messageviewer/src/settings/messageviewer.kcfg.in a better idea?
(after all it's about displaying a message's header)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to