mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
combine group code and adjust the group button size
This commit is contained in:
parent
fc1adc6093
commit
71471102bc
4 changed files with 15 additions and 20 deletions
|
@ -2094,30 +2094,25 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
int index = [fDefaults integerForKey: @"FilterGroup"];
|
||||
|
||||
NSImage * icon = nil;
|
||||
if (index >= 0)
|
||||
icon = [[GroupsWindowController groupsController] imageForIndex: index isSmall: YES];
|
||||
else if (index == GROUP_FILTER_ALL_TAG)
|
||||
icon = [NSImage imageNamed: @"PinTemplate.png"];
|
||||
else
|
||||
{
|
||||
if ([NSApp isOnLeopardOrBetter])
|
||||
icon = [NSImage imageNamed: NSImageNameRemoveTemplate];
|
||||
}
|
||||
[[fGroupFilterMenu itemAtIndex: 0] setImage: icon];
|
||||
|
||||
NSString * toolTip;
|
||||
switch (index)
|
||||
{
|
||||
case GROUP_FILTER_ALL_TAG:
|
||||
icon = [NSImage imageNamed: @"PinTemplate.png"];
|
||||
toolTip = NSLocalizedString(@"All Groups", "Groups -> Button");
|
||||
break;
|
||||
case -1:
|
||||
if ([NSApp isOnLeopardOrBetter])
|
||||
icon = [NSImage imageNamed: NSImageNameRemoveTemplate];
|
||||
toolTip = NSLocalizedString(@"Group: No Label", "Groups -> Button");
|
||||
break;
|
||||
default:
|
||||
icon = [[GroupsWindowController groupsController] imageForIndex: index isSmall: YES];
|
||||
toolTip = [NSLocalizedString(@"Group: ", "Groups -> Button") stringByAppendingString:
|
||||
[[GroupsWindowController groupsController] nameForIndex: index]];
|
||||
}
|
||||
|
||||
[[fGroupFilterMenu itemAtIndex: 0] setImage: icon];
|
||||
[fGroupsButton setToolTip: toolTip];
|
||||
}
|
||||
|
||||
|
|
16
macosx/English.lproj/MainMenu.nib/classes.nib
generated
16
macosx/English.lproj/MainMenu.nib/classes.nib
generated
|
@ -272,14 +272,6 @@
|
|||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>FilterButton</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSButton</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
|
@ -318,6 +310,14 @@
|
|||
<key>SUPERCLASS</key>
|
||||
<string>NSTableView</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>FilterButton</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSButton</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>ActionPopUpButton</string>
|
||||
|
|
2
macosx/English.lproj/MainMenu.nib/info.nib
generated
2
macosx/English.lproj/MainMenu.nib/info.nib
generated
|
@ -10,7 +10,7 @@
|
|||
<integer>5</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>1310</integer>
|
||||
<integer>1603</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9B18</string>
|
||||
|
|
BIN
macosx/English.lproj/MainMenu.nib/keyedobjects.nib
generated
BIN
macosx/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Binary file not shown.
Loading…
Reference in a new issue