2007-06-12 [colin] 2.9.2cvs57
[claws.git] / src / prefs_common.c
index 79b6ff95026d609f7a448683ceb3e3961473621d..904f955ea5375e3c58c458c040eceb6d7159602d 100644 (file)
@@ -714,8 +714,22 @@ static PrefParam param[] = {
        {"always_show_message_when_selected", "FALSE",
         &prefs_common.always_show_msg,
         P_BOOL, NULL, NULL, NULL},
-       {"select_on_entry", "2", &prefs_common.select_on_entry,
+       {"select_on_entry", "3", &prefs_common.select_on_entry,
         P_ENUM, NULL, NULL, NULL},
+
+       {"summary_select_prio1", "0", &prefs_common.summary_select_prio[0], P_ENUM,
+        NULL, NULL, NULL},
+       {"summary_select_prio2", "0", &prefs_common.summary_select_prio[1], P_ENUM,
+        NULL, NULL, NULL},
+       {"summary_select_prio3", "0", &prefs_common.summary_select_prio[2], P_ENUM,
+        NULL, NULL, NULL},
+       {"summary_select_prio4", "0", &prefs_common.summary_select_prio[3], P_ENUM,
+        NULL, NULL, NULL},
+       {"summary_select_prio5", "0", &prefs_common.summary_select_prio[4], P_ENUM,
+        NULL, NULL, NULL},
+       {"summary_select_prio6", "0", &prefs_common.summary_select_prio[5], P_ENUM,
+        NULL, NULL, NULL},
+
        {"mark_as_read_on_new_window", "FALSE",
         &prefs_common.mark_as_read_on_new_window,
         P_BOOL, NULL, NULL, NULL},
@@ -846,7 +860,7 @@ static PrefParam param[] = {
        {"matcherwin_height", "-1", &prefs_common.matcherwin_height, P_INT,
         NULL, NULL, NULL},
 
-       {"templateswin_width", "440", &prefs_common.templateswin_width, P_INT,
+       {"templateswin_width", "480", &prefs_common.templateswin_width, P_INT,
         NULL, NULL, NULL},
        {"templateswin_height", "-1", &prefs_common.templateswin_height, P_INT,
         NULL, NULL, NULL},
@@ -963,10 +977,16 @@ static PrefParam param[] = {
 #endif
        {"thread_by_subject_max_age", "10", &prefs_common.thread_by_subject_max_age,
        P_INT, NULL, NULL, NULL },
+       {"last_opened_folder", "", &prefs_common.last_opened_folder,
+       P_STRING, NULL, NULL, NULL },
+       {"goto_last_folder_on_startup", "FALSE", &prefs_common.goto_last_folder_on_startup,
+       P_BOOL, NULL, NULL, NULL },
        {"summary_quicksearch_sticky", "1", &prefs_common.summary_quicksearch_sticky, P_INT,
         NULL, NULL, NULL},
        {"summary_quicksearch_dynamic", "0", &prefs_common.summary_quicksearch_dynamic, P_INT,
         NULL, NULL, NULL},
+       {"summary_quicksearch_autorun", "0", &prefs_common.summary_quicksearch_autorun, P_INT,
+        NULL, NULL, NULL},
        {"statusbar_update_step", "10", &prefs_common.statusbar_update_step, P_INT,
         NULL, NULL, NULL},
        {"compose_no_markup", "FALSE", &prefs_common.compose_no_markup, P_BOOL,
@@ -1229,16 +1249,20 @@ void pref_set_textview_from_pref(GtkTextView *textview, const gchar *txt)
        GtkTextBuffer *buffer;
        gchar *out = NULL;
 
-       g_return_if_fail( txt != NULL );
        g_return_if_fail( textview != NULL );
 
        buffer = gtk_text_view_get_buffer(textview);
-       out = malloc(strlen(txt)+1);
 
-       pref_get_unescaped_pref(out, txt);
+       if (!txt) {
+               gtk_text_buffer_set_text(buffer, "", -1);
+       } else {
+               out = malloc(strlen(txt)+1);
+
+               pref_get_unescaped_pref(out, txt);
 
-       gtk_text_buffer_set_text(buffer, out?out:"", -1);
-       g_free(out);
+               gtk_text_buffer_set_text(buffer, out?out:"", -1);
+               g_free(out);
+       }
 }
 
 /* set the contents of a gtkentry widget from the internal \-escaped
@@ -1247,15 +1271,17 @@ void pref_set_entry_from_pref(GtkEntry *entry, const gchar *txt)
 {
        gchar *out = NULL;
 
-       g_return_if_fail( txt != NULL );
        g_return_if_fail( entry != NULL );
+       if (!txt) {
+               gtk_entry_set_text(entry, "");
+       } else {
+               out = malloc(strlen(txt)+1);
 
-       out = malloc(strlen(txt)+1);
-
-       pref_get_unescaped_pref(out, txt);
+               pref_get_unescaped_pref(out, txt);
 
-       gtk_entry_set_text(entry, out?out:"");
-       g_free(out);
+               gtk_entry_set_text(entry, out?out:"");
+               g_free(out);
+       }
 }
 
 /* get the \-escaped internal representation of a pref from the contents of