aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-tasks.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-12-10 05:26:53 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-12-10 05:26:53 +0800
commit3bb567307b06a04c5df4057615c27a3a74a4b732 (patch)
tree7f69646d534e9daafbf59b8cf96d39e320640893 /calendar/gui/e-tasks.c
parent4f476ec48a182f891ea5a6db2908429b9110badb (diff)
downloadgsoc2013-evolution-3bb567307b06a04c5df4057615c27a3a74a4b732.tar
gsoc2013-evolution-3bb567307b06a04c5df4057615c27a3a74a4b732.tar.gz
gsoc2013-evolution-3bb567307b06a04c5df4057615c27a3a74a4b732.tar.bz2
gsoc2013-evolution-3bb567307b06a04c5df4057615c27a3a74a4b732.tar.lz
gsoc2013-evolution-3bb567307b06a04c5df4057615c27a3a74a4b732.tar.xz
gsoc2013-evolution-3bb567307b06a04c5df4057615c27a3a74a4b732.tar.zst
gsoc2013-evolution-3bb567307b06a04c5df4057615c27a3a74a4b732.zip
Fixes #35003
2002-12-06 Rodrigo Moya <rodrigo@ximian.com> Fixes #35003 * gui/misc.[ch] (get_uri_without_password): new function for removing the password from the CalClient's uris. * gui/gnome-cal.c (client_cal_opened_cb): use the URI returned by get_uri_without_password for messages. (backend_error_cb): likewise. (backend_died_cb): likewise. (gnome_calendar_open): likewise. (open_error, method_error, permission_error): likewise. * gui/e-tasks.c (e_tasks_open): hide the password from the URI being displayed in messages. (backend_error_cb): likewise. svn path=/trunk/; revision=19070
Diffstat (limited to 'calendar/gui/e-tasks.c')
-rw-r--r--calendar/gui/e-tasks.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 6675a1e298..9b99bea23b 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -35,6 +35,7 @@
#include "cal-search-bar.h"
#include "calendar-config.h"
#include "component-factory.h"
+#include "misc.h"
#include "e-tasks.h"
@@ -336,6 +337,7 @@ e_tasks_open (ETasks *tasks,
char *message;
EUri *uri;
char *real_uri;
+ char *urinopwd;
g_return_val_if_fail (tasks != NULL, FALSE);
g_return_val_if_fail (E_IS_TASKS (tasks), FALSE);
@@ -349,9 +351,11 @@ e_tasks_open (ETasks *tasks,
else
real_uri = g_strdup (file);
- message = g_strdup_printf (_("Opening tasks at %s"), real_uri);
+ urinopwd = get_uri_without_password (real_uri);
+ message = g_strdup_printf (_("Opening tasks at %s"), urinopwd);
set_status_message (tasks, message);
g_free (message);
+ g_free (urinopwd);
if (!cal_client_open_calendar (priv->client, real_uri, FALSE)) {
g_message ("e_tasks_open(): Could not issue the request");
@@ -374,10 +378,13 @@ load_error (ETasks *tasks,
const char *uri)
{
char *msg;
+ char *urinopwd;
- msg = g_strdup_printf (_("Could not load the tasks in `%s'"), uri);
+ urinopwd = get_uri_without_password (uri);
+ msg = g_strdup_printf (_("Could not load the tasks in `%s'"), urinopwd);
gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
g_free (msg);
+ g_free (urinopwd);
}
/* Displays an error to indicate that the specified URI method is not supported */
@@ -386,10 +393,13 @@ method_error (ETasks *tasks,
const char *uri)
{
char *msg;
+ char *urinopwd;
- msg = g_strdup_printf (_("The method required to load `%s' is not supported"), uri);
+ urinopwd = get_uri_without_password (uri);
+ msg = g_strdup_printf (_("The method required to load `%s' is not supported"), urinopwd);
gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
g_free (msg);
+ g_free (urinopwd);
}
/* Displays an error to indicate permission problems */
@@ -397,10 +407,13 @@ static void
permission_error (ETasks *tasks, const char *uri)
{
char *msg;
+ char *urinopwd;
- msg = g_strdup_printf (_("You don't have permission to open the folder in `%s'"), uri);
+ urinopwd = get_uri_without_password (uri);
+ msg = g_strdup_printf (_("You don't have permission to open the folder in `%s'"), urinopwd);
gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
g_free (msg);
+ g_free (urinopwd);
}
/* Callback from the calendar client when a calendar is opened */
@@ -459,13 +472,16 @@ backend_error_cb (CalClient *client, const char *message, gpointer data)
ETasks *tasks;
ETasksPrivate *priv;
char *errmsg;
+ char *urinopwd;
tasks = E_TASKS (data);
priv = tasks->priv;
- errmsg = g_strdup_printf (_("Error on %s:\n %s"), cal_client_get_uri (client), message);
+ urinopwd = get_uri_without_password (cal_client_get_uri (client));
+ errmsg = g_strdup_printf (_("Error on %s:\n %s"), urinopwd, message);
gnome_error_dialog_parented (errmsg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
g_free (errmsg);
+ g_free (urinopwd);
}
/**