Permalink
Browse files

TableView replaced with CollectionView; rows replaced with cards (Mes…

…sageView)
  • Loading branch information...
1 parent 6d8dc19 commit 08a265dd94d40e5330004f2cb2abacae98d0324a @drnic drnic committed Jun 14, 2008
Showing with 1,166 additions and 1,103 deletions.
  1. +15 −0 AppController.rb
  2. +0 −17 AppDelegate.rb
  3. +5 −1 BonjourWatcher.rb
  4. +13 −0 CollectionView.rb
  5. +13 −0 CollectionViewItem.rb
  6. +1,076 −1,080 English.lproj/MainMenu.xib
  7. +27 −0 MessageView.rb
  8. +17 −5 starjour.xcodeproj/project.pbxproj
View
@@ -0,0 +1,15 @@
+#
+# AppController.rb
+# starjour
+#
+# Created by Dr Nic on 14/06/08.
+# Copyright (c) 2008 Dr Nic Academy Pty Ltd. All rights reserved.
+#
+
+require 'osx/cocoa'
+
+class AppController < OSX::NSObject
+ def applicationShouldTerminateAfterLastWindowClosed(app)
+ true
+ end
+end
View
@@ -1,17 +0,0 @@
-#
-# AppDelegate.rb
-# starjour
-#
-# Created by Lachie Cox on 13/06/08.
-# Copyright (c) 2008 __MyCompanyName__. All rights reserved.
-#
-
-require 'osx/cocoa'
-
-class AppDelegate < OSX::NSObject
-
- def applicationShouldTerminateAfterLastWindowClosed(app)
- true
- end
-
-end
View
@@ -94,7 +94,11 @@ def netServiceBrowser_didFindService_moreComing(nsb,service,more)
if srv = @known_services[name]
if srv.respond_to?(:call)
service_name,text,runner = srv.call(service)
- message = {:service_name => service_name, :text => text, :runner => runner, :service => service}
+ message = {:service_name => service_name, :text => text, :runner => runner, :service => service} # :image
+ # message = NSDictionary.dictionaryWithObjectsAndKeys(
+ # text, "text",
+ # nil
+ # )
else
message = srv.alloc.initWithService(service)
end
View
@@ -0,0 +1,13 @@
+#
+# CollectionView.rb
+# starjour
+#
+# Created by Dr Nic on 14/06/08.
+# Copyright (c) 2008 Dr Nic Academy Pty Ltd. All rights reserved.
+#
+
+require 'osx/cocoa'
+
+class CollectionView < OSX::NSCollectionView
+ include OSX
+end
View
@@ -0,0 +1,13 @@
+#
+# CollectionViewItem.rb
+# starjour
+#
+# Created by Dr Nic on 14/06/08.
+# Copyright (c) 2008 Dr Nic Academy Pty Ltd. All rights reserved.
+#
+
+require 'osx/cocoa'
+
+class CollectionViewItem < OSX::NSCollectionViewItem
+ include OSX
+end
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,27 @@
+#
+# MessageView.rb
+# starjour
+#
+# Created by Dr Nic on 14/06/08.
+# Copyright (c) 2008 Dr Nic Academy Pty Ltd. All rights reserved.
+#
+
+require 'osx/cocoa'
+
+class MessageView < OSX::NSView
+ include OSX
+
+ def initWithFrame(frame)
+ super_initWithFrame(frame)
+ # Initialization code here.
+ return self
+ end
+
+ def drawRect(rect)
+ # NSColor.lightGrayColor.set
+ # NSRectFill(bounds)
+
+ super_drawRect rect
+ end
+
+end
@@ -8,9 +8,12 @@
/* Begin PBXBuildFile section */
086D84500E020012008A3B2B /* BonjourWatcher.rb in Resources */ = {isa = PBXBuildFile; fileRef = 086D844F0E020011008A3B2B /* BonjourWatcher.rb */; };
- 086D849C0E020D18008A3B2B /* AppDelegate.rb in Resources */ = {isa = PBXBuildFile; fileRef = 086D849B0E020D18008A3B2B /* AppDelegate.rb */; };
08B2B5760E022EC60084F4D3 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 08B2B5740E022EC60084F4D3 /* MainMenu.xib */; };
08B2B5970E0241DE0084F4D3 /* RubyCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08B2B5960E0241DE0084F4D3 /* RubyCocoa.framework */; };
+ 31FBE7CE0E03E68D00213906 /* MessageView.rb in Resources */ = {isa = PBXBuildFile; fileRef = 31FBE7CD0E03E68D00213906 /* MessageView.rb */; };
+ 31FBE7D20E03E6BB00213906 /* CollectionView.rb in Resources */ = {isa = PBXBuildFile; fileRef = 31FBE7D10E03E6BB00213906 /* CollectionView.rb */; };
+ 31FBE7D70E03E74400213906 /* CollectionViewItem.rb in Resources */ = {isa = PBXBuildFile; fileRef = 31FBE7D60E03E74400213906 /* CollectionViewItem.rb */; };
+ 31FBE7DF0E03E7E000213906 /* AppController.rb in Resources */ = {isa = PBXBuildFile; fileRef = 31FBE7DE0E03E7E000213906 /* AppController.rb */; };
4DDCA7070ACC9A6100E082CE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
4DDCA7080ACC9A6100E082CE /* rb_main.rb in Resources */ = {isa = PBXBuildFile; fileRef = E8F5E25803AEB7C803A81C6F /* rb_main.rb */; };
4DDCA70A0ACC9A6100E082CE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
@@ -19,14 +22,17 @@
/* Begin PBXFileReference section */
086D844F0E020011008A3B2B /* BonjourWatcher.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = BonjourWatcher.rb; sourceTree = "<group>"; };
- 086D849B0E020D18008A3B2B /* AppDelegate.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = AppDelegate.rb; sourceTree = "<group>"; };
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
08B2B5750E022EC60084F4D3 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
08B2B5960E0241DE0084F4D3 /* RubyCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RubyCocoa.framework; path = /Library/Frameworks/RubyCocoa.framework; sourceTree = "<absolute>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 31FBE7CD0E03E68D00213906 /* MessageView.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = MessageView.rb; sourceTree = "<group>"; };
+ 31FBE7D10E03E6BB00213906 /* CollectionView.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = CollectionView.rb; sourceTree = "<group>"; };
+ 31FBE7D60E03E74400213906 /* CollectionViewItem.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = CollectionViewItem.rb; sourceTree = "<group>"; };
+ 31FBE7DE0E03E7E000213906 /* AppController.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = AppController.rb; sourceTree = "<group>"; };
4DDCA7110ACC9A6100E082CE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
4DDCA7120ACC9A6100E082CE /* starjour.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = starjour.app; sourceTree = BUILT_PRODUCTS_DIR; };
E8F5E25803AEB7C803A81C6F /* rb_main.rb */ = {isa = PBXFileReference; lastKnownFileType = text.script.ruby; path = rb_main.rb; sourceTree = "<group>"; };
@@ -48,6 +54,11 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
+ 31FBE7CD0E03E68D00213906 /* MessageView.rb */,
+ 086D844F0E020011008A3B2B /* BonjourWatcher.rb */,
+ 31FBE7D10E03E6BB00213906 /* CollectionView.rb */,
+ 31FBE7D60E03E74400213906 /* CollectionViewItem.rb */,
+ 31FBE7DE0E03E7E000213906 /* AppController.rb */,
);
name = Classes;
sourceTree = "<group>";
@@ -96,8 +107,6 @@
children = (
29B97316FDCFA39411CA2CEA /* main.m */,
E8F5E25803AEB7C803A81C6F /* rb_main.rb */,
- 086D844F0E020011008A3B2B /* BonjourWatcher.rb */,
- 086D849B0E020D18008A3B2B /* AppDelegate.rb */,
);
name = "Other Sources";
sourceTree = "<group>";
@@ -177,8 +186,11 @@
4DDCA7070ACC9A6100E082CE /* InfoPlist.strings in Resources */,
4DDCA7080ACC9A6100E082CE /* rb_main.rb in Resources */,
086D84500E020012008A3B2B /* BonjourWatcher.rb in Resources */,
- 086D849C0E020D18008A3B2B /* AppDelegate.rb in Resources */,
08B2B5760E022EC60084F4D3 /* MainMenu.xib in Resources */,
+ 31FBE7CE0E03E68D00213906 /* MessageView.rb in Resources */,
+ 31FBE7D20E03E6BB00213906 /* CollectionView.rb in Resources */,
+ 31FBE7D70E03E74400213906 /* CollectionViewItem.rb in Resources */,
+ 31FBE7DF0E03E7E000213906 /* AppController.rb in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

0 comments on commit 08a265d

Please sign in to comment.