RE: Small question...

I'm in a similar situation, "swithering" between Gnome and pure GTK.
fortunately I'm not at the stage where I already "wrote the app the hard

I'm using GnomeMDI at the "top level". Opening an object from here, I create
new top-level window for editing (roughly the same way the GIMP works). I
going to use


at this point, but I'd rather use a Gnome app, so I can the UI builder for
menus on this window.

Is it OK to create multiple gnome_app's? I've tried it and it seems to work,
am I slowly corrupting some "created-once-only" data structures, e.g. global

variables, or the equivalent of "Class Members" in C++ ?

Also, I don't know what effect this will have on session management.

I can't, unfortunately use the UI builder for the toolbars in the edit
(at least not yet) since I need more than one, and also I need to put
widgets in the toolbars, which libgnomeui doesn't (appear to) support (yet).

I guess the best way to handle this is to create toolbars manually (from a
which is as close as I can get to the UI builder data :-) and add them to
gnome_app's dock. .... Yes?

Another couple of things that I've been trying to find an answer for, for a 
while: what's the best way of setting an initial size for an application's
window? When my MDI window is created, the MDI has no children, so it
requisition any space, giving me a tiny window with only the menubar and
in it. After adding a view to the MDI, it resizes itself, but is still to
to be useful, so I then have to drag the WM's handle.

Question: what's the best way of setting a sensible default? Even if I have
do a calculation based on, say, half the screen size - what widget would I
the gtk_widget_set_usize on - the app's main window or the (childless) MDI?

I've also noticed some strange behaviour when an app's main window is
created. Some applications appear to resize the window immediately after it
shown. This has happened to code I've written, so I don't think it's the 
application's code which is responsible, unless there's some trick to the
things are created/shown in.

It's most evident if the WM is configured the way mine is: ActivePlacement, 
SmartPlacement (fvwm2). Starting up, e.g. gwp, the WM (if it goes for 
ActivePlacement) will offer me an outline of a small (something like
window. Once I've placed the outline where I want it, the window appears and

immediately resizes to something more sensible.

If, however, there is enough unused desktop space (rare :-) to fit in a
window, the WM will "SmartPlace" it in, say, the bottom left of the screen,
the window will immediately resize, resulting in about 90% of it being off
bottom of the screen.

If, however, the window had been properly sized before it was mapped, the WM

would have offered me ActivePlacement of the correct-sized outline.

This is VERY annoying .... is there anything I can do about it? I'll hack 
gnome-libs if I have to :-)

I don't want to be forced to use RandomPlacement - one of the goals of Gnome
that you can use any WM/WM-config you like.


______________________________ Reply Separator
Subject: Re: Small question...
Author:  "Havoc Pennington" [SMTP:hp@Mcs.Net] at Internet
Date:    3/3/99 6:32 AM

On Mon, 1 Mar 1999 wrote:
> I am thinking of porting a GTK+ app. to Gnome... but I won't add any
> Gnome menubars or something. Are there any reasons (advantages) that my 
> app will have ones it has been ported to Gnome? In other words: why the 
> hell would I port it to Gnome??
 - consistent look and feel (if you use GnomeApp and GnomeDialog,
 - consistent, pre-written config file library 
 - nice session management infrastructure
 - gdk_imlib lets you load images
 - GnomeCanvas is nice if you app needs it
 - CORBA is available, and libgnorba authentication library 
 - lots of convenience functions and widgets, though this is
   less useful if you already wrote the app the hard way
 - ZvtTerm terminal widget
 - GnomeMDI
 - Global user-configurable preferences for many things Gtk apps
 - File metadata
 - Printing architecture
 - Online help facility (launches the help browser or user-configurable
 - Internationalization built-in
 - popt argument parsing
 - Bonobo/Baboon object embedding architecture 
 - Special window manager hints
I'm sure other people can add more reasons. :-)
Some of these things are available as separate modules too, but it sure is 
easier to use gnome-libs now that gnome-libs is nice and stabilized.
To unsubscribe: mail with "unsubscribe" 
as the Subject.

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