Revision: 4721
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4721&view=rev
Author:   hofman
Date:     2008-10-01 11:49:47 +0000 (Wed, 01 Oct 2008)

Log Message:
-----------
Fix for binding of info controller. Returning a copy of the dictionary does not 
work, as binding expects the same object to be returned to be able to unbind.

Modified Paths:
--------------
    trunk/SKInfoWindowController.h
    trunk/SKInfoWindowController.m

Modified: trunk/SKInfoWindowController.h
===================================================================
--- trunk/SKInfoWindowController.h      2008-09-30 20:03:09 UTC (rev 4720)
+++ trunk/SKInfoWindowController.h      2008-10-01 11:49:47 UTC (rev 4721)
@@ -40,7 +40,7 @@
 
 
 @interface SKInfoWindowController : NSWindowController {
-    NSMutableDictionary *info;
+    NSDictionary *info;
 }
 
 + (id)sharedInstance;

Modified: trunk/SKInfoWindowController.m
===================================================================
--- trunk/SKInfoWindowController.m      2008-09-30 20:03:09 UTC (rev 4720)
+++ trunk/SKInfoWindowController.m      2008-10-01 11:49:47 UTC (rev 4721)
@@ -81,7 +81,7 @@
 
 - (id)init {
     if (sharedInstance == nil && (sharedInstance = self = [super 
initWithWindowNibName:@"InfoWindow"])) {
-        info = [[NSMutableDictionary alloc] init];
+        info = nil;
     }
     return sharedInstance;
 }
@@ -235,11 +235,14 @@
 }
 
 - (NSDictionary *)info {
-    return [[info copy] autorelease];
+    return info;
 }
 
 - (void)setInfo:(NSDictionary *)newInfo {
-    [info setDictionary:newInfo];
+    if (info != newInfo) {
+        [info release];
+        info = [newInfo retain];
+    }
 }
 
 - (void)handleWindowDidBecomeMainNotification:(NSNotification *)notification {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to