maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [Development] Creating Universal "Theme" section in Settings menu (https://talk.maemo.org/showthread.php?t=81095)

F2thaK 2011-12-25 02:14

[Development] Creating Universal "Theme" section in Settings menu
 
Hi all, I need help making XML file for Control Panel applet...

I would like to make a properly integrated universal Theme section in the Settings Menu of the N9. I have made little progress with this, but have made a start.

http://www.multiupload.com/2CPGBLXT5H
Contains 2 files and 2 folders.

Explanation here.

This will create a foundation for making and changing themes universally on the device. It will make it much easier for both users and developers.

I just cant find the info of how to make the current widget work. I think one button per row is better, so longer names can fit. I was also thinking of another button to apply the theme and reboot.

Any help is much appreciated.

Thanks!







Settings > Device
http://i900.photobucket.com/albums/a...0/settings.jpg

> Theme
http://i900.photobucket.com/albums/a...ings-theme.png

marxian 2011-12-25 02:21

Re: [Development] Need help making XML file for Control Panel applet
 
Post the contents of the XML file. It's probably just a syntax error.

F2thaK 2011-12-25 02:27

Re: [Development] Need help making XML file for Control Panel applet
 
http://www.multiupload.com/L0IQFNOWNK

Its probably got windows formatting, which I dont know how to avoid...

I want to make it run 2 scripts. Ive made one from your help to set theme with gconf. I just need to figure out how to make the XML run the scripts.

marxian 2011-12-25 02:49

Re: [Development] Need help making XML file for Control Panel applet
 
The declarative applet can only be used to change a GConf value. You can't use it to execute a custom command. You don't actually need such a command, anyway.

This should work:

Code:


<xml version='1.0' encoding='UTF-8'>
<settings>
  <group title="Theme">
      <selection key="/meegotouch/theme/name" title="Select a theme:">
        <option title="Default" >blanco</option>
        <option title="Faster Darker" >fasterdarker</option>
    </selection>
  </group>
</settings>


F2thaK 2011-12-25 02:54

Re: [Development] Need help making XML file for Control Panel applet
 
hmm. same error. set permissions to 0755, same.

?

marxian 2011-12-25 03:12

Re: [Development] Need help making XML file for Control Panel applet
 
I think perhaps the options can only have integer values, and must be in order, i.e.

Code:

<xml version='1.0' encoding='UTF-8'>
<settings>
  <group title="Theme">
      <selection key="/meegotouch/theme/name" title="Select a theme:">
        <option title="Default" >1</option>
        <option title="Faster Darker" >2</option>
    </selection>
  </group>
</settings>

The documentation is not exactly exhaustive on what options are available when using a declarative applet. What you need is to be able to set a string value using either a button row or selection list.

F2thaK 2011-12-25 09:26

Re: [Development] Need help making XML file for Control Panel applet
 
Code:

<settings>
      <selection key="/meegotouch/theme/name" title="Select a theme:">
        <option title="Default" >1</option>
        <option title="Faster Darker Better" >2</option>
    </selection>
</settings>

this works.. now, how to actually make it do something.

edit: cant change the numbers 1 & 2, it goes back to the original error.

found some reading material
http://harmattan-dev.nokia.com/docs/...cm9scGFuZWw%3D
http://harmattan-dev.nokia.com/docs/...veplugins.html

F2thaK 2011-12-25 12:42

Re: [Development] Need help making XML file for Control Panel applet
 
On this page:
harmattan-dev.nokia.com/docs/platform-api-reference/showdoc.php?pkn=libduicontrolpanel&wb=daily-docs&url=Li94bWwvZGFpbHktZG9jcy9saWJkdWljb250cm9sc GFuZWw%3D

It says:
Quote:

You can find an example about how to do this under examples/declarativeapplets/localized in controlpanel source.

Okay, so where is this controlpanel source?

nicolai 2011-12-26 00:11

Re: [Development] Need help making XML file for Control Panel applet
 
Maybe this one:

http://meego.gitorious.org/meegotouc...plet/localized

F2thaK 2011-12-26 00:14

Re: [Development] Need help making XML file for Control Panel applet
 
Awesome! Why dont they link to that page?! Thanks!!


All times are GMT. The time now is 17:46.

vBulletin® Version 3.8.8