Technical discussions | Discussions techniques
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. |
Subscription date : 30 November 2007
Messages : 17118
|
HI,
what are you trying to do exactly ? are you talking about a third-party applet ? |
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. |
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) |
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? |
Subscription date : 30 November 2007
Messages : 17118
|
you need to "sudo make install" your applet
why not a thitd-party applet by the way ? |
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? |
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 |
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 ? |
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. |
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 |
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. |
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 |
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? |
Subscription date : 26 October 2008
Messages : 1904
|
Cool I love new applets what is it supposed to do ? |
Subscription date : 04 October 2012
Messages : 26
|
Keeping secrets as secret. Do you have any trunk repositories? Or do you use Launchapad? |
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 |
Subscription date : 04 October 2012
Messages : 26
|
Done. You should see it now. |
Technical discussions | Discussions techniques
|