Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

how to create a desktop applet

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


ibrahim.ali at asgatech

Nov 16, 2009, 12:17 AM

Post #1 of 8 (783 views)
Permalink
how to create a desktop applet

greetings;

I am tryting to make an applet to show some information on the desktop.
I can't seem to find the APIs needed to do such thing.
where should a look to find something like that?

thanx
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


daniel.wilms at nokia

Nov 16, 2009, 12:44 AM

Post #2 of 8 (756 views)
Permalink
Re: how to create a desktop applet [In reply to]

Hi
> I can't seem to find the APIs needed to do such thing.
> where should a look to find something like that?
there is a good tutorial how to do that in the developer guide:

http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets

Hope that helps,

cheers Daniel
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


ibrahim.ali at asgatech

Nov 17, 2009, 9:31 AM

Post #3 of 8 (729 views)
Permalink
Re: how to create a desktop applet [In reply to]

daniel wilms wrote:
> Hi
>> I can't seem to find the APIs needed to do such thing.
>> where should a look to find something like that?
> there is a good tutorial how to do that in the developer guide:
>
> http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets
>
>
> Hope that helps,
>
> cheers Daniel
>
I tried the example, created a debian package out of the output, and
installed it on the emulator and the n900 phone. BUT noting happened!
th eapplication is installed but i can't see the applicatin name in the
"Add Widget" menu from the "Desktop menu".
What am I missing ?? is there anything else i can do to make the home
widget visible to the "Add widget" and the Desktop??

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


kimmo.hamalainen at nokia

Nov 17, 2009, 11:38 PM

Post #4 of 8 (733 views)
Permalink
Re: how to create a desktop applet [In reply to]

On Tue, 2009-11-17 at 18:31 +0100, ext ibrahim wrote:
> daniel wilms wrote:
> > Hi
> >> I can't seem to find the APIs needed to do such thing.
> >> where should a look to find something like that?
> > there is a good tutorial how to do that in the developer guide:
> >
> > http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets
> >
> >
> > Hope that helps,
> >
> > cheers Daniel
> >
> I tried the example, created a debian package out of the output, and
> installed it on the emulator and the n900 phone. BUT noting happened!
> th eapplication is installed but i can't see the applicatin name in the
> "Add Widget" menu from the "Desktop menu".
> What am I missing ?? is there anything else i can do to make the home
> widget visible to the "Add widget" and the Desktop??

I haven't tried that, but libhildondesktop1-examples package has an
example Home applet that worked for me. The package should be part of
the SDK. The latest source is in the gitorious:

http://maemo.gitorious.org/fremantle-hildon-desktop/libhildondesktop

-Kimmo


_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


ibrahim.ali at asgatech

Nov 18, 2009, 12:19 AM

Post #5 of 8 (713 views)
Permalink
Re: how to create a desktop applet [In reply to]

Kimmo Hämäläinen wrote:
> On Tue, 2009-11-17 at 18:31 +0100, ext ibrahim wrote:
>
>> daniel wilms wrote:
>>
>>> Hi
>>>
>>>> I can't seem to find the APIs needed to do such thing.
>>>> where should a look to find something like that?
>>>>
>>> there is a good tutorial how to do that in the developer guide:
>>>
>>> http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets
>>>
>>>
>>> Hope that helps,
>>>
>>> cheers Daniel
>>>
>>>
>> I tried the example, created a debian package out of the output, and
>> installed it on the emulator and the n900 phone. BUT noting happened!
>> th eapplication is installed but i can't see the applicatin name in the
>> "Add Widget" menu from the "Desktop menu".
>> What am I missing ?? is there anything else i can do to make the home
>> widget visible to the "Add widget" and the Desktop??
>>
>
> I haven't tried that, but libhildondesktop1-examples package has an
> example Home applet that worked for me. The package should be part of
> the SDK. The latest source is in the gitorious:
>
> http://maemo.gitorious.org/fremantle-hildon-desktop/libhildondesktop
>
> -Kimmo
>
>
>
>
Didn't work either. Maybe there is something wrong with the way i create
packages:
the steps i take to create the package are :

1. compile the source and header using gcc inside scratchbox
* gcc -shared 'pkg-config hildon-1 libhildondesktop-1 --libs
--cflags' example.c example.h -o output.so
2. create the folder structure : data/usr/lib/ and put the output.so
file inside it
3. create the folder : data/usr/share/applications/hildon-home and
put the .desktop file inside it
4. create the DEBIAN/control file and supply the package information
in it
5. rename the parent folder to : <appname>-<version>||
6. |run the command : dpkg-deb --build app-folder|
7. then setup the package to the emulator using dpkg -i packagename.deb
8. in the emulator; press on the upper area of the desktop, and enter
the desktop menu
9. click on the Desktop menu ---> add widget ---> didn't find my
application name in the widgets menu !!!

what's wrong with what i've done ?? can anybody help?

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


kimmo.hamalainen at Nokia

Nov 18, 2009, 12:29 AM

Post #6 of 8 (727 views)
Permalink
Re: how to create a desktop applet [In reply to]

