From c0a255eb90769638d57ae4122932f75c46e4e531 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 11 Sep 2008 15:34:29 +0000 Subject: Merge revisions 36016:36303 from trunk. svn path=/branches/kill-bonobo/; revision=36307 --- mail/em-format-html-display.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mail/em-format-html-display.h') diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h index be84decc11..651b981364 100644 --- a/mail/em-format-html-display.h +++ b/mail/em-format-html-display.h @@ -1,3 +1,22 @@ +/* + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * + */ /* Concrete class for formatting mails to displayed html -- cgit v1.2.3 From fd564be3203400024147469faaa7de0884861566 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 19 Feb 2009 01:36:04 +0000 Subject: Clean up the EMFormat stack. Add some GObject properties to bind to. Add some handy color conversion functions to e-util. svn path=/branches/kill-bonobo/; revision=37290 --- mail/em-format-html-display.h | 115 ++++++++++++++++++++++++++---------------- 1 file changed, 72 insertions(+), 43 deletions(-) (limited to 'mail/em-format-html-display.h') diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h index 651b981364..b659994114 100644 --- a/mail/em-format-html-display.h +++ b/mail/em-format-html-display.h @@ -22,35 +22,55 @@ Concrete class for formatting mails to displayed html */ -#ifndef _EM_FORMAT_HTML_DISPLAY_H -#define _EM_FORMAT_HTML_DISPLAY_H +#ifndef EM_FORMAT_HTML_DISPLAY_H +#define EM_FORMAT_HTML_DISPLAY_H #include "mail/em-format-html.h" #include "widgets/misc/e-attachment-bar.h" +/* Standard GObject macros */ +#define EM_TYPE_FORMAT_HTML_DISPLAY \ + (em_format_html_display_get_type ()) +#define EM_FORMAT_HTML_DISPLAY(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST \ + ((obj), EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplay)) +#define EM_FORMAT_HTML_DISPLAY_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_CAST \ + ((cls), EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayClass)) +#define EM_IS_FORMAT_HTML_DISPLAY(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE \ + ((obj), EM_TYPE_FORMAT_HTML_DISPLAY)) +#define EM_IS_FORMAT_HTML_DISPLAY_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_TYPE \ + ((cls), EM_TYPE_FORMAT_HTML_DISPLAY)) +#define EM_FORMAT_HTML_DISPLAY_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS \ + ((obj), EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayClass)) + +/* Search options */ +#define EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY (0) +#define EM_FORMAT_HTML_DISPLAY_SEARCH_SECONDARY (1) +#define EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE (1 << 8) + +G_BEGIN_DECLS + typedef struct _EMFormatHTMLDisplay EMFormatHTMLDisplay; typedef struct _EMFormatHTMLDisplayClass EMFormatHTMLDisplayClass; +typedef struct _EMFormatHTMLDisplayPrivate EMFormatHTMLDisplayPrivate; struct _CamelMimePart; struct _EMFormatHTMLDisplay { - EMFormatHTML formathtml; - - struct _EMFormatHTMLDisplayPrivate *priv; + EMFormatHTML parent; + EMFormatHTMLDisplayPrivate *priv; struct _ESearchingTokenizer *search_tok; - unsigned int animate:1; - unsigned int caret_mode:1; unsigned int nobar:1; }; -#define EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY (0) -#define EM_FORMAT_HTML_DISPLAY_SEARCH_SECONDARY (1) -#define EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE (1<<8) - struct _EMFormatHTMLDisplayClass { - EMFormatHTMLClass formathtml_class; + EMFormatHTMLClass parent_class; /* a link clicked normally */ void (*link_clicked)(EMFormatHTMLDisplay *efhd, const char *uri); @@ -60,34 +80,43 @@ struct _EMFormatHTMLDisplayClass { void (*on_url)(EMFormatHTMLDisplay *efhd, const char *uri); }; -GType em_format_html_display_get_type(void); -EMFormatHTMLDisplay *em_format_html_display_new(void); - -void em_format_html_display_goto_anchor(EMFormatHTMLDisplay *efhd, const char *name); - -void em_format_html_display_set_animate(EMFormatHTMLDisplay *efhd, gboolean state); -void em_format_html_display_set_caret_mode(EMFormatHTMLDisplay *efhd, gboolean state); - -void em_format_html_display_set_search(EMFormatHTMLDisplay *efhd, int type, GSList *strings); -void em_format_html_display_search(EMFormatHTMLDisplay *efhd); -void em_format_html_display_search_with (EMFormatHTMLDisplay *efhd, char *word); -void em_format_html_display_search_close (EMFormatHTMLDisplay *efhd); - -GtkWidget *em_format_html_get_search_dialog (EMFormatHTMLDisplay *efhd); - -void em_format_html_display_cut (EMFormatHTMLDisplay *efhd); -void em_format_html_display_copy (EMFormatHTMLDisplay *efhd); -void em_format_html_display_paste (EMFormatHTMLDisplay *efhd); - -void em_format_html_display_zoom_in (EMFormatHTMLDisplay *efhd); -void em_format_html_display_zoom_out (EMFormatHTMLDisplay *efhd); -void em_format_html_display_zoom_reset (EMFormatHTMLDisplay *efhd); -EAttachmentBar *em_format_html_display_get_bar (EMFormatHTMLDisplay *efhd); - -gboolean em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd); - -/* experimental */ -struct _EPopupExtension; -void em_format_html_display_set_popup(EMFormatHTMLDisplay *, struct _EPopupExtension *); - -#endif /* !_EM_FORMAT_HTML_DISPLAY_H */ +GType em_format_html_display_get_type (void); +EMFormatHTMLDisplay * + em_format_html_display_new (void); +gboolean em_format_html_display_get_animate + (EMFormatHTMLDisplay *efhd); +void em_format_html_display_set_animate + (EMFormatHTMLDisplay *efhd, + gboolean animate); +gboolean em_format_html_display_get_caret_mode + (EMFormatHTMLDisplay *efhd); +void em_format_html_display_set_caret_mode + (EMFormatHTMLDisplay *efhd, + gboolean caret_mode); +void em_format_html_display_set_search + (EMFormatHTMLDisplay *efhd, + int type, + GSList *strings); +void em_format_html_display_search (EMFormatHTMLDisplay *efhd); +void em_format_html_display_search_with + (EMFormatHTMLDisplay *efhd, + char *word); +void em_format_html_display_search_close + (EMFormatHTMLDisplay *efhd); +GtkWidget * em_format_html_get_search_dialog(EMFormatHTMLDisplay *efhd); +void em_format_html_display_cut (EMFormatHTMLDisplay *efhd); +void em_format_html_display_copy (EMFormatHTMLDisplay *efhd); +void em_format_html_display_paste (EMFormatHTMLDisplay *efhd); + +void em_format_html_display_zoom_in (EMFormatHTMLDisplay *efhd); +void em_format_html_display_zoom_out (EMFormatHTMLDisplay *efhd); +void em_format_html_display_zoom_reset + (EMFormatHTMLDisplay *efhd); +EAttachmentBar *em_format_html_display_get_bar (EMFormatHTMLDisplay *efhd); + +gboolean em_format_html_display_popup_menu + (EMFormatHTMLDisplay *efhd); + +G_END_DECLS + +#endif /* EM_FORMAT_HTML_DISPLAY_H */ -- cgit v1.2.3 From 08b1d0ae8e36ef20da800bf6358ca0cd9fb4e026 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 1 Mar 2009 13:16:31 +0000 Subject: Split the interactive parts of the message display out of EMFormatHTMLDisplay to a new GtkHTML subclass named EMailDisplay, and have EMFormatHTML create an instance of that. EMailDisplay will handle link clicking, mousing over URIs, popup menus, and interactive search. This makes EMFormatHTMLDisplay and EMailReader more lightweight. Clean up more of the EMFormat stack. svn path=/branches/kill-bonobo/; revision=37346 --- mail/em-format-html-display.h | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'mail/em-format-html-display.h') diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h index b659994114..a74d87207b 100644 --- a/mail/em-format-html-display.h +++ b/mail/em-format-html-display.h @@ -25,8 +25,9 @@ #ifndef EM_FORMAT_HTML_DISPLAY_H #define EM_FORMAT_HTML_DISPLAY_H -#include "mail/em-format-html.h" -#include "widgets/misc/e-attachment-bar.h" +#include +#include +#include /* Standard GObject macros */ #define EM_TYPE_FORMAT_HTML_DISPLAY \ @@ -58,41 +59,32 @@ typedef struct _EMFormatHTMLDisplay EMFormatHTMLDisplay; typedef struct _EMFormatHTMLDisplayClass EMFormatHTMLDisplayClass; typedef struct _EMFormatHTMLDisplayPrivate EMFormatHTMLDisplayPrivate; -struct _CamelMimePart; - struct _EMFormatHTMLDisplay { EMFormatHTML parent; EMFormatHTMLDisplayPrivate *priv; struct _ESearchingTokenizer *search_tok; - - unsigned int nobar:1; }; struct _EMFormatHTMLDisplayClass { EMFormatHTMLClass parent_class; /* a link clicked normally */ - void (*link_clicked)(EMFormatHTMLDisplay *efhd, const char *uri); + void (*link_clicked) (EMFormatHTMLDisplay *efhd, + const gchar *uri); /* a part or a link button pressed event */ - int (*popup_event)(EMFormatHTMLDisplay *efhd, GdkEventButton *event, const char *uri, struct _CamelMimePart *part); + gint (*popup_event) (EMFormatHTMLDisplay *efhd, + GdkEventButton *event, + const gchar *uri, + CamelMimePart *part); /* the mouse is over a link */ - void (*on_url)(EMFormatHTMLDisplay *efhd, const char *uri); + void (*on_url) (EMFormatHTMLDisplay *efhd, + const gchar *uri); }; GType em_format_html_display_get_type (void); EMFormatHTMLDisplay * em_format_html_display_new (void); -gboolean em_format_html_display_get_animate - (EMFormatHTMLDisplay *efhd); -void em_format_html_display_set_animate - (EMFormatHTMLDisplay *efhd, - gboolean animate); -gboolean em_format_html_display_get_caret_mode - (EMFormatHTMLDisplay *efhd); -void em_format_html_display_set_caret_mode - (EMFormatHTMLDisplay *efhd, - gboolean caret_mode); void em_format_html_display_set_search (EMFormatHTMLDisplay *efhd, int type, -- cgit v1.2.3 From 85d0142d21286ce87cd5f6c3d1e2f71aa994151f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 2 Mar 2009 03:14:42 +0000 Subject: Move text searching UI into a new EMailSearchBar widget. svn path=/branches/kill-bonobo/; revision=37351 --- mail/em-format-html-display.h | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'mail/em-format-html-display.h') diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h index a74d87207b..2577b039e7 100644 --- a/mail/em-format-html-display.h +++ b/mail/em-format-html-display.h @@ -48,11 +48,6 @@ (G_TYPE_INSTANCE_GET_CLASS \ ((obj), EM_TYPE_FORMAT_HTML_DISPLAY, EMFormatHTMLDisplayClass)) -/* Search options */ -#define EM_FORMAT_HTML_DISPLAY_SEARCH_PRIMARY (0) -#define EM_FORMAT_HTML_DISPLAY_SEARCH_SECONDARY (1) -#define EM_FORMAT_HTML_DISPLAY_SEARCH_ICASE (1 << 8) - G_BEGIN_DECLS typedef struct _EMFormatHTMLDisplay EMFormatHTMLDisplay; @@ -68,34 +63,11 @@ struct _EMFormatHTMLDisplay { struct _EMFormatHTMLDisplayClass { EMFormatHTMLClass parent_class; - - /* a link clicked normally */ - void (*link_clicked) (EMFormatHTMLDisplay *efhd, - const gchar *uri); - /* a part or a link button pressed event */ - gint (*popup_event) (EMFormatHTMLDisplay *efhd, - GdkEventButton *event, - const gchar *uri, - CamelMimePart *part); - /* the mouse is over a link */ - void (*on_url) (EMFormatHTMLDisplay *efhd, - const gchar *uri); }; GType em_format_html_display_get_type (void); EMFormatHTMLDisplay * em_format_html_display_new (void); -void em_format_html_display_set_search - (EMFormatHTMLDisplay *efhd, - int type, - GSList *strings); -void em_format_html_display_search (EMFormatHTMLDisplay *efhd); -void em_format_html_display_search_with - (EMFormatHTMLDisplay *efhd, - char *word); -void em_format_html_display_search_close - (EMFormatHTMLDisplay *efhd); -GtkWidget * em_format_html_get_search_dialog(EMFormatHTMLDisplay *efhd); void em_format_html_display_cut (EMFormatHTMLDisplay *efhd); void em_format_html_display_copy (EMFormatHTMLDisplay *efhd); void em_format_html_display_paste (EMFormatHTMLDisplay *efhd); -- cgit v1.2.3 From 4cec9fc7169dc3b810321555a70cda916720867d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 20 Mar 2009 19:06:59 +0000 Subject: Saving progress on a massive attachment handling rewrite. svn path=/branches/kill-bonobo/; revision=37465 --- mail/em-format-html-display.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'mail/em-format-html-display.h') diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h index 2577b039e7..9cfdb03780 100644 --- a/mail/em-format-html-display.h +++ b/mail/em-format-html-display.h @@ -27,7 +27,6 @@ #include #include -#include /* Standard GObject macros */ #define EM_TYPE_FORMAT_HTML_DISPLAY \ @@ -76,7 +75,6 @@ void em_format_html_display_zoom_in (EMFormatHTMLDisplay *efhd); void em_format_html_display_zoom_out (EMFormatHTMLDisplay *efhd); void em_format_html_display_zoom_reset (EMFormatHTMLDisplay *efhd); -EAttachmentBar *em_format_html_display_get_bar (EMFormatHTMLDisplay *efhd); gboolean em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd); -- cgit v1.2.3 From da68ab65008bff803a3ea7940fa861c7cb055d08 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 2 Apr 2009 21:12:13 +0000 Subject: Split the attachment button into a separate widget that integrates with EAttachmentView and EAttachmentStore. Clicking the button works, but I still have to finish the pop-up menu and drag-and-drop. Kill e-util/e-gui-utils.c: e_icon_for_mime_type() replaced by g_content_type_get_icon() svn path=/branches/kill-bonobo/; revision=37491 --- mail/em-format-html-display.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'mail/em-format-html-display.h') diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h index 9cfdb03780..7554053e37 100644 --- a/mail/em-format-html-display.h +++ b/mail/em-format-html-display.h @@ -25,7 +25,6 @@ #ifndef EM_FORMAT_HTML_DISPLAY_H #define EM_FORMAT_HTML_DISPLAY_H -#include #include /* Standard GObject macros */ @@ -67,17 +66,6 @@ struct _EMFormatHTMLDisplayClass { GType em_format_html_display_get_type (void); EMFormatHTMLDisplay * em_format_html_display_new (void); -void em_format_html_display_cut (EMFormatHTMLDisplay *efhd); -void em_format_html_display_copy (EMFormatHTMLDisplay *efhd); -void em_format_html_display_paste (EMFormatHTMLDisplay *efhd); - -void em_format_html_display_zoom_in (EMFormatHTMLDisplay *efhd); -void em_format_html_display_zoom_out (EMFormatHTMLDisplay *efhd); -void em_format_html_display_zoom_reset - (EMFormatHTMLDisplay *efhd); - -gboolean em_format_html_display_popup_menu - (EMFormatHTMLDisplay *efhd); G_END_DECLS -- cgit v1.2.3 From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- mail/em-format-html-display.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/em-format-html-display.h') diff --git a/mail/em-format-html-display.h b/mail/em-format-html-display.h index 99234e9c1e..bd0ea0edd3 100644 --- a/mail/em-format-html-display.h +++ b/mail/em-format-html-display.h @@ -11,7 +11,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see + * License along with the program; if not, see * * * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) -- cgit v1.2.3