Browse Source

Show Subreddit in Tooltip

Thomas Buck 11 years ago
parent
commit
7b76034fa8
2 changed files with 6 additions and 3 deletions
  1. 5
    2
      RedditBar/Reddit.m
  2. 1
    1
      RedditBar/RedditBar-Info.plist

+ 5
- 2
RedditBar/Reddit.m View File

@@ -31,7 +31,7 @@
31 31
 
32 32
 @implementation Reddit
33 33
 
34
-NSInteger maxTitleLength = 60;
34
+NSInteger maxTitleLength = 66;
35 35
 NSString *replaceTextForTitle = @"...";
36 36
 NSString *subredditFormat = @" [r/%@]";
37 37
 #define AUTHOR @"xythobuz"
@@ -133,7 +133,10 @@ NSString *subredditFormat = @" [r/%@]";
133 133
         if (showSubs)
134 134
             name = [NSString stringWithFormat:@"%@%@", name, subreddit];
135 135
         RedditItem *r = [RedditItem itemWithName:name Link:link Comments:comments Self:isSelf];
136
-        [r setFullName:[current valueForKey:@"title"]];
136
+        NSString *fullName = [current valueForKey:@"title"];
137
+        if (showSubs)
138
+            fullName = [NSString stringWithFormat:@"%@%@", fullName, subreddit];
139
+        [r setFullName:fullName];
137 140
         [array insertObject:r atIndex:i];
138 141
         
139 142
         if (i == ([children count] - 1)) {

+ 1
- 1
RedditBar/RedditBar-Info.plist View File

@@ -21,7 +21,7 @@
21 21
 	<key>CFBundleSignature</key>
22 22
 	<string>????</string>
23 23
 	<key>CFBundleVersion</key>
24
-	<string>185</string>
24
+	<string>187</string>
25 25
 	<key>LSApplicationCategoryType</key>
26 26
 	<string>public.app-category.utilities</string>
27 27
 	<key>LSMinimumSystemVersion</key>

Loading…
Cancel
Save