aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-menu.c
diff options
context:
space:
mode:
authorDavyd Madeley <davyd@madeley.id.au>2009-02-24 16:55:33 +0800
committerDavyd Madeley <davyd@madeley.id.au>2009-07-15 18:12:15 +0800
commit8571c54004e9cf8d2729a03d712210ab0ba0cd3b (patch)
tree1a94b8623946c3da5f04c815d6e7c63fd77c5bb9 /libempathy-gtk/empathy-contact-menu.c
parent4e13ee5ecdbeb71559b76ee2080c9e58385c3ad8 (diff)
downloadgsoc2013-empathy-8571c54004e9cf8d2729a03d712210ab0ba0cd3b.tar
gsoc2013-empathy-8571c54004e9cf8d2729a03d712210ab0ba0cd3b.tar.gz
gsoc2013-empathy-8571c54004e9cf8d2729a03d712210ab0ba0cd3b.tar.bz2
gsoc2013-empathy-8571c54004e9cf8d2729a03d712210ab0ba0cd3b.tar.lz
gsoc2013-empathy-8571c54004e9cf8d2729a03d712210ab0ba0cd3b.tar.xz
gsoc2013-empathy-8571c54004e9cf8d2729a03d712210ab0ba0cd3b.tar.zst
gsoc2013-empathy-8571c54004e9cf8d2729a03d712210ab0ba0cd3b.zip
Set parent for new contact dialog
Diffstat (limited to 'libempathy-gtk/empathy-contact-menu.c')
-rw-r--r--libempathy-gtk/empathy-contact-menu.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index 44b00165e..5792903c2 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -129,9 +129,16 @@ static void
empathy_contact_add_menu_item_activated (GtkMenuItem *item,
EmpathyContact *contact)
{
- /* FIXME - attempt to get parent */
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (item));
+ if (!GTK_WIDGET_TOPLEVEL (toplevel) || !GTK_IS_WINDOW (toplevel)) {
+ toplevel = NULL;
+ }
+
/* FIXME - the contact dialog doesn't set the source account right */
- empathy_new_contact_dialog_show_with_contact (NULL, contact);
+ empathy_new_contact_dialog_show_with_contact (GTK_WINDOW (toplevel),
+ contact);
}
GtkWidget *