]> git.saurik.com Git - wxWidgets.git/commitdiff
disabling close box
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 17 Mar 2006 20:51:38 +0000 (20:51 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 17 Mar 2006 20:51:38 +0000 (20:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/fontdlgosx.mm

index ee1e20cd918b75add108a9842bfd86d5286bb114..79a4c20fe85d6aa9693be2ec83c0566190461b2e 100644 (file)
@@ -147,6 +147,7 @@ int RunMixedFontDialog(wxFontDialog* dialog)
     SetWindowGroup(carbonWindowRef , GetWindowGroupOfClass(kMovableModalWindowClass));
     
     [fontPanel setFloatingPanel:NO] ;
+    [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:NO] ;
     
     wxMacFontPanelAccView* accessoryView = (wxMacFontPanelAccView*) [fontPanel accessoryView] ;
     if ( accessoryView == nil)
@@ -166,6 +167,8 @@ int RunMixedFontDialog(wxFontDialog* dialog)
 
     [NSApp endModalSession:session];
 
+    // if we don't reenable it, FPShowHideFontPanel does not work
+    [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:YES] ;
     if( FPIsFontPanelVisible())
         FPShowHideFontPanel() ;