[Xfce4-commits] [apps/xfdashboard] 01/10: Allow usage of GIcons at XfdashboardButton
noreply at xfce.org
noreply at xfce.org
Wed Jan 6 16:31:35 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 1cbdcb627b3210e95f8884a05ed9f7c765958d14
Author: Stephan Haller <nomad at froevel.de>
Date: Wed Jan 6 12:29:45 2016 +0100
Allow usage of GIcons at XfdashboardButton
---
xfdashboard/application-button.c | 21 +---
xfdashboard/applications-view.c | 8 +-
xfdashboard/button.c | 256 +++++++++++++++++++++++++++++++-------
xfdashboard/button.h | 13 +-
xfdashboard/text-box.c | 4 +-
xfdashboard/view-selector.c | 2 +-
6 files changed, 231 insertions(+), 73 deletions(-)
diff --git a/xfdashboard/application-button.c b/xfdashboard/application-button.c
index 3b3a268..451abeb 100644
--- a/xfdashboard/application-button.c
+++ b/xfdashboard/application-button.c
@@ -125,33 +125,24 @@ static void _xfdashboard_application_button_update_text(XfdashboardApplicationBu
static void _xfdashboard_application_button_update_icon(XfdashboardApplicationButton *self)
{
XfdashboardApplicationButtonPrivate *priv;
- gchar *iconName;
+ GIcon *gicon;
g_return_if_fail(XFDASHBOARD_IS_APPLICATION_BUTTON(self));
priv=self->priv;
- iconName=NULL;
+ gicon=NULL;
- /* Get icon */
+ /* Get icon and set up button icon*/
if(priv->appInfo)
{
- GIcon *gicon;
-
gicon=g_app_info_get_icon(G_APP_INFO(priv->appInfo));
- if(gicon)
- {
- iconName=g_icon_to_string(gicon);
- g_object_unref(gicon);
- }
}
- if(!iconName) iconName=g_strdup("image-missing");
-
- /* Set up button and release allocated resources */
- if(iconName) xfdashboard_button_set_icon(XFDASHBOARD_BUTTON(self), iconName);
+ if(gicon) xfdashboard_button_set_gicon(XFDASHBOARD_BUTTON(self), gicon);
+ else xfdashboard_button_set_icon_name(XFDASHBOARD_BUTTON(self), "image-missing");
/* Release allocated resources */
- if(iconName) g_free(iconName);
+ if(gicon) g_object_unref(gicon);
}
/* Update running state of button actor */
diff --git a/xfdashboard/applications-view.c b/xfdashboard/applications-view.c
index a9b719a..c3ea0cb 100644
--- a/xfdashboard/applications-view.c
+++ b/xfdashboard/applications-view.c
@@ -351,7 +351,7 @@ static void _xfdashboard_applications_view_on_all_applications_menu_clicked(Xfda
/* Create parent menu item */
actor=xfdashboard_button_new();
- if(priv->parentMenuIcon) xfdashboard_button_set_icon(XFDASHBOARD_BUTTON(actor), priv->parentMenuIcon);
+ if(priv->parentMenuIcon) xfdashboard_button_set_icon_name(XFDASHBOARD_BUTTON(actor), priv->parentMenuIcon);
if(priv->viewMode==XFDASHBOARD_VIEW_MODE_LIST) actorText=g_markup_printf_escaped(priv->formatTitleDescription, _("Back"), _("Go back to previous menu"));
else actorText=g_markup_printf_escaped(priv->formatTitleOnly, _("Back"));
@@ -465,7 +465,7 @@ static void _xfdashboard_applications_view_on_filter_changed(XfdashboardApplicat
/* Create and adjust of "parent menu" button to application buttons */
actor=xfdashboard_button_new();
- if(priv->parentMenuIcon) xfdashboard_button_set_icon(XFDASHBOARD_BUTTON(actor), priv->parentMenuIcon);
+ if(priv->parentMenuIcon) xfdashboard_button_set_icon_name(XFDASHBOARD_BUTTON(actor), priv->parentMenuIcon);
if(priv->viewMode==XFDASHBOARD_VIEW_MODE_LIST) actorText=g_markup_printf_escaped(priv->formatTitleDescription, _("Back"), _("Go back to previous menu"));
else actorText=g_markup_printf_escaped(priv->formatTitleOnly, _("Back"));
@@ -497,7 +497,7 @@ static void _xfdashboard_applications_view_on_filter_changed(XfdashboardApplicat
/* Create and adjust of "parent menu" button to application buttons */
actor=xfdashboard_button_new();
- xfdashboard_button_set_icon(XFDASHBOARD_BUTTON(actor), ALL_APPLICATIONS_MENU_ICON);
+ xfdashboard_button_set_icon_name(XFDASHBOARD_BUTTON(actor), ALL_APPLICATIONS_MENU_ICON);
if(priv->viewMode==XFDASHBOARD_VIEW_MODE_LIST) actorText=g_markup_printf_escaped(priv->formatTitleDescription, _("All applications"), _("List of all installed applications"));
else actorText=g_markup_printf_escaped(priv->formatTitleOnly, _("All applications"));
@@ -554,7 +554,7 @@ static void _xfdashboard_applications_view_on_filter_changed(XfdashboardApplicat
actor=xfdashboard_button_new();
iconName=garcon_menu_element_get_icon_name(menuElement);
- if(iconName) xfdashboard_button_set_icon(XFDASHBOARD_BUTTON(actor), iconName);
+ if(iconName) xfdashboard_button_set_icon_name(XFDASHBOARD_BUTTON(actor), iconName);
if(priv->viewMode==XFDASHBOARD_VIEW_MODE_LIST)
{
diff --git a/xfdashboard/button.c b/xfdashboard/button.c
index 4e34fc0..1f1b32e 100644
--- a/xfdashboard/button.c
+++ b/xfdashboard/button.c
@@ -36,6 +36,15 @@
#include "click-action.h"
#include "image-content.h"
+/* Forward declarations */
+typedef enum
+{
+ XFDASHBOARD_BUTTON_ICON_TYPE_ICON_NONE,
+ XFDASHBOARD_BUTTON_ICON_TYPE_ICON_NAME,
+ XFDASHBOARD_BUTTON_ICON_TYPE_ICON_IMAGE,
+ XFDASHBOARD_BUTTON_ICON_TYPE_ICON_GICON
+} XfdashboardButtonIconType;
+
/* Define this class in GObject system */
G_DEFINE_TYPE(XfdashboardButton,
xfdashboard_button,
@@ -48,28 +57,30 @@ G_DEFINE_TYPE(XfdashboardButton,
struct _XfdashboardButtonPrivate
{
/* Properties related */
- gfloat padding;
- gfloat spacing;
- XfdashboardButtonStyle style;
-
- gchar *iconName;
- ClutterImage *iconImage;
- gboolean iconSyncSize;
- gint iconSize;
- XfdashboardOrientation iconOrientation;
-
- gchar *font;
- ClutterColor *labelColor;
- PangoEllipsizeMode labelEllipsize;
- gboolean isSingleLineMode;
- PangoAlignment textJustification;
+ gfloat padding;
+ gfloat spacing;
+ XfdashboardButtonStyle style;
+
+ gchar *iconName;
+ ClutterImage *iconImage;
+ GIcon *iconGIcon;
+ gboolean iconSyncSize;
+ gint iconSize;
+ XfdashboardOrientation iconOrientation;
+
+ gchar *font;
+ ClutterColor *labelColor;
+ PangoEllipsizeMode labelEllipsize;
+ gboolean isSingleLineMode;
+ PangoAlignment textJustification;
/* Instance related */
- ClutterActor *actorIcon;
- ClutterText *actorLabel;
- ClutterAction *clickAction;
+ ClutterActor *actorIcon;
+ ClutterText *actorLabel;
+ ClutterAction *clickAction;
- gboolean iconNameLoaded;
+ gboolean iconLoaded;
+ XfdashboardButtonIconType iconType;
};
/* Properties */
@@ -83,6 +94,7 @@ enum
PROP_ICON_NAME,
PROP_ICON_IMAGE,
+ PROP_ICON_GICON,
PROP_ICON_SYNC_SIZE,
PROP_ICON_SIZE,
PROP_ICON_ORIENTATION,
@@ -653,22 +665,41 @@ static void _xfdashboard_button_on_mapped_changed(XfdashboardButton *self,
* loaded yet then set icon image now
*/
if(CLUTTER_ACTOR_IS_MAPPED(self) &&
- priv->iconNameLoaded==FALSE &&
- priv->iconName)
+ priv->iconLoaded==FALSE)
{
- ClutterContent *image;
+ if(priv->iconType==XFDASHBOARD_BUTTON_ICON_TYPE_ICON_NAME)
+ {
+ ClutterContent *image;
- /* Set icon image */
- image=xfdashboard_image_content_new_for_icon_name(priv->iconName, priv->iconSize);
- clutter_actor_set_content(priv->actorIcon, image);
- g_object_unref(image);
+ /* Set icon image */
+ image=xfdashboard_image_content_new_for_icon_name(priv->iconName, priv->iconSize);
+ clutter_actor_set_content(priv->actorIcon, image);
+ g_object_unref(image);
- priv->iconNameLoaded=TRUE;
+ priv->iconLoaded=TRUE;
- /* Calculate icon size as image content is now available */
- _xfdashboard_button_update_icon_image_size(self);
+ /* Calculate icon size as image content is now available */
+ _xfdashboard_button_update_icon_image_size(self);
+
+ g_debug("Loaded and set deferred image '%s' at size %d for %s@%p ", priv->iconName, priv->iconSize, G_OBJECT_TYPE_NAME(self), self);
+ }
+
+ if(priv->iconType==XFDASHBOARD_BUTTON_ICON_TYPE_ICON_GICON)
+ {
+ ClutterContent *image;
+
+ /* Set icon image */
+ image=xfdashboard_image_content_new_for_gicon(priv->iconGIcon, priv->iconSize);
+ clutter_actor_set_content(priv->actorIcon, image);
+ g_object_unref(image);
- g_debug("Loaded and set deferred image '%s' at size %d for %s@%p ", priv->iconName, priv->iconSize, G_OBJECT_TYPE_NAME(self), self);
+ priv->iconLoaded=TRUE;
+
+ /* Calculate icon size as image content is now available */
+ _xfdashboard_button_update_icon_image_size(self);
+
+ g_debug("Loaded and set deferred image '%s' at size %d for %s@%p ", priv->iconName, priv->iconSize, G_OBJECT_TYPE_NAME(self), self);
+ }
}
}
@@ -1123,7 +1154,11 @@ static void _xfdashboard_button_set_property(GObject *inObject,
break;
case PROP_ICON_NAME:
- xfdashboard_button_set_icon(self, g_value_get_string(inValue));
+ xfdashboard_button_set_icon_name(self, g_value_get_string(inValue));
+ break;
+
+ case PROP_ICON_GICON:
+ xfdashboard_button_set_gicon(self, G_ICON(g_value_get_object(inValue)));
break;
case PROP_ICON_IMAGE:
@@ -1198,6 +1233,10 @@ static void _xfdashboard_button_get_property(GObject *inObject,
g_value_set_string(outValue, priv->iconName);
break;
+ case PROP_ICON_GICON:
+ g_value_set_object(outValue, priv->iconGIcon);
+ break;
+
case PROP_ICON_IMAGE:
g_value_set_object(outValue, priv->iconImage);
break;
@@ -1301,6 +1340,13 @@ static void xfdashboard_button_class_init(XfdashboardButtonClass *klass)
N_(""),
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ XfdashboardButtonProperties[PROP_ICON_GICON]=
+ g_param_spec_object("icon-gicon",
+ _("Icon GIcon"),
+ _("The GIcon of icon"),
+ G_TYPE_ICON,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
XfdashboardButtonProperties[PROP_ICON_IMAGE]=
g_param_spec_object("icon-image",
_("Icon image"),
@@ -1431,6 +1477,7 @@ static void xfdashboard_button_init(XfdashboardButton *self)
priv->labelColor=NULL;
priv->labelEllipsize=-1;
priv->isSingleLineMode=TRUE;
+ priv->iconType=XFDASHBOARD_BUTTON_ICON_TYPE_ICON_NONE;
/* Create actors */
priv->actorIcon=clutter_actor_new();
@@ -1471,7 +1518,7 @@ ClutterActor* xfdashboard_button_new_with_text(const gchar *inText)
NULL));
}
-ClutterActor* xfdashboard_button_new_with_icon(const gchar *inIconName)
+ClutterActor* xfdashboard_button_new_with_icon_name(const gchar *inIconName)
{
return(g_object_new(XFDASHBOARD_TYPE_BUTTON,
"icon-name", inIconName,
@@ -1479,7 +1526,15 @@ ClutterActor* xfdashboard_button_new_with_icon(const gchar *inIconName)
NULL));
}
-ClutterActor* xfdashboard_button_new_full(const gchar *inIconName, const gchar *inText)
+ClutterActor* xfdashboard_button_new_with_gicon(GIcon *inIcon)
+{
+ return(g_object_new(XFDASHBOARD_TYPE_BUTTON,
+ "icon-gicon", inIcon,
+ "button-style", XFDASHBOARD_BUTTON_STYLE_ICON,
+ NULL));
+}
+
+ClutterActor* xfdashboard_button_new_full_with_icon_name(const gchar *inIconName, const gchar *inText)
{
return(g_object_new(XFDASHBOARD_TYPE_BUTTON,
"text", inText,
@@ -1488,6 +1543,15 @@ ClutterActor* xfdashboard_button_new_full(const gchar *inIconName, const gchar *
NULL));
}
+ClutterActor* xfdashboard_button_new_full_with_gicon(GIcon *inIcon, const gchar *inText)
+{
+ return(g_object_new(XFDASHBOARD_TYPE_BUTTON,
+ "text", inText,
+ "icon-gicon", inIcon,
+ "button-style", XFDASHBOARD_BUTTON_STYLE_BOTH,
+ NULL));
+}
+
/* Get/set padding of background to text and icon actors */
gfloat xfdashboard_button_get_padding(XfdashboardButton *self)
{
@@ -1594,14 +1658,14 @@ void xfdashboard_button_set_style(XfdashboardButton *self, const XfdashboardButt
}
/* Get/set icon */
-const gchar* xfdashboard_button_get_icon(XfdashboardButton *self)
+const gchar* xfdashboard_button_get_icon_name(XfdashboardButton *self)
{
g_return_val_if_fail(XFDASHBOARD_IS_BUTTON(self), NULL);
return(self->priv->iconName);
}
-void xfdashboard_button_set_icon(XfdashboardButton *self, const gchar *inIconName)
+void xfdashboard_button_set_icon_name(XfdashboardButton *self, const gchar *inIconName)
{
XfdashboardButtonPrivate *priv;
ClutterContent *image;
@@ -1612,20 +1676,31 @@ void xfdashboard_button_set_icon(XfdashboardButton *self, const gchar *inIconNam
priv=self->priv;
/* Set value if changed */
- if(priv->iconImage || g_strcmp0(priv->iconName, inIconName)!=0)
+ if(priv->iconType!=XFDASHBOARD_BUTTON_ICON_TYPE_ICON_NAME ||
+ g_strcmp0(priv->iconName, inIconName)!=0)
{
/* Set value */
- if(priv->iconName) g_free(priv->iconName);
- priv->iconName=g_strdup(inIconName);
- priv->iconNameLoaded=FALSE;
+ if(priv->iconName)
+ {
+ g_free(priv->iconName);
+ priv->iconName=NULL;
+ }
+
+ if(priv->iconGIcon)
+ {
+ g_object_unref(priv->iconGIcon);
+ priv->iconGIcon=NULL;
+ }
if(priv->iconImage)
{
- clutter_actor_set_content(priv->actorIcon, NULL);
g_object_unref(priv->iconImage);
priv->iconImage=NULL;
}
+ priv->iconName=g_strdup(inIconName);
+ priv->iconLoaded=FALSE;
+
if(CLUTTER_ACTOR_IS_MAPPED(self))
{
/* Actor is mapped so we cannot defer loading and setting image */
@@ -1633,16 +1708,82 @@ void xfdashboard_button_set_icon(XfdashboardButton *self, const gchar *inIconNam
clutter_actor_set_content(priv->actorIcon, image);
g_object_unref(image);
- priv->iconNameLoaded=TRUE;
+ priv->iconLoaded=TRUE;
}
+ else clutter_actor_set_content(priv->actorIcon, NULL);
_xfdashboard_button_update_icon_image_size(self);
+ priv->iconType=XFDASHBOARD_BUTTON_ICON_TYPE_ICON_NAME;
+
/* Notify about property change */
g_object_notify_by_pspec(G_OBJECT(self), XfdashboardButtonProperties[PROP_ICON_NAME]);
}
}
+GIcon* xfdashboard_button_get_gicon(XfdashboardButton *self)
+{
+ g_return_val_if_fail(XFDASHBOARD_IS_BUTTON(self), NULL);
+
+ return(self->priv->iconGIcon);
+}
+
+void xfdashboard_button_set_gicon(XfdashboardButton *self, GIcon *inIcon)
+{
+ XfdashboardButtonPrivate *priv;
+ ClutterContent *image;
+
+ g_return_if_fail(XFDASHBOARD_IS_BUTTON(self));
+ g_return_if_fail(G_IS_ICON(inIcon));
+
+ priv=self->priv;
+
+ /* Set value if changed */
+ if(priv->iconType!=XFDASHBOARD_BUTTON_ICON_TYPE_ICON_GICON ||
+ !g_icon_equal(priv->iconGIcon, inIcon))
+ {
+ /* Set value */
+ if(priv->iconName)
+ {
+ g_free(priv->iconName);
+ priv->iconName=NULL;
+ }
+
+ if(priv->iconGIcon)
+ {
+ g_object_unref(priv->iconGIcon);
+ priv->iconGIcon=NULL;
+ }
+
+ if(priv->iconImage)
+ {
+ g_object_unref(priv->iconImage);
+ priv->iconImage=NULL;
+ }
+
+ priv->iconGIcon=G_ICON(g_object_ref(inIcon));
+ priv->iconLoaded=FALSE;
+
+ if(CLUTTER_ACTOR_IS_MAPPED(self))
+ {
+ /* Actor is mapped so we cannot defer loading and setting image */
+ image=xfdashboard_image_content_new_for_gicon(priv->iconGIcon, priv->iconSize);
+ clutter_actor_set_content(priv->actorIcon, image);
+ g_object_unref(image);
+
+ priv->iconLoaded=TRUE;
+ }
+ else clutter_actor_set_content(priv->actorIcon, NULL);
+
+ _xfdashboard_button_update_icon_image_size(self);
+
+ priv->iconType=XFDASHBOARD_BUTTON_ICON_TYPE_ICON_GICON;
+
+ /* Notify about property change */
+ g_object_notify_by_pspec(G_OBJECT(self), XfdashboardButtonProperties[PROP_ICON_GICON]);
+ }
+}
+
ClutterImage* xfdashboard_button_get_icon_image(XfdashboardButton *self)
{
g_return_val_if_fail(XFDASHBOARD_IS_BUTTON(self), NULL);
@@ -1660,24 +1801,36 @@ void xfdashboard_button_set_icon_image(XfdashboardButton *self, ClutterImage *in
priv=self->priv;
/* Set value if changed */
- if(priv->iconName || inIconImage!=priv->iconImage)
+ if(priv->iconType!=XFDASHBOARD_BUTTON_ICON_TYPE_ICON_IMAGE ||
+ inIconImage!=priv->iconImage)
{
/* Set value */
- if(priv->iconName) g_free(priv->iconName);
- priv->iconName=NULL;
- priv->iconNameLoaded=FALSE;
+ if(priv->iconName)
+ {
+ g_free(priv->iconName);
+ priv->iconName=NULL;
+ }
+
+ if(priv->iconGIcon)
+ {
+ g_object_unref(priv->iconGIcon);
+ priv->iconGIcon=NULL;
+ }
if(priv->iconImage)
{
- clutter_actor_set_content(CLUTTER_ACTOR(priv->actorIcon), NULL);
g_object_unref(priv->iconImage);
+ priv->iconImage=NULL;
}
priv->iconImage=g_object_ref(inIconImage);
+ priv->iconLoaded=TRUE;
clutter_actor_set_content(priv->actorIcon, CLUTTER_CONTENT(priv->iconImage));
_xfdashboard_button_update_icon_image_size(self);
+ priv->iconType=XFDASHBOARD_BUTTON_ICON_TYPE_ICON_IMAGE;
+
/* Notify about property change */
g_object_notify_by_pspec(G_OBJECT(self), XfdashboardButtonProperties[PROP_ICON_IMAGE]);
}
@@ -1706,7 +1859,7 @@ void xfdashboard_button_set_icon_size(XfdashboardButton *self, gint inSize)
/* Set value */
priv->iconSize=inSize;
- if(priv->iconName)
+ if(priv->iconType==XFDASHBOARD_BUTTON_ICON_TYPE_ICON_NAME)
{
ClutterContent *image;
@@ -1715,6 +1868,15 @@ void xfdashboard_button_set_icon_size(XfdashboardButton *self, gint inSize)
g_object_unref(image);
}
+ if(priv->iconType==XFDASHBOARD_BUTTON_ICON_TYPE_ICON_GICON)
+ {
+ ClutterContent *image;
+
+ image=xfdashboard_image_content_new_for_gicon(priv->iconGIcon, priv->iconSize);
+ clutter_actor_set_content(priv->actorIcon, image);
+ g_object_unref(image);
+ }
+
_xfdashboard_button_update_icon_image_size(self);
/* Notify about property change */
diff --git a/xfdashboard/button.h b/xfdashboard/button.h
index bfcdf2d..c61e1f4 100644
--- a/xfdashboard/button.h
+++ b/xfdashboard/button.h
@@ -86,8 +86,10 @@ GType xfdashboard_button_get_type(void) G_GNUC_CONST;
ClutterActor* xfdashboard_button_new(void);
ClutterActor* xfdashboard_button_new_with_text(const gchar *inText);
-ClutterActor* xfdashboard_button_new_with_icon(const gchar *inIconName);
-ClutterActor* xfdashboard_button_new_full(const gchar *inIconName, const gchar *inText);
+ClutterActor* xfdashboard_button_new_with_icon_name(const gchar *inIconName);
+ClutterActor* xfdashboard_button_new_with_gicon(GIcon *inIcon);
+ClutterActor* xfdashboard_button_new_full_with_icon_name(const gchar *inIconName, const gchar *inText);
+ClutterActor* xfdashboard_button_new_full_with_gicon(GIcon *inIcon, const gchar *inText);
/* General functions */
gfloat xfdashboard_button_get_padding(XfdashboardButton *self);
@@ -100,8 +102,11 @@ XfdashboardButtonStyle xfdashboard_button_get_style(XfdashboardButton *self);
void xfdashboard_button_set_style(XfdashboardButton *self, const XfdashboardButtonStyle inStyle);
/* Icon functions */
-const gchar* xfdashboard_button_get_icon(XfdashboardButton *self);
-void xfdashboard_button_set_icon(XfdashboardButton *self, const gchar *inIconName);
+const gchar* xfdashboard_button_get_icon_name(XfdashboardButton *self);
+void xfdashboard_button_set_icon_name(XfdashboardButton *self, const gchar *inIconName);
+
+GIcon* xfdashboard_button_get_gicon(XfdashboardButton *self);
+void xfdashboard_button_set_gicon(XfdashboardButton *self, GIcon *inIcon);
ClutterImage* xfdashboard_button_get_icon_image(XfdashboardButton *self);
void xfdashboard_button_set_icon_image(XfdashboardButton *self, ClutterImage *inIconImage);
diff --git a/xfdashboard/text-box.c b/xfdashboard/text-box.c
index 666d56e..acf56d4 100644
--- a/xfdashboard/text-box.c
+++ b/xfdashboard/text-box.c
@@ -1572,7 +1572,7 @@ void xfdashboard_text_box_set_primary_icon(XfdashboardTextBox *self, const gchar
{
/* Load and set new icon */
priv->primaryIconName=g_strdup(inIconName);
- xfdashboard_button_set_icon(XFDASHBOARD_BUTTON(priv->actorPrimaryIcon), priv->primaryIconName);
+ xfdashboard_button_set_icon_name(XFDASHBOARD_BUTTON(priv->actorPrimaryIcon), priv->primaryIconName);
/* Show icon */
priv->showPrimaryIcon=TRUE;
@@ -1623,7 +1623,7 @@ void xfdashboard_text_box_set_secondary_icon(XfdashboardTextBox *self, const gch
{
/* Load and set new icon */
priv->secondaryIconName=g_strdup(inIconName);
- xfdashboard_button_set_icon(XFDASHBOARD_BUTTON(priv->actorSecondaryIcon), priv->secondaryIconName);
+ xfdashboard_button_set_icon_name(XFDASHBOARD_BUTTON(priv->actorSecondaryIcon), priv->secondaryIconName);
/* Show icon */
priv->showSecondaryIcon=TRUE;
diff --git a/xfdashboard/view-selector.c b/xfdashboard/view-selector.c
index ac27c3b..651b775 100644
--- a/xfdashboard/view-selector.c
+++ b/xfdashboard/view-selector.c
@@ -170,7 +170,7 @@ static void _xfdashboard_view_selector_on_view_icon_changed(XfdashboardView *inV
g_return_if_fail(XFDASHBOARD_IS_TOGGLE_BUTTON(inUserData));
button=XFDASHBOARD_BUTTON(inUserData);
- xfdashboard_button_set_icon(button, xfdashboard_view_get_icon(inView));
+ xfdashboard_button_set_icon_name(button, xfdashboard_view_get_icon(inView));
}
/* Called when the name of a view has changed */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list