1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

show initially selected tab as selected

This commit is contained in:
Mitchell Livingston 2007-10-07 02:31:36 +00:00
parent 973ed82609
commit 4887259081

View file

@ -82,6 +82,25 @@ typedef enum
[window setBecomesKeyOnlyIfNeeded: YES];
[window setAcceptsMouseMovedEvents: YES];
//set tab images and tooltips
[fTabBackBar setBackgroundImage: [NSImage imageNamed: @"InfoTabBorder.tif"]];
[[fTabMatrix cellWithTag: TAB_INFO_TAG] setIcon: [NSImage imageNamed: @"InfoGeneral.png"]];
[[fTabMatrix cellWithTag: TAB_ACTIVITY_TAG] setIcon: nil];
[[fTabMatrix cellWithTag: TAB_PEERS_TAG] setIcon: nil];
[[fTabMatrix cellWithTag: TAB_FILES_TAG] setIcon: nil];
[[fTabMatrix cellWithTag: TAB_OPTIONS_TAG] setIcon: [NSImage imageNamed: @"InfoOptions.png"]];
[fTabMatrix setToolTip: NSLocalizedString(@"General Info", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_INFO_TAG]];
[fTabMatrix setToolTip: NSLocalizedString(@"Activity", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_ACTIVITY_TAG]];
[fTabMatrix setToolTip: NSLocalizedString(@"Peers", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_PEERS_TAG]];
[fTabMatrix setToolTip: NSLocalizedString(@"Files", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_FILES_TAG]];
[fTabMatrix setToolTip: NSLocalizedString(@"Options", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_OPTIONS_TAG]];
//set selected tab
fCanResizeVertical = NO;
fCurrentTabTag = INVALID;
@ -105,25 +124,6 @@ typedef enum
[fTabMatrix selectCellWithTag: tag];
[self setTab: nil];
//set tab images and tooltips
[fTabBackBar setBackgroundImage: [NSImage imageNamed: @"InfoTabBorder.tif"]];
[[fTabMatrix cellWithTag: TAB_INFO_TAG] setIcon: [NSImage imageNamed: @"InfoGeneral.png"]];
[[fTabMatrix cellWithTag: TAB_ACTIVITY_TAG] setIcon: nil];
[[fTabMatrix cellWithTag: TAB_PEERS_TAG] setIcon: nil];
[[fTabMatrix cellWithTag: TAB_FILES_TAG] setIcon: nil];
[[fTabMatrix cellWithTag: TAB_OPTIONS_TAG] setIcon: [NSImage imageNamed: @"InfoOptions.png"]];
[fTabMatrix setToolTip: NSLocalizedString(@"General Info", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_INFO_TAG]];
[fTabMatrix setToolTip: NSLocalizedString(@"Activity", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_ACTIVITY_TAG]];
[fTabMatrix setToolTip: NSLocalizedString(@"Peers", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_PEERS_TAG]];
[fTabMatrix setToolTip: NSLocalizedString(@"Files", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_FILES_TAG]];
[fTabMatrix setToolTip: NSLocalizedString(@"Options", "Inspector -> tab tooltip")
forCell: [fTabMatrix cellWithTag: TAB_OPTIONS_TAG]];
//initially sort peer table by IP
if ([[fPeerTable sortDescriptors] count] == 0)
[fPeerTable setSortDescriptors: [NSArray arrayWithObject: [[fPeerTable tableColumnWithIdentifier: @"IP"]