summaryrefslogtreecommitdiff
path: root/TabDialog.cpp
diff options
context:
space:
mode:
authorJohn Wiseman <john.wiseman@cantab.net>2023-04-12 15:35:34 +0100
committerJohn Wiseman <john.wiseman@cantab.net>2023-04-12 15:35:34 +0100
commit54d80b9e90b56cb2117be3997479a01190f7e9aa (patch)
tree8d5cd9e16c96354ae0143e045af1a7b2cea80601 /TabDialog.cpp
parent5c0eaeca444cf44cff3ae3c26077aa053ca51bae (diff)
Version 0.0.0.63
Diffstat (limited to 'TabDialog.cpp')
-rw-r--r--TabDialog.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/TabDialog.cpp b/TabDialog.cpp
index 7bd6410..2e2d665 100644
--- a/TabDialog.cpp
+++ b/TabDialog.cpp
@@ -41,6 +41,7 @@ QLineEdit *hostEdit;
QLineEdit *portEdit;
QLineEdit *userEdit;
QLineEdit *passEdit;
+QLineEdit *SNameEdit;
extern QAction *actHost[17];
extern QAction *actSetup[16];
@@ -53,6 +54,8 @@ extern char Host[MAXHOSTS + 1][100];
extern int Port[MAXHOSTS + 1];
extern char UserName[MAXHOSTS + 1][80];
extern char Password[MAXHOSTS + 1][80];
+extern char SessName[MAXHOSTS + 1][80];
+
extern char MYCALL[32];
QLineEdit *TermCall;
@@ -734,6 +737,9 @@ TabDialog::TabDialog(QWidget *parent) : QDialog(parent)
QLabel *passLabel = new QLabel(tr("Password:"));
passEdit = new QLineEdit(Password[ConfigHost]);
+ QLabel *SNameLabel = new QLabel(tr("Session Name"));
+ SNameEdit = new QLineEdit(SessName[ConfigHost]);
+
layout->addWidget(hostLabel);
layout->addWidget(hostEdit);
layout->addWidget(portLabel);
@@ -742,6 +748,8 @@ TabDialog::TabDialog(QWidget *parent) : QDialog(parent)
layout->addWidget(userEdit);
layout->addWidget(passLabel);
layout->addWidget(passEdit);
+ layout->addWidget(SNameLabel);
+ layout->addWidget(SNameEdit);
layout->addStretch(1);
layout->addWidget(buttonBox);
@@ -838,11 +846,22 @@ void TabDialog::myaccept()
ptr = qb.data();
strcpy(Password[ConfigHost], ptr);
- actHost[ConfigHost]->setText(Host[ConfigHost]);
- actSetup[ConfigHost]->setText(Host[ConfigHost]);
+ val = SNameEdit->text();
+ qb = val.toLatin1();
+ ptr = qb.data();
+ strcpy(SessName[ConfigHost], ptr);
- SaveSettings();
+ char Label[256];
+ if (ptr[0])
+ sprintf(Label, "%s(%s)", Host[ConfigHost], SessName[ConfigHost]);
+ else
+ strcpy(Label, Host[ConfigHost]);
+
+ actHost[ConfigHost]->setText(Label);
+ actSetup[ConfigHost]->setText(Label);
+
+ SaveSettings();
TabDialog::accept();