[Xfce4-commits] [apps/xfdashboard] 02/04: Add a new xfconf boolean property called "/always-launch-new-instance" to make new function - to start always a new instance of application or to activate the last active window for application - configurable.

noreply at xfce.org noreply at xfce.org
Wed Sep 16 16:09:40 CEST 2015


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit a83cebcff0956d50a556f77d6ee21b1548921080
Author: Stephan Haller <nomad at froevel.de>
Date:   Wed Sep 16 15:51:32 2015 +0200

    Add a new xfconf boolean property called "/always-launch-new-instance" to make new function - to start always a new instance of application or to activate the last active window for application - configurable.
---
 xfdashboard/quicklaunch.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/xfdashboard/quicklaunch.c b/xfdashboard/quicklaunch.c
index ab3bc29..af59898 100644
--- a/xfdashboard/quicklaunch.c
+++ b/xfdashboard/quicklaunch.c
@@ -127,7 +127,10 @@ enum
 static guint XfdashboardQuicklaunchSignals[SIGNAL_LAST]={ 0, };
 
 /* IMPLEMENTATION: Private variables and methods */
-#define FAVOURITES_XFCONF_PROP		"/favourites"
+#define FAVOURITES_XFCONF_PROP				"/favourites"
+
+#define LAUNCH_NEW_INSTANCE_XFCONF_PROP		"/always-launch-new-instance"
+#define DEFAULT_LAUNCH_NEW_INSTANCE			TRUE
 
 #define DEFAULT_SCALE_MIN			0.1
 #define DEFAULT_SCALE_MAX			1.0
@@ -315,12 +318,15 @@ static void _xfdashboard_quicklaunch_on_favourite_clicked(XfdashboardQuicklaunch
 
 	priv=self->priv;
 	button=XFDASHBOARD_APPLICATION_BUTTON(inUserData);
-	launchNewInstance=TRUE;
 
 	/* If user wants to activate the last active windows for a running instance
 	 * of application whose button was clicked, then check if a window exists
 	 * and activate it. Otherwise launch a new instance.
 	 */
+	launchNewInstance=xfconf_channel_get_bool(xfdashboard_application_get_xfconf_channel(),
+												LAUNCH_NEW_INSTANCE_XFCONF_PROP,
+												DEFAULT_LAUNCH_NEW_INSTANCE);
+
 	if(!launchNewInstance)
 	{
 		GAppInfo						*appInfo;

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


More information about the Xfce4-commits mailing list