On Wed, 2006-02-15 at 19:08 +0100, Mark Wielaard wrote:
> Hi Tom,
> 
> On Wed, 2006-02-15 at 12:49 -0500, Thomas Fitzsimmons wrote:
> > > -  GtkWidget *window;
> > > +  GtkWindow *window;
> > > [...] 
> > > -  window = gtk_plug_new ((GdkNativeWindow) socket_id);
> > > +  window = GTK_WINDOW (gtk_plug_new ((GdkNativeWindow) socket_id));
> >
> > A simpler fix and one more in line with the rest of the peer code is to
> > change the added line to:
> > 
> > gtk_window_set_decorated (GTK_WINDOW (window), FALSE);
> 
> OK. I'll change it in a minute.
> What is precisely the rational/rule here?

The GTK coding convention is to always use GtkWidgets and downcast when
necessary.  All gtk_*_new methods return GtkWidgets, including
gtk_plug_new:

http://developer.gnome.org/doc/API/2.0/gtk/GtkPlug.html

Tom



Reply via email to