From 19079cdadef2e2b926c16077e7ee4c4cf5be04c5 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Fri, 2 Jan 2009 11:47:30 +0000 Subject: [PATCH] 2009-01-02 [colin] 3.7.0cvs9 * src/uri_opener.c Show both link title and URI if possible --- ChangeLog | 5 +++++ PATCHSETS | 1 + configure.ac | 2 +- src/uri_opener.c | 14 +++++++++++--- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0109b1c0..7186c0468 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-02 [colin] 3.7.0cvs9 + + * src/uri_opener.c + Show both link title and URI if possible + 2009-01-02 [colin] 3.7.0cvs8 * src/addressadd.c diff --git a/PATCHSETS b/PATCHSETS index f16fc1ff7..db4023853 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -3670,3 +3670,4 @@ ( cvs diff -u -r 1.150.2.110 -r 1.150.2.111 src/procmsg.c; ) > 3.7.0cvs6.patchset ( cvs diff -u -r 1.96.2.212 -r 1.96.2.213 src/textview.c; ) > 3.7.0cvs7.patchset ( cvs diff -u -r 1.9.2.26 -r 1.9.2.27 src/addressadd.c; cvs diff -u -r 1.60.2.126 -r 1.60.2.127 src/addressbook.c; cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/addressbook_foldersel.c; cvs diff -u -r 1.5.2.12 -r 1.5.2.13 src/addressitem.h; cvs diff -u -r 1.207.2.207 -r 1.207.2.208 src/folderview.c; cvs diff -u -r 1.14.2.22 -r 1.14.2.23 src/grouplistdialog.c; cvs diff -u -r 1.14.2.20 -r 1.14.2.21 src/importldif.c; cvs diff -u -r 1.83.2.149 -r 1.83.2.150 src/mimeview.c; cvs diff -u -r 1.5.2.21 -r 1.5.2.22 src/noticeview.c; cvs diff -u -r 1.3.2.60 -r 1.3.2.61 src/prefs_themes.c; cvs diff -u -r 1.395.2.402 -r 1.395.2.403 src/summaryview.c; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/gtk/gtkcmclist.c; cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/gtk/gtkcmclist.h; cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/gtk/gtkcmctree.c; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/gtk/gtkcmctree.h; cvs diff -u -r 1.1.4.52 -r 1.1.4.53 src/gtk/gtksctree.c; cvs diff -u -r 1.1.4.15 -r 1.1.4.16 src/gtk/gtksctree.h; cvs diff -u -r 1.14.2.66 -r 1.14.2.67 src/plugins/trayicon/trayicon.c; ) > 3.7.0cvs8.patchset +( cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/uri_opener.c; ) > 3.7.0cvs9.patchset diff --git a/configure.ac b/configure.ac index d4c38100b..57e520c6a 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=7 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=8 +EXTRA_VERSION=9 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/uri_opener.c b/src/uri_opener.c index d117672aa..5a488ce39 100644 --- a/src/uri_opener.c +++ b/src/uri_opener.c @@ -122,7 +122,7 @@ static void uri_opener_create_list_view_columns(GtkWidget *list_view) column = gtk_tree_view_column_new_with_attributes (_("Available URLs:"), renderer, - "text", URI_OPENER_URL, + "markup", URI_OPENER_URL, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column); } @@ -241,20 +241,28 @@ static void uri_opener_list_view_insert_uri(GtkWidget *list_view, (GTK_TREE_VIEW(list_view))); gchar *visible = textview_get_visible_uri(opener.msgview->mimeview->textview, uri); + gchar *label = NULL; + + if (visible && strcmp(visible, uri->uri)) + label = g_markup_printf_escaped("%s\n%s", visible, uri->uri); + else + label = g_markup_printf_escaped("\n%s", uri->uri); + if (row_iter == NULL) { /* append new */ gtk_list_store_append(list_store, &iter); gtk_list_store_set(list_store, &iter, - URI_OPENER_URL, visible?visible:uri->uri, + URI_OPENER_URL, label, URI_OPENER_DATA, uri, -1); } else { gtk_list_store_set(list_store, row_iter, - URI_OPENER_URL, visible?visible:uri->uri, + URI_OPENER_URL, label, URI_OPENER_DATA, uri, -1); } g_free(visible); + g_free(label); } static void uri_opener_list_view_clear_uris(GtkWidget *list_view) -- 2.25.1