Changeset 463
- Timestamp:
- 03/05/2008 03:52:04 (6 months ago)
- Location:
- trunk
- Files:
-
- 6 modified
-
lib/shoes.rb (modified) (1 diff)
-
platform/mac/Info.plist (modified) (1 diff)
-
shoes/app.c (modified) (5 diffs)
-
shoes/app.h (modified) (1 diff)
-
shoes/ruby.c (modified) (1 diff)
-
shoes/world.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/shoes.rb
r461 r463 177 177 178 178 def self.args! 179 if ARGV.empty? 180 fname = ask_open_file 181 if fname 182 ARGV << fname 183 else 184 return false 179 if PLATFORM !~ /darwin/ 180 if ARGV.empty? 181 fname = ask_open_file 182 if fname 183 ARGV << fname 184 else 185 return false 186 end 185 187 end 186 188 end -
trunk/platform/mac/Info.plist
r447 r463 32 32 <key>CFBundleTypeIconFile</key> 33 33 <string>Shoes.icns</string> 34 <key>CFBundleTypeMIMETypes</key> 35 <array> 36 <string>application/x-shy</string> 37 </array> 34 38 <key>CFBundleTypeName</key> 35 39 <string>Shoes Package</string> 36 40 <key>CFBundleTypeRole</key> 37 41 <string>Viewer</string> 42 <key>LSIsAppleDefaultForType</key> 43 <true/> 38 44 </dict> 39 45 <dict> -
trunk/shoes/app.c
r462 r463 68 68 rb_ary_push(shoes_world->apps, app); 69 69 return app; 70 } 71 72 VALUE 73 shoes_apps_get(VALUE self) 74 { 75 return rb_ary_dup(shoes_world->apps); 70 76 } 71 77 … … 737 743 long numberOFiles; 738 744 FSRef fr; 739 char _path[SHOES_BUFSIZE] , bootup[SHOES_BUFSIZE];745 char _path[SHOES_BUFSIZE]; 740 746 741 747 if (!(err = AEGetParamDesc(appleEvt, keyDirectObject, typeAEList, &fileDesc))) … … 751 757 { 752 758 FSRefMakePath(&fr, &_path, SHOES_BUFSIZE); 753 shoes_load(RSTRING(_path)); 759 printf("Opening %s\n", _path); 760 shoes_load(_path); 754 761 } 755 762 } … … 766 773 QuitApplicationEventLoop(); 767 774 return 128; 775 } 776 777 void 778 shoes_app_quartz_install() 779 { 780 AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, 781 NewAEEventHandlerUPP(shoes_app_quartz_quit), 0, false); 782 783 AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, 784 NewAEEventHandlerUPP(shoes_app_quartz_open), 0, false); 768 785 } 769 786 … … 1566 1583 InitCursor(); 1567 1584 1568 err = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication,1569 NewAEEventHandlerUPP(shoes_app_quartz_quit), 0, false);1570 if (err != noErr)1571 {1572 QUIT("Out of memory.", 0);1573 }1574 1575 err = AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments,1576 NewAEEventHandlerUPP(shoes_app_quartz_open), 0, false);1577 if (err != noErr)1578 {1579 QUIT("Out of memory.", 0);1580 }1581 1582 1585 gTestWindowEventProc = NewEventHandlerUPP(shoes_app_quartz_handler); 1583 1586 if (gTestWindowEventProc == NULL) -
trunk/shoes/app.h
r457 r463 49 49 VALUE shoes_app_alloc(VALUE); 50 50 VALUE shoes_app_new(VALUE); 51 VALUE shoes_apps_get(VALUE); 51 52 #ifdef SHOES_WIN32 52 53 shoes_code shoes_classex_init(); 54 #endif 55 #ifdef SHOES_QUARTZ 56 void shoes_app_quartz_install(); 53 57 #endif 54 58 shoes_code shoes_app_start(VALUE, char *); -
trunk/shoes/ruby.c
r461 r463 3884 3884 ); 3885 3885 3886 rb_define_singleton_method(cShoes, "APPS", CASTHOOK(shoes_apps_get), 0); 3886 3887 rb_define_singleton_method(cShoes, "app", CASTHOOK(shoes_app_main), -1); 3887 3888 rb_define_singleton_method(cShoes, "p", CASTHOOK(shoes_p), 1); -
trunk/shoes/world.c
r459 r463 52 52 shoes_ruby_init(); 53 53 #ifdef SHOES_QUARTZ 54 shoes_app_quartz_install(); 54 55 shoes_slot_quartz_register(); 55 56 #endif
