package launcher;

import javax.swing.*;

public class DesktopMain {
    public static String ConfigPath;

    public static void main(String[] args) {
        if (args.length == 0) {
            ConfigPath = "launcher.cfg";
        }
        else {
            ConfigPath = args[0];
        }

        //Attempt to set UI to Nimbux, use default if it isn't installed
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        }
        catch (Exception ex) {
            java.util.logging.Logger.getLogger(GuiWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }

        BrowserComponent.initialize();

        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                Settings settings = Settings.load(DesktopMain.ConfigPath);

                JFrame frame = new JFrame(settings.windowTitle);
                Gui gui = new Gui(settings);
                frame.setContentPane(gui.getMainPanel());
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.pack();
                frame.setSize(settings.windowWidth, settings.windowHeight);
                frame.getContentPane().setSize(settings.windowWidth, settings.windowHeight);

                //Center window in the middle of the screen
                frame.setLocationRelativeTo(null);

                frame.setVisible(true);

                gui.init(frame);

                gui.loadNews();
            }
        });
    }
}
@@ -33,16 +33,90 @@
 swing.*;
+%0Aimport javax.swing.text.DefaultEditorKit;%0Aimport java.awt.event.KeyEvent;
 %0A%0Apublic
@@ -398,17 +398,17 @@
 to Nimbu
-x
+s
 , use de
@@ -614,24 +614,24 @@
 tName())) %7B%0A
-
             
@@ -693,24 +693,851 @@
 assName());%0A
+                    //Nimbus doesn't use the standard copy/paste chords on Mac OS X.%0A                    //This corrects that behavior.%0A                    if (DesktopApi.getOs() == DesktopApi.EnumOS.macos) %7B%0A                        InputMap im = (InputMap) UIManager.get(%22TextField.focusInputMap%22);%0A                        im.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.META_DOWN_MASK), DefaultEditorKit.copyAction);%0A                        im.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.META_DOWN_MASK), DefaultEditorKit.pasteAction);%0A                        im.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.META_DOWN_MASK), DefaultEditorKit.cutAction);%0A                        im.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK), DefaultEditorKit.selectAllAction);%0A                    %7D%0A
             

Fix #4 by adding hooks for Nautilus L&F