forked from AuroraMiddleware/gtk
Revert "Make it possible to set style classes for label links"
This reverts commit 9a2527b361
.
This needs more work to have a chance of working properly.
This commit is contained in:
parent
41b14fd148
commit
bea4c0898d
@ -229,11 +229,9 @@
|
|||||||
*
|
*
|
||||||
* Since 2.18, GTK+ supports markup for clickable hyperlinks in addition
|
* Since 2.18, GTK+ supports markup for clickable hyperlinks in addition
|
||||||
* to regular Pango markup. The markup for links is borrowed from HTML,
|
* to regular Pango markup. The markup for links is borrowed from HTML,
|
||||||
* using the `<a>` with “href“, “title“ and “class“ attributes. GTK+ renders links
|
* using the `<a>` with “href“ and “title“ attributes. GTK+ renders links
|
||||||
* similar to the way they appear in web browsers, with colored, underlined
|
* similar to the way they appear in web browsers, with colored, underlined
|
||||||
* text. The “title“ attribute is displayed as a tooltip on the link. The “class“
|
* text. The “title“ attribute is displayed as a tooltip on the link.
|
||||||
* attribute is used as style class on the CSS node for the link, it is supported
|
|
||||||
* since 3.22.7.
|
|
||||||
*
|
*
|
||||||
* An example looks like this:
|
* An example looks like this:
|
||||||
*
|
*
|
||||||
@ -2401,7 +2399,6 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
GtkLabelLink *link;
|
GtkLabelLink *link;
|
||||||
const gchar *uri = NULL;
|
const gchar *uri = NULL;
|
||||||
const gchar *title = NULL;
|
const gchar *title = NULL;
|
||||||
const gchar *class = NULL;
|
|
||||||
gboolean visited = FALSE;
|
gboolean visited = FALSE;
|
||||||
gint line_number;
|
gint line_number;
|
||||||
gint char_number;
|
gint char_number;
|
||||||
@ -2419,8 +2416,6 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
uri = attribute_values[i];
|
uri = attribute_values[i];
|
||||||
else if (strcmp (attr, "title") == 0)
|
else if (strcmp (attr, "title") == 0)
|
||||||
title = attribute_values[i];
|
title = attribute_values[i];
|
||||||
else if (strcmp (attr, "class") == 0)
|
|
||||||
class = attribute_values[i];
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
@ -2468,9 +2463,6 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
link->cssnode = gtk_css_node_new ();
|
link->cssnode = gtk_css_node_new ();
|
||||||
gtk_css_node_set_name (link->cssnode, I_("link"));
|
gtk_css_node_set_name (link->cssnode, I_("link"));
|
||||||
gtk_css_node_set_parent (link->cssnode, widget_node);
|
gtk_css_node_set_parent (link->cssnode, widget_node);
|
||||||
if (class)
|
|
||||||
gtk_css_node_add_class (link->cssnode, g_quark_from_string (class));
|
|
||||||
|
|
||||||
state = gtk_css_node_get_state (widget_node);
|
state = gtk_css_node_get_state (widget_node);
|
||||||
if (visited)
|
if (visited)
|
||||||
state |= GTK_STATE_FLAG_VISITED;
|
state |= GTK_STATE_FLAG_VISITED;
|
||||||
|
Loading…
Reference in New Issue
Block a user