[Xfce4-commits] [apps/xfdashboard] 01/01: Silence compiler warning about using deprecated actor state access macros by using functions introduced with Clutter 1.23.4
noreply at xfce.org
noreply at xfce.org
Fri Mar 11 11:27:01 CET 2016
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit 1262a79a8330cf7bf23c78245135df5a6375e362
Author: Stephan Haller <nomad at froevel.de>
Date: Fri Mar 11 11:23:18 2016 +0100
Silence compiler warning about using deprecated actor state access macros by using functions introduced with Clutter 1.23.4
We update the source code to use state access functions, e.g. clutter_actor_is_visible(), instead of the old macros, e.g. CLUTTER_ACTOR_IS_VISIBLE(). But also implement a compatibility layer which "redirects" functions to macros again when compiling and linking against Clutter older than 1.23.4.
This is the first fix for issue GH #117
---
libxfdashboard/Makefile.am | 1 +
libxfdashboard/action-button.c | 2 +
libxfdashboard/actor.c | 10 ++-
libxfdashboard/application-button.c | 2 +
libxfdashboard/application-database.c | 1 +
libxfdashboard/application-tracker.c | 2 +
libxfdashboard/application.c | 2 +
libxfdashboard/applications-menu-model.c | 2 +
libxfdashboard/applications-search-provider.c | 1 +
libxfdashboard/applications-view.c | 2 +
libxfdashboard/background.c | 2 +
libxfdashboard/binding.c | 2 +
libxfdashboard/bindings-pool.c | 2 +
libxfdashboard/box-layout.c | 3 +
libxfdashboard/button.c | 108 +++++++++++++-------------
libxfdashboard/click-action.c | 2 +
libxfdashboard/collapse-box.c | 4 +-
libxfdashboard/compat.h | 44 +++++++++++
libxfdashboard/css-selector.c | 3 +
libxfdashboard/desktop-app-info.c | 2 +
libxfdashboard/drag-action.c | 6 +-
libxfdashboard/drop-action.c | 10 ++-
libxfdashboard/dynamic-table-layout.c | 11 ++-
libxfdashboard/emblem-effect.c | 2 +
libxfdashboard/fill-box-layout.c | 9 ++-
libxfdashboard/focus-manager.c | 8 +-
libxfdashboard/focusable.c | 2 +
libxfdashboard/image-content.c | 3 +
libxfdashboard/live-window.c | 22 +++---
libxfdashboard/live-workspace.c | 4 +-
libxfdashboard/outline-effect.c | 2 +
libxfdashboard/plugin.c | 1 +
libxfdashboard/plugins-manager.c | 1 +
libxfdashboard/quicklaunch.c | 34 ++++----
libxfdashboard/scaled-table-layout.c | 9 ++-
libxfdashboard/scrollbar.c | 2 +
libxfdashboard/search-manager.c | 2 +
libxfdashboard/search-provider.c | 2 +
libxfdashboard/search-result-container.c | 2 +
libxfdashboard/search-result-set.c | 3 +
libxfdashboard/search-view.c | 2 +
libxfdashboard/stage-interface.c | 2 +
libxfdashboard/stage.c | 2 +
libxfdashboard/stylable.c | 2 +
libxfdashboard/text-box.c | 18 +++--
libxfdashboard/theme-css.c | 2 +
libxfdashboard/theme-effects.c | 2 +
libxfdashboard/theme-layout.c | 2 +
libxfdashboard/theme.c | 3 +
libxfdashboard/toggle-button.c | 2 +
libxfdashboard/tooltip-action.c | 2 +
libxfdashboard/utils.c | 6 +-
libxfdashboard/view-manager.c | 2 +
libxfdashboard/view-selector.c | 2 +
libxfdashboard/view.c | 2 +
libxfdashboard/viewpad.c | 4 +-
libxfdashboard/window-content.c | 2 +
libxfdashboard/window-tracker-monitor.c | 3 +
libxfdashboard/window-tracker-window.c | 2 +
libxfdashboard/window-tracker-workspace.c | 2 +
libxfdashboard/window-tracker.c | 2 +
libxfdashboard/windows-view.c | 1 +
libxfdashboard/workspace-selector.c | 16 ++--
63 files changed, 293 insertions(+), 122 deletions(-)
diff --git a/libxfdashboard/Makefile.am b/libxfdashboard/Makefile.am
index d301233..0dafee6 100644
--- a/libxfdashboard/Makefile.am
+++ b/libxfdashboard/Makefile.am
@@ -38,6 +38,7 @@ libxfdashboard_la_headers = \
button.h \
click-action.h \
collapse-box.h \
+ compat.h \
css-selector.h \
desktop-app-info.h \
drag-action.h \
diff --git a/libxfdashboard/action-button.c b/libxfdashboard/action-button.c
index bd4cf95..1599327 100644
--- a/libxfdashboard/action-button.c
+++ b/libxfdashboard/action-button.c
@@ -31,6 +31,8 @@
#include <libxfdashboard/focusable.h>
#include <libxfdashboard/focus-manager.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static void _xfdashboard_action_button_focusable_iface_init(XfdashboardFocusableInterface *iface);
diff --git a/libxfdashboard/actor.c b/libxfdashboard/actor.c
index 7ec354b..fe7869f 100644
--- a/libxfdashboard/actor.c
+++ b/libxfdashboard/actor.c
@@ -33,6 +33,8 @@
#include <libxfdashboard/stylable.h>
#include <libxfdashboard/focusable.h>
#include <libxfdashboard/utils.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static gpointer xfdashboard_actor_parent_class=NULL;
@@ -306,9 +308,9 @@ static gboolean _xfdashboard_actor_focusable_can_focus(XfdashboardFocusable *inF
/* This actor can only be focused if it is mapped, visibl e and reactive */
if(priv->canFocus &&
- CLUTTER_ACTOR_IS_MAPPED(self) &&
- CLUTTER_ACTOR_IS_VISIBLE(self) &&
- CLUTTER_ACTOR_IS_REACTIVE(self))
+ clutter_actor_is_mapped(CLUTTER_ACTOR(self)) &&
+ clutter_actor_is_visible(CLUTTER_ACTOR(self)) &&
+ clutter_actor_get_reactive(CLUTTER_ACTOR(self)))
{
return(TRUE);
}
@@ -482,7 +484,7 @@ static void _xfdashboard_actor_stylable_invalidate(XfdashboardStylable *inStylab
didChange=FALSE;
/* Only recompute style for mapped actors or if revalidation was forced */
- if(!priv->forceStyleRevalidation && !CLUTTER_ACTOR_IS_MAPPED(self)) return;
+ if(!priv->forceStyleRevalidation && !clutter_actor_is_mapped(CLUTTER_ACTOR(self))) return;
/* Get theme CSS */
theme=xfdashboard_application_get_theme(NULL);
diff --git a/libxfdashboard/application-button.c b/libxfdashboard/application-button.c
index bc8e4b5..b74914a 100644
--- a/libxfdashboard/application-button.c
+++ b/libxfdashboard/application-button.c
@@ -37,6 +37,8 @@
#include <libxfdashboard/application-tracker.h>
#include <libxfdashboard/stylable.h>
#include <libxfdashboard/application.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardApplicationButton,
diff --git a/libxfdashboard/application-database.c b/libxfdashboard/application-database.c
index fed27e0..29182a6 100644
--- a/libxfdashboard/application-database.c
+++ b/libxfdashboard/application-database.c
@@ -30,6 +30,7 @@
#include <libxfdashboard/application-database.h>
#include <libxfdashboard/desktop-app-info.h>
+#include <libxfdashboard/compat.h>
/* Define this class in GObject system */
diff --git a/libxfdashboard/application-tracker.c b/libxfdashboard/application-tracker.c
index 3a9bd60..490272e 100644
--- a/libxfdashboard/application-tracker.c
+++ b/libxfdashboard/application-tracker.c
@@ -33,6 +33,8 @@
#include <libxfdashboard/application-database.h>
#include <libxfdashboard/window-tracker.h>
#include <libxfdashboard/marshal.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardApplicationTracker,
diff --git a/libxfdashboard/application.c b/libxfdashboard/application.c
index 78a2cfc..4f6b27f 100644
--- a/libxfdashboard/application.c
+++ b/libxfdashboard/application.c
@@ -50,6 +50,8 @@
#include <libxfdashboard/application-tracker.h>
#include <libxfdashboard/plugins-manager.h>
#include <libxfdashboard/marshal.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardApplication,
diff --git a/libxfdashboard/applications-menu-model.c b/libxfdashboard/applications-menu-model.c
index 478d2d8..f707563 100644
--- a/libxfdashboard/applications-menu-model.c
+++ b/libxfdashboard/applications-menu-model.c
@@ -30,6 +30,8 @@
#include <libxfdashboard/applications-menu-model.h>
#include <libxfdashboard/application-database.h>
+#include <libxfdashboard/compat.h>
+
/* Define these classes in GObject system */
G_DEFINE_TYPE(XfdashboardApplicationsMenuModel,
diff --git a/libxfdashboard/applications-search-provider.c b/libxfdashboard/applications-search-provider.c
index 3513479..b07f9da 100644
--- a/libxfdashboard/applications-search-provider.c
+++ b/libxfdashboard/applications-search-provider.c
@@ -38,6 +38,7 @@
#include <libxfdashboard/drag-action.h>
#include <libxfdashboard/utils.h>
#include <libxfdashboard/enums.h>
+#include <libxfdashboard/compat.h>
/* Define this class in GObject system */
diff --git a/libxfdashboard/applications-view.c b/libxfdashboard/applications-view.c
index cd33984..4c2233d 100644
--- a/libxfdashboard/applications-view.c
+++ b/libxfdashboard/applications-view.c
@@ -44,6 +44,8 @@
#include <libxfdashboard/utils.h>
#include <libxfdashboard/desktop-app-info.h>
#include <libxfdashboard/application-database.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static void _xfdashboard_applications_view_focusable_iface_init(XfdashboardFocusableInterface *iface);
diff --git a/libxfdashboard/background.c b/libxfdashboard/background.c
index bb25cfe..e6ba057 100644
--- a/libxfdashboard/background.c
+++ b/libxfdashboard/background.c
@@ -34,6 +34,8 @@
#include <libxfdashboard/enums.h>
#include <libxfdashboard/outline-effect.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardBackground,
diff --git a/libxfdashboard/binding.c b/libxfdashboard/binding.c
index 7b3f194..4fec087 100644
--- a/libxfdashboard/binding.c
+++ b/libxfdashboard/binding.c
@@ -30,6 +30,8 @@
#include <libxfdashboard/binding.h>
#include <libxfdashboard/enums.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardBinding,
diff --git a/libxfdashboard/bindings-pool.c b/libxfdashboard/bindings-pool.c
index 3fa3775..ccd2b99 100644
--- a/libxfdashboard/bindings-pool.c
+++ b/libxfdashboard/bindings-pool.c
@@ -33,6 +33,8 @@
#include <gdk/gdkkeysyms.h>
#include <libxfdashboard/utils.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardBindingsPool,
diff --git a/libxfdashboard/box-layout.c b/libxfdashboard/box-layout.c
index e1cfd49..c62482e 100644
--- a/libxfdashboard/box-layout.c
+++ b/libxfdashboard/box-layout.c
@@ -46,6 +46,9 @@
#include <clutter/clutter.h>
#include <math.h>
+#include <libxfdashboard/compat.h>
+
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardBoxLayout,
xfdashboard_box_layout,
diff --git a/libxfdashboard/button.c b/libxfdashboard/button.c
index b40c536..cdc883c 100644
--- a/libxfdashboard/button.c
+++ b/libxfdashboard/button.c
@@ -35,6 +35,8 @@
#include <libxfdashboard/enums.h>
#include <libxfdashboard/click-action.h>
#include <libxfdashboard/image-content.h>
+#include <libxfdashboard/compat.h>
+
/* Forward declarations */
typedef enum /*< skip,prefix=XFDASHBOARD_BUTTON_ICON_TYPE >*/
@@ -76,7 +78,7 @@ struct _XfdashboardButtonPrivate
/* Instance related */
ClutterActor *actorIcon;
- ClutterText *actorLabel;
+ ClutterActor *actorLabel;
ClutterAction *clickAction;
gboolean iconLoaded;
@@ -153,8 +155,8 @@ static void _xfdashboard_button_get_preferred_width_intern(XfdashboardButton *se
/* Special case: both actors visible and icon size
* synchronization is turned on
*/
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel) &&
- CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon) &&
+ if(clutter_actor_is_visible(priv->actorLabel) &&
+ clutter_actor_is_visible(priv->actorIcon) &&
priv->iconSyncSize==TRUE)
{
gfloat labelHeight;
@@ -190,7 +192,7 @@ static void _xfdashboard_button_get_preferred_width_intern(XfdashboardButton *se
else
{
/* Get size of label if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel))
+ if(clutter_actor_is_visible(priv->actorLabel))
{
clutter_actor_get_preferred_width(CLUTTER_ACTOR(priv->actorLabel),
inForHeight,
@@ -199,7 +201,7 @@ static void _xfdashboard_button_get_preferred_width_intern(XfdashboardButton *se
}
/* Get size of icon if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon))
+ if(clutter_actor_is_visible(priv->actorIcon))
{
clutter_actor_get_preferred_width(CLUTTER_ACTOR(priv->actorIcon),
inForHeight,
@@ -211,8 +213,8 @@ static void _xfdashboard_button_get_preferred_width_intern(XfdashboardButton *se
/* Special case: Size is given, both actors visible,
* icon size synchronization is turned on
*/
- else if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel) &&
- CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon) &&
+ else if(clutter_actor_is_visible(priv->actorLabel) &&
+ clutter_actor_is_visible(priv->actorIcon) &&
priv->iconSyncSize==TRUE &&
(priv->iconOrientation==XFDASHBOARD_ORIENTATION_TOP ||
priv->iconOrientation==XFDASHBOARD_ORIENTATION_BOTTOM))
@@ -255,7 +257,7 @@ static void _xfdashboard_button_get_preferred_width_intern(XfdashboardButton *se
requestSize=(inGetPreferred==TRUE ? naturalSize : minSize);
if(priv->labelEllipsize==PANGO_ELLIPSIZE_NONE ||
- clutter_text_get_single_line_mode(priv->actorLabel)==FALSE)
+ clutter_text_get_single_line_mode(CLUTTER_TEXT(priv->actorLabel))==FALSE)
{
do
{
@@ -300,8 +302,8 @@ static void _xfdashboard_button_get_preferred_width_intern(XfdashboardButton *se
/* Reduce size by padding and if both icon and label are visible
* also reduce by spacing
*/
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon) &&
- (CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel)))
+ if(clutter_actor_is_visible(priv->actorIcon) &&
+ (clutter_actor_is_visible(priv->actorLabel)))
{
inForHeight-=priv->spacing;
}
@@ -309,7 +311,7 @@ static void _xfdashboard_button_get_preferred_width_intern(XfdashboardButton *se
inForHeight=MAX(0.0f, inForHeight);
/* Get icon size if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon))
+ if(clutter_actor_is_visible(priv->actorIcon))
{
if(priv->iconSyncSize==TRUE &&
(priv->iconOrientation==XFDASHBOARD_ORIENTATION_LEFT ||
@@ -335,7 +337,7 @@ static void _xfdashboard_button_get_preferred_width_intern(XfdashboardButton *se
}
/* Get label size if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel))
+ if(clutter_actor_is_visible(priv->actorLabel))
{
if(priv->iconOrientation==XFDASHBOARD_ORIENTATION_TOP ||
priv->iconOrientation==XFDASHBOARD_ORIENTATION_BOTTOM)
@@ -385,8 +387,8 @@ static void _xfdashboard_button_get_preferred_height_intern(XfdashboardButton *s
/* Special case: both actors visible and icon size
* synchronization is turned on
*/
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel) &&
- CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon) &&
+ if(clutter_actor_is_visible(priv->actorLabel) &&
+ clutter_actor_is_visible(priv->actorIcon) &&
priv->iconSyncSize==TRUE)
{
gfloat labelWidth;
@@ -422,7 +424,7 @@ static void _xfdashboard_button_get_preferred_height_intern(XfdashboardButton *s
else
{
/* Get sizes of visible actors */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon))
+ if(clutter_actor_is_visible(priv->actorIcon))
{
clutter_actor_get_preferred_height(CLUTTER_ACTOR(priv->actorIcon),
inForWidth,
@@ -430,7 +432,7 @@ static void _xfdashboard_button_get_preferred_height_intern(XfdashboardButton *s
iconSize=(inGetPreferred==TRUE ? naturalSize : minSize);
}
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel))
+ if(clutter_actor_is_visible(priv->actorLabel))
{
clutter_actor_get_preferred_height(CLUTTER_ACTOR(priv->actorLabel),
inForWidth,
@@ -442,8 +444,8 @@ static void _xfdashboard_button_get_preferred_height_intern(XfdashboardButton *s
/* Special case: Size is given, both actors visible,
* icon size synchronization is turned on
*/
- else if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel) &&
- CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon) &&
+ else if(clutter_actor_is_visible(priv->actorLabel) &&
+ clutter_actor_is_visible(priv->actorIcon) &&
priv->iconSyncSize==TRUE &&
(priv->iconOrientation==XFDASHBOARD_ORIENTATION_LEFT ||
priv->iconOrientation==XFDASHBOARD_ORIENTATION_RIGHT))
@@ -486,7 +488,7 @@ static void _xfdashboard_button_get_preferred_height_intern(XfdashboardButton *s
requestSize=(inGetPreferred==TRUE ? naturalSize : minSize);
if(priv->labelEllipsize==PANGO_ELLIPSIZE_NONE ||
- clutter_text_get_single_line_mode(priv->actorLabel)==FALSE)
+ clutter_text_get_single_line_mode(CLUTTER_TEXT(priv->actorLabel))==FALSE)
{
do
{
@@ -531,8 +533,8 @@ static void _xfdashboard_button_get_preferred_height_intern(XfdashboardButton *s
/* Reduce size by padding and if both icon and label are visible
* also reduce by spacing
*/
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon) &&
- (CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel)))
+ if(clutter_actor_is_visible(priv->actorIcon) &&
+ (clutter_actor_is_visible(priv->actorLabel)))
{
inForWidth-=priv->spacing;
}
@@ -540,7 +542,7 @@ static void _xfdashboard_button_get_preferred_height_intern(XfdashboardButton *s
inForWidth=MAX(0.0f, inForWidth);
/* Get icon size if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon))
+ if(clutter_actor_is_visible(priv->actorIcon))
{
if(priv->iconSyncSize==TRUE &&
(priv->iconOrientation==XFDASHBOARD_ORIENTATION_TOP ||
@@ -565,7 +567,7 @@ static void _xfdashboard_button_get_preferred_height_intern(XfdashboardButton *s
}
/* Get label size if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel))
+ if(clutter_actor_is_visible(priv->actorLabel))
{
if(priv->iconOrientation==XFDASHBOARD_ORIENTATION_LEFT ||
priv->iconOrientation==XFDASHBOARD_ORIENTATION_RIGHT)
@@ -664,7 +666,7 @@ static void _xfdashboard_button_on_mapped_changed(XfdashboardButton *self,
/* If actor is mapped now and an image by icon name was set but not
* loaded yet then set icon image now
*/
- if(CLUTTER_ACTOR_IS_MAPPED(self) &&
+ if(clutter_actor_is_mapped(CLUTTER_ACTOR(self)) &&
priv->iconLoaded==FALSE)
{
if(priv->iconType==XFDASHBOARD_BUTTON_ICON_TYPE_ICON_NAME)
@@ -772,8 +774,8 @@ static void _xfdashboard_button_get_preferred_height(ClutterActor *inActor,
&naturalLabelHeight);
}
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel)!=TRUE ||
- CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon)!=TRUE)
+ if(clutter_actor_is_visible(priv->actorLabel)!=TRUE ||
+ clutter_actor_is_visible(priv->actorIcon)!=TRUE)
{
spacing=0.0f;
}
@@ -846,8 +848,8 @@ static void _xfdashboard_button_get_preferred_width(ClutterActor *inActor,
&naturalLabelWidth);
}
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel)!=TRUE ||
- CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon)!=TRUE)
+ if(clutter_actor_is_visible(priv->actorLabel)!=TRUE ||
+ clutter_actor_is_visible(priv->actorIcon)!=TRUE)
{
spacing=0.0f;
}
@@ -908,15 +910,15 @@ static void _xfdashboard_button_allocate(ClutterActor *inActor,
* icon or text is not visible reset its size to zero
* and also reset spacing to zero.
*/
- if(!CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon) ||
- !CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel))
+ if(!clutter_actor_is_visible(priv->actorIcon) ||
+ !clutter_actor_is_visible(priv->actorLabel))
{
spacing=0.0f;
}
/* Get icon sizes */
iconWidth=iconHeight=0.0f;
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon))
+ if(clutter_actor_is_visible(priv->actorIcon))
{
gfloat iconScale=1.0f;
@@ -952,7 +954,7 @@ static void _xfdashboard_button_allocate(ClutterActor *inActor,
/* Set allocation of label if visible*/
textWidth=textHeight=0.0f;
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorLabel))
+ if(clutter_actor_is_visible(priv->actorLabel))
{
switch(priv->iconOrientation)
{
@@ -960,7 +962,7 @@ static void _xfdashboard_button_allocate(ClutterActor *inActor,
textWidth=MAX(0.0f, clutter_actor_box_get_width(inBox)-2*priv->padding);
textHeight=clutter_actor_box_get_height(inBox)-iconHeight-2*priv->padding;
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon)) textHeight-=priv->spacing;
+ if(clutter_actor_is_visible(priv->actorIcon)) textHeight-=priv->spacing;
textHeight=MAX(0.0f, textHeight);
left=((clutter_actor_box_get_width(inBox)-textWidth)/2.0f);
@@ -973,7 +975,7 @@ static void _xfdashboard_button_allocate(ClutterActor *inActor,
textWidth=MAX(0.0f, clutter_actor_box_get_width(inBox)-2*priv->padding);
textHeight=clutter_actor_box_get_height(inBox)-iconHeight-2*priv->padding;
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon)) textHeight-=priv->spacing;
+ if(clutter_actor_is_visible(priv->actorIcon)) textHeight-=priv->spacing;
textHeight=MAX(0.0f, textHeight);
left=((clutter_actor_box_get_width(inBox)-textWidth)/2.0f);
@@ -984,7 +986,7 @@ static void _xfdashboard_button_allocate(ClutterActor *inActor,
case XFDASHBOARD_ORIENTATION_RIGHT:
textWidth=clutter_actor_box_get_width(inBox)-iconWidth-2*priv->padding;
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon)) textWidth-=priv->spacing;
+ if(clutter_actor_is_visible(priv->actorIcon)) textWidth-=priv->spacing;
textWidth=MAX(0.0f, textWidth);
textHeight=MAX(0.0f, clutter_actor_box_get_height(inBox)-2*priv->padding);
@@ -998,7 +1000,7 @@ static void _xfdashboard_button_allocate(ClutterActor *inActor,
case XFDASHBOARD_ORIENTATION_LEFT:
default:
textWidth=clutter_actor_box_get_width(inBox)-iconWidth-2*priv->padding;
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon)) textWidth-=priv->spacing;
+ if(clutter_actor_is_visible(priv->actorIcon)) textWidth-=priv->spacing;
textWidth=MAX(0.0f, textWidth);
textHeight=MAX(0.0f, clutter_actor_box_get_height(inBox)-2*priv->padding);
@@ -1018,7 +1020,7 @@ static void _xfdashboard_button_allocate(ClutterActor *inActor,
}
/* Set allocation of icon if visible*/
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorIcon))
+ if(clutter_actor_is_visible(priv->actorIcon))
{
switch(priv->iconOrientation)
{
@@ -1254,7 +1256,7 @@ static void _xfdashboard_button_get_property(GObject *inObject,
break;
case PROP_TEXT:
- g_value_set_string(outValue, clutter_text_get_text(priv->actorLabel));
+ g_value_set_string(outValue, clutter_text_get_text(CLUTTER_TEXT(priv->actorLabel)));
break;
case PROP_TEXT_FONT:
@@ -1484,12 +1486,12 @@ static void xfdashboard_button_init(XfdashboardButton *self)
clutter_actor_add_child(CLUTTER_ACTOR(self), priv->actorIcon);
clutter_actor_set_reactive(priv->actorIcon, FALSE);
- priv->actorLabel=CLUTTER_TEXT(clutter_text_new());
- clutter_actor_add_child(CLUTTER_ACTOR(self), CLUTTER_ACTOR(priv->actorLabel));
+ priv->actorLabel=clutter_text_new();
+ clutter_actor_add_child(CLUTTER_ACTOR(self), priv->actorLabel);
clutter_actor_set_reactive(CLUTTER_ACTOR(priv->actorLabel), FALSE);
- clutter_text_set_selectable(priv->actorLabel, FALSE);
- clutter_text_set_line_wrap(priv->actorLabel, TRUE);
- clutter_text_set_single_line_mode(priv->actorLabel, priv->isSingleLineMode);
+ clutter_text_set_selectable(CLUTTER_TEXT(priv->actorLabel), FALSE);
+ clutter_text_set_line_wrap(CLUTTER_TEXT(priv->actorLabel), TRUE);
+ clutter_text_set_single_line_mode(CLUTTER_TEXT(priv->actorLabel), priv->isSingleLineMode);
/* Connect signals */
g_signal_connect(self, "notify::mapped", G_CALLBACK(_xfdashboard_button_on_mapped_changed), NULL);
@@ -1701,7 +1703,7 @@ void xfdashboard_button_set_icon_name(XfdashboardButton *self, const gchar *inIc
priv->iconName=g_strdup(inIconName);
priv->iconLoaded=FALSE;
- if(CLUTTER_ACTOR_IS_MAPPED(self))
+ if(clutter_actor_is_mapped(CLUTTER_ACTOR(self)))
{
/* Actor is mapped so we cannot defer loading and setting image */
image=xfdashboard_image_content_new_for_icon_name(priv->iconName, priv->iconSize);
@@ -1764,7 +1766,7 @@ void xfdashboard_button_set_gicon(XfdashboardButton *self, GIcon *inIcon)
priv->iconGIcon=G_ICON(g_object_ref(inIcon));
priv->iconLoaded=FALSE;
- if(CLUTTER_ACTOR_IS_MAPPED(self))
+ if(clutter_actor_is_mapped(CLUTTER_ACTOR(self)))
{
/* Actor is mapped so we cannot defer loading and setting image */
image=xfdashboard_image_content_new_for_gicon(priv->iconGIcon, priv->iconSize);
@@ -1947,7 +1949,7 @@ const gchar* xfdashboard_button_get_text(XfdashboardButton *self)
{
g_return_val_if_fail(XFDASHBOARD_IS_BUTTON(self), NULL);
- return(clutter_text_get_text(self->priv->actorLabel));
+ return(clutter_text_get_text(CLUTTER_TEXT(self->priv->actorLabel)));
}
void xfdashboard_button_set_text(XfdashboardButton *self, const gchar *inMarkupText)
@@ -1959,10 +1961,10 @@ void xfdashboard_button_set_text(XfdashboardButton *self, const gchar *inMarkupT
priv=self->priv;
/* Set value if changed */
- if(g_strcmp0(clutter_text_get_text(priv->actorLabel), inMarkupText)!=0)
+ if(g_strcmp0(clutter_text_get_text(CLUTTER_TEXT(priv->actorLabel)), inMarkupText)!=0)
{
/* Set value */
- clutter_text_set_markup(priv->actorLabel, inMarkupText);
+ clutter_text_set_markup(CLUTTER_TEXT(priv->actorLabel), inMarkupText);
clutter_actor_queue_relayout(CLUTTER_ACTOR(priv->actorLabel));
/* Notify about property change */
@@ -1994,7 +1996,7 @@ void xfdashboard_button_set_font(XfdashboardButton *self, const gchar *inFont)
if(priv->font) g_free(priv->font);
priv->font=(inFont ? g_strdup(inFont) : NULL);
- clutter_text_set_font_name(priv->actorLabel, priv->font);
+ clutter_text_set_font_name(CLUTTER_TEXT(priv->actorLabel), priv->font);
clutter_actor_queue_redraw(CLUTTER_ACTOR(self));
/* Notify about property change */
@@ -2026,7 +2028,7 @@ void xfdashboard_button_set_color(XfdashboardButton *self, const ClutterColor *i
if(priv->labelColor) clutter_color_free(priv->labelColor);
priv->labelColor=clutter_color_copy(inColor);
- clutter_text_set_color(priv->actorLabel, priv->labelColor);
+ clutter_text_set_color(CLUTTER_TEXT(priv->actorLabel), priv->labelColor);
clutter_actor_queue_redraw(CLUTTER_ACTOR(self));
/* Notify about property change */
@@ -2056,7 +2058,7 @@ void xfdashboard_button_set_ellipsize_mode(XfdashboardButton *self, const PangoE
/* Set value */
priv->labelEllipsize=inMode;
- clutter_text_set_ellipsize(priv->actorLabel, priv->labelEllipsize);
+ clutter_text_set_ellipsize(CLUTTER_TEXT(priv->actorLabel), priv->labelEllipsize);
clutter_actor_queue_relayout(CLUTTER_ACTOR(self));
/* Notify about property change */
@@ -2086,7 +2088,7 @@ void xfdashboard_button_set_single_line_mode(XfdashboardButton *self, const gboo
/* Set value */
priv->isSingleLineMode=inSingleLineMode;
- clutter_text_set_single_line_mode(priv->actorLabel, priv->isSingleLineMode);
+ clutter_text_set_single_line_mode(CLUTTER_TEXT(priv->actorLabel), priv->isSingleLineMode);
clutter_actor_queue_relayout(CLUTTER_ACTOR(self));
/* Notify about property change */
@@ -2116,7 +2118,7 @@ void xfdashboard_button_set_text_justification(XfdashboardButton *self, const Pa
/* Set value */
priv->textJustification=inJustification;
- clutter_text_set_line_alignment(priv->actorLabel, priv->textJustification);
+ clutter_text_set_line_alignment(CLUTTER_TEXT(priv->actorLabel), priv->textJustification);
clutter_actor_queue_redraw(CLUTTER_ACTOR(self));
/* Notify about property change */
diff --git a/libxfdashboard/click-action.c b/libxfdashboard/click-action.c
index a04ff56..1b813e5 100644
--- a/libxfdashboard/click-action.c
+++ b/libxfdashboard/click-action.c
@@ -42,6 +42,8 @@
#include <libxfdashboard/marshal.h>
#include <libxfdashboard/actor.h>
#include <libxfdashboard/stylable.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardClickAction,
diff --git a/libxfdashboard/collapse-box.c b/libxfdashboard/collapse-box.c
index fcc7d17..1a3daa1 100644
--- a/libxfdashboard/collapse-box.c
+++ b/libxfdashboard/collapse-box.c
@@ -33,6 +33,8 @@
#include <libxfdashboard/enums.h>
#include <libxfdashboard/focus-manager.h>
#include <libxfdashboard/utils.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static void _xfdashboard_collapse_box_container_iface_init(ClutterContainerIface *inInterface);
@@ -409,7 +411,7 @@ static void _xfdashboard_collapse_box_allocate(ClutterActor *inActor,
clutter_actor_box_get_size(inBox, &w, &h);
/* Get allocation for child */
- if(priv->child && CLUTTER_ACTOR_IS_VISIBLE(priv->child))
+ if(priv->child && clutter_actor_is_visible(priv->child))
{
/* Set up allocation */
requestMode=clutter_actor_get_request_mode(CLUTTER_ACTOR(self));
diff --git a/libxfdashboard/compat.h b/libxfdashboard/compat.h
new file mode 100644
index 0000000..d9dd4ef
--- /dev/null
+++ b/libxfdashboard/compat.h
@@ -0,0 +1,44 @@
+/*
+ * compat: Compatibility layer for various libraries and versions
+ *
+ * Copyright 2012-2016 Stephan Haller <nomad at froevel.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ *
+ */
+
+#ifndef __LIBXFDASHBOARD_COMPAT__
+#define __LIBXFDASHBOARD_COMPAT__
+
+#if !defined(__LIBXFDASHBOARD_H_INSIDE__) && !defined(LIBXFDASHBOARD_COMPILATION)
+#error "Only <libxfdashboard/libxfdashboard.h> can be included directly."
+#endif
+
+#include <clutter/clutter.h>
+
+G_BEGIN_DECLS
+
+#if !CLUTTER_CHECK_VERSION(1, 23, 4)
+#define clutter_actor_is_visible(actor) CLUTTER_ACTOR_IS_VISIBLE( (actor) )
+#define clutter_actor_is_mapped(actor) CLUTTER_ACTOR_IS_MAPPED( (actor) )
+#define clutter_actor_is_realized(actor) CLUTTER_ACTOR_IS_REALIZED( (actor) )
+#define clutter_actor_get_reactive(actor) CLUTTER_ACTOR_IS_REACTIVE( (actor) )
+#endif
+
+G_END_DECLS
+
+#endif /* __LIBXFDASHBOARD_COMPAT__ */
diff --git a/libxfdashboard/css-selector.c b/libxfdashboard/css-selector.c
index 0cce156..e0a17f9 100644
--- a/libxfdashboard/css-selector.c
+++ b/libxfdashboard/css-selector.c
@@ -29,6 +29,9 @@
#include <glib/gi18n-lib.h>
+#include <libxfdashboard/compat.h>
+
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardCssSelector,
xfdashboard_css_selector,
diff --git a/libxfdashboard/desktop-app-info.c b/libxfdashboard/desktop-app-info.c
index 773efcd..9b28544 100644
--- a/libxfdashboard/desktop-app-info.c
+++ b/libxfdashboard/desktop-app-info.c
@@ -30,6 +30,8 @@
#include <libxfdashboard/desktop-app-info.h>
#include <libxfdashboard/application-database.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static void _xfdashboard_desktop_app_info_gappinfo_iface_init(GAppInfoIface *iface);
diff --git a/libxfdashboard/drag-action.c b/libxfdashboard/drag-action.c
index 334ee59..38b2086 100644
--- a/libxfdashboard/drag-action.c
+++ b/libxfdashboard/drag-action.c
@@ -33,6 +33,8 @@
#include <libxfdashboard/marshal.h>
#include <libxfdashboard/actor.h>
#include <libxfdashboard/stylable.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardDragAction,
@@ -527,8 +529,8 @@ static void _xfdashboard_drag_action_drag_motion(ClutterDragAction *inAction,
ClutterActor *dropActor=clutter_actor_meta_get_actor(actorMeta);
if(clutter_actor_meta_get_enabled(actorMeta) &&
- CLUTTER_ACTOR_IS_VISIBLE(dropActor) &&
- CLUTTER_ACTOR_IS_REACTIVE(dropActor))
+ clutter_actor_is_visible(dropActor) &&
+ clutter_actor_get_reactive(dropActor))
{
g_signal_emit_by_name(dropTarget, "drag-enter", self, NULL);
priv->lastDropTarget=dropTarget;
diff --git a/libxfdashboard/drop-action.c b/libxfdashboard/drop-action.c
index 1a12f1d..c331509 100644
--- a/libxfdashboard/drop-action.c
+++ b/libxfdashboard/drop-action.c
@@ -32,6 +32,8 @@
#include <libxfdashboard/marshal.h>
#include <libxfdashboard/actor.h>
#include <libxfdashboard/stylable.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardDropAction,
@@ -162,8 +164,8 @@ static gboolean _xfdashboard_drop_action_class_real_begin(XfdashboardDropAction
* return FALSE to indicate that we cannot handle dragged actor.
*/
return(clutter_actor_meta_get_enabled(actorMeta) &&
- CLUTTER_ACTOR_IS_VISIBLE(priv->actor) &&
- CLUTTER_ACTOR_IS_REACTIVE(priv->actor));
+ clutter_actor_is_visible(priv->actor) &&
+ clutter_actor_get_reactive(priv->actor));
}
/* Default signal handler for "end" */
@@ -203,8 +205,8 @@ static gboolean _xfdashboard_drop_action_class_real_can_drop(XfdashboardDropActi
* possible if drop target is visible and reactive. Otherwise we have to return FALSE.
*/
return(clutter_actor_meta_get_enabled(actorMeta) &&
- CLUTTER_ACTOR_IS_VISIBLE(priv->actor) &&
- CLUTTER_ACTOR_IS_REACTIVE(priv->actor));
+ clutter_actor_is_visible(priv->actor) &&
+ clutter_actor_get_reactive(priv->actor));
}
/* Default signal handler for "drop" */
diff --git a/libxfdashboard/dynamic-table-layout.c b/libxfdashboard/dynamic-table-layout.c
index c4953c7..844c907 100644
--- a/libxfdashboard/dynamic-table-layout.c
+++ b/libxfdashboard/dynamic-table-layout.c
@@ -34,6 +34,9 @@
#include <clutter/clutter.h>
#include <math.h>
+#include <libxfdashboard/compat.h>
+
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardDynamicTableLayout,
xfdashboard_dynamic_table_layout,
@@ -112,7 +115,7 @@ static void _xfdashboard_dynamic_table_layout_update_layout_data(XfdashboardDyna
while(clutter_actor_iter_next(&iter, &child))
{
/* Handle only visible actors */
- if(CLUTTER_ACTOR_IS_VISIBLE(child))
+ if(clutter_actor_is_visible(child))
{
/* Count visible children */
numberChildren++;
@@ -202,7 +205,7 @@ static void _xfdashboard_dynamic_table_layout_update_layout_data(XfdashboardDyna
while(clutter_actor_iter_next(&iter, &child))
{
/* Handle only visible actors */
- if(CLUTTER_ACTOR_IS_VISIBLE(child))
+ if(clutter_actor_is_visible(child))
{
g_array_append_val(priv->columnCoords, x);
x+=(largestWidth+priv->columnSpacing);
@@ -229,7 +232,7 @@ static void _xfdashboard_dynamic_table_layout_update_layout_data(XfdashboardDyna
while(clutter_actor_iter_next(&iter, &child))
{
/* Handle only visible actors */
- if(CLUTTER_ACTOR_IS_VISIBLE(child))
+ if(clutter_actor_is_visible(child))
{
/* If it is the first columns in row, calculate y-coordinate
* and append it to array.
@@ -361,7 +364,7 @@ static void _xfdashboard_dynamic_table_layout_allocate(ClutterLayoutManager *sel
while(clutter_actor_iter_next(&iter, &child))
{
/* Handle only visible actors */
- if(CLUTTER_ACTOR_IS_VISIBLE(child))
+ if(clutter_actor_is_visible(child))
{
/* Get column and row for child */
column=floor(i % priv->columns);
diff --git a/libxfdashboard/emblem-effect.c b/libxfdashboard/emblem-effect.c
index 109fd71..2b7cf04 100644
--- a/libxfdashboard/emblem-effect.c
+++ b/libxfdashboard/emblem-effect.c
@@ -36,6 +36,8 @@
#include <libxfdashboard/image-content.h>
#include <libxfdashboard/enums.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardEmblemEffect,
diff --git a/libxfdashboard/fill-box-layout.c b/libxfdashboard/fill-box-layout.c
index b9101bd..603c02e 100644
--- a/libxfdashboard/fill-box-layout.c
+++ b/libxfdashboard/fill-box-layout.c
@@ -33,6 +33,9 @@
#include <clutter/clutter.h>
#include <math.h>
+#include <libxfdashboard/compat.h>
+
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardFillBoxLayout,
xfdashboard_fill_box_layout,
@@ -104,7 +107,7 @@ static gint _xfdashboard_fill_box_layout_get_largest_sizes(XfdashboardFillBoxLay
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Check for largest size */
clutter_actor_get_preferred_size(child,
@@ -213,7 +216,7 @@ static void _xfdashboard_fill_box_layout_get_sizes_for_all(XfdashboardFillBoxLay
while(clutter_actor_iter_next(&iter, &child))
{
/* Only get sizes of visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Count visible children */
numberChildren++;
@@ -438,7 +441,7 @@ static void _xfdashboard_fill_box_layout_allocate(ClutterLayoutManager *inLayout
while(clutter_actor_iter_next(&iter, &child))
{
/* Only set sizes on visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Calculate and set new allocation of child */
if(priv->isHomogeneous==FALSE)
diff --git a/libxfdashboard/focus-manager.c b/libxfdashboard/focus-manager.c
index cff0340..97d03e1 100644
--- a/libxfdashboard/focus-manager.c
+++ b/libxfdashboard/focus-manager.c
@@ -34,6 +34,8 @@
#include <libxfdashboard/stylable.h>
#include <libxfdashboard/bindings-pool.h>
#include <libxfdashboard/application.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardFocusManager,
@@ -107,9 +109,9 @@ static void _xfdashboard_focus_manager_on_focusable_hide(XfdashboardFocusManager
*/
if(priv->currentFocus!=focusable) return;
- if(CLUTTER_ACTOR_IS_MAPPED(CLUTTER_ACTOR(focusable)) &&
- CLUTTER_ACTOR_IS_REALIZED(CLUTTER_ACTOR(focusable)) &&
- CLUTTER_ACTOR_IS_VISIBLE(CLUTTER_ACTOR(focusable)))
+ if(clutter_actor_is_mapped(CLUTTER_ACTOR(focusable)) &&
+ clutter_actor_is_realized(CLUTTER_ACTOR(focusable)) &&
+ clutter_actor_is_visible(CLUTTER_ACTOR(focusable)))
{
return;
}
diff --git a/libxfdashboard/focusable.c b/libxfdashboard/focusable.c
index b34bcc8..f33f020 100644
--- a/libxfdashboard/focusable.c
+++ b/libxfdashboard/focusable.c
@@ -37,6 +37,8 @@
#include <libxfdashboard/marshal.h>
#include <libxfdashboard/focus-manager.h>
#include <libxfdashboard/application.h>
+#include <libxfdashboard/compat.h>
+
/* Define this interface in GObject system */
G_DEFINE_INTERFACE(XfdashboardFocusable,
diff --git a/libxfdashboard/image-content.c b/libxfdashboard/image-content.c
index d3daac1..aac37cb 100644
--- a/libxfdashboard/image-content.c
+++ b/libxfdashboard/image-content.c
@@ -33,6 +33,8 @@
#include <libxfdashboard/application.h>
#include <libxfdashboard/stylable.h>
+#include <libxfdashboard/compat.h>
+
#if GTK_CHECK_VERSION(3, 14 ,0)
#undef USE_GTK_BUILTIN_ICONS
@@ -40,6 +42,7 @@
#define USE_GTK_BUILTIN_ICONS 1
#endif
+
/* Define this class in GObject system */
static void _xfdashboard_image_content_stylable_iface_init(XfdashboardStylableInterface *iface);
diff --git a/libxfdashboard/live-window.c b/libxfdashboard/live-window.c
index 9f9b1ca..b11ec72 100644
--- a/libxfdashboard/live-window.c
+++ b/libxfdashboard/live-window.c
@@ -41,6 +41,8 @@
#include <libxfdashboard/window-content.h>
#include <libxfdashboard/image-content.h>
#include <libxfdashboard/stylable.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardLiveWindow,
@@ -139,7 +141,7 @@ static void _xfdashboard_live_window_on_clicked(XfdashboardLiveWindow *self, Clu
action=XFDASHBOARD_CLICK_ACTION(inUserData);
/* Check if click happened in "close button" */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorClose))
+ if(clutter_actor_is_visible(priv->actorClose))
{
xfdashboard_click_action_get_coords(action, &eventX, &eventY);
if(clutter_actor_transform_stage_point(CLUTTER_ACTOR(self), eventX, eventY, &relX, &relY))
@@ -195,7 +197,7 @@ static void _xfdashboard_live_window_on_actions_changed(XfdashboardLiveWindow *s
if(inWindow!=priv->window) return;
/* Determine current and new state of actions */
- currentCloseVisible=(CLUTTER_ACTOR_IS_VISIBLE(priv->actorClose) ? TRUE : FALSE);
+ currentCloseVisible=(clutter_actor_is_visible(priv->actorClose) ? TRUE : FALSE);
newCloseVisible=xfdashboard_window_tracker_window_has_close_action(priv->window);
/* Show or hide close button actor */
@@ -403,7 +405,7 @@ static void _xfdashboard_live_window_get_preferred_height(ClutterActor *self,
/* Determine size of window if available and visible (should usually be the largest actor) */
if(priv->actorWindow &&
- CLUTTER_ACTOR_IS_VISIBLE(priv->actorWindow))
+ clutter_actor_is_visible(priv->actorWindow))
{
content=clutter_actor_get_content(priv->actorWindow);
if(content &&
@@ -416,7 +418,7 @@ static void _xfdashboard_live_window_get_preferred_height(ClutterActor *self,
}
/* Determine size of title actor if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorTitle))
+ if(clutter_actor_is_visible(priv->actorTitle))
{
clutter_actor_get_preferred_height(priv->actorTitle,
inForWidth,
@@ -429,7 +431,7 @@ static void _xfdashboard_live_window_get_preferred_height(ClutterActor *self,
}
/* Determine size of close button actor if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorClose))
+ if(clutter_actor_is_visible(priv->actorClose))
{
clutter_actor_get_preferred_height(priv->actorClose,
inForWidth,
@@ -442,7 +444,7 @@ static void _xfdashboard_live_window_get_preferred_height(ClutterActor *self,
}
/* Determine size of window number button actor if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorWindowNumber))
+ if(clutter_actor_is_visible(priv->actorWindowNumber))
{
clutter_actor_get_preferred_height(priv->actorWindowNumber,
inForWidth,
@@ -473,7 +475,7 @@ static void _xfdashboard_live_window_get_preferred_width(ClutterActor *self,
/* Determine size of window if available and visible (should usually be the largest actor) */
if(priv->actorWindow &&
- CLUTTER_ACTOR_IS_VISIBLE(priv->actorWindow))
+ clutter_actor_is_visible(priv->actorWindow))
{
content=clutter_actor_get_content(priv->actorWindow);
if(content &&
@@ -486,7 +488,7 @@ static void _xfdashboard_live_window_get_preferred_width(ClutterActor *self,
}
/* Determine size of title actor if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorTitle))
+ if(clutter_actor_is_visible(priv->actorTitle))
{
clutter_actor_get_preferred_width(priv->actorTitle,
inForHeight,
@@ -499,7 +501,7 @@ static void _xfdashboard_live_window_get_preferred_width(ClutterActor *self,
}
/* Determine size of close button actor if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorClose))
+ if(clutter_actor_is_visible(priv->actorClose))
{
clutter_actor_get_preferred_width(priv->actorClose,
inForHeight,
@@ -512,7 +514,7 @@ static void _xfdashboard_live_window_get_preferred_width(ClutterActor *self,
}
/* Determine size of window number button actor if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorWindowNumber))
+ if(clutter_actor_is_visible(priv->actorWindowNumber))
{
clutter_actor_get_preferred_width(priv->actorWindowNumber,
inForHeight,
diff --git a/libxfdashboard/live-workspace.c b/libxfdashboard/live-workspace.c
index 4c7034f..6dd8b07 100644
--- a/libxfdashboard/live-workspace.c
+++ b/libxfdashboard/live-workspace.c
@@ -41,6 +41,8 @@
#include <libxfdashboard/image-content.h>
#include <libxfdashboard/enums.h>
#include <libxfdashboard/stylable.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardLiveWorkspace,
@@ -334,7 +336,7 @@ static void _xfdashboard_live_workspace_on_window_state_changed(XfdashboardLiveW
windowActor=_xfdashboard_live_workspace_find_by_window(self, inWindow);
if(windowActor)
{
- currentVisible=!!CLUTTER_ACTOR_IS_VISIBLE(windowActor);
+ currentVisible=clutter_actor_is_visible(windowActor);
}
/* Check if window's visibility has changed */
diff --git a/libxfdashboard/outline-effect.c b/libxfdashboard/outline-effect.c
index 507dada..1c5607a 100644
--- a/libxfdashboard/outline-effect.c
+++ b/libxfdashboard/outline-effect.c
@@ -31,6 +31,8 @@
#include <math.h>
#include <libxfdashboard/enums.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardOutlineEffect,
diff --git a/libxfdashboard/plugin.c b/libxfdashboard/plugin.c
index db10e2a..c383bf5 100644
--- a/libxfdashboard/plugin.c
+++ b/libxfdashboard/plugin.c
@@ -31,6 +31,7 @@
#include <glib/gi18n-lib.h>
#include <libxfdashboard/marshal.h>
+#include <libxfdashboard/compat.h>
/* Forward declaration */
diff --git a/libxfdashboard/plugins-manager.c b/libxfdashboard/plugins-manager.c
index 0961778..5967abf 100644
--- a/libxfdashboard/plugins-manager.c
+++ b/libxfdashboard/plugins-manager.c
@@ -31,6 +31,7 @@
#include <libxfdashboard/plugin.h>
#include <libxfdashboard/application.h>
+#include <libxfdashboard/compat.h>
/* Define this class in GObject system */
diff --git a/libxfdashboard/quicklaunch.c b/libxfdashboard/quicklaunch.c
index 7b4d5ea..cb550e6 100644
--- a/libxfdashboard/quicklaunch.c
+++ b/libxfdashboard/quicklaunch.c
@@ -46,6 +46,8 @@
#include <libxfdashboard/application-database.h>
#include <libxfdashboard/application-tracker.h>
#include <libxfdashboard/window-tracker-window.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static void _xfdashboard_quicklaunch_focusable_iface_init(XfdashboardFocusableInterface *iface);
@@ -1363,7 +1365,7 @@ static gfloat _xfdashboard_quicklaunch_get_scale_for_width(XfdashboardQuicklaunc
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get width of child */
clutter_actor_get_preferred_width(child, -1, &childMinWidth, &childNaturalWidth);
@@ -1411,7 +1413,7 @@ static gfloat _xfdashboard_quicklaunch_get_scale_for_width(XfdashboardQuicklaunc
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get scaled size of child and add to total width */
clutter_actor_get_preferred_width(child, -1, &childMinWidth, &childNaturalWidth);
@@ -1465,7 +1467,7 @@ static gfloat _xfdashboard_quicklaunch_get_scale_for_height(XfdashboardQuicklaun
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get height of child */
clutter_actor_get_preferred_height(child, -1, &childMinHeight, &childNaturalHeight);
@@ -1513,7 +1515,7 @@ static gfloat _xfdashboard_quicklaunch_get_scale_for_height(XfdashboardQuicklaun
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get scaled size of child and add to total height */
clutter_actor_get_preferred_height(child, -1, &childMinHeight, &childNaturalHeight);
@@ -1560,7 +1562,7 @@ static ClutterActor* xfdashboard_quicklaunch_get_previous_selectable(Xfdashboard
if(child==inSelected && prevItem) return(prevItem);
/* If this child is visible but not the one we lookup remember it as previous one */
- if(CLUTTER_ACTOR_IS_VISIBLE(child)) prevItem=child;
+ if(clutter_actor_is_visible(child)) prevItem=child;
}
/* If we get here there is no selectable item after given one, so return last
@@ -1590,7 +1592,7 @@ static ClutterActor* xfdashboard_quicklaunch_get_next_selectable(XfdashboardQuic
if(child!=inSelected && doLookup==FALSE) continue;
/* Return child if visible */
- if(doLookup && CLUTTER_ACTOR_IS_VISIBLE(child)) return(child);
+ if(doLookup && clutter_actor_is_visible(child)) return(child);
/* If we get here we either found current selected one and we should
* look for next selectable item or we looked for next selectable item
@@ -1611,7 +1613,7 @@ static ClutterActor* xfdashboard_quicklaunch_get_next_selectable(XfdashboardQuic
if(child==inSelected) break;
/* Return this child if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(child)) return(child);
+ if(clutter_actor_is_visible(child)) return(child);
}
/* If we get here there is no selectable item was found, so return NULL */
@@ -2053,7 +2055,7 @@ static void _xfdashboard_quicklaunch_get_preferred_height(ClutterActor *inActor,
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get sizes of child */
clutter_actor_get_preferred_height(child,
@@ -2097,7 +2099,7 @@ static void _xfdashboard_quicklaunch_get_preferred_height(ClutterActor *inActor,
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get child's size */
clutter_actor_get_preferred_height(child,
@@ -2152,7 +2154,7 @@ static void _xfdashboard_quicklaunch_get_preferred_width(ClutterActor *inActor,
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get child's size */
clutter_actor_get_preferred_width(child,
@@ -2184,7 +2186,7 @@ static void _xfdashboard_quicklaunch_get_preferred_width(ClutterActor *inActor,
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get sizes of child */
clutter_actor_get_preferred_width(child,
@@ -2253,7 +2255,7 @@ static void _xfdashboard_quicklaunch_allocate(ClutterActor *inActor,
while(clutter_actor_iter_next(&iter, &child))
{
/* Is child visible? */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Calculate new position and size of child. Because we will set
* a scale factor to the actor we have to set the real unscaled
@@ -2435,7 +2437,7 @@ static ClutterActor* _xfdashboard_quicklaunch_focusable_find_selection(Xfdashboa
(inDirection==XFDASHBOARD_SELECTION_TARGET_PAGE_LEFT && priv->orientation==CLUTTER_ORIENTATION_HORIZONTAL))
{
newSelection=clutter_actor_get_first_child(CLUTTER_ACTOR(self));
- while(newSelection && !CLUTTER_ACTOR_IS_VISIBLE(newSelection))
+ while(newSelection && !clutter_actor_is_visible(newSelection))
{
newSelection=clutter_actor_get_next_sibling(newSelection);
}
@@ -2450,7 +2452,7 @@ static ClutterActor* _xfdashboard_quicklaunch_focusable_find_selection(Xfdashboa
(inDirection==XFDASHBOARD_SELECTION_TARGET_PAGE_RIGHT && priv->orientation==CLUTTER_ORIENTATION_HORIZONTAL))
{
newSelection=clutter_actor_get_last_child(CLUTTER_ACTOR(self));
- while(newSelection && !CLUTTER_ACTOR_IS_VISIBLE(newSelection))
+ while(newSelection && !clutter_actor_is_visible(newSelection))
{
newSelection=clutter_actor_get_previous_sibling(newSelection);
}
@@ -2459,7 +2461,7 @@ static ClutterActor* _xfdashboard_quicklaunch_focusable_find_selection(Xfdashboa
case XFDASHBOARD_SELECTION_TARGET_NEXT:
newSelection=xfdashboard_quicklaunch_get_next_selectable(self, inSelection);
- while(newSelection && !CLUTTER_ACTOR_IS_VISIBLE(newSelection))
+ while(newSelection && !clutter_actor_is_visible(newSelection))
{
newSelection=clutter_actor_get_next_sibling(newSelection);
}
@@ -2467,7 +2469,7 @@ static ClutterActor* _xfdashboard_quicklaunch_focusable_find_selection(Xfdashboa
if(!newSelection)
{
newSelection=xfdashboard_quicklaunch_get_previous_selectable(self, inSelection);
- while(newSelection && !CLUTTER_ACTOR_IS_VISIBLE(newSelection))
+ while(newSelection && !clutter_actor_is_visible(newSelection))
{
newSelection=clutter_actor_get_next_sibling(newSelection);
}
diff --git a/libxfdashboard/scaled-table-layout.c b/libxfdashboard/scaled-table-layout.c
index c70eda4..c2153c7 100644
--- a/libxfdashboard/scaled-table-layout.c
+++ b/libxfdashboard/scaled-table-layout.c
@@ -35,6 +35,9 @@
#include <clutter/clutter.h>
#include <math.h>
+#include <libxfdashboard/compat.h>
+
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardScaledTableLayout,
xfdashboard_scaled_table_layout,
@@ -108,7 +111,7 @@ static void _xfdashboard_scaled_table_layout_update_rows_and_columns(Xfdashboard
clutter_actor_iter_init(&iter, CLUTTER_ACTOR(inContainer));
while(clutter_actor_iter_next(&iter, &child))
{
- if(CLUTTER_ACTOR_IS_VISIBLE(child)) numberChildren++;
+ if(clutter_actor_is_visible(child)) numberChildren++;
}
if(numberChildren!=priv->numberChildren)
@@ -295,7 +298,7 @@ static void _xfdashboard_scaled_table_layout_allocate(ClutterLayoutManager *self
clutter_actor_iter_init(&iter, CLUTTER_ACTOR(inContainer));
while(clutter_actor_iter_next(&iter, &child))
{
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
clutter_actor_get_preferred_size(child, NULL, NULL, &w, &h);
if(w>largestWidth) largestWidth=w;
@@ -309,7 +312,7 @@ static void _xfdashboard_scaled_table_layout_allocate(ClutterLayoutManager *self
clutter_actor_iter_init(&iter, CLUTTER_ACTOR(inContainer));
while(clutter_actor_iter_next(&iter, &child))
{
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get natural size of actor */
clutter_actor_get_preferred_size(child, NULL, NULL, &childWidth, &childHeight);
diff --git a/libxfdashboard/scrollbar.c b/libxfdashboard/scrollbar.c
index 9179248..9ac7f30 100644
--- a/libxfdashboard/scrollbar.c
+++ b/libxfdashboard/scrollbar.c
@@ -30,6 +30,8 @@
#include <glib/gi18n-lib.h>
#include <libxfdashboard/stylable.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardScrollbar,
diff --git a/libxfdashboard/search-manager.c b/libxfdashboard/search-manager.c
index e0433ad..7cb63ca 100644
--- a/libxfdashboard/search-manager.c
+++ b/libxfdashboard/search-manager.c
@@ -33,6 +33,8 @@
#include <libxfdashboard/search-provider.h>
#include <libxfdashboard/utils.h>
#include <libxfdashboard/marshal.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardSearchManager,
diff --git a/libxfdashboard/search-provider.c b/libxfdashboard/search-provider.c
index df08e60..ed9ffb9 100644
--- a/libxfdashboard/search-provider.c
+++ b/libxfdashboard/search-provider.c
@@ -31,6 +31,8 @@
#include <libxfdashboard/actor.h>
#include <libxfdashboard/text-box.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_ABSTRACT_TYPE(XfdashboardSearchProvider,
diff --git a/libxfdashboard/search-result-container.c b/libxfdashboard/search-result-container.c
index f3e22ce..89a13e8 100644
--- a/libxfdashboard/search-result-container.c
+++ b/libxfdashboard/search-result-container.c
@@ -41,6 +41,8 @@
#include <libxfdashboard/click-action.h>
#include <libxfdashboard/drag-action.h>
#include <libxfdashboard/marshal.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardSearchResultContainer,
diff --git a/libxfdashboard/search-result-set.c b/libxfdashboard/search-result-set.c
index f418070..f5fd1af 100644
--- a/libxfdashboard/search-result-set.c
+++ b/libxfdashboard/search-result-set.c
@@ -29,6 +29,9 @@
#include <glib/gi18n-lib.h>
+#include <libxfdashboard/compat.h>
+
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardSearchResultSet,
xfdashboard_search_result_set,
diff --git a/libxfdashboard/search-view.c b/libxfdashboard/search-view.c
index 7e7f41a..56cb5ae 100644
--- a/libxfdashboard/search-view.c
+++ b/libxfdashboard/search-view.c
@@ -37,6 +37,8 @@
#include <libxfdashboard/focus-manager.h>
#include <libxfdashboard/enums.h>
#include <libxfdashboard/application.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static void _xfdashboard_search_view_focusable_iface_init(XfdashboardFocusableInterface *iface);
diff --git a/libxfdashboard/stage-interface.c b/libxfdashboard/stage-interface.c
index 0864540..f53706f 100644
--- a/libxfdashboard/stage-interface.c
+++ b/libxfdashboard/stage-interface.c
@@ -32,6 +32,8 @@
#include <libxfdashboard/actor.h>
#include <libxfdashboard/enums.h>
#include <libxfdashboard/stage.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardStageInterface,
diff --git a/libxfdashboard/stage.c b/libxfdashboard/stage.c
index b34853e..ca21845 100644
--- a/libxfdashboard/stage.c
+++ b/libxfdashboard/stage.c
@@ -52,6 +52,8 @@
#include <libxfdashboard/window-tracker.h>
#include <libxfdashboard/window-content.h>
#include <libxfdashboard/stage-interface.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardStage,
diff --git a/libxfdashboard/stylable.c b/libxfdashboard/stylable.c
index ae7f1dd..e43d086 100644
--- a/libxfdashboard/stylable.c
+++ b/libxfdashboard/stylable.c
@@ -31,6 +31,8 @@
#include <glib/gi18n-lib.h>
#include <libxfdashboard/application.h>
+#include <libxfdashboard/compat.h>
+
/* Define this interface in GObject system */
G_DEFINE_INTERFACE(XfdashboardStylable,
diff --git a/libxfdashboard/text-box.c b/libxfdashboard/text-box.c
index b3d1160..231d37e 100644
--- a/libxfdashboard/text-box.c
+++ b/libxfdashboard/text-box.c
@@ -36,6 +36,8 @@
#include <libxfdashboard/stylable.h>
#include <libxfdashboard/focusable.h>
#include <libxfdashboard/focus-manager.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static void _xfdashboard_text_box_focusable_iface_init(XfdashboardFocusableInterface *iface);
@@ -320,7 +322,7 @@ static void _xfdashboard_text_box_get_preferred_width(ClutterActor *self,
minWidth=naturalWidth=0.0f;
/* Determine size of primary icon if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorPrimaryIcon))
+ if(clutter_actor_is_visible(priv->actorPrimaryIcon))
{
clutter_actor_get_preferred_width(CLUTTER_ACTOR(priv->actorPrimaryIcon),
inForHeight,
@@ -332,7 +334,7 @@ static void _xfdashboard_text_box_get_preferred_width(ClutterActor *self,
}
/* Determine size of editable text box if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorTextBox))
+ if(clutter_actor_is_visible(priv->actorTextBox))
{
clutter_actor_get_preferred_width(CLUTTER_ACTOR(priv->actorTextBox),
inForHeight,
@@ -344,7 +346,7 @@ static void _xfdashboard_text_box_get_preferred_width(ClutterActor *self,
}
/* Determine size of hint label if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorHintLabel))
+ if(clutter_actor_is_visible(priv->actorHintLabel))
{
clutter_actor_get_preferred_width(CLUTTER_ACTOR(priv->actorHintLabel),
inForHeight,
@@ -356,7 +358,7 @@ static void _xfdashboard_text_box_get_preferred_width(ClutterActor *self,
}
/* Determine size of secondary icon if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorSecondaryIcon))
+ if(clutter_actor_is_visible(priv->actorSecondaryIcon))
{
clutter_actor_get_preferred_width(CLUTTER_ACTOR(priv->actorSecondaryIcon),
inForHeight,
@@ -402,7 +404,7 @@ static void _xfdashboard_text_box_allocate(ClutterActor *self,
bottom=clutter_actor_box_get_height(inBox)-priv->padding;
/* Set allocation of primary icon if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorPrimaryIcon))
+ if(clutter_actor_is_visible(priv->actorPrimaryIcon))
{
gfloat childRight;
@@ -423,7 +425,7 @@ static void _xfdashboard_text_box_allocate(ClutterActor *self,
}
/* Set allocation of secondary icon if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorSecondaryIcon))
+ if(clutter_actor_is_visible(priv->actorSecondaryIcon))
{
gfloat childLeft;
@@ -444,7 +446,7 @@ static void _xfdashboard_text_box_allocate(ClutterActor *self,
}
/* Set allocation of editable text box if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorTextBox))
+ if(clutter_actor_is_visible(priv->actorTextBox))
{
gfloat textHeight;
@@ -460,7 +462,7 @@ static void _xfdashboard_text_box_allocate(ClutterActor *self,
}
/* Set allocation of hint label if visible */
- if(CLUTTER_ACTOR_IS_VISIBLE(priv->actorHintLabel))
+ if(clutter_actor_is_visible(priv->actorHintLabel))
{
gfloat textHeight;
diff --git a/libxfdashboard/theme-css.c b/libxfdashboard/theme-css.c
index 827bc5a..9cbdaa6 100644
--- a/libxfdashboard/theme-css.c
+++ b/libxfdashboard/theme-css.c
@@ -38,6 +38,8 @@
#include <libxfdashboard/stylable.h>
#include <libxfdashboard/css-selector.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardThemeCSS,
diff --git a/libxfdashboard/theme-effects.c b/libxfdashboard/theme-effects.c
index 229c4ad..5d7bad2 100644
--- a/libxfdashboard/theme-effects.c
+++ b/libxfdashboard/theme-effects.c
@@ -32,6 +32,8 @@
#include <gio/gio.h>
#include <libxfdashboard/utils.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardThemeEffects,
diff --git a/libxfdashboard/theme-layout.c b/libxfdashboard/theme-layout.c
index 1360ced..57a01a7 100644
--- a/libxfdashboard/theme-layout.c
+++ b/libxfdashboard/theme-layout.c
@@ -32,6 +32,8 @@
#include <gio/gio.h>
#include <libxfdashboard/utils.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardThemeLayout,
diff --git a/libxfdashboard/theme.c b/libxfdashboard/theme.c
index ccf46d8..3f8160c 100644
--- a/libxfdashboard/theme.c
+++ b/libxfdashboard/theme.c
@@ -32,6 +32,9 @@
#include <glib.h>
#include <gio/gio.h>
+#include <libxfdashboard/compat.h>
+
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardTheme,
xfdashboard_theme,
diff --git a/libxfdashboard/toggle-button.c b/libxfdashboard/toggle-button.c
index e41627e..a1dced0 100644
--- a/libxfdashboard/toggle-button.c
+++ b/libxfdashboard/toggle-button.c
@@ -30,6 +30,8 @@
#include <glib/gi18n-lib.h>
#include <libxfdashboard/stylable.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardToggleButton,
diff --git a/libxfdashboard/tooltip-action.c b/libxfdashboard/tooltip-action.c
index 19efd41..54a3471 100644
--- a/libxfdashboard/tooltip-action.c
+++ b/libxfdashboard/tooltip-action.c
@@ -33,6 +33,8 @@
#include <libxfdashboard/actor.h>
#include <libxfdashboard/stage.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardTooltipAction,
diff --git a/libxfdashboard/utils.c b/libxfdashboard/utils.c
index 75ecf29..5202828 100644
--- a/libxfdashboard/utils.c
+++ b/libxfdashboard/utils.c
@@ -36,6 +36,8 @@
#include <libxfdashboard/stage.h>
#include <libxfdashboard/stage-interface.h>
#include <libxfdashboard/window-tracker.h>
+#include <libxfdashboard/compat.h>
+
/**
* SECTION:utils
@@ -706,8 +708,8 @@ static void _xfdashboard_dump_actor_internal(ClutterActor *inActor, gint inLevel
clutter_actor_get_y(child),
clutter_actor_get_width(child),
clutter_actor_get_height(child),
- CLUTTER_ACTOR_IS_MAPPED(child) ? "yes" : "no",
- CLUTTER_ACTOR_IS_VISIBLE(child) ? "yes" : "no",
+ clutter_actor_is_mapped(child) ? "yes" : "no",
+ clutter_actor_is_visible(child) ? "yes" : "no",
clutter_actor_get_n_children(child));
if(clutter_actor_get_n_children(child)>0) _xfdashboard_dump_actor_internal(child, inLevel+1);
}
diff --git a/libxfdashboard/view-manager.c b/libxfdashboard/view-manager.c
index 05c5a36..363517a 100644
--- a/libxfdashboard/view-manager.c
+++ b/libxfdashboard/view-manager.c
@@ -31,6 +31,8 @@
#include <libxfdashboard/view.h>
#include <libxfdashboard/utils.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardViewManager,
diff --git a/libxfdashboard/view-selector.c b/libxfdashboard/view-selector.c
index d140e01..fc9c1a6 100644
--- a/libxfdashboard/view-selector.c
+++ b/libxfdashboard/view-selector.c
@@ -47,6 +47,8 @@
#include <libxfdashboard/view.h>
#include <libxfdashboard/tooltip-action.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardViewSelector,
diff --git a/libxfdashboard/view.c b/libxfdashboard/view.c
index 684fc8f..20d2c8a 100644
--- a/libxfdashboard/view.c
+++ b/libxfdashboard/view.c
@@ -36,6 +36,8 @@
#include <libxfdashboard/focus-manager.h>
#include <libxfdashboard/viewpad.h>
#include <libxfdashboard/enums.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_ABSTRACT_TYPE(XfdashboardView,
diff --git a/libxfdashboard/viewpad.c b/libxfdashboard/viewpad.c
index f4ec016..d7cac16 100644
--- a/libxfdashboard/viewpad.c
+++ b/libxfdashboard/viewpad.c
@@ -37,6 +37,8 @@
#include <libxfdashboard/utils.h>
#include <libxfdashboard/focusable.h>
#include <libxfdashboard/focus-manager.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static void _xfdashboard_viewpad_focusable_iface_init(XfdashboardFocusableInterface *iface);
@@ -212,7 +214,7 @@ static void _xfdashboard_viewpad_update_scrollbars(XfdashboardViewpad *self)
* same allocation again in an unkindly way to force a recalculation
* if scroll bars needed to shown (or hidden what is unlikely)
*/
- if(CLUTTER_ACTOR_IS_VISIBLE(self) &&
+ if(clutter_actor_is_visible(CLUTTER_ACTOR(self)) &&
(priv->hScrollbarPolicy==XFDASHBOARD_VISIBILITY_POLICY_AUTOMATIC ||
priv->vScrollbarPolicy==XFDASHBOARD_VISIBILITY_POLICY_AUTOMATIC))
{
diff --git a/libxfdashboard/window-content.c b/libxfdashboard/window-content.c
index 99eec9e..9360f68 100644
--- a/libxfdashboard/window-content.c
+++ b/libxfdashboard/window-content.c
@@ -46,6 +46,8 @@
#include <libxfdashboard/stylable.h>
#include <libxfdashboard/window-tracker.h>
#include <libxfdashboard/enums.h>
+#include <libxfdashboard/compat.h>
+
/* Definitions */
typedef enum /*< skip,prefix=XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE >*/
diff --git a/libxfdashboard/window-tracker-monitor.c b/libxfdashboard/window-tracker-monitor.c
index 889264e..bc4d796 100644
--- a/libxfdashboard/window-tracker-monitor.c
+++ b/libxfdashboard/window-tracker-monitor.c
@@ -33,6 +33,9 @@
#include <glib/gi18n-lib.h>
#include <gdk/gdkx.h>
+#include <libxfdashboard/compat.h>
+
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardWindowTrackerMonitor,
xfdashboard_window_tracker_monitor,
diff --git a/libxfdashboard/window-tracker-window.c b/libxfdashboard/window-tracker-window.c
index d8d5bfa..0f9ca10 100644
--- a/libxfdashboard/window-tracker-window.c
+++ b/libxfdashboard/window-tracker-window.c
@@ -45,6 +45,8 @@
#include <libxfdashboard/window-tracker.h>
#include <libxfdashboard/marshal.h>
+#include <libxfdashboard/compat.h>
+
/* Usually we would define a class in GObject system here but
* this class is a wrapper around WnckWindow to create a virtual stable
diff --git a/libxfdashboard/window-tracker-workspace.c b/libxfdashboard/window-tracker-workspace.c
index 23ce989..fafdbee 100644
--- a/libxfdashboard/window-tracker-workspace.c
+++ b/libxfdashboard/window-tracker-workspace.c
@@ -40,6 +40,8 @@
#include <libxfdashboard/window-tracker.h>
#include <libxfdashboard/marshal.h>
+#include <libxfdashboard/compat.h>
+
/* Usually we found define a class in GObject system here but
* this class is a wrapper around WnckWorkspace to create a virtual stable
diff --git a/libxfdashboard/window-tracker.c b/libxfdashboard/window-tracker.c
index 46482ee..7275db5 100644
--- a/libxfdashboard/window-tracker.c
+++ b/libxfdashboard/window-tracker.c
@@ -46,6 +46,8 @@
#include <libxfdashboard/marshal.h>
#include <libxfdashboard/application.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardWindowTracker,
diff --git a/libxfdashboard/windows-view.c b/libxfdashboard/windows-view.c
index f1e9a88..6deae0c 100644
--- a/libxfdashboard/windows-view.c
+++ b/libxfdashboard/windows-view.c
@@ -44,6 +44,7 @@
#include <libxfdashboard/marshal.h>
#include <libxfdashboard/enums.h>
#include <libxfdashboard/stage-interface.h>
+#include <libxfdashboard/compat.h>
/* Define this class in GObject system */
diff --git a/libxfdashboard/workspace-selector.c b/libxfdashboard/workspace-selector.c
index b1df194..b5ebcd0 100644
--- a/libxfdashboard/workspace-selector.c
+++ b/libxfdashboard/workspace-selector.c
@@ -42,6 +42,8 @@
#include <libxfdashboard/stylable.h>
#include <libxfdashboard/focusable.h>
#include <libxfdashboard/stage-interface.h>
+#include <libxfdashboard/compat.h>
+
/* Define this class in GObject system */
static void _xfdashboard_workspace_selector_focusable_iface_init(XfdashboardFocusableInterface *iface);
@@ -563,7 +565,7 @@ static void _xfdashboard_workspace_selector_get_preferred_height(ClutterActor *i
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(CLUTTER_ACTOR_IS_VISIBLE(child)) numberChildren++;
+ if(clutter_actor_is_visible(child)) numberChildren++;
}
/* All workspace actors should have the same size because they
@@ -584,7 +586,7 @@ static void _xfdashboard_workspace_selector_get_preferred_height(ClutterActor *i
while(clutter_actor_iter_next(&iter, &child))
{
/* Only handle visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get child's size */
_xfdashboard_workspace_selector_get_preferred_height_for_child(self,
@@ -621,7 +623,7 @@ static void _xfdashboard_workspace_selector_get_preferred_height(ClutterActor *i
while(clutter_actor_iter_next(&iter, &child))
{
/* Only handle visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get child's size */
_xfdashboard_workspace_selector_get_preferred_height_for_child(self,
@@ -681,7 +683,7 @@ static void _xfdashboard_workspace_selector_get_preferred_width(ClutterActor *in
while(clutter_actor_iter_next(&iter, &child))
{
/* Only handle visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get child's size */
_xfdashboard_workspace_selector_get_preferred_width_for_child(self,
@@ -717,7 +719,7 @@ static void _xfdashboard_workspace_selector_get_preferred_width(ClutterActor *in
while(clutter_actor_iter_next(&iter, &child))
{
/* Only check visible children */
- if(CLUTTER_ACTOR_IS_VISIBLE(child)) numberChildren++;
+ if(clutter_actor_is_visible(child)) numberChildren++;
}
/* All workspace actors should have the same size because they
@@ -738,7 +740,7 @@ static void _xfdashboard_workspace_selector_get_preferred_width(ClutterActor *in
while(clutter_actor_iter_next(&iter, &child))
{
/* Only handle visible children */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Get child's size */
_xfdashboard_workspace_selector_get_preferred_width_for_child(self,
@@ -794,7 +796,7 @@ static void _xfdashboard_workspace_selector_allocate(ClutterActor *inActor,
while(clutter_actor_iter_next(&iter, &child))
{
/* Is child visible? */
- if(!CLUTTER_ACTOR_IS_VISIBLE(child)) continue;
+ if(!clutter_actor_is_visible(child)) continue;
/* Calculate new position and size of child */
if(priv->orientation==CLUTTER_ORIENTATION_HORIZONTAL)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list