2009-01-02 [colin] 3.7.0cvs9
authorColin Leroy <colin@colino.net>
Fri, 2 Jan 2009 11:47:30 +0000 (11:47 +0000)
committerColin Leroy <colin@colino.net>
Fri, 2 Jan 2009 11:47:30 +0000 (11:47 +0000)
* src/uri_opener.c
Show both link title and URI if possible

ChangeLog
PATCHSETS
configure.ac
src/uri_opener.c

index a0109b1..7186c04 100644 (file)
--- 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
index f16fc1f..db40238 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index d4c3810..57e520c 100644 (file)
@@ -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=
 
index d117672..5a488ce 100644 (file)
@@ -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("<b>%s</b>\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)