Skip to content

Commit

Permalink
fixes #11 odd bubble notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
hohl committed Mar 12, 2015
1 parent ecf83b5 commit d21b11e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions SourceDrop/SDPNotificationPopup.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
@interface SDPNotificationPopup : NSViewController<NSPopoverDelegate> {
@protected
NSString *_message;
NSString *_description;
NSString *_descriptionMessage;
}

/// message to be displayed at the popover
@property (copy, readonly) NSString *message;

/// message to be displayed at the popover
@property (copy, readonly) NSString *description;
@property (copy, readonly) NSString *descriptionMessage;

/// delegate to handle the clicks on the notification
@property (unsafe_unretained) id<SDPStatusBarNotificationDelegate> delegate;
Expand All @@ -55,7 +55,7 @@
/// @param description which is displayed as the smaller detail of the notification
/// @return controller created for the notification
///
+ (SDPNotificationPopup *)notificationWithMessage:(NSString *)message description:(NSString *)description;
+ (SDPNotificationPopup *)notificationWithMessage:(NSString *)message description:(NSString *)descriptionMessage;

///
/// Displays the popup for the notification.
Expand Down
4 changes: 2 additions & 2 deletions SourceDrop/SDPNotificationPopup.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

@implementation SDPNotificationPopup

+ (SDPNotificationPopup *)notificationWithMessage:(NSString *)message description:(NSString *)description
+ (SDPNotificationPopup *)notificationWithMessage:(NSString *)message description:(NSString *)descriptionMessage
{
Class popoverClass = NSClassFromString(@"NSPopover");
if (popoverClass != nil)
{
return [[SDPStatusBarNotificationViewController alloc] initWithMessage:message description:description];
return [[SDPStatusBarNotificationViewController alloc] initWithMessage:message description:descriptionMessage];
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion SourceDrop/SDPStatusBarNotificationViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
///
/// @deprecated
///
- (id)initWithMessage:(NSString *)message description:(NSString *)description;
- (id)initWithMessage:(NSString *)message description:(NSString *)descriptionMessage;

@end
10 changes: 5 additions & 5 deletions SourceDrop/SDPStatusBarNotificationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ @interface SDPStatusBarNotificationViewController ()
@implementation SDPStatusBarNotificationViewController
@synthesize closingDelay = _closingDelay;

- (id)initWithMessage:(NSString *)message description:(NSString *)description
- (id)initWithMessage:(NSString *)message description:(NSString *)descriptionMessage
{
self = [super initWithNibName:@"SDPStatusBarNotification" bundle:nil];
if (self)
{
_message = message;
_description = description;
_descriptionMessage = descriptionMessage;
_closingDelay = 5.0; // seconds
}
return self;
Expand All @@ -48,10 +48,10 @@ - (void)awakeFromNib

// calculate sizes for the description
NSSize descriptionTextSize;
if (self.description != nil)
if (self.descriptionMessage != nil)
{
_descriptionField.stringValue = self.description;
descriptionTextSize = [self.description sizeWithWidth:popoverMessageWidth andFont:_descriptionField.font];
_descriptionField.stringValue = self.descriptionMessage;
descriptionTextSize = [self.descriptionMessage sizeWithWidth:popoverMessageWidth andFont:_descriptionField.font];
descriptionTextSize = NSMakeSize(descriptionTextSize.width + TextPadding.width, descriptionTextSize.height + TextPadding.height);
}
else
Expand Down
4 changes: 2 additions & 2 deletions SourceDrop/SourceDrop-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.6</string>
<string>1.6.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1169</string>
<string>1174</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit d21b11e

Please sign in to comment.