Skip to content

Commit

Permalink
This is an enormous change which reworks preferences. Most of the inc…
Browse files Browse the repository at this point in the history
…remental changes were done in a private Git server. The highlights are:

- Completely redesigned preferences dialog
- Fix lots of warnings.
- Got rid of profiles altogether.
- Define color and keyboard presets and store them in plist files.
- Bookmarks now have tags instead of neted directories.
- Remove the tree view and replace it with a flat table.
- Bookmarks list includes a search field.
- Make bookmarks changes be reflected immediately in open sessions.
- Changes to the bookmark affect only that session, which is forever divorced from its founding bookmark.
- A separate prefs panel is opened that hides the bookmarks table.
- Bookmarks now have unique GUIDs assigned and are usually referred to by GUID instead of by pointers, which are evanescent.
- When you do cmd-i, the session's bookmark is copied into a separate model and given a new guid.
- Make the prefs window work differently when editing a session.
- Display star graphic next to default bookmark.
  • Loading branch information
georgen@google.com committed Sep 2, 2010
1 parent 6fff453 commit 35b029c
Show file tree
Hide file tree
Showing 63 changed files with 39,472 additions and 9,700 deletions.
415 changes: 415 additions & 0 deletions BookmarkModel.m

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions BookmarkTableView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
** BookmarkTableController.m
** iTerm
**
** Created by George Nachman on 8/26/10.
** Project: iTerm
**
** Description: Custom view that shows a search field and table of bookmarks
** and integrates them.
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
*/

#import <Cocoa/Cocoa.h>
#import "BookmarkModel.h"

@protocol BookmarkTableDelegate
- (void)bookmarkTableSelectionDidChange:(id)bookmarkTable;
- (void)bookmarkTableSelectionWillChange:(id)bookmarkTable;
- (void)bookmarkTableRowSelected:(id)bookmarkTable;
@end

@interface BookmarkTableView : NSView {
int rowHeight_;
NSScrollView* scrollView_;
NSSearchField* searchField_;
NSTableView* tableView_;
NSTableColumn* tableColumn_;
NSTableColumn* commandColumn_;
NSTableColumn* shortcutColumn_;
id<BookmarkTableDelegate> delegate_;
BOOL showGraphic_;
NSString* guid_; // selected guid
BOOL debug;
BookmarkModel* dataSource_;
}

- (void)awakeFromNib;
- (id)initWithFrame:(NSRect)frameRect;
- (void)setDelegate:(id<BookmarkTableDelegate>)delegate;
- (void)dealloc;
- (void)setDataSource:(BookmarkModel*)dataSource;

// DataSource methods
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex;
- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView;


// Delegate methods
- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView;
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification;

- (int)selectedRow;
- (void)reloadData;
- (void)selectRowIndex:(int)theIndex;
- (void)selectRowByGuid:(NSString*)guid;
- (int)numberOfRows;
- (void)hideSearch;
- (void)setShowGraphic:(BOOL)showGraphic;
- (void)allowEmptySelection;
- (void)allowMultipleSelections;
- (void)deselectAll;
- (void)multiColumns;

- (NSString*)selectedGuid;
- (void)dataChangeNotification:(id)sender;
- (void)onDoubleClick:(id)sender;
- (void)eraseQuery;
- (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize;
- (id)retain;
- (oneway void)release;
- (void)turnOnDebug;

@end
Loading

0 comments on commit 35b029c

Please sign in to comment.