Changeset 61

Show
Ignore:
Timestamp:
11/04/05 23:16:10 (5 years ago)
Author:
dsandler
Message:

Do nothing on close-box for the Mac version. Why not just hide the window? Because then all the menus go away, and there's not an easy way to install a JMenuBar for the no-windows case (just not part of the Swing model, I guess). See bug #27.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedtree/trunk/src/net/feedtree/proxyapp/gui/AppGUI.java

    r54 r61  
    384384        win.getContentPane().add(layout, c); 
    385385 
    386         win.addWindowListener(new WindowAdapter() { 
    387             public void windowClosing(WindowEvent e) { 
    388                 System.exit(0); 
    389             } 
    390         }); 
    391  
    392         win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
     386        if (System.getProperty("os.name").toLowerCase().indexOf("mac os x") >= 0) { 
     387            win.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); 
     388        } else { 
     389            win.addWindowListener(new WindowAdapter() { 
     390                public void windowClosing(WindowEvent e) { 
     391                    System.exit(0); 
     392                } 
     393            }); 
     394 
     395            win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
     396        } 
     397 
    393398        win.pack(); 
    394399        win.show();