Commit aea290af authored by Marco Trevisan's avatar Marco Trevisan

Config: add UNIQUE_APPNAME variable

This also allows to change it at compile time.
parent 2fda77e2
......@@ -124,6 +124,10 @@ if(NOT GIT_REVISION)
endif()
message(STATUS "Git Revision ${GIT_REVISION}")
if(NOT UNIQUE_APPNAME)
set(UNIQUE_APPNAME "org.Remmina")
endif()
if(NOT REMMINA_DATADIR)
set(REMMINA_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}")
endif()
......
......@@ -16,6 +16,7 @@
#cmakedefine GTK_VERSION ${GTK_VERSION}
#define remmina "remmina"
#define UNIQUE_APPNAME "${UNIQUE_APPNAME}"
#define VERSION "${REMMINA_VERSION}"
#define GIT_REVISION "${GIT_REVISION}"
......
......@@ -222,6 +222,7 @@ int main(int argc, char* argv[])
{
TRACE_CALL("main");
GtkApplication *app;
const gchar *app_id;
int status;
gdk_set_allowed_backends("x11,broadway,quartz,wayland,mir");
......@@ -249,7 +250,8 @@ int main(int argc, char* argv[])
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#endif /* !HAVE_LIBGCRYPT */
app = gtk_application_new("org.Remmina", G_APPLICATION_HANDLES_COMMAND_LINE);
app_id = g_application_id_is_valid(UNIQUE_APPNAME) ? UNIQUE_APPNAME : NULL;
app = gtk_application_new(app_id, G_APPLICATION_HANDLES_COMMAND_LINE);
g_signal_connect(app, "startup", G_CALLBACK(remmina_on_startup), NULL);
g_signal_connect(app, "command-line", G_CALLBACK(remmina_on_command_line), NULL);
g_signal_connect(app, "handle-local-options", G_CALLBACK(remmina_on_local_cmdline), NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment