[Kmymoney-devel] Plugin Config File Install
Thomas Baumgart
thb at net-bembel.de
Sun Jan 1 12:20:49 UTC 2012
Hi,
on Saturday 31 December 2011 12:34:19 Allan wrote:
> On 31/12/11 02:00, Jack Ostroff wrote:
> > Hopefully I'm not being too simplistic, but
> >
> > On 2011.12.30 12:18, Allan wrote:
> >>>> So, after installation, those two sections are available, and I load
> >>>> into memory from the default config file the parameters for the
> >>>> chosen profile. When the plugin is closed, the current parameters
> >>>> are saved to the user's ~/.kde/4 config location, but this new file
> >>>> contains only the one profile, the one that was first loaded.
> >
> > Will there be any other profile managment as part of the UI? Renaming
> > profiles? Deleting profiles?
>
> Yes, they are present at the moment - sort of. One can edit the profile
> name via the combobox. At present,this actually works by creating a new
> profile with the new name. It removes the old name, but doesn't, yet,
> delete the old group in the config file.
>
> > Now, think about a "future" scenario: the user has three profiles saved,
> > and creates a new one. I assume you have to read in the current file (or
> > have already done so) and take those three, add the new one, and write
> > out four to the rc file. Therefore I assume you already have some way of
> > saving an rc file including one or more profiles that have not just been
> > used.
>
> There isn't actually a 'future' problem. If the user has created a few
> profiles, he has used them, one at a time, and they will have been
> saved, at the end of that import process.
>
> > Perhaps if there are no profiles saved in the local file (or there is no
> > local file) then you automatically read in the sample profiles and save
> > them, whether or not either of them was actually used.
>
> This is closer to the problem. In normal use, the user will have
> selected one profile, and that profile is read in and used to set up the
> UI. When done, the current settings are saved locally to the current
> profile. Any other profiles in the config will not have been read in,
> or rather have been read in and discarded because the purpose is to set
> up the UI. Again, this is not a problem. However, on the first run,
> there is no local config file yet, as I haven't yet found a way to
> detect where that distro has its ~/.kde or ~/.kde4 file. There appears
> to be a KDEHOME variable, which sounded useful, but that presumably
> would have had to be set by the distro, and mine is empty, and The
> config got installed to root, I need to know this at compile time, to
> tell cmake where to install the config file. So, I have to install to
> the default location, /user/share/kde4/config. Then, on the first run,
> if the user selects one of the two sample profiles, that profile, and
> that profile alone, is read in and used to set up the UI. The other
> sample profile remains on the config file, in /user/ etc. When the user
> exits the import run, the current settings are saved, to the newly
> created local config. As no other profiles have been read in, they
> cannot be saved to the local config file. And that is the nub of the
> problem - the creation of the first local config. Newly created
> profiles will get saved, but not those in the default file.
>
> > You could also have a button somewhere to "Reload all sample profiles"
> >
> > I don't think any of this actually solves the problem, but hopefully it
> > might give you something to chew on.
> >
> > Jack
>
> All that said, overnight I thought of a possibility so now to try it.
Thinking a bit further, this might not be only a problem of providing initial
templates by the devs but also those templates might be provided by the
community as well and are certainly not tied to a KMyMoney release. This
thinking leads to
http://techbase.kde.org/Development/Tutorials/Introduction_to_Get_Hot_New_Stuff
Maybe worth a look. The profiles will then be file based and not in an ...rc
file anymore, but that is just implementation and can be solved.
Just my first 0.02 in the new year.
--
Regards
Thomas Baumgart
GPG-FP: E55E D592 F45F 116B 8429 4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
morphir: so much confusion :S kmake, kdemake, qmake make cmake etc.
logixoul: you forgot cmakekde :)
morphir: and bakemeacake
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20120101/0aa62d3c/attachment.sig>
More information about the KMyMoney-devel
mailing list