Simple gtk+ program - output not as expected

Tomeu Vizoso tomeu at tomeuvizoso.net
Mon Apr 7 05:35:05 EDT 2008


Hi Aswathy,

the Sugar environment is quite different from GNOME.

Applications developed in a traditional style like GNOME apps, cannot
be run in Sugar and give the intended experience without some
modifications.

As far as I know, nobody has yet worked on an activity in Gtk+ and C.
This is of course doable, but right now it's perhaps not worth it and
is better to code the UI in PyGTK.

In case you decide to code your activity in python, see the link below
for a simple activity that implements most of what makes a Sugar
activity:

http://dev.laptop.org/git?p=users/marco/edit-activity;a=summary

How to check out that code: http://wiki.laptop.org/go/Git

To summarize: I don't recommend _at all_ to code a new activity from
scratch using Gtk+ and C. No matter how much experience you have in C
and how little python you know. We want kids to be able to read code
and be able to easily modify it, and right now python is the language
that provides it while being better supported in Sugar.

Please keep asking questions about the technical difficulties you are
finding, but I'd recommend you to explain here first in detail _what_
you want to accomplish. I'm sure many of the people in this list will
be able to contribute useful comments.

Thanks,

Tomeu

2008/4/7 Aswathy <aswathyp1986 at gmail.com>:
>
>
> Hi
>
>
>
>   I have compiled the program shown below in my system in Fedora platform
> and had run in my system too. I took the executable file of this program and
> run it in the OLPC. But I couldn't get the same output as that in Fedora.
> Why is it so? It just shows up like the whole screen. It doesn't even act
> like any activity in OLPC. What can we do to this code so that it looks like
> an activity in OLPC? How can we modify it?
>
>
>
> The code is as follows:
>
>
>
> #include <gtk/gtk.h>
>
> int main( int   argc,
>           char *argv[] )
> {
>     GtkWidget *window;
>
>     gtk_init (&argc, &argv);
>
>     window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
>     gtk_widget_show  (window);
>
>     gtk_main ();
>
>     return 0;
> }
>
>
>
> This is a simple code that just displays a window with a minimize, maximize
> & close buttons.
>
>
>
>     Please suggest the modifications needed for this program so that it runs
> similar with the OLPC too.
>
>
>
> aswathy
>
> _______________________________________________
>  Devel mailing list
>  Devel at lists.laptop.org
>  http://lists.laptop.org/listinfo/devel
>
>



More information about the Devel mailing list