[vinagre] Avoid vinagre crashs if VNC plugin is not enabled
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vinagre] Avoid vinagre crashs if VNC plugin is not enabled
- Date: Thu, 30 Jul 2009 12:20:16 +0000 (UTC)
commit 0c59aa89f0559a633a184dd55f405666833ab361
Author: Arnaud Maillet <arnaud maillet collabora co uk>
Date: Wed Jul 29 14:35:53 2009 +0200
Avoid vinagre crashs if VNC plugin is not enabled
vinagre/vinagre-tube-handler.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-tube-handler.c b/vinagre/vinagre-tube-handler.c
index 72f9246..8d97e96 100644
--- a/vinagre/vinagre-tube-handler.c
+++ b/vinagre/vinagre-tube-handler.c
@@ -216,6 +216,7 @@ vinagre_tube_handler_accept_stream_tube_cb (TpChannel *channel,
gchar *host;
gchar *error_msg = NULL;
VinagreConnection *conn = NULL;
+ GtkWidget *window;
VinagreTubeHandlerPrivate *priv = VINAGRE_TUBE_HANDLER_GET_PRIVATE (self);
@@ -246,8 +247,15 @@ vinagre_tube_handler_accept_stream_tube_cb (TpChannel *channel,
if (conn == NULL)
{
+ window = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ "Impossible to create the connection: %s", error_msg);
+ gtk_dialog_run (GTK_DIALOG (window));
+ gtk_widget_destroy (window);
g_printerr ("Impossible to create the connection: %s\n",
error_msg);
+ g_signal_handler_disconnect (G_OBJECT (priv->channel),
+ priv->signal_invalidated_id);
g_signal_emit (G_OBJECT (self), signals[DISCONNECTED], 0);
g_free (error_msg);
return ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]