diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-07-07 18:15:07 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-07-07 18:15:07 +0800 |
commit | ad573864acd796ebb73310867a6620a01a76bcaf (patch) | |
tree | 42728dc86b5a68d56a06315652d23122501c04ea /x11-themes | |
parent | 90b370991859ddfb56c88c20fa8148ecec5b3c58 (diff) | |
download | marcuscom-ports-ad573864acd796ebb73310867a6620a01a76bcaf.tar.gz marcuscom-ports-ad573864acd796ebb73310867a6620a01a76bcaf.tar.zst marcuscom-ports-ad573864acd796ebb73310867a6620a01a76bcaf.zip |
Fix clearlooks animation support.
Add a patch to the pkgconfig file to record correct package name and depend.
Obtained from: Gnome git
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@14298 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'x11-themes')
-rw-r--r-- | x11-themes/gtk-engines3/Makefile | 3 | ||||
-rw-r--r-- | x11-themes/gtk-engines3/files/patch-cleanlooks-animation | 107 | ||||
-rw-r--r-- | x11-themes/gtk-engines3/files/patch-gtk-engines-3.pc | 22 |
3 files changed, 131 insertions, 1 deletions
diff --git a/x11-themes/gtk-engines3/Makefile b/x11-themes/gtk-engines3/Makefile index 70d4d2080..91c0fd695 100644 --- a/x11-themes/gtk-engines3/Makefile +++ b/x11-themes/gtk-engines3/Makefile @@ -3,11 +3,12 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/x11-themes/gtk-engines3/Makefile,v 1.1 2010/06/18 14:57:25 kwm Exp $ +# $MCom: ports/x11-themes/gtk-engines3/Makefile,v 1.2 2010/06/30 06:48:15 kwm Exp $ # PORTNAME= gtk-engines3 PORTVERSION= 2.90.3.1 +PORTREVISION= 1 CATEGORIES= x11-themes MASTER_SITES= GNOME MASTER_SITE_SUBDIR= sources/${PORTNAME:S/3$//}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} diff --git a/x11-themes/gtk-engines3/files/patch-cleanlooks-animation b/x11-themes/gtk-engines3/files/patch-cleanlooks-animation new file mode 100644 index 000000000..0a5b6b4e1 --- /dev/null +++ b/x11-themes/gtk-engines3/files/patch-cleanlooks-animation @@ -0,0 +1,107 @@ +From a484a86cef26420e9278a550d246ff1068a9e88e Mon Sep 17 00:00:00 2001 +From: Benjamin Berg <benjamin@sipsolutions.net> +Date: Fri, 02 Jul 2010 16:56:24 +0000 +Subject: Fix animation. (bug #622982, #612486) + +--- +diff --git a/engines/clearlooks/src/animation.c b/engines/clearlooks/src/animation.c +index 1f7a41f..d37b85d 100644 +--- engines/clearlooks/src/animation.c ++++ engines/clearlooks/src/animation.c +@@ -166,7 +166,7 @@ update_animation_info (gpointer key, gpointer value, gpointer user_data) + g_assert ((widget != NULL) && (animation_info != NULL)); + + /* remove the widget from the hash table if it is not drawable */ +- if (!GTK_WIDGET_DRAWABLE (widget)) ++ if (!gtk_widget_is_drawable (widget)) + { + return TRUE; + } +@@ -267,6 +267,20 @@ find_signal_info (gconstpointer signal_info, gconstpointer widget) + + /* external interface */ + ++#define CL_IS_PROGRESS_BAR(widget) GE_IS_PROGRESS_BAR(widget) && widget->allocation.x != -1 && widget->allocation.y != -1 ++gboolean ++clearlooks_animation_is_progressbar (GtkWidget *widget) ++{ ++ GtkAllocation allocation; ++ if (!GE_IS_PROGRESS_BAR (widget)) ++ return FALSE; ++ gtk_widget_get_allocation (widget, &allocation); ++ if ((allocation.x < 0) || (allocation.y < 0)) ++ return FALSE; ++ return TRUE; ++} ++ ++ + /* adds a progress bar */ + void + clearlooks_animation_progressbar_add (GtkWidget *progressbar) +@@ -331,8 +345,6 @@ clearlooks_animation_cleanup () + stop_timer (); + } + #else /* !HAVE_WORKING_ANIMATION */ +-/* Warn here so the message is only displayed once. */ +-#warning Disabling animation support as it currently needs deprecated symbols and GTK_DISABLE_DEPRECATED is enabled. + + static void clearlooks_animation_dummy_function_so_wall_shuts_up_when_animations_is_disabled() + { +diff --git a/engines/clearlooks/src/animation.h b/engines/clearlooks/src/animation.h +index 4ab6f4e..0307783 100644 +--- engines/clearlooks/src/animation.h ++++ engines/clearlooks/src/animation.h +@@ -24,22 +24,20 @@ + #include <config.h> + + #ifdef HAVE_ANIMATION +-#ifndef GTK_DISABLE_DEPRECATED + + #define HAVE_WORKING_ANIMATION 1 + + #include <gtk/gtk.h> + #include <ge-support.h> + +-#define CL_IS_PROGRESS_BAR(widget) GE_IS_PROGRESS_BAR(widget) && widget->allocation.x != -1 && widget->allocation.y != -1 + #define ANIMATION_DELAY 100 + #define CHECK_ANIMATION_TIME 0.5 + ++GE_INTERNAL gboolean clearlooks_animation_is_progressbar (GtkWidget *widget); + GE_INTERNAL void clearlooks_animation_progressbar_add (GtkWidget *progressbar); + GE_INTERNAL void clearlooks_animation_connect_checkbox (GtkWidget *widget); + GE_INTERNAL gboolean clearlooks_animation_is_animated (GtkWidget *widget); + GE_INTERNAL gdouble clearlooks_animation_elapsed (gpointer data); + GE_INTERNAL void clearlooks_animation_cleanup (); +-#endif /* GTK_DISABLE_DEPRECATED */ + #endif /* HAVE_ANIMATION */ + +diff --git a/engines/clearlooks/src/clearlooks_style.c b/engines/clearlooks/src/clearlooks_style.c +index 1c02499..07d08bd 100644 +--- engines/clearlooks/src/clearlooks_style.c ++++ engines/clearlooks/src/clearlooks_style.c +@@ -604,7 +604,6 @@ clearlooks_style_draw_box (DRAW_ARGS) + } + else + { +- g_print ("ETCHED IN\n"); + cairo_save (cr); + cairo_move_to (cr, x, y); + cairo_line_to (cr, x + width, y); +@@ -758,12 +757,10 @@ clearlooks_style_draw_box (DRAW_ARGS) + gdouble elapsed = 0.0; + + #ifdef HAVE_WORKING_ANIMATION +- if(clearlooks_style->animation && CL_IS_PROGRESS_BAR (widget)) ++ if(clearlooks_style->animation && clearlooks_animation_is_progressbar (widget)) + { +- gboolean activity_mode = GTK_PROGRESS_BAR (widget)->activity_mode; +- +- if (!activity_mode) +- clearlooks_animation_progressbar_add ((gpointer)widget); ++#warning Assuming non-pulsing progress bars because there is currently no way to query them in GTK+ 3.0. ++ clearlooks_animation_progressbar_add ((gpointer)widget); + } + + elapsed = clearlooks_animation_elapsed (widget); +-- +cgit v0.8.3.1 diff --git a/x11-themes/gtk-engines3/files/patch-gtk-engines-3.pc b/x11-themes/gtk-engines3/files/patch-gtk-engines-3.pc new file mode 100644 index 000000000..feab0defb --- /dev/null +++ b/x11-themes/gtk-engines3/files/patch-gtk-engines-3.pc @@ -0,0 +1,22 @@ +From 2921ad5cb2d8a5f08c91e1cee1e1f75a74cca508 Mon Sep 17 00:00:00 2001 +From: Benjamin Berg <benjamin@sipsolutions.net> +Date: Fri, 02 Jul 2010 17:02:08 +0000 +Subject: Fix Bug #623311 (patch from Diego Escalante Urrelo). + +--- +diff --git a/gtk-engines-3.pc.in b/gtk-engines-3.pc.in +index 76daf74..dbe0372 100644 +--- gtk-engines-3.pc.in ++++ gtk-engines-3.pc.in +@@ -3,7 +3,7 @@ exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ + +-Name: gtk-engines-2 ++Name: gtk-engines-3 + Description: GTK+ Theme Engines + Version: @VERSION@ +-Requires: gtk+-2.0 ++Requires: gtk+-3.0 +-- +cgit v0.8.3.1 |