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 109473 - it'd be nice if selectable labels worked like they do in mozilla
it'd be nice if selectable labels worked like they do in mozilla
Status: RESOLVED DUPLICATE of bug 79216
Product: gtk+
Classification: Platform
Component: Widget: GtkLabel
unspecified
Other Linux
: Normal enhancement
: Medium feature
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2003-03-29 02:34 UTC by Noah Levitt
Modified: 2014-12-23 11:51 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Noah Levitt 2003-03-29 02:34:59 UTC
I like the way selectable labels work in mozilla. To see what I mean, open
the Page Info dialog in mozilla, and make the window fairly skinny, so that
the URL doesn't fit. Then select it with the mouse. It can move back and
forth so you can see and select the whole thing.
Comment 1 Havoc Pennington 2003-03-29 02:51:27 UTC
Note that in gtk you wouldn't be able to resize the window such that
the labels didn't fit... so this would only apply in the case your
label was 
inside a scrolled window, or if you had a broken layout.

There is a separate bug already open to do something smarter than
truncate both ends of the label in this case, also.
Comment 2 Noah Levitt 2003-03-29 02:57:39 UTC
> Note that in gtk you wouldn't be able to resize the window such that
> the labels didn't fit

Right... that's partly what I'm suggesting to change.
Comment 3 Havoc Pennington 2003-03-29 03:02:00 UTC
Changing that is a major project - right now minimum size and default
size are the same thing, the size request. I'm not sure it's right,
either... kinda broken to be able to shrink that window.
Comment 4 Noah Levitt 2003-03-29 03:23:43 UTC
Maybe there could be a property on GtkLabel that makes it behave like
mozilla labels. GTK could improve on that by adding a visual
indication that some text is hidden, e.g.

Reports of my death have been ->
<-eath have been greatly exagg->
<-have been greatly exaggerated.

The arrows could be clickable, too!
Comment 5 Owen Taylor 2003-03-29 13:57:10 UTC
There are already bugs open for ellipsization (hard Pango
project, bug 59071) and for labels in scrolled windows 
auto-scrolling (bug 72916)

I'm not really sure what is being suggested here in
addition.

I added a note to the ellipsization bug that that the
caller may want to influence the ellipsized portion
based on selection or cursor position.
Comment 6 Noah Levitt 2003-03-29 16:55:16 UTC
I might not completely understand the ellipsization idea. But for
scrolled labels, I don't see that anything needs to be done in pango.
It would be rather like a limited scrolled window, with arrows on
either side instead of a scrollbar below, and policy always set to
automatic. (I don't think ellipsing in the middle would be useful for
scrolled labels.)
Comment 7 Matthias Clasen 2003-05-19 12:04:35 UTC
The bug referred to above is bug 79216.
Comment 8 Owen Taylor 2003-05-20 02:48:34 UTC
I think the request here could be expressed as:

 A non-ellipsized single-line selectable label that gets 
 allocated less than it's requisition should have the same 
 scrolling behavior as GtkEntry.

Which I think is possible reasonably, though the interaction
of all the possible modes might get complicated.

I'm less sure how it would work for multiline labels.

Visible indication, it seems to me should be exactly
the same as GtkEntry ... see bug 108963 for a RFE for
visual indication in GtkEntry.
Comment 9 Martijn Vernooij 2004-01-24 20:14:24 UTC
Note that placing a limit on the width of these labels might also be a
good idea. I've seen cases where the fact that they cannot be resized
becomes kind of rediculous.

For instance, in the xscreensaver preferences:

Choose a screensaver and click settings. Widen the window.

Click advanced and click standard. The label in the right pane grows.

Keep clicking and the label keeps growing. Depending on the text and
the layout of the left pane, this can make the left pane unusable by
allowing it too little space, while the text in the right pane is
hogging the width.

Could be an xscreensaver-gnome problem though..
Comment 10 Matthias Clasen 2014-12-23 11:51:42 UTC

*** This bug has been marked as a duplicate of bug 79216 ***