forked from blue/squawk
initial code translation preparation, russian localization
This commit is contained in:
parent
746fdef013
commit
8afdb81314
14 changed files with 781 additions and 75 deletions
|
@ -151,7 +151,7 @@ QVariant Models::Account::data(int column) const
|
|||
case 1:
|
||||
return server;
|
||||
case 2:
|
||||
return Shared::connectionStateNames[state];
|
||||
return QCoreApplication::translate("Global", Shared::connectionStateNames[state].toLatin1());
|
||||
case 3:
|
||||
return error;
|
||||
case 4:
|
||||
|
@ -159,7 +159,7 @@ QVariant Models::Account::data(int column) const
|
|||
case 5:
|
||||
return password;
|
||||
case 6:
|
||||
return Shared::availabilityNames[availability];
|
||||
return QCoreApplication::translate("Global", Shared::availabilityNames[availability].toLatin1());
|
||||
case 7:
|
||||
return resource;
|
||||
default:
|
||||
|
|
|
@ -20,13 +20,9 @@
|
|||
#include "../../global.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QDebug>
|
||||
|
||||
std::deque<QString> Models::Accounts::columns = {
|
||||
"name",
|
||||
"server",
|
||||
"state",
|
||||
"error"
|
||||
};
|
||||
std::deque<QString> Models::Accounts::columns = {"Name", "Server", "State", "Error"};
|
||||
|
||||
Models::Accounts::Accounts(QObject* parent):
|
||||
QAbstractTableModel(parent),
|
||||
|
@ -72,7 +68,7 @@ int Models::Accounts::rowCount ( const QModelIndex& parent ) const
|
|||
QVariant Models::Accounts::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (role == Qt::DisplayRole && orientation == Qt::Horizontal) {
|
||||
return columns[section];
|
||||
return tr(columns[section].toLatin1());
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
@ -81,7 +77,18 @@ QVariant Models::Accounts::headerData(int section, Qt::Orientation orientation,
|
|||
void Models::Accounts::addAccount(Account* account)
|
||||
{
|
||||
beginInsertRows(QModelIndex(), accs.size(), accs.size());
|
||||
accs.push_back(account);
|
||||
int index = 0;
|
||||
std::deque<Account*>::const_iterator before = accs.begin();
|
||||
while (before != accs.end()) {
|
||||
Account* bfr = *before;
|
||||
if (bfr->getDisplayedName() > account->getDisplayedName()) {
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
before++;
|
||||
}
|
||||
|
||||
accs.insert(before, account);
|
||||
connect(account, SIGNAL(childChanged(Models::Item*, int, int)), this, SLOT(onAccountChanged(Models::Item*, int, int)));
|
||||
endInsertRows();
|
||||
|
||||
|
@ -96,8 +103,32 @@ void Models::Accounts::onAccountChanged(Item* item, int row, int col)
|
|||
return; //it means the signal is emitted by one of accounts' children, not exactly him, this model has no interest in that
|
||||
}
|
||||
|
||||
if (col == 0) {
|
||||
int newRow = 0;
|
||||
std::deque<Account*>::const_iterator before = accs.begin();
|
||||
while (before != accs.end()) {
|
||||
Item* bfr = *before;
|
||||
if (bfr->getDisplayedName() > item->getDisplayedName()) {
|
||||
break;
|
||||
}
|
||||
newRow++;
|
||||
before++;
|
||||
}
|
||||
|
||||
if (newRow != row || (before != accs.end() && *before != item)) {
|
||||
emit beginMoveRows(createIndex(row, 0), row, row, createIndex(newRow, 0), newRow);
|
||||
std::deque<Account*>::const_iterator old = accs.begin();
|
||||
old += row;
|
||||
accs.erase(old);
|
||||
accs.insert(before, acc);
|
||||
emit endMoveRows();
|
||||
|
||||
row = newRow;
|
||||
}
|
||||
}
|
||||
|
||||
if (col < columnCount(QModelIndex())) {
|
||||
emit dataChanged(createIndex(row, col, this), createIndex(row, col, this));
|
||||
emit dataChanged(createIndex(row, col), createIndex(row, col));
|
||||
}
|
||||
emit changed();
|
||||
}
|
||||
|
|
|
@ -193,15 +193,15 @@ QString Models::Room::getStatusText() const
|
|||
{
|
||||
if (autoJoin) {
|
||||
if (joined) {
|
||||
return "Subscribed";
|
||||
return tr("Subscribed");
|
||||
} else {
|
||||
return "Temporarily unsubscribed";
|
||||
return tr("Temporarily unsubscribed");
|
||||
}
|
||||
} else {
|
||||
if (joined) {
|
||||
return "Temporarily subscribed";
|
||||
return tr("Temporarily subscribed");
|
||||
} else {
|
||||
return "Unsubscribed";
|
||||
return tr("Unsubscribed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#include <QIcon>
|
||||
#include <QFont>
|
||||
|
||||
using namespace Models;
|
||||
|
||||
Models::Roster::Roster(QObject* parent):
|
||||
QAbstractItemModel(parent),
|
||||
accountsModel(new Accounts()),
|
||||
|
@ -78,7 +76,7 @@ QVariant Models::Roster::data (const QModelIndex& index, int role) const
|
|||
str += gr->getName();
|
||||
unsigned int amount = gr->getUnreadMessages();
|
||||
if (amount > 0) {
|
||||
str += QString(" (") + "New messages" + ")";
|
||||
str += QString(" (") + tr("New messages") + ")";
|
||||
}
|
||||
|
||||
result = str;
|
||||
|
@ -143,7 +141,7 @@ QVariant Models::Roster::data (const QModelIndex& index, int role) const
|
|||
switch (item->type) {
|
||||
case Item::account: {
|
||||
Account* acc = static_cast<Account*>(item);
|
||||
result = QString(Shared::availabilityNames[acc->getAvailability()]);
|
||||
result = QCoreApplication::translate("Global", Shared::availabilityNames[acc->getAvailability()].toLatin1());
|
||||
}
|
||||
break;
|
||||
case Item::contact: {
|
||||
|
@ -151,22 +149,22 @@ QVariant Models::Roster::data (const QModelIndex& index, int role) const
|
|||
QString str("");
|
||||
int mc = contact->getMessagesCount();
|
||||
if (mc > 0) {
|
||||
str += QString("New messages: ") + std::to_string(mc).c_str() + "\n";
|
||||
str += QString(tr("New messages: ")) + std::to_string(mc).c_str() + "\n";
|
||||
}
|
||||
str += "Jabber ID: " + contact->getJid() + "\n";
|
||||
str += tr("Jabber ID: ") + contact->getJid() + "\n";
|
||||
Shared::SubscriptionState ss = contact->getState();
|
||||
if (ss == Shared::both) {
|
||||
Shared::Availability av = contact->getAvailability();
|
||||
str += "Availability: " + Shared::availabilityNames[av];
|
||||
str += tr("Availability: ") + QCoreApplication::translate("Global", Shared::availabilityNames[av].toLatin1());
|
||||
if (av != Shared::offline) {
|
||||
QString s = contact->getStatus();
|
||||
if (s.size() > 0) {
|
||||
str += "\nStatus: " + s;
|
||||
str += "\n" + tr("Status: ") + s;
|
||||
}
|
||||
}
|
||||
str += "\nSubscription: " + Shared::subscriptionStateNames[ss];
|
||||
str += "\n" + tr("Subscription: ") + QCoreApplication::translate("Global", Shared::subscriptionStateNames[ss].toLatin1());
|
||||
} else {
|
||||
str += "Subscription: " + Shared::subscriptionStateNames[ss];
|
||||
str += tr("Subscription: ") + QCoreApplication::translate("Global", Shared::subscriptionStateNames[ss].toLatin1());
|
||||
}
|
||||
|
||||
result = str;
|
||||
|
@ -177,13 +175,13 @@ QVariant Models::Roster::data (const QModelIndex& index, int role) const
|
|||
QString str("");
|
||||
int mc = contact->getMessagesCount();
|
||||
if (mc > 0) {
|
||||
str += QString("New messages: ") + std::to_string(mc).c_str() + "\n";
|
||||
str += tr("New messages: ") + std::to_string(mc).c_str() + "\n";
|
||||
}
|
||||
Shared::Availability av = contact->getAvailability();
|
||||
str += "Availability: " + Shared::availabilityNames[av];
|
||||
str += tr("Availability: ") + QCoreApplication::translate("Global", Shared::availabilityNames[av].toLatin1());
|
||||
QString s = contact->getStatus();
|
||||
if (s.size() > 0) {
|
||||
str += "\nStatus: " + s;
|
||||
str += "\n" + tr("Status: ") + s;
|
||||
}
|
||||
|
||||
result = str;
|
||||
|
@ -193,14 +191,18 @@ QVariant Models::Roster::data (const QModelIndex& index, int role) const
|
|||
Participant* p = static_cast<Participant*>(item);
|
||||
QString str("");
|
||||
Shared::Availability av = p->getAvailability();
|
||||
str += "Availability: " + Shared::availabilityNames[av] + "\n";
|
||||
str += tr("Availability: ") + QCoreApplication::translate("Global", Shared::availabilityNames[av].toLatin1()) + "\n";
|
||||
QString s = p->getStatus();
|
||||
if (s.size() > 0) {
|
||||
str += "Status: " + s + "\n";
|
||||
str += tr("Status: ") + s + "\n";
|
||||
}
|
||||
|
||||
str += "Affiliation: " + Shared::affiliationNames[static_cast<unsigned int>(p->getAffiliation())] + "\n";
|
||||
str += "Role: " + Shared::roleNames[static_cast<unsigned int>(p->getRole())];
|
||||
str += tr("Affiliation: ") +
|
||||
QCoreApplication::translate("Global",
|
||||
Shared::affiliationNames[static_cast<unsigned int>(p->getAffiliation())].toLatin1()) + "\n";
|
||||
str += tr("Role: ") +
|
||||
QCoreApplication::translate("Global",
|
||||
Shared::roleNames[static_cast<unsigned int>(p->getRole())].toLatin1());
|
||||
|
||||
result = str;
|
||||
}
|
||||
|
@ -210,10 +212,10 @@ QVariant Models::Roster::data (const QModelIndex& index, int role) const
|
|||
unsigned int count = gr->getUnreadMessages();
|
||||
QString str("");
|
||||
if (count > 0) {
|
||||
str += QString("New messages: ") + std::to_string(count).c_str() + "\n";
|
||||
str += tr("New messages: ") + std::to_string(count).c_str() + "\n";
|
||||
}
|
||||
str += QString("Online contacts: ") + std::to_string(gr->getOnlineContacts()).c_str() + "\n";
|
||||
str += QString("Total contacts: ") + std::to_string(gr->childCount()).c_str();
|
||||
str += tr("Online contacts: ") + std::to_string(gr->getOnlineContacts()).c_str() + "\n";
|
||||
str += tr("Total contacts: ") + std::to_string(gr->childCount()).c_str();
|
||||
result = str;
|
||||
}
|
||||
break;
|
||||
|
@ -222,11 +224,11 @@ QVariant Models::Roster::data (const QModelIndex& index, int role) const
|
|||
unsigned int count = rm->getUnreadMessagesCount();
|
||||
QString str("");
|
||||
if (count > 0) {
|
||||
str += QString("New messages: ") + std::to_string(count).c_str() + "\n";
|
||||
str += tr("New messages: ") + std::to_string(count).c_str() + "\n";
|
||||
}
|
||||
str += QString("Subscription: ") + rm->getStatusText();
|
||||
str += tr("Subscription: ") + rm->getStatusText();
|
||||
if (rm->getJoined()) {
|
||||
str += QString("\nMembers: ") + std::to_string(rm->childCount()).c_str();
|
||||
str += QString("\n") + tr("Members: ") + std::to_string(rm->childCount()).c_str();
|
||||
}
|
||||
result = str;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ Squawk::Squawk(QWidget *parent) :
|
|||
|
||||
for (unsigned int i = Shared::availabilityLowest; i < Shared::availabilityHighest + 1; ++i) {
|
||||
Shared::Availability av = static_cast<Shared::Availability>(i);
|
||||
m_ui->comboBox->addItem(Shared::availabilityIcon(av), Shared::availabilityNames[av]);
|
||||
m_ui->comboBox->addItem(Shared::availabilityIcon(av), QCoreApplication::translate("Global", Shared::availabilityNames[av].toLatin1()));
|
||||
}
|
||||
m_ui->comboBox->setCurrentIndex(Shared::offline);
|
||||
|
||||
|
@ -526,20 +526,19 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
QString name = acc->getName();
|
||||
|
||||
if (acc->getState() != Shared::disconnected) {
|
||||
QAction* con = contextMenu->addAction(Shared::icon("network-disconnect"), "Disconnect");
|
||||
QAction* con = contextMenu->addAction(Shared::icon("network-disconnect"), tr("Disconnect"));
|
||||
con->setEnabled(active);
|
||||
connect(con, &QAction::triggered, [this, name]() {
|
||||
emit disconnectAccount(name);
|
||||
});
|
||||
} else {
|
||||
QAction* con = contextMenu->addAction(Shared::icon("network-connect"), "Connect");
|
||||
con->setEnabled(active);
|
||||
QAction* con = contextMenu->addAction(Shared::icon("network-connect"), tr("Connect"));
|
||||
connect(con, &QAction::triggered, [this, name]() {
|
||||
emit connectAccount(name);
|
||||
});
|
||||
}
|
||||
|
||||
QAction* remove = contextMenu->addAction(Shared::icon("edit-delete"), "Remove");
|
||||
QAction* remove = contextMenu->addAction(Shared::icon("edit-delete"), tr("Remove"));
|
||||
remove->setEnabled(active);
|
||||
connect(remove, &QAction::triggered, [this, name]() {
|
||||
emit removeAccount(name);
|
||||
|
@ -551,7 +550,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
Models::Contact* cnt = static_cast<Models::Contact*>(item);
|
||||
hasMenu = true;
|
||||
|
||||
QAction* dialog = contextMenu->addAction(Shared::icon("mail-message"), "Open dialog");
|
||||
QAction* dialog = contextMenu->addAction(Shared::icon("mail-message"), tr("Open dialog"));
|
||||
dialog->setEnabled(active);
|
||||
connect(dialog, &QAction::triggered, [this, index]() {
|
||||
onRosterItemDoubleClicked(index);
|
||||
|
@ -561,7 +560,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
switch (state) {
|
||||
case Shared::both:
|
||||
case Shared::to: {
|
||||
QAction* unsub = contextMenu->addAction(Shared::icon("news-unsubscribe"), "Unsubscribe");
|
||||
QAction* unsub = contextMenu->addAction(Shared::icon("news-unsubscribe"), tr("Unsubscribe"));
|
||||
unsub->setEnabled(active);
|
||||
connect(unsub, &QAction::triggered, [this, cnt]() {
|
||||
emit unsubscribeContact(cnt->getAccountName(), cnt->getJid(), "");
|
||||
|
@ -571,7 +570,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
case Shared::from:
|
||||
case Shared::unknown:
|
||||
case Shared::none: {
|
||||
QAction* sub = contextMenu->addAction(Shared::icon("news-subscribe"), "Subscribe");
|
||||
QAction* sub = contextMenu->addAction(Shared::icon("news-subscribe"), tr("Subscribe"));
|
||||
sub->setEnabled(active);
|
||||
connect(sub, &QAction::triggered, [this, cnt]() {
|
||||
emit subscribeContact(cnt->getAccountName(), cnt->getJid(), "");
|
||||
|
@ -582,7 +581,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
QString cntJID = cnt->getJid();
|
||||
QString cntName = cnt->getName();
|
||||
|
||||
QAction* rename = contextMenu->addAction(Shared::icon("edit-rename"), "Rename");
|
||||
QAction* rename = contextMenu->addAction(Shared::icon("edit-rename"), tr("Rename"));
|
||||
rename->setEnabled(active);
|
||||
connect(rename, &QAction::triggered, [this, cntName, accName, cntJID]() {
|
||||
QInputDialog* dialog = new QInputDialog(this);
|
||||
|
@ -595,14 +594,14 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
});
|
||||
connect(dialog, &QDialog::rejected, dialog, &QObject::deleteLater);
|
||||
dialog->setInputMode(QInputDialog::TextInput);
|
||||
dialog->setLabelText("Input new name for " + cntJID + " \nor leave it empty for the contact \nto be displayed as " + cntJID);
|
||||
dialog->setWindowTitle("Renaming " + cntJID);
|
||||
dialog->setLabelText(tr("Input new name for %1\nor leave it empty for the contact \nto be displayed as %1").arg(cntJID));
|
||||
dialog->setWindowTitle(tr("Renaming %1").arg(cntJID));
|
||||
dialog->setTextValue(cntName);
|
||||
dialog->exec();
|
||||
});
|
||||
|
||||
|
||||
QMenu* groupsMenu = contextMenu->addMenu(Shared::icon("group"), "Groups");
|
||||
QMenu* groupsMenu = contextMenu->addMenu(Shared::icon("group"), tr("Groups"));
|
||||
std::deque<QString> groupList = rosterModel.groupList(accName);
|
||||
for (QString groupName : groupList) {
|
||||
QAction* gr = groupsMenu->addAction(groupName);
|
||||
|
@ -617,7 +616,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
}
|
||||
});
|
||||
}
|
||||
QAction* newGroup = groupsMenu->addAction(Shared::icon("resource-group-new"), "New group");
|
||||
QAction* newGroup = groupsMenu->addAction(Shared::icon("resource-group-new"), tr("New group"));
|
||||
newGroup->setEnabled(active);
|
||||
connect(newGroup, &QAction::triggered, [this, accName, cntJID]() {
|
||||
QInputDialog* dialog = new QInputDialog(this);
|
||||
|
@ -627,13 +626,13 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
});
|
||||
connect(dialog, &QDialog::rejected, dialog, &QObject::deleteLater);
|
||||
dialog->setInputMode(QInputDialog::TextInput);
|
||||
dialog->setLabelText("New group name");
|
||||
dialog->setWindowTitle("Add " + cntJID + " to a new group");
|
||||
dialog->setLabelText(tr("New group name"));
|
||||
dialog->setWindowTitle(tr("Add %1 to a new group").arg(cntJID));
|
||||
dialog->exec();
|
||||
});
|
||||
|
||||
|
||||
QAction* remove = contextMenu->addAction(Shared::icon("edit-delete"), "Remove");
|
||||
QAction* remove = contextMenu->addAction(Shared::icon("edit-delete"), tr("Remove"));
|
||||
remove->setEnabled(active);
|
||||
connect(remove, &QAction::triggered, [this, cnt]() {
|
||||
emit removeContactRequest(cnt->getAccountName(), cnt->getJid());
|
||||
|
@ -645,7 +644,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
Models::Room* room = static_cast<Models::Room*>(item);
|
||||
hasMenu = true;
|
||||
|
||||
QAction* dialog = contextMenu->addAction(Shared::icon("mail-message"), "Open conversation");
|
||||
QAction* dialog = contextMenu->addAction(Shared::icon("mail-message"), tr("Open conversation"));
|
||||
dialog->setEnabled(active);
|
||||
connect(dialog, &QAction::triggered, [this, index]() {
|
||||
onRosterItemDoubleClicked(index);
|
||||
|
@ -654,7 +653,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
|
||||
Models::Roster::ElId id(room->getAccountName(), room->getJid());
|
||||
if (room->getAutoJoin()) {
|
||||
QAction* unsub = contextMenu->addAction(Shared::icon("news-unsubscribe"), "Unsubscribe");
|
||||
QAction* unsub = contextMenu->addAction(Shared::icon("news-unsubscribe"), tr("Unsubscribe"));
|
||||
unsub->setEnabled(active);
|
||||
connect(unsub, &QAction::triggered, [this, id]() {
|
||||
emit setRoomAutoJoin(id.account, id.name, false);
|
||||
|
@ -663,7 +662,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
}
|
||||
});
|
||||
} else {
|
||||
QAction* unsub = contextMenu->addAction(Shared::icon("news-subscribe"), "Subscribe");
|
||||
QAction* unsub = contextMenu->addAction(Shared::icon("news-subscribe"), tr("Subscribe"));
|
||||
unsub->setEnabled(active);
|
||||
connect(unsub, &QAction::triggered, [this, id]() {
|
||||
emit setRoomAutoJoin(id.account, id.name, true);
|
||||
|
@ -673,7 +672,7 @@ void Squawk::onRosterContextMenu(const QPoint& point)
|
|||
});
|
||||
}
|
||||
|
||||
QAction* remove = contextMenu->addAction(Shared::icon("edit-delete"), "Remove");
|
||||
QAction* remove = contextMenu->addAction(Shared::icon("edit-delete"), tr("Remove"));
|
||||
remove->setEnabled(active);
|
||||
connect(remove, &QAction::triggered, [this, id]() {
|
||||
emit removeRoomRequest(id.account, id.name);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <QFileInfo>
|
||||
#include "message.h"
|
||||
|
||||
const QRegExp urlReg("^(?!<img\\ssrc=\")((?:https?|ftp)://\\S+)");
|
||||
const QRegExp urlReg("(?!<img\\ssrc=\")((?:https?|ftp)://\\S+)");
|
||||
const QRegExp imgReg("((?:https?|ftp)://\\S+\\.(?:jpg|jpeg|png|svg|gif))");
|
||||
|
||||
Message::Message(const Shared::Message& source, bool outgoing, const QString& p_sender, QWidget* parent):
|
||||
|
@ -117,13 +117,13 @@ void Message::addDownloadDialog()
|
|||
text->setText("");
|
||||
text->hide();
|
||||
}
|
||||
downloadButton = new QPushButton(QIcon::fromTheme("download"), "Download");
|
||||
downloadButton = new QPushButton(QIcon::fromTheme("download"), tr("Download"));
|
||||
downloadButton->setToolTip("<a href=\"" + msg.getOutOfBandUrl() + "\">" + msg.getOutOfBandUrl() + "</a>");
|
||||
if (errorDownloadingFile) {
|
||||
fileComment->setWordWrap(true);
|
||||
fileComment->setText("Error downloading file: " + errorText + "\nYou can try again");
|
||||
fileComment->setText(tr("Error downloading file: %1\nYou can try again").arg(QCoreApplication::translate("NetworkErrors", errorText.toLatin1())));
|
||||
} else {
|
||||
fileComment->setText(sender->text() + " is offering you to download a file");
|
||||
fileComment->setText(tr("%1 is offering you to download a file").arg(sender->text()));
|
||||
}
|
||||
fileComment->show();
|
||||
connect(downloadButton, SIGNAL(clicked()), this, SLOT(onDownload()));
|
||||
|
@ -188,7 +188,7 @@ void Message::showFile(const QString& path)
|
|||
fileComment->show();
|
||||
}
|
||||
file->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
QAction* openAction = new QAction(QIcon::fromTheme("document-new-from-template"), "Open", file);
|
||||
QAction* openAction = new QAction(QIcon::fromTheme("document-new-from-template"), tr("Open"), file);
|
||||
connect(openAction, &QAction::triggered, [path]() { //TODO need to get rid of this shame
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
|
||||
});
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
<property name="toolTip">
|
||||
<string>Your account login</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>john_smith1987</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
|
@ -53,6 +56,9 @@
|
|||
<property name="toolTip">
|
||||
<string>A server address of your account. Like 404.city or macaw.me</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>macaw.me</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
@ -83,6 +89,9 @@
|
|||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
@ -100,6 +109,9 @@
|
|||
<property name="toolTip">
|
||||
<string>Just a name how would you call this account, doesn't affect anything</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>John</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
|
|
|
@ -120,13 +120,13 @@ void Accounts::updateConnectButton()
|
|||
}
|
||||
if (allConnected) {
|
||||
toDisconnect = true;
|
||||
m_ui->connectButton->setText("Disconnect");
|
||||
m_ui->connectButton->setText(tr("Disconnect"));
|
||||
} else {
|
||||
toDisconnect = false;
|
||||
m_ui->connectButton->setText("Connect");
|
||||
m_ui->connectButton->setText(tr("Connect"));
|
||||
}
|
||||
} else {
|
||||
m_ui->connectButton->setText("Connect");
|
||||
m_ui->connectButton->setText(tr("Connect"));
|
||||
toDisconnect = false;
|
||||
m_ui->connectButton->setEnabled(false);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ void Chat::updateState()
|
|||
{
|
||||
Shared::Availability av = contact->getAvailability();
|
||||
statusIcon->setPixmap(Shared::availabilityIcon(av, true).pixmap(40));
|
||||
statusIcon->setToolTip(Shared::availabilityNames[av]);
|
||||
statusIcon->setToolTip(QCoreApplication::translate("Global", Shared::availabilityNames[av].toLatin1()));
|
||||
}
|
||||
|
||||
void Chat::handleSendMessage(const QString& text)
|
||||
|
|
|
@ -445,6 +445,9 @@
|
|||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Type your message here...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue