Skip to content

Commit

Permalink
Adding menu option to reload saved requests drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
mmattozzi committed May 1, 2017
1 parent 4f41a84 commit fb24372
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions English.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ CA
<action selector="exportRequests:" target="494" id="928"/>
</connections>
</menuItem>
<menuItem title="Reload Requests Drawer" id="EnJ-Z6-dT3">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="reloadRequestsDrawer:" target="494" id="AfU-UO-B7d"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="1010"/>
<menuItem title="Export Response..." id="1011">
<modifierMask key="keyEquivalentModifierMask"/>
Expand Down
1 change: 1 addition & 0 deletions core/CocoaRestClientAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
- (void) deleteSavedRequest: (NSNotification *) notification;
- (NSString *) pathForDataFile;
- (void) loadDataFromDisk;
- (IBAction) reloadRequestsDrawer:(id)sender;
- (void) saveDataToDisk;
- (void) applicationWillTerminate: (NSNotification *)note;
- (IBAction) openTimeoutDialog:(id) sender;
Expand Down
5 changes: 5 additions & 0 deletions core/CocoaRestClientAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,11 @@ - (void) loadDataFromDisk {
savedRequestsArray = [[NSMutableArray alloc] initWithArray:[NSKeyedUnarchiver unarchiveObjectWithFile:path]];
}

- (IBAction) reloadRequestsDrawer:(id)sender {
[self loadDataFromDisk];
[self.savedOutlineView reloadData];
}

- (void) importRequestsFromArray:(NSArray *)requests {
[exportRequestsController prepareToDisplayImports:requests];
[NSApp beginSheet: [exportRequestsController window]
Expand Down

0 comments on commit fb24372

Please sign in to comment.