Fix locking issue and set default LnF to nimbus. (works better with, e.g. Backtrack)
git-svn-id: file:///home/svn/framework3/trunk@12052 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
68374e11ef
commit
b06e9b5696
Binary file not shown.
|
@ -139,6 +139,7 @@ public class DraggableTabbedPane extends JTabbedPane{
|
|||
for(int i = 0; i < pane.getTabCount(); i++)
|
||||
if(pane.getComponentAt(i).equals(subParent))
|
||||
pane.setSelectedIndex(i);
|
||||
lastFocusListener = (FocusListener)pane.focusListeners.get(pane.getSelectedComponent());
|
||||
//Also make containing window show up
|
||||
for(par = pane.getParent(); !(par instanceof Window); par = par.getParent())
|
||||
;
|
||||
|
|
|
@ -28,6 +28,7 @@ import javax.swing.JOptionPane;
|
|||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.UIManager.LookAndFeelInfo;
|
||||
import javax.swing.UnsupportedLookAndFeelException;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import org.jdesktop.application.Task;
|
||||
|
@ -1936,8 +1937,13 @@ nameloop: for (int i = 0; i < names.length; i++) {
|
|||
UIManager.setLookAndFeel(classname);
|
||||
info.put("LnF", classname);
|
||||
}catch(Exception ulafex){
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
info.put("LnF", UIManager.getSystemLookAndFeelClassName());
|
||||
String newLnF = UIManager.getSystemLookAndFeelClassName();
|
||||
//Prefer nimbus
|
||||
for(LookAndFeelInfo lookAndFeel : UIManager.getInstalledLookAndFeels())
|
||||
if(lookAndFeel.getClassName().equals("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"))
|
||||
newLnF = "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel";
|
||||
UIManager.setLookAndFeel(newLnF);
|
||||
info.put("LnF", newLnF);
|
||||
}
|
||||
SwingUtilities.updateComponentTreeUI(this.getFrame());
|
||||
this.getFrame().pack();
|
||||
|
|
|
@ -6,8 +6,6 @@ import java.awt.event.ActionListener;
|
|||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowFocusListener;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
@ -151,17 +149,17 @@ public class MeterpFileBrowser extends MsfFrame {
|
|||
lock.unlock();
|
||||
}
|
||||
});
|
||||
//Get initial view
|
||||
lock.lock();
|
||||
// Some exploits open in C:\Windows\system32. Too many files in there! Try to move to C:\ which should be more manageable
|
||||
executeCommand("cd \"C:\\\\\"");
|
||||
getFiles();
|
||||
//See if we need to move our tab
|
||||
Map props = MsfguiApp.getPropertiesNode();
|
||||
if(!props.get("tabWindowPreference").equals("window")){
|
||||
((DraggableTabbedPane)tabbedPane).moveTabTo(0, DraggableTabbedPane.getTabPane(interactPane));
|
||||
DraggableTabbedPane.show(mainPanel);
|
||||
}
|
||||
//Get initial view
|
||||
lock.lock();
|
||||
// Some exploits open in C:\Windows\system32. Too many files in there! Try to move to C:\ which should be more manageable
|
||||
executeCommand("cd \"C:\\\\\"");
|
||||
getFiles();
|
||||
}
|
||||
|
||||
/** Calls meterpreter_write with the session ID and Base64 encoded text. */
|
||||
|
|
Loading…
Reference in New Issue