RE: [java-gnome-hackers] App.setStatusBar
Brought to you by:
afcowie
From: Jeffrey M. <Jef...@Br...> - 2002-08-28 15:56:07
|
> While working to get TestGNOME.java working, I came across > this issue. > In TestGNOME, an org.gnu.gtk.AppBar is created. An attempt is made to > assign it to org.gnu.gnome.App.setStatusBar(org.gnu.gnome.StatusBar). > Right now, StatusBar does not extend AppBar. In gnome-app.h, > gnome_app_set_statusbar takes a pointer to GtkWidget. Could > a developer > pass *any* widget to this function? > > My first inclination is to overload setStatusBar with > setStatusBar(org.gnu.gtk.AppBar) as well as > setStatusBar(org.gnu.gnome.StatusBar). Both GtkStatusbar and GnomeAppbar extend from GtkHBox. Internally, once you pass the object to the set_statusbar method it casts it to a GtkWidget and just adds it to the container. I think the overloaded method is the best approach. You should be able to pass either handle to the method and expect it to work fine. > I've tried using > http://developer.gnome.org/doc/API/libgnomeui/gnomeapp.html > for insight, > into how the gnome_app_set_statusbar function should be used. > Unfortunately, I could find nothing there to help me with this. Is > there a better place to look? If the only answer is to view the gnome > source I will go there, but I'd rather not. The best approach is to look at the docs first. If it doesn't answer the question then post to this list. I am fairly familiar with the code for both gtk and libgnomeui and can usually derive an answer quickly. -Jeff |