Skip to content
This repository
Browse code

Merge branch 'master' of git://github.com/kballard/gitnub into kballa…

…rd/master
  • Loading branch information...
commit 272645568726c11ec43ea0f41327714e92f9f549 2 parents 4583f13 + d054f6d
authored March 21, 2008
23  CommitsController.rb
@@ -102,6 +102,10 @@ def tableView_willDisplayCell_forTableColumn_row(table_view, cell, table_column,
102 102
   def webView_didFinishLoadForFrame(view, frame)
103 103
     select_latest_commit
104 104
   end
  105
+  
  106
+  def webView_contextMenuItemsForElement_defaultMenuItems(view, element, defaultMenuItems)
  107
+    nil
  108
+  end
105 109
 
106 110
   def select_latest_commit
107 111
     @commits_table.selectRowIndexes_byExtendingSelection(NSIndexSet.indexSetWithIndex(0), false)
@@ -110,7 +114,14 @@ def select_latest_commit
110 114
   def update_main_document
111 115
     diffs = []
112 116
     doc = @commit_details.mainFrame.DOMDocument
113  
-    set_html("message", active_commit.message.gsub("\n", "<br />"))
  117
+    title, message = active_commit.message.split("\n", 2)
  118
+    set_html("title", title.strip.gsub("\n", "<br />"))
  119
+    if message
  120
+      set_html("message", message.strip.gsub("\n", "<br />"))
  121
+      show_element("message")
  122
+    else
  123
+      hide_element("message")
  124
+    end
114 125
     set_html("hash", active_commit.id)
115 126
 
116 127
     if Time.now.day == active_commit.authored_date.day
@@ -217,4 +228,14 @@ def setup_commit_detail_view
217 228
   def set_html(element, html)
218 229
     @commit_details.mainFrame.DOMDocument.getElementById(element).setInnerHTML(html)
219 230
   end
  231
+  
  232
+  def show_element(element)
  233
+    element = @commit_details.mainFrame.DOMDocument.getElementById(element)
  234
+    element.style.removeProperty("display")
  235
+  end
  236
+  
  237
+  def hide_element(element)
  238
+    element = @commit_details.mainFrame.DOMDocument.getElementById(element)
  239
+    element.style.setProperty_value_priority("display", "none", nil)
  240
+  end
220 241
 end
21  English.lproj/MainMenu.xib
@@ -9,7 +9,6 @@
9 9
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
10 10
 			<bool key="EncodedWithXMLCoder">YES</bool>
11 11
 			<integer value="29"/>
12  
-			<integer value="2"/>
13 12
 		</object>
14 13
 		<object class="NSArray" key="IBDocument.PluginDependencies">
15 14
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -39,7 +38,7 @@
39 38
 				<nil key="NSViewClass"/>
40 39
 				<string key="NSWindowContentMinSize">{400, 300}</string>
41 40
 				<object class="NSView" key="NSWindowView" id="831824449">
42  
-					<reference key="NSNextResponder"/>
  41
+					<nil key="NSNextResponder"/>
43 42
 					<int key="NSvFlags">256</int>
44 43
 					<object class="NSMutableArray" key="NSSubviews">
45 44
 						<bool key="EncodedWithXMLCoder">YES</bool>
@@ -203,7 +202,6 @@
203 202
 											</object>
204 203
 											<string key="NSFrameSize">{298, 637}</string>
205 204
 											<reference key="NSSuperview" ref="1052727212"/>
206  
-											<reference key="NSNextKeyView" ref="95565757"/>
207 205
 											<reference key="NSDocView" ref="95565757"/>
208 206
 											<reference key="NSBGColor" ref="1046813822"/>
209 207
 											<int key="NScvFlags">4</int>
@@ -230,7 +228,6 @@
230 228
 									</object>
231 229
 									<string key="NSFrameSize">{298, 637}</string>
232 230
 									<reference key="NSSuperview" ref="476771339"/>
233  
-									<reference key="NSNextKeyView" ref="648361966"/>
234 231
 									<int key="NSsFlags">528</int>
235 232
 									<reference key="NSVScroller" ref="728533113"/>
236 233
 									<reference key="NSHScroller" ref="439200232"/>
@@ -390,7 +387,6 @@
390 387
 						</object>
391 388
 					</object>
392 389
 					<string key="NSFrameSize">{990, 682}</string>
393  
-					<reference key="NSSuperview"/>
394 390
 				</object>
395 391
 				<string key="NSScreenRect">{{0, 0}, {1600, 1002}}</string>
396 392
 				<string key="NSMinSize">{400, 322}</string>
@@ -595,7 +591,6 @@
595 591
 						</object>
596 592
 						<string key="NSFrameSize">{481, 404}</string>
597 593
 						<reference key="NSSuperview" ref="591982567"/>
598  
-						<reference key="NSNextKeyView"/>
599 594
 						<string key="FrameName"/>
600 595
 						<string key="GroupName"/>
601 596
 						<object class="WebPreferences" key="Preferences">
@@ -838,6 +833,14 @@
838 833
 					</object>
839 834
 					<int key="connectionID">429</int>
840 835
 				</object>
  836
+				<object class="IBConnectionRecord">
  837
+					<object class="IBOutletConnection" key="connection">
  838
+						<string key="label">UIDelegate</string>
  839
+						<reference key="source" ref="543514666"/>
  840
+						<reference key="destination" ref="53201312"/>
  841
+					</object>
  842
+					<int key="connectionID">430</int>
  843
+				</object>
841 844
 			</object>
842 845
 			<object class="IBMutableOrderedSet" key="objectRecords">
843 846
 				<object class="NSArray" key="orderedObjects">
@@ -1372,7 +1375,7 @@
1372 1375
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1373 1376
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1374 1377
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1375  
-					<string>{{96, 438}, {481, 404}}</string>
  1378
+					<string>{{126, 330}, {481, 404}}</string>
1376 1379
 					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
1377 1380
 					<string>{{261, 325}, {481, 404}}</string>
1378 1381
 					<object class="NSDictionary">
@@ -1430,7 +1433,7 @@
1430 1433
 				</object>
1431 1434
 			</object>
1432 1435
 			<nil key="sourceID"/>
1433  
-			<int key="maxID">429</int>
  1436
+			<int key="maxID">430</int>
1434 1437
 		</object>
1435 1438
 		<object class="IBClassDescriber" key="IBDocument.Classes">
1436 1439
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1580,7 +1583,7 @@
1580 1583
 			</object>
1581 1584
 		</object>
1582 1585
 		<int key="IBDocument.localizationMode">0</int>
1583  
-		<string key="IBDocument.LastKnownRelativeProjectPath">../GitNub.xcodeproj</string>
  1586
+		<string key="IBDocument.LastKnownRelativeProjectPath">../gitnub.xcodeproj</string>
1584 1587
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
1585 1588
 	</data>
1586 1589
 </archive>
4  GitNub.xcodeproj/project.pbxproj
@@ -232,7 +232,7 @@
232 232
 /* Begin PBXProject section */
233 233
 		29B97313FDCFA39411CA2CEA /* Project object */ = {
234 234
 			isa = PBXProject;
235  
-			buildConfigurationList = 4D7A7B570ABF745500C2D4C0 /* Build configuration list for PBXProject "GitNub" */;
  235
+			buildConfigurationList = 4D7A7B570ABF745500C2D4C0 /* Build configuration list for PBXProject "gitnub" */;
236 236
 			compatibilityVersion = "Xcode 2.4";
237 237
 			hasScannedForEncodings = 0;
238 238
 			mainGroup = 29B97314FDCFA39411CA2CEA /* GitNub */;
@@ -367,7 +367,7 @@
367 367
 /* End XCBuildConfiguration section */
368 368
 
369 369
 /* Begin XCConfigurationList section */
370  
-		4D7A7B570ABF745500C2D4C0 /* Build configuration list for PBXProject "GitNub" */ = {
  370
+		4D7A7B570ABF745500C2D4C0 /* Build configuration list for PBXProject "gitnub" */ = {
371 371
 			isa = XCConfigurationList;
372 372
 			buildConfigurations = (
373 373
 				4D7A7B580ABF745500C2D4C0 /* Debug */,
12  commit.html
@@ -10,12 +10,12 @@
10 10
 
11 11
 <body>
12 12
   <div id="content">
13  
-    <h1 id="commit">
14  
-      <span id="message"></span>
15  
-      <span id="hash"></span>
16  
-    </h1>
17  
-    <h2 id="date"></h2>
18  
-    
  13
+	<div id="metadata">
  14
+		<h1 id="title"></h1>
  15
+		<div id="message"></div>
  16
+		<div id="hash"></div>
  17
+		<h2 id="date"></h2>
  18
+    </div>
19 19
     
20 20
     <div id="main">
21 21
       <ul id="files">
19  style.css
@@ -66,20 +66,28 @@ table {
66 66
 /* @end */
67 67
 
68 68
 /* @group details */
  69
+#metadata {
  70
+  padding: 9px;
  71
+  margin: 0 9px;
  72
+}
  73
+
69 74
 h1 {
70  
-  border-bottom: 1px solid #eee;
  75
+  margin: 9px 0;
71 76
   font-size: 150%;
72  
-  padding: 9px;
73  
-  margin: 9px;
74 77
   line-height: 130%;
75 78
   color: #222;
76 79
 }
77 80
 
  81
+#message {
  82
+  margin-top: 1em;
  83
+  margin-bottom: 9px;
  84
+}
  85
+
78 86
 #hash {
79  
-  font-size: 62%;
  87
+  font-size: 93%;
80 88
   color: #888;
81 89
   font-weight: normal;
82  
-  display: block;
  90
+  margin-bottom: 9px;
83 91
 }
84 92
 
85 93
 #date {
@@ -90,6 +98,7 @@ h1 {
90 98
   text-align: center;
91 99
   padding: 6px;
92 100
   font-weight: normal;
  101
+  border-top: 1px solid #eee;
93 102
   border-bottom: 1px solid #eee;
94 103
   margin: 0 9px;
95 104
 }

0 notes on commit 2726455

Please sign in to comment.
Something went wrong with that request. Please try again.