[Xfce4-commits] [apps/xfdashboard] 02/04: Load theme later in initialization process just before the stage is created. Doing it later will give plugins the possibility to define new actors which can be used in themes.

noreply at xfce.org noreply at xfce.org
Mon Jun 20 09:48:21 CEST 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 444e5be4438eb4d3932c0f92bac9d10426d62540
Author: Stephan Haller <nomad at froevel.de>
Date:   Mon Jun 20 08:53:14 2016 +0200

    Load theme later in initialization process just before the stage is created. Doing it later will give plugins the possibility to define new actors which can be used in themes.
---
 libxfdashboard/application.c | 64 ++++++++++++++++++++++----------------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/libxfdashboard/application.c b/libxfdashboard/application.c
index a5aa1e2..d1b913d 100644
--- a/libxfdashboard/application.c
+++ b/libxfdashboard/application.c
@@ -419,38 +419,6 @@ static gboolean _xfdashboard_application_initialize_full(XfdashboardApplication
 		return(FALSE);
 	}
 
-	/* Set up and load theme */
-	priv->xfconfThemeChangedSignalID=xfconf_g_property_bind(priv->xfconfChannel,
-															THEME_NAME_XFCONF_PROP,
-															G_TYPE_STRING,
-															self,
-															"theme-name");
-	if(!priv->xfconfThemeChangedSignalID)
-	{
-		g_warning(_("Could not create binding between xfconf property and local resource for theme change notification."));
-	}
-
-	/* Set up default theme in Xfcond if property in channel does not exist
-	 * because it indicates first start.
-	 */
-	if(!xfconf_channel_has_property(priv->xfconfChannel, THEME_NAME_XFCONF_PROP))
-	{
-		xfconf_channel_set_string(priv->xfconfChannel,
-									THEME_NAME_XFCONF_PROP,
-									DEFAULT_THEME_NAME);
-	}
-
-	/* At this time the theme must have been loaded, either because we
-	 * set the default theme name because of missing theme property in
-	 * xfconf channel or the value of xfconf channel property has been read
-	 * and set when setting up binding (between xfconf property and local property)
-	 * what caused a call to function to set theme name in this object
-	 * and also caused a reload of theme.
-	 * So if no theme object is set in this object then loading theme has
-	 * failed and we have to return FALSE.
-	 */
-	if(!priv->theme) return(FALSE);
-
 	/* Register built-in views (order of registration is important) */
 	priv->viewManager=xfdashboard_view_manager_get_default();
 
@@ -484,6 +452,38 @@ static gboolean _xfdashboard_application_initialize_full(XfdashboardApplication
 	 */
 	priv->focusManager=xfdashboard_focus_manager_get_default();
 
+	/* Set up and load theme */
+	priv->xfconfThemeChangedSignalID=xfconf_g_property_bind(priv->xfconfChannel,
+															THEME_NAME_XFCONF_PROP,
+															G_TYPE_STRING,
+															self,
+															"theme-name");
+	if(!priv->xfconfThemeChangedSignalID)
+	{
+		g_warning(_("Could not create binding between xfconf property and local resource for theme change notification."));
+	}
+
+	/* Set up default theme in Xfcond if property in channel does not exist
+	 * because it indicates first start.
+	 */
+	if(!xfconf_channel_has_property(priv->xfconfChannel, THEME_NAME_XFCONF_PROP))
+	{
+		xfconf_channel_set_string(priv->xfconfChannel,
+									THEME_NAME_XFCONF_PROP,
+									DEFAULT_THEME_NAME);
+	}
+
+	/* At this time the theme must have been loaded, either because we
+	 * set the default theme name because of missing theme property in
+	 * xfconf channel or the value of xfconf channel property has been read
+	 * and set when setting up binding (between xfconf property and local property)
+	 * what caused a call to function to set theme name in this object
+	 * and also caused a reload of theme.
+	 * So if no theme object is set in this object then loading theme has
+	 * failed and we have to return FALSE.
+	 */
+	if(!priv->theme) return(FALSE);
+
 	/* Create stage containing all monitors */
 	priv->stage=XFDASHBOARD_STAGE(xfdashboard_stage_new());
 	g_signal_connect_swapped(priv->stage, "delete-event", G_CALLBACK(_xfdashboard_application_on_delete_stage), self);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list