Commit 281d4b39 authored by Antenore Gatta's avatar Antenore Gatta

Remmina and FreeRDP versions in the Plugins widget

parent bdc0db79
......@@ -32,7 +32,7 @@
# files in the program, then also delete it here.
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8.2)
set(CMAKE_COLOR_MAKEFILE ON)
......@@ -117,16 +117,19 @@ if(NOT ${REMMINA_VERSION_SUFFIX} STREQUAL "")
endif()
include(GetGitRevisionDescription)
git_get_exact_tag(GIT_REVISION --tags --always)
if(${GIT_REVISION} STREQUAL "n/a")
git_rev_parse(GIT_REVISION --short)
find_package(Git)
if(GIT_FOUND)
include(GetGitRevisionDescription)
git_get_exact_tag(REMMINA_GIT_REVISION --tags --always)
if(${REMMINA_GIT_REVISION} STREQUAL "n/a")
git_rev_parse(REMMINA_GIT_REVISION --short)
endif()
endif()
if(NOT GIT_REVISION OR ${GIT_REVISION} STREQUAL "n/a")
set(GIT_REVISION ${REMMINA_VERSION_SUFFIX})
if(NOT REMMINA_GIT_REVISION OR ${REMMINA_GIT_REVISION} STREQUAL "n/a")
set(REMMINA_GIT_REVISION ${REMMINA_VERSION_SUFFIX})
endif()
message(STATUS "Git Revision ${GIT_REVISION}")
message(STATUS "Git Revision ${REMMINA_GIT_REVISION}")
if(NOT UNIQUE_APPNAME)
set(UNIQUE_APPNAME "org.Remmina")
......
......@@ -18,7 +18,7 @@
#define remmina "remmina"
#define UNIQUE_APPNAME "${UNIQUE_APPNAME}"
#define VERSION "${REMMINA_VERSION}"
#define GIT_REVISION "${GIT_REVISION}"
#define REMMINA_GIT_REVISION "${REMMINA_GIT_REVISION}"
#define GETTEXT_PACKAGE remmina
......
......@@ -38,6 +38,7 @@
#include "common/remmina_plugin.h"
#include <freerdp/freerdp.h>
#include <freerdp/version.h>
#include <freerdp/channels/channels.h>
#include <freerdp/codec/color.h>
#include <freerdp/codec/rfx.h>
......@@ -58,7 +59,8 @@ typedef struct rf_context rfContext;
#define DEFAULT_QUALITY_2 0x01
#define DEFAULT_QUALITY_9 0x80
#define REMMINA_PLUGIN_RDP_VERSION "Remmina RDP: 1.2.0-rcgit-18 (git d34dbbe), FreeRDP: 2.0.0-dev (git 8d0809cf2)"
#define REMMINA_PLUGIN_RDP_VERSION "Remmina: " VERSION " (git " REMMINA_GIT_REVISION \
"), FreeRDP: " FREERDP_VERSION_FULL " (git " GIT_REVISION ")"
extern RemminaPluginService* remmina_plugin_service;
......
......@@ -46,7 +46,7 @@ void remmina_about_open(GtkWindow *parent)
TRACE_CALL("remmina_about_open");
static gchar version[32];
g_snprintf(version, sizeof(version), "%s (git %s)", VERSION, GIT_REVISION);
g_snprintf(version, sizeof(version), "%s (git %s)", VERSION, REMMINA_GIT_REVISION);
GtkBuilder *builder = remmina_public_gtk_builder_new_from_file("remmina_about.glade");
GtkDialog *dialog = GTK_DIALOG (gtk_builder_get_object(builder, "dialog_remmina_about"));
......
......@@ -164,7 +164,7 @@ void remmina_exec_command(RemminaCommandType command, const gchar* data)
}
else
{
g_print ("%s - Version %s (git %s)\n", g_get_application_name (), VERSION, GIT_REVISION);
g_print ("%s - Version %s (git %s)\n", g_get_application_name (), VERSION, REMMINA_GIT_REVISION);
/* As we do not use the "handle-local-options" signal, we have to exit Remmina */
remmina_exec_command(REMMINA_COMMAND_EXIT, NULL);
}
......@@ -180,7 +180,7 @@ void remmina_exec_command(RemminaCommandType command, const gchar* data)
}
else
{
g_print ("%s - Version %s (git %s)\n", g_get_application_name (), VERSION, GIT_REVISION);
g_print ("%s - Version %s (git %s)\n", g_get_application_name (), VERSION, REMMINA_GIT_REVISION);
remmina_exec_command(REMMINA_COMMAND_EXIT, NULL);
}
......
......@@ -1180,16 +1180,12 @@ GtkWidget* remmina_main_new(void)
GtkWindow* remmina_main_get_window()
{
printf("Sono in remmina_main_get_window\n");
if (!remminamain)
return NULL;
printf("Sono ancora in remmina_main_get_window, prima di priv\n");
if (!remminamain->priv)
return NULL;
printf("Sono ancora in remmina_main_get_window, dopo priv, prima di initialized\n");
if (!remminamain->priv->initialized)
return NULL;
printf("Sono ancora in remmina_main_get_window, dopo initialized\n");
return remminamain->window;
}
......
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