aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-05-25 16:56:23 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-09-05 23:00:28 +0800
commit16e0d5a45bb1e11d57c4d5e512f021ebb6d2da12 (patch)
treea9e0995357ded068289d068a5ba3a5465843f057 /libempathy-gtk
parent8f1fe631f8046ddeb0bd48d880176ed1f2048be9 (diff)
downloadgsoc2013-empathy-16e0d5a45bb1e11d57c4d5e512f021ebb6d2da12.tar
gsoc2013-empathy-16e0d5a45bb1e11d57c4d5e512f021ebb6d2da12.tar.gz
gsoc2013-empathy-16e0d5a45bb1e11d57c4d5e512f021ebb6d2da12.tar.bz2
gsoc2013-empathy-16e0d5a45bb1e11d57c4d5e512f021ebb6d2da12.tar.lz
gsoc2013-empathy-16e0d5a45bb1e11d57c4d5e512f021ebb6d2da12.tar.xz
gsoc2013-empathy-16e0d5a45bb1e11d57c4d5e512f021ebb6d2da12.tar.zst
gsoc2013-empathy-16e0d5a45bb1e11d57c4d5e512f021ebb6d2da12.zip
Set a parent for the error dialog
Conflicts: libempathy-gtk/empathy-new-message-dialog.c
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-new-message-dialog.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-new-message-dialog.c b/libempathy-gtk/empathy-new-message-dialog.c
index 999f34838..027ef8721 100644
--- a/libempathy-gtk/empathy-new-message-dialog.c
+++ b/libempathy-gtk/empathy-new-message-dialog.c
@@ -106,11 +106,12 @@ out:
}
static void
-show_chat_error (GError *error)
+show_chat_error (GError *error,
+ GtkWindow *parent)
{
GtkWidget *dialog;
- dialog = gtk_message_dialog_new (NULL, 0,
+ dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
"%s",
get_error_display_message (error));
@@ -133,7 +134,7 @@ ensure_text_channel_cb (GObject *source,
TP_ACCOUNT_CHANNEL_REQUEST (source), result, &error))
{
DEBUG ("Failed to ensure text channel: %s", error->message);
- show_chat_error (error);
+ show_chat_error (error, user_data);
g_error_free (error);
}
}
@@ -156,13 +157,15 @@ empathy_new_message_dialog_response (GtkDialog *dialog, int response_id)
case EMP_NEW_MESSAGE_TEXT:
empathy_chat_with_contact_id (account, contact_id,
empathy_get_current_action_time (),
- ensure_text_channel_cb, NULL);
+ ensure_text_channel_cb,
+ gtk_widget_get_parent_window (GTK_WIDGET (dialog)));
break;
case EMP_NEW_MESSAGE_SMS:
empathy_sms_contact_id (account, contact_id,
empathy_get_current_action_time (),
- ensure_text_channel_cb, NULL);
+ ensure_text_channel_cb,
+ gtk_widget_get_parent_window (GTK_WIDGET (dialog)));
break;
default: