Commit Graph

510 Commits

Author SHA1 Message Date
Benjamin Otte
37030a7710 label: Add ink rect support to GtkLabel 2014-07-10 18:56:34 +02:00
Benjamin Otte
a97901b1f7 label: Move function
This just moves the function, no actual code changes.
2014-07-10 18:56:34 +02:00
Matthias Clasen
8677446fe0 GtkLabel: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:55 -04:00
Carlos Garnacho
8dcdec58eb label: Use gestures for event management
A multipress gesture takes care of link handling, and char/word/all
selection mode on selectable labels. A drag gesture is used for both
text selection and DnD checks on selectable labels.
2014-06-05 16:15:54 +02:00
Matthias Clasen
24863a0b6a Revert "GtkLabel: Drop use of GtkMisc::x/yalign"
This reverts commit b320c198b6.
2014-05-27 13:07:03 -04:00
Matthias Clasen
6ce2a8fb13 Revert "Fix up GtkLabel and GtkImage sizing"
This reverts commit 3b30cfa344.
2014-05-27 13:04:43 -04:00
Matthias Clasen
7c83a71239 Revert "More label and image sizing fixes"
This reverts commit 68c1e83cf0.
2014-05-27 13:04:34 -04:00
Matthias Clasen
68c1e83cf0 More label and image sizing fixes
Go back to respecting GtkMisc::xpad/ypad. Not doing so breaks
the misc-alignment reftest. As long as we still derive from
GtkMisc, we may as well do this.
2014-05-27 06:00:21 -04:00
Matthias Clasen
3b30cfa344 Fix up GtkLabel and GtkImage sizing
When GtkMisc was removed, I forgot to apply the style context
padding. This caused the info-bar-message-types reftest to fail.
2014-05-27 00:22:40 -04:00
Matthias Clasen
b320c198b6 GtkLabel: Drop use of GtkMisc::x/yalign
Instead, use GtkWidget::h/valign to position the text inside
the allocation. And just stop using GtkMisc::x/ypad.

https://bugzilla.gnome.org/show_bug.cgi?id=730613
2014-05-24 00:04:41 -04:00
Matthias Clasen
49cf5142ba Deprecate GdkColor
It has been replaced by GdkRGBA. Time to make it official.
http://bugzilla.gnome.org/show_bug.cgi?id=636695
2014-05-22 09:09:55 -04:00
Matthias Clasen
6b26410d38 GtkLabel: Make context menus on links work
We see an active link when creating the menu, but by the time
the menuitem is activated, we've received a leave notify that
makes the label clear its active link. Instead, give the
menuitems a direct reference to the link that is active when
the menu is created.

Problem pointed out by Tim Baedert
2014-05-21 10:29:17 -04:00
Matthias Clasen
ec0a60a248 Deprecate GtkMisc
This has been dangling ever since 3.0.
2014-05-13 08:45:00 -04:00
Matthias Clasen
49188aeeda GtkLabel: Drop references to GtkMisc
GtkMisc is heading for retirement. Point to the GtkWidget h/valign
properties instead.
2014-05-13 07:14:38 -04:00
Matthias Clasen
ac96c35230 Update documentation about link styling
The ::link-color and ::visited-link-color style properties
are ignored now. Document that.
2014-03-17 15:00:45 -04:00
Matthias Clasen
ba0542dc51 Allow applications to use gtk-enable-mnemonics in 3.12
gnome-terminal is still using this setting, so we'll let
applications override it for another cycle. It is no longer
backed by a system-wide setting, though, and it will still
go away eventually.

This partically reverts 7e3a494fac
2014-03-03 18:58:26 -05:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
62254456f7 GtkLabel: don't eat too many button release events
We should only eat button release events when the label is
actually selectable, since the comment indicates that we
want to eat the release events belonging to press events
that triggered a selection. This fixes problems with actions
on parent widgets that are triggered by button release,
as seen in this bug:

https://bugzilla.gnome.org/show_bug.cgi?id=724541
2014-02-17 23:09:44 -05:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
William Jon McCann
37a8ee6e95 docs: fully break lines in examples
Try to do a better job of keeping example content
from being too wide. It is often rendered as <pre>
text so the only time we can wrap it is in the source.

