diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 13 | ||||
-rw-r--r-- | calendar/gui/e-cal-component-preview.c | 15 |
2 files changed, 10 insertions, 18 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index f3d9eb7b34..3b7f2c5385 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -1945,7 +1945,6 @@ open_attachment (EAttachmentBar *bar, CompEditor *editor) GList *p; int num; char *attach_file_url; - GError *error = NULL; if (E_IS_ATTACHMENT_BAR (bar)) { icon_list = GNOME_ICON_LIST (bar); @@ -1970,11 +1969,7 @@ open_attachment (EAttachmentBar *bar, CompEditor *editor) attach_file_url = g_build_path ("/", local_store, filename, NULL); /* launch the url now */ - /* TODO should send GError and handle error conditions - * here */ - gnome_url_show (attach_file_url, &error); - if (error) - g_message ("DEBUG: gnome_url_show(%s) failed\n", attach_file_url); + e_show_uri (GTK_WINDOW (editor), attach_file_url); g_free (filename); g_free (attach_file_url); } @@ -2587,11 +2582,15 @@ comp_editor_get_managed_widget (CompEditor *editor, CompEditor * comp_editor_find_instance (const gchar *uid) { + GList *link; + g_return_val_if_fail (uid != NULL, NULL); - return g_list_find_custom ( + link = g_list_find_custom ( active_editors, uid, (GCompareFunc) comp_editor_compare); + + return (link != NULL) ? link->data : NULL; } /** diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c index 8d3a903119..d75f06c41e 100644 --- a/calendar/gui/e-cal-component-preview.c +++ b/calendar/gui/e-cal-component-preview.c @@ -31,6 +31,7 @@ #include <libedataserver/e-categories.h> #include <gtkhtml/gtkhtml-stream.h> #include <libedataserver/e-time-utils.h> +#include <e-util/e-util.h> #include <e-util/e-categories-config.h> #include "calendar-config.h" #include <camel/camel-mime-filter-tohtml.h> @@ -47,18 +48,10 @@ static gpointer parent_class; static void cal_component_preview_link_clicked (GtkHTML *html, - const gchar *url) + const gchar *uri) { - GdkScreen *screen; - GError *error = NULL; - - screen = gtk_widget_get_screen (GTK_WIDGET (html)); - gtk_show_uri (screen, url, GDK_CURRENT_TIME, &error); - - if (error != NULL) { - g_warning ("%s", error->message); - g_error_free (error); - } + /* FIXME Pass a parent window. */ + e_show_uri (NULL, uri); } static void |