rpms/libsexy/devel libsexy-0.1.11-url-label.patch, NONE, 1.1 libsexy.spec, 1.20, 1.21

Brian Pepple bpepple at fedoraproject.org
Sun Sep 21 22:50:36 UTC 2008


Author: bpepple

Update of /cvs/pkgs/rpms/libsexy/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18365

Modified Files:
	libsexy.spec 
Added Files:
	libsexy-0.1.11-url-label.patch 
Log Message:
* Sun Sep 21 2008 Brian Pepple <bpepple at fedoraproject.org> - 0.1.11-9
- Backport fix for clipboard & color support in sexy-url-label.


libsexy-0.1.11-url-label.patch:

--- NEW FILE libsexy-0.1.11-url-label.patch ---
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));
 	}


Index: libsexy.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libsexy/devel/libsexy.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- libsexy.spec	16 May 2008 13:25:38 -0000	1.20
+++ libsexy.spec	21 Sep 2008 22:50:06 -0000	1.21
@@ -1,12 +1,13 @@
 Name:           libsexy
 Version:        0.1.11
-Release:        8%{?dist}
+Release:        9%{?dist}
 Summary:        Funky fresh graphical widgets for GTK+ 2
 
 Group:          System Environment/Libraries
 License:        LGPLv2+
 URL:            http://www.chipx86.com/wiki/Libsexy
 Source0:        http://releases.chipx86.com/%{name}/%{name}/%{name}-%{version}.tar.gz
+Patch0:		%{name}-%{version}-url-label.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  gtk2-devel
@@ -36,6 +37,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .url-label
 
 
 %build
@@ -79,6 +81,9 @@
 
 
 %changelog
+* Sun Sep 21 2008 Brian Pepple <bpepple at fedoraproject.org> - 0.1.11-9
+- Backport fix for clipboard & color support in sexy-url-label.
+
 * Fri May 16 2008 Brian Pepple <bpepple at fedoraproject.org> - 0.1.11-8
 - Add requires for libxml2-devel to devel. (#446842)
 




More information about the fedora-extras-commits mailing list