mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Show user name in title bar of MAGE. Clear table chat after disconnect. Remove user from chat after disconnect. Some tweaking about the messages if a user disconnected/session expired.
This commit is contained in:
parent
ae30e9a884
commit
b6ddaabe44
12 changed files with 58 additions and 28 deletions
|
|
@ -856,6 +856,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
if (session.isConnected()) {
|
||||
if (JOptionPane.showConfirmDialog(this, "Are you sure you want to disconnect?", "Confirm disconnect", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
|
||||
session.disconnect(false);
|
||||
tablesPane.clearChat();
|
||||
showMessage("You have disconnected");
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -275,8 +275,7 @@ class TableModel extends AbstractTableModel {
|
|||
}
|
||||
|
||||
public void clear() {
|
||||
this.txtConversation.selectAll();
|
||||
this.txtConversation.replaceSelection("");
|
||||
this.txtConversation.setText("");
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ public class TablesPane extends MagePane {
|
|||
tablesPanel.hideTables();
|
||||
}
|
||||
|
||||
public void clearChat() {
|
||||
tablesPanel.getChatPanel().clear();
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
|
|
|
|||
|
|
@ -331,6 +331,11 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
}
|
||||
}
|
||||
|
||||
public ChatPanel getChatPanel() {
|
||||
return this.chatPanel;
|
||||
}
|
||||
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue