Re: [glade--]some glade-- notes from a new user
Christof Petig <[email protected]>
| Newsgroups | gmane.comp.gnome.glademm |
|---|---|
| Organization | Adolf Petig GmbH & Co. KG |
| Message-ID | <[email protected]> |
Graeme Lufkin wrote:
> I'm working on my first GNOME application using glade--, and have
> arranged some thoughts that might help other people like me. I have
> looked in the archives to see if these issues have been addressed and
> fixed in cvs, and note it below (I may have missed some things).
> 1. Gnome App: glade-- forgets to add the content to the dock, the
> dock to the window, and the status bar to the window. This was
> addressed earlier on the mailing list, but I don't know if it has been
> fixed yet.
I don't know either, will look into it.
> 2. To utilize widgets after they are first painted, you probably
> want them as members of your app's class. To do this, first choose C++
> in the glade options. Then, for every widget that you want available as
> a member, use the Property window to change the Visibility property to
> public. The widget will then be a real class member, not just declared
> as a local variable in the constructor.
I'd suggest protected, since this does not generate publicly visible macros!
> 3. When you have one or more public widgets, the support files are
> generated (glademm_support.[hh,cc]). I'm not sure what the functions in
> here do. The version I have (0.6.4) thinks that the namespace for the
> standard library is '__STD', which I have never seen before. I changed
> all instance to 'std', and all works. An issue that may have been
> exactly this one was addressed on the mailing list at some point.
Hmm, I recall this as an old irix fix ... doesn't make too much sense to
me now.
> 4. Making menu items local: The GNOME app that people (me) like to
> use comes with some default menu items. When you try to make these
> items members of the class (via the Visibility: Public method described
> above), glade-- says that it can't modify those menu items.
Ignore this, it's a warning!
> I copied
> the declarations into the _glade.hh file and removed them from the
> constructor in _glade.cc, and the menuitems are now class members and
> get created correctly. However, they lose their magic accelerators (I
> say magic because I can't figure out where it is that 'Ctrl-Q' gets
> mapped to Exit, for example). If you know how to change a menuitem's
> accelerator (while still using the GNOME_UIINFO macros), let me know.
They are assigned to each stock item, you can't change them unless you
don't use stock items (you might use stock pictures).
>
> That's just some of the issues I have with glade--. If you have any
> more, or if you have comments/a better way to do it/suggestions for
> anything mentioned above, let me know. I think gtkmm and glade-- are
> great, but somebody needs to jump on the documentation bandwagon (not it!).
Agreed. But I don't have time to spare to document glade--.
Christof