mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Update with Valtechs changes.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@6930 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -63,7 +63,7 @@ import javax.swing.JToolBar;
|
||||
*
|
||||
* @version 1.0, 03/12/14
|
||||
*/
|
||||
public final class MainWindow extends JFrame implements ActionListener {
|
||||
public final class MainWindow extends ChatFrame implements ActionListener {
|
||||
private final Set<MainWindowListener> listeners = new HashSet<MainWindowListener>();
|
||||
|
||||
private final JMenu connectMenu = new JMenu();
|
||||
|
||||
@ -461,7 +461,9 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
* Close all chat rooms.
|
||||
*/
|
||||
public void closeAllChatRooms() {
|
||||
if (MainWindow.getInstance().isDocked()) {
|
||||
LocalPreferences pref = SettingsManager.getLocalPreferences();
|
||||
|
||||
if (MainWindow.getInstance().isDocked() || !pref.isAutoCloseChatRoomsEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1129,7 +1131,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
}
|
||||
LocalPreferences pref = SettingsManager.getLocalPreferences();
|
||||
if (pref.isDockingEnabled()) {
|
||||
//chatFrame = MainWindow.getInstance();
|
||||
chatFrame = MainWindow.getInstance();
|
||||
}
|
||||
else {
|
||||
chatFrame = new ChatFrame();
|
||||
|
||||
@ -43,7 +43,6 @@ public class ChatFrame extends JFrame implements WindowFocusListener {
|
||||
|
||||
getContentPane().setLayout(new BorderLayout());
|
||||
getContentPane().add(SparkManager.getChatManager().getChatContainer(), BorderLayout.CENTER);
|
||||
pack();
|
||||
|
||||
LayoutSettings settings = LayoutSettingsManager.getLayoutSettings();
|
||||
if (settings.getChatFrameX() == 0 && settings.getChatFrameY() == 0) {
|
||||
|
||||
@ -495,6 +495,14 @@ public class LocalPreferences {
|
||||
return getBoolean("dockingEnabled", false);
|
||||
}
|
||||
|
||||
public void setAutoCloseChatRoomsEnabled(boolean autoCloseChatRoomsEnabled){
|
||||
setBoolean("autoCloseChatRoomsEnabled", autoCloseChatRoomsEnabled);
|
||||
}
|
||||
|
||||
public boolean isAutoCloseChatRoomsEnabled(){
|
||||
return getBoolean("autoCloseChatRoomsEnabled", true);
|
||||
}
|
||||
|
||||
public void setTabsOnTop(boolean onTop){
|
||||
setBoolean("tabsOnTop", onTop);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user