mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
"overhaul" window title, fix #753
This commit is contained in:
parent
02e29d6600
commit
40addf9155
@ -46,7 +46,7 @@ void Friend::setName(QString name)
|
||||
chatForm->setName(name);
|
||||
|
||||
if (widget->isActive())
|
||||
Widget::getInstance()->setWindowTitle(name + " - qTox");
|
||||
Widget::getInstance()->setWindowTitle(name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,6 +57,9 @@ void Friend::setAlias(QString name)
|
||||
|
||||
widget->setName(dispName);
|
||||
chatForm->setName(dispName);
|
||||
|
||||
if (widget->isActive())
|
||||
Widget::getInstance()->setWindowTitle(dispName);
|
||||
}
|
||||
|
||||
void Friend::setStatusMessage(QString message)
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "friendlist.h"
|
||||
#include "friend.h"
|
||||
#include "core.h"
|
||||
#include "widget/widget.h"
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
|
||||
@ -74,4 +75,7 @@ void Group::setName(const QString& name)
|
||||
{
|
||||
widget->setName(name);
|
||||
chatForm->setName(name);
|
||||
|
||||
if (widget->isActive())
|
||||
Widget::getInstance()->setWindowTitle(name);
|
||||
}
|
||||
|
@ -235,8 +235,5 @@ void FriendWidget::setFriendAlias()
|
||||
Settings::getInstance().setFriendAlias(f->getToxID(), alias);
|
||||
hide();
|
||||
show();
|
||||
|
||||
if (f->getFriendWidget()->isActive())
|
||||
Widget::getInstance()->setWindowTitle(f->getFriendWidget()->getName() + " - qTox");
|
||||
}
|
||||
}
|
||||
|
@ -516,11 +516,16 @@ void Widget::onStatusSet(Status status)
|
||||
Style::repolish(ui->statusButton);
|
||||
}
|
||||
|
||||
void Widget::setWindowTitle(const QString& title)
|
||||
{
|
||||
QMainWindow::setWindowTitle("qTox - " + title);
|
||||
}
|
||||
|
||||
void Widget::onAddClicked()
|
||||
{
|
||||
hideMainForms();
|
||||
addFriendForm->show(*ui);
|
||||
setWindowTitle(tr("Add friend") + " - qTox");
|
||||
setWindowTitle(tr("Add friend"));
|
||||
}
|
||||
|
||||
void Widget::onGroupClicked()
|
||||
@ -532,7 +537,7 @@ void Widget::onTransferClicked()
|
||||
{
|
||||
hideMainForms();
|
||||
filesForm->show(*ui);
|
||||
setWindowTitle(tr("File transfers") + " - qTox");
|
||||
setWindowTitle(tr("File transfers"));
|
||||
activeChatroomWidget = nullptr;
|
||||
}
|
||||
|
||||
@ -557,7 +562,7 @@ void Widget::onSettingsClicked()
|
||||
{
|
||||
hideMainForms();
|
||||
settingsWidget->show(*ui);
|
||||
setWindowTitle(tr("Settings") + " - qTox");
|
||||
setWindowTitle(tr("Settings"));
|
||||
activeChatroomWidget = nullptr;
|
||||
}
|
||||
|
||||
@ -734,7 +739,7 @@ void Widget::onChatroomWidgetClicked(GenericChatroomWidget *widget)
|
||||
}
|
||||
activeChatroomWidget = widget;
|
||||
widget->setAsActiveChatroom();
|
||||
setWindowTitle(widget->getName() + " - qTox");
|
||||
setWindowTitle(widget->getName());
|
||||
widget->resetEventFlags();
|
||||
widget->updateStatusLight();
|
||||
}
|
||||
|
@ -79,6 +79,7 @@ public:
|
||||
|
||||
public slots:
|
||||
void onSettingsClicked();
|
||||
void setWindowTitle(const QString& title);
|
||||
|
||||
signals:
|
||||
void friendRequestAccepted(const QString& userId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user