[evolution/wip/webkit-composer] Rename EMailImageLoadingPolicy to EImageLoadingPolicy and move it from EmFormat from EUtil



commit 7332ea77042868302079568ea8198e5527e39ce2
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Mar 14 13:02:53 2014 +0100

    Rename EMailImageLoadingPolicy to EImageLoadingPolicy and move it from EmFormat from EUtil

 e-util/e-util-enums.h                    |   18 ++++++++++++++++++
 em-format/e-mail-formatter-enums.h       |   18 ------------------
 em-format/e-mail-formatter.c             |   10 +++++-----
 em-format/e-mail-formatter.h             |    4 ++--
 mail/e-http-request.c                    |    6 +++---
 mail/e-mail-display.c                    |    8 ++++----
 modules/mail/em-mailer-prefs.c           |   12 ++++++------
 modules/settings/e-settings-deprecated.c |    2 +-
 8 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/e-util/e-util-enums.h b/e-util/e-util-enums.h
index 4ccc970..78dfa52 100644
--- a/e-util/e-util-enums.h
+++ b/e-util/e-util-enums.h
@@ -327,6 +327,24 @@ typedef enum {
        E_EDITOR_WIDGET_COMMAND_USE_CSS
 } EEditorWidgetCommand;
 
+/**
+ * EImageLoadingPolicy:
+ * @E_IMAGE_LOADING_POLICY_NEVER:
+ *   Never load images from a remote server.
+ * @E_IMAGE_LOADING_POLICY_SOMETIMES:
+ *   Only load images from a remote server if the sender is a known contact.
+ * @E_IMAGE_LOADING_POLICY_ALWAYS:
+ *   Always load images from a remote server.
+ *
+ * Policy for loading remote image URLs in email.  Allowing images to be
+ * loaded from a remote server may have privacy implications.
+ **/
+typedef enum {
+       E_IMAGE_LOADING_POLICY_NEVER,
+       E_IMAGE_LOADING_POLICY_SOMETIMES,
+       E_IMAGE_LOADING_POLICY_ALWAYS
+} EImageLoadingPolicy;
+
 G_END_DECLS
 
 #endif /* E_UTIL_ENUMS_H */
