~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to external/monomac/src/AppKit/NSWindow.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-06-22 20:35:35 UTC
  • mfrom: (10.3.2)
  • Revision ID: package-import@ubuntu.com-20120622203535-zrozwvcf6kfk6l6i
Tags: 3.0.3.2+dfsg-1
* [3fd89ae] Imported Upstream version 3.0.3.2+dfsg
* [379a680] Remove old patches we haven't used for ages from git.
* [d71161d] Remove correct_paths_in_monodevelop-core-addins.pc.patch.
  Upstream claim to have fixed this by moving assembly install locations.
* [15dbfb9] Fix install location for MonoDevelop.Gettext.dll.config.
* [26eb434] Fix install location for MonoDevelop.SourceEditor2.dll.config.
* [4169974] Upstream commit 53282c9 which finally reconciles the 
  MonoDevelop.Gettext.dll install location with the 
  monodevelop-core-addins.pc location.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
//
23
23
using System;
 
24
using MonoMac.CoreFoundation;
24
25
using MonoMac.Foundation;
25
26
using MonoMac.ObjCRuntime;
26
27
 
43
44
                {
44
45
                        return new NSWindow (windowRef, NSObjectFlag.Empty);
45
46
                }
 
47
 
 
48
                public void Close ()
 
49
                {
 
50
                        // Windows that do not have a WindowController use released_when_closed
 
51
                        // if set to true, the call to Close will release the object, and we will
 
52
                        // end up with a double free.
 
53
                        //
 
54
                        // If that is the case, we take a reference first, and to keep the behavior
 
55
                        // we call Dispose after that.
 
56
                        if (WindowController == null){
 
57
                                bool released_when_closed = ReleasedWhenClosed;
 
58
                                if (released_when_closed)
 
59
                                        CFObject.CFRetain (Handle);
 
60
                                _Close ();
 
61
                                if (released_when_closed)
 
62
                                        Dispose ();
 
63
                        } else
 
64
                                _Close ();
 
65
                }
46
66
                
47
67
// NSString NSWindowDidBecomeKeyNotification;
48
68
// NSString NSWindowDidBecomeMainNotification;