Commits on Oct 13, 2012
Commits on Oct 4, 2012
  1. Merge pull request #12 from eldenchen/master

    The 'initialKeyView' method did not work correctly.
    shpakovski committed Oct 4, 2012
  2. Fixed a problem causing initialKeyView to not work

    Fixed a problem causing the 'initialKeyView' method to not work when first appearance of content view of window.
    Chen Hongzhi committed Oct 4, 2012
Commits on Sep 12, 2012
  1. Merge pull request #10 from textmate/master

    Adds visibility attribute.
    shpakovski committed Sep 12, 2012
Commits on Aug 27, 2012
Commits on Apr 16, 2012
  1. Improves README.

    shpakovski committed Apr 16, 2012
  2. Removes Demo project.

    It will be hosted in another repository that will have current repository as a git submodule.
    shpakovski committed Apr 16, 2012
  3. Improves Demo project.

    General pane now has a fixed size and Advanced pane is resizable. Also, the Advanced pane adds initialKeyView method to demonstrate tab navigation and default focus.
    shpakovski committed Apr 16, 2012
Commits on Apr 2, 2012
  1. Adds support for flexible spaces in the Toolbar.

    Sometime you may need a flexible space between two icons, for example: General, Advanced, <SPACE>, License. Now you can do this by inserting [NSNull null] into the list of controllers passed to MASPreferencesWindowController.
    shpakovski committed Apr 2, 2012
Commits on Oct 12, 2011
  1. Merge pull request #5 from sorbits/master

    First responder change + animation: removed
    shpakovski committed Oct 12, 2011
  2. Add initialKeyView protocol method.

    This should be implemented if a preferences pane wants to affect which view should be the initial first responder (when switching to the pane).
    I took the method signature from the NSPreferencePane class rather than mimic the signature of NSWindow’s initialFirstResponder — I think the former sounds more appropriate, OTOH the latter is likely what most are familiar with, I have no strong preference either way.
    I also made it a method rather than a property, mainly because it is optional so we need to use ‘respondsToSelector:’ and I feel that is a semantic mismatch to test for the presence of properties. Though I am inclined to changing it to a property, especially since this is likely something you want to connect in Interface Builder.
    sorbits committed Oct 12, 2011
  3. Harmonize coding style.

    I prefer consistency over infiltrating the code with my coding style, so trying to conform to the style which was already used consistently :)
    sorbits committed Oct 12, 2011
  4. Remove animation parameter.

    This is no longer respected since the resize always animate when window is visible.
    sorbits committed Oct 12, 2011
  5. Rework setting first responder.

    The previous code to “reset first responder” would effectively set a random first responder since traversing the subviews hierarchically does not guarantee iterating the views in any particular display order.
    Additionally we only reset the first responder if switching content view results in losing previous first responder — e.g. user could have focus in toolbar when switching content view.
    sorbits committed Oct 12, 2011
Commits on Oct 10, 2011
  1. Merge pull request #4 from sorbits/master

    Refactoring + various changes
    shpakovski committed Oct 10, 2011
  2. Ignore view size from user defaults if view is not sizable.

    This was an issue when a new version of the view had a smaller (non-changeable) size than previously, as the larger size would be stored in user defaults and thus preferred.
    sorbits committed Oct 10, 2011
  3. Refactoring.

    A functional change is that we now commit editing by calling the view controller’s ‘commitEditing’ (rather than change first responder). Additionally we refuse to close window or change selected view controller if committing failed.
    As for the refactoring: The selectedViewController property is now read/write and the logic is contained in setSelectedViewController: which will:
     - Commit changes in current selected view controller, failure results in aborting the property change (changing back the selected tool bar item).
     - Setup the new view controller, resize window, change window title, change selected tool bar item, issue proper notifications, etc.
    sorbits committed Oct 10, 2011
Commits on Oct 9, 2011
  1. Swap window’s content view.

    This is instead of removing all subviews of the content view and adding the new view to the content view, which seems a little arcane.
    sorbits committed Oct 9, 2011
  2. Don’t reset first responder when gaining key.

    This is not standard behavior and I don’t see the advantage of changing it for a preferences window. The user may be in the middle of an edit when switching key view. Going back will then validate + commit or cancel his edit for some view types.
    sorbits committed Oct 9, 2011
  3. Recalculate key view loop after changing content view.

    This is generally required when making changes to the views contained in a window.
    sorbits committed Oct 9, 2011
  4. Avoid delayed setContentView:.

    I am unable to reproduce any blinking and delaying the setContentView: to the end of the current event loop iteration isn’t “after animation is ended”.
    sorbits committed Oct 9, 2011
Commits on Oct 6, 2011
  1. Remove headers from shared code.

    Because you can look for any information on source code ownership and authorship right in the git repository.
    shpakovski committed Oct 6, 2011
  2. Change a property 'toolbarItemIdentifier' to the more general 'identi…

    Recent changes made it possible to restore view frames between launches, and this property 'identifier' is used for storing NSRect values into User Defaults. So it does not make sense to use the 'toolbar' prefix anymore.
    shpakovski committed Oct 6, 2011
  3. Merge pull request #3 from sorbits/master

    Make views resizable
    shpakovski committed Oct 6, 2011
  4. Restore frame sizes (from user defaults).

    We use view size (when first loaded from nib) as the minimum size.
    sorbits committed Oct 6, 2011
  5. Restore top left position (from user defaults).

    We are doing this manually (via NSWindowDidMoveNotification) since we only want to store the position of the window’s frame, as the size comes from the content views.
    sorbits committed Oct 6, 2011
  6. Restore selected view (stored in user defaults).

    I used the toolbar item identifier — I think this property should be renamed to just ‘identifier’ since we also want to associate other things to the view controllers (for which we need an identifier key).
    sorbits committed Oct 6, 2011
  7. Make preferences window resizable.

    This is only done when the content view has either a resizable width or height.
    The minimum and maximum sizes are hardcoded. I think leaving the maximum size as CGFLOAT_MAX × CGFLOAT_MAX is fine, but minimum size should probably be the initial frame size of the content view (until we require Lion and can leverage the new constraint based layout engine).
    sorbits committed Oct 6, 2011
  8. Save with IB 1038.36.

    This is only to avoid IB noise in upcoming XIB commits.
    sorbits committed Oct 6, 2011
  9. Merge pull request #2 from sorbits/4d0df43b137856a901fd4f4992e74d258e…

    Fix for issue 1
    shpakovski committed Oct 6, 2011
  10. Use windowDidLoad instead of awakeFromNib.

    This is somewhat subjective, but windowDidLoad is a more specific callback (hence better) where awakeFromNib is to be used in lack of better (and generally for members of the nib).
    Additionally this removes the call to super which would raise an exception on 10.5 (where NSWindowController does not respond to this method).
    sorbits committed Oct 6, 2011