This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to set default flag of Identity

Tags: None
(comma "," separated)
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

How to set default flag of Identity

Wed Sep 18, 2019 8:07 am
Where do I find the UI in KAddressBook to set the default flag of an Identity? (see https://lxr.kde.org/source/kde/pim/kide ... y.cpp#0373 for what I mean)? This question came up during the analysis of this bug entry. Any help on the bug itself is also appreciated.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
User avatar
raphaelra
Registered Member
Posts
209
Karma
0
OS
ipwizard wrote:Where do I find the UI in KAddressBook to set the default flag of an Identity?

I found a place (on LXR) where setIsDefault() is used in identity management of KMail.
Are you sure KMymoney don't read the identities from ~/.conig/emailidentities ?

Code: Select all
[General]
Default Identity=1854493280

[Identity #0]
...
Email Address=joh.doe@example.net
Identity=John Doe
...
uoid=1854493280
User avatar
ostroffjh
Registered Member
Posts
253
Karma
0
OS
Can anyone say what tools or applications write to ~/.config/emailidentities? I do not use KMail, and although I suppose I could manually edit that file, I'd rather use the proper tool, but do not want to be forced to use a particular email app just for that purpose.
airdrik
Registered Member
Posts
1854
Karma
5
OS
It's just a text file with a certain layout to it, but is otherwise pretty straight-forward to read and edit (if you are just rearranging things or making the changes suggested by raphaelra). If you are concerned about messing it up you can make a backup copy (copy to the same directory but add ".bak" to the end of the file name or something to indicate that it is a backup) so that if you do mess something up you have a good copy you can revert to.

Otherwise, you can edit it from Kmail via Settings -> Configure Kmail -> Identities. (I'm not sure if there are other apps which can edit it).


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar
ostroffjh
Registered Member
Posts
253
Karma
0
OS
I know I can edit the file directly, but I specifically said I do not have KMail installed, and would prefer to use a more "official" application. I have been unable to find any documentation at all on this file. It is used not only for KMail, but for other applications (e.g., KMyMoney) to pick the addressbook record for the user's credentials. I know in KDE KMail is the default email app, but I don't think it should be required. Also, not all users are willing to manually edit a configuration file like this, and I'd like to update the KMyMoney manual on how a user can properly set the default addressbook record, if KMail is not installed.
User avatar
raphaelra
Registered Member
Posts
209
Karma
0
OS
I started
Code: Select all
inotifywait -m ~/.config/emailidentities
and try to change my user data in system settings. No access. I don't use KMyMoney. Are you sure that KMyMoney gets the default identity from address book ? ipwizard means, KMyMoney reads the data from KAddressBook ...
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
raphaelra wrote:ipwizard means, KMyMoney reads the data from KAddressBook ...

He meant that KMyMoney uses the KAddressBook library (as it was called in older - aka KDE4 - times). The relevant part has been extracted from the KAddressBook libs and is nowadays available as KIdentityManagement. Sorry if that has caused any confusion.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
User avatar
raphaelra
Registered Member
Posts
209
Karma
0
OS
Thanks for clarification :) Although I use KDE for many years I'm just start developing and I'm still newbe in the KDE souce code universe ...
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
I use KDE since many moons (was it 2.0?) and develop using it for a similar time span, but in some areas I am a newbie myself and learn on a daily basis :)


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
User avatar
ostroffjh
Registered Member
Posts
253
Karma
0
OS
Ah - I now suspect that this has nothing at all to do with KAddressBook or any single addressboook. I'll have to find which package in my distros deals with identity management for KDE. Pehaps there will be some useful comments in the code. (And I suppose I'll have to look in the KMail code also.) Obviously this will call for a revision of that section of the Manual, once I figure out what is happening - especially for people not using the full KDE suite.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], Google [Bot], lockheed, Yahoo [Bot]