From b294f114f38c263e48125cfe3a7d57ff84fb1e94 Mon Sep 17 00:00:00 2001 From: Denis Ollier Date: Sat, 4 Nov 2017 18:24:13 +0100 Subject: [PATCH 1/3] telepathy: use __func__ keyword when possible --- .../telepathy/telepathy_channel_handler.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/remmina-plugins/telepathy/telepathy_channel_handler.c b/remmina-plugins/telepathy/telepathy_channel_handler.c index c672ea6bd3..f746beafc7 100644 --- a/remmina-plugins/telepathy/telepathy_channel_handler.c +++ b/remmina-plugins/telepathy/telepathy_channel_handler.c @@ -107,14 +107,14 @@ static void remmina_tp_channel_handler_channel_closed(TpChannel *channel, gpoint TRACE_CALL(__func__); RemminaTpChannelHandler *chandler = (RemminaTpChannelHandler*)user_data; - g_print("remmina_tp_channel_handler_channel_closed: %s\n", chandler->channel_path); + g_print("%s: %s\n", __func__, chandler->channel_path); remmina_tp_channel_handler_free(chandler); } static void remmina_tp_channel_handler_on_disconnect(GtkWidget *widget, RemminaTpChannelHandler *chandler) { TRACE_CALL(__func__); - g_print("remmina_tp_channel_handler_on_disconnect: %s\n", chandler->channel_path); + g_print("%s: %s\n", __func__, chandler->channel_path); g_signal_handler_disconnect(widget, chandler->disconnect_handler); chandler->disconnect_handler = 0; tp_cli_channel_call_close(chandler->channel, -1, NULL, NULL, NULL, NULL); @@ -151,12 +151,12 @@ static void remmina_tp_channel_handler_get_service(TpProxy *channel, const GValu const gchar *svc; if (error != NULL) { - g_print("remmina_tp_channel_handler_get_service: %s", error->message); + g_print("%s: %s", __func__, error->message); remmina_tp_channel_handler_free(chandler); return; } svc = g_value_get_string(service); - g_print("remmina_tp_channel_handler_get_service: %s %s:%u\n", svc, chandler->host, chandler->port); + g_print("%s: %s %s:%u\n", __func__, svc, chandler->host, chandler->port); if (g_strcmp0(svc, "rfb") == 0) { chandler->protocol = g_strdup("VNC"); @@ -173,7 +173,7 @@ static void remmina_tp_channel_handler_accept(TpChannel *channel, const GValue * RemminaTpChannelHandler *chandler = (RemminaTpChannelHandler*)user_data; if (error != NULL) { - g_print("remmina_tp_channel_handler_accept: %s", error->message); + g_print("%s: %s", __func__, error->message); remmina_tp_channel_handler_free(chandler); return; } @@ -221,12 +221,12 @@ static void remmina_tp_channel_handler_get_contacts(TpConnection *connection, gu GtkWidget *dialog; if (error != NULL) { - g_print("remmina_tp_channel_handler_get_contacts: %s", error->message); + g_print("%s: %s", __func__, error->message); remmina_tp_channel_handler_free(chandler); return; } if (n_contacts <= 0) { - g_print("remmina_tp_channel_handler_get_contacts: no contacts\n"); + g_print("%s: no contacts\n", __func__); remmina_tp_channel_handler_free(chandler); return; } @@ -276,7 +276,7 @@ static void remmina_tp_channel_handler_channel_ready(TpChannel *channel, const G { TP_CONTACT_FEATURE_ALIAS, TP_CONTACT_FEATURE_AVATAR_TOKEN }; if (channel_error != NULL) { - g_print("remmina_tp_channel_handler_channel_ready: %s\n", channel_error->message); + g_print("%s: %s\n", __func__, channel_error->message); remmina_tp_channel_handler_free(chandler); return; } @@ -287,7 +287,7 @@ static void remmina_tp_channel_handler_channel_ready(TpChannel *channel, const G remmina_tp_channel_handler_free(chandler); return; } - g_print("remmina_tp_channel_handler_channel_ready: %s\n", chandler->channel_path); + g_print("%s: %s\n", __func__, chandler->channel_path); handle = tp_channel_get_handle(channel, NULL); tp_connection_get_contacts_by_handle(chandler->connection, 1, &handle, G_N_ELEMENTS(features), features, @@ -302,7 +302,7 @@ static void remmina_tp_channel_handler_connection_ready(TpConnection *connection GError *error = NULL; if (connection_error != NULL) { - g_print("remmina_tp_channel_handler_connection_ready: %s\n", connection_error->message); + g_print("%s: %s\n", __func__, connection_error->message); remmina_tp_channel_handler_free(chandler); return; } From c5319f6dac2ec1c5b8c8dbb6e5afbaf1fcbb83c8 Mon Sep 17 00:00:00 2001 From: Denis Ollier Date: Sat, 4 Nov 2017 19:23:05 +0100 Subject: [PATCH 2/3] telepathy: install dbus activation file Lost during migration from autotools to cmake in commit 62ee2d0. --- remmina-plugins/telepathy/CMakeLists.txt | 10 ++++++++++ ...org.freedesktop.Telepathy.Client.Remmina.service.in | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/remmina-plugins/telepathy/CMakeLists.txt b/remmina-plugins/telepathy/CMakeLists.txt index b718acc5aa..0d71ab0d9b 100644 --- a/remmina-plugins/telepathy/CMakeLists.txt +++ b/remmina-plugins/telepathy/CMakeLists.txt @@ -49,3 +49,13 @@ target_link_libraries(remmina-plugin-telepathy ${REMMINA_COMMON_LIBRARIES} ${TELEPATHY_LIBRARIES}) install(TARGETS remmina-plugin-telepathy DESTINATION ${REMMINA_PLUGINDIR}) + +# DBus activation file +if(NOT REMMINA_BINARY_PATH) + set(REMMINA_BINARY_PATH ${CMAKE_INSTALL_FULL_BINDIR}/remmina) +endif() +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.Telepathy.Client.Remmina.service.in + ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Telepathy.Client.Remmina.service @ONLY) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Telepathy.Client.Remmina.service + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services) diff --git a/remmina-plugins/telepathy/org.freedesktop.Telepathy.Client.Remmina.service.in b/remmina-plugins/telepathy/org.freedesktop.Telepathy.Client.Remmina.service.in index 3f748962cf..95c0cf775d 100644 --- a/remmina-plugins/telepathy/org.freedesktop.Telepathy.Client.Remmina.service.in +++ b/remmina-plugins/telepathy/org.freedesktop.Telepathy.Client.Remmina.service.in @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.freedesktop.Telepathy.Client.Remmina -Exec=@bindir@/remmina -x telepathy +Exec=@REMMINA_BINARY_PATH@ -x telepathy From 2cc46d8c5f49b504286df2cbbdba1b1a663abf2f Mon Sep 17 00:00:00 2001 From: Denis Ollier Date: Sat, 4 Nov 2017 20:59:25 +0100 Subject: [PATCH 3/3] telepathy: install client file Lost during migration from autotools to cmake in commit 62ee2d0. --- remmina-plugins/telepathy/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/remmina-plugins/telepathy/CMakeLists.txt b/remmina-plugins/telepathy/CMakeLists.txt index 0d71ab0d9b..afd4a26656 100644 --- a/remmina-plugins/telepathy/CMakeLists.txt +++ b/remmina-plugins/telepathy/CMakeLists.txt @@ -50,6 +50,10 @@ target_link_libraries(remmina-plugin-telepathy ${REMMINA_COMMON_LIBRARIES} install(TARGETS remmina-plugin-telepathy DESTINATION ${REMMINA_PLUGINDIR}) +# Telepathy client file +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/Remmina.client + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/telepathy/clients) + # DBus activation file if(NOT REMMINA_BINARY_PATH) set(REMMINA_BINARY_PATH ${CMAKE_INSTALL_FULL_BINDIR}/remmina)