+ /* Add the new tag to the tag table of the textbuffer */
+ GtkTextBuffer *textbuffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(str->window->widget) );
+ GtkTextTagTable *tags = gtk_text_buffer_get_tag_table(textbuffer);
+ gtk_text_tag_table_add(tags, new_hyperlink->tag);
+
+ gint *linkval_pointer = g_new0(gint, 1);
+ *linkval_pointer = linkval;
+ g_hash_table_insert(str->window->hyperlinks, linkval_pointer, new_hyperlink);
+ }
+
+ str->hyperlink_mode = TRUE;
+ str->window->current_hyperlink = new_hyperlink;
+}
+
+/* Internal function used to iterate over all the hyperlinks, unblocking the event handler */
+void
+hyperlink_unblock_event_handler(gpointer key, gpointer value, gpointer user_data)
+{
+ hyperlink_t *link = (hyperlink_t *) value;
+ g_signal_handler_unblock(link->tag, link->event_handler);
+}
+
+/* Internal function used to iterate over all the hyperlinks, blocking the event handler */
+void
+hyperlink_block_event_handler(gpointer key, gpointer value, gpointer user_data)
+{
+ hyperlink_t *link = (hyperlink_t *) value;
+ g_signal_handler_block(link->tag, link->event_handler);