[evolution/gnome-3-8] Remove "drag-and-drop-save-name-format" setting.



commit 392fccc8a86c2bd0c52e208d683ba3c4dec7a880
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu May 9 16:31:04 2013 -0400

    Remove "drag-and-drop-save-name-format" setting.
    
    Hidden setting, no clear use case, and poorly implemented.
    
    (cherry picked from commit 289d96f5f0816a5fb3c642827c6f69a690a6574c)

 data/evolution.convert                       |    1 -
 data/org.gnome.evolution.mail.gschema.xml.in |    5 -----
 mail/em-utils.c                              |   17 ++---------------
 3 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/data/evolution.convert b/data/evolution.convert
index a859168..20ffbac 100644
--- a/data/evolution.convert
+++ b/data/evolution.convert
@@ -133,7 +133,6 @@ composer-spell-languages = /apps/evolution/mail/composer/spell_languages
 composer-top-signature = /apps/evolution/mail/composer/top_signature
 default-account = /apps/evolution/mail/default_account
 drag-and-drop-save-file-format = /apps/evolution/mail/save_file_format
-drag-and-drop-save-name-format = /apps/evolution/mail/save_name_format
 error-level = /apps/evolution/mail/display/error_level
 error-timeout = /apps/evolution/mail/display/error_timeout
 filters-log-actions = /apps/evolution/mail/filters/log
diff --git a/data/org.gnome.evolution.mail.gschema.xml.in b/data/org.gnome.evolution.mail.gschema.xml.in
index 7ac3df8..6581116 100644
--- a/data/org.gnome.evolution.mail.gschema.xml.in
+++ b/data/org.gnome.evolution.mail.gschema.xml.in
@@ -135,11 +135,6 @@
       <_summary>Save file format for drag-and-drop operation</_summary>
       <_description>Can be either 'mbox' or 'pdf'.</_description>
     </key>
-    <key name="drag-and-drop-save-name-format" type="i">
-      <default>1</default>
-      <_summary>Save name format for drag-and-drop operation</_summary>
-      <_description>Can be either 2 to use current date and time or any other value for sent date of the 
message. This has a meaning only when dropping just one message.</_description>
-    </key>
     <key name="show-animated-images" type="b">
       <default>false</default>
       <_summary>Show image animations</_summary>
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 74a0eac..019da0a 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -63,7 +63,6 @@
 #include "e-mail-printer.h"
 
 /* XXX This is a dirty hack on a dirty hack.  We really need
-#include <em-format/e-mail-print-formatter.h>
  *     to rework or get rid of the functions that use this. */
 extern const gchar *shell_builtin_backend;
 
@@ -71,12 +70,6 @@ extern const gchar *shell_builtin_backend;
 /* Used in em_util_ask_open_many() */
 #define TOO_MANY 10
 
-/* drag and drop resulting file naming possibilities */
-enum {
-       DND_USE_SENT_DATE = 1, /* YYYYMMDDhhmmssms_<title> and use email sent date */
-       DND_USE_DND_DATE  = 2,  /*  YYYYMMDDhhmmssms_<title> and drag'drop date */
-};
-
 #define d(x)
 
 gboolean
@@ -948,7 +941,6 @@ static gchar *
 em_utils_build_export_filename (CamelFolder *folder,
                                 const gchar *uid,
                                 const gchar *exporttype,
-                                gint exportname,
                                 const gchar *tmpdir)
 {
        CamelMessageInfo *info;
@@ -963,9 +955,6 @@ em_utils_build_export_filename (CamelFolder *folder,
                if (camel_message_info_subject (info)) {
                        time_t reftime;
                        reftime = camel_message_info_date_sent (info);
-                       if (exportname == DND_USE_DND_DATE) {
-                               reftime = time (NULL);
-                       }
 
                        ts = localtime (&reftime);
                        strftime (datetmp, 15, "%Y%m%d%H%M%S", ts);
@@ -1018,7 +1007,6 @@ em_utils_selection_set_urilist (GtkSelectionData *data,
        gint fd;
        GSettings *settings;
        gchar *exporttype;
-       gint exportname;
 
        tmpdir = e_mkdtemp ("drag-n-drop-XXXXXX");
        if (tmpdir == NULL)
@@ -1030,7 +1018,6 @@ em_utils_selection_set_urilist (GtkSelectionData *data,
                g_free (exporttype);
                exporttype = g_strdup ("mbox");
        }
-       exportname = g_settings_get_int (settings, "drag-and-drop-save-name-format");
        g_object_unref (settings);
 
        if (g_ascii_strcasecmp (exporttype, "mbox") == 0) {
@@ -1043,7 +1030,7 @@ em_utils_selection_set_urilist (GtkSelectionData *data,
                        file = g_build_filename (tmpdir, tmp, NULL);
                        g_free (tmp);
                } else {
-                       file = em_utils_build_export_filename (folder, uids->pdata[0], exporttype, 
exportname, tmpdir);
+                       file = em_utils_build_export_filename (folder, uids->pdata[0], exporttype, tmpdir);
                }
 
                fd = g_open (file, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
@@ -1081,7 +1068,7 @@ em_utils_selection_set_urilist (GtkSelectionData *data,
                filenames = g_new (gchar *, uids->len);
                uris = g_new (gchar *, uids->len + 1);
                for (i = 0; i < uids->len; i++) {
-                       filenames[i] = em_utils_build_export_filename (folder, uids->pdata[i], exporttype, 
exportname, tmpdir);
+                       filenames[i] = em_utils_build_export_filename (folder, uids->pdata[i], exporttype, 
tmpdir);
                        /* validity test */
                        fd = g_open (filenames[i], O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
                        if (fd == -1) {


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