enable processing on startup / fixed C89 compatibility
authorHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Mon, 20 Oct 2003 14:07:37 +0000 (14:07 +0000)
committerHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Mon, 20 Oct 2003 14:07:37 +0000 (14:07 +0000)
ChangeLog.claws
configure.ac
src/folder_item_prefs.c
src/folder_item_prefs.h
src/main.c
src/messageview.c
src/prefs_folder_item.c

index f592746fe67bf6e67559465d5da10d18c4a3406f..714c931292b4cae8116fc638c29a565bc4bf591e 100644 (file)
@@ -1,3 +1,16 @@
+2003-10-20 [hoa]  0.9.6claws34
+
+       * src/folder_item_prefs.[ch]
+       * src/prefs_folder_item.c
+       * src/main.c
+               Added a property per folder to choose whether we 
+               want to apply processing on it on startup or if we
+               prefer to wait the folder selection to apply it.
+       
+       * src/messageview.c
+               fixed C89 compatibility (for old compilers, for
+               example gcc 2.95.x).
+
 2003-10-17 [christoph]  0.9.6claws33
 
        * src/mimeview.c
index 057e5a4d8610a533ed6de6152131b7b8ad7cc9b5..d0eb0c7740f9ba405f65244838e2c95388ef6a97 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=33
+EXTRA_VERSION=34
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 595887f7709063654cce6253efa9b9ba985368f5..e14caa47ec5c10d9fba363621e37122b0ea6e36c 100644 (file)
@@ -90,6 +90,8 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"folder_color", "", &tmp_prefs.color, P_INT,
         NULL, NULL, NULL},
+       {"enable processing at startup", "TRUE", &tmp_prefs.enable_processing, P_BOOL,
+        NULL, NULL, NULL},
        {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 
@@ -183,6 +185,7 @@ static FolderItemPrefs *folder_item_prefs_clear(FolderItemPrefs *prefs)
        prefs->save_copy_to_folder = FALSE;
        prefs->color = 0;
 
+        prefs->enable_processing = TRUE;
        prefs->scoring = NULL;
        prefs->processing = NULL;
        return prefs;
@@ -241,6 +244,7 @@ void folder_item_prefs_copy_prefs(FolderItem * src, FolderItem * dest)
        tmp_prefs.enable_thread                 = src->prefs->enable_thread;
        tmp_prefs.kill_score                    = src->prefs->kill_score;
        tmp_prefs.important_score               = src->prefs->important_score;
+        tmp_prefs.enable_processing             = src->prefs->enable_processing;
 
        prefs_matcher_read_config();
        for (tmp = src->prefs->scoring; tmp != NULL && tmp->data != NULL;) {
index 76ff911aeedb114f3150b07f2e18ff4e003196ff..dd8252c07ad382c11e8caa94003e2e02b4c6d0aa 100644 (file)
@@ -44,6 +44,7 @@ struct _FolderItemPrefs {
        gint kill_score;
        gint important_score;
 
+        int enable_processing;
        GSList * scoring;
        GSList * processing;
 
index 272f0aaf942d3c7d6f1b1ff52c6103c82f960627..123e2100bfdcc6d997e31bfc2d2979014fe66884 100644 (file)
@@ -519,7 +519,8 @@ static void initial_processing(FolderItem *item, gpointer data)
 
        main_window_cursor_wait(mainwin);
        
-       folder_item_apply_processing(item);
+        if (item->prefs->enable_processing)
+                folder_item_apply_processing(item);
 
        debug_print("done.\n");
        STATUSBAR_POP(mainwin);
index 44eb1d2573e2c3a93ab2f388b5e9c70bc73b731f..591756fdaed24f0f86a568dc043092aee94c9c94 100644 (file)
@@ -439,6 +439,8 @@ static gint disposition_notification_send(MsgInfo *msginfo)
        FolderItem *queue, *outbox;
        gint num;
        gchar *path;
+        gchar *addr;
+        gchar *addrp;
 
        if ((!msginfo->returnreceiptto) && 
            (!msginfo->dispositionnotificationto)) 
@@ -518,8 +520,7 @@ static gint disposition_notification_send(MsgInfo *msginfo)
                g_warning("can't change file mode\n");
        }
        
-       gchar *addr = g_strdup(to);
-       gchar *addrp;
+       addr = g_strdup(to);
        
        extract_address(addr);
        addrp = addr;
index de3de4cc1c12bfdc5109428ff7e0bd83fe7d53fc..de33df5e35eeb305c907e2ce9e56fa1f99527722 100644 (file)
@@ -66,6 +66,7 @@ struct FolderItemGeneralPage
        GtkWidget *checkbtn_folder_chmod;
        GtkWidget *entry_folder_chmod;
        GtkWidget *folder_color_btn;
+       GtkWidget *checkbtn_enable_processing;
 
        gint       folder_color;
 };
@@ -117,11 +118,12 @@ void prefs_folder_item_general_create_widget_func(PrefsPage * _page,
        GtkWidget *entry_folder_chmod;
        GtkWidget *folder_color;
        GtkWidget *folder_color_btn;
+       GtkWidget *checkbtn_enable_processing;
 
        page->item         = item;
 
        /* Table */
-       table = gtk_table_new(3, 2, FALSE);
+       table = gtk_table_new(4, 2, FALSE);
        gtk_widget_show(table);
        gtk_table_set_row_spacings(GTK_TABLE(table), -1);
        rowcount = 0;
@@ -194,12 +196,24 @@ void prefs_folder_item_general_create_widget_func(PrefsPage * _page,
 
        rowcount++;
 
+       /* Enable processing at startup */
+       checkbtn_enable_processing = gtk_check_button_new_with_label(_("Processing on startup: "));
+       gtk_widget_show(checkbtn_enable_processing);
+       gtk_table_attach(GTK_TABLE(table), checkbtn_enable_processing, 0, 2, 
+                        rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_processing), 
+                                    item->prefs->enable_processing);
+
+       rowcount++;
+
        page->table = table;
        page->checkbtn_simplify_subject = checkbtn_simplify_subject;
        page->entry_simplify_subject = entry_simplify_subject;
        page->checkbtn_folder_chmod = checkbtn_folder_chmod;
        page->entry_folder_chmod = entry_folder_chmod;
        page->folder_color_btn = folder_color_btn;
+       page->checkbtn_enable_processing = checkbtn_enable_processing;
 
        page->page.widget = table;
 }
@@ -245,6 +259,9 @@ void prefs_folder_item_general_save_func(PrefsPage *_page)
        if (prefs->color > 0)
                folder_item_update(page->item, F_ITEM_UPDATE_MSGCNT);
 
+       prefs->enable_processing = 
+           gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_enable_processing));
+
        folder_item_prefs_save_config(page->item);
 }