aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-01-11 21:55:04 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-01-11 21:55:04 +0800
commit2b820fc4e2d6404ca281e279761cd5f877fdbf54 (patch)
tree58ca39179f9e117dea79e67217e53303ea1f996b /widgets/misc
parent577f9fdffbbb9e57b44b0290f1aea8088c6f0976 (diff)
downloadgsoc2013-evolution-2b820fc4e2d6404ca281e279761cd5f877fdbf54.tar.gz
gsoc2013-evolution-2b820fc4e2d6404ca281e279761cd5f877fdbf54.tar.zst
gsoc2013-evolution-2b820fc4e2d6404ca281e279761cd5f877fdbf54.zip
New convenience function calls gtk_show_uri() and displays an error dialog
2009-01-11 Matthew Barnes <mbarnes@redhat.com> * e-util/e-util.c (e_show_uri): New convenience function calls gtk_show_uri() and displays an error dialog if the URI cannot be shown. * addressbook/gui/widgets/eab-contact-display.c (eab_uri_popup_link_open), (on_link_clicked): * calendar/gui/e-cal-component-preview (on_link_clicked): * calendar/gui/e-cal-component-memo-preview (on_link_clicked): * calendar/gui/e-memo-table.c (open_url_cb): * calendar/gui/dialogs/comp-editor.c (open_attachment): * composer/e-msg-composer.c (msg_composer_link_clicked): * mail/em-folder-view.c (emfv_format_link_clicked): * mail/em-popup.c (emp_uri_popup_link_open): * plugins/mailing-list-actions/mailing-list-actions.c (emla_list_action_do): * shell/e-shell-window-commands.c (command_open_faq): * widgets/misc/e-attachment-bar.c (eab_icon_clicked_cb): * widgets/misc/e-url-entry.c (button_clicked_cb): Call e_show_uri() instead of gnome_url_show(). * e-util/e-error.c (ee_response): Call e_display_help() instead of gnome_url_show(). * mail/em-config.c: * mail/em-menu.c: Remove unneeded #include <libgnome/gnome-url.h> svn path=/trunk/; revision=37037
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/ChangeLog6
-rw-r--r--widgets/misc/e-attachment-bar.c10
-rw-r--r--widgets/misc/e-url-entry.c8
3 files changed, 14 insertions, 10 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 9028c17408..e8c1a5023d 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-11 Matthew Barnes <mbarnes@redhat.com>
+
+ * e-attachment-bar.c (eab_icon_clicked_cb):
+ * e-url-entry.c (button_clicked_cb):
+ Call e_show_uri() instead of gnome_url_show().
+
2009-01-10 Matthew Barnes <mbarnes@redhat.com>
* test-dropdown-button.c:
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index bdb6852e13..2da9d3541c 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -993,7 +993,6 @@ static gboolean
eab_icon_clicked_cb (EAttachmentBar *bar, GdkEvent *event, gpointer *dummy)
{
EAttachment *attachment;
- GError *error = NULL;
gboolean ret = FALSE;
CamelURL *url;
char *path;
@@ -1015,13 +1014,8 @@ eab_icon_clicked_cb (EAttachmentBar *bar, GdkEvent *event, gpointer *dummy)
g_free (path);
}
- /* launch the url now */
- gnome_url_show (attachment->store_uri, &error);
- if (error) {
- g_message ("DEBUG: Launch failed: %s\n", error->message);
- g_error_free (error);
- error = NULL;
- }
+ /* FIXME Pass a parent window. */
+ e_show_uri (NULL, attachment->store_uri);
ret = TRUE;
}
diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c
index 26d081fc85..32490f6590 100644
--- a/widgets/misc/e-url-entry.c
+++ b/widgets/misc/e-url-entry.c
@@ -25,9 +25,9 @@
#endif
#include <gtk/gtk.h>
-#include <libgnome/gnome-url.h>
#include <glib/gi18n.h>
#include "e-url-entry.h"
+#include "e-util/e-util.h"
struct _EUrlEntryPrivate {
GtkWidget *entry;
@@ -170,11 +170,15 @@ button_clicked_cb (GtkWidget *widget, gpointer data)
{
EUrlEntry *url_entry;
EUrlEntryPrivate *priv;
+ const gchar *uri;
url_entry = E_URL_ENTRY (data);
priv = url_entry->priv;
- gnome_url_show (gtk_entry_get_text (GTK_ENTRY (priv->entry)), NULL);
+ uri = gtk_entry_get_text (GTK_ENTRY (priv->entry));
+
+ /* FIXME Pass a parent window. */
+ e_show_uri (NULL, uri);
}
static void