Fixed Issue #[166]: Allow table creator to remove table - added confirm dialog

This commit is contained in:
magenoxx 2013-03-22 08:26:57 +04:00
parent e3e2cb99a6
commit 3afa5cc867

View file

@ -158,7 +158,9 @@ public class TablesPanel extends javax.swing.JPanel {
joinTableDialog.showDialog(roomId, tableId);
}
} else if (state.equals("Remove")) {
session.removeTable(roomId, tableId);
if (JOptionPane.showConfirmDialog(null, "Are you sure you want to remove table?", "Removing table", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
session.removeTable(roomId, tableId);
}
} else if (state.equals("Watch")) {
logger.info("Watching table " + tableId);
session.watchTable(roomId, tableId);