save last used quicksearch type
authorColin Leroy <colin@colino.net>
Wed, 11 Dec 2002 10:16:39 +0000 (10:16 +0000)
committerColin Leroy <colin@colino.net>
Wed, 11 Dec 2002 10:16:39 +0000 (10:16 +0000)
ChangeLog.claws
configure.in
src/prefs_common.c
src/prefs_common.h
src/summaryview.c

index 396455a..54239b2 100644 (file)
@@ -1,3 +1,10 @@
+2002-12-11 [colin]       0.8.6claws99
+
+       * src/prefs_common.[ch]
+               Add summary_quicksearch_type
+       * src/summaryview.c
+               Save last used quicksearch type
+
 2002-12-11 [jens]       0.8.6claws98
        * src/prefs_filtering.c
        * src/prefs_matcher.c
 2002-12-11 [jens]       0.8.6claws98
        * src/prefs_filtering.c
        * src/prefs_matcher.c
index a5a089e..05ff73e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws98
+EXTRA_VERSION=claws99
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index f246894..d51161b 100644 (file)
@@ -813,6 +813,8 @@ static PrefParam param[] = {
 #endif
        {"work_offline", "FALSE", &prefs_common.work_offline, P_BOOL,
         NULL, NULL, NULL},
 #endif
        {"work_offline", "FALSE", &prefs_common.work_offline, P_BOOL,
         NULL, NULL, NULL},
+       {"summary_quicksearch_type", "0", &prefs_common.summary_quicksearch_type, P_INT,
+        NULL, NULL, NULL},
 
        {"hide_score", "-9999", &prefs_common.kill_score, P_INT,
         NULL, NULL, NULL},
 
        {"hide_score", "-9999", &prefs_common.kill_score, P_INT,
         NULL, NULL, NULL},
index f83d97a..c680031 100644 (file)
@@ -267,6 +267,8 @@ struct _PrefsCommon
        /* boolean for work offline 
           stored here for use in inc.c */
        gboolean work_offline;
        /* boolean for work offline 
           stored here for use in inc.c */
        gboolean work_offline;
+       
+       gint summary_quicksearch_type;
 
 };
 
 
 };
 
index 3892a8d..acd293c 100644 (file)
@@ -571,6 +571,9 @@ SummaryView *summary_create(void)
                           summaryview);
 
        gtk_option_menu_set_menu(GTK_OPTION_MENU(search_type_opt), search_type);
                           summaryview);
 
        gtk_option_menu_set_menu(GTK_OPTION_MENU(search_type_opt), search_type);
+       
+       gtk_option_menu_set_history(GTK_OPTION_MENU(search_type_opt), prefs_common.summary_quicksearch_type);
+       
        gtk_widget_show(search_type);
        
        search_string = gtk_entry_new();
        gtk_widget_show(search_type);
        
        search_string = gtk_entry_new();
@@ -4674,6 +4677,10 @@ static void summary_searchbar_pressed(GtkWidget *widget, GdkEventKey *event,
 static void summary_searchtype_changed(GtkMenuItem *widget, gpointer data)
 {
        SummaryView *sw = (SummaryView *)data;
 static void summary_searchtype_changed(GtkMenuItem *widget, gpointer data)
 {
        SummaryView *sw = (SummaryView *)data;
+       prefs_common.summary_quicksearch_type = GPOINTER_TO_INT(gtk_object_get_user_data(
+                                  GTK_OBJECT(GTK_MENU_ITEM(gtk_menu_get_active(
+                                  GTK_MENU(sw->search_type))))));
+
        if (gtk_entry_get_text(GTK_ENTRY(sw->search_string)))
                summary_show(sw, sw->folder_item);
 }
        if (gtk_entry_get_text(GTK_ENTRY(sw->search_string)))
                summary_show(sw, sw->folder_item);
 }