After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 535090 - Allow GtkToolShell to control some more properties on GtkToolItems
Allow GtkToolShell to control some more properties on GtkToolItems
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkToolbar
unspecified
Other Linux
: Normal enhancement
: Medium API
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 535095 567729
 
 
Reported: 2008-05-27 14:38 UTC by Jan Arne Petersen
Modified: 2013-08-14 00:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Implementation in GtkToolShell, GtkToolItem and GtkToolButton (14.83 KB, patch)
2008-05-27 14:49 UTC, Jan Arne Petersen
none Details | Review
Tool items with BOTH_HORIZ style placed like nautilus' "Text beside icon" mode (49.47 KB, image/png)
2008-05-28 10:56 UTC, Jan Arne Petersen
  Details
Add support for gtk_tool_shell_get_text_size_group () to support an enhanced BOTH_HORIZ look. (17.90 KB, patch)
2008-05-28 11:01 UTC, Jan Arne Petersen
none Details | Review
Fix some problems in BOTH_HORIZ mode. (17.91 KB, patch)
2008-06-19 14:54 UTC, Jan Arne Petersen
none Details | Review

Description Jan Arne Petersen 2008-05-27 14:38:41 UTC
It should be possible for a GtkToolShell to inform tool items about the desired text orientation, alignment and ellipsize mode.
Comment 1 Jan Arne Petersen 2008-05-27 14:49:23 UTC
Created attachment 111611 [details] [review]
Implementation in GtkToolShell, GtkToolItem and GtkToolButton
Comment 2 Jan Arne Petersen 2008-05-28 10:56:53 UTC
Created attachment 111650 [details]
Tool items with BOTH_HORIZ style placed like nautilus' "Text beside icon" mode
Comment 3 Jan Arne Petersen 2008-05-28 11:01:57 UTC
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 ...
Comment 4 Jan Arne Petersen 2008-06-19 14:54:44 UTC
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.
Comment 5 Björn Lindqvist 2008-09-10 16:06:42 UTC
Why shouldn't GtkToolbar implement the optional parts of this new added API?
Comment 6 Murray Cumming 2008-09-10 17:14:08 UTC
(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?
Comment 7 Jan Arne Petersen 2008-09-10 19:16:35 UTC
(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.
Comment 8 Björn Lindqvist 2008-09-12 16:40:57 UTC
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.
Comment 9 Murray Cumming 2008-09-29 22:03:03 UTC
Jan Arne, please try to explain what needs to be done, and why.
Comment 10 Jan Arne Petersen 2008-09-30 22:02:54 UTC
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.
Comment 11 Murray Cumming 2010-05-17 21:45:40 UTC
Is this patch still needed now that GtkToolPalette is in GTK+ and seems to be working?