Editing PyMaemo/HildonDesktop
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 20: | Line 20: | ||
== Example - Home widgets (Fremantle only) == | == Example - Home widgets (Fremantle only) == | ||
+ | |||
+ | The code below was based on the C example that can be found on the maemo-examples package sources [https://garage.maemo.org/svn/maemoexamples/branches/fremantle-sdk-testing/maemo-examples/hello-world-home.c]. | ||
<pre> | <pre> | ||
Line 66: | Line 68: | ||
</pre> | </pre> | ||
- | Save the example code shown above as /usr/lib/hildon-desktop/hello_world_home.py inside your FREMANTLE_X86 target. | + | Save the example code shown above as <b>/usr/lib/hildon-desktop/hello_world_home.py</b> inside your FREMANTLE_X86 target. Next, save the following text as <b>/usr/share/applications/hildon-home/hello_world_home.desktop</b>: |
- | + | ||
- | Next, save the following text as /usr/share/applications/hildon-home/hello_world_home.desktop: | + | |
<pre> | <pre> | ||
Line 78: | Line 78: | ||
</pre> | </pre> | ||
- | + | Make sure the hildon desktop and hildon-home are running. For that, you can use the following commands: | |
+ | |||
+ | <pre> | ||
+ | [sbox]> export DISPLAY=:2 # if you are using scratchbox + Xephyr | ||
+ | [sbox]> af-sb-init.sh start | ||
+ | [sbox]> run-standalone.sh maemo-summoner /usr/bin/hildon-home.launch & | ||
+ | </pre> | ||
- | Now you need to add the newly installed home widget to the desktop. | + | Now you need to add the newly installed home widget to the desktop. For that you can either manually add it to the <b>~/.config/hildon-desktop/home.plugins</b> file, or follow these instructions to add it using the Hildon Desktop interface: |
# Click anywhere on the Maemo desktop background. | # Click anywhere on the Maemo desktop background. | ||
Line 131: | Line 137: | ||
</pre> | </pre> | ||
- | + | Make sure the hildon desktop and hildon-status-menu are running. For that, you can use the following commands: | |
- | The example status menu widget should appear as soon as | + | <pre> |
+ | [sbox]> export DISPLAY=:2 # if you are using scratchbox + Xephyr | ||
+ | [sbox]> af-sb-init.sh start | ||
+ | [sbox]> run-standalone.sh maemo-summoner /usr/bin/hildon-status-menu.launch & | ||
+ | </pre> | ||
+ | |||
+ | The example status menu widget should appear as soon as hildon-status-menu process is started, as the plugin used in this example is of the permanent category. See [http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets#Status_Menu_widgets] for more information of status menu widgets categories. | ||
This is a screenshot taken on Xephyr showing how the widget will look like: | This is a screenshot taken on Xephyr showing how the widget will look like: | ||
Line 142: | Line 154: | ||
[[Image:Status-menu-2.png]] | [[Image:Status-menu-2.png]] | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- |
Learn more about Contributing to the wiki.