Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telepathy: properly setup dbus activation #1365

Merged
merged 3 commits into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions remmina-plugins/telepathy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,17 @@ target_link_libraries(remmina-plugin-telepathy ${REMMINA_COMMON_LIBRARIES}
${TELEPATHY_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)
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)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.freedesktop.Telepathy.Client.Remmina
Exec=@bindir@/remmina -x telepathy
Exec=@REMMINA_BINARY_PATH@ -x telepathy
20 changes: 10 additions & 10 deletions remmina-plugins/telepathy/telepathy_channel_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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");
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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,
Expand All @@ -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;
}
Expand Down