aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-13 22:24:10 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-13 22:24:10 +0800
commite06b88c4fda627599d7c1a33ddec0a35a4374e4f (patch)
treea862b4d3909923719ab03936ec60dfc00f185ba8 /addressbook/gui/contact-editor
parentdc2953040b0fb9576411d2f145e7e6ff11dd989a (diff)
downloadgsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.gz
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.bz2
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.lz
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.xz
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.zst
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.zip
Bug #594471 - Shouldn't call e_error_new/run with NULL 'parent'
Diffstat (limited to 'addressbook/gui/contact-editor')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c23
2 files changed, 3 insertions, 22 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 007436e7da..6fab3cb75e 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2769,7 +2769,7 @@ categories_clicked (GtkWidget *button, EContactEditor *editor)
g_free (categories);
return;
}else if (!(dialog = GTK_DIALOG (e_categories_dialog_new (categories)))) {
- e_error_run (NULL, "addressbook:edit-categories", NULL);
+ e_error_run (GTK_WINDOW (editor->app), "addressbook:edit-categories", NULL);
g_free (categories);
return;
}
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index 1e287d8516..5288ab009d 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -35,25 +35,6 @@
#include "eab-contact-merging.h"
#include "e-util/e-error.h"
-static GtkWindow *
-get_dlg_parent_window (void)
-{
- GList *windows;
- GtkWindow *parent = NULL;
- EShell *shell = e_shell_get_default ();
-
- g_return_val_if_fail (shell != NULL, NULL);
-
- for (windows = e_shell_get_watched_windows (shell); windows && !parent; windows = windows->next) {
- if (GTK_IS_WINDOW (windows->data))
- parent = windows->data;
- }
-
- g_return_val_if_fail (parent != NULL, NULL);
-
- return parent;
-}
-
typedef struct _QuickAdd QuickAdd;
struct _QuickAdd {
gchar *name;
@@ -148,7 +129,7 @@ merge_cb (EBook *book, EBookStatus status, gpointer closure)
if (e_book_is_writable (book))
eab_merging_book_add_contact (book, qa->contact, NULL, NULL);
else
- e_error_run (get_dlg_parent_window (), "addressbook:error-read-only", e_source_peek_name (e_book_get_source (book)), NULL);
+ e_error_run (e_shell_get_active_window (NULL), "addressbook:error-read-only", e_source_peek_name (e_book_get_source (book)), NULL);
if (qa->cb)
qa->cb (qa->contact, qa->closure);
@@ -345,7 +326,7 @@ build_quick_add_dialog (QuickAdd *qa)
g_return_val_if_fail (qa != NULL, NULL);
dialog = gtk_dialog_new_with_buttons (_("Contact Quick-Add"),
- get_dlg_parent_window (),
+ e_shell_get_active_window (NULL),
GTK_DIALOG_NO_SEPARATOR,
_("_Edit Full"), QUICK_ADD_RESPONSE_EDIT_FULL,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,