Re: tiny messagebox patch



On Tue, Mar 24, 1998 at 03:26:15PM -0600, robert havoc pennington wrote:
> 
> On Tue, 24 Mar 1998, Federico Mena wrote:
> > 
> > The message box widget should use the GnomePixmap widget for its
> > pixmaps instead of creating them "by hand" with Gdk.  Could you please
> > look into this?  It should be a simple matter of
> 
> OK, here's a patch that does this. It also changes the button box layout
> to GTK_BUTTONBOX_DEFAULT_STYLE because the right-justified buttons looked
> kinda weird to me. But if this was a feature, ignore that part of the
> patch.

Hmm, well, it looked weird to me too, but I got used to it. I think it's a
feature, because most of the gnome dialogs have the buttons right aligned.

> I also changed it to have a default title of "Message" if no stock
> messagebox type is matched, and if there is no stock messagebox type
> matched or the stock pixmap fails to load it loads a default pixmap.  If
> the default pixmap fails to load it just uses the 0 x 0 empty GnomePixmap
> widget. 

Since I just made GnomeMessagebox use GnomePixmaps myself (and changed the
"bomb.xpm" to some pixmap found in gnome (gnome-default.png)), I think the
patch won't work. But I will apply the rest of the changes by hand.

> I think better behavior might be to add GNOME_MESSAGE_BOX_GENERIC and have 
> a warning if no stock messagebox types are matched - that would really be
> a bug in the user program. I can do this if people want.
> 
> Of course, all the pixmaps fail to load, because the pixmaps haven't been
> drawn yet AFAICT, and even if they had there's no mechanism in
> gnome-messagebox to figure out where they are installed. I am not sure how
> to fix this. gchar * gnome_get_pixmap_path() ? $ICON_PATH? Something like
> that would be useful.

gnome_pixmap_file is what you need (found in libgnome/gnome-util.h)

-- 
Eckehard Berns



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