aboutsummaryrefslogtreecommitdiff
path: root/backends/taskbar
diff options
context:
space:
mode:
authorEugene Sandulenko2016-10-09 15:02:02 +0200
committerEugene Sandulenko2016-10-09 15:02:02 +0200
commit355c4fa646c375c2ac42450871ff3d9221d1719d (patch)
tree81ef00feaedcd66821c56b7ae576ca068f8c997b /backends/taskbar
parentdead4aa01446da2bf711e64a4e681be460fa1202 (diff)
downloadscummvm-rg350-355c4fa646c375c2ac42450871ff3d9221d1719d.tar.gz
scummvm-rg350-355c4fa646c375c2ac42450871ff3d9221d1719d.tar.bz2
scummvm-rg350-355c4fa646c375c2ac42450871ff3d9221d1719d.zip
JANITORIAL: Remove more trailing spaces
Diffstat (limited to 'backends/taskbar')
-rw-r--r--backends/taskbar/macosx/dockplugin/dockplugin.m8
-rw-r--r--backends/taskbar/macosx/macosx-taskbar.h6
-rw-r--r--backends/taskbar/macosx/macosx-taskbar.mm30
3 files changed, 22 insertions, 22 deletions
diff --git a/backends/taskbar/macosx/dockplugin/dockplugin.m b/backends/taskbar/macosx/dockplugin/dockplugin.m
index 9d864ef2a8..95f961a39d 100644
--- a/backends/taskbar/macosx/dockplugin/dockplugin.m
+++ b/backends/taskbar/macosx/dockplugin/dockplugin.m
@@ -72,7 +72,7 @@
NSString *gameId = [recentGame valueForKey:@"game"];
NSString *desc = [recentGame valueForKey:@"description"];
NSString *iconFile = [recentGame valueForKey:@"icon"];
-
+
StartGameMenuItem *menuItem = [[StartGameMenuItem alloc] initWithGame:gameId description:desc icon:iconFile];
[recentGamesMenu addItem:menuItem];
[menuItem release];
@@ -88,7 +88,7 @@
- (NSMenuItem*)initWithGame:(NSString *)gameId description:(NSString*)desc icon:(NSString*)iconFile {
self = [super initWithTitle:(desc == nil ? gameId : desc) action:@selector(startGame) keyEquivalent:@""];
[self setTarget:self];
-
+
if (iconFile != nil) {
NSImage *image = [[NSImage alloc] initWithContentsOfFile:iconFile];
[self setImage:image];
@@ -97,7 +97,7 @@
game = gameId;
[game retain];
-
+
return self;
}
@@ -108,7 +108,7 @@
- (IBAction) startGame {
NSLog(@"Starting Game %@...", game);
-
+
NSString *scummVMPath = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:@"org.scummvm.scummvm"];
if (scummVMPath == nil) {
NSLog(@"Cannot find ScummVM.app!");
diff --git a/backends/taskbar/macosx/macosx-taskbar.h b/backends/taskbar/macosx/macosx-taskbar.h
index 55bb97a691..145cbd4f3a 100644
--- a/backends/taskbar/macosx/macosx-taskbar.h
+++ b/backends/taskbar/macosx/macosx-taskbar.h
@@ -40,16 +40,16 @@ public:
virtual void addRecent(const Common::String &name, const Common::String &description);
virtual void notifyError();
virtual void clearError();
-
+
private:
Common::String getIconPath(const Common::String&);
void initApplicationIconView();
void clearApplicationIconView();
-
+
void initOverlayIconView();
void clearOverlayIconView();
-
+
double _progress;
};
diff --git a/backends/taskbar/macosx/macosx-taskbar.mm b/backends/taskbar/macosx/macosx-taskbar.mm
index c842eb8090..692fa84429 100644
--- a/backends/taskbar/macosx/macosx-taskbar.mm
+++ b/backends/taskbar/macosx/macosx-taskbar.mm
@@ -112,11 +112,11 @@ void MacOSXTaskbarManager::setOverlayIcon(const Common::String &name, const Comm
[_dockTile performSelector:@selector(display)];
return;
}
-
+
Common::String path = getIconPath(name);
if (path.empty())
return;
-
+
initOverlayIconView();
CFStringRef imageFile = CFStringCreateWithCString(0, path.c_str(), kCFStringEncodingASCII);
@@ -136,7 +136,7 @@ void MacOSXTaskbarManager::setProgressValue(int completed, int total) {
_progress = (double)completed / (double)total;
else if (_progress < 0)
_progress = 0.0;
-
+
NSImage *mainIcon = [[NSApp applicationIconImage] copy];
double barSize = [mainIcon size].width;
double progressSize = barSize * _progress;
@@ -150,7 +150,7 @@ void MacOSXTaskbarManager::setProgressValue(int completed, int total) {
initApplicationIconView();
[_applicationIconView setImage:mainIcon];
[mainIcon release];
-
+
[_dockTile performSelector:@selector(display)];
}
@@ -207,50 +207,50 @@ Common::String MacOSXTaskbarManager::getIconPath(const Common::String& target) {
// fallback to the extra path
//
// Icons can be either in a subfolder named "icons" or directly in the path
-
+
Common::String iconsPath = ConfMan.get("iconspath");
Common::String extraPath = ConfMan.get("extrapath");
-
+
#define TRY_ICON_PATH(path) { \
Common::FSNode node((path)); \
if (node.exists()) \
return (path); \
}
-
+
if (!iconsPath.empty()) {
TRY_ICON_PATH(iconsPath + "/" + target + ".png");
TRY_ICON_PATH(iconsPath + "/" + ConfMan.get("gameid") + ".png");
TRY_ICON_PATH(iconsPath + "/icons/" + target + ".png");
TRY_ICON_PATH(iconsPath + "/icons/" + ConfMan.get("gameid") + ".png");
}
-
+
if (!extraPath.empty()) {
TRY_ICON_PATH(extraPath + "/" + target + ".png");
TRY_ICON_PATH(extraPath + "/" + ConfMan.get("gameid") + ".png");
TRY_ICON_PATH(extraPath + "/icons/" + target + ".png");
TRY_ICON_PATH(extraPath + "/icons/" + ConfMan.get("gameid") + ".png");
}
-
+
return "";
}
void MacOSXTaskbarManager::addRecent(const Common::String &name, const Common::String &description) {
//warning("[MacOSXTaskbarManager::addRecent] Adding recent list entry: %s (%s)", name.c_str(), description.c_str());
-
+
if (_dockTile == nil)
return;
-
+
// Store the game, description and icon in user preferences.
// The NSDockTilePlugin will retrieve them there to list them in the dock tile menu.
-
+
CFStringRef gameName = CFStringCreateWithCString(0, name.c_str(), kCFStringEncodingASCII);
CFStringRef desc = CFStringCreateWithCString(0, description.c_str(), kCFStringEncodingASCII);
-
+
// First build the dictionary for this game.
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
[dict setObject:(NSString *)gameName forKey:@"game"];
[dict setObject:(NSString *)desc forKey:@"description"];
-
+
// Icon
Common::String iconPath = getIconPath(name);
if (!iconPath.empty()) {
@@ -258,7 +258,7 @@ void MacOSXTaskbarManager::addRecent(const Common::String &name, const Common::S
[dict setObject:(NSString *)icon forKey:@"icon"];
CFRelease(icon);
}
-
+
// Retrieve the current list of recent items and update it.
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *oldArray = [defaults arrayForKey:@"recentGames"];