adium 3557:2854e97d7e6b: Remove AIPlasticButton and its siblings...
commits at adium.im
commits at adium.im
Sat Nov 20 19:45:42 UTC 2010
details: http://hg.adium.im/adium/rev/2854e97d7e6b
revision: 3557:2854e97d7e6b
author: Frank Dowsett <wixardy at adium.im>
date: Sat Nov 20 14:34:07 2010 -0500
Remove AIPlasticButton and its siblings since we have actual NSButtons that look the same. Fixes #12974
For the plus/minus buttons I used an NSSegmentedControl.
Also removed Resources/ContactAlerts.nib as it is no longer used.
diffs (truncated from 12711 to 1000 lines):
diff -r ee701d0f4a2b -r 2854e97d7e6b Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj Fri Nov 19 21:44:32 2010 -0800
+++ b/Adium.xcodeproj/project.pbxproj Sat Nov 20 14:34:07 2010 -0500
@@ -1151,6 +1151,8 @@
4F1CB6420D640DA40073A1E6 /* info_segment.png in Resources */ = {isa = PBXBuildFile; fileRef = 4F1CB63E0D640DA40073A1E6 /* info_segment.png */; };
4F1CB64C0D640F4F0073A1E6 /* ContactInfoInspector.nib in Resources */ = {isa = PBXBuildFile; fileRef = 4F1CB64B0D640F4F0073A1E6 /* ContactInfoInspector.nib */; };
5A1781860EC1215D00BA1E04 /* AIAutoScrollTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A1781850EC1215D00BA1E04 /* AIAutoScrollTextView.m */; };
+ 5A5F601D12962EC0007A2232 /* AISegmentedControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A5F601A12962D06007A2232 /* AISegmentedControl.m */; };
+ 5A5F601E12962ECE007A2232 /* AISegmentedControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A5F601912962D06007A2232 /* AISegmentedControl.h */; settings = {ATTRIBUTES = (Public, ); }; };
5A94397B1279ECB800FDD81D /* AIImgurImageUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A94397A1279ECB800FDD81D /* AIImgurImageUploader.m */; };
5A9A9F8911F2951400328DF9 /* AIDoNothingContactAlertPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A9A9F8811F2951400328DF9 /* AIDoNothingContactAlertPlugin.m */; };
5A9A9F8B11F295EB00328DF9 /* Stop sign.png in Resources */ = {isa = PBXBuildFile; fileRef = 5A9A9F8A11F295EB00328DF9 /* Stop sign.png */; };
@@ -1252,14 +1254,6 @@
6334003A0F9C14C2003C77A9 /* AIVariableHeightOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FF580F9C14C0003C77A9 /* AIVariableHeightOutlineView.m */; };
6334003B0F9C14C2003C77A9 /* AIMultiCellOutlineView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FF590F9C14C0003C77A9 /* AIMultiCellOutlineView.h */; settings = {ATTRIBUTES = (Public, ); }; };
6334003C0F9C14C2003C77A9 /* AIMultiCellOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FF5A0F9C14C0003C77A9 /* AIMultiCellOutlineView.m */; };
- 6334003D0F9C14C2003C77A9 /* AIPlasticButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FF5C0F9C14C0003C77A9 /* AIPlasticButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 6334003E0F9C14C2003C77A9 /* AIPlasticButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FF5D0F9C14C0003C77A9 /* AIPlasticButton.m */; };
- 6334003F0F9C14C2003C77A9 /* AIPlasticMinusButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FF5E0F9C14C0003C77A9 /* AIPlasticMinusButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 633400400F9C14C2003C77A9 /* AIPlasticMinusButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FF5F0F9C14C0003C77A9 /* AIPlasticMinusButton.m */; };
- 633400410F9C14C2003C77A9 /* AIPlasticPlusButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FF600F9C14C0003C77A9 /* AIPlasticPlusButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 633400420F9C14C2003C77A9 /* AIPlasticPlusButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FF610F9C14C0003C77A9 /* AIPlasticPlusButton.m */; };
- 633400430F9C14C2003C77A9 /* AIPlasticButtonCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FF620F9C14C0003C77A9 /* AIPlasticButtonCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 633400440F9C14C2003C77A9 /* AIPlasticButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FF630F9C14C0003C77A9 /* AIPlasticButtonCell.m */; };
6334004D0F9C14C2003C77A9 /* AIToolbarTabView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FF6E0F9C14C0003C77A9 /* AIToolbarTabView.h */; settings = {ATTRIBUTES = (Public, ); }; };
6334004E0F9C14C2003C77A9 /* AIToolbarTabView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6334FF6F0F9C14C0003C77A9 /* AIToolbarTabView.m */; };
6334004F0F9C14C2003C77A9 /* AISplitView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6334FF710F9C14C0003C77A9 /* AISplitView.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1396,14 +1390,6 @@
633D51500F9D31BE004F491E /* schema.strings in Resources */ = {isa = PBXBuildFile; fileRef = 633D50EF0F9D31BD004F491E /* schema.strings */; };
633F175D08F905A800C76383 /* AIXtrasManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 633F175908F905A700C76383 /* AIXtrasManager.m */; };
634BCD1F0DDC1542005AF1C2 /* TestMutableStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 634BCD1E0DDC1542005AF1C2 /* TestMutableStringAdditions.m */; };
- 634DC2920F9C3685007B6479 /* PlasticButtonNormal_Middle.png in Resources */ = {isa = PBXBuildFile; fileRef = 6334FF650F9C14C0003C77A9 /* PlasticButtonNormal_Middle.png */; };
- 634DC2930F9C3685007B6479 /* PlasticButtonDefault_Middle.png in Resources */ = {isa = PBXBuildFile; fileRef = 6334FF660F9C14C0003C77A9 /* PlasticButtonDefault_Middle.png */; };
- 634DC2940F9C3685007B6479 /* PlasticButtonPressed_Middle.png in Resources */ = {isa = PBXBuildFile; fileRef = 6334FF670F9C14C0003C77A9 /* PlasticButtonPressed_Middle.png */; };
- 634DC2950F9C3685007B6479 /* PlasticButtonDefault_Caps.png in Resources */ = {isa = PBXBuildFile; fileRef = 6334FF680F9C14C0003C77A9 /* PlasticButtonDefault_Caps.png */; };
- 634DC2960F9C3685007B6479 /* PlasticButtonNormal_Caps.png in Resources */ = {isa = PBXBuildFile; fileRef = 6334FF690F9C14C0003C77A9 /* PlasticButtonNormal_Caps.png */; };
- 634DC2970F9C3685007B6479 /* PlasticButtonPressed_Caps.png in Resources */ = {isa = PBXBuildFile; fileRef = 6334FF6A0F9C14C0003C77A9 /* PlasticButtonPressed_Caps.png */; };
- 634DC2980F9C3685007B6479 /* plus.png in Resources */ = {isa = PBXBuildFile; fileRef = 6334FF6B0F9C14C0003C77A9 /* plus.png */; };
- 634DC2990F9C3685007B6479 /* minus.png in Resources */ = {isa = PBXBuildFile; fileRef = 6334FF6C0F9C14C0003C77A9 /* minus.png */; };
634DC5570F9C3B2F007B6479 /* AIStringUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 634DC5560F9C3B2F007B6479 /* AIStringUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; };
634DC6020F9C43BB007B6479 /* AIUtilities.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6334FBFC0F9C11DC003C77A9 /* AIUtilities.framework */; };
636D8C980E4E95A500E5F558 /* AIAddressBookController.m in Sources */ = {isa = PBXBuildFile; fileRef = 636D8C970E4E95A500E5F558 /* AIAddressBookController.m */; };
@@ -4253,6 +4239,8 @@
4F1CB64B0D640F4F0073A1E6 /* ContactInfoInspector.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ContactInfoInspector.nib; path = Resources/ContactInfoInspector.nib; sourceTree = "<group>"; };
5A1781840EC1215D00BA1E04 /* AIAutoScrollTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIAutoScrollTextView.h; path = Source/AIAutoScrollTextView.h; sourceTree = "<group>"; };
5A1781850EC1215D00BA1E04 /* AIAutoScrollTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIAutoScrollTextView.m; path = Source/AIAutoScrollTextView.m; sourceTree = "<group>"; };
+ 5A5F601912962D06007A2232 /* AISegmentedControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AISegmentedControl.h; path = "Frameworks/AIUtilities Framework/Source/AISegmentedControl.h"; sourceTree = "<group>"; };
+ 5A5F601A12962D06007A2232 /* AISegmentedControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AISegmentedControl.m; path = "Frameworks/AIUtilities Framework/Source/AISegmentedControl.m"; sourceTree = "<group>"; };
5A7642A811E044B900E5E0AF /* sk_SK */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sk_SK; path = Resources/sk_SK.lproj/AccountProxy.nib; sourceTree = "<group>"; };
5A7642A911E044B900E5E0AF /* sk_SK */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sk_SK; path = Resources/sk_SK.lproj/AIAdvancedInspectorPane.nib; sourceTree = "<group>"; };
5A7642AA11E044B900E5E0AF /* sk_SK */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sk_SK; path = Resources/sk_SK.lproj/AppearancePrefs.nib; sourceTree = "<group>"; };
@@ -4443,22 +4431,6 @@
6334FF580F9C14C0003C77A9 /* AIVariableHeightOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIVariableHeightOutlineView.m; path = "Frameworks/AIUtilities Framework/Source/AIVariableHeightOutlineView.m"; sourceTree = "<group>"; };
6334FF590F9C14C0003C77A9 /* AIMultiCellOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIMultiCellOutlineView.h; path = "Frameworks/AIUtilities Framework/Source/AIMultiCellOutlineView.h"; sourceTree = "<group>"; };
6334FF5A0F9C14C0003C77A9 /* AIMultiCellOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIMultiCellOutlineView.m; path = "Frameworks/AIUtilities Framework/Source/AIMultiCellOutlineView.m"; sourceTree = "<group>"; };
- 6334FF5C0F9C14C0003C77A9 /* AIPlasticButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIPlasticButton.h; path = "Frameworks/AIUtilities Framework/Source/AIPlasticButton.h"; sourceTree = "<group>"; };
- 6334FF5D0F9C14C0003C77A9 /* AIPlasticButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIPlasticButton.m; path = "Frameworks/AIUtilities Framework/Source/AIPlasticButton.m"; sourceTree = "<group>"; };
- 6334FF5E0F9C14C0003C77A9 /* AIPlasticMinusButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIPlasticMinusButton.h; path = "Frameworks/AIUtilities Framework/Source/AIPlasticMinusButton.h"; sourceTree = "<group>"; };
- 6334FF5F0F9C14C0003C77A9 /* AIPlasticMinusButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIPlasticMinusButton.m; path = "Frameworks/AIUtilities Framework/Source/AIPlasticMinusButton.m"; sourceTree = "<group>"; };
- 6334FF600F9C14C0003C77A9 /* AIPlasticPlusButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIPlasticPlusButton.h; path = "Frameworks/AIUtilities Framework/Source/AIPlasticPlusButton.h"; sourceTree = "<group>"; };
- 6334FF610F9C14C0003C77A9 /* AIPlasticPlusButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIPlasticPlusButton.m; path = "Frameworks/AIUtilities Framework/Source/AIPlasticPlusButton.m"; sourceTree = "<group>"; };
- 6334FF620F9C14C0003C77A9 /* AIPlasticButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIPlasticButtonCell.h; path = "Frameworks/AIUtilities Framework/Source/AIPlasticButtonCell.h"; sourceTree = "<group>"; };
- 6334FF630F9C14C0003C77A9 /* AIPlasticButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIPlasticButtonCell.m; path = "Frameworks/AIUtilities Framework/Source/AIPlasticButtonCell.m"; sourceTree = "<group>"; };
- 6334FF650F9C14C0003C77A9 /* PlasticButtonNormal_Middle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PlasticButtonNormal_Middle.png; path = "Frameworks/AIUtilities Framework/Resources/PlasticButtonNormal_Middle.png"; sourceTree = "<group>"; };
- 6334FF660F9C14C0003C77A9 /* PlasticButtonDefault_Middle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PlasticButtonDefault_Middle.png; path = "Frameworks/AIUtilities Framework/Resources/PlasticButtonDefault_Middle.png"; sourceTree = "<group>"; };
- 6334FF670F9C14C0003C77A9 /* PlasticButtonPressed_Middle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PlasticButtonPressed_Middle.png; path = "Frameworks/AIUtilities Framework/Resources/PlasticButtonPressed_Middle.png"; sourceTree = "<group>"; };
- 6334FF680F9C14C0003C77A9 /* PlasticButtonDefault_Caps.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PlasticButtonDefault_Caps.png; path = "Frameworks/AIUtilities Framework/Resources/PlasticButtonDefault_Caps.png"; sourceTree = "<group>"; };
- 6334FF690F9C14C0003C77A9 /* PlasticButtonNormal_Caps.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PlasticButtonNormal_Caps.png; path = "Frameworks/AIUtilities Framework/Resources/PlasticButtonNormal_Caps.png"; sourceTree = "<group>"; };
- 6334FF6A0F9C14C0003C77A9 /* PlasticButtonPressed_Caps.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PlasticButtonPressed_Caps.png; path = "Frameworks/AIUtilities Framework/Resources/PlasticButtonPressed_Caps.png"; sourceTree = "<group>"; };
- 6334FF6B0F9C14C0003C77A9 /* plus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = plus.png; path = "Frameworks/AIUtilities Framework/Resources/plus.png"; sourceTree = "<group>"; };
- 6334FF6C0F9C14C0003C77A9 /* minus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = minus.png; path = "Frameworks/AIUtilities Framework/Resources/minus.png"; sourceTree = "<group>"; };
6334FF6E0F9C14C0003C77A9 /* AIToolbarTabView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIToolbarTabView.h; path = "Frameworks/AIUtilities Framework/Source/AIToolbarTabView.h"; sourceTree = "<group>"; };
6334FF6F0F9C14C0003C77A9 /* AIToolbarTabView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIToolbarTabView.m; path = "Frameworks/AIUtilities Framework/Source/AIToolbarTabView.m"; sourceTree = "<group>"; };
6334FF710F9C14C0003C77A9 /* AISplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AISplitView.h; path = "Frameworks/AIUtilities Framework/Source/AISplitView.h"; sourceTree = "<group>"; };
@@ -4665,17 +4637,9 @@
63A3A9770F9C35D3006C9CB0 /* is */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = is; path = is.lproj/Localizable.strings; sourceTree = "<group>"; };
63A3A9780F9C35D3006C9CB0 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = "<group>"; };
63A3A9790F9C35D3006C9CB0 /* ja */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
- 63A3A97A0F9C35D3006C9CB0 /* minus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = minus.png; sourceTree = "<group>"; };
63A3A97B0F9C35D3006C9CB0 /* nb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Localizable.strings; sourceTree = "<group>"; };
63A3A97C0F9C35D3006C9CB0 /* nl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
63A3A97D0F9C35D3006C9CB0 /* pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = "<group>"; };
- 63A3A97E0F9C35D3006C9CB0 /* PlasticButtonDefault_Caps.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = PlasticButtonDefault_Caps.png; sourceTree = "<group>"; };
- 63A3A97F0F9C35D3006C9CB0 /* PlasticButtonDefault_Middle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = PlasticButtonDefault_Middle.png; sourceTree = "<group>"; };
- 63A3A9800F9C35D3006C9CB0 /* PlasticButtonNormal_Caps.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = PlasticButtonNormal_Caps.png; sourceTree = "<group>"; };
- 63A3A9810F9C35D3006C9CB0 /* PlasticButtonNormal_Middle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = PlasticButtonNormal_Middle.png; sourceTree = "<group>"; };
- 63A3A9820F9C35D3006C9CB0 /* PlasticButtonPressed_Caps.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = PlasticButtonPressed_Caps.png; sourceTree = "<group>"; };
- 63A3A9830F9C35D3006C9CB0 /* PlasticButtonPressed_Middle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = PlasticButtonPressed_Middle.png; sourceTree = "<group>"; };
- 63A3A9840F9C35D3006C9CB0 /* plus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = plus.png; sourceTree = "<group>"; };
63A3A9850F9C35D3006C9CB0 /* pt_PT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/Localizable.strings; sourceTree = "<group>"; };
63A3A9860F9C35D3006C9CB0 /* pt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = "<group>"; };
63A3A9870F9C35D3006C9CB0 /* ru */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -7631,6 +7595,15 @@
name = Growl;
sourceTree = "<group>";
};
+ 5A8A6A46124456B1004965A8 /* Segmented control with menu popup */ = {
+ isa = PBXGroup;
+ children = (
+ 5A5F601912962D06007A2232 /* AISegmentedControl.h */,
+ 5A5F601A12962D06007A2232 /* AISegmentedControl.m */,
+ );
+ name = "Segmented control with menu popup";
+ sourceTree = "<group>";
+ };
5AF6824311C46E6B005B3AF5 /* Do Nothing Contact Alert */ = {
isa = PBXGroup;
children = (
@@ -7908,7 +7881,7 @@
6334FF730F9C14C0003C77A9 /* Table View with several improvements */,
6334FF700F9C14C0003C77A9 /* Split View with thickness control */,
6334FF6D0F9C14C0003C77A9 /* Resizing preference window */,
- 6334FF5B0F9C14C0003C77A9 /* "Plastic" aqua buttons */,
+ 5A8A6A46124456B1004965A8 /* Segmented control with menu popup */,
6334FF540F9C14C0003C77A9 /* Outline view with separate group & content cells */,
6334FF4D0F9C14BF003C77A9 /* OutlineView with several improvements */,
6334FF460F9C14BF003C77A9 /* Link Tracking Text View */,
@@ -8025,37 +7998,6 @@
name = "Outline view with separate group & content cells";
sourceTree = "<group>";
};
- 6334FF5B0F9C14C0003C77A9 /* "Plastic" aqua buttons */ = {
- isa = PBXGroup;
- children = (
- 6334FF640F9C14C0003C77A9 /* Images */,
- 6334FF5C0F9C14C0003C77A9 /* AIPlasticButton.h */,
- 6334FF5D0F9C14C0003C77A9 /* AIPlasticButton.m */,
- 6334FF5E0F9C14C0003C77A9 /* AIPlasticMinusButton.h */,
- 6334FF5F0F9C14C0003C77A9 /* AIPlasticMinusButton.m */,
- 6334FF600F9C14C0003C77A9 /* AIPlasticPlusButton.h */,
- 6334FF610F9C14C0003C77A9 /* AIPlasticPlusButton.m */,
- 6334FF620F9C14C0003C77A9 /* AIPlasticButtonCell.h */,
- 6334FF630F9C14C0003C77A9 /* AIPlasticButtonCell.m */,
- );
- name = "\"Plastic\" aqua buttons";
- sourceTree = "<group>";
- };
- 6334FF640F9C14C0003C77A9 /* Images */ = {
- isa = PBXGroup;
- children = (
- 6334FF650F9C14C0003C77A9 /* PlasticButtonNormal_Middle.png */,
- 6334FF660F9C14C0003C77A9 /* PlasticButtonDefault_Middle.png */,
- 6334FF670F9C14C0003C77A9 /* PlasticButtonPressed_Middle.png */,
- 6334FF680F9C14C0003C77A9 /* PlasticButtonDefault_Caps.png */,
- 6334FF690F9C14C0003C77A9 /* PlasticButtonNormal_Caps.png */,
- 6334FF6A0F9C14C0003C77A9 /* PlasticButtonPressed_Caps.png */,
- 6334FF6B0F9C14C0003C77A9 /* plus.png */,
- 6334FF6C0F9C14C0003C77A9 /* minus.png */,
- );
- name = Images;
- sourceTree = "<group>";
- };
6334FF6D0F9C14C0003C77A9 /* Resizing preference window */ = {
isa = PBXGroup;
children = (
@@ -8430,14 +8372,6 @@
children = (
63A3A9670F9C35D3006C9CB0 /* AIUtilities_Framework.plist */,
63A3A9680F9C35D3006C9CB0 /* Localizable.strings */,
- 63A3A97A0F9C35D3006C9CB0 /* minus.png */,
- 63A3A97E0F9C35D3006C9CB0 /* PlasticButtonDefault_Caps.png */,
- 63A3A97F0F9C35D3006C9CB0 /* PlasticButtonDefault_Middle.png */,
- 63A3A9800F9C35D3006C9CB0 /* PlasticButtonNormal_Caps.png */,
- 63A3A9810F9C35D3006C9CB0 /* PlasticButtonNormal_Middle.png */,
- 63A3A9820F9C35D3006C9CB0 /* PlasticButtonPressed_Caps.png */,
- 63A3A9830F9C35D3006C9CB0 /* PlasticButtonPressed_Middle.png */,
- 63A3A9840F9C35D3006C9CB0 /* plus.png */,
);
name = Resources;
path = "Frameworks/AIUtilities Framework/Resources";
@@ -9471,10 +9405,6 @@
633400370F9C14C2003C77A9 /* AIVariableHeightFlexibleColumnsOutlineView.h in Headers */,
633400390F9C14C2003C77A9 /* AIVariableHeightOutlineView.h in Headers */,
6334003B0F9C14C2003C77A9 /* AIMultiCellOutlineView.h in Headers */,
- 6334003D0F9C14C2003C77A9 /* AIPlasticButton.h in Headers */,
- 6334003F0F9C14C2003C77A9 /* AIPlasticMinusButton.h in Headers */,
- 633400410F9C14C2003C77A9 /* AIPlasticPlusButton.h in Headers */,
- 633400430F9C14C2003C77A9 /* AIPlasticButtonCell.h in Headers */,
6334004D0F9C14C2003C77A9 /* AIToolbarTabView.h in Headers */,
6334004F0F9C14C2003C77A9 /* AISplitView.h in Headers */,
633400510F9C14C2003C77A9 /* AIAlternatingRowTableView.h in Headers */,
@@ -9536,6 +9466,7 @@
63BB1CB90F9EDD2B00424B80 /* AISharedWriterQueue.h in Headers */,
11AA10130FCE0969003908B6 /* AIProgressDataUploader.h in Headers */,
7E959AD010E3187000C26397 /* AIMathCompatibility.h in Headers */,
+ 5A5F601E12962ECE007A2232 /* AISegmentedControl.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -10224,14 +10155,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 634DC2920F9C3685007B6479 /* PlasticButtonNormal_Middle.png in Resources */,
- 634DC2930F9C3685007B6479 /* PlasticButtonDefault_Middle.png in Resources */,
- 634DC2940F9C3685007B6479 /* PlasticButtonPressed_Middle.png in Resources */,
- 634DC2950F9C3685007B6479 /* PlasticButtonDefault_Caps.png in Resources */,
- 634DC2960F9C3685007B6479 /* PlasticButtonNormal_Caps.png in Resources */,
- 634DC2970F9C3685007B6479 /* PlasticButtonPressed_Caps.png in Resources */,
- 634DC2980F9C3685007B6479 /* plus.png in Resources */,
- 634DC2990F9C3685007B6479 /* minus.png in Resources */,
63A3A98E0F9C35D3006C9CB0 /* Localizable.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -10999,10 +10922,6 @@
633400380F9C14C2003C77A9 /* AIVariableHeightFlexibleColumnsOutlineView.m in Sources */,
6334003A0F9C14C2003C77A9 /* AIVariableHeightOutlineView.m in Sources */,
6334003C0F9C14C2003C77A9 /* AIMultiCellOutlineView.m in Sources */,
- 6334003E0F9C14C2003C77A9 /* AIPlasticButton.m in Sources */,
- 633400400F9C14C2003C77A9 /* AIPlasticMinusButton.m in Sources */,
- 633400420F9C14C2003C77A9 /* AIPlasticPlusButton.m in Sources */,
- 633400440F9C14C2003C77A9 /* AIPlasticButtonCell.m in Sources */,
6334004E0F9C14C2003C77A9 /* AIToolbarTabView.m in Sources */,
633400500F9C14C2003C77A9 /* AISplitView.m in Sources */,
633400520F9C14C2003C77A9 /* AIAlternatingRowTableView.m in Sources */,
@@ -11060,6 +10979,7 @@
633400C80F9C14C2003C77A9 /* AIPasteboardAdditions.m in Sources */,
63BB1CC90F9EDDB600424B80 /* AISharedWriterQueue.m in Sources */,
11AA10140FCE0969003908B6 /* AIProgressDataUploader.m in Sources */,
+ 5A5F601D12962EC0007A2232 /* AISegmentedControl.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Resources/PlasticButtonDefault_Caps.png
Binary file Frameworks/AIUtilities Framework/Resources/PlasticButtonDefault_Caps.png has changed
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Resources/PlasticButtonDefault_Middle.png
Binary file Frameworks/AIUtilities Framework/Resources/PlasticButtonDefault_Middle.png has changed
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Resources/PlasticButtonNormal_Caps.png
Binary file Frameworks/AIUtilities Framework/Resources/PlasticButtonNormal_Caps.png has changed
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Resources/PlasticButtonNormal_Middle.png
Binary file Frameworks/AIUtilities Framework/Resources/PlasticButtonNormal_Middle.png has changed
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Resources/PlasticButtonPressed_Caps.png
Binary file Frameworks/AIUtilities Framework/Resources/PlasticButtonPressed_Caps.png has changed
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Resources/PlasticButtonPressed_Middle.png
Binary file Frameworks/AIUtilities Framework/Resources/PlasticButtonPressed_Middle.png has changed
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Resources/minus.png
Binary file Frameworks/AIUtilities Framework/Resources/minus.png has changed
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Resources/plus.png
Binary file Frameworks/AIUtilities Framework/Resources/plus.png has changed
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AIPlasticButton.h
--- a/Frameworks/AIUtilities Framework/Source/AIPlasticButton.h Fri Nov 19 21:44:32 2010 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-//
-// AIPlasticButton.h
-// Adium
-//
-// Created by Adam Iser on Thu Jun 26 2003.
-// Copyright (c) 2003-2005 The Adium Team. All rights reserved.
-//
-
-/*!
- * @class AIPlasticButton
- * @brief NSButton subclass for implementing a "plastic" Aqua button
- *
- * <tt>AIPlasticButton</tt> uses an <tt>AIPlasticButtonCell</tt> to display a "plastic" Aqua button within its frame.
- */
- at interface AIPlasticButton : NSButton {
-}
-
- at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AIPlasticButton.m
--- a/Frameworks/AIUtilities Framework/Source/AIPlasticButton.m Fri Nov 19 21:44:32 2010 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-//
-// AIPlasticButton.m
-// Adium
-//
-// Created by Adam Iser on Thu Jun 26 2003.
-//
-
-#import "AIPlasticButton.h"
-#import "AIPlasticButtonCell.h"
-
-#define LABEL_OFFSET_X 1
-#define LABEL_OFFSET_Y -1
-
- at implementation AIPlasticButton
-
-+ (void)initialize {
- if (self == [AIPlasticButton class])
- [self setCellClass:[AIPlasticButtonCell class]];
-}
-
-- (id)copyWithZone:(NSZone *)zone
-{
- AIPlasticButton *newButton = [[[self class] allocWithZone:zone] initWithFrame:[self frame]];
-
- [newButton setMenu:[[[self menu] copy] autorelease]];
-
- return newButton;
-}
-
-- (id)initWithFrame:(NSRect)frameRect
-{
- if ((self = [super initWithFrame:frameRect])) {
- //Default title and image
- [self setTitle:@""];
- [self setImage:nil];
- [self setImagePosition:NSImageOnly];
- }
-
- return self;
-}
-
-- (void)sizeToFit
-{
- [super sizeToFit];
-
- NSRect frame = [self frame];
- frame.size.width += LABEL_OFFSET_X * 2;
-
- [self setFrame:frame];
-}
-
-//silly NSControl...
-- (void)setMenu:(NSMenu *)menu {
- [super setMenu:menu];
- [[self cell] setMenu:menu];
-}
-
-//Mouse Tracking -------------------------------------------------------------------------------------------------------
-#pragma mark Mouse Tracking
-//Custom mouse down tracking to display our menu and highlight
-- (void)mouseDown:(NSEvent *)theEvent
-{
- if (![self menu]) {
- [super mouseDown:theEvent];
- } else {
- if ([self isEnabled] &&
- NSPointInRect([self convertPoint:[theEvent locationInWindow] fromView:nil], [self bounds])) {
- [self highlight:YES];
-
- //2 pt down, 1 pt to the left.
- NSPoint point = [self convertPoint:[self bounds].origin toView:nil];
- point.y -= NSHeight([self frame]) + 2;
- point.x -= 1;
-
- NSEvent *event = [NSEvent mouseEventWithType:[theEvent type]
- location:point
- modifierFlags:[theEvent modifierFlags]
- timestamp:[theEvent timestamp]
- windowNumber:[[theEvent window] windowNumber]
- context:[theEvent context]
- eventNumber:[theEvent eventNumber]
- clickCount:[theEvent clickCount]
- pressure:[theEvent pressure]];
- [NSMenu popUpContextMenu:[self menu] withEvent:event forView:self];
-
- //In the case of the Add Account pop-up button (which is an instance of this class), if the user cancels the Account Editor immediately after it appears for the new account, we stay highlighted, which is a bug (#7955). Sending ourselves mouseUp fixes that.
- [self mouseUp:[[NSApplication sharedApplication] currentEvent]];
- }
- }
-}
-
-//Remove highlight on mouse up
-- (void)mouseUp:(NSEvent *)theEvent
-{
- [self highlight:NO];
- [super mouseUp:theEvent];
-}
-
-//Ignore dragging
-- (void)mouseDragged:(NSEvent *)theEvent
-{
- //Empty
-}
-
- at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AIPlasticButtonCell.h
--- a/Frameworks/AIUtilities Framework/Source/AIPlasticButtonCell.h Fri Nov 19 21:44:32 2010 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-//
-// AIPlasticButtonCell.m
-// AIUtilities
-//
-// Created by Mac-arena the Bored Zo on 2005-11-26.
-//
-
-/*!
- * @class AIPlasticButtonCell
- * @brief NSButtonCell subclass for implementing a "plastic" Aqua button
- *
- * NOTE: The current implementation is incomplete (in particular, NSCellImagePosition values other than
- * NSImageOnly and NSNoImage are quite broken). Please fix if you can.
- */
- at interface AIPlasticButtonCell : NSButtonCell {
- NSImage *plasticCaps;
- NSImage *plasticMiddle;
- NSImage *plasticPressedCaps;
- NSImage *plasticPressedMiddle;
- NSImage *plasticDefaultCaps;
- NSImage *plasticDefaultMiddle;
-}
-
- at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AIPlasticButtonCell.m
--- a/Frameworks/AIUtilities Framework/Source/AIPlasticButtonCell.m Fri Nov 19 21:44:32 2010 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,283 +0,0 @@
-//
-// AIPlasticButtonCell.m
-// AIUtilities
-//
-// Created by Mac-arena the Bored Zo on 2005-11-26.
-// Drawing code, -copyWithZone: code, -commonInit code, and -isOpaque ganked from previous implementation of AIPlasticButton by Adam Iser.
-//
-
-#import "AIPlasticButtonCell.h"
-#import "AIImageAdditions.h"
-
-#import <Carbon/Carbon.h>
-
-#define LABEL_OFFSET_X 1
-#define LABEL_OFFSET_Y -1
-
-#define IMAGE_OFFSET_X 0
-#define IMAGE_OFFSET_Y 0
-
-#define PLASTIC_ARROW_WIDTH 8
-#define PLASTIC_ARROW_HEIGHT (PLASTIC_ARROW_WIDTH/2.0f)
-#define PLASTIC_ARROW_XOFFSET 12
-#define PLASTIC_ARROW_YOFFSET 12
-#define PLASTIC_ARROW_PADDING 8
-
- at implementation AIPlasticButtonCell
-
-#pragma mark Birth and Death
-
-- (id)copyWithZone:(NSZone *)zone
-{
- AIPlasticButtonCell *newCell = [[self class] allocWithZone:zone];
-
- switch ([self type]) {
- case NSImageCellType:
- newCell = [newCell initImageCell:[self image]];
- break;
- case NSTextCellType:
- newCell = [newCell initTextCell:[self stringValue]];
- break;
- default:
- newCell = [newCell init]; //and hope for the best
- break;
- }
-
- [newCell setMenu:[[[self menu] copy] autorelease]];
- [newCell->plasticCaps retain];
- [newCell->plasticMiddle retain];
- [newCell->plasticPressedCaps retain];
- [newCell->plasticPressedMiddle retain];
- [newCell->plasticDefaultCaps retain];
- [newCell->plasticDefaultMiddle retain];
-
- return newCell;
-}
-
-- (void)commonInit
-{
- //Default title and image
- [self setTitle:@""];
- [self setImage:nil];
- [self setImagePosition:NSImageOnly];
-
- Class myClass = [self class];
-
- //Load images
- plasticCaps = [[NSImage imageNamed:@"PlasticButtonNormal_Caps" forClass:myClass] retain];
- plasticMiddle = [[NSImage imageNamed:@"PlasticButtonNormal_Middle" forClass:myClass] retain];
- plasticPressedCaps = [[NSImage imageNamed:@"PlasticButtonPressed_Caps" forClass:myClass] retain];
- plasticPressedMiddle = [[NSImage imageNamed:@"PlasticButtonPressed_Middle" forClass:myClass] retain];
- plasticDefaultCaps = [[NSImage imageNamed:@"PlasticButtonDefault_Caps" forClass:myClass] retain];
- plasticDefaultMiddle = [[NSImage imageNamed:@"PlasticButtonDefault_Middle" forClass:myClass] retain];
-
- [plasticCaps setFlipped:YES];
- [plasticMiddle setFlipped:YES];
- [plasticPressedCaps setFlipped:YES];
- [plasticPressedMiddle setFlipped:YES];
- [plasticDefaultCaps setFlipped:YES];
- [plasticDefaultMiddle setFlipped:YES];
-}
-
-- (id)initTextCell:(NSString *)str
-{
- if ((self = [super initTextCell:str])) {
- [self commonInit];
- }
-
- return self;
-}
-- (id)initImageCell:(NSImage *)image
-{
- if ((self = [super initImageCell:image])) {
- [self commonInit];
- }
-
- return self;
-}
-
-- (void)dealloc
-{
- [plasticCaps release];
- [plasticMiddle release];
- [plasticPressedCaps release];
- [plasticPressedMiddle release];
- [plasticDefaultCaps release];
- [plasticDefaultMiddle release];
-
- [super dealloc];
-}
-
-#pragma mark Spiffy drawing magic
-
-//for some unknown reason, NSButtonCell's -drawWithFrame:inView: draws a basic ridge border on the bottom-right if we do not override it.
-- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
-{
- [self drawInteriorWithFrame:cellFrame inView:controlView];
-}
-
-- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
-{
- NSRect sourceRect, destRect, frame;
- CGFloat capWidth;
- CGFloat capHeight;
- CGFloat middleRight;
- NSImage *caps;
- NSImage *middle;
- NSCellImagePosition imagePosition = [self imagePosition];
-
- //Get the correct images
- if (![self isHighlighted]) {
- if ([[self keyEquivalent] isEqualToString:@"\r"]) {
- //default button. draw appropriately.
- caps = plasticDefaultCaps;
- middle = plasticDefaultMiddle;
- } else {
- caps = plasticCaps;
- middle = plasticMiddle;
- }
- } else {
- caps = plasticPressedCaps;
- middle = plasticPressedMiddle;
- }
-
- //Precalc some sizes
- NSSize capsSize = [caps size];
- frame = cellFrame;//[controlView bounds];
- capWidth = capsSize.width / 2.0f;
- capHeight = capsSize.height;
- middleRight = ((frame.origin.x + frame.size.width) - capWidth);
-
- //Draw the left cap
- destRect = NSMakeRect(frame.origin.x/* + capWidth*/, frame.origin.y/* + frame.size.height*/, capWidth, frame.size.height);
- [caps drawInRect:destRect
- fromRect:NSMakeRect(0, 0, capWidth, capHeight)
- operation:NSCompositeSourceOver
- fraction:1.0f];
-
- //Draw the middle, which tiles across the button (excepting the areas drawn by the left and right caps)
- NSSize middleSize = [middle size];
- sourceRect = NSMakeRect(0, 0, middleSize.width, middleSize.height);
- destRect = NSMakeRect(frame.origin.x + capWidth, frame.origin.y/* + frame.size.height*/, sourceRect.size.width, frame.size.height);
-
- while (destRect.origin.x < middleRight && (int)destRect.size.width > 0) {
- //Crop
- if ((destRect.origin.x + destRect.size.width) > middleRight) {
- sourceRect.size.width -= (destRect.origin.x + destRect.size.width) - middleRight;
- }
-
- [middle drawInRect:destRect
- fromRect:sourceRect
- operation:NSCompositeSourceOver
- fraction:1.0f];
- destRect.origin.x += destRect.size.width;
- }
-
- //Draw right mask
- destRect = NSMakeRect(middleRight, frame.origin.y/* + frame.size.height*/, capWidth, frame.size.height);
- [caps drawInRect:destRect
- fromRect:NSMakeRect(capWidth, 0, capWidth, capHeight)
- operation:NSCompositeSourceOver
- fraction:1.0f];
-
- //Draw Label
- if(imagePosition != NSImageOnly) {
- NSString *title = [self title];
- if (title) {
- //Prep attributes
- NSColor *color = [self isEnabled] ? [NSColor blackColor] : [NSColor colorWithCalibratedWhite:0.0f alpha:0.5f];
-
- NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[self font], NSFontAttributeName, color, NSForegroundColorAttributeName, nil];
-
- //Calculate center
- NSSize size = [title sizeWithAttributes:attributes];
- NSPoint centeredPoint = NSMakePoint(frame.origin.x + AIround((frame.size.width - size.width) / 2.0f) + LABEL_OFFSET_X,
- frame.origin.y + AIround((frame.size.height - size.height) / 2.0f) + LABEL_OFFSET_Y);
-
- //Draw
- [title drawAtPoint:centeredPoint withAttributes:attributes];
- }
- }
-
- //Draw image
- if(imagePosition != NSNoImage) {
- NSImage *image = [self image];
- if (image) {
- NSSize size = [image size];
- NSRect centeredRect;
-
- if ([self menu]) frame.size.width -= PLASTIC_ARROW_PADDING;
-
- centeredRect = NSMakeRect(frame.origin.x + (int)((frame.size.width - size.width) / 2.0f) + IMAGE_OFFSET_X,
- frame.origin.y + (int)((frame.size.height - size.height) / 2.0f) + IMAGE_OFFSET_Y,
- size.width,
- size.height);
-
- [image setFlipped:YES];
- [image drawInRect:centeredRect
- fromRect:NSMakeRect(0,0,size.width,size.height)
- operation:NSCompositeSourceOver
- fraction:([self isEnabled] ? 1.0f : 0.5f)];
- }
- }
-
- //Draw the arrow, if needed
- if ([self menu]) {
- struct HIThemePopupArrowDrawInfo drawInfo = {
- .version = 0,
- .state = 0,
- .orientation = kThemeArrowDown,
- .size = kThemeArrow7pt,
- };
- if([self isEnabled]) {
- if([self state] != NSOffState) {
- drawInfo.state = kThemeStatePressed;
- } else {
- drawInfo.state = kThemeStateActive;
- }
- } else {
- drawInfo.state = kThemeStateInactive;
- }
-
- union {
- HIRect HIToolbox;
- NSRect AppKit;
- } rect;
-
- frame = [controlView frame];
- rect.AppKit.origin.x = NSWidth (frame) - PLASTIC_ARROW_XOFFSET;
- rect.AppKit.origin.y = NSHeight(frame) - PLASTIC_ARROW_YOFFSET;
- rect.AppKit.size.width = PLASTIC_ARROW_WIDTH;
- rect.AppKit.size.height = PLASTIC_ARROW_HEIGHT;
-
- HIThemeDrawPopupArrow(&rect.HIToolbox,
- &drawInfo,
- [[NSApp context] graphicsPort],
- kHIThemeOrientationNormal);
- }
-}
-
-- (id)accessibilityAttributeValue:(NSString *)attribute
-{
- if([attribute isEqualToString:NSAccessibilityRoleAttribute]) {
- return NSAccessibilityButtonRole;
-
- } else if([attribute isEqualToString:NSAccessibilityTitleAttribute]) {
- return [self title];
-
- } else if([attribute isEqualToString:NSAccessibilityHelpAttribute]) {
- return [self title];
-
- } else {
- return [super accessibilityAttributeValue:attribute];
- }
-}
-
-#pragma mark Accessors (should that REALLY be plural?)
-
-- (BOOL)isOpaque
-{
- return NO;
-}
-
- at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AIPlasticMinusButton.h
--- a/Frameworks/AIUtilities Framework/Source/AIPlasticMinusButton.h Fri Nov 19 21:44:32 2010 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-//
-// AIPlasticMinusButton.h
-// Adium
-//
-// Created by Adam Iser on 8/9/04.
-//
-
-#import <AIUtilities/AIPlasticButton.h>
-
-/*!
- * @class AIPlasticMinusButton
- * @brief "Plastic" Aqua minus (-) button
- *
- * "Plastic" Aqua minus (-) button
- */
- at interface AIPlasticMinusButton : AIPlasticButton {
-
-}
-
- at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AIPlasticMinusButton.m
--- a/Frameworks/AIUtilities Framework/Source/AIPlasticMinusButton.m Fri Nov 19 21:44:32 2010 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-//
-// AIPlasticMinusButton.m
-// Adium
-//
-// Created by Adam Iser on 8/9/04.
-//
-
-#import "AIPlasticMinusButton.h"
-#import "AIImageAdditions.h"
-
- at implementation AIPlasticMinusButton
-
-- (id)initWithFrame:(NSRect)frameRect
-{
- if ((self = [super initWithFrame:frameRect])) {
- [self setImage:[NSImage imageNamed:@"minus" forClass:[self class]]];
- [self setTitle:NSLocalizedString(@"Delete", /*comment*/ nil)];
- [self setImagePosition:NSImageOnly];
- }
- return self;
-}
-
- at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AIPlasticPlusButton.h
--- a/Frameworks/AIUtilities Framework/Source/AIPlasticPlusButton.h Fri Nov 19 21:44:32 2010 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-//
-// AIPlasticPlusButton.h
-// Adium
-//
-// Created by Adam Iser on 8/9/04.
-//
-
-#import <AIUtilities/AIPlasticButton.h>
-
-/*!
- * @class AIPlasticPlusButton
- * @brief "Plastic" Aqua plus (+) button
- *
- * "Plastic" Aqua plus (+) button
- */
- at interface AIPlasticPlusButton : AIPlasticButton {
-
-}
-
- at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AIPlasticPlusButton.m
--- a/Frameworks/AIUtilities Framework/Source/AIPlasticPlusButton.m Fri Nov 19 21:44:32 2010 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-//
-// AIPlasticPlusButton.m
-// Adium
-//
-// Created by Adam Iser on 8/9/04.
-//
-
-#import "AIPlasticPlusButton.h"
-#import "AIImageAdditions.h"
-
- at implementation AIPlasticPlusButton
-
-- (id)initWithFrame:(NSRect)frameRect
-{
- if ((self = [super initWithFrame:frameRect])) {
- [self setImage:[NSImage imageNamed:@"plus" forClass:[self class]]];
- [self setTitle:NSLocalizedString(@"Add", /*comment*/ nil)];
- [self setImagePosition:NSImageOnly];
- }
- return self;
-}
-
- at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AISegmentedControl.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AISegmentedControl.h Sat Nov 20 14:34:07 2010 -0500
@@ -0,0 +1,28 @@
+/*
+ * Adium is the legal property of its developers, whose names are listed in the copyright file included
+ * with this source distribution.
+ *
+ * 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 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#import <Cocoa/Cocoa.h>
+
+
+ at interface AISegmentedControl : NSSegmentedControl {
+
+}
+
+- (void)setMenuIndicatorShown:(BOOL)shown forSegment:(NSInteger)segment;
+- (void)showMenuForSegment:(NSInteger)segment;
+
+ at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/AIUtilities Framework/Source/AISegmentedControl.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AISegmentedControl.m Sat Nov 20 14:34:07 2010 -0500
@@ -0,0 +1,54 @@
+/*
+ * Adium is the legal property of its developers, whose names are listed in the copyright file included
+ * with this source distribution.
+ *
+ * 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 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+
+#import "AISegmentedControl.h"
+#import <AIUtilities/AIApplicationAdditions.h>
+
+ at interface NSMenu (NewSnowLeopardMethods)
+- (BOOL)popUpMenuPositioningItem:(NSMenuItem *)item atLocation:(NSPoint)location inView:(NSView *)view;
+ at end
+
+ at interface NSSegmentedCell (ApplePrivate)
+- (void)setMenuIndicatorShown:(BOOL)shown forSegment:(NSInteger)segment;
+ at end
+
+ at implementation AISegmentedControl
+- (void)setMenuIndicatorShown:(BOOL)shown forSegment:(NSInteger)segment;
+{
+ if ([self.cell respondsToSelector:@selector(setMenuIndicatorShown:forSegment:)])
+ [self.cell setMenuIndicatorShown:shown forSegment:segment];
+}
+
+//Display the menu set on the NSSegmentedControl for the specified segment
+- (void)showMenuForSegment:(NSInteger)segment
+{
+ NSView *view = [self window].contentView;
+ if ([NSApp isOnSnowLeopardOrBetter])
+ [self.menu popUpMenuPositioningItem:nil atLocation:self.frame.origin inView:view];
+ else{
+ NSRect frame = self.frame;
+ frame.origin.x += 10.0;
+ frame.origin.y -= 23.0;
+
+ NSPopUpButtonCell *popUpButtonCell = [[[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO] autorelease];
+ [popUpButtonCell setMenu:self.menu];
+ [popUpButtonCell selectItem:nil];
+ [popUpButtonCell performClickWithFrame:frame inView:view];
+ }
+}
+
+ at end
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/Adium Framework/Source/ESContactAlertsViewController.h
--- a/Frameworks/Adium Framework/Source/ESContactAlertsViewController.h Fri Nov 19 21:44:32 2010 -0800
+++ b/Frameworks/Adium Framework/Source/ESContactAlertsViewController.h Sat Nov 20 14:34:07 2010 -0500
@@ -31,9 +31,8 @@
NSMutableDictionary *expandStateDict;
NSMutableDictionary *requiredHeightDict;
- IBOutlet NSButton *button_add;
- IBOutlet NSButton *button_delete;
- IBOutlet NSButton *button_edit;
+ IBOutlet NSButton *button_edit;
+ IBOutlet NSSegmentedControl *button_addOrRemoveAlert;
AIListObject *listObject;
@@ -50,9 +49,8 @@
- (void)configureForListObject:(AIListObject *)inObject;
- (void)configureForListObject:(AIListObject *)inObject showingAlertsForEventID:(NSString *)inTargetEventID;
-- (IBAction)addAlert:(id)sender;
+- (IBAction)addOrRemoveAlert:(id)sender;
- (IBAction)editAlert:(id)sender;
-- (IBAction)deleteAlert:(id)sender;
- (void)setDelegate:(id)inDelegate;
- (id)delegate;
diff -r ee701d0f4a2b -r 2854e97d7e6b Frameworks/Adium Framework/Source/ESContactAlertsViewController.m
--- a/Frameworks/Adium Framework/Source/ESContactAlertsViewController.m Fri Nov 19 21:44:32 2010 -0800
+++ b/Frameworks/Adium Framework/Source/ESContactAlertsViewController.m Sat Nov 20 14:34:07 2010 -0500
@@ -47,6 +47,9 @@
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
- (IBAction)didDoubleClick:(id)sender;
+
+- (void)addAlert;
+- (void)deleteAlert;
@end
int alertAlphabeticalSort(id objectA, id objectB, void *context);
@@ -71,38 +74,20 @@
name:NSOutlineViewColumnDidResizeNotification
object:outlineView_summary];
- //Manually size and position our buttons
- {
- NSRect newFrame, oldFrame;
+ [button_edit setTitle:AILocalizedStringFromTable(@"Edit", @"Buttons", "Verb 'edit' on a button")];
+ [button_edit setToolTip:AILocalizedString(@"Configure the selected action", nil)];
+ [button_addOrRemoveAlert setToolTip:AILocalizedString(@"Add an action for the selected event", nil) forSegment:0];
+ [button_addOrRemoveAlert setToolTip:AILocalizedString(@"Remove the selected action(s)", nil) forSegment:1];
- //Edit, right justified and far enough away from Remove that it can't conceivably overlap
- oldFrame = [button_edit frame];
-
- /* Note: This is using the "Buttons" table from the main bundle. The string gets into the strings file there from other parts of Adium;
- * this is incorrect but not particularly worth fixing.
- */
- [button_edit setTitle:AILocalizedStringFromTable(@"Edit", @"Buttons", "Verb 'edit' on a button")];
- [button_edit sizeToFit];
- newFrame = [button_edit frame];
- if (newFrame.size.width < oldFrame.size.width) newFrame.size.width = oldFrame.size.width;
- newFrame.origin.x = oldFrame.origin.x + oldFrame.size.width - newFrame.size.width;
- [button_edit setFrame:newFrame];
- }
-
- [button_add setToolTip:AILocalizedString(@"Add an action for the selected event", nil)];
- [button_delete setToolTip:AILocalizedString(@"Remove the selected action(s)", nil)];
- [button_edit setToolTip:AILocalizedString(@"Configure the selected action", nil)];
-
[outlineView_summary accessibilitySetOverrideValue:AILocalizedString(@"Events", nil)
forAttribute:NSAccessibilityDescriptionAttribute];
//Update enable state of our buttons
[self outlineViewSelectionDidChange:nil];
-
+
configureForGlobal = NO;
showEventsInEditSheet = NO;
- //
[adium.preferenceController registerPreferenceObserver:self forGroup:PREF_GROUP_CONTACT_ALERTS];
}
@@ -197,8 +182,22 @@
//Alert Editing --------------------------------------------------------------------------------------------------------
#pragma mark Actions
+- (IBAction)addOrRemoveAlert:(id)sender
+{
+ NSInteger selectedSegment = [sender selectedSegment];
+
+ switch (selectedSegment){
+ case 0:
+ [self addAlert];
+ break;
+ case 1:
+ [self deleteAlert];
+ break;
+ }
+}
+
//Add new alert
-- (IBAction)addAlert:(id)sender
+- (void)addAlert
{
NSString *defaultEventID;
id item = [outlineView_summary itemAtRow:[outlineView_summary selectedRow]];
@@ -235,7 +234,7 @@
}
//Delete an alert
-- (IBAction)deleteAlert:(id)sender
+- (void)deleteAlert
{
NSInteger selectedRow = [outlineView_summary selectedRow];
if (selectedRow != -1) {
@@ -533,7 +532,7 @@
if ([contactAlertsActions containsObjectIdenticalTo:item]) {
if ([item count] == 0) {
- [self addAlert:nil];
+ [self addAlert];
} else if ([outlineView_summary isItemExpanded:item]) {
More information about the commits
mailing list