Re: Don't shoot the newbie.



Thanks Havoc.

Apart from these, I seem to still be having some hassles.  But from the
gdb info I'm getting, it seems I'm getting data as a pointer to a
pointer to a GtkWindow - basically its my pointer handling that's up the
creek ...

Maybe one day I'll actually have a clue =)

Thanks again,
Bradley.

On 15 May 2001 12:00:44 -0400, Havoc Pennington wrote:

Bradley Shuttleworth <brads debating org za> writes:
                                    gpointer *data)

No * here, just "gpointer data"

            gtk_window_set_title(GTK_WINDOW (data), (gpointer)
            "Title ON!");

That gpointer cast isn't needed.


main(       gint argc,
            gchar *argv[])

should put a return value for main ()


    gtk_signal_connect_object(GTK_OBJECT(button),"clicked",GTK_SIGNAL_FUNC(title_change),
    (gpointer) mainwindow);

Use signal_connect(), not signal_connect_object(). connect_object()
swaps the user data and signal-emitting object arguments to the
callback.

    /* Visualize */
    gtk_widget_show(button);
    gtk_widget_show(mainwindow);

gtk_widget_show_all (mainwindow) saves typing.

Havoc


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]