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

Comments

    No one has commented yet.