[evolution] em_utils_is_re_in_subject: Remove unused 'shell' parameter.



commit bb2d6be2fbca7891faf0e78121093b33af8f9e5c
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Jun 14 09:43:28 2013 -0400

    em_utils_is_re_in_subject: Remove unused 'shell' parameter.

 mail/em-composer-utils.c |    2 +-
 mail/em-utils.c          |    4 +---
 mail/em-utils.h          |    6 ++----
 mail/message-list.c      |   16 +++++++---------
 4 files changed, 11 insertions(+), 17 deletions(-)
---
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index b061c85..b89b995 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1992,7 +1992,7 @@ reply_get_composer (EShell *shell,
        if ((subject = (gchar *) camel_mime_message_get_subject (message))) {
                gboolean skip_len = -1;
 
-               if (em_utils_is_re_in_subject (shell, subject, &skip_len) && skip_len > 0)
+               if (em_utils_is_re_in_subject (subject, &skip_len) && skip_len > 0)
                        subject = subject + skip_len;
 
                subject = g_strdup_printf ("Re: %s", subject);
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 7af920c..5417cde 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1519,8 +1519,7 @@ check_prefix (const gchar *subject,
 }
 
 gboolean
-em_utils_is_re_in_subject (EShell *shell,
-                           const gchar *subject,
+em_utils_is_re_in_subject (const gchar *subject,
                            gint *skip_len)
 {
        GSettings *settings;
@@ -1528,7 +1527,6 @@ em_utils_is_re_in_subject (EShell *shell,
        gboolean res;
        gint ii;
 
-       g_return_val_if_fail (shell != NULL, FALSE);
        g_return_val_if_fail (subject != NULL, FALSE);
        g_return_val_if_fail (skip_len != NULL, FALSE);
 
diff --git a/mail/em-utils.h b/mail/em-utils.h
index c7ce5c9..e857b26 100644
--- a/mail/em-utils.h
+++ b/mail/em-utils.h
@@ -36,7 +36,6 @@
 G_BEGIN_DECLS
 
 struct _EMailPartList;
-struct _EShell;
 
 gboolean em_utils_ask_open_many (GtkWindow *parent, gint how_many);
 gboolean em_utils_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, ...);
@@ -82,9 +81,8 @@ gchar *em_utils_url_unescape_amp (const gchar *url);
 
 void emu_restore_folder_tree_state (EMFolderTree *folder_tree);
 
-gboolean em_utils_is_re_in_subject (struct _EShell *shell,
-                                   const gchar *subject,
-                                   gint *skip_len);
+gboolean       em_utils_is_re_in_subject       (const gchar *subject,
+                                                gint *skip_len);
 
 G_END_DECLS
 
diff --git a/mail/message-list.c b/mail/message-list.c
index 4977a97..f8d2f10 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -38,8 +38,6 @@
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
 
-#include "shell/e-shell.h"
-
 #include "libemail-engine/e-mail-utils.h"
 #include "libemail-engine/mail-config.h"
 #include "libemail-engine/mail-mt.h"
@@ -503,14 +501,14 @@ get_normalised_string (MessageList *message_list,
        }
 
        if (col == COL_SUBJECT_NORM) {
-               EShell *shell = e_shell_get_default ();
                gint skip_len;
-               const guchar *subject;
+               const gchar *subject;
                gboolean found_re = TRUE;
 
-               subject = (const guchar *) string;
+               subject = string;
                while (found_re) {
-                       found_re = em_utils_is_re_in_subject (shell, (const gchar *) subject, &skip_len) && 
skip_len > 0;
+                       found_re = em_utils_is_re_in_subject (
+                               subject, &skip_len) && skip_len > 0;
                        if (found_re)
                                subject += skip_len;
 
@@ -523,7 +521,7 @@ get_normalised_string (MessageList *message_list,
                while (*subject && isspace ((gint) *subject))
                        subject++;
 
-               string = (const gchar *) subject;
+               string = subject;
                normalised = g_utf8_collate_key (string, -1);
        } else {
                /* because addresses require strings, not collate keys */
@@ -1540,7 +1538,6 @@ get_trimmed_subject (CamelMessageInfo *info)
        }
 
        do {
-               EShell *shell = e_shell_get_default ();
                gint skip_len;
                gboolean found_re = TRUE;
 
@@ -1549,7 +1546,8 @@ get_trimmed_subject (CamelMessageInfo *info)
                while (found_re) {
                        found_re = FALSE;
 
-                       found_re = em_utils_is_re_in_subject (shell, (const gchar *) subject, &skip_len) && 
skip_len > 0;
+                       found_re = em_utils_is_re_in_subject (
+                               subject, &skip_len) && skip_len > 0;
                        if (found_re)
                                subject += skip_len;
 


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