[evolution] Set transient parent for the "Full Name" editor dialog
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Set transient parent for the "Full Name" editor dialog
- Date: Fri, 23 Mar 2018 11:15:51 +0000 (UTC)
commit 016d0d328eab55b814f0c8d1bffcdf25a089c5b5
Author: Milan Crha <mcrha redhat com>
Date: Fri Mar 23 12:17:12 2018 +0100
Set transient parent for the "Full Name" editor dialog
.../gui/contact-editor/e-contact-editor-fullname.c | 7 +++++--
.../gui/contact-editor/e-contact-editor-fullname.h | 3 ++-
.../gui/contact-editor/e-contact-editor.c | 4 +++-
3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/addressbook/gui/contact-editor/e-contact-editor-fullname.c
b/src/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index 076365d..e91c90c 100644
--- a/src/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/src/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -247,9 +247,12 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam
}
GtkWidget *
-e_contact_editor_fullname_new (const EContactName *name)
+e_contact_editor_fullname_new (GtkWindow *parent,
+ const EContactName *name)
{
- GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_FULLNAME, NULL);
+ GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_FULLNAME,
+ "transient-for", parent,
+ NULL);
g_object_set (
widget,
diff --git a/src/addressbook/gui/contact-editor/e-contact-editor-fullname.h
b/src/addressbook/gui/contact-editor/e-contact-editor-fullname.h
index 3d3cb22..ffdd85f 100644
--- a/src/addressbook/gui/contact-editor/e-contact-editor-fullname.h
+++ b/src/addressbook/gui/contact-editor/e-contact-editor-fullname.h
@@ -62,7 +62,8 @@ struct _EContactEditorFullnameClass
GtkDialogClass parent_class;
};
-GtkWidget *e_contact_editor_fullname_new (const EContactName *name);
+GtkWidget *e_contact_editor_fullname_new (GtkWindow *parent,
+ const EContactName *name);
GType e_contact_editor_fullname_get_type (void);
G_END_DECLS
diff --git a/src/addressbook/gui/contact-editor/e-contact-editor.c
b/src/addressbook/gui/contact-editor/e-contact-editor.c
index 571be7d..cbc19b5 100644
--- a/src/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/src/addressbook/gui/contact-editor/e-contact-editor.c
@@ -4102,6 +4102,7 @@ full_name_clicked (GtkWidget *button,
EContactEditor *editor)
{
GtkDialog *dialog;
+ GtkWindow *parent;
gboolean fullname_supported;
if (editor->priv->fullname_dialog) {
@@ -4109,7 +4110,8 @@ full_name_clicked (GtkWidget *button,
return;
}
- dialog = GTK_DIALOG (e_contact_editor_fullname_new (editor->priv->name));
+ parent = eab_editor_get_window (EAB_EDITOR (editor));
+ dialog = GTK_DIALOG (e_contact_editor_fullname_new (parent, editor->priv->name));
fullname_supported = is_field_supported (editor, E_CONTACT_FULL_NAME);
g_object_set (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]