Browse Source

Added tooltip for cut titles

Thomas Buck 10 years ago
parent
commit
7d11d26dd1

+ 2
- 0
RedditBar/AppDelegate.m View File

@@ -165,6 +165,8 @@
165 165
         RedditItem *reddit = [array objectAtIndex:i];
166 166
         NSMenuItem *item = [[NSMenuItem alloc] init];
167 167
         [item setTitle:reddit.name];
168
+        if (![reddit.name isEqualToString:reddit.fullName])
169
+            [item setToolTip:reddit.fullName];
168 170
         if (reddit.isSelf) {
169 171
             [item setAction:@selector(linkToOpen:)];
170 172
             [item setKeyEquivalent:@""];

+ 1
- 0
RedditBar/Reddit.m View File

@@ -101,6 +101,7 @@ NSString *replaceTextForTitle = @"...";
101 101
             name = [NSString stringWithFormat:@"%@%@", [name substringToIndex:(maxTitleLength - [replaceTextForTitle length])], replaceTextForTitle];
102 102
         }
103 103
         RedditItem *r = [RedditItem itemWithName:name Link:link Comments:comments Self:isSelf];
104
+        [r setFullName:[current valueForKey:@"title"]];
104 105
         [array insertObject:r atIndex:i];
105 106
     }
106 107
     return array;

+ 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>150</string>
24
+	<string>152</string>
25 25
 	<key>LSApplicationCategoryType</key>
26 26
 	<string>public.app-category.utilities</string>
27 27
 	<key>LSMinimumSystemVersion</key>

+ 1
- 0
RedditBar/RedditItem.h View File

@@ -11,6 +11,7 @@
11 11
 @interface RedditItem : NSObject
12 12
 
13 13
 @property (atomic, retain) NSString *name;
14
+@property (atomic, retain) NSString *fullName;
14 15
 @property (atomic, retain) NSString *link;
15 16
 @property (atomic, retain) NSString *comments;
16 17
 @property (atomic) BOOL isSelf;

+ 1
- 1
RedditBar/RedditItem.m View File

@@ -10,7 +10,7 @@
10 10
 
11 11
 @implementation RedditItem
12 12
 
13
-@synthesize name, link, comments, isSelf;
13
+@synthesize name, fullName, link, comments, isSelf;
14 14
 
15 15
 +(RedditItem *)itemWithName:(NSString *)name Link:(NSString *)link Comments:(NSString *)comments Self:(BOOL)isSelf {
16 16
     RedditItem *i = [[RedditItem alloc] init];

Loading…
Cancel
Save