On Wed, 2009-11-18 at 09:19 +0100, ext ibrahim wrote:
> Kimmo Hämäläinen wrote:
> > On Tue, 2009-11-17 at 18:31 +0100, ext ibrahim wrote:
> >
> >> daniel wilms wrote:
> >>
> >>> Hi
> >>>
> >>>> I can't seem to find the APIs needed to do such thing.
> >>>> where should a look to find something like that?
> >>>>
> >>> there is a good tutorial how to do that in the developer guide:
> >>>
> >>> http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets
> >>>
> >>>
> >>> Hope that helps,
> >>>
> >>> cheers Daniel
> >>>
> >>>
> >> I tried the example, created a debian package out of the output, and
> >> installed it on the emulator and the n900 phone. BUT noting happened!
> >> th eapplication is installed but i can't see the applicatin name in the
> >> "Add Widget" menu from the "Desktop menu".
> >> What am I missing ?? is there anything else i can do to make the home
> >> widget visible to the "Add widget" and the Desktop??
> >>
> >
> > I haven't tried that, but libhildondesktop1-examples package has an
> > example Home applet that worked for me. The package should be part of
> > the SDK. The latest source is in the gitorious:
> >
> > http://maemo.gitorious.org/fremantle-hildon-desktop/libhildondesktop
> >
> > -Kimmo
> >
> >
> >
> >
> Didn't work either. Maybe there is something wrong with the way i create
> packages:
> the steps i take to create the package are :
>
> 1. compile the source and header using gcc inside scratchbox
> * gcc -shared 'pkg-config hildon-1 libhildondesktop-1 --libs
> --cflags' example.c example.h -o output.so
> 2. create the folder structure : data/usr/lib/ and put the output.so
> file inside it
> 3. create the folder : data/usr/share/applications/hildon-home and
> put the .desktop file inside it
> 4. create the DEBIAN/control file and supply the package information
> in it
> 5. rename the parent folder to : <appname>-<version>||
> 6. |run the command : dpkg-deb --build app-folder|
> 7. then setup the package to the emulator using dpkg -i packagename.deb
> 8. in the emulator; press on the upper area of the desktop, and enter
> the desktop menu
> 9. click on the Desktop menu ---> add widget ---> didn't find my
> application name in the widgets menu !!!
>
> what's wrong with what i've done ?? can anybody help?

Easier way:

1) git clone git://gitorious.org/fremantle-hildon-
desktop/libhildondesktop.git
(you can do this also outside Scratchbox), or:
1) apt-get source libhildondesktop1

2) cd libhildondesktop
3) dpkg-buildpackage -rfakeroot -b
(this builds the Debian package)
4) copy libhildondesktop1-examples_<version>_armel.deb to your N900
5) install it as root: dpkg -i libhildondesktop1-
examples_<version>_armel.deb
(hildon-home should notice the new .desktop file and list it in the
dialog that you use to add applets on the Home view)

-Kimmo


_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


jeremiah at jeremiahfoster

Nov 18, 2009, 4:32 AM

Post #7 of 8 (720 views)
Permalink
Re: how to create a desktop applet [In reply to]

On Nov 18, 2009, at 9:19, ibrahim wrote:

> Didn't work either. Maybe there is something wrong with the way i create
> packages:

There isn't really a wrong or right way, just a way that works for you and allows the package to be installed according to policy. That said, there are some 'best practices' that will make your life easier.

> the steps i take to create the package are :
>
> 1. compile the source and header using gcc inside scratchbox
> * gcc -shared 'pkg-config hildon-1 libhildondesktop-1 --libs
> --cflags' example.c example.h -o output.so
> 2. create the folder structure : data/usr/lib/ and put the output.so
> file inside it
> 3. create the folder : data/usr/share/applications/hildon-home and
> put the .desktop file inside it
> 4. create the DEBIAN/control file and supply the package information
> in it

You may want to look at dh-make. This program creates a whole bunch of skeleton files and directories which can provide a template for your package. You just have to edit the files you want and make them relevant to your package. The debian New Maintainers Guide describes this process in detail. You get the added benefit that your eventual package is installable on a number of OSes, like Ubuntu, Mepis, debian, etc.

> 5. rename the parent folder to : <appname>-<version>||
> 6. |run the command : dpkg-deb --build app-folder|

Like Kimmo mentioned, using dpkg-buildpackage is probably a best practice. I think this is the command used most often both in Maemo and in debian which means you will have lots of help if you run into some weird behavior.

> 7. then setup the package to the emulator using dpkg -i packagename.deb
> 8. in the emulator; press on the upper area of the desktop, and enter
> the desktop menu
> 9. click on the Desktop menu ---> add widget ---> didn't find my
> application name in the widgets menu !!!
>
> what's wrong with what i've done ?? can anybody help?

I think following Kimmo's advice would be an excellent way to go. :-)

Jeremiah
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


dyerga at gmail

Nov 18, 2009, 5:15 AM

Post #8 of 8 (712 views)
Permalink
Re: how to create a desktop applet [In reply to]

Hi.

On Wed, 18 Nov 2009 10:19:09 +0200
ibrahim <ibrahim.ali [at] asgatech> wrote:

> Didn't work either. Maybe there is something wrong with the way i
> create packages:
> the steps i take to create the package are :
>
> 1. compile the source and header using gcc inside scratchbox
> * gcc -shared 'pkg-config hildon-1 libhildondesktop-1 --libs
> --cflags' example.c example.h -o output.so
> 2. create the folder structure : data/usr/lib/ and put the
> output.so file inside it
> 3. create the folder : data/usr/share/applications/hildon-home and
> put the .desktop file inside it
> 4. create the DEBIAN/control file and supply the package
> information in it
> 5. rename the parent folder to : <appname>-<version>||
> 6. |run the command : dpkg-deb --build app-folder|
> 7. then setup the package to the emulator using dpkg -i
> packagename.deb 8. in the emulator; press on the upper area of the
> desktop, and enter the desktop menu
> 9. click on the Desktop menu ---> add widget ---> didn't find my
> application name in the widgets menu !!!
>
> what's wrong with what i've done ?? can anybody help?
>

If those instructions are complete you're storing the .so file in a
wrong location (/usr/lib/).
The .so files for a Home applet are stored in /usr/lib/hildon-desktop/

--
Daniel Martin Yerga
http://yerga.net
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.