Re: stock system
- From: Damon Chaplin <damon helixcode com>
- To: Havoc Pennington <hp redhat com>
- Cc: Tim Janik <timj gtk org>,Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: stock system
- Date: Thu, 27 Jul 2000 13:17:09 +0100
Havoc Pennington wrote:
> For the GtkPixmapMenuItem thing, we've talked about it some at the
> Labs and I think we just want a subclass of GtkMenuItem that can
> display a child widget on the left side, which can be a GtkImage; I'm
> not sure what to name the subclass.
GtkIconMenuItem ?
Actually, I'd rather the functionality was added to GtkMenuItem.
Say you're using a GUI builder and you want to add an icon to a menu
item. What do you do? Remove the existing GtkMenuItem, add a new
GtkIconMenuItem, type in the label again etc.?
(I'm assuming you're using a decent GUI builder that can edit menus
in-place here ;) )
Or does the GUI builder resort to awful hackery to make it easy for the
user.
> So do you think I should remove the accel_group argument to
> gtk_button_new_stock(), and simply always use the default accel group?
>
> I actually created gtk_window_get_default_accel_group() so users could
> use it to obtain an accel group to pass to gtk_button_new_stock(). But
> if there's no good reason to pass a different accel group, we may as
> well not require them to type it in.
Do we still have a problem with notebook-like widgets? i.e. what
happens if you have a button '_Save' on one page and '_Send' on another?
If both accelerators are installed in the window, there is a conflict.
(I believe that gtkaccelgroup.c uses accel_group + keyval + modifier to key
into a hash table, so it would only allow one of these anyway.)
I did suggest a while back that we could (optionally) de-activate accelerators
if they were not mapped/visible. But that wouldn't fix the hash key problem.
(In libglade an accel group is used for each page of the notebook, and the
accel group is installed/uninstalled on the map/unmap signals.)
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]