File: programming/cocoa/Filie.zip/Filie/Filie/UKFileInfoPanel.m


/* =============================================================================
    PROJECT:    Filie
    FILE:       UKFileInfoPanel.m
    
    COPYRIGHT:  (c) 2004 by M. Uli Kusterer, all rights reserved.
    
    AUTHORS:    M. Uli Kusterer - UK
    
    LICENSES:   GNU GPL
    
    REVISIONS:
        2004-12-09  UK  Created.
   ========================================================================== */
 
// -----------------------------------------------------------------------------
//  Headers:
// -----------------------------------------------------------------------------
 
#import "UKFileInfoPanel.h"
#import "UKFileInfoMixedValueIndicator.h"
#import "UKDirectoryEnumerator.h"
#import "NSNumber+BytesString.h"
// -----------------------------------------------------------------------------
//  initWithDelegates:
//      Create a new info panel. This takes an array of delegates as its
//      parameter. Each of the delegates is asked for its attributes and
//      notified of changes as needed.
//
//      As with all delegates, this object does not retain its delegates. So
//      make sure they sign off from this object before they go away.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//  setDelegates:
//      Change the list of delegates for this object. The delegate is not
//      retained.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//  delegates:
//      Returns an array of all the delegates registered with this object.
//      The array retains this object, even though this object's internal
//      list usually doesn't.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//  fileAttributes:
//      Returns the dictionary of file attributes this panel is currently
//      displaying.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//  setFileAttributes:
//      Replaces the dictionary of file attributes this panel is currently
//      displaying. You usually don't want to use this if there's more than
//      one delegate for this panel.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//  addFileAttributes:
//      Adds all attributes from the specified dictionary to the dictionary of
//      attributes this object is displaying. If an attribute is not the same
//      as that in the dictionary, it is replaced with a mixed value indicator
//      object.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// TODO: Load the proper indicator based on the key, so we can offer placeholder strings etc.
                //  Maybe load values from a .plist?
// TODO: Load the proper indicator based on the key, so we can offer placeholder strings etc.
            //  Maybe load values from a .plist?
// -----------------------------------------------------------------------------
//  revert:
//      Clear our internal list of file attributes and refresh it by asking
//      the delegates to provide their attributes again.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// Make GUI reflect values:
    [attributesTable reloadData];
    
        // Type:
// Creator:
// Size:
"%@ (%@ used)"// Label:
// -----------------------------------------------------------------------------
//  ok:
//      Tell all delegates to apply the new file attributes to their files.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//  makeDelegatesResign:
//      Tell all delegates to abort their little love affair with us. This is
//      usually called because the user closed our window and we want this
//      window to go away now.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// Keep a copy so we're immune to changes caused by delegates to our list.
// Make sure that we don't go away until last one has signed off.
// Necessary so windowDidClose can finish the notification without a crash.
}
 
 
// -----------------------------------------------------------------------------
//  windowDidClose:
//      Our window's been closed. Make all delegates resign so this object can
//      go away too.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// Retains and autoreleases this object so it doesn't go away until notification has finished.
}
 
// ---------------------------------------------------------- 
// - isMultipleSelection:
// ---------------------------------------------------------- 
// ---------------------------------------------------------- 
// - setIsMultipleSelection:
// ---------------------------------------------------------- 
// -----------------------------------------------------------------------------
//  addDelegate:
//      Add a new delegate to our list of delegates. Delegates are *not*
//      retained by this object.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//  removeDelegate:
//      Remove a delegate from our list of delegates.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//  reopen:
//      Re-open this inspector (i.e. it was already open, but the user requested
//      it a second time). This reloads the window's data and brings the window
//      to the front.
//
//  REVISIONS:
//      2004-12-22  UK  Documented.
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//  Table view data source methods: (for debugging, mainly)
// -----------------------------------------------------------------------------
"key"

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.