It is best to full break lines at all punctuation and
to try to keep the width under 70 chars or so.
2014-02-12 18:42:50 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
326da2da58 docs: don't use <anchor> 2014-02-07 15:40:52 -05:00
William Jon McCann
13998c55e7 docs: use proper quotations instead of '*' 2014-02-07 14:22:39 -05:00
William Jon McCann
a4b5929e81 docs: use apostrophe in *'re 2014-02-07 13:37:09 -05:00
William Jon McCann
285d216d3e docs: use apostrophe in *'ll 2014-02-07 13:35:54 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
William Jon McCann
16db6bbccf docs: fix quotes in example 2014-02-06 10:55:12 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
Benjamin Otte
25d02909c8 label: Invalidate link colors on style change
Discovered-by: Timm Bäder <mail@baedert.org>

https://bugzilla.gnome.org/show_bug.cgi?id=721309
2014-02-05 13:38:54 +01:00
Benjamin Otte
219357d69c label: refactor code
Split out function for setting attributes. This will be needed in future
patches.
2014-02-05 13:38:54 +01:00
Benjamin Otte
a0bfbc8ae1 label: Avoid creating new attribute list
Only create an attribute list for merging if we actually need to merge.

This bug was introduced in 5230cfe805
2014-02-05 13:38:54 +01:00
William Jon McCann
3b3d8ca456 docs: Use "#" for refsect2 instead of ## 2014-02-04 21:00:58 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
William Jon McCann
76447c3512 docs: use quotes instead of <firstterm> 2014-02-04 18:10:11 -05:00
William Jon McCann
6ba5e6bb1a docs: don't use <tag> docbook elements 2014-02-04 17:38:09 -05:00
William Jon McCann
dcd43cc77a docs: fix spurious list close tag
Missed by patch 30cc1512e
2014-02-03 09:51:40 -05:00
Matthias Clasen
245c385ae7 Docs: Don't use note elements
In most cases, the text itself makes the message clear enough.
2014-02-02 01:22:14 -05:00
Matthias Clasen
30cc1512e6 Docs: Use markdown for lists
This greatly reduces the amount of xml in the docs.
2014-02-02 01:07:39 -05:00
Matthias Clasen
09d1b28249 docs: Convert to markdown
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081 docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
8e421623e6 docs: don't use properties syntax for child props 2014-01-21 18:57:37 -05:00
Matthias Clasen
b85a8001e0 GtkLabelAccessible: update state of links
This commit makes the LinkImpl children of label accessibles
inherit all their state, except for focused and visited, which
are handled directly.

https://bugzilla.gnome.org/show_bug.cgi?id=721406
2014-01-04 10:54:03 -05:00
Matthias Clasen
5845356d66 GtkLabelAccessible: Implement AtkHypertext
This commit makes the label accessible implement AtkHypertext,
which returns a AtkHyperlink object for each link in the text.
At the same time, add AtkHyperlinkImpl objects as children
to the label accessible.

Also some private API to indicate that links have changed, and
call that from GtkLabel when needed.

Adjust expected output of the affected a11y tests.

https://bugzilla.gnome.org/show_bug.cgi?id=721410
https://bugzilla.gnome.org/show_bug.cgi?id=721421
2014-01-04 10:54:03 -05:00
Matthias Clasen
0d9efde303 GtkLabel: Add private api for links
This exposes enough information to implement the AtkHyperText
interface.

More private link api
2014-01-04 10:54:03 -05:00
Matthias Clasen
c6d9f82916 Add a gtklabelprivate.h header
For now, move the few private functions from gtklabel.h here.
2014-01-04 10:54:03 -05:00
Timm Bäder
5201c876d5 GtkLabel: Use :visited and :link for link colors
https://bugzilla.gnome.org/show_bug.cgi?id=709629
2013-11-04 16:36:11 +01:00
Stefan Sauer
d4679c0a13 frame: annotate the @label params with (allow-none) 2013-08-29 09:06:31 +02:00