Changeset 12348


Ignore:
Timestamp:
Apr 11, 2011, 2:44:05 AM (11 years ago)
Author:
livings124
Message:

#4182 Remember filter search text between runs

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r12204 r12348  
    29442944        [[NSUserDefaults standardUserDefaults] setObject: FILTER_NONE forKey: @"Filter"];
    29452945        [[NSUserDefaults standardUserDefaults] setInteger: GROUP_FILTER_ALL_TAG forKey: @"FilterGroup"];
     2946        [[NSUserDefaults standardUserDefaults] removeObjectForKey: @"FilterSearchString"];
    29462947    }
    29472948   
  • trunk/macosx/FilterBarController.m

    r12152 r12348  
    104104    [[fSearchField cell] setPlaceholderString: filterSearchTypeTitle];
    105105   
     106    NSString * searchString;
     107    if ((searchString = [[NSUserDefaults standardUserDefaults] stringForKey: @"FilterSearchString"]))
     108        [fSearchField setStringValue: searchString];
     109   
    106110    [self updateGroupsButton];
    107111   
     
    185189- (void) setSearchText: (id) sender
    186190{
     191    [[NSUserDefaults standardUserDefaults] setObject: [fSearchField stringValue] forKey: @"FilterSearchString"];
    187192    [[NSNotificationCenter defaultCenter] postNotificationName: @"ApplyFilter" object: nil];
    188193}
Note: See TracChangeset for help on using the changeset viewer.