The Mac OS 9 Lives Forum is dedicated to...Installing, Maintaining, and Extending the functionality of Mac OS 9Each Section can be Expanded or Compressed by clicking the Title of the sectionThis will shrink the Forum to display Only the Sections you want
At the top of a window, there's an area which is wasted with not so useful information like "10 items, 59.1 MB available". I want to use this area better. This is a good place for buttons and menus. I want here a menu for changing the view options. A menu for the path has to be here instead of in the window title. I want a button for opening the super folder. What else do you want here?
What you are suggesting is starting to go away from the actual design of OS 9
QuoteWhat you are suggesting is starting to go away from the actual design of OS 9i see what you mean. maybe there should not be too much removed and all new features should be at least opt-out - like you said, by disabling certain of the ++ features via finder prefs.
one-click stuff/unstuff and zip/unzip would also be fun to have in the window top bar.eventually it can just be taken from the stuff it menu (which should be apple event i think)
If it fits the name of the current Volume would be greatI am sure the full path would be too long.
Another option is to give your volume a label color and then draw the windows of this volume in this color
Abstract of INFO-MAC archived encoded Mac binary file 'gui/screen-grid-10.hqx' Uploaded 08/04/2000 193200 bytesFrom: Mamoru Misono <mamo@sonosoft.com>Subject: ScreenGrid 1.0ScreenGrid is a desktop-utility that makes operations todrag and grow windows comfortable. When you drag or growa window, ScreenGrid helps you to + snap the window to screen edges. + snap the window to virtual grid on screens. + snap the window to window edges. + layout windows with certain offsets. + limit the movement of the window horizontally, vertically and 45 degrees.System Requirement PPC or 68K Macintosh System 7 or laterScreenGrid is $7 shareware.
There is already such an extension but I didn't try it yet:http://afturgurluk.org/mirrors/macintosh/archive.info-mac.org/gui/screen-grid-10.hqx
(This file must be converted with BinHex 4.0)
ScreenGrid is distributed as shareware. If you would like to continue using ScreenGrid, please register and support shareware. There is no functional restriction on unregistered copy. However unregistered copy will sometimes ask you to register when starting up. Registration fee for single user license of ScreenGrid is $7(800 yen).
I'm in favor of "Long Unicode Finder" because it describes best what it does.
//========================================// File: Desktop.h//========================================#pragma onceclass Desktop{public: // Global functions. static Bool Init_class(); static Bool Claim(OSType creator, RgnHandle claimRgn, UInt32 &ref); static Bool ClaimRest(OSType creator, UInt32 &ref); static Bool Release(OSType creator); static Bool ReleaseRest(); static Bool Check(); static Bool CheckPart(UInt32 ref, bool &needsUpdate); static Bool BeginUpdate(UInt32 ref); static Bool EndUpdate(UInt32 ref); static Bool Refresh(UInt32 ref); // Forbidden.private: Desktop();};
//========================================// File: Ball.cp//========================================#include "Ball.h"#include "BallApp.h"int main(){ SetDebugThrow_(debugAction_Alert); SetDebugSignal_(debugAction_Alert); InitializeHeap(3); UQDGlobals::InitializeToolbox(); new LGrowZone(20000); GuiError::Init_class(); #ifdef __DEBUG__ Error::Show("\pDebug version"); #endif if (!Desktop::Init_class()) { Return_0("\pInit Desktop class fails"); } BallApp app; app.Run(); return 0;}
//========================================// File: BallApp.h//========================================#pragma onceclass BallApp : public LApplication{private: // Derivation. typedef LApplication base; // Global data. static const OSType creator= #ifdef __DEBUG__ 'ball' #else 'Ball' #endif ; // Member data. Rect m_bounds; RgnHandle m_claimRgn; UInt32 m_ref; // Construction.public: BallApp(); // Destruction. virtual ~BallApp(); // Forbidden.private: BallApp(const BallApp &original); void operator=(const BallApp &original); // LApplication.public: virtual void ProcessNextEvent();protected: virtual void Initialize(); // Manipulators.private: Bool HandleDesktop(); void Draw();};
//========================================// File: BallApp.cp//========================================#include "BallApp.h"BallApp::BallApp() : m_ref(0){ ::SetRect(&m_bounds, 100, 100, 200, 200); m_claimRgn=::NewRgn(); ::OpenRgn(); ::FrameOval(&m_bounds); ::CloseRgn(m_claimRgn);}BallApp::~BallApp(){ if (m_ref) { if (!Desktop::Release(creator)) { Return("\pRelease fails"); } } ::DisposeRgn(m_claimRgn);}void BallApp::ProcessNextEvent(){ EventRecord macEvent; if (IsOnDuty()) { UEventMgr::GetMouseAndModifiers(macEvent); AdjustCursor(macEvent); } SetUpdateCommandStatus(false); Boolean gotEvent=::WaitNextEvent(everyEvent, &macEvent, mSleepTime, mMouseRgn); if (!HandleDesktop()) { EXIT("\pHandle desktop fails"); } if (LAttachable::ExecuteAttachments(msg_Event, &macEvent)) { if (gotEvent) { DispatchEvent(macEvent); } else { UseIdleTime(macEvent); } } LPeriodical::DevoteTimeToRepeaters(macEvent); if (IsOnDuty() and GetUpdateCommandStatus()) { UpdateMenus(); }}void BallApp::Initialize(){ // Rem: m_claimRgn will be copied to system memory, // but I keep it around just in case. // For example, I might want to claim another area // minus this one. if (!Desktop::Claim(creator, m_claimRgn, m_ref)) { EXIT("\pClaim fails"); }}Bool BallApp::HandleDesktop(){ if (!Desktop::Check()) { Return_false("\pCheck fails"); } bool needsUpdate; if (!Desktop::CheckPart(m_ref, needsUpdate)) { Return_false("\pCheck part fails"); } if (!needsUpdate) { return True; } if (!Desktop::BeginUpdate(m_ref)) { Return_false("\pBegin update fails"); } Draw(); if (!Desktop::EndUpdate(m_ref)) { Return_false("\pEnd update fails"); } return True;}void BallApp::Draw(){ ::RGBForeColor(&Color_Black); ::RGBBackColor(&Color_White); ::EraseRgn(m_claimRgn); ::FrameRgn(m_claimRgn);}
What do you think of this idea:Hide the contents of the window of a folder that is being changed until there are x seconds of no change.
The colors are wrong. Red and blue are too light and green is much too dark. If I make a screenshot and I watch it on a Windows computer then the colors are correct. How is that possible?
A lot of the stock Finder's most annoying usability shortcomings
the stock Finder's "you might tell it to quit, but you can't totally stop it from returning" thing is due in no small part to it being identified during boot as the first program the system is to run.
which is why it automatically resurrects whenever nothing else is running.
Reserving a 64-byte Pascal string for the filename would eat a full eighth of a disk block all by itself, and how many people really used names that long?
the 31-byte HFS maximum
Long story short... A hypothetically better Finder's design _must_ allow for arbitrary data it gets from elsewhere to suddenly turn out to be larger in future.
dont forget that those long names will only be readable on OS9 machines which also have that new finder,
Text encoding 0: base=0 variant=1 format=0Text encoding 1: base=0 variant=2 format=0Text encoding 2: base=1 variant=0 format=0Text encoding 3: base=1 variant=1 format=0Text encoding 4: base=1 variant=2 format=0Text encoding 5: base=1 variant=3 format=0Text encoding 6: base=1 variant=4 format=0Text encoding 7: base=1 variant=5 format=0Text encoding 8: base=2 variant=0 format=0Text encoding 9: base=3 variant=0 format=0Text encoding 10: base=4 variant=0 format=0Text encoding 11: base=4 variant=1 format=0Text encoding 12: base=4 variant=2 format=0Text encoding 13: base=4 variant=3 format=0Text encoding 14: base=5 variant=0 format=0Text encoding 15: base=5 variant=1 format=0Text encoding 16: base=6 variant=0 format=0Text encoding 17: base=7 variant=1 format=0Text encoding 18: base=7 variant=2 format=0Text encoding 19: base=7 variant=3 format=0Text encoding 20: base=9 variant=0 format=0Text encoding 21: base=10 variant=0 format=0Text encoding 22: base=11 variant=0 format=0Text encoding 23: base=21 variant=0 format=0Text encoding 24: base=25 variant=0 format=0Text encoding 25: base=26 variant=0 format=0Text encoding 26: base=29 variant=0 format=0Text encoding 27: base=33 variant=0 format=0Text encoding 28: base=34 variant=0 format=0Text encoding 29: base=35 variant=0 format=0Text encoding 30: base=36 variant=1 format=0Text encoding 31: base=36 variant=2 format=0Text encoding 32: base=37 variant=2 format=0Text encoding 33: base=37 variant=3 format=0Text encoding 34: base=37 variant=4 format=0Text encoding 35: base=37 variant=5 format=0Text encoding 36: base=38 variant=1 format=0Text encoding 37: base=38 variant=2 format=0Text encoding 38: base=41 variant=0 format=0Text encoding 39: base=140 variant=0 format=0Text encoding 40: base=140 variant=1 format=0Text encoding 41: base=252 variant=1 format=0Text encoding 42: base=252 variant=2 format=0Text encoding 43: base=257 variant=0 format=0Text encoding 44: base=257 variant=0 format=1Text encoding 45: base=257 variant=0 format=2Text encoding 46: base=259 variant=0 format=0Text encoding 47: base=259 variant=0 format=1Text encoding 48: base=259 variant=0 format=2Text encoding 49: base=259 variant=2 format=0Text encoding 50: base=260 variant=0 format=0Text encoding 51: base=260 variant=0 format=1Text encoding 52: base=260 variant=0 format=2Text encoding 53: base=260 variant=2 format=0Text encoding 54: base=513 variant=0 format=0Text encoding 55: base=514 variant=0 format=0Text encoding 56: base=515 variant=0 format=0Text encoding 57: base=516 variant=0 format=0Text encoding 58: base=517 variant=0 format=0Text encoding 59: base=518 variant=0 format=0Text encoding 60: base=519 variant=0 format=0Text encoding 61: base=520 variant=0 format=0Text encoding 62: base=521 variant=0 format=0Text encoding 63: base=527 variant=0 format=0Text encoding 64: base=1024 variant=0 format=0Text encoding 65: base=1040 variant=0 format=0Text encoding 66: base=1049 variant=0 format=0Text encoding 67: base=1053 variant=0 format=0Text encoding 68: base=1056 variant=0 format=0Text encoding 69: base=1057 variant=0 format=0Text encoding 70: base=1059 variant=0 format=0Text encoding 71: base=1280 variant=0 format=0Text encoding 72: base=1281 variant=0 format=0Text encoding 73: base=1282 variant=0 format=0Text encoding 74: base=1283 variant=0 format=0Text encoding 75: base=1284 variant=0 format=0Text encoding 76: base=1285 variant=0 format=0Text encoding 77: base=1286 variant=0 format=0Text encoding 78: base=1287 variant=0 format=0Text encoding 79: base=1288 variant=0 format=0Text encoding 80: base=1536 variant=0 format=0Text encoding 81: base=1570 variant=0 format=0Text encoding 82: base=1584 variant=0 format=0Text encoding 83: base=1585 variant=0 format=0Text encoding 84: base=1600 variant=0 format=0Text encoding 85: base=2080 variant=0 format=0Text encoding 86: base=2096 variant=0 format=0Text encoding 87: base=2112 variant=0 format=0Text encoding 88: base=2336 variant=0 format=0Text encoding 89: base=2352 variant=0 format=0Text encoding 90: base=2353 variant=0 format=0Text encoding 91: base=2368 variant=0 format=0Text encoding 92: base=2561 variant=0 format=0Text encoding 93: base=2562 variant=0 format=0Text encoding 94: base=2563 variant=0 format=0Text encoding 95: base=2564 variant=2 format=0Text encoding 96: base=2564 variant=6 format=0Text encoding 97: base=2564 variant=11 format=0Text encoding 98: base=2564 variant=14 format=0Text encoding 99: base=2565 variant=0 format=0Text encoding 100: base=2817 variant=0 format=0Text encoding 101: base=3074 variant=0 format=0Text encoding 102: base=4095 variant=0 format=0
Text encoding 43 -> 44Text encoding 44 -> 43Text encoding 43 -> 45Text encoding 45 -> 43Text encoding 46 -> 47Text encoding 47 -> 46Text encoding 46 -> 48Text encoding 48 -> 46Text encoding 46 -> 49Text encoding 48 -> 49
(require-library "compat.ss")(load "Data1.ss")(load "Data2.ss")(load "Data3.ss")(load "Data4.ss")(define conversie (class object% () (private [boom '()] [unicode #f]) (public [voegtoe (lambda (x lijst) (if (null? lijst) (set! unicode x) (letrec ((eerste (car lijst)) (rest (cdr lijst)) (gevonden (assoc eerste boom))) (if gevonden (send (cadr gevonden) voegtoe x rest) (let ((nieuw (make-object conversie))) (begin (set! boom (cons (list eerste nieuw) boom)) (send nieuw voegtoe x rest)))))))] [zoek (lambda (lijst) (if (null? lijst) unicode (letrec ((eerste (car lijst)) (rest (cdr lijst)) (gevonden (assoc eerste boom))) (if gevonden (send (cadr gevonden) zoek rest) #f))))] [tel (lambda () (define (som boom) (if (null? boom) 0 (let ((eerste (car boom)) (rest (cdr boom))) (+ (send (cadr eerste) tel) (som rest))))) (if (null? boom) 0 (+ 1 (som boom))))] [sorteer (lambda () (define (kleinerdan? x y) (< (car x) (car y))) (if (null? boom) 'ok (set! boom (sort kleinerdan? boom))))] [schrijf (lambda () (define (vertaal paar) (list (car paar) (send (cadr paar) schrijf))) (if (null? boom) (number->string unicode) (map vertaal boom)))]) (sequence (super-init))))(define c (make-object conversie))(define (voegtoe x lijst) (send c voegtoe x lijst))(define (zoek lijst) (send c zoek lijst))(define (tel) (send c tel))(define (sorteer) (send c sorteer))(define (schrijf) (send c schrijf))(define (voegdatatoe data) (define (voeg-x-en-lijst-toe r) (voegtoe (car r) (cdr r))) (for-each voeg-x-en-lijst-toe data))(voegdatatoe data1)(voegdatatoe data2)(voegdatatoe data3)(voegdatatoe data4)(zoek '(180)) ; -> 8189(zoek '(105 769)) ; -> 146(zoek '(4362 4468 4532)) ; -> 50457(zoek '(919 837 788 769)) ; -> 8093(tel) ; -> 595(sorteer)(schrijf)
Bool BOOL_MakeTables(){ TextEncoding const plainTextEncoding= ::CreateTextEncoding(kTextEncodingUnicodeV2_0, kUnicodeNoSubset, kUnicode16BitFormat); if (!plainTextEncoding) { ReturnFalse("\pCreateTextEncoding fails"); } TextEncoding const hfsTextEncoding= ::CreateTextEncoding(kTextEncodingUnicodeV2_0, kUnicodeCanonicalDecompVariant, kUnicode16BitFormat); if (!hfsTextEncoding) { ReturnFalse("\pCreateTextEncoding fails"); } TECObjectRef plainToHFS; OSStatus status=::TECCreateConverter(&plainToHFS, plainTextEncoding, hfsTextEncoding); if (status) { ReturnFalse_status("\pTECCreateConverter fails",status); } const Bool ok=BOOL_MakeTables(plainToHFS); status=::TECDisposeConverter(plainToHFS); if (status) { ReturnFalse("\pTECDisposeConverter fails"); } if (!ok) { ReturnFalse("\pMakeTables fails"); } return True;}
#include "Make4Tables.h"#include "PStr.cp.h"//----------------------------------------// Implementation details.//----------------------------------------Bool BOOL_MakeTable(TECObjectRef plainToHFS, SInt32 length);Bool BOOL_MakeTable(TECObjectRef plainToHFS, SInt32 length, BigTextFileWriter &cpp);Bool BOOL_MakeTable(TECObjectRef plainToHFS, SInt32 length, BigTextFileWriter &cpp, BigTextFileWriter &scheme);Bool BOOL_ShowCpp(UniChar plain, const HFSUniStr255 &u, BigTextFileWriter &cpp);Bool BOOL_ShowScheme(UniChar plain, const HFSUniStr255 &u, BigTextFileWriter &scheme);//----------------------------------------Bool BOOL_Make4Tables(TECObjectRef const plainToHFS){ for (SInt32 length=1;length<=4;length++) { if (!BOOL_MakeTable(plainToHFS, length)) { ReturnFalse("\pMakeTable fails"); } } return True;}//----------------------------------------// Implementation details.//----------------------------------------Bool BOOL_MakeTable(TECObjectRef const plainToHFS, const SInt32 length){ PStr<31> path; SpellReadable(path,"\p:Output:Data"); SpellNumber(path,length); SpellReadable(path,"\p.cp"); FSSpec spec; OSErr err=::FSMakeFSSpec(0, 0, path, &spec); if (err) { if (err!=fnfErr) { ReturnFalse_err("\pFSpCreate fails",err); } err=::FSpCreate(&spec, 'R*ch', 'TEXT', smSystemScript); if (err) { ReturnFalse_err("\pFSpCreate fails",err); } } BigMacFileWriter cpp; if (!cpp.BOOL_Open(spec)) { ReturnFalse("\pOpen fails"); } const Bool ok=BOOL_MakeTable(plainToHFS, length, cpp); if (!cpp.BOOL_Close()) { ReturnFalse("\pClose fails"); } if (!ok) { ReturnFalse("\pMakeTable fails"); } return True;}Bool BOOL_MakeTable(TECObjectRef const plainToHFS, const SInt32 length, BigTextFileWriter &cpp){ PStr<31> path; SpellReadable(path,"\p:Output:Data"); SpellNumber(path,length); SpellReadable(path,"\p.ss"); FSSpec spec; OSErr err=::FSMakeFSSpec(0, 0, path, &spec); if (err) { if (err!=fnfErr) { ReturnFalse_err("\pFSpCreate fails",err); } err=::FSpCreate(&spec, 'R*ch', 'TEXT', smSystemScript); if (err) { ReturnFalse_err("\pFSpCreate fails",err); } } BigMacFileWriter scheme; if (!scheme.BOOL_Open(spec)) { ReturnFalse("\pOpen fails"); } const Bool ok=BOOL_MakeTable(plainToHFS, length, cpp, scheme); if (!scheme.BOOL_Close()) { ReturnFalse("\pClose fails"); } if (!ok) { ReturnFalse("\pMakeTable fails"); } return True;}Bool BOOL_MakeTable(TECObjectRef const plainToHFS, const SInt32 length, BigTextFileWriter &cpp, BigTextFileWriter &scheme){ SInt32 count=0; for (SInt32 i=0;i<65536;i++) { const UniChar plain=static_cast<UniChar>(i); HFSUniStr255 hfs; ByteCount actualInputLength; ByteCount actualOutputLength; const OSStatus status=::TECConvertText(plainToHFS, reinterpret_cast<ConstTextPtr>(&plain), 2, &actualInputLength, reinterpret_cast<TextPtr>(hfs.unicode), 510, &actualOutputLength); if (status) { ReturnFalse_status("\pTECConvertText fails",status); } hfs.length=static_cast<UInt16>(actualOutputLength>>1); if (hfs.length==length) { if (not ((length==1) and (*hfs.unicode==plain))) { count++; if (!BOOL_ShowCpp(plain, hfs, cpp)) { ReturnFalse("\pShowCpp fails"); } if (!BOOL_ShowScheme(plain, hfs, scheme)) { ReturnFalse("\pShowScheme fails"); } } } } cout << "Count for length "; cout << length; cout << " is "; cout << count; cout << "."; cout << endl; return True;}Bool BOOL_ShowCpp(const UniChar plain, const HFSUniStr255 &hfs, BigTextFileWriter &cpp){ SpellReadable(cpp,"\p{"); SpellNumber(cpp,plain); for (SInt32 i=0;i<hfs.length;i++) { SpellReadable(cpp,"\p,"); SpellNumber(cpp,hfs.unicode[i]); } SpellReadable(cpp,"\p},"); StartANewLine(cpp); return True;}Bool BOOL_ShowScheme(const UniChar plain, const HFSUniStr255 &hfs, BigTextFileWriter &scheme){ SpellReadable(scheme,"\p("); SpellNumber(scheme,plain); for (SInt32 i=0;i<hfs.length;i++) { SpellReadable(scheme,"\p "); SpellNumber(scheme,hfs.unicode[i]); } SpellReadable(scheme,"\p)"); StartANewLine(scheme); return True;}
(require-library "compat.ss")(define conversion (class object% () (private [tree '()] [unicode #f]) (public [add (lambda (plain hfs) (if (null? hfs) (set! unicode plain) (letrec ((first (car hfs)) (rest (cdr hfs)) (found (assv first tree))) (if found (send (cadr found) add plain rest) (let ((new (make-object conversion))) (begin (set! tree (cons (list first new) tree)) (send new add plain rest)))))))] [search (lambda (hfs) (if (null? hfs) unicode (letrec ((first (car hfs)) (rest (cdr hfs)) (found (assoc first tree))) (if found (send (cadr found) search rest) #f))))] [count (lambda () (define (sum tree) (if (null? tree) 0 (let ((first (car tree)) (rest (cdr tree))) (+ (send (cadr first) count) (sum rest))))) (if (null? tree) 0 (+ 1 (sum tree))))] [merge-sort (lambda () (define (merge-sort-tree tree) (define (merge-sort-sub x) (send (cadr x) merge-sort)) (define (lt? x y) (< (car x) (car y))) (begin (for-each merge-sort-sub tree) (sort lt? tree))) (if (null? tree) 'ok (set! tree (merge-sort-tree tree))))] [get-tree (lambda () (define (translate pair) (list (car pair) (send (cadr pair) get-tree))) (if (null? tree) (number->string unicode) (let ((translated (map translate tree))) (if unicode (cons (number->string unicode) translated) translated))))] [display-tree-lengths (lambda () (define (translate pair) (send (cadr pair) display-tree-lengths)) (if (not (null? tree)) (begin (display (length tree)) (newline) (for-each translate tree))))]) (sequence (super-init))))(define c (make-object conversion))(define (add plain hfs) (send c add plain hfs))(define (search hfs) (send c search hfs))(define (count) (send c count))(define (merge-sort) (send c merge-sort))(define (get-tree) (send c get-tree))(define (display-tree-lengths) (send c display-tree-lengths))(define (add-data data) (define (add-plain-and-hfs r) (add (car r) (cdr r))) (for-each add-plain-and-hfs data))(define (write-binary vpad b) (define dest-port (open-output-file vpad 'truncate/replace)) (define (write-n1 n) (write-char (integer->char n) dest-port)) (define (write-n2 n) (define hi (quotient n 256)) (define lo (remainder n 256)) (write-n1 hi) (write-n1 lo)) (define (write-elements t) (begin (write-n2 (length t)) (for-each write-conversion t))) (define (write-table t) (define first (car t)) (define rest (cdr t)) (if (string? first) (begin (write-n1 0) (write-n2 (string->number first)) (write-elements rest)) (begin (write-n1 1) (write-elements t)))) (define (write-conversion c) (define hfs (car c)) (define x (cadr c)) (begin (write-n2 hfs) (if (string? x) (begin (write-n1 0) (write-n2 (string->number x))) (begin (write-n1 1) (write-table x))))) (begin (for-each write-conversion b) (close-output-port dest-port)))(define (write-scheme vpad x) (define dest-port (open-output-file vpad 'truncate/replace)) (begin (write x dest-port) (close-output-port dest-port)))(load "Data1.ss")(load "Data2.ss")(load "Data3.ss")(load "Data4.ss")(add-data data1)(add-data data2)(add-data data3)(add-data data4)(search '(180)) ; => 8189(search '(105 769)) ; => 146(search '(4362 4468 4532)) ; => 50457(search '(919 837 788 769)) ; => 8093(count) ; => 595(merge-sort)(define b (get-tree))(write-binary "Tree.dat" b)(write-scheme "Tree.ss" b)(display-tree-lengths); =>; root has length 76; 51 times length 1; 24 times length 2; 42 times length 3; 15 times length 4; 6 times length 5; 4 times length 7; 4 times length 9; 19 times length 21; 399 times length 27
#include "MakeIdentityTable.h"//----------------------------------------// Implementation details.//----------------------------------------Bool BOOL_MakeIdentityTable(TECObjectRef plainToHFS, BigBinaryFileWriter &output);//----------------------------------------Bool BOOL_MakeIdentityTable(TECObjectRef const plainToHFS){ FSSpec spec; OSErr err=::FSMakeFSSpec(0, 0, "\p:Output:Identity.dat", &spec); if (err) { if (err!=fnfErr) { ReturnFalse_err("\pFSpCreate fails",err); } err=::FSpCreate(&spec, 'hDmp', 'BINA', smSystemScript); if (err) { ReturnFalse_err("\pFSpCreate fails",err); } } BigBinaryFileWriter output; if (!output.BOOL_Open(spec)) { ReturnFalse("\pOpen fails"); } const Bool ok=BOOL_MakeIdentityTable(plainToHFS, output); if (!output.BOOL_Close()) { ReturnFalse("\pClose fails"); } if (!ok) { ReturnFalse("\pMakeIdentityTable fails"); } return True;}//----------------------------------------// Implementation details.//----------------------------------------Bool BOOL_MakeIdentityTable(TECObjectRef const plainToHFS, BigBinaryFileWriter &output){ for (SInt32 i=0;i<65536;i++) { const UniChar plain=static_cast<UniChar>(i); HFSUniStr255 hfs; ByteCount actualInputLength; ByteCount actualOutputLength; const OSStatus status=::TECConvertText(plainToHFS, reinterpret_cast<ConstTextPtr>(&plain), 2, &actualInputLength, reinterpret_cast<TextPtr>(hfs.unicode), 510, &actualOutputLength); if (status) { ReturnFalse_status("\pTECConvertText fails",status); } hfs.length=static_cast<UInt16>(actualOutputLength>>1); const bool identity=(hfs.length==1) and (*hfs.unicode==plain); WriteBinary(output,identity); } return True;}
59 => 59 => 89463 => 63 => 6553596 => 96 => 8175180 => 180 => 8189183 => 183 => 903198 => 198 => 1236230 => 230 => 1237399 => 399 => 1240415 => 415 => 1256439 => 439 => 1248601 => 601 => 1241629 => 629 => 1257658 => 658 => 1249697 => 697 => 884768 => 768 => 832769 => 769 => 833787 => 787 => 835953 => 953 => 812665534 => 63 => 65535
832 => 768 => 768833 => 769 => 769835 => 787 => 787884 => 697 => 697894 => 59 => 59903 => 183 => 1831236 => 198 => 1981237 => 230 => 2301240 => 399 => 3991241 => 601 => 6011248 => 439 => 4391249 => 658 => 6581256 => 415 => 4151257 => 629 => 6298126 => 953 => 9538175 => 96 => 968189 => 180 => 18065534 => 63 => 6365535 => 63 => 63
Bool BOOL_Test_Unicode_HFS(){ for (z4 i=0;i<65536;i++) { c_n2 unicode1=static_cast<n2>(i); z4 hfs_length; n2 hfs[4]; UnicodeToHFS::Convert(unicode1, hfs_length, hfs); z4 hfs_used; n2 unicode2; if (!HFSToUnicode::CanConvert(hfs_length, hfs, hfs_used, unicode2)) { SpellReadable(cout,"\pThere's no conversion for "); SpellNumber(cout,unicode1); StartANewLine(cout); } if (hfs_used!=hfs_length) { ReturnFalse("\pUnused characters"); } if (unicode2!=unicode1) { SpellNumber(cout,unicode1); SpellReadable(cout,"\p => "); for (z4 j=0;j<hfs_length;j++) { SpellNumber(cout,hfs[j]); SpellReadable(cout,"\p "); } SpellReadable(cout,"\p=> "); SpellNumber(cout,unicode2); StartANewLine(cout); } } return True;}
Bool BOOL_TryEveryHFSFilenameWithLength1(){ FSSpec spec; OSErr err=::FSMakeFSSpec(0, 0, "\pTest:0", &spec); if (err) { ReturnFalse_err("\pFSMakeFSSpec fails",err); } FSRef ref; err=::FSpMakeFSRef(&spec, &ref); if (err) { ReturnFalse_err("\pFSpMakeFSRef fails",err); } for (SInt32 i=0;i<65536;i++) { UniChar unicode[1]; *unicode=static_cast<UniChar>(i); HFSUniStr255 hfs; UnicodeToHFS::Convert(1, unicode, hfs); err=::FSRenameUnicode(&ref, hfs.length, hfs.unicode, kTextEncodingDefaultFormat, nil); if (err) { cout << "Rename as "; cout << i; cout << " returns "; cout << err; cout << '.'; cout << endl; } } return True;}
I wrote a WDEF which can draw Unicode text in the title bar.It's just a working WDEF, no bling bling.Here's a preview with a demo program:http://os923.gangstalkingwiki.com/DesignNewFinder.htm
Part 1: catalog info.Button view:frView 8 = 1frOpenChain = 11000001000000000000000000000000large icons = (frView 3-0 = 0111) and (frFlags 9-5 = 11111) and (frScript 6-3 = 0100)small icons = (frView 3-0 = 0111) and (frFlags 9-5 = 11111) and (frScript 6-3 = 1111)arranged by crDat = (frView 3-0 = 1010) and (frFlags 9-5 = 01010) and (frScript 6-3 = 1100)arranged by kind = (frView 3-0 = 1100) and (frFlags 9-5 = 01100) and (frScript 6-3 = 1100)arranged by label = (frView 3-0 = 1101) and (frFlags 9-5 = 01101) and (frScript 6-3 = 1100)arranged by mdDat = (frView 3-0 = 1001) and (frFlags 9-5 = 01001) and (frScript 6-3 = 1100)arranged by name = (frView 3-0 = 1000) and (frFlags 9-5 = 01000) and (frScript 6-3 = 1100)arranged by size = (frView 3-0 = 1011) and (frFlags 9-5 = 01011) and (frScript 6-3 = 1100)snap to grid = (frView 3-0 = 1110) and (frFlags 9-5 = 01110) and (frScript 6-3 = 1100)========================================Icon view:frView 8 = 1frFlags = 0000001111100000frOpenChain = 11000001000000000000000000000000large icons = (frView 3-0 = 0111) and (frScript 6-4 = 000)small icons = (frView 3-0 = 0111) and (frScript 6-4 = 101) and (frView 6 = 1)arranged by crDat = (frView 3-0 = 1010) and (frScript 6-4 = 100)arranged by kind = (frView 3-0 = 1100) and (frScript 6-4 = 100)arranged by label = (frView 3-0 = 1101) and (frScript 6-4 = 100)arranged by mdDat = (frView 3-0 = 1001) and (frScript 6-4 = 100)arranged by name = (frView 3-0 = 1000) and (frScript 6-4 = 100)arranged by size = (frView 3-0 = 1011) and (frScript 6-4 = 100)snap to grid = (frView 3-0 = 1110) and (frScript 6-4 = 100)========================================List view:frView 2-0 = 111frFlags 9-5 = 10001frOpenChain 31-30 = 11frScript 6 = 1no relative dates = (frFlags 4 = 1)not collapsed = (frFlags 5 = 1)calc sizes = (frFlags 8-6 = 111) and (frOpenChain 29 = 1) and (frScript 3 = 0)normal icons = (frScript 2-1 = 00)large icons = (frScript 2-1 = 10)small icons = (frScript 2-1 = 01)has comments = (frOpenChain 28 = 1)has crDat = (frOpenChain 23 = 1)has kind = (frOpenChain 25 = 1)has label = (frOpenChain 26 = 1)has mdDat = (frOpenChain 22 = 1)has size = (frOpenChain 24 = 1)has version = (frOpenChain 27 = 1)select comments = (frView 11-8 = 0110) and (frOpenChain 21-18 = 0110)select crDat = (frView 11-8 = 0010) and (frOpenChain 21-18 = 1001)select kind = (frView 11-8 = 0101) and (frOpenChain 21-18 = 0011)select label = (frView 11-8 = 0111)select mdDat = (frView 11-8 = 0011) and (frOpenChain 21-18 = 0001)select name = (frView 11-8 = 0010)select size = (frView 11-8 = 0100) and (frOpenChain 21-18 = 0010)select version = (frView 11-8 = 1000) and (frOpenChain 21-18 = 0101)========================================Part 2: 'colm' resource.First:'colm' 0x000A00010000000000000000Then for every column:- 4 character code: 'pnam' = name, 'asmo' = modification date, 'ascd' = creation date, 'phys' = size, 'asty' = type, 'fcrt' = creator, 'kind' = kind, 'labi' = label, 'comt' = comment, 'ver2' = version.- 6 shorts: 1. W6 (width - 6), 2. 0, 3. 0, 4. 0 = standard, 1 = custom, 5. 0, 6. 0.The column data is saved in the same order as the columns.Name is always the first column.If you move a column, then it's saved after the previous column.Type and creator can be displayed by setting short nr 4 to 1.Standard W6: name = 0xD0 = 208 modification date = 0xA8 = 168 creation date = 0xA8 = 168 size = 0x3C = 60 type = 0x36 = 54 creator = 0x36 = 54 kind = 0xA0 = 160 label = 0x36 = 54 comment = 0x118 = 280 version = 0x3C = 60Preferred window zoom height = 42 + 19 * item count.Add 24 * (depth - 1) to the name column width.Depth = depth of the tree of this folder if you remove the folders with no visible items.Preferred window zoom width should be = total column width + 17.but Finder adds 24 * (depth - 1) here too.In other words: there's a bug in Finder.
I won't do the full path. A path in a menu is better.
Found this Japanese Mac OS 9 Fan.
I find this the worst folder to view in Finder.