2011-11-07 [pawel] 3.7.10cvs77
[claws.git] / src / textview.h
index 01e0ae45b2065bb3a3b8cf079b1f73a0afb46b8b..4d3432d1a15aeefaf639b2220e811ba056e90de5 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2011 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #ifndef __TEXTVIEW_H__
@@ -25,8 +25,7 @@
 #endif
 
 #include <glib.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtktextiter.h>
+#include <gtk/gtk.h>
 
 typedef struct _TextView       TextView;
 typedef struct _ClickableText  ClickableText;
@@ -57,12 +56,13 @@ struct _TextView
        GtkWidget *scrolledwin;
        GtkWidget *text;
 
+       GtkUIManager *ui_manager;
+       GtkActionGroup *link_action_group;
        GtkWidget *link_popup_menu;
-       GtkItemFactory *link_popup_factory;
+       GtkActionGroup *mail_action_group;
        GtkWidget *mail_popup_menu;
-       GtkItemFactory *mail_popup_factory;
+       GtkActionGroup *file_action_group;
        GtkWidget *file_popup_menu;
-       GtkItemFactory *file_popup_factory;
 
        gboolean default_text;
        gboolean is_in_signature;
@@ -81,15 +81,13 @@ struct _TextView
        GtkWidget *image;
        gboolean loading;
        gboolean stop_loading;
+       gint prev_quote_level;
 };
 
 TextView *textview_create              (void);
 void textview_init                     (TextView       *textview);
 void textview_reflect_prefs            (TextView       *textview);
 
-void textview_show_message     (TextView       *textview,
-                                MimeInfo       *mimeinfo,
-                                const gchar    *file);
 void textview_show_part                (TextView       *textview,
                                 MimeInfo       *mimeinfo,
                                 FILE           *fp);
@@ -110,6 +108,8 @@ void textview_scroll_one_line       (TextView       *textview,
                                 gboolean        up);
 gboolean textview_scroll_page  (TextView       *textview,
                                 gboolean        up);
+void textview_scroll_max       (TextView       *textview,
+                                gboolean        up);
 
 gboolean textview_search_string                        (TextView       *textview,
                                                 const gchar    *str,
@@ -123,12 +123,21 @@ void textview_show_icon(TextView *textview, const gchar *stock_id);
 void textview_get_selection_offsets    (TextView       *textview, 
                                         gint           *sel_start, 
                                         gint           *sel_end);
+gboolean textview_uri_security_check   (TextView       *textview, 
+                                        ClickableText  *uri);
+gchar *textview_get_visible_uri                (TextView       *textview, 
+                                        ClickableText  *uri);
 
 #define TEXTVIEW_INSERT(str) \
        gtk_text_buffer_insert_with_tags_by_name \
                                (buffer, &iter, str, -1,\
                                 "header", NULL)
 
+#define TEXTVIEW_INSERT_BOLD(str) \
+       gtk_text_buffer_insert_with_tags_by_name \
+                               (buffer, &iter, str, -1,\
+                                "header", "header_title", NULL)
+
 #define TEXTVIEW_INSERT_LINK(str, fname, udata) {                              \
        ClickableText *uri;                                                     \
        uri = g_new0(ClickableText, 1);                                 \