GNOME Bugzilla – Bug 535090
Allow GtkToolShell to control some more properties on GtkToolItems
Last modified: 2013-08-14 00:52:17 UTC
It should be possible for a GtkToolShell to inform tool items about the desired text orientation, alignment and ellipsize mode.
Created attachment 111611 [details] [review] Implementation in GtkToolShell, GtkToolItem and GtkToolButton
Created attachment 111650 [details] Tool items with BOTH_HORIZ style placed like nautilus' "Text beside icon" mode
Created attachment 111651 [details] [review] Add support for gtk_tool_shell_get_text_size_group () to support an enhanced BOTH_HORIZ look. TODO: * the API is too complicated ...
Created attachment 113049 [details] [review] Fix some problems in BOTH_HORIZ mode. It is probably a better idea to implement an EggToolPaletteButton as a subclass of GtkToolItem instead of this API.
Why shouldn't GtkToolbar implement the optional parts of this new added API?
(In reply to comment #4) > Created an attachment (id=113049) [edit] > Fix some problems in BOTH_HORIZ mode. > > It is probably a better idea to implement an EggToolPaletteButton as a subclass > of GtkToolItem instead of this API. I don't quite understand. Will that require some other change to GTK+ instead of this patch? If so, what? If not, why is this bug open?
(In reply to comment #5) > Why shouldn't GtkToolbar implement the optional parts of this new added API? GtkToolbar could implement this API, too. (In reply to comment #6) > (In reply to comment #4) > > Created an attachment (id=113049) [edit] > > Fix some problems in BOTH_HORIZ mode. > > > > It is probably a better idea to implement an EggToolPaletteButton as a subclass > > of GtkToolItem instead of this API. > > I don't quite understand. Will that require some other change to GTK+ instead > of this patch? If so, what? If not, why is this bug open? With the current toolbar API an implementation like this patch is required and the bug is open because the patch is not applied yet.
Sorry I don't get it. Is there something that is hard to implement with GTK+ today that the patch makes easier? Where is the rationale for these four extra attributes? Is there some prior mailing list discussion? Since GtkToolbar doesn't implement the optional parts of the API, the patch doesn't do anything to any widget except adding more hooks so it is hard to see what the meaning is.
Jan Arne, please try to explain what needs to be done, and why.
For GtkToolbar the patch probably doesn't make much sense. But it allows EggToolPalette (proposed for inclusion into GTK+) more control of its child's (GtkToolItems) appearance, which is not strictly required by EggToolPalette but would make sense. I don't really like the patch but it follows the current API design of GtkToolShell/GtkToolItem and I currently don't see a better way to implement it.
Is this patch still needed now that GtkToolPalette is in GTK+ and seems to be working?