Sisyphus repository
Last update: 7 december 2019 | SRPMs: 17495 | Visits: 15998837
en ru br
ALT Linux repos
S:0.1.11-alt3.2.qa1
5.0: 0.1.11-alt2
4.1: 0.1.11-alt2
4.0: 0.1.10-alt1

Group :: System/Libraries
RPM: libsexy

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: libsexy-0.1.11-url-label.patch
Download


diff -urp libsexy-0.1.11.OLD/libsexy/sexy-url-label.c libsexy-0.1.11/libsexy/sexy-url-label.c
--- libsexy-0.1.11.OLD/libsexy/sexy-url-label.c	2007-03-17 23:30:00.000000000 -0400
+++ libsexy-0.1.11/libsexy/sexy-url-label.c	2008-09-21 18:32:01.000000000 -0400
@@ -516,7 +516,11 @@ copy_link_activate_cb(GtkMenuItem *menu_
 
 	clipboard = gtk_widget_get_clipboard(GTK_WIDGET(url_label),
 										 GDK_SELECTION_PRIMARY);
+	gtk_clipboard_set_text(clipboard, priv->active_link->url,
+						   strlen(priv->active_link->url));
 
+	clipboard = gtk_widget_get_clipboard(GTK_WIDGET(url_label),
+										 GDK_SELECTION_CLIPBOARD);
 	gtk_clipboard_set_text(clipboard, priv->active_link->url,
 						   strlen(priv->active_link->url));
 }
@@ -634,6 +638,9 @@ start_element_handler(GMarkupParseContex
 		int line_number;
 		int char_number;
 		int i;
+#if GTK_CHECK_VERSION(2, 10, 0)
+		GdkColor *link_color = NULL;
+#endif
 
 		g_markup_parse_context_get_position(context, &line_number,
 											&char_number);
@@ -677,8 +684,28 @@ start_element_handler(GMarkupParseContex
 			return;
 		}
 
+#if GTK_CHECK_VERSION(2, 10, 0)
+		gtk_widget_ensure_style(GTK_WIDGET(url_label));
+		gtk_widget_style_get(GTK_WIDGET(url_label),
+		                     "link-color", &link_color,
+		                     NULL);
+		if (link_color != NULL)
+		{
+			g_string_append_printf(priv->temp_markup_result,
+			                       "<span color=\"#%04x%04x%04x\" underline=\"single\">",
+			                       link_color->red,
+			                       link_color->green,
+			                       link_color->blue);
+		}
+		else
+		{
+			g_string_append(priv->temp_markup_result,
+			                "<span color=\"blue\" underline=\"single\">");
+		}
+#else
 		g_string_append(priv->temp_markup_result,
-						"<span color=\"blue\" underline=\"single\">");
+		                "<span color=\"blue\" underline=\"single\">");
+#endif
 
 		priv->urls = g_list_append(priv->urls, g_strdup(url));
 	}
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin