[Xfce4-commits] [apps/xfdashboard] 02/02: Remove functions xfdashboard_live_workspace_get_show_window_content() and xfdashboard_live_workspace_set_show_window_content() from XfdashboardLiveWorkspace because it needed to be themed before via 'show-window-content' property and can now be themed via 'display-type' property of XfdashboardLiveWindowSimple.
noreply at xfce.org
noreply at xfce.org
Mon Jan 23 18:45:33 CET 2017
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit 53dcfd77b59eeb4bc71d87c0b4c0632206e75256
Author: Stephan Haller <nomad at froevel.de>
Date: Mon Jan 23 18:42:08 2017 +0100
Remove functions xfdashboard_live_workspace_get_show_window_content() and xfdashboard_live_workspace_set_show_window_content() from XfdashboardLiveWorkspace because it needed to be themed before via 'show-window-content' property and can now be themed via 'display-type' property of XfdashboardLiveWindowSimple.
Just replace the following CSS:
XfdashboardLiveWorkspace
{
show-window-content: <true or false>;
}
with
XfdashboardLiveWorkspace XfdashboardLiveWindowSimple
{
display-type: <icon or live-preview>;
}
---
libxfdashboard/live-workspace.c | 67 -----------------------------------------
libxfdashboard/live-workspace.h | 3 --
2 files changed, 70 deletions(-)
diff --git a/libxfdashboard/live-workspace.c b/libxfdashboard/live-workspace.c
index 08a150c..2417867 100644
--- a/libxfdashboard/live-workspace.c
+++ b/libxfdashboard/live-workspace.c
@@ -54,7 +54,6 @@ struct _XfdashboardLiveWorkspacePrivate
/* Properties related */
XfdashboardWindowTrackerWorkspace *workspace;
XfdashboardWindowTrackerMonitor *monitor;
- gboolean showWindowContent;
XfdashboardStageBackgroundImageType backgroundType;
gboolean showWorkspaceName;
gfloat workspaceNamePadding;
@@ -72,7 +71,6 @@ enum
PROP_WORKSPACE,
PROP_MONITOR,
- PROP_SHOW_WINDOW_CONTENT,
PROP_BACKGROUND_IMAGE_TYPE,
PROP_SHOW_WORKSPACE_NAME,
PROP_WORKSPACE_NAME_PADDING,
@@ -198,7 +196,6 @@ static ClutterActor* _xfdashboard_live_workspace_create_and_add_window_actor(Xfd
{
/* Create actor */
actor=xfdashboard_live_window_simple_new_for_window(inWindow);
- if(!priv->showWindowContent) xfdashboard_live_window_simple_set_display_type(actor, XFDASHBOARD_LIVE_WINDOW_SIMPLE_DISPLAY_TYPE_ICON);
/* Add new actor at right stacking position */
if(lastWindowActor) clutter_actor_insert_child_above(CLUTTER_ACTOR(self), actor, lastWindowActor);
@@ -735,10 +732,6 @@ static void _xfdashboard_live_workspace_set_property(GObject *inObject,
xfdashboard_live_workspace_set_monitor(self, g_value_get_object(inValue));
break;
- case PROP_SHOW_WINDOW_CONTENT:
- xfdashboard_live_workspace_set_show_window_content(self, g_value_get_boolean(inValue));
- break;
-
case PROP_BACKGROUND_IMAGE_TYPE:
xfdashboard_live_workspace_set_background_image_type(self, g_value_get_enum(inValue));
break;
@@ -774,10 +767,6 @@ static void _xfdashboard_live_workspace_get_property(GObject *inObject,
g_value_set_object(outValue, self->priv->monitor);
break;
- case PROP_SHOW_WINDOW_CONTENT:
- g_value_set_boolean(outValue, self->priv->showWindowContent);
- break;
-
case PROP_BACKGROUND_IMAGE_TYPE:
g_value_set_enum(outValue, self->priv->backgroundType);
break;
@@ -833,13 +822,6 @@ static void xfdashboard_live_workspace_class_init(XfdashboardLiveWorkspaceClass
XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- XfdashboardLiveWorkspaceProperties[PROP_SHOW_WINDOW_CONTENT]=
- g_param_spec_boolean("show-window-content",
- _("Show window content"),
- _("If TRUE the window content should be shown otherwise the window's icon will be shown"),
- TRUE,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
XfdashboardLiveWorkspaceProperties[PROP_BACKGROUND_IMAGE_TYPE]=
g_param_spec_enum("background-image-type",
_("Background image type"),
@@ -866,7 +848,6 @@ static void xfdashboard_live_workspace_class_init(XfdashboardLiveWorkspaceClass
g_object_class_install_properties(gobjectClass, PROP_LAST, XfdashboardLiveWorkspaceProperties);
/* Define stylable properties */
- xfdashboard_actor_install_stylable_property(actorClass, XfdashboardLiveWorkspaceProperties[PROP_SHOW_WINDOW_CONTENT]);
xfdashboard_actor_install_stylable_property(actorClass, XfdashboardLiveWorkspaceProperties[PROP_BACKGROUND_IMAGE_TYPE]);
xfdashboard_actor_install_stylable_property(actorClass, XfdashboardLiveWorkspaceProperties[PROP_SHOW_WORKSPACE_NAME]);
xfdashboard_actor_install_stylable_property(actorClass, XfdashboardLiveWorkspaceProperties[PROP_WORKSPACE_NAME_PADDING]);
@@ -897,7 +878,6 @@ static void xfdashboard_live_workspace_init(XfdashboardLiveWorkspace *self)
/* Set default values */
priv->windowTracker=xfdashboard_window_tracker_get_default();
priv->workspace=NULL;
- priv->showWindowContent=TRUE;
priv->backgroundType=XFDASHBOARD_STAGE_BACKGROUND_IMAGE_TYPE_NONE;
priv->monitor=NULL;
priv->showWorkspaceName=FALSE;
@@ -1088,53 +1068,6 @@ void xfdashboard_live_workspace_set_monitor(XfdashboardLiveWorkspace *self, Xfda
}
}
-/* Get/set if the window content should be shown or the window's icon */
-gboolean xfdashboard_live_workspace_get_show_window_content(XfdashboardLiveWorkspace *self)
-{
- g_return_val_if_fail(XFDASHBOARD_IS_LIVE_WORKSPACE(self), TRUE);
-
- return(self->priv->showWindowContent);
-}
-
-void xfdashboard_live_workspace_set_show_window_content(XfdashboardLiveWorkspace *self, gboolean inShowWindowContent)
-{
- XfdashboardLiveWorkspacePrivate *priv;
- ClutterActor *child;
- ClutterActorIter iter;
-
- g_return_if_fail(XFDASHBOARD_IS_LIVE_WORKSPACE(self));
-
- priv=self->priv;
-
- /* Set value if changed */
- if(priv->showWindowContent!=inShowWindowContent)
- {
- /* Set value */
- priv->showWindowContent=inShowWindowContent;
-
- /* Recreate window actors in workspace */
- clutter_actor_iter_init(&iter, CLUTTER_ACTOR(self));
- while(clutter_actor_iter_next(&iter, &child))
- {
- /* Skip actor if it is not a window actor */
- if(!XFDASHBOARD_IS_LIVE_WINDOW_SIMPLE(child)) continue;
-
- /* Replace content depending on this new value if neccessary */
- if(priv->showWindowContent)
- {
- xfdashboard_live_window_simple_set_display_type(XFDASHBOARD_LIVE_WINDOW_SIMPLE(child), XFDASHBOARD_LIVE_WINDOW_SIMPLE_DISPLAY_TYPE_LIVE_PREVIEW);
- }
- else
- {
- xfdashboard_live_window_simple_set_display_type(XFDASHBOARD_LIVE_WINDOW_SIMPLE(child), XFDASHBOARD_LIVE_WINDOW_SIMPLE_DISPLAY_TYPE_ICON);
- }
- }
-
- /* Notify about property change */
- g_object_notify_by_pspec(G_OBJECT(self), XfdashboardLiveWorkspaceProperties[PROP_SHOW_WINDOW_CONTENT]);
- }
-}
-
/* Get/set background type */
XfdashboardStageBackgroundImageType xfdashboard_live_workspace_get_background_image_type(XfdashboardLiveWorkspace *self)
{
diff --git a/libxfdashboard/live-workspace.h b/libxfdashboard/live-workspace.h
index 26e1929..e8af6a6 100644
--- a/libxfdashboard/live-workspace.h
+++ b/libxfdashboard/live-workspace.h
@@ -81,9 +81,6 @@ void xfdashboard_live_workspace_set_workspace(XfdashboardLiveWorkspace *self, Xf
XfdashboardWindowTrackerMonitor* xfdashboard_live_workspace_get_monitor(XfdashboardLiveWorkspace *self);
void xfdashboard_live_workspace_set_monitor(XfdashboardLiveWorkspace *self, XfdashboardWindowTrackerMonitor *inMonitor);
-gboolean xfdashboard_live_workspace_get_show_window_content(XfdashboardLiveWorkspace *self);
-void xfdashboard_live_workspace_set_show_window_content(XfdashboardLiveWorkspace *self, gboolean inShowWindowContent);
-
XfdashboardStageBackgroundImageType xfdashboard_live_workspace_get_background_image_type(XfdashboardLiveWorkspace *self);
void xfdashboard_live_workspace_set_background_image_type(XfdashboardLiveWorkspace *self, XfdashboardStageBackgroundImageType inType);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list