diff --git a/Cog.xcodeproj/project.pbxproj b/Cog.xcodeproj/project.pbxproj index 9f2967a37..775f7b719 100644 --- a/Cog.xcodeproj/project.pbxproj +++ b/Cog.xcodeproj/project.pbxproj @@ -112,6 +112,8 @@ 17D1B1680F632ABB00694C57 /* BlankZeroFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D1B1630F632ABB00694C57 /* BlankZeroFormatter.m */; }; 17D1B1690F632ABB00694C57 /* IndexFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D1B1650F632ABB00694C57 /* IndexFormatter.m */; }; 17D1B16A0F632ABB00694C57 /* SecondsFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D1B1670F632ABB00694C57 /* SecondsFormatter.m */; }; + 17D1B1DC0F6330D400694C57 /* Feedback.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17D1B1DA0F6330D400694C57 /* Feedback.xib */; }; + 17D1B1E10F6330F000694C57 /* Update.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17D1B1DF0F6330F000694C57 /* Update.xib */; }; 17D1B27D0CF8B2830028F5B5 /* cue.icns in Resources */ = {isa = PBXBuildFile; fileRef = 17D1B2760CF8B2830028F5B5 /* cue.icns */; }; 17D1B27E0CF8B2830028F5B5 /* it.icns in Resources */ = {isa = PBXBuildFile; fileRef = 17D1B2770CF8B2830028F5B5 /* it.icns */; }; 17D1B27F0CF8B2830028F5B5 /* pls.icns in Resources */ = {isa = PBXBuildFile; fileRef = 17D1B2780CF8B2830028F5B5 /* pls.icns */; }; @@ -671,6 +673,8 @@ 17D1B1650F632ABB00694C57 /* IndexFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IndexFormatter.m; path = Formatters/IndexFormatter.m; sourceTree = ""; }; 17D1B1660F632ABB00694C57 /* SecondsFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SecondsFormatter.h; path = Formatters/SecondsFormatter.h; sourceTree = ""; }; 17D1B1670F632ABB00694C57 /* SecondsFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SecondsFormatter.m; path = Formatters/SecondsFormatter.m; sourceTree = ""; }; + 17D1B1DB0F6330D400694C57 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Feedback.xib; sourceTree = ""; }; + 17D1B1E00F6330F000694C57 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Update.xib; sourceTree = ""; }; 17D1B2760CF8B2830028F5B5 /* cue.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = cue.icns; sourceTree = ""; }; 17D1B2770CF8B2830028F5B5 /* it.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = it.icns; sourceTree = ""; }; 17D1B2780CF8B2830028F5B5 /* pls.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = pls.icns; sourceTree = ""; }; @@ -1287,6 +1291,8 @@ 17211A7C0D68B7C500911CA9 /* FileTree.xib */, 178456C00F6320B5007E8021 /* SpotlightPanel.xib */, 17E41E060C130DFF00AC744D /* Credits.html */, + 17D1B1DA0F6330D400694C57 /* Feedback.xib */, + 17D1B1DF0F6330F000694C57 /* Update.xib */, ); name = Resources; sourceTree = ""; @@ -1822,6 +1828,8 @@ 17B7CF5E0F5A05EE00A47027 /* stopBadge.png in Resources */, 178456C30F6320B5007E8021 /* SpotlightPanel.xib in Resources */, 17D1B0D20F6320EA00694C57 /* InfoInspector.xib in Resources */, + 17D1B1DC0F6330D400694C57 /* Feedback.xib in Resources */, + 17D1B1E10F6330F000694C57 /* Update.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2068,6 +2076,22 @@ name = InfoInspector.xib; sourceTree = ""; }; + 17D1B1DA0F6330D400694C57 /* Feedback.xib */ = { + isa = PBXVariantGroup; + children = ( + 17D1B1DB0F6330D400694C57 /* English */, + ); + name = Feedback.xib; + sourceTree = ""; + }; + 17D1B1DF0F6330F000694C57 /* Update.xib */ = { + isa = PBXVariantGroup; + children = ( + 17D1B1E00F6330F000694C57 /* English */, + ); + name = Update.xib; + sourceTree = ""; + }; 17E41E060C130DFF00AC744D /* Credits.html */ = { isa = PBXVariantGroup; children = ( diff --git a/English.lproj/Feedback.xib b/English.lproj/Feedback.xib new file mode 100644 index 000000000..fc1e6fb6d --- /dev/null +++ b/English.lproj/Feedback.xib @@ -0,0 +1,879 @@ + + + + 1050 + 9G55 + 677 + 949.43 + 353.00 + + YES + + + + YES + com.apple.InterfaceBuilderKit + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + FeedbackController + + + FirstResponder + + + NSApplication + + + 3 + 2 + {{168, 357}, {480, 376}} + 1886912512 + Send Feedback + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 256 + {{80, 295}, {356, 22}} + + YES + + -1804468671 + 4195328 + + + LucidaGrande + 1.300000e+01 + 1044 + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + 3 + MAA + + + + + + + 256 + {{17, 297}, {58, 17}} + + YES + + 67239424 + 4194304 + Subject: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + controlTextColor + + + + + + + 256 + {{17, 270}, {66, 17}} + + YES + + 67239424 + 4194304 + Message: + + + + + + + + + 256 + + YES + + + 2304 + + YES + + + 2322 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + Apple URL pasteboard type + CorePasteboardFlavorType 0x6D6F6F76 + CorePasteboardFlavorType 0x75726C20 + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + NeXT font pasteboard type + NeXT ruler pasteboard type + WebURLsWithTitlesPboardType + + + {423, 14} + + + + + + + + + + + YES + + + 6 + + + + 4.230000e+02 + 1 + + + 11239 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 6 + {863, 1e+07} + {83, 0} + + + + {{1, 1}, {423, 200}} + + + + + + {4, -5} + 1 + + 4 + + + + 256 + {{424, 1}, {15, 200}} + + + _doScroller: + 6.644518e-01 + + + + 256 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{20, 60}, {440, 202}} + + + 18 + + + + + + + 256 + {{306, 12}, {82, 32}} + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 256 + {{388, 12}, {78, 32}} + + YES + + 67239424 + 134217728 + Send + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 1280 + + {{444, 340}, {16, 16}} + + 20746 + 1.000000e+02 + + + + 256 + {{80, 337}, {356, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 256 + {{17, 339}, {71, 17}} + + YES + + 67239424 + 272629760 + Email: + + + + + + + + {480, 376} + + + {{0, 0}, {1680, 1028}} + {213, 129} + {3.40282e+38, 3.40282e+38} + + + + + YES + + + initialFirstResponder + + + + 23 + + + + nextKeyView + + + + 24 + + + + nextKeyView + + + + 26 + + + + nextKeyView + + + + 28 + + + + nextKeyView + + + + 30 + + + + nextKeyView + + + + 33 + + + + subjectView + + + + 36 + + + + fromView + + + + 37 + + + + messageView + + + + 38 + + + + sendingIndicator + + + + 39 + + + + sendFeedback: + + + + 40 + + + + cancel: + + + + 41 + + + + window + + + + 42 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + FeedbackWindow + + + 3 + + + YES + + + + + + + + + + + + + + 4 + + + YES + + + + + + 5 + + + YES + + + + + + 6 + + + YES + + + + + + 7 + + + YES + + + + + + 8 + + + YES + + + + + + 9 + + + YES + + + + + + 10 + + + YES + + + + + + 11 + + + YES + + + + + + + + 12 + + + + + 13 + + + + + 14 + + + + + 15 + + + + + 16 + + + + + 17 + + + + + 18 + + + + + 19 + + + + + 20 + + + + + 21 + + + + + 22 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1.IBEditorWindowLastContentRect + 1.IBWindowTemplateEditedContentRect + 1.ImportedFromIB2 + 1.editorWindowContentRectSynchronizationRect + 1.windowTemplate.hasMaxSize + 1.windowTemplate.hasMinSize + 1.windowTemplate.maxSize + 1.windowTemplate.minSize + 10.IBPluginDependency + 10.ImportedFromIB2 + 11.IBPluginDependency + 11.ImportedFromIB2 + 12.IBPluginDependency + 12.ImportedFromIB2 + 13.IBPluginDependency + 13.ImportedFromIB2 + 14.IBPluginDependency + 14.ImportedFromIB2 + 15.IBPluginDependency + 15.ImportedFromIB2 + 16.IBPluginDependency + 16.ImportedFromIB2 + 17.IBPluginDependency + 17.ImportedFromIB2 + 18.IBPluginDependency + 18.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 20.IBPluginDependency + 20.ImportedFromIB2 + 21.IBPluginDependency + 21.ImportedFromIB2 + 22.IBPluginDependency + 22.ImportedFromIB2 + 3.IBPluginDependency + 3.ImportedFromIB2 + 4.IBPluginDependency + 4.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 6.IBPluginDependency + 6.ImportedFromIB2 + 7.IBPluginDependency + 7.ImportedFromIB2 + 8.IBPluginDependency + 8.ImportedFromIB2 + 9.IBPluginDependency + 9.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilderKit + com.apple.InterfaceBuilderKit + {{124, 381}, {480, 376}} + {{124, 381}, {480, 376}} + + {{139, 290}, {480, 376}} + + + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 42 + + + + YES + + FeedbackController + NSWindowController + + YES + + YES + cancel: + sendFeedback: + + + YES + id + id + + + + YES + + YES + fromView + messageView + sendingIndicator + subjectView + + + YES + NSTextField + NSTextView + NSProgressIndicator + NSTextField + + + + IBProjectSource + Feedback/FeedbackController.h + + + + NSObject + + IBProjectSource + ThirdParty/AppleRemote/AppleRemote.h + + + + NSObject + + IBProjectSource + ThirdParty/GCWindowMenu/GCOneShotEffectTimer.h + + + + NSObject + + IBProjectSource + ThirdParty/NDHotKeys/NDHotKeyEvent.h + + + + + 0 + ../Cog.xcodeproj + 3 + + diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index 9051967d5..c8056d843 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -10,8 +10,8 @@ YES + - YES @@ -99,7 +99,7 @@ YES 1 - + 6 System textBackgroundColor @@ -2842,298 +2842,6 @@ OQA AppController - - 3 - 2 - {{168, 357}, {480, 376}} - 1886912512 - Send Feedback - NSWindow - - View - - {3.40282e+38, 3.40282e+38} - {213, 107} - - - 256 - - YES - - - 256 - {{80, 295}, {356, 22}} - - YES - - -1804468671 - 4195328 - - - - YES - - - 6 - System - textColor - - - - - - - 256 - {{17, 297}, {58, 17}} - - YES - - 67239424 - 4194304 - Subject: - - - - - - - - - 256 - {{17, 270}, {66, 17}} - - YES - - 67239424 - 4194304 - Message: - - - - - - - - - 256 - - YES - - - 2304 - - YES - - - 2322 - {423, 14} - - - - - - - - - - - YES - - - 6 - - - - 4.230000e+02 - 1 - - - 11239 - - - - YES - - YES - NSBackgroundColor - NSColor - - - YES - - 6 - System - selectedTextBackgroundColor - - - - 6 - System - selectedTextColor - - - - - - - YES - - YES - NSColor - NSUnderline - - - YES - - 1 - MCAwIDEAA - - - - - - - 6 - {863, 1e+07} - {83, 0} - - - - {{1, 1}, {423, 200}} - - - - - - {4, -5} - 1 - - 4 - - - - 256 - {{424, 1}, {15, 200}} - - - _doScroller: - 6.644518e-01 - - - - 256 - {{-100, -100}, {87, 18}} - - 1 - - _doScroller: - 1.000000e+00 - 9.456522e-01 - - - {{20, 60}, {440, 202}} - - - 18 - - - - - - - 256 - {{306, 12}, {82, 32}} - - YES - - 67239424 - 134217728 - Cancel - - - -2038284033 - 1 - - - - - - 200 - 25 - - - - - 256 - {{388, 12}, {78, 32}} - - YES - - 67239424 - 134217728 - Send - - - -2038284033 - 1 - - - - - - 200 - 25 - - - - - 1280 - - {{444, 340}, {16, 16}} - - 20746 - 1.000000e+02 - - - - 256 - {{80, 337}, {356, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 256 - {{17, 339}, {71, 17}} - - YES - - 67239424 - 272629760 - Email: - - - - - - - - {480, 376} - - {{0, 0}, {1920, 1178}} - {213, 129} - {3.40282e+38, 3.40282e+38} - 3 2 @@ -3261,9 +2969,6 @@ OQA {213, 129} {3.40282e+38, 3.40282e+38} - - FeedbackController - Menu @@ -3618,6 +3323,9 @@ OQA InfoWindowController + + FeedbackController + @@ -3734,118 +3442,6 @@ OQA 262 - - - nextKeyView - - - - 279 - - - - feedbackWindow - - - - 294 - - - - messageView - - - - 295 - - - - subjectView - - - - 296 - - - - sendingIndicator - - - - 297 - - - - sendFeedback: - - - - 298 - - - - cancel: - - - - 299 - - - - openFeedbackWindow: - - - - 305 - - - - fromView - - - - 308 - - - - initialFirstResponder - - - - 309 - - - - nextKeyView - - - - 310 - - - - nextKeyView - - - - 312 - - - - nextKeyView - - - - 313 - - - - nextKeyView - - - - 314 - delegate @@ -6348,6 +5944,14 @@ OQA 2433 + + + showWindow: + + + + 2436 + @@ -6900,162 +6504,6 @@ OQA AppController - - 268 - - - YES - - - - FeedbackWindow - - - 269 - - - YES - - - - - - - - - - - - - - 270 - - - - - 271 - - - YES - - - - - - - - 272 - - - - - 1518 - - - - - 1519 - - - - - 273 - - - YES - - - - - - 1486 - - - - - 274 - - - YES - - - - - - 1487 - - - - - 275 - - - YES - - - - - - 1488 - - - - - 276 - - - YES - - - - - - 1489 - - - - - 277 - - - YES - - - - - - 1490 - - - - - 306 - - - YES - - - - - - 1491 - - - - - 307 - - - YES - - - - - - 1492 - - - 280 @@ -7140,12 +6588,6 @@ OQA - - 288 - - - FeedbackController - 513 @@ -8316,6 +7758,11 @@ OQA + + 2434 + + + @@ -8417,22 +7864,8 @@ OQA 1454.ImportedFromIB2 1473.IBPluginDependency 1473.ImportedFromIB2 - 1486.IBPluginDependency - 1486.ImportedFromIB2 - 1487.IBPluginDependency - 1487.ImportedFromIB2 - 1488.IBPluginDependency - 1488.ImportedFromIB2 - 1489.IBPluginDependency - 1489.ImportedFromIB2 149.IBPluginDependency 149.ImportedFromIB2 - 1490.IBPluginDependency - 1490.ImportedFromIB2 - 1491.IBPluginDependency - 1491.ImportedFromIB2 - 1492.IBPluginDependency - 1492.ImportedFromIB2 1493.IBPluginDependency 1493.ImportedFromIB2 1494.IBPluginDependency @@ -8466,10 +7899,6 @@ OQA 1517.CustomClassName 1517.IBPluginDependency 1517.ImportedFromIB2 - 1518.IBPluginDependency - 1518.ImportedFromIB2 - 1519.IBPluginDependency - 1519.ImportedFromIB2 1523.IBEditorWindowLastContentRect 1523.IBPluginDependency 1523.ImportedFromIB2 @@ -8731,32 +8160,7 @@ OQA 2430.ImportedFromIB2 2431.IBPluginDependency 2431.ImportedFromIB2 - 268.IBEditorWindowLastContentRect - 268.IBWindowTemplateEditedContentRect - 268.ImportedFromIB2 - 268.editorWindowContentRectSynchronizationRect - 268.windowTemplate.hasMaxSize - 268.windowTemplate.hasMinSize - 268.windowTemplate.maxSize - 268.windowTemplate.minSize - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBPluginDependency - 270.ImportedFromIB2 - 271.IBPluginDependency - 271.ImportedFromIB2 - 272.IBPluginDependency - 272.ImportedFromIB2 - 273.IBPluginDependency - 273.ImportedFromIB2 - 274.IBPluginDependency - 274.ImportedFromIB2 - 275.IBPluginDependency - 275.ImportedFromIB2 - 276.IBPluginDependency - 276.ImportedFromIB2 - 277.IBPluginDependency - 277.ImportedFromIB2 + 2434.IBPluginDependency 280.ImportedFromIB2 280.windowTemplate.hasMaxSize 280.windowTemplate.hasMinSize @@ -8774,8 +8178,6 @@ OQA 285.ImportedFromIB2 286.IBPluginDependency 286.ImportedFromIB2 - 288.IBPluginDependency - 288.ImportedFromIB2 29.IBEditorWindowLastContentRect 29.IBPluginDependency 29.ImportedFromIB2 @@ -8784,10 +8186,6 @@ OQA 302.ImportedFromIB2 303.IBPluginDependency 303.ImportedFromIB2 - 306.IBPluginDependency - 306.ImportedFromIB2 - 307.IBPluginDependency - 307.ImportedFromIB2 391.IBPluginDependency 391.ImportedFromIB2 418.IBPluginDependency @@ -9002,27 +8400,9 @@ OQA com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - PlaylistHeaderView com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - {{377, 973}, {617, 0}} com.apple.InterfaceBuilder.CocoaPlugin @@ -9284,33 +8664,8 @@ OQA com.apple.InterfaceBuilder.CocoaPlugin - {{314, 416}, {480, 376}} - {{314, 416}, {480, 376}} - - {{139, 290}, {480, 376}} - - - {3.40282e+38, 3.40282e+38} - {213, 107} com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {3.40282e+38, 3.40282e+38} @@ -9327,8 +8682,6 @@ OQA com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{576, 847}, {462, 20}} com.apple.InterfaceBuilder.CocoaPlugin @@ -9341,10 +8694,6 @@ OQA com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - {{771, 554}, {222, 293}} com.apple.InterfaceBuilder.CocoaPlugin @@ -9375,7 +8724,7 @@ OQA com.apple.InterfaceBuilder.CocoaPlugin - {{193, 473}, {232, 253}} + {{588, 594}, {232, 253}} com.apple.InterfaceBuilder.CocoaPlugin {{124, 483}, {232, 253}} @@ -9447,7 +8796,7 @@ OQA - 2433 + 2436 @@ -9613,7 +8962,7 @@ OQA FeedbackController - NSObject + NSWindowController YES @@ -9633,7 +8982,6 @@ OQA YES YES - feedbackWindow fromView messageView sendingIndicator @@ -9641,7 +8989,6 @@ OQA YES - NSWindow NSTextField NSTextView NSProgressIndicator @@ -9653,14 +9000,6 @@ OQA Feedback/FeedbackController.h - - FeedbackController - NSObject - - IBUserSource - - - FileTreeViewController SideViewController diff --git a/Feedback/FeedbackController.h b/Feedback/FeedbackController.h index ec38c69bc..157adde7d 100644 --- a/Feedback/FeedbackController.h +++ b/Feedback/FeedbackController.h @@ -9,8 +9,7 @@ #import #import "FeedbackSocket.h" -@interface FeedbackController : NSObject { - IBOutlet NSWindow* feedbackWindow; +@interface FeedbackController : NSWindowController { IBOutlet NSTextField* fromView; IBOutlet NSTextField* subjectView; IBOutlet NSTextView* messageView; @@ -19,7 +18,6 @@ FeedbackSocket *feedbackSocket; } -- (IBAction)openFeedbackWindow:(id)sender; - (IBAction)sendFeedback:(id)sender; - (IBAction)cancel:(id)sender; diff --git a/Feedback/FeedbackController.m b/Feedback/FeedbackController.m index 4aef38eee..b6a6e8674 100644 --- a/Feedback/FeedbackController.m +++ b/Feedback/FeedbackController.m @@ -11,25 +11,29 @@ @implementation FeedbackController -- (IBAction)openFeedbackWindow:(id)sender +- (id)init +{ + return [super initWithWindowNibName:@"Feedback"]; +} + +- (IBAction)showWindow:(id)sender { [fromView setStringValue:@""]; [subjectView setStringValue:@""]; [messageView setString:@""]; - [feedbackWindow makeFirstResponder:fromView]; - [feedbackWindow makeKeyAndOrderFront: sender]; + [super showWindow:sender]; } - (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo { if ([(NSNumber *)contextInfo boolValue]== YES) { - [feedbackWindow close]; + [[self window] close]; } } -- (void)FeedbackErrorOccurred:(NSNotification *)aNotification +- (void)feedbackDidNotSend:(FeedbackSocket *)feedback { NSLog(@"Error sending feedback"); @@ -39,10 +43,10 @@ [alert setMessageText:NSLocalizedString(@"FeedbackFailedMessageText", @"")]; [alert setInformativeText:NSLocalizedString(@"FeedbackFailedInformativeText", @"")]; - [alert beginSheetModalForWindow:feedbackWindow modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:[NSNumber numberWithBool:NO]]; + [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:[NSNumber numberWithBool:NO]]; } -- (void)FeedbackSent:(NSNotification *)aNotification +- (void)feedbackDidSend:(FeedbackSocket *)feedback { [sendingIndicator stopAnimation:self]; @@ -50,7 +54,7 @@ [alert setMessageText:NSLocalizedString(@"FeedbackSuccessMessageText", @"")]; [alert setInformativeText:NSLocalizedString(@"FeedbackSuccessInformativeText", @"")]; - [alert beginSheetModalForWindow:feedbackWindow modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:[NSNumber numberWithBool:YES]]; + [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:[NSNumber numberWithBool:YES]]; } @@ -69,7 +73,7 @@ - (IBAction)cancel:(id)sender { - [feedbackWindow close]; + [[self window] close]; } @end diff --git a/Feedback/FeedbackSocket.h b/Feedback/FeedbackSocket.h index 99e0f38ec..679c8b3b5 100644 --- a/Feedback/FeedbackSocket.h +++ b/Feedback/FeedbackSocket.h @@ -8,6 +8,7 @@ #import +@protocol FeedbackSocketDelegate; @interface FeedbackSocket : NSObject { NSString *from; @@ -15,10 +16,10 @@ NSString *message; NSString *version; - id delegate; + id delegate; } -- (void)setDelegate:(id)d; +- (void)setDelegate:(id)d; - (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m version:(NSString *)v; - (void)setFrom:(NSString *)f; @@ -27,3 +28,10 @@ - (void)setVersion:(NSString *)v; @end + +@protocol FeedbackSocketDelegate + +- (void)feedbackDidSend:(FeedbackSocket *)feedback; +- (void)feedbackDidNotSend:(FeedbackSocket *)feedback; + +@end diff --git a/Feedback/FeedbackSocket.m b/Feedback/FeedbackSocket.m index 7d5d1968a..33994a663 100644 --- a/Feedback/FeedbackSocket.m +++ b/Feedback/FeedbackSocket.m @@ -8,10 +8,6 @@ #import "FeedbackSocket.h" -// NSNotifications -NSString *FeedbackErrorOccurredNotification = @"FeedbackErrorOccurredNotification"; -NSString *FeedbackSentNotification = @"FeedbackSentNotification"; - @implementation FeedbackSocket NSString *encodeForURL(NSString *s) @@ -72,36 +68,21 @@ NSString *encodeForURL(NSString *s) - (void)returnSuccess:(id)userInfo { - [[NSNotificationCenter defaultCenter] postNotificationName:FeedbackSentNotification object:self]; + if ([delegate respondsToSelector:@selector(feedbackDidSend:)]) { + [delegate feedbackDidSend:self]; + } } - (void)returnFailure:(id)userInfo { - [[NSNotificationCenter defaultCenter] postNotificationName:FeedbackErrorOccurredNotification object:self]; + if ([delegate respondsToSelector:@selector(feedbackDidNotSend:)]) { + [delegate feedbackDidNotSend:self]; + } } --(void)setDelegate:(id)d +-(void)setDelegate:(id)d { - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - - if (delegate != nil) { - // Unregister with the notification center - [nc removeObserver:delegate name:FeedbackErrorOccurredNotification object:self]; - [nc removeObserver:delegate name:FeedbackSentNotification object:self]; - [delegate autorelease]; - } - delegate = [d retain]; - - // Register the new FeedbackNotification methods for the delegate - // Only register if the delegate implements it, though - if ([delegate respondsToSelector:@selector(FeedbackErrorOccurred:)]) - { - [nc addObserver:delegate selector:@selector(FeedbackErrorOccurred:) name:FeedbackErrorOccurredNotification object:self]; - } - if ([delegate respondsToSelector:@selector(FeedbackSent:)]) - { - [nc addObserver:delegate selector:@selector(FeedbackSent:) name:FeedbackSentNotification object:self]; - } + delegate = d; }