All pastes #15074 Raw Edit

Miscellany

public text v1 · immutable
#15074 ·published 2005-06-20 10:48 UTC
rendered paste body
My code is in main.c:

#include <hildon-widgets/hildon-app.h>
#include <gtk/gtk.h>
#include <libosso.h>

int main(int argc, char** argv)
{
        HildonApp* app;

        gtk_init(&argc, &argv);

        app = HILDON_APP(hildon_app_new());
        hildon_app_set_title(app, ("My Title"));

        osso_initialize("helloWorld", "0.1", TRUE, NULL);

        gtk_widget_show_all(GTK_WIDGET(app));
        gtk_main();

        return 0;
}

and my build script is
gcc main.c -o hello `pkg-config --cflags --libs gtk+-2.0` `pkg-config --cflags --libs hildon-libs` `pkg-config --cflags --libs libosso`


My desktop file:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=maemo hello
Exec=/home/buday/hello/src/hello
X-Osso-Service=org.maemo.hello
Icon=qgn_list_gene_default_app


One should put it to /usr/share/applications/hildon/hello.desktop and make a symbolic link to /etc/others-menu/0010_hello.desktop.

My service file:

Name=org.maemo.hello
Exec=/home/buday/hello/src/hello

Its place is /usr/lib/dbus-1.0/services