[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-active
Subject: Re: Guts of active-settings
From: "Lamarque V. Souza" <lamarque () kde ! org>
Date: 2011-12-21 11:17:22
Message-ID: 201112210917.22273.lamarque () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Em Wednesday 21 December 2011, Marco Martin escreveu:
> On Tuesday 20 December 2011, Sebastian Kügler wrote:
> > It would also be cool, if we had an easy way to offer this kind of
> > functionality to apps (so one can, in pure QML) write a configuration
> > interface for ones app -- either by starting active-settings
> > org.kde.active.settings.mycoolapp, or by embedding it somehow. (The
> > former of course needing a mechanism to sync config across processes.
> > Specific modules can be opened right away, by using the plugin name of
> > module as argument to active-settings, much like kcmshell4. (It
> > currently lacks the --list argument, though.)
>
> from one side i would really like applications config listed in the setting
> app.
> on the other hand, this can end up very quickly as a giant list.
>
> in any case yeah if the module itself can be loaded as a plugin anywhere,
> we will be able to both display it in the app or in the config app.
>
> for the config changes across process, don't see other solution than a file
> watcher, that is not so light, but shouldn't be as impactful as it seems
> anyways
KGlobalSettings::settingsChanged signal works across processes. I am
using it in these patches http://git.reviewboard.kde.org/r/103434 and
https://git.reviewboard.kde.org/r/103469/. The only drawback I see in
KGlobalSettings::SettingsChanged is that is uses an enum to indicatte which
setting category has changed. That is not that flexible if we need to add new
categories, like I did when I created the LOCALE category. What is neat with
this approach is that it automatically reparses the configuration files before
delivering the signal to the slot.
--
Lamarque V. Souza
KDE's Network Management maintainer
http://planetkde.org/pt-br
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Tahoma'; font-size:12pt; font-weight:400; \
font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Em \
Wednesday 21 December 2011, Marco Martin escreveu:</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> On Tuesday 20 December 2011, Sebastian \
Kügler wrote:</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > \
It would also be cool, if we had an easy way to offer this kind of</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > functionality to \
apps (so one can, in pure QML) write a configuration</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> > interface for ones app -- either by \
starting active-settings</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">> > org.kde.active.settings.mycoolapp, or by embedding it \
somehow. (The</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > \
former of course needing a mechanism to sync config across processes.</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> > Specific modules \
can be opened right away, by using the plugin name of</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> > module as argument to active-settings, \
much like kcmshell4. (It</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">> > currently lacks the --list argument, though.)</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> from one side i would \
really like applications config listed in the setting</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> app.</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> on the other hand, this can end up very \
quickly as a giant list.</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">> </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">> in any case yeah if the module itself can be loaded as a \
plugin anywhere,</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> we \
will be able to both display it in the app or in the config app.</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> for the config changes \
across process, don't see other solution than a file</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> watcher, that is not so light, but shouldn't \
be as impactful as it seems</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">> anyways</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; "> </p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;"> KGlobalSettings::settingsChanged signal works \
across processes. I am using it in these patches \
http://git.reviewboard.kde.org/r/103434 and \
https://git.reviewboard.kde.org/r/103469/. The only drawback I see in \
KGlobalSettings::SettingsChanged is that is uses an enum to indicatte which setting \
category has changed. That is not that flexible if we need to add new categories, \
like I did when I created the LOCALE category. What is neat with this approach is \
that it automatically reparses the configuration files before delivering the signal \
to the slot.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; "> </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">-- </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">Lamarque V. Souza</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">KDE's Network Management maintainer</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">http://planetkde.org/pt-br</p></body></html>
_______________________________________________
Active mailing list
Active@kde.org
https://mail.kde.org/mailman/listinfo/active
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic