Selaa lähdekoodia

Show Subreddit in Tooltip

Thomas Buck 11 vuotta sitten
vanhempi
commit
7b76034fa8
2 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 5
    2
      RedditBar/Reddit.m
  2. 1
    1
      RedditBar/RedditBar-Info.plist

+ 5
- 2
RedditBar/Reddit.m Näytä tiedosto

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

+ 1
- 1
RedditBar/RedditBar-Info.plist Näytä tiedosto

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

Loading…
Peruuta
Tallenna