summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD41
-rw-r--r--careless.diff87
-rw-r--r--deprecated_macros.diff100
-rw-r--r--free_border.diff21
5 files changed, 274 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9decdcb4792f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = gtk2-smooth-engine
+ pkgdesc = Smooth themes for gtk2 without the need for gtk1
+ pkgver = 0.6.0.1
+ pkgrel = 5
+ url = http://sourceforge.net/projects/smooth-engine
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ depends = gtk-engines
+ conflicts = gtk-smooth-engine
+ replaces = gtk-smooth-engine
+ options = !libtool
+ source = http://downloads.sourceforge.net/smooth-engine/gtk-smooth-engine-0.6.0.1.tar.gz
+ source = http://downloads.sourceforge.net/smooth-engine/smooth-themes-0.5.8.tar.gz
+ source = deprecated_macros.diff
+ source = free_border.diff
+ source = careless.diff
+ md5sums = a2231118c8187649d1e634fdfe6f36de
+ md5sums = a46c592261c4d371498d644eece6493e
+ md5sums = f2fcb7c088735ff0f07915987097755b
+ md5sums = d018dc9be612514fc921bb12fd7d7070
+ md5sums = ddebde49a8db05578b3c561bfa8b34f9
+
+pkgname = gtk2-smooth-engine
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..345c256ff1bc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Contributor: Connor Behan <connor.behan@gmail.com>
+
+pkgname=gtk2-smooth-engine
+pkgver=0.6.0.1
+_spkgver=0.5.8
+pkgrel=5
+pkgdesc="Smooth themes for gtk2 without the need for gtk1"
+arch=(i686 x86_64)
+url="http://sourceforge.net/projects/smooth-engine"
+license=('LGPL')
+depends=('gtk-engines')
+replaces=('gtk-smooth-engine')
+conflicts=('gtk-smooth-engine')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/smooth-engine/gtk-smooth-engine-$pkgver.tar.gz \
+ http://downloads.sourceforge.net/smooth-engine/smooth-themes-$_spkgver.tar.gz \
+ deprecated_macros.diff free_border.diff careless.diff)
+
+build() {
+ cd "$srcdir"/gtk-smooth-engine-$pkgver
+ sed -i -e 's/-DGDK_DISABLE_DEPRECATED//' engines/gtk2/Makefile.in
+
+ patch -Np1 -i "$srcdir"/deprecated_macros.diff
+ patch -Np1 -i "$srcdir"/free_border.diff
+ patch -Np1 -i "$srcdir"/careless.diff
+ ./configure --prefix=/usr --enable-gtk-2 --disable-gtk-1
+ make
+
+ cd "$srcdir"/smooth-themes-$_spkgver
+ ./configure --prefix=/usr --enable-gtk-2 --disable-gtk-1
+ make
+}
+
+package() {
+ cd "$srcdir"/gtk-smooth-engine-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ cd "$srcdir"/smooth-themes-$_spkgver
+ make DESTDIR="$pkgdir" install
+}
+md5sums=('a2231118c8187649d1e634fdfe6f36de' 'a46c592261c4d371498d644eece6493e' 'f2fcb7c088735ff0f07915987097755b' 'd018dc9be612514fc921bb12fd7d7070' 'ddebde49a8db05578b3c561bfa8b34f9')
diff --git a/careless.diff b/careless.diff
new file mode 100644
index 000000000000..55e07241ea98
--- /dev/null
+++ b/careless.diff
@@ -0,0 +1,87 @@
+diff -ru gtk-smooth-engine-0.6.0.1.orig/engines/gtk2/src/smooth_gtk2_drawing.c gtk-smooth-engine-0.6.0.1/engines/gtk2/src/smooth_gtk2_drawing.c
+--- gtk-smooth-engine-0.6.0.1.orig/engines/gtk2/src/smooth_gtk2_drawing.c 2010-09-04 17:58:15.000000000 -0400
++++ gtk-smooth-engine-0.6.0.1/engines/gtk2/src/smooth_gtk2_drawing.c 2010-09-04 19:29:45.000000000 -0400
+@@ -244,6 +244,7 @@
+ SmoothInt height)
+ {
+ gboolean free_dash_list = FALSE;
++ gboolean pattern_assigned = FALSE;
+ gint8 *dash_list = NULL;
+
+ SmoothColor color;
+@@ -253,9 +254,7 @@
+ SmoothBool interior_focus = FALSE;
+
+ /* Setup Pen Color, Line Pattern, & Width */
+- {
+ /* Get Style's Focus Color */
+- {
+ if (FOCUS_USE_FOREGROUND(style, state_type))
+ {
+ color = FOCUS_FOREGROUND(style, GDKSmoothWidgetState(state_type));
+@@ -265,13 +264,13 @@
+ color = COLOR_CUBE(style).Interaction[GDKSmoothWidgetState(state_type)].Foreground;
+ }
+
+- SmoothCanvasCacheColor(Canvas, &color);
+- }
++ SmoothCanvasCacheColor(Canvas, &color);
+
+ /* Check for a Smooth Focus Part Line Width and Pattern */
+ if (FOCUS_USE_PATTERN(style, state_type))
+ {
+ dash_pattern.Pattern = FOCUS_PATTERN(style, state_type);
++ pattern_assigned = TRUE;
+ }
+ else
+ {
+@@ -286,6 +285,7 @@
+ if (dash_list)
+ {
+ dash_pattern.Pattern = dash_list;
++ pattern_assigned = TRUE;
+ }
+ }
+
+@@ -305,19 +305,23 @@
+ if (CHECK_DETAIL(detail, "add-mode"))
+ {
+ dash_pattern.Pattern = "\4\4";
++ pattern_assigned = TRUE;
+ }
+
++
++ if (pattern_assigned) {
++ dash_pattern.Length = strlen(dash_pattern.Pattern);
++
+ SmoothCanvasSetPenValues(Canvas, color, line_width,
+ dash_pattern.Pattern[0] ? GDK_LINE_ON_OFF_DASH : GDK_LINE_SOLID,
+ GDK_JOIN_MITER, GDK_CAP_NOT_LAST);
++
++ SmoothCanvasSetPenPattern(Canvas, dash_pattern);
+ }
+
+- dash_pattern.Length = strlen(dash_pattern.Pattern);
+-
+- if (dash_pattern.Pattern[0])
+- SmoothCanvasSetPenPattern(Canvas, dash_pattern);
+-
+- gtk_widget_get_focus_props (widget, NULL, NULL, &interior_focus);
++ if (widget) {
++ gtk_widget_get_focus_props (widget, NULL, NULL, &interior_focus);
++ }
+
+ if (CHECK_DETAIL(detail, "button") && (is_in_combo_box (widget) && (ENTRY_BUTTON_EMBED(style))))
+ {
+diff -ru gtk-smooth-engine-0.6.0.1.orig/engines/shared/gtk/smooth_gtk_drawing.c gtk-smooth-engine-0.6.0.1/engines/shared/gtk/smooth_gtk_drawing.c
+--- gtk-smooth-engine-0.6.0.1.orig/engines/shared/gtk/smooth_gtk_drawing.c 2010-09-04 17:58:15.000000000 -0400
++++ gtk-smooth-engine-0.6.0.1/engines/shared/gtk/smooth_gtk_drawing.c 2010-09-04 19:24:00.000000000 -0400
+@@ -610,7 +610,7 @@
+ else
+ SmoothDrawBorderWithGap(&border, Canvas, base, x, y-thick, width, height+thick, GTK_POS_TOP, 0, width);
+ }
+- else if (CHECK_DETAIL(detail, "trough"))
++ else if (part && CHECK_DETAIL(detail, "trough"))
+ {
+ SmoothDrawBorderWithGap(&border, Canvas, base, x+PART_XPADDING(part), y+PART_YPADDING(part),
+ width-PART_XPADDING(part)*2, height-PART_YPADDING(part)*2, 0, 0, 0);
diff --git a/deprecated_macros.diff b/deprecated_macros.diff
new file mode 100644
index 000000000000..afd7c1152b9a
--- /dev/null
+++ b/deprecated_macros.diff
@@ -0,0 +1,100 @@
+diff -ru gtk-smooth-engine-0.6.0.1.orig/engines/gtk2/src/smooth_gtk2_drawing.c gtk-smooth-engine-0.6.0.1/engines/gtk2/src/smooth_gtk2_drawing.c
+--- gtk-smooth-engine-0.6.0.1.orig/engines/gtk2/src/smooth_gtk2_drawing.c 2005-01-17 15:03:40.000000000 -0500
++++ gtk-smooth-engine-0.6.0.1/engines/gtk2/src/smooth_gtk2_drawing.c 2010-04-15 13:36:48.000000000 -0400
+@@ -489,7 +489,7 @@
+
+ g_object_set_data(G_OBJECT(get_combo_box_widget_parent(widget)), "button", widget);
+
+- if (GTK_WIDGET_HAS_FOCUS(widget))
++ if (gtk_widget_has_focus(widget))
+ {
+ gtk_widget_get_focus_props (widget, &focus_line_width, &focus_padding, &interior_focus);
+ if (!interior_focus)
+@@ -503,7 +503,7 @@
+
+ for (child = children; child; child = child->next)
+ {
+- if (GTK_IS_ENTRY(child->data) && GTK_WIDGET_HAS_FOCUS(child->data))
++ if (GTK_IS_ENTRY(child->data) && gtk_widget_has_focus(child->data))
+ {
+ gtk_widget_get_focus_props (GTK_WIDGET(child->data), &focus_line_width, &focus_padding, &interior_focus);
+
+@@ -611,7 +611,7 @@
+ width + thick*2 + focus_padding*2, height - focus*2 + focus_padding*2);
+ }
+
+- if (GTK_WIDGET_HAS_FOCUS(widget) && (!interior_focus))
++ if (gtk_widget_has_focus(widget) && (!interior_focus))
+ {
+ focus = -focus_padding;
+ }
+@@ -715,7 +715,7 @@
+ width + thick*2 - focus + focus_padding*2, height - focus*2 + focus_padding*2);
+ }
+
+- if (GTK_WIDGET_HAS_FOCUS(widget) && (!interior_focus))
++ if (gtk_widget_has_focus(widget) && (!interior_focus))
+ {
+ focus = -focus_padding;
+ }
+@@ -757,7 +757,7 @@
+ * more complicated because we can only do half for each stepper.
+ */
+
+- GtkStateType parent_state = GTK_WIDGET_STATE(widget);
++ GtkStateType parent_state = gtk_widget_get_state(widget);
+ SmoothRectangle spin_area;
+ smooth_part_style *part = NULL;
+ SmoothInt thick = 2;
+@@ -781,7 +781,7 @@
+ else if (EDGE_LINE_STYLE(style, part) == SMOOTH_BEVEL_STYLE_ICED)
+ thick = 1;
+
+- if (GTK_WIDGET_HAS_FOCUS(widget))
++ if (gtk_widget_has_focus(widget))
+ {
+ gtk_widget_get_focus_props (widget, &focus_line_width, &focus_padding, &interior_focus);
+ if (!interior_focus)
+@@ -1084,7 +1084,7 @@
+ /* per widget special drawing */
+ if (CHECK_DETAIL(detail, "slider") || CHECK_DETAIL(detail, "smooth_slider"))
+ smooth_draw_slider_grip(Canvas, style, state_type, X, Y, Width, Height, Horizontal);
+- else if (CHECK_DETAIL(detail, "button") && (smooth_button_default_triangle(style)) & GTK_WIDGET_HAS_DEFAULT (widget))
++ else if (CHECK_DETAIL(detail, "button") && (smooth_button_default_triangle(style)) & gtk_widget_has_default (widget))
+ {
+ /* Paint a triangle here instead of in "buttondefault"
+ * which is drawn _behind_ the current button
+@@ -1710,7 +1710,7 @@
+
+ /* Paint a triangle here instead of in "buttondefault"
+ which is drawn _behind_ the current button */
+- if (GTK_WIDGET_HAS_DEFAULT (widget)) {
++ if (gtk_widget_has_default (widget)) {
+ gdk_draw_polygon(window, style->dark_gc[state_type], FALSE, points1, 3);
+ gdk_draw_polygon(window, style->light_gc[state_type], FALSE, points2, 3);
+ gdk_draw_polygon(window, style->bg_gc[GTK_STATE_SELECTED], TRUE, points2, 3);
+diff -ru gtk-smooth-engine-0.6.0.1.orig/engines/gtk2/src/smooth_gtk2_misc.c gtk-smooth-engine-0.6.0.1/engines/gtk2/src/smooth_gtk2_misc.c
+--- gtk-smooth-engine-0.6.0.1.orig/engines/gtk2/src/smooth_gtk2_misc.c 2005-01-17 15:03:40.000000000 -0500
++++ gtk-smooth-engine-0.6.0.1/engines/gtk2/src/smooth_gtk2_misc.c 2010-04-15 13:34:15.000000000 -0400
+@@ -269,10 +269,10 @@
+ {
+ g_return_val_if_fail(GTK_IS_WIDGET(widget), NULL);
+
+- while (widget && widget->parent && !g_type_is_a(GTK_WIDGET_TYPE(widget->parent), GTK_TYPE_NOTEBOOK))
++ while (widget && widget->parent && !g_type_is_a(G_OBJECT_TYPE(widget->parent), GTK_TYPE_NOTEBOOK))
+ widget = widget->parent;
+
+- if (!(widget && widget->parent && g_type_is_a(GTK_WIDGET_TYPE(widget->parent), GTK_TYPE_NOTEBOOK)))
++ if (!(widget && widget->parent && g_type_is_a(G_OBJECT_TYPE(widget->parent), GTK_TYPE_NOTEBOOK)))
+ return NULL;
+
+
+@@ -580,7 +580,7 @@
+ {
+ gboolean result = TRUE;
+
+- while ((widget) && (!GTK_WIDGET_TOPLEVEL(widget)))
++ while ((widget) && (!gtk_widget_is_toplevel(widget)))
+ widget = widget->parent;
+
+ if ((widget) && GTK_IS_WINDOW(widget) && (gtk_window_get_decorated(GTK_WINDOW(widget))))
diff --git a/free_border.diff b/free_border.diff
new file mode 100644
index 000000000000..c371b39a9792
--- /dev/null
+++ b/free_border.diff
@@ -0,0 +1,21 @@
+diff -ru gtk-smooth-engine-0.6.0.1.orig/engines/gtk2/src/smooth_gtk2_misc.c gtk-smooth-engine-0.6.0.1/engines/gtk2/src/smooth_gtk2_misc.c
+--- gtk-smooth-engine-0.6.0.1.orig/engines/gtk2/src/smooth_gtk2_misc.c 2005-01-17 15:03:40.000000000 -0500
++++ gtk-smooth-engine-0.6.0.1/engines/gtk2/src/smooth_gtk2_misc.c 2010-04-15 15:36:22.000000000 -0400
+@@ -526,7 +526,7 @@
+ if (tmp_border)
+ {
+ *default_border = *tmp_border;
+- g_free (tmp_border);
++ gtk_border_free (tmp_border);
+ }
+ else
+ *default_border = default_default_border;
+@@ -539,7 +539,7 @@
+ if (tmp_border)
+ {
+ *default_outside_border = *tmp_border;
+- g_free (tmp_border);
++ gtk_border_free (tmp_border);
+ }
+ else
+ *default_outside_border = default_default_outside_border;