Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques storing variable data to settings
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] storing variable data to settings
Page : 1 2
hozmaster English 21

hozmaster, Saturday 16 March 2013 à 23:21


Subscription date : 04 October 2012
Messages : 26
Hi,

how varied data should stored and where?

I.e If I do have save settings for origin 1 and origin 2 sites and these may have zero to many.
Do you have own APi functions for that or do i have to use normal C functions for that?

And which path?

cheers.

fabounet, Sunday 17 March 2013 à 01:05


Subscription date : 30 November 2007
Messages : 17118
HI,
what are you trying to do exactly ? are you talking about a third-party applet ?

hozmaster, Sunday 17 March 2013 à 07:16


Subscription date : 04 October 2012
Messages : 26
Store i.e. server preferences to file and read them back when applet started.

Other option is that when user wants add new i.e site preferences to file, settings file opened directly to the i.e. gedit and user add preferences there.

Is CD_CONFIG_GET* for this functionality. I think these are for static configs.

Yes, third part applet.

fabounet, Sunday 17 March 2013 à 09:44


Subscription date : 30 November 2007
Messages : 17118
if you want to read a config file, you can use keyfile.get in Python, in the get_config method (see any applet written in python)
this method is called when the applet starts and when it's reloaded
the config will be available for the user by editing the applet (from the right-click menu)

hozmaster, Monday 18 March 2013 à 09:50


Subscription date : 04 October 2012
Messages : 26
Ok, moving forward. It will be C based applet.

I did able import plugins folder/project to the qtcreator but I can't see my applet along with other plugins.

'make' command will compile my applet but is there something more to get listed in the qtCreator?

fabounet, Monday 18 March 2013 à 10:58


Subscription date : 30 November 2007
Messages : 17118
you need to "sudo make install" your applet

why not a thitd-party applet by the way ?

hozmaster, Saturday 30 March 2013 à 23:35


Subscription date : 04 October 2012
Messages : 26
cmake issue solved somehow .. I've comment two lines away ...

And my project has made some progress at well. However, I have still few problems to solve. One is in Menu handling in the applet.

In my applet has a menu (opened with left mouse button) and if user selects one of them something happens. Is there any way determine which mouse button user pressed on the menu ? I.e if user right mouse button something else happens than in case when user selected left mouse mouse button in same menu?

fabounet, Sunday 31 March 2013 à 00:48


Subscription date : 30 November 2007
Messages : 17118
well you can do that, but I'm not sure it's very user-friendly.
nobody expects a different behaviour when clicking on a menu entry with the right or left button

hozmaster, Sunday 31 March 2013 à 10:10


Subscription date : 04 October 2012
Messages : 26
thanks,

Probably you are right but I would like tested anyway.

well you can do that, but I'm not sure it's very user-friendly.


How ?

fabounet, Sunday 31 March 2013 à 11:14


Subscription date : 30 November 2007
Messages : 17118
I think you should connect to the "button-event-press" signal on the menu or on the menu-item.

hozmaster, Thursday 04 April 2013 à 10:17


Subscription date : 04 October 2012
Messages : 26
Ok I did investigations and put it hold ... I tried it at later.

I put one of menu options under of the CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT-event but gtk_file_chooser_dialog_new()-call will crash my applet. Why, is myContainer invalid somehow?

fabounet, Thursday 04 April 2013 à 23:53


Subscription date : 30 November 2007
Messages : 17118
myContainer is the container of the applet (dock or desklet), it has nothing to do with gtk_file_chooser_dialog_new
if you want to make a dialog with a GTK widget inside, use rather something like cairo_dock_show_dialog_full

hozmaster, Saturday 20 April 2013 à 23:00


Subscription date : 04 October 2012
Messages : 26
Thanks, I managed solve problems and I'm currently not so far beta stage. However, I question about applets and their configuration settings: I can't see my changes to conf file in the applets configuration pane. How to reset the configuration pane to show latest changes?

cheers,

matttbe, Sunday 21 April 2013 à 11:05


Subscription date : 24 January 2009
Messages : 12573
I can't see my changes to conf file in the applets configuration pane. How to reset the configuration pane to show latest changes?
You have to bump the version in auto-load.conf and YOUR_APPLET.conf files (or you can simply remove the file used by the dock: ~/.config/cairo-dock/current_theme/plug-ins/YOUR_THEME/YOUR_THEME.conf) and restart the dock.

fabounet, Sunday 21 April 2013 à 18:39


Subscription date : 30 November 2007
Messages : 17118
if you're doing a C applet, you need to update the version of your applet in the main CMakeLists.txt file

hozmaster, Monday 06 May 2013 à 09:52


Subscription date : 04 October 2012
Messages : 26
right, I think that my applet has reached beta stage. It's possible that you have time to review it before publish?

taiebot65, Monday 06 May 2013 à 17:26


Subscription date : 26 October 2008
Messages : 1904
Cool I love new applets what is it supposed to do ?

hozmaster, Monday 06 May 2013 à 21:54


Subscription date : 04 October 2012
Messages : 26
Keeping secrets as secret. Do you have any trunk repositories? Or do you use Launchapad?

fabounet, Tuesday 07 May 2013 à 09:19


Subscription date : 30 November 2007
Messages : 17118
yep we are on launchpad, see the wiki if you need more info, I'll be happy to review your code

hozmaster, Friday 10 May 2013 à 22:51


Subscription date : 04 October 2012
Messages : 26
Done. You should see it now.

Technical discussions | Discussions techniques

Subjects Author Language Messages Last message
[Locked] storing variable data to settings
Page : 1 2
hozmaster English 21


Glx-Dock / Cairo-Dock List of forums Technical discussions | Discussions techniques storing variable data to settings Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.