summaryrefslogtreecommitdiff
path: root/gtk/gtklabel.c
Commit message (Collapse)AuthorAgeFilesLines
* docs: Use markup for linksWilliam Jon McCann2014-02-071-21/+20
|
* docs: fix quotes in exampleWilliam Jon McCann2014-02-061-1/+1
|
* docs: use proper quotesWilliam Jon McCann2014-02-051-3/+3
|
* label: Invalidate link colors on style changeBenjamin Otte2014-02-051-0/+14
| | | | | | Discovered-by: Timm Bäder <mail@baedert.org> https://bugzilla.gnome.org/show_bug.cgi?id=721309
* label: refactor codeBenjamin Otte2014-02-051-63/+75
| | | | | Split out function for setting attributes. This will be needed in future patches.
* label: Avoid creating new attribute listBenjamin Otte2014-02-051-1/+1
| | | | | | Only create an attribute list for merging if we actually need to merge. This bug was introduced in 5230cfe805b8f0046896c029612180fc9d4cc5df
* docs: Use "#" for refsect2 instead of ##William Jon McCann2014-02-041-6/+6
|
* docs: use ` instead of <literal>William Jon McCann2014-02-041-1/+1
|
* docs: use quotes instead of <firstterm>William Jon McCann2014-02-041-1/+1
|
* docs: don't use <tag> docbook elementsWilliam Jon McCann2014-02-041-1/+2
|
* docs: fix spurious list close tagWilliam Jon McCann2014-02-031-1/+0
| | | | Missed by patch 30cc1512e
* Docs: Don't use note elementsMatthias Clasen2014-02-021-2/+2
| | | | In most cases, the text itself makes the message clear enough.
* Docs: Use markdown for listsMatthias Clasen2014-02-021-4/+3
| | | | This greatly reduces the amount of xml in the docs.
* docs: Convert to markdownMatthias Clasen2014-02-021-42/+29
| | | | Specifically, switch to using markdown syntax for sections.
* docs: Identify examples that are C codeWilliam Jon McCann2014-01-291-6/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723119
* docs: use |[ ]| instead of <programlisting></programlisting>William Jon McCann2014-01-291-20/+12
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723119
* docs: don't use properties syntax for child propsWilliam Jon McCann2014-01-211-1/+1
|
* GtkLabelAccessible: update state of linksMatthias Clasen2014-01-041-0/+5
| | | | | | | | 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
* GtkLabelAccessible: Implement AtkHypertextMatthias Clasen2014-01-041-0/+3
| | | | | | | | | | | | | | | 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
* GtkLabel: Add private api for linksMatthias Clasen2014-01-041-0/+153
| | | | | | | This exposes enough information to implement the AtkHyperText interface. More private link api
* Add a gtklabelprivate.h headerMatthias Clasen2014-01-041-0/+1
| | | | For now, move the few private functions from gtklabel.h here.
* GtkLabel: Use :visited and :link for link colorsTimm Bäder2013-11-041-55/+22
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=709629
* frame: annotate the @label params with (allow-none)Stefan Sauer2013-08-291-2/+2
|
* label: Initialize lines value to -1Benjamin Otte2013-08-231-0/+1
| | | | Fixes defaultvalue test.
* label: Fix gcc warningBenjamin Otte2013-08-231-1/+1
|
* Add api to ellipsize labels to multiple linesMatthias Clasen2013-08-221-1/+80
| | | | | | | When setting the lines property, the label will be ellipsized to that many lines, with the ellipsis only appearing in the last line. This is different from how ellipsization of multi-line labels normally works in GTK+.
* Add a style class for context menusMatthias Clasen2013-08-181-0/+2
| | | | | | | | | | | | | | Attached widgets inherit from the style of the widget they are attached to. This can sometimes have unintended consequences, like a context menu in the main view of gedit inheriting the font that is configured for documents, or the context menu of the preview in the font chooser coming up with humongous font size. To fix this problem, we introduce a context menu style class and use it for all menus that are used like that. The theme can then set a font for this style class. https://bugzilla.gnome.org/show_bug.cgi?id=697127
* gtkdnd: Introduce a new API for more accurate drag origin dataJasper St. Pierre2013-08-141-3/+5
| | | | | | | | | | | | | | | When trying to drag, we currently the position of the first motion event to determine where the drag came from. This might be alright in the case of the old animation, but the data will be inaccurate if the user has moved the pointer quite a bit since pressing the cursor to start dragging. While we could monkey patch the GdkEvent at the widget layer, this is unintuitive and strange. Add a new API that takes a set of pointer coordinates describing the origin of the drag. Additionally, adapt most widgets to use it and use it with correct coordinates. https://bugzilla.gnome.org/show_bug.cgi?id=705605
* Drop some unnecessary includesMatthias Clasen2013-07-191-1/+0
| | | | | Drop includes of deprecated headers where they are no longer needed.
* Move wholly deprecated classes to gtk/deprecated/Matthias Clasen2013-07-191-1/+1
| | | | | | | | | | | | | | | | | | We've recently a number of classes wholly. For these cases, move the headers and sources to gtk/deprecated/ and adjust Makefiles and includes accordingly. Affected classes: GtkAction GtkActionGroup GtkActivatable GtkIconFactory GtkImageMenuItem GtkRadioAction GtkRecentAction GtkStock GtkToggleAction GtkUIManager
* gtk: Use new macros for defining private dataEmmanuele Bassi2013-07-091-5/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702996
* Deprecate and ignore gtk-enable-mnemonics and gtk-auto-mnemonics" propertiesWilliam Jon McCann2013-06-261-17/+4
| | | | They are both enabled by default.
* Start migrating internals away from GtkStockWilliam Jon McCann2013-06-241-19/+9
|
* label: fix return value type for _draw()Stefan Sauer2013-05-081-2/+2
| | | | Change from gint to gboolean.
* GtkLabel: Minor cleanupAlexander Larsson2013-04-231-3/+3
| | | | | Make sure we always compare for a set baseline in the same way. I.e. baseline != -1, never baseline >= 0.
* GtkLabel: Support baselineAlexander Larsson2013-04-231-17/+91
| | | | Report the baseline in get_preferred_height_and_baseline_for_width().
* GtkLabel: fix underlining of mnemonicsSébastien Wilmet2013-03-241-1/+1
| | | | | | | | | The underscore was shown in front of the mnemonic instead of underlining it (e.g., _Save). Thanks to Lars Uebernickel. https://bugzilla.gnome.org/show_bug.cgi?id=674759
* csd: Make link activation work reliablyMatthias Clasen2013-03-211-0/+2
| | | | | | The label code was just letting some button press events bubble up, which caused misbehaviour with the window dragging code. https://bugzilla.gnome.org/show_bug.cgi?id=695506
* GtkLabel: fix mnemonic-keyval when use-markup is trueSébastien Wilmet2013-03-171-10/+33
| | | | | | | | | | | | | | | To extract the mnemonic key value, the string must contain the underscore. But when the "gtk-auto-mnemonics" setting is true and when the Alt key is not pressed, the underscore must not be displayed. The problem was that the 'new_str' variable was used for both purposes: extract the text to display, and extract the accelerator character. When the underscore must not be visible, the underscores were removed from the 'new_str' variable before extracting the accelerator character. Now there are two strings, one for each purpose. https://bugzilla.gnome.org/show_bug.cgi?id=674759
* a11y: Emit text-changed signals directlyBenjamin Otte2013-03-151-1/+4
| | | | | | | | When setting new text on the label, the text-changed::delete signal needs to be emitted before deleting the text (so that atk-bridge can query the old text) while the text-changed::insert event needs to happen afterwards (for the same reason). The old code using the notify signal was only emitted after changing the text.
* label: Fix memleakCarl-Anton Ingmarsson2013-03-121-1/+4
| | | | Caused by recent refactoring in e09957a47da9425cc26d1b33cb4e9cc3e92e9ac7
* label: refactor codeBenjamin Otte2013-03-121-4/+3
| | | | | | If text didn't change, don't change it. And if that sentence made no sense, that might explain why I refactored.
* Add gtk_widget_(un)register_windowAlexander Larsson2013-02-071-2/+2
| | | | | | | | | | | | This replaces the previously hardcoded calls to gdk_window_set_user_data, and also lets us track which windows are a part of a widget. Old code should continue working as is, but new features that require the windows may not work perfectly. We need this for the transparent widget support to work, as we need to specially mark the windows of child widgets. https://bugzilla.gnome.org/show_bug.cgi?id=687842
* GtkLabel: Rely on the new pango support for context change trackingAlexander Larsson2012-12-061-32/+3
| | | | | | | | | | | | | | Now that Pango tracks changes to the context automatically there is no need to do it manually in e.g. style-updated or direction-changed, in fact the only case we have to care about is when we re-create the PangoContext due to a screen change, so we only have to clear the layouts in GtkLabel in screen-changed. This means we're not clearing all the layouts whenever the state changes, which happens to every widget when the window is unfocused, which helps performance a lot. https://bugzilla.gnome.org/show_bug.cgi?id=340066
* gtk: Use context's fontBenjamin Otte2012-12-061-18/+3
| | | | | | Instead of using gtk_style_context_get_font() in pango_context_get_metrics(), use pango_context_get_font_description(). The context contains the font description we are about to use after all.
* GtkLabel: Fix a pointless expressionMatthias Clasen2012-11-291-1/+1
| | | | | | Clearly, what was meant here was that we create a new attribute list if either of the input attribute lists are non-NULL. This was found by Coverity.
* label: Fix another sizing corner case causing segfaultsBenjamin Otte2012-11-081-1/+2
| | | | | | If the "wider" label is the smaller one, use the wider size for both cases. This can happen when ellipsizing a single character, which is often smaller than the ellipsizing glpyph(s).
* label: Handle crazy corner casesBenjamin Otte2012-11-051-20/+19
| | | | | | | | | With ellipsizing, the ellipsized text can have a smaller height than the non-ellipsized text. So the wider text is also higher. Example: .<big>TEXT</big> will ellipsize to the small text. Reported-By: Rico Tzschichholz <ricotz@t-online.de>
* label: Redo get_preferred_width/height()Benjamin Otte2012-11-041-74/+52
| | | | | This is important for size groups mostly, but also has some small fixes. The label-sizing reftest as been updated accordingly.
* label: Fix ellipsize and wrap being setBenjamin Otte2012-11-041-25/+6
| | | | | | | | The label code assumed that Pango treats this as "wrap to as much space as possible and then ellipsize all the lines", but for Pango, ellipsize takes precedence over wrap. So do the same thing in GtkLabel. Also updated is the reftest that checked this behavior.