remove 'Incorporate from spool' common pref, force creation of a 'Local' account
authorPaul Mangan <paul@claws-mail.org>
Fri, 26 Sep 2003 20:22:03 +0000 (20:22 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 26 Sep 2003 20:22:03 +0000 (20:22 +0000)
ChangeLog.claws
configure.ac
src/inc.c
src/prefs_common.c
src/prefs_common.h

index 61527f8..e2f0367 100644 (file)
@@ -1,3 +1,10 @@
+2003-09-26 [paul]      0.9.5claws31
+
+       * src/inc.c
+         src/prefs_common.[ch]
+               remove 'Incorporate from spool' common pref,
+               force creation of a 'Local' account
+
 2003-09-26 [christoph] 0.9.5claws30
 
        * src/folder.c
index 5ac091c..2e6e0da 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=30
+EXTRA_VERSION=31
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 512abc2..255f96d 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -118,7 +118,6 @@ static gint inc_dialog_delete_cb    (GtkWidget      *widget,
                                         GdkEventAny    *event,
                                         gpointer        data);
 
-static gint inc_spool                  (void);
 static gint get_spool                  (FolderItem     *dest,
                                         const gchar    *mbox);
 
@@ -181,19 +180,7 @@ void inc_mail(MainWindow *mainwin, gboolean notify)
                        inc_autocheck_timer_set();
                        return;
                }
-
-               if (prefs_common.inc_local) {
-                       account_new_msgs = inc_spool();
-                       if (account_new_msgs > 0)
-                               new_msgs += account_new_msgs;
-               }
        } else {
-               if (prefs_common.inc_local) {
-                       account_new_msgs = inc_spool();
-                       if (account_new_msgs > 0)
-                               new_msgs += account_new_msgs;
-               }
-
                account_new_msgs = inc_account_mail(cur_account, mainwin);
                if (account_new_msgs > 0)
                        new_msgs += account_new_msgs;
@@ -277,12 +264,6 @@ void inc_all_account_mail(MainWindow *mainwin, gboolean autocheck,
        inc_autocheck_timer_remove();
        main_window_lock(mainwin);
 
-       if (prefs_common.inc_local) {
-               account_new_msgs = inc_spool();
-               if (account_new_msgs > 0)
-                       new_msgs += account_new_msgs;   
-       }
-
        list = account_get_list();
        if (!list) {
                inc_finished(mainwin, new_msgs > 0);
@@ -1100,24 +1081,12 @@ static gint inc_dialog_delete_cb(GtkWidget *widget, GdkEventAny *event,
        return TRUE;
 }
 
-static gint inc_spool(void)
+static gint inc_spool_account(PrefsAccount *account)
 {
+       FolderItem *inbox;
        gchar *mbox, *logname;
-       gint msgs;
 
        logname = g_get_user_name();
-       mbox = g_strconcat(prefs_common.spool_path
-                          ? prefs_common.spool_path : DEFAULT_SPOOL_PATH,
-                          G_DIR_SEPARATOR_S, logname, NULL);
-       msgs = get_spool(folder_get_default_inbox(), mbox);
-       g_free(mbox);
-
-       return msgs;
-}
-
-static gint inc_spool_account(PrefsAccount *account)
-{
-       FolderItem *inbox;
 
        if (account->inbox) {
                inbox = folder_find_item_from_path(account->inbox);
@@ -1126,7 +1095,10 @@ static gint inc_spool_account(PrefsAccount *account)
        } else
                inbox = folder_get_default_inbox();
 
-       return get_spool(inbox, account->local_mbox);
+       mbox = g_strconcat(account->local_mbox,
+                          G_DIR_SEPARATOR_S, logname, NULL);
+
+       return get_spool(inbox, mbox);
 }
 
 static gint inc_all_spool(void)
index d13ef61..37ea047 100644 (file)
@@ -275,16 +275,6 @@ static PrefParam param[] = {
         &receive.entry_incext,
         prefs_set_data_from_entry, prefs_set_entry},
 
-       {"inc_local", "TRUE", &prefs_common.inc_local, P_BOOL,
-        &receive.checkbtn_local,
-        prefs_set_data_from_toggle, prefs_set_toggle},
-       {"filter_on_inc_local", "TRUE", &prefs_common.filter_on_inc, P_BOOL,
-        &receive.checkbtn_filter_on_inc,
-        prefs_set_data_from_toggle, prefs_set_toggle},
-       {"spool_path", DEFAULT_SPOOL_PATH, &prefs_common.spool_path, P_STRING,
-        &receive.entry_spool,
-        prefs_set_data_from_entry, prefs_set_entry},
-
        {"autochk_newmail", "FALSE", &prefs_common.autochk_newmail, P_BOOL,
         &receive.checkbtn_autochk,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -1118,35 +1108,6 @@ static void prefs_receive_create(void)
        gtk_box_pack_start (GTK_BOX (hbox), button_incext, FALSE, FALSE, 0);
 #endif
 
-       PACK_FRAME(vbox1, frame_spool, _("Local spool"));
-
-       vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
-       gtk_widget_show (vbox2);
-       gtk_container_add (GTK_CONTAINER (frame_spool), vbox2);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
-
-       hbox = gtk_hbox_new (FALSE, 32);
-       gtk_widget_show (hbox);
-       gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
-
-       PACK_CHECK_BUTTON (hbox, checkbtn_local, _("Incorporate from spool"));
-       PACK_CHECK_BUTTON (hbox, checkbtn_filter_on_inc,
-                          _("Filter on incorporation"));
-       SET_TOGGLE_SENSITIVITY (checkbtn_local, checkbtn_filter_on_inc);
-
-       hbox = gtk_hbox_new (FALSE, 8);
-       gtk_widget_show (hbox);
-       gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
-       SET_TOGGLE_SENSITIVITY (checkbtn_local, hbox);
-
-       label_spool = gtk_label_new (_("Spool directory"));
-       gtk_widget_show (label_spool);
-       gtk_box_pack_start (GTK_BOX (hbox), label_spool, FALSE, FALSE, 0);
-
-       entry_spool = gtk_entry_new ();
-       gtk_widget_show (entry_spool);
-       gtk_box_pack_start (GTK_BOX (hbox), entry_spool, TRUE, TRUE, 0);
-
        vbox2 = gtk_vbox_new (FALSE, 0);
        gtk_widget_show (vbox2);
        gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
@@ -1261,10 +1222,6 @@ static void prefs_receive_create(void)
        receive.entry_incext    = entry_incext;
        /* receive.button_incext   = button_incext; */
 
-       receive.checkbtn_local         = checkbtn_local;
-       receive.checkbtn_filter_on_inc = checkbtn_filter_on_inc;
-       receive.entry_spool            = entry_spool;
-
        receive.checkbtn_autochk    = checkbtn_autochk;
        receive.spinbtn_autochk     = spinbtn_autochk;
        receive.spinbtn_autochk_adj = spinbtn_autochk_adj;
index 4fcf295..2fdddd8 100644 (file)
@@ -64,9 +64,6 @@ struct _PrefsCommon
        /* Receive */
        gboolean use_extinc;
        gchar *extinc_cmd;
-       gboolean inc_local;
-       gboolean filter_on_inc;
-       gchar *spool_path;
        gboolean scan_all_after_inc;
        gboolean autochk_newmail;
        gint autochk_itv;