├── macruby-statusmenu ├── en.lproj │ ├── InfoPlist.strings │ └── MainMenu.xib ├── menubar-icon.png ├── macruby-statusmenu-Prefix.pch ├── main.m ├── AppDelegate.rb ├── MyCustomView.rb ├── MySatusMenu.rb ├── rb_main.rb └── macruby-statusmenu-Info.plist ├── README └── macruby-statusmenu.xcodeproj └── project.pbxproj /macruby-statusmenu/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /macruby-statusmenu/menubar-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TomK32/macruby-statusmenu/HEAD/macruby-statusmenu/menubar-icon.png -------------------------------------------------------------------------------- /macruby-statusmenu/macruby-statusmenu-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'macruby-statusmenu' target in the 'macruby-statusmenu' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /macruby-statusmenu/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // macruby-statusmenu 4 | // 5 | // Created by Thomas R. Koll on 25.03.11. 6 | // Copyright 2011 Ananasblau.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | return macruby_main("rb_main.rb", argc, argv); 16 | } 17 | -------------------------------------------------------------------------------- /macruby-statusmenu/AppDelegate.rb: -------------------------------------------------------------------------------- 1 | # 2 | # AppDelegate.rb 3 | # macruby-statusmenu 4 | # 5 | # Created by Thomas R. Koll on 25.03.11. 6 | # Copyright 2011 Ananasblau.com. All rights reserved. 7 | # 8 | 9 | class AppDelegate 10 | attr_accessor :window 11 | def applicationDidFinishLaunching(a_notification) 12 | # Insert code here to initialize your application 13 | end 14 | end 15 | 16 | -------------------------------------------------------------------------------- /macruby-statusmenu/MyCustomView.rb: -------------------------------------------------------------------------------- 1 | # 2 | # MyCustomView.rb 3 | # macruby-statusmenu 4 | # 5 | # Created by Thomas R. Koll on 25.03.11. 6 | # Copyright 2011 Ananasblau.com. All rights reserved. 7 | # 8 | 9 | 10 | class MyCustomView < NSView 11 | 12 | def initWithFrame(frame) 13 | super(frame) 14 | return self 15 | end 16 | 17 | def drawRect(rect) 18 | path = NSBezierPath.bezierPathWithRect(rect) 19 | path.stroke 20 | end 21 | end -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | macruby-statusmenu example 2 | 3 | This example application written in MacRuby shows you how to write a 4 | simple application that sits in your system's status menu. 5 | It also displays a custom view that you can style with images and stuff 6 | in this status menu. 7 | The app is set to run as agent meaning it won't show in the Dock Menu when running. 8 | 9 | Written by Thomas R. Koll, 10 | Dual-Licensed under GPL version 2 and WTFPL. -------------------------------------------------------------------------------- /macruby-statusmenu/MySatusMenu.rb: -------------------------------------------------------------------------------- 1 | # 2 | # status_menu.rb 3 | # macruby-statusmenu 4 | # 5 | # Created by Thomas R. Koll on 25.03.11. 6 | # Copyright 2011 Ananasblau.com. All rights reserved. 7 | # 8 | 9 | class MyStatusMenu < NSMenu 10 | attr_accessor :status_bar_item 11 | def awakeFromNib 12 | self.status_bar_item = NSStatusBar.systemStatusBar.statusItemWithLength(NSVariableStatusItemLength) 13 | 14 | image = NSImage.imageNamed 'menubar-icon' 15 | self.status_bar_item.setImage image 16 | 17 | self.status_bar_item.setMenu self 18 | end 19 | end -------------------------------------------------------------------------------- /macruby-statusmenu/rb_main.rb: -------------------------------------------------------------------------------- 1 | # 2 | # rb_main.rb 3 | # macruby-statusmenu 4 | # 5 | # Created by Thomas R. Koll on 25.03.11. 6 | # Copyright (c) 2011 Ananasblau.com. All rights reserved. 7 | # 8 | 9 | # Loading the Cocoa framework. If you need to load more frameworks, you can 10 | # do that here too. 11 | framework 'Cocoa' 12 | 13 | # Loading all the Ruby project files. 14 | main = File.basename(__FILE__, File.extname(__FILE__)) 15 | dir_path = NSBundle.mainBundle.resourcePath.fileSystemRepresentation 16 | Dir.glob(File.join(dir_path, '*.{rb,rbo}')).map { |x| File.basename(x, File.extname(x)) }.uniq.each do |path| 17 | if path != main 18 | require(path) 19 | end 20 | end 21 | 22 | # Starting the Cocoa main loop. 23 | NSApplicationMain(0, nil) 24 | -------------------------------------------------------------------------------- /macruby-statusmenu/macruby-statusmenu-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDocumentTypes 8 | 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | org.macruby.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleURLTypes 26 | 27 | CFBundleVersion 28 | 1 29 | LSMinimumSystemVersion 30 | ${MACOSX_DEPLOYMENT_TARGET} 31 | LSUIElement 32 | 33 | NSMainNibFile 34 | MainMenu 35 | NSPrincipalClass 36 | NSApplication 37 | NSServices 38 | 39 | UTExportedTypeDeclarations 40 | 41 | UTImportedTypeDeclarations 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /macruby-statusmenu.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0E21A6E7133D06FA0032899B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E21A6E6133D06FA0032899B /* Cocoa.framework */; }; 11 | 0E21A6E9133D06FA0032899B /* MacRuby.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E21A6E8133D06FA0032899B /* MacRuby.framework */; }; 12 | 0E21A6F0133D06FA0032899B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0E21A6EE133D06FA0032899B /* InfoPlist.strings */; }; 13 | 0E21A6F3133D06FA0032899B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E21A6F2133D06FA0032899B /* main.m */; }; 14 | 0E21A6F7133D06FA0032899B /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0E21A6F5133D06FA0032899B /* MainMenu.xib */; }; 15 | 0E21A6FA133D06FA0032899B /* rb_main.rb in Resources */ = {isa = PBXBuildFile; fileRef = 0E21A6F9133D06FA0032899B /* rb_main.rb */; }; 16 | 0E21A6FC133D06FA0032899B /* AppDelegate.rb in Resources */ = {isa = PBXBuildFile; fileRef = 0E21A6FB133D06FA0032899B /* AppDelegate.rb */; }; 17 | 0E21A706133D07140032899B /* MySatusMenu.rb in Resources */ = {isa = PBXBuildFile; fileRef = 0E21A705133D07140032899B /* MySatusMenu.rb */; }; 18 | 0E4C6FE6133D092900DDC7C9 /* menubar-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 0E4C6FE5133D092900DDC7C9 /* menubar-icon.png */; }; 19 | 0E4C6FF0133D0CDE00DDC7C9 /* MyCustomView.rb in Resources */ = {isa = PBXBuildFile; fileRef = 0E4C6FEF133D0CDE00DDC7C9 /* MyCustomView.rb */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 0E21A6E2133D06FA0032899B /* macruby-statusmenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "macruby-statusmenu.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 0E21A6E6133D06FA0032899B /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 25 | 0E21A6E8133D06FA0032899B /* MacRuby.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MacRuby.framework; path = System/Library/Frameworks/MacRuby.framework; sourceTree = SDKROOT; }; 26 | 0E21A6ED133D06FA0032899B /* macruby-statusmenu-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "macruby-statusmenu-Info.plist"; sourceTree = ""; }; 27 | 0E21A6EF133D06FA0032899B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 28 | 0E21A6F1133D06FA0032899B /* macruby-statusmenu-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "macruby-statusmenu-Prefix.pch"; sourceTree = ""; }; 29 | 0E21A6F2133D06FA0032899B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 30 | 0E21A6F6133D06FA0032899B /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; 31 | 0E21A6F9133D06FA0032899B /* rb_main.rb */ = {isa = PBXFileReference; lastKnownFileType = text.script.ruby; path = rb_main.rb; sourceTree = ""; }; 32 | 0E21A6FB133D06FA0032899B /* AppDelegate.rb */ = {isa = PBXFileReference; lastKnownFileType = text.script.ruby; path = AppDelegate.rb; sourceTree = ""; }; 33 | 0E21A705133D07140032899B /* MySatusMenu.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = MySatusMenu.rb; sourceTree = ""; }; 34 | 0E4C6FE5133D092900DDC7C9 /* menubar-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "menubar-icon.png"; sourceTree = ""; }; 35 | 0E4C6FEF133D0CDE00DDC7C9 /* MyCustomView.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = MyCustomView.rb; sourceTree = ""; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | 0E21A6DF133D06FA0032899B /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | 0E21A6E7133D06FA0032899B /* Cocoa.framework in Frameworks */, 44 | 0E21A6E9133D06FA0032899B /* MacRuby.framework in Frameworks */, 45 | ); 46 | runOnlyForDeploymentPostprocessing = 0; 47 | }; 48 | /* End PBXFrameworksBuildPhase section */ 49 | 50 | /* Begin PBXGroup section */ 51 | 0E21A6D7133D06F90032899B = { 52 | isa = PBXGroup; 53 | children = ( 54 | 0E21A6EB133D06FA0032899B /* macruby-statusmenu */, 55 | 0E21A6E5133D06FA0032899B /* Frameworks */, 56 | 0E21A6E3133D06FA0032899B /* Products */, 57 | ); 58 | sourceTree = ""; 59 | }; 60 | 0E21A6E3133D06FA0032899B /* Products */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | 0E21A6E2133D06FA0032899B /* macruby-statusmenu.app */, 64 | ); 65 | name = Products; 66 | sourceTree = ""; 67 | }; 68 | 0E21A6E5133D06FA0032899B /* Frameworks */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 0E21A6E6133D06FA0032899B /* Cocoa.framework */, 72 | 0E21A6E8133D06FA0032899B /* MacRuby.framework */, 73 | ); 74 | name = Frameworks; 75 | sourceTree = ""; 76 | }; 77 | 0E21A6EB133D06FA0032899B /* macruby-statusmenu */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 0E21A6FB133D06FA0032899B /* AppDelegate.rb */, 81 | 0E21A705133D07140032899B /* MySatusMenu.rb */, 82 | 0E4C6FEF133D0CDE00DDC7C9 /* MyCustomView.rb */, 83 | 0E21A6F4133D06FA0032899B /* Resources */, 84 | 0E21A6F8133D06FA0032899B /* Other Sources */, 85 | 0E21A6EC133D06FA0032899B /* Supporting Files */, 86 | ); 87 | path = "macruby-statusmenu"; 88 | sourceTree = ""; 89 | }; 90 | 0E21A6EC133D06FA0032899B /* Supporting Files */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 0E21A6ED133D06FA0032899B /* macruby-statusmenu-Info.plist */, 94 | 0E21A6EE133D06FA0032899B /* InfoPlist.strings */, 95 | 0E21A6F1133D06FA0032899B /* macruby-statusmenu-Prefix.pch */, 96 | 0E21A6F2133D06FA0032899B /* main.m */, 97 | ); 98 | name = "Supporting Files"; 99 | sourceTree = ""; 100 | }; 101 | 0E21A6F4133D06FA0032899B /* Resources */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 0E4C6FE5133D092900DDC7C9 /* menubar-icon.png */, 105 | 0E21A6F5133D06FA0032899B /* MainMenu.xib */, 106 | ); 107 | name = Resources; 108 | sourceTree = ""; 109 | }; 110 | 0E21A6F8133D06FA0032899B /* Other Sources */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 0E21A6F9133D06FA0032899B /* rb_main.rb */, 114 | ); 115 | name = "Other Sources"; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXLegacyTarget section */ 121 | 0E21A6EA133D06FA0032899B /* Deployment */ = { 122 | isa = PBXLegacyTarget; 123 | buildArgumentsString = "--compile --embed"; 124 | buildConfigurationList = 0E21A702133D06FA0032899B /* Build configuration list for PBXLegacyTarget "Deployment" */; 125 | buildPhases = ( 126 | ); 127 | buildToolPath = /usr/local/bin/macruby_deploy; 128 | dependencies = ( 129 | ); 130 | name = Deployment; 131 | passBuildSettingsInEnvironment = 1; 132 | productName = Deployment; 133 | }; 134 | /* End PBXLegacyTarget section */ 135 | 136 | /* Begin PBXNativeTarget section */ 137 | 0E21A6E1133D06FA0032899B /* macruby-statusmenu */ = { 138 | isa = PBXNativeTarget; 139 | buildConfigurationList = 0E21A6FF133D06FA0032899B /* Build configuration list for PBXNativeTarget "macruby-statusmenu" */; 140 | buildPhases = ( 141 | 0E21A6DE133D06FA0032899B /* Sources */, 142 | 0E21A6DF133D06FA0032899B /* Frameworks */, 143 | 0E21A6E0133D06FA0032899B /* Resources */, 144 | ); 145 | buildRules = ( 146 | ); 147 | dependencies = ( 148 | ); 149 | name = "macruby-statusmenu"; 150 | productName = "macruby-statusmenu"; 151 | productReference = 0E21A6E2133D06FA0032899B /* macruby-statusmenu.app */; 152 | productType = "com.apple.product-type.application"; 153 | }; 154 | /* End PBXNativeTarget section */ 155 | 156 | /* Begin PBXProject section */ 157 | 0E21A6D9133D06F90032899B /* Project object */ = { 158 | isa = PBXProject; 159 | attributes = { 160 | ORGANIZATIONNAME = Ananasblau.com; 161 | }; 162 | buildConfigurationList = 0E21A6DC133D06F90032899B /* Build configuration list for PBXProject "macruby-statusmenu" */; 163 | compatibilityVersion = "Xcode 3.2"; 164 | developmentRegion = English; 165 | hasScannedForEncodings = 0; 166 | knownRegions = ( 167 | en, 168 | ); 169 | mainGroup = 0E21A6D7133D06F90032899B; 170 | productRefGroup = 0E21A6E3133D06FA0032899B /* Products */; 171 | projectDirPath = ""; 172 | projectRoot = ""; 173 | targets = ( 174 | 0E21A6E1133D06FA0032899B /* macruby-statusmenu */, 175 | 0E21A6EA133D06FA0032899B /* Deployment */, 176 | ); 177 | }; 178 | /* End PBXProject section */ 179 | 180 | /* Begin PBXResourcesBuildPhase section */ 181 | 0E21A6E0133D06FA0032899B /* Resources */ = { 182 | isa = PBXResourcesBuildPhase; 183 | buildActionMask = 2147483647; 184 | files = ( 185 | 0E21A6F0133D06FA0032899B /* InfoPlist.strings in Resources */, 186 | 0E21A6F7133D06FA0032899B /* MainMenu.xib in Resources */, 187 | 0E21A6FA133D06FA0032899B /* rb_main.rb in Resources */, 188 | 0E21A6FC133D06FA0032899B /* AppDelegate.rb in Resources */, 189 | 0E21A706133D07140032899B /* MySatusMenu.rb in Resources */, 190 | 0E4C6FE6133D092900DDC7C9 /* menubar-icon.png in Resources */, 191 | 0E4C6FF0133D0CDE00DDC7C9 /* MyCustomView.rb in Resources */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | /* End PBXResourcesBuildPhase section */ 196 | 197 | /* Begin PBXSourcesBuildPhase section */ 198 | 0E21A6DE133D06FA0032899B /* Sources */ = { 199 | isa = PBXSourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 0E21A6F3133D06FA0032899B /* main.m in Sources */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | /* End PBXSourcesBuildPhase section */ 207 | 208 | /* Begin PBXVariantGroup section */ 209 | 0E21A6EE133D06FA0032899B /* InfoPlist.strings */ = { 210 | isa = PBXVariantGroup; 211 | children = ( 212 | 0E21A6EF133D06FA0032899B /* en */, 213 | ); 214 | name = InfoPlist.strings; 215 | sourceTree = ""; 216 | }; 217 | 0E21A6F5133D06FA0032899B /* MainMenu.xib */ = { 218 | isa = PBXVariantGroup; 219 | children = ( 220 | 0E21A6F6133D06FA0032899B /* en */, 221 | ); 222 | name = MainMenu.xib; 223 | sourceTree = ""; 224 | }; 225 | /* End PBXVariantGroup section */ 226 | 227 | /* Begin XCBuildConfiguration section */ 228 | 0E21A6FD133D06FA0032899B /* Debug */ = { 229 | isa = XCBuildConfiguration; 230 | buildSettings = { 231 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 232 | GCC_C_LANGUAGE_STANDARD = gnu99; 233 | GCC_OPTIMIZATION_LEVEL = 0; 234 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 235 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 236 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 237 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 238 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 239 | GCC_WARN_UNUSED_VARIABLE = YES; 240 | MACOSX_DEPLOYMENT_TARGET = 10.6; 241 | ONLY_ACTIVE_ARCH = YES; 242 | SDKROOT = macosx; 243 | }; 244 | name = Debug; 245 | }; 246 | 0E21A6FE133D06FA0032899B /* Release */ = { 247 | isa = XCBuildConfiguration; 248 | buildSettings = { 249 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; 250 | GCC_C_LANGUAGE_STANDARD = gnu99; 251 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 252 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 253 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 254 | GCC_WARN_UNUSED_VARIABLE = YES; 255 | MACOSX_DEPLOYMENT_TARGET = 10.6; 256 | SDKROOT = macosx; 257 | }; 258 | name = Release; 259 | }; 260 | 0E21A700133D06FA0032899B /* Debug */ = { 261 | isa = XCBuildConfiguration; 262 | buildSettings = { 263 | ALWAYS_SEARCH_USER_PATHS = NO; 264 | COPY_PHASE_STRIP = NO; 265 | GCC_DYNAMIC_NO_PIC = NO; 266 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 267 | GCC_ENABLE_OBJC_GC = required; 268 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 269 | GCC_PREFIX_HEADER = "macruby-statusmenu/macruby-statusmenu-Prefix.pch"; 270 | INFOPLIST_FILE = "macruby-statusmenu/macruby-statusmenu-Info.plist"; 271 | PRODUCT_NAME = "$(TARGET_NAME)"; 272 | WRAPPER_EXTENSION = app; 273 | }; 274 | name = Debug; 275 | }; 276 | 0E21A701133D06FA0032899B /* Release */ = { 277 | isa = XCBuildConfiguration; 278 | buildSettings = { 279 | ALWAYS_SEARCH_USER_PATHS = NO; 280 | COPY_PHASE_STRIP = YES; 281 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 282 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 283 | GCC_ENABLE_OBJC_GC = required; 284 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 285 | GCC_PREFIX_HEADER = "macruby-statusmenu/macruby-statusmenu-Prefix.pch"; 286 | INFOPLIST_FILE = "macruby-statusmenu/macruby-statusmenu-Info.plist"; 287 | PRODUCT_NAME = "$(TARGET_NAME)"; 288 | WRAPPER_EXTENSION = app; 289 | }; 290 | name = Release; 291 | }; 292 | 0E21A703133D06FA0032899B /* Debug */ = { 293 | isa = XCBuildConfiguration; 294 | buildSettings = { 295 | }; 296 | name = Debug; 297 | }; 298 | 0E21A704133D06FA0032899B /* Release */ = { 299 | isa = XCBuildConfiguration; 300 | buildSettings = { 301 | }; 302 | name = Release; 303 | }; 304 | /* End XCBuildConfiguration section */ 305 | 306 | /* Begin XCConfigurationList section */ 307 | 0E21A6DC133D06F90032899B /* Build configuration list for PBXProject "macruby-statusmenu" */ = { 308 | isa = XCConfigurationList; 309 | buildConfigurations = ( 310 | 0E21A6FD133D06FA0032899B /* Debug */, 311 | 0E21A6FE133D06FA0032899B /* Release */, 312 | ); 313 | defaultConfigurationIsVisible = 0; 314 | defaultConfigurationName = Release; 315 | }; 316 | 0E21A6FF133D06FA0032899B /* Build configuration list for PBXNativeTarget "macruby-statusmenu" */ = { 317 | isa = XCConfigurationList; 318 | buildConfigurations = ( 319 | 0E21A700133D06FA0032899B /* Debug */, 320 | 0E21A701133D06FA0032899B /* Release */, 321 | ); 322 | defaultConfigurationIsVisible = 0; 323 | defaultConfigurationName = Release; 324 | }; 325 | 0E21A702133D06FA0032899B /* Build configuration list for PBXLegacyTarget "Deployment" */ = { 326 | isa = XCConfigurationList; 327 | buildConfigurations = ( 328 | 0E21A703133D06FA0032899B /* Debug */, 329 | 0E21A704133D06FA0032899B /* Release */, 330 | ); 331 | defaultConfigurationIsVisible = 0; 332 | defaultConfigurationName = Release; 333 | }; 334 | /* End XCConfigurationList section */ 335 | }; 336 | rootObject = 0E21A6D9133D06F90032899B /* Project object */; 337 | } 338 | -------------------------------------------------------------------------------- /macruby-statusmenu/en.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1060 5 | 10J567 6 | 1305 7 | 1038.35 8 | 462.00 9 | 10 | com.apple.InterfaceBuilder.CocoaPlugin 11 | 1305 12 | 13 | 14 | YES 15 | NSTextField 16 | NSView 17 | NSWindowTemplate 18 | NSMenu 19 | NSCustomObject 20 | NSMenuItem 21 | NSCustomView 22 | NSTextFieldCell 23 | 24 | 25 | YES 26 | com.apple.InterfaceBuilder.CocoaPlugin 27 | 28 | 29 | YES 30 | 31 | YES 32 | 33 | 34 | 35 | 36 | YES 37 | 38 | NSApplication 39 | 40 | 41 | FirstResponder 42 | 43 | 44 | NSApplication 45 | 46 | 47 | 48 | 49 | YES 50 | 51 | 52 | CustomView 53 | 54 | 2147483647 55 | 56 | NSImage 57 | NSMenuCheckmark 58 | 59 | 60 | NSImage 61 | NSMenuMixedState 62 | 63 | 64 | 65 | 66 | About 67 | 68 | 2147483647 69 | 70 | 71 | 72 | 73 | 74 | Quit 75 | 76 | 2147483647 77 | 78 | 79 | 80 | 81 | 82 | 83 | 15 84 | 2 85 | {{335, 390}, {318, 146}} 86 | 1954021376 87 | About 88 | NSWindow 89 | 90 | 91 | 92 | 256 93 | 94 | YES 95 | 96 | 97 | 268 98 | {{62, 31}, {194, 85}} 99 | 100 | 101 | YES 102 | 103 | 67239424 104 | 272891904 105 | This is a MacRuby example app to show you how easy it is to create a simple application that sits in your sytem menubar. 106 | 107 | LucidaGrande 108 | 13 109 | 16 110 | 111 | 112 | 113 | 6 114 | System 115 | controlColor 116 | 117 | 3 118 | MC42NjY2NjY2NjY3AA 119 | 120 | 121 | 122 | 6 123 | System 124 | controlTextColor 125 | 126 | 3 127 | MAA 128 | 129 | 130 | 131 | 132 | 133 | {{7, 11}, {318, 146}} 134 | 135 | 136 | 137 | {{0, 0}, {1440, 878}} 138 | {1e+13, 1e+13} 139 | 140 | 141 | AppDelegate 142 | 143 | 144 | NSFontManager 145 | 146 | 147 | 148 | 268 149 | {104, 60} 150 | 151 | 152 | MyCustomView 153 | 154 | 155 | 156 | 157 | YES 158 | 159 | 160 | delegate 161 | 162 | 163 | 164 | 495 165 | 166 | 167 | 168 | window 169 | 170 | 171 | 172 | 532 173 | 174 | 175 | 176 | terminate: 177 | 178 | 179 | 180 | 539 181 | 182 | 183 | 184 | makeKeyAndOrderFront: 185 | 186 | 187 | 188 | 540 189 | 190 | 191 | 192 | view 193 | 194 | 195 | 196 | 543 197 | 198 | 199 | 200 | 201 | YES 202 | 203 | 0 204 | 205 | 206 | 207 | 208 | 209 | -2 210 | 211 | 212 | File's Owner 213 | 214 | 215 | -1 216 | 217 | 218 | First Responder 219 | 220 | 221 | -3 222 | 223 | 224 | Application 225 | 226 | 227 | 371 228 | 229 | 230 | YES 231 | 232 | 233 | 234 | 235 | 236 | 372 237 | 238 | 239 | YES 240 | 241 | 242 | 243 | 244 | 245 | 420 246 | 247 | 248 | 249 | 250 | 494 251 | 252 | 253 | 254 | 255 | 533 256 | 257 | 258 | YES 259 | 260 | 261 | 262 | 263 | 264 | 534 265 | 266 | 267 | 268 | 269 | 535 270 | 271 | 272 | YES 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 536 281 | 282 | 283 | 284 | 285 | 537 286 | 287 | 288 | 289 | 290 | 541 291 | 292 | 293 | 294 | 295 | 542 296 | 297 | 298 | 299 | 300 | 301 | 302 | YES 303 | 304 | YES 305 | -1.IBPluginDependency 306 | -2.IBPluginDependency 307 | -3.IBPluginDependency 308 | 371.IBEditorWindowLastContentRect 309 | 371.IBPluginDependency 310 | 371.IBWindowTemplateEditedContentRect 311 | 371.NSWindowTemplate.visibleAtLaunch 312 | 371.editorWindowContentRectSynchronizationRect 313 | 372.IBPluginDependency 314 | 420.IBPluginDependency 315 | 494.IBPluginDependency 316 | 533.IBPluginDependency 317 | 534.IBPluginDependency 318 | 535.CustomClassName 319 | 535.IBPluginDependency 320 | 536.IBPluginDependency 321 | 537.IBPluginDependency 322 | 541.IBPluginDependency 323 | 542.IBPluginDependency 324 | 325 | 326 | YES 327 | com.apple.InterfaceBuilder.CocoaPlugin 328 | com.apple.InterfaceBuilder.CocoaPlugin 329 | com.apple.InterfaceBuilder.CocoaPlugin 330 | {{380, 496}, {480, 360}} 331 | com.apple.InterfaceBuilder.CocoaPlugin 332 | {{380, 496}, {480, 360}} 333 | 334 | {{33, 99}, {480, 360}} 335 | com.apple.InterfaceBuilder.CocoaPlugin 336 | com.apple.InterfaceBuilder.CocoaPlugin 337 | com.apple.InterfaceBuilder.CocoaPlugin 338 | com.apple.InterfaceBuilder.CocoaPlugin 339 | com.apple.InterfaceBuilder.CocoaPlugin 340 | MyStatusMenu 341 | com.apple.InterfaceBuilder.CocoaPlugin 342 | com.apple.InterfaceBuilder.CocoaPlugin 343 | com.apple.InterfaceBuilder.CocoaPlugin 344 | com.apple.InterfaceBuilder.CocoaPlugin 345 | com.apple.InterfaceBuilder.CocoaPlugin 346 | 347 | 348 | 349 | YES 350 | 351 | 352 | 353 | 354 | 355 | YES 356 | 357 | 358 | 359 | 360 | 543 361 | 362 | 363 | 0 364 | IBCocoaFramework 365 | 366 | com.apple.InterfaceBuilder.CocoaPlugin.macosx 367 | 368 | 369 | 370 | com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 371 | 372 | 373 | YES 374 | 3 375 | 376 | YES 377 | 378 | YES 379 | NSMenuCheckmark 380 | NSMenuMixedState 381 | 382 | 383 | YES 384 | {9, 8} 385 | {7, 2} 386 | 387 | 388 | 389 | 390 | --------------------------------------------------------------------------------