diff --git a/ipbc-Client/ipbc-Client.xcodeproj/project.pbxproj b/ipbc-Client/ipbc-Client.xcodeproj/project.pbxproj index a736d7d..515b43a 100644 --- a/ipbc-Client/ipbc-Client.xcodeproj/project.pbxproj +++ b/ipbc-Client/ipbc-Client.xcodeproj/project.pbxproj @@ -9,6 +9,8 @@ /* Begin PBXBuildFile section */ ECB32E3718210D1D00D3C886 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = ECB32E3618210D1D00D3C886 /* Reachability.m */; }; ECB32E3918210F3A00D3C886 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECB32E3818210F3A00D3C886 /* SystemConfiguration.framework */; }; + ECB963CC18228F42006F370E /* statusbar-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = ECB963CB18228F42006F370E /* statusbar-icon.png */; }; + ECB963D01822943E006F370E /* ImageHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = ECB963CF1822943E006F370E /* ImageHelper.m */; }; ECE5811B181A77090066D073 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECE5811A181A77090066D073 /* Cocoa.framework */; }; ECE58125181A77090066D073 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = ECE58123181A77090066D073 /* InfoPlist.strings */; }; ECE58127181A77090066D073 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ECE58126181A77090066D073 /* main.m */; }; @@ -38,6 +40,9 @@ ECB32E3518210D1D00D3C886 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = ""; }; ECB32E3618210D1D00D3C886 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = ""; }; ECB32E3818210F3A00D3C886 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + ECB963CB18228F42006F370E /* statusbar-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "statusbar-icon.png"; sourceTree = ""; }; + ECB963CE1822943E006F370E /* ImageHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageHelper.h; sourceTree = ""; }; + ECB963CF1822943E006F370E /* ImageHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageHelper.m; sourceTree = ""; }; ECE58117181A77090066D073 /* ipbc-Client.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ipbc-Client.app"; sourceTree = BUILT_PRODUCTS_DIR; }; ECE5811A181A77090066D073 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; ECE5811D181A77090066D073 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; @@ -85,6 +90,23 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + ECB963CA18228F29006F370E /* images */ = { + isa = PBXGroup; + children = ( + ECB963CB18228F42006F370E /* statusbar-icon.png */, + ); + name = images; + sourceTree = ""; + }; + ECB963CD18229423006F370E /* Helper */ = { + isa = PBXGroup; + children = ( + ECB963CE1822943E006F370E /* ImageHelper.h */, + ECB963CF1822943E006F370E /* ImageHelper.m */, + ); + name = Helper; + sourceTree = ""; + }; ECE5810E181A77090066D073 = { isa = PBXGroup; children = ( @@ -128,6 +150,8 @@ ECE58120181A77090066D073 /* ipbc-Client */ = { isa = PBXGroup; children = ( + ECB963CD18229423006F370E /* Helper */, + ECB963CA18228F29006F370E /* images */, ECE6FED7181E8B1C004F6C1F /* WebService */, ECE5812C181A77090066D073 /* ipbcAppDelegate.h */, ECE5812D181A77090066D073 /* ipbcAppDelegate.m */, @@ -263,6 +287,7 @@ files = ( ECE58125181A77090066D073 /* InfoPlist.strings in Resources */, ECE58133181A77090066D073 /* Images.xcassets in Resources */, + ECB963CC18228F42006F370E /* statusbar-icon.png in Resources */, ECE5812B181A77090066D073 /* Credits.rtf in Resources */, ECE58131181A77090066D073 /* MainMenu.xib in Resources */, ); @@ -286,6 +311,7 @@ ECE6FEDA181E8BE4004F6C1F /* WebServiceConstants.m in Sources */, ECE5812E181A77090066D073 /* ipbcAppDelegate.m in Sources */, ECE58127181A77090066D073 /* main.m in Sources */, + ECB963D01822943E006F370E /* ImageHelper.m in Sources */, ECE6FED6181E8AFE004F6C1F /* WebserviceClient.m in Sources */, ECB32E3718210D1D00D3C886 /* Reachability.m in Sources */, ); diff --git a/ipbc-Client/ipbc-Client.xcodeproj/project.xcworkspace/xcuserdata/gerrit.xcuserdatad/UserInterfaceState.xcuserstate b/ipbc-Client/ipbc-Client.xcodeproj/project.xcworkspace/xcuserdata/gerrit.xcuserdatad/UserInterfaceState.xcuserstate index 5ea795f..33ab267 100644 Binary files a/ipbc-Client/ipbc-Client.xcodeproj/project.xcworkspace/xcuserdata/gerrit.xcuserdatad/UserInterfaceState.xcuserstate and b/ipbc-Client/ipbc-Client.xcodeproj/project.xcworkspace/xcuserdata/gerrit.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ipbc-Client/ipbc-Client/ImageHelper.h b/ipbc-Client/ipbc-Client/ImageHelper.h new file mode 100644 index 0000000..3936687 --- /dev/null +++ b/ipbc-Client/ipbc-Client/ImageHelper.h @@ -0,0 +1,15 @@ +// +// ImageHelper.h +// ipbc-Client +// +// Created by Gerrit Linnemann on 31.10.13. +// Copyright (c) 2013 Adawim UG (haftungsbeschränkt). All rights reserved. +// + +#import + +@interface ImageHelper : NSObject + ++(NSImage*)resizeImage:(NSImage*)sourceImage size:(NSSize)size; + +@end diff --git a/ipbc-Client/ipbc-Client/ImageHelper.m b/ipbc-Client/ipbc-Client/ImageHelper.m new file mode 100644 index 0000000..98af74c --- /dev/null +++ b/ipbc-Client/ipbc-Client/ImageHelper.m @@ -0,0 +1,30 @@ +// +// ImageHelper.m +// ipbc-Client +// +// Created by Gerrit Linnemann on 31.10.13. +// Copyright (c) 2013 Adawim UG (haftungsbeschränkt). All rights reserved. +// + +#import "ImageHelper.h" + +@implementation ImageHelper + ++(NSImage*)resizeImage:(NSImage*)sourceImage size:(NSSize)size { + NSRect targetFrame = NSMakeRect(0, 0, size.width, size.height); + NSImage* targetImage = nil; + NSImageRep *sourceImageRep = + [sourceImage bestRepresentationForRect:targetFrame + context:nil + hints:nil]; + + targetImage = [[NSImage alloc] initWithSize:size]; + + [targetImage lockFocus]; + [sourceImageRep drawInRect: targetFrame]; + [targetImage unlockFocus]; + + return targetImage; +} + +@end diff --git a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/Contents.json b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/Contents.json index 2db2b1c..90d69e5 100644 --- a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,13 +1,15 @@ { "images" : [ { - "idiom" : "mac", "size" : "16x16", + "idiom" : "mac", + "filename" : "icon_16x16.png", "scale" : "1x" }, { - "idiom" : "mac", "size" : "16x16", + "idiom" : "mac", + "filename" : "icon_16x16@2x.png", "scale" : "2x" }, { @@ -16,28 +18,33 @@ "scale" : "1x" }, { - "idiom" : "mac", "size" : "32x32", + "idiom" : "mac", + "filename" : "icon_32x32@2x.png", "scale" : "2x" }, { - "idiom" : "mac", "size" : "128x128", + "idiom" : "mac", + "filename" : "icon_128x128.png", "scale" : "1x" }, { - "idiom" : "mac", "size" : "128x128", + "idiom" : "mac", + "filename" : "icon_128x128@2x.png", "scale" : "2x" }, { - "idiom" : "mac", "size" : "256x256", + "idiom" : "mac", + "filename" : "icon_256x256.png", "scale" : "1x" }, { - "idiom" : "mac", "size" : "256x256", + "idiom" : "mac", + "filename" : "icon_256x256@2x.png", "scale" : "2x" }, { @@ -46,8 +53,9 @@ "scale" : "1x" }, { - "idiom" : "mac", "size" : "512x512", + "idiom" : "mac", + "filename" : "icon_512x512@2x.png", "scale" : "2x" } ], diff --git a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_128x128.png b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_128x128.png new file mode 100644 index 0000000..8d13937 Binary files /dev/null and b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_128x128.png differ diff --git a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_128x128@2x.png b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_128x128@2x.png new file mode 100644 index 0000000..0b8c0b5 Binary files /dev/null and b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_128x128@2x.png differ diff --git a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_16x16.png b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_16x16.png new file mode 100644 index 0000000..47ee215 Binary files /dev/null and b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_16x16.png differ diff --git a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_16x16@2x.png b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_16x16@2x.png new file mode 100644 index 0000000..3154fdf Binary files /dev/null and b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_16x16@2x.png differ diff --git a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_256x256.png b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_256x256.png new file mode 100644 index 0000000..0b8c0b5 Binary files /dev/null and b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_256x256.png differ diff --git a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_256x256@2x.png b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_256x256@2x.png new file mode 100644 index 0000000..7575e14 Binary files /dev/null and b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_256x256@2x.png differ diff --git a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png new file mode 100644 index 0000000..e28466c Binary files /dev/null and b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png differ diff --git a/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_512x512@2x.png b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_512x512@2x.png new file mode 100644 index 0000000..f2a752f Binary files /dev/null and b/ipbc-Client/ipbc-Client/Images.xcassets/AppIcon.appiconset/icon_512x512@2x.png differ diff --git a/ipbc-Client/ipbc-Client/ipbcAppDelegate.m b/ipbc-Client/ipbc-Client/ipbcAppDelegate.m index 514c8c7..27f5238 100644 --- a/ipbc-Client/ipbc-Client/ipbcAppDelegate.m +++ b/ipbc-Client/ipbc-Client/ipbcAppDelegate.m @@ -7,6 +7,7 @@ // #import "ipbcAppDelegate.h" +#import "ImageHelper.h" @implementation ipbcAppDelegate @@ -23,8 +24,13 @@ -(void)awakeFromNib { statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; [statusItem setMenu:statusMenu]; - [statusItem setTitle:@"ip-bc"]; [statusItem setHighlightMode:YES]; + + // statusbar icon + NSSize statusbarIconSize; + statusbarIconSize.width = 18; + statusbarIconSize.height = 18; + [statusItem setImage:[ImageHelper resizeImage:[NSImage imageNamed: @"statusbar-icon.png"] size:statusbarIconSize]]; } -(IBAction)fromMenuSettings:(id)sender { diff --git a/ipbc-Client/ipbc-Client/statusbar-icon.png b/ipbc-Client/ipbc-Client/statusbar-icon.png new file mode 100644 index 0000000..d68cbfb Binary files /dev/null and b/ipbc-Client/ipbc-Client/statusbar-icon.png differ diff --git a/ipbc-icon Assets/ReadMe-Assets.rtf b/ipbc-icon Assets/ReadMe-Assets.rtf new file mode 100644 index 0000000..2dd43db --- /dev/null +++ b/ipbc-icon Assets/ReadMe-Assets.rtf @@ -0,0 +1,30 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw11900\paperh16840\margl1440\margr1440\vieww11860\viewh13740\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural + +\f0\b\fs30 \cf0 Installing icon files in an app using Xcode 5+ and Image Assets:\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural + +\b0\fs28 \cf0 \ +Open your Mac app project in Xcode 5 or later.\ +Make sure the Project Navigator is visible in the left sidebar.\ +\ +Select "Images.xcassets" in the Project Navigator.\ +\ +If the project was created using an easier version of Xcode, this may not appear.\ +To create it, select the project at the top of the Project Navigator.\ +Use the popup menu to make sure you are editing the target and go to the General tab.\ +In the "App Icons" section, click the "Use Asset Catalog" button.\ +The "Images.xcassets" folder will be created and any existing icons will be migrated to the new structure.\ +\ +In "Images.xcassets", select "AppIcon" which will show you a series of image wells listing the icons needed for the project and its supported devices.\ +If you do not see any wells, click the "Show Overview" button at the bottom right of the pane.\ +\ +Select all the files starting with "icon_" and drag them into these image wells.\ +In the early versions of Xcode 5, I have found that this does not always allocate them all.\ +Some icon files may be marked as "Unassigned". If so, drag them into the appropriate image wells manually. The file names indicate which icons fit into which section.\ +\ +Once all the icons have been dragged into place, you can delete this folder and all the files in it.\ +} \ No newline at end of file diff --git a/ipbc-icon Assets/icon_128x128.png b/ipbc-icon Assets/icon_128x128.png new file mode 100644 index 0000000..8d13937 Binary files /dev/null and b/ipbc-icon Assets/icon_128x128.png differ diff --git a/ipbc-icon Assets/icon_128x128@2x.png b/ipbc-icon Assets/icon_128x128@2x.png new file mode 100644 index 0000000..0b8c0b5 Binary files /dev/null and b/ipbc-icon Assets/icon_128x128@2x.png differ diff --git a/ipbc-icon Assets/icon_16x16.png b/ipbc-icon Assets/icon_16x16.png new file mode 100644 index 0000000..47ee215 Binary files /dev/null and b/ipbc-icon Assets/icon_16x16.png differ diff --git a/ipbc-icon Assets/icon_16x16@2x.png b/ipbc-icon Assets/icon_16x16@2x.png new file mode 100644 index 0000000..3154fdf Binary files /dev/null and b/ipbc-icon Assets/icon_16x16@2x.png differ diff --git a/ipbc-icon Assets/icon_256x256.png b/ipbc-icon Assets/icon_256x256.png new file mode 100644 index 0000000..0b8c0b5 Binary files /dev/null and b/ipbc-icon Assets/icon_256x256.png differ diff --git a/ipbc-icon Assets/icon_256x256@2x.png b/ipbc-icon Assets/icon_256x256@2x.png new file mode 100644 index 0000000..7575e14 Binary files /dev/null and b/ipbc-icon Assets/icon_256x256@2x.png differ diff --git a/ipbc-icon Assets/icon_32x32.png b/ipbc-icon Assets/icon_32x32.png new file mode 100644 index 0000000..3154fdf Binary files /dev/null and b/ipbc-icon Assets/icon_32x32.png differ diff --git a/ipbc-icon Assets/icon_32x32@2x.png b/ipbc-icon Assets/icon_32x32@2x.png new file mode 100644 index 0000000..e28466c Binary files /dev/null and b/ipbc-icon Assets/icon_32x32@2x.png differ diff --git a/ipbc-icon Assets/icon_512x512.png b/ipbc-icon Assets/icon_512x512.png new file mode 100644 index 0000000..7575e14 Binary files /dev/null and b/ipbc-icon Assets/icon_512x512.png differ diff --git a/ipbc-icon Assets/icon_512x512@2x.png b/ipbc-icon Assets/icon_512x512@2x.png new file mode 100644 index 0000000..f2a752f Binary files /dev/null and b/ipbc-icon Assets/icon_512x512@2x.png differ diff --git a/ipbc-icon.icns b/ipbc-icon.icns new file mode 100644 index 0000000..8fef48f Binary files /dev/null and b/ipbc-icon.icns differ diff --git a/ipbc-icon.png b/ipbc-icon.png new file mode 100644 index 0000000..835b002 Binary files /dev/null and b/ipbc-icon.png differ