Package init
This commit is contained in:
commit
c9806d98d9
61
gtk2-single-include.patch
Normal file
61
gtk2-single-include.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
diff -up libsexy-0.1.11/libsexy/sexy-icon-entry.h.foo libsexy-0.1.11/libsexy/sexy-icon-entry.h
|
||||||
|
--- libsexy-0.1.11/libsexy/sexy-icon-entry.h.foo 2011-03-25 18:38:36.958790038 -0500
|
||||||
|
+++ libsexy-0.1.11/libsexy/sexy-icon-entry.h 2011-03-25 18:38:42.624719205 -0500
|
||||||
|
@@ -25,8 +25,7 @@ typedef struct _SexyIconEntry SexyI
|
||||||
|
typedef struct _SexyIconEntryClass SexyIconEntryClass;
|
||||||
|
typedef struct _SexyIconEntryPriv SexyIconEntryPriv;
|
||||||
|
|
||||||
|
-#include <gtk/gtkentry.h>
|
||||||
|
-#include <gtk/gtkimage.h>
|
||||||
|
+#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#define SEXY_TYPE_ICON_ENTRY (sexy_icon_entry_get_type())
|
||||||
|
#define SEXY_ICON_ENTRY(obj) \
|
||||||
|
diff -up libsexy-0.1.11/libsexy/sexy-spell-entry.h.foo libsexy-0.1.11/libsexy/sexy-spell-entry.h
|
||||||
|
--- libsexy-0.1.11/libsexy/sexy-spell-entry.h.foo 2011-03-25 18:37:44.664443809 -0500
|
||||||
|
+++ libsexy-0.1.11/libsexy/sexy-spell-entry.h 2011-03-25 18:37:51.558357623 -0500
|
||||||
|
@@ -25,7 +25,7 @@ typedef struct _SexySpellEntry Sexy
|
||||||
|
typedef struct _SexySpellEntryClass SexySpellEntryClass;
|
||||||
|
typedef struct _SexySpellEntryPriv SexySpellEntryPriv;
|
||||||
|
|
||||||
|
-#include <gtk/gtkentry.h>
|
||||||
|
+#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#define SEXY_TYPE_SPELL_ENTRY (sexy_spell_entry_get_type())
|
||||||
|
#define SEXY_SPELL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SEXY_TYPE_SPELL_ENTRY, SexySpellEntry))
|
||||||
|
diff -up libsexy-0.1.11/libsexy/sexy-tooltip.h.foo libsexy-0.1.11/libsexy/sexy-tooltip.h
|
||||||
|
--- libsexy-0.1.11/libsexy/sexy-tooltip.h.foo 2011-03-25 18:38:08.409146960 -0500
|
||||||
|
+++ libsexy-0.1.11/libsexy/sexy-tooltip.h 2011-03-25 18:38:13.621081802 -0500
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
typedef struct _SexyTooltip SexyTooltip;
|
||||||
|
typedef struct _SexyTooltipClass SexyTooltipClass;
|
||||||
|
|
||||||
|
-#include <gtk/gtkwindow.h>
|
||||||
|
+#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#define SEXY_TYPE_TOOLTIP (sexy_tooltip_get_type())
|
||||||
|
#define SEXY_TOOLTIP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SEXY_TYPE_TOOLTIP, SexyTooltip))
|
||||||
|
diff -up libsexy-0.1.11/libsexy/sexy-tree-view.h.foo libsexy-0.1.11/libsexy/sexy-tree-view.h
|
||||||
|
--- libsexy-0.1.11/libsexy/sexy-tree-view.h.foo 2011-03-25 18:38:24.882941008 -0500
|
||||||
|
+++ libsexy-0.1.11/libsexy/sexy-tree-view.h 2011-03-25 18:38:29.779879786 -0500
|
||||||
|
@@ -26,7 +26,7 @@ typedef struct _SexyTreeView SexyTr
|
||||||
|
typedef struct _SexyTreeViewClass SexyTreeViewClass;
|
||||||
|
typedef struct _SexyTreeViewPriv SexyTreeViewPriv;
|
||||||
|
|
||||||
|
-#include <gtk/gtktreeview.h>
|
||||||
|
+#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#define SEXY_TYPE_TREE_VIEW (sexy_tree_view_get_type())
|
||||||
|
#define SEXY_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SEXY_TYPE_TREE_VIEW, SexyTreeView))
|
||||||
|
diff -up libsexy-0.1.11/libsexy/sexy-url-label.h.foo libsexy-0.1.11/libsexy/sexy-url-label.h
|
||||||
|
--- libsexy-0.1.11/libsexy/sexy-url-label.h.foo 2011-03-25 18:38:53.984577188 -0500
|
||||||
|
+++ libsexy-0.1.11/libsexy/sexy-url-label.h 2011-03-25 18:38:57.991527095 -0500
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
typedef struct _SexyUrlLabel SexyUrlLabel;
|
||||||
|
typedef struct _SexyUrlLabelClass SexyUrlLabelClass;
|
||||||
|
|
||||||
|
-#include <gtk/gtklabel.h>
|
||||||
|
+#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#define SEXY_TYPE_URL_LABEL (sexy_url_label_get_type())
|
||||||
|
#define SEXY_URL_LABEL(obj) \
|
||||||
55
libsexy-0.1.11-url-label.patch
Normal file
55
libsexy-0.1.11-url-label.patch
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
BIN
libsexy-0.1.11.tar.bz2
Normal file
BIN
libsexy-0.1.11.tar.bz2
Normal file
Binary file not shown.
84
libsexy-icon-name.patch
Normal file
84
libsexy-icon-name.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
diff -urp libsexy-0.1.11.orig/libsexy/sexy-icon-entry.c libsexy-0.1.11/libsexy/sexy-icon-entry.c
|
||||||
|
--- libsexy-0.1.11.orig/libsexy/sexy-icon-entry.c 2007-03-17 23:30:00.000000000 -0400
|
||||||
|
+++ libsexy-0.1.11/libsexy/sexy-icon-entry.c 2009-11-15 18:21:08.560177737 -0500
|
||||||
|
@@ -468,9 +468,10 @@ static GdkPixbuf *
|
||||||
|
get_pixbuf_from_icon(SexyIconEntry *entry, SexyIconEntryPosition icon_pos)
|
||||||
|
{
|
||||||
|
GdkPixbuf *pixbuf = NULL;
|
||||||
|
- gchar *stock_id;
|
||||||
|
+ const gchar *stock_id;
|
||||||
|
SexyIconInfo *icon_info = &entry->priv->icons[icon_pos];
|
||||||
|
GtkIconSize size;
|
||||||
|
+ int w, h;
|
||||||
|
|
||||||
|
switch (gtk_image_get_storage_type(GTK_IMAGE(icon_info->icon)))
|
||||||
|
{
|
||||||
|
@@ -480,11 +481,17 @@ get_pixbuf_from_icon(SexyIconEntry *entr
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GTK_IMAGE_STOCK:
|
||||||
|
- gtk_image_get_stock(GTK_IMAGE(icon_info->icon), &stock_id, &size);
|
||||||
|
+ gtk_image_get_stock(GTK_IMAGE(icon_info->icon), (char**)&stock_id, &size);
|
||||||
|
pixbuf = gtk_widget_render_icon(GTK_WIDGET(entry),
|
||||||
|
stock_id, size, NULL);
|
||||||
|
break;
|
||||||
|
|
||||||
|
+ case GTK_IMAGE_ICON_NAME:
|
||||||
|
+ gtk_image_get_icon_name (GTK_IMAGE(icon_info->icon), &stock_id, &size);
|
||||||
|
+ gtk_icon_size_lookup (size, &w, &h);
|
||||||
|
+ pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), stock_id, size, 0, NULL);
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
default:
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
@@ -655,7 +662,8 @@ update_icon(GObject *obj, GParamSpec *pa
|
||||||
|
|
||||||
|
if (strcmp(name, "pixbuf") && strcmp(name, "stock") &&
|
||||||
|
strcmp(name, "image") && strcmp(name, "pixmap") &&
|
||||||
|
- strcmp(name, "icon_set") && strcmp(name, "pixbuf_animation"))
|
||||||
|
+ strcmp(name, "icon-set") && strcmp(name, "pixbuf-animation") &&
|
||||||
|
+ strcmp(name, "icon-name"))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
diff -urp libsexy-0.1.11.orig/tests/test-icon-entry.c libsexy-0.1.11/tests/test-icon-entry.c
|
||||||
|
--- libsexy-0.1.11.orig/tests/test-icon-entry.c 2006-09-02 17:26:55.000000000 -0400
|
||||||
|
+++ libsexy-0.1.11/tests/test-icon-entry.c 2009-11-15 18:21:08.560913305 -0500
|
||||||
|
@@ -21,7 +21,7 @@ main(int argc, char **argv)
|
||||||
|
g_signal_connect(G_OBJECT(window), "destroy",
|
||||||
|
G_CALLBACK(gtk_main_quit), NULL);
|
||||||
|
|
||||||
|
- table = gtk_table_new(2, 4, FALSE);
|
||||||
|
+ table = gtk_table_new(2, 5, FALSE);
|
||||||
|
gtk_widget_show(table);
|
||||||
|
gtk_container_add(GTK_CONTAINER(window), table);
|
||||||
|
gtk_table_set_row_spacings(GTK_TABLE(table), 6);
|
||||||
|
@@ -128,6 +128,27 @@ main(int argc, char **argv)
|
||||||
|
gtk_table_attach(GTK_TABLE(table), icon_entry, 1, 2, 4, 5,
|
||||||
|
GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
|
||||||
|
|
||||||
|
+ /*
|
||||||
|
+ * Goto URL
|
||||||
|
+ */
|
||||||
|
+ label = gtk_label_new("URL:");
|
||||||
|
+ gtk_widget_show(label);
|
||||||
|
+ gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6,
|
||||||
|
+ GTK_FILL, GTK_FILL, 0, 0);
|
||||||
|
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||||
|
+
|
||||||
|
+ icon_entry = sexy_icon_entry_new();
|
||||||
|
+ gtk_widget_show(icon_entry);
|
||||||
|
+ gtk_table_attach(GTK_TABLE(table), icon_entry, 1, 2, 5, 6,
|
||||||
|
+ GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
|
||||||
|
+
|
||||||
|
+ icon = gtk_image_new_from_icon_name ("stock_internet", GTK_ICON_SIZE_MENU);
|
||||||
|
+ gtk_widget_show(icon);
|
||||||
|
+ sexy_icon_entry_set_icon(SEXY_ICON_ENTRY(icon_entry),
|
||||||
|
+ SEXY_ICON_ENTRY_SECONDARY,
|
||||||
|
+ GTK_IMAGE(icon));
|
||||||
|
+ sexy_icon_entry_set_icon_highlight(SEXY_ICON_ENTRY(icon_entry),
|
||||||
|
+ SEXY_ICON_ENTRY_PRIMARY, TRUE);
|
||||||
|
gtk_main();
|
||||||
|
|
||||||
|
return 0;
|
||||||
73
libsexy.spec
Normal file
73
libsexy.spec
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
name: libsexy
|
||||||
|
Version: 0.1.11
|
||||||
|
Release: 33
|
||||||
|
Summary: a collection of GTK+ widgets
|
||||||
|
License: LGPLv2+
|
||||||
|
URL: https://www.openhub.net/p/libsexy
|
||||||
|
Source0: http://releases.chipx86.com/%{name}/%{name}/%{name}-%{version}.tar.bz2
|
||||||
|
|
||||||
|
# these patches come from fedora
|
||||||
|
Patch0: libsexy-0.1.11-url-label.patch
|
||||||
|
Patch1: libsexy-icon-name.patch
|
||||||
|
Patch2: gtk2-single-include.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc gdb libxml2-devel pango-devel gtk2-devel
|
||||||
|
Requires: enchant
|
||||||
|
|
||||||
|
%description
|
||||||
|
Libsexy is a collection of GTK+ widgets that extend the functionality of such
|
||||||
|
standard widgets as GtkEntry and GtkLabel by subclassing them and working
|
||||||
|
around the limitations of the widgets.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release} pkgconfig gtk2-devel libxml2-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains libraries and header files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
%delete_la
|
||||||
|
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc AUTHORS COPYING
|
||||||
|
%{_libdir}/%{name}.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_includedir}/%{name}
|
||||||
|
%{_libdir}/%{name}.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
%{_libdir}/%{name}.a
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc NEWS
|
||||||
|
%{_datadir}/gtk-doc/html/%{name}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Sep 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.1.11-33
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add requires
|
||||||
|
|
||||||
|
* Wed Aug 28 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.1.11-32
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user