This is an automated email from the git hooks/post-receive script. nomad pushed a commit to branch master in repository apps/xfdashboard.
commit a83bf40b54267c921097a7d13f906ae5bde87c9a Author: Stephan Haller <[email protected]> Date: Thu Nov 12 21:39:07 2015 +0100 Re-add support for environment variable XFDASHBOARD_FORCE_NEW_INSTANCE This environment variable can be set to any value as it needs only to exist. But it is only checked if xfdashboard is compiled with debug support. If this enviroment variable is set to any value then it spawn a new instance of xfdashboard regardless if any other instance is already running. This is interesting to test a new compile of xfdashboard for debugging purposes while (a stable) xfdashboard instance is running in background in daemonized mode. --- xfdashboard/application.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/xfdashboard/application.c b/xfdashboard/application.c index d48acb4..c60592d 100644 --- a/xfdashboard/application.c +++ b/xfdashboard/application.c @@ -1011,6 +1011,23 @@ XfdashboardApplication* xfdashboard_application_get_default(void) { if(G_UNLIKELY(application==NULL)) { + gchar *appID; + const gchar *forceNewInstance=NULL; + +#ifdef DEBUG + /* If a new instance of xfdashboard is forced, e.g. for debugging purposes, + * then create a unique application ID. + */ + forceNewInstance=g_getenv("XFDASHBOARD_FORCE_NEW_INSTANCE"); +#endif + + if(forceNewInstance) + { + appID=g_strdup_printf("%s-%u", XFDASHBOARD_APP_ID, getpid()); + g_message("Forcing new application instance with ID '%s'", appID); + } + else appID=g_strdup(XFDASHBOARD_APP_ID); + application=g_object_new(XFDASHBOARD_TYPE_APPLICATION, "application-id", XFDASHBOARD_APP_ID, "flags", G_APPLICATION_HANDLES_COMMAND_LINE, -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce4-commits
