aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c23
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c3
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.c3
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c2
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c3
-rw-r--r--addressbook/util/Makefile.am4
-rw-r--r--addressbook/util/addressbook.c3
8 files changed, 15 insertions, 28 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,
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index 77d91357c5..73b5dcd7cf 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -25,6 +25,7 @@
#include "e-contact-list-editor.h"
#include <e-util/e-util-private.h>
#include <e-util/e-error.h>
+#include "shell/e-shell.h"
#include <string.h>
@@ -259,7 +260,7 @@ contact_list_editor_contact_exists (EContactListModel *model,
if (!e_contact_list_model_has_email (model, email))
return FALSE;
- return (e_error_run (NULL, tag, email, NULL) != GTK_RESPONSE_YES);
+ return (e_error_run (e_shell_get_active_window (NULL), tag, email, NULL) != GTK_RESPONSE_YES);
}
static void
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c
index d43e895570..a5fc9937ac 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c
@@ -24,6 +24,7 @@
#include "e-contact-list-model.h"
#include "e-util/e-error.h"
+#include "shell/e-shell.h"
static gpointer parent_class;
@@ -152,7 +153,7 @@ e_contact_list_model_add_email (EContactListModel *model,
g_return_if_fail (email != NULL);
if (e_contact_list_model_has_email (model, email))
- if (e_error_run (NULL, tag, email, NULL) != GTK_RESPONSE_YES)
+ if (e_error_run (e_shell_get_active_window (NULL), tag, email, NULL) != GTK_RESPONSE_YES)
return;
destination = e_destination_new ();
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index c606530594..8d07a8007a 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -1109,7 +1109,7 @@ delete_contacts_cb (EBook *book, EBookStatus status, gpointer closure)
case E_BOOK_ERROR_CANCELLED :
break;
case E_BOOK_ERROR_PERMISSION_DENIED :
- e_error_run (NULL, "addressbook:contact-delete-error-perm", NULL);
+ e_error_run (e_shell_get_active_window (NULL), "addressbook:contact-delete-error-perm", NULL);
break;
default :
/* Unknown error */
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index effea132c3..0aa63850a2 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -37,6 +37,7 @@
#include <libebook/e-destination.h>
#include "e-util/e-error.h"
#include "e-util/e-html-utils.h"
+#include "shell/e-shell.h"
#include "misc/e-image-chooser.h"
#include <e-util/e-icon-factory.h>
#include "eab-contact-merging.h"
@@ -85,7 +86,7 @@ eab_error_dialog (const gchar *msg, EBookStatus status)
status_str = status_to_string [status];
if (status_str)
- e_error_run (NULL, "addressbook:generic-error", msg, _(status_str), NULL);
+ e_error_run (e_shell_get_active_window (NULL), "addressbook:generic-error", msg, _(status_str), NULL);
}
void
diff --git a/addressbook/util/Makefile.am b/addressbook/util/Makefile.am
index c5afbaf84f..f777f3c940 100644
--- a/addressbook/util/Makefile.am
+++ b/addressbook/util/Makefile.am
@@ -10,6 +10,7 @@ libeabutil_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir)/shell \
-I$(top_srcdir)/shell \
+ -I$(top_srcdir)/widgets \
$(EVOLUTION_ADDRESSBOOK_CFLAGS)
libeabutil_la_SOURCES = \
@@ -23,7 +24,8 @@ libeabutil_la_LDFLAGS = $(NO_UNDEFINED)
libeabutil_la_LIBADD = \
$(EVOLUTION_ADDRESSBOOK_LIBS) \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(top_builddir)/e-util/libeutil.la
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/shell/libeshell.la
dist-hook:
cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/addressbook/util/addressbook.c b/addressbook/util/addressbook.c
index 7caa545059..59d87659c7 100644
--- a/addressbook/util/addressbook.c
+++ b/addressbook/util/addressbook.c
@@ -31,6 +31,7 @@
#include <libedataserverui/e-passwords.h>
#include "e-util/e-error.h"
+#include "shell/e-shell.h"
#include "addressbook.h"
#define d(x)
@@ -107,7 +108,7 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure)
goto done;
}
} else if (status == E_BOOK_ERROR_INVALID_SERVER_VERSION) {
- e_error_run (NULL, "addressbook:server-version", NULL);
+ e_error_run (e_shell_get_active_window (NULL), "addressbook:server-version", NULL);
status = E_BOOK_ERROR_OK;
goto done;
} else if (status == E_BOOK_ERROR_UNSUPPORTED_AUTHENTICATION_METHOD) {