aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/groupwise-features
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 /plugins/groupwise-features
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 'plugins/groupwise-features')
-rw-r--r--plugins/groupwise-features/camel-gw-listener.c5
-rw-r--r--plugins/groupwise-features/mail-retract.c4
-rw-r--r--plugins/groupwise-features/process-meeting.c7
-rw-r--r--plugins/groupwise-features/proxy-login.c15
-rw-r--r--plugins/groupwise-features/proxy-login.h3
-rw-r--r--plugins/groupwise-features/proxy.c14
-rw-r--r--plugins/groupwise-features/share-folder.c4
7 files changed, 27 insertions, 25 deletions
diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c
index 72b810feea..52b37fc92a 100644
--- a/plugins/groupwise-features/camel-gw-listener.c
+++ b/plugins/groupwise-features/camel-gw-listener.c
@@ -32,6 +32,7 @@
#include "e-util/e-error.h"
#include <libedataserver/e-account.h>
#include <libecal/e-cal.h>
+#include <shell/e-shell.h>
/*stores some info about all currently existing groupwise accounts
list of GwAccountInfo structures */
@@ -541,7 +542,7 @@ get_addressbook_names_from_server (gchar *source_url)
/*FIXME: This error message should be relocated to addressbook and should reflect
* that it actually failed to get the addressbooks*/
- e_error_run (NULL, "mail:gw-accountsetup-error", poa_address, NULL);
+ e_error_run (e_shell_get_active_window (NULL), "mail:gw-accountsetup-error", poa_address, NULL);
return NULL;
}
@@ -653,7 +654,7 @@ add_addressbook_sources (EAccount *account)
if (!is_frequent_contacts) {
/* display warning message */
- e_error_run (NULL, "addressbook:gw-book-list-init", NULL);
+ e_error_run (e_shell_get_active_window (NULL), "addressbook:gw-book-list-init", NULL);
}
return TRUE;
}
diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c
index 9581c0132b..1de2dfdead 100644
--- a/plugins/groupwise-features/mail-retract.c
+++ b/plugins/groupwise-features/mail-retract.c
@@ -79,7 +79,7 @@ gw_retract_mail_cb (GtkAction *action, EShellView *shell_view)
cnc = get_cnc (store);
if (cnc && E_IS_GW_CONNECTION(cnc)) {
- confirm_dialog = gtk_dialog_new_with_buttons (_("Message Retract"), NULL,
+ confirm_dialog = gtk_dialog_new_with_buttons (_("Message Retract"), GTK_WINDOW (e_shell_view_get_shell_window (shell_view)),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_YES, GTK_RESPONSE_YES,
GTK_STOCK_NO, GTK_RESPONSE_NO, NULL);
@@ -100,7 +100,7 @@ gw_retract_mail_cb (GtkAction *action, EShellView *shell_view)
if (n == GTK_RESPONSE_YES) {
if (e_gw_connection_retract_request (cnc, id, NULL, FALSE, FALSE) != E_GW_CONNECTION_STATUS_OK )
- e_error_run (NULL, "org.gnome.evolution.message.retract:retract-failure", NULL);
+ e_error_run (GTK_WINDOW (e_shell_view_get_shell_window (shell_view)), "org.gnome.evolution.message.retract:retract-failure", NULL);
else {
GtkWidget *dialog;
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Message retracted successfully"));
diff --git a/plugins/groupwise-features/process-meeting.c b/plugins/groupwise-features/process-meeting.c
index 90ac465a43..e1e5e185ee 100644
--- a/plugins/groupwise-features/process-meeting.c
+++ b/plugins/groupwise-features/process-meeting.c
@@ -31,6 +31,7 @@
#include <libecal/e-cal.h>
#include <e-util/e-error.h>
+#include <shell/e-shell-view.h>
#include <calendar/gui/e-calendar-view.h>
#include <calendar/gui/itip-utils.h>
@@ -175,7 +176,7 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status)
else
msg = "org.gnome.evolution.process_meeting:recurrence-decline";
- response = e_error_run (NULL, msg, NULL);
+ response = e_error_run (GTK_WINDOW (gtk_widget_get_toplevel ((GtkWidget *)cal_view)), msg, NULL);
if (response == GTK_RESPONSE_YES) {
icalproperty *prop;
const gchar *uid = icalcomponent_get_uid (r_data->icalcomp);
@@ -345,7 +346,7 @@ object_created_cb (CompEditor *ce, gpointer data)
gtk_widget_hide (GTK_WIDGET (ce));
- response = e_error_run (NULL, "org.gnome.evolution.process_meeting:resend-retract", NULL);
+ response = e_error_run (GTK_WINDOW (gtk_widget_get_toplevel ((GtkWidget *)ce)), "org.gnome.evolution.process_meeting:resend-retract", NULL);
if (response == GTK_RESPONSE_NO) {
free_thread_data (data);
return;
@@ -388,7 +389,7 @@ gw_resend_meeting_cb (GtkAction *action, EShellView *shell_view)
else
msg = "org.gnome.evolution.process_meeting:resend";
- response = e_error_run (NULL, msg, NULL);
+ response = e_error_run (GTK_WINDOW (e_shell_view_get_shell_window (shell_view)), msg, NULL);
if (response == GTK_RESPONSE_YES) {
mod = CALOBJ_MOD_ALL;
} else if (response == GTK_RESPONSE_CANCEL) {
diff --git a/plugins/groupwise-features/proxy-login.c b/plugins/groupwise-features/proxy-login.c
index f230a880d3..d4a4475a61 100644
--- a/plugins/groupwise-features/proxy-login.c
+++ b/plugins/groupwise-features/proxy-login.c
@@ -42,6 +42,7 @@
#include <e-util/e-icon-factory.h>
#include <e-util/e-util-private.h>
#include <e-util/e-account-utils.h>
+#include <shell/e-shell-view.h>
#include <e-gw-container.h>
#include <e-gw-connection.h>
@@ -274,7 +275,7 @@ proxy_login_get_cnc (EAccount *account, GtkWindow *password_dlg_parrent)
}
static void
-proxy_login_cb (GtkDialog *dialog, gint state)
+proxy_login_cb (GtkDialog *dialog, gint state, GtkWindow *parent)
{
GtkWidget *account_name_tbox;
proxyLoginPrivate *priv;
@@ -287,7 +288,7 @@ proxy_login_cb (GtkDialog *dialog, gint state)
switch (state) {
case GTK_RESPONSE_OK:
gtk_widget_destroy (priv->main);
- proxy_soap_login (proxy_name);
+ proxy_soap_login (proxy_name, parent);
g_object_unref (pld);
break;
case GTK_RESPONSE_CANCEL:
@@ -302,7 +303,7 @@ proxy_login_cb (GtkDialog *dialog, gint state)
}
static void
-proxy_soap_login (gchar *email)
+proxy_soap_login (gchar *email, GtkWindow *error_parent)
{
EAccountList *accounts = e_get_account_list ();
EAccount *srcAccount;
@@ -319,7 +320,7 @@ proxy_soap_login (gchar *email)
if (email[i]=='@')
name = g_strndup(email, i);
else {
- e_error_run (NULL, "org.gnome.evolution.proxy-login:invalid-user",email ,NULL);
+ e_error_run (error_parent, "org.gnome.evolution.proxy-login:invalid-user",email ,NULL);
return;
}
@@ -327,7 +328,7 @@ proxy_soap_login (gchar *email)
If so, it is violating the (li)unix philosophy of User creation. So dont care about that scenario*/
if (e_account_list_find (accounts, E_ACCOUNT_FIND_ID_ADDRESS, email) != NULL) {
- e_error_run (NULL, "org.gnome.evolution.proxy-login:already-loggedin", email, NULL);
+ e_error_run (error_parent, "org.gnome.evolution.proxy-login:already-loggedin", email, NULL);
g_free (name);
return;
}
@@ -362,7 +363,7 @@ proxy_soap_login (gchar *email)
g_free (parent_source_url);
camel_url_free (parent);
} else {
- e_error_run (NULL, "org.gnome.evolution.proxy-login:invalid-user",email ,NULL);
+ e_error_run (error_parent, "org.gnome.evolution.proxy-login:invalid-user",email ,NULL);
return;
}
@@ -524,7 +525,7 @@ gw_proxy_login_cb (GtkAction *action, EShellView *shell_view)
);
proxy_login_setup_tree_view ();
proxy_login_update_tree ();
- g_signal_connect (GTK_DIALOG (priv->main), "response", G_CALLBACK(proxy_login_cb), NULL);
+ g_signal_connect (GTK_DIALOG (priv->main), "response", G_CALLBACK(proxy_login_cb), e_shell_view_get_shell_window (shell_view));
gtk_widget_show (GTK_WIDGET (priv->main));
g_free (uri);
diff --git a/plugins/groupwise-features/proxy-login.h b/plugins/groupwise-features/proxy-login.h
index 150684c140..65e28cdf78 100644
--- a/plugins/groupwise-features/proxy-login.h
+++ b/plugins/groupwise-features/proxy-login.h
@@ -52,11 +52,10 @@ struct _proxyLoginClass {
GType proxy_login_get_type (void);
proxyLogin * proxy_login_new (void);
-static void proxy_login_cb (GtkDialog *dialog, gint state);
static void proxy_login_add_new_store (gchar *uri, CamelStore *store, gpointer user_data);
static void proxy_login_setup_tree_view (void);
proxyLogin* proxy_dialog_new (void);
-static void proxy_soap_login (gchar *email);
+static void proxy_soap_login (gchar *email, GtkWindow *error_parent);
gchar *parse_email_for_name (gchar *email);
static void proxy_login_update_tree (void);
static void proxy_login_tree_view_changed_cb(GtkDialog *dialog);
diff --git a/plugins/groupwise-features/proxy.c b/plugins/groupwise-features/proxy.c
index a31b49112b..545e98787d 100644
--- a/plugins/groupwise-features/proxy.c
+++ b/plugins/groupwise-features/proxy.c
@@ -301,7 +301,7 @@ proxy_get_permissions_from_dialog (EAccount *account)
}
static gint
-proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
+proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog, GtkWindow *parent)
{
GtkTreeIter iter;
GtkTreeSelection* account_select;
@@ -330,7 +330,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
tmp = destinations;
if (!tmp) {
- e_error_run (NULL, "org.gnome.evolution.proxy:no-user",NULL ,NULL);
+ e_error_run (parent, "org.gnome.evolution.proxy:no-user",NULL ,NULL);
return -1;
}
@@ -342,11 +342,11 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
continue;
if (g_strrstr (email, "@") == NULL) {
- e_error_run (NULL, "org.gnome.evolution.proxy:invalid-user", email, NULL);
+ e_error_run (parent, "org.gnome.evolution.proxy:invalid-user", email, NULL);
return -1;
}
if (! g_ascii_strcasecmp(e_gw_connection_get_user_email (prd->cnc), email)) {
- e_error_run (NULL, "org.gnome.evolution.proxy:invalid-user", email, NULL);
+ e_error_run (parent, "org.gnome.evolution.proxy:invalid-user", email, NULL);
return -1;
}
@@ -365,7 +365,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
return 0;
}
- e_error_run (NULL, "org.gnome.evolution.proxy:user-is-proxy",email ,NULL);
+ e_error_run (parent, "org.gnome.evolution.proxy:user-is-proxy",email ,NULL);
return -1;
}
}
@@ -792,7 +792,7 @@ proxy_add_ok (GtkWidget *button, EAccount *account)
prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
- if (proxy_dialog_store_widgets_data (account, PROXY_ADD_DIALOG) < 0)
+ if (proxy_dialog_store_widgets_data (account, PROXY_ADD_DIALOG, GTK_WINDOW (gtk_widget_get_toplevel (button))) < 0)
return;
proxy_update_tree_view (account);
@@ -809,7 +809,7 @@ proxy_edit_ok (GtkWidget *button, EAccount *account)
prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
- if ( proxy_dialog_store_widgets_data (account, PROXY_EDIT_DIALOG) < 0)
+ if ( proxy_dialog_store_widgets_data (account, PROXY_EDIT_DIALOG, GTK_WINDOW (gtk_widget_get_toplevel (button))) < 0)
return;
proxy_update_tree_view (account);
diff --git a/plugins/groupwise-features/share-folder.c b/plugins/groupwise-features/share-folder.c
index 67c58f05fd..62a832be0d 100644
--- a/plugins/groupwise-features/share-folder.c
+++ b/plugins/groupwise-features/share-folder.c
@@ -339,10 +339,10 @@ add_clicked(GtkButton *button, ShareFolder *sf)
email = e_destination_get_email (tmp->data);
/* You can't share a folder with yourself*/
if (g_strrstr (email, "@") == NULL || (!g_ascii_strcasecmp (email , self_email)))
- e_error_run (NULL, "org.gnome.evolution.mail_shared_folder:invalid-user",email ,NULL);
+ e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))), "org.gnome.evolution.mail_shared_folder:invalid-user",email ,NULL);
else {
if (!g_ascii_strcasecmp (email, "" )) {
- e_error_run (NULL, "org.gnome.evolution.mail_shared_folder:no-user",NULL);
+ e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))), "org.gnome.evolution.mail_shared_folder:no-user",NULL);
return;
}