[maemo-developers] Portrait Maemo app
From: Dave Neary bolsh at gnome.orgDate: Thu Jun 12 19:22:59 EEST 2008
- Previous message: Portrait Maemo app
- Next message: Portrait Maemo app
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
David Greaves wrote:
> Also, I've just written my first app in gtk/C.
> After sobbing quietly and trying to avoid getting tears on my N800 I'm looking
> forward to getting back to Qt!!
>
> Apologies to any gtk fans out there - I just have a hard time with all the
> pointer casting and trying to bludgeon the OO api into C. Qt was so much more
> elegant.
>
> check = (GtkCheckButton*) gtk_check_button_new_with_label("aargh");
> Since when does a constructor need type casting?
Actually, it (usually) doesn't.
GtkWidget *frame = gtk_frame_new("Checkbox");
GtkWidget *check = gtk_check_button_new_with_label("aargh");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), TRUE);
gtk_container_add(GTK_CONTAINER(frame),check);
gtk_widget_show(check);
gtk_widget_show(frame);
Cheers,
Dave.
--
maemo.org docsmaster
Email: dneary at maemo.org
Jabber: bolsh at jabber.org
- Previous message: Portrait Maemo app
- Next message: Portrait Maemo app
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