diff --git a/em-format/e-mail-formatter-enums.h b/em-format/e-mail-formatter-enums.h
index e5b7d5e..417519b 100644
--- a/em-format/e-mail-formatter-enums.h
+++ b/em-format/e-mail-formatter-enums.h
@@ -61,24 +61,6 @@ typedef enum { /*< flags >*/
 } EMailFormatterQuoteFlags;
 
 /**
- * EMailImageLoadingPolicy:
- * @E_MAIL_IMAGE_LOADING_POLICY_NEVER:
- *   Never load images from a remote server.
- * @E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES:
- *   Only load images from a remote server if the sender is a known contact.
- * @E_MAIL_IMAGE_LOADING_POLICY_ALWAYS:
- *   Always load images from a remote server.
- *
- * Policy for loading remote image URLs in email.  Allowing images to be
- * loaded from a remote server may have privacy implications.
- **/
-typedef enum {
-       E_MAIL_IMAGE_LOADING_POLICY_NEVER,
-       E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES,
-       E_MAIL_IMAGE_LOADING_POLICY_ALWAYS
-} EMailImageLoadingPolicy;
-
-/**
  * EMailParserExtensionFlags:
  * @E_MAIL_PARSER_EXTENSION_INLINE:
  *    Don't parse as attachment.
diff --git a/em-format/e-mail-formatter.c b/em-format/e-mail-formatter.c
index 6f3545b..e062980 100644
--- a/em-format/e-mail-formatter.c
+++ b/em-format/e-mail-formatter.c
@@ -39,7 +39,7 @@
 typedef struct _AsyncContext AsyncContext;
 
 struct _EMailFormatterPrivate {
-       EMailImageLoadingPolicy image_loading_policy;
+       EImageLoadingPolicy image_loading_policy;
 
        gboolean show_sender_photo;
        gboolean show_real_date;
@@ -698,8 +698,8 @@ e_mail_formatter_class_init (EMailFormatterClass *class)
                        "image-loading-policy",
                        "Image Loading Policy",
                        NULL,
-                       E_TYPE_MAIL_IMAGE_LOADING_POLICY,
-                       E_MAIL_IMAGE_LOADING_POLICY_NEVER,
+                       E_TYPE_IMAGE_LOADING_POLICY,
+                       E_IMAGE_LOADING_POLICY_NEVER,
                        G_PARAM_READWRITE |
                        G_PARAM_STATIC_STRINGS));
 
@@ -1231,7 +1231,7 @@ e_mail_formatter_update_style (EMailFormatter *formatter,
        class->update_style (formatter, state);
 }
 
-EMailImageLoadingPolicy
+EImageLoadingPolicy
 e_mail_formatter_get_image_loading_policy (EMailFormatter *formatter)
 {
        g_return_val_if_fail (E_IS_MAIL_FORMATTER (formatter), 0);
@@ -1241,7 +1241,7 @@ e_mail_formatter_get_image_loading_policy (EMailFormatter *formatter)
 
 void
 e_mail_formatter_set_image_loading_policy (EMailFormatter *formatter,
-                                           EMailImageLoadingPolicy policy)
+                                           EImageLoadingPolicy policy)
 {
        g_return_if_fail (E_IS_MAIL_FORMATTER (formatter));
 
diff --git a/em-format/e-mail-formatter.h b/em-format/e-mail-formatter.h
index afb56e2..4d4c9b8 100644
--- a/em-format/e-mail-formatter.h
+++ b/em-format/e-mail-formatter.h
@@ -143,12 +143,12 @@ void              e_mail_formatter_set_color      (EMailFormatter *formatter,
 void           e_mail_formatter_update_style   (EMailFormatter *formatter,
                                                 GtkStateFlags state);
 
-EMailImageLoadingPolicy
+EImageLoadingPolicy
                e_mail_formatter_get_image_loading_policy
                                                (EMailFormatter *formatter);
 void           e_mail_formatter_set_image_loading_policy
                                                (EMailFormatter *formatter,
-                                                EMailImageLoadingPolicy policy);
+                                                EImageLoadingPolicy policy);
 
 gboolean       e_mail_formatter_get_mark_citations
                                                (EMailFormatter *formatter);
diff --git a/mail/e-http-request.c b/mail/e-http-request.c
index 534e30b..53d88b7 100644
--- a/mail/e-http-request.c
+++ b/mail/e-http-request.c
@@ -168,7 +168,7 @@ handle_http_request (GSimpleAsyncResult *res,
        gchar *mail_uri;
        GInputStream *stream;
        gboolean force_load_images = FALSE;
-       EMailImageLoadingPolicy image_policy;
+       EImageLoadingPolicy image_policy;
        gchar *uri_md5;
        EShell *shell;
        GSettings *settings;
@@ -305,7 +305,7 @@ handle_http_request (GSimpleAsyncResult *res,
        /* Item not found in cache, but image loading policy allows us to fetch
         * it from the interwebs */
        if (!force_load_images && mail_uri != NULL &&
-           (image_policy == E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES)) {
+           (image_policy == E_IMAGE_LOADING_POLICY_SOMETIMES)) {
                CamelObjectBag *registry;
                gchar *decoded_uri;
                EMailPartList *part_list;
@@ -350,7 +350,7 @@ handle_http_request (GSimpleAsyncResult *res,
                g_free (decoded_uri);
        }
 
-       if ((image_policy == E_MAIL_IMAGE_LOADING_POLICY_ALWAYS) ||
+       if ((image_policy == E_IMAGE_LOADING_POLICY_ALWAYS) ||
            force_load_images) {
 
                SoupSession *temp_session;
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index a9c19bf..e2b8bbc 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -140,11 +140,11 @@ formatter_image_loading_policy_changed_cb (GObject *object,
 {
        EMailDisplay *display = user_data;
        EMailFormatter *formatter = E_MAIL_FORMATTER (object);
-       EMailImageLoadingPolicy policy;
+       EImageLoadingPolicy policy;
 
        policy = e_mail_formatter_get_image_loading_policy (formatter);
 
-       if (policy == E_MAIL_IMAGE_LOADING_POLICY_ALWAYS)
+       if (policy == E_IMAGE_LOADING_POLICY_ALWAYS)
                e_mail_display_load_images (display);
        else
                e_mail_display_reload (display);
@@ -1276,7 +1276,7 @@ mail_display_redirect_uri (EWebView *web_view,
                SoupURI *soup_uri;
                GHashTable *query;
                gboolean image_exists;
-               EMailImageLoadingPolicy image_policy;
+               EImageLoadingPolicy image_policy;
 
                /* Check Evolution's cache */
                image_exists = mail_display_image_exists_in_cache (uri);
@@ -1287,7 +1287,7 @@ mail_display_redirect_uri (EWebView *web_view,
                image_policy = e_mail_formatter_get_image_loading_policy (
                        display->priv->formatter);
                if (!image_exists && !display->priv->force_image_load &&
-                   (image_policy == E_MAIL_IMAGE_LOADING_POLICY_NEVER)) {
+                   (image_policy == E_IMAGE_LOADING_POLICY_NEVER)) {
                        return g_strdup ("about:blank");
                }
 
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index 456a00b..cbead7b 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -735,7 +735,7 @@ image_loading_policy_always_cb (GtkToggleButton *toggle_button)
 
                g_settings_set_enum (
                        settings, "image-loading-policy",
-                       E_MAIL_IMAGE_LOADING_POLICY_ALWAYS);
+                       E_IMAGE_LOADING_POLICY_ALWAYS);
 
                g_object_unref (settings);
        }
@@ -751,7 +751,7 @@ image_loading_policy_sometimes_cb (GtkToggleButton *toggle_button)
 
                g_settings_set_enum (
                        settings, "image-loading-policy",
-                       E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES);
+                       E_IMAGE_LOADING_POLICY_SOMETIMES);
 
                g_object_unref (settings);
        }
@@ -767,7 +767,7 @@ image_loading_policy_never_cb (GtkToggleButton *toggle_button)
 
                g_settings_set_enum (
                        settings, "image-loading-policy",
-                       E_MAIL_IMAGE_LOADING_POLICY_NEVER);
+                       E_IMAGE_LOADING_POLICY_NEVER);
 
                g_object_unref (settings);
        }
@@ -1004,7 +1004,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
                prefs->builder, "radImagesNever");
        gtk_toggle_button_set_active (
                GTK_TOGGLE_BUTTON (widget),
-               val == E_MAIL_IMAGE_LOADING_POLICY_NEVER);
+               val == E_IMAGE_LOADING_POLICY_NEVER);
        gtk_widget_set_sensitive (widget, writable);
 
        g_signal_connect (
@@ -1015,7 +1015,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
                prefs->builder, "radImagesSometimes");
        gtk_toggle_button_set_active (
                GTK_TOGGLE_BUTTON (widget),
-               val == E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES);
+               val == E_IMAGE_LOADING_POLICY_SOMETIMES);
        gtk_widget_set_sensitive (widget, writable);
 
        g_signal_connect (
@@ -1026,7 +1026,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
                prefs->builder, "radImagesAlways");
        gtk_toggle_button_set_active (
                GTK_TOGGLE_BUTTON (widget),
-               val == E_MAIL_IMAGE_LOADING_POLICY_ALWAYS);
+               val == E_IMAGE_LOADING_POLICY_ALWAYS);
        gtk_widget_set_sensitive (widget, writable);
 
        g_signal_connect (
diff --git a/modules/settings/e-settings-deprecated.c b/modules/settings/e-settings-deprecated.c
index faba3db..a439319 100644
--- a/modules/settings/e-settings-deprecated.c
+++ b/modules/settings/e-settings-deprecated.c
@@ -332,7 +332,7 @@ static void
 settings_deprecated_image_loading_policy_cb (GSettings *settings,
                                              const gchar *key)
 {
-       EMailImageLoadingPolicy policy;
+       EImageLoadingPolicy policy;
 
        policy = g_settings_get_enum (settings, "image-loading-policy");
        e_settings_deprecated_set_int_with_change_test (settings, "load-http-images", policy);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]