Commits

jjacky committed f622ef3

news: text of links is now shown in blue, as are URLs

  • Participants
  • Parent commits 4dcb205

Comments (0)

Files changed (1)

                 links[nb_links] = link + 1;
                 link = strchr (links[nb_links], '"');
                 *link = '\0';
+                tags = alpm_list_add (tags, (void *) "link");
             }
         }
         else if (strcmp (start + 1, "/a") == 0)
             insert_text_with_tags ();
             if (link)
             {
+                tags = alpm_list_remove_str (tags, "link", NULL);
                 snprintf (buf, 10, "[%d]", nb_links);
                 gtk_text_buffer_insert (buffer, &iter, buf, -1);
                 link = NULL;
     /* add links info */
     if (nb_links)
     {
+        tags = alpm_list_add (tags, (void *) "link");
         for (c = 1; c <= nb_links; ++c)
         {
             snprintf (buf, 10, "\n[%d] ", c);
             /* links on Arch's website don't always include the http:// part */
             if (links[c][0] == '/')
             {
-                gtk_text_buffer_insert (buffer, &iter, "http://www.archlinux.org", -1);
+                ss = (gchar *) "http://www.archlinux.org";
+                insert_text_with_tags ();
             }
-            gtk_text_buffer_insert (buffer, &iter, links[c], -1);
+            ss = links[c];
+            insert_text_with_tags ();
         }
+        tags = alpm_list_remove_str (tags, "link", NULL);
         gtk_text_buffer_insert (buffer, &iter, "\n", -1);
         free (links);
     }
         "foreground-rgba",  &color,
         NULL);
     
+    gtk_text_buffer_create_tag (buffer, "link",
+        "foreground-rgba",  &color,
+        NULL);
+    
     gtk_text_buffer_create_tag (buffer, "bold",
         "weight",           800,
         NULL);