mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-25 03:24:24 -04:00
Free-text messages get trimmed to 13 chars and have pink background.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2771 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+9
-13
@@ -1441,36 +1441,32 @@ void MainWindow::on_addButton_clicked() //Add button
|
||||
|
||||
void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
|
||||
{
|
||||
|
||||
char message[23];
|
||||
char msgsent[23];
|
||||
int len1=22;
|
||||
int jtone[85];
|
||||
int nsendingsh=0;
|
||||
t=t.toUpper();
|
||||
int i1=t.indexOf(" OOO");
|
||||
QByteArray s=t.toUpper().toLocal8Bit();
|
||||
ba2msg(s,message);
|
||||
jtone[0]=-99;
|
||||
genjt9_(message,msgsent,jtone,len1,len1);
|
||||
nsendingsh=0;
|
||||
msgsent[22]=0;
|
||||
bool text=false;
|
||||
if(jtone[1]==1) text=true;
|
||||
QString t1;
|
||||
t1.fromAscii(msgsent);
|
||||
if(text) t1=t1.mid(0,13);
|
||||
QPalette p(tx->palette());
|
||||
if(nsendingsh==1) {
|
||||
p.setColor(QPalette::Base,"#66ffff");
|
||||
} else if(nsendingsh==-1) {
|
||||
if(text) {
|
||||
p.setColor(QPalette::Base,"#ffccff");
|
||||
} else {
|
||||
p.setColor(QPalette::Base,Qt::white);
|
||||
}
|
||||
tx->setPalette(p);
|
||||
int len=t.length();
|
||||
if(nsendingsh==-1) {
|
||||
if(text) {
|
||||
len=qMin(len,13);
|
||||
if(i1>10) {
|
||||
tx->setText(t.mid(0,len).toUpper() + " OOO");
|
||||
} else {
|
||||
tx->setText(t.mid(0,len).toUpper());
|
||||
}
|
||||
tx->setText(t.mid(0,len).toUpper());
|
||||
} else {
|
||||
tx->setText(t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user