From 31f8a4308e9c9492c700aa6b9d944a1304d6f1a4 Mon Sep 17 00:00:00 2001 From: agilob Date: Wed, 5 Nov 2014 22:47:52 +0000 Subject: [PATCH] window titles --- src/widget/widget.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index e96f7753c..5dbf7d076 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -518,6 +518,7 @@ void Widget::onAddClicked() { hideMainForms(); addFriendForm->show(*ui); + setWindowTitle(tr("Add friend") + " - qTox"); } void Widget::onGroupClicked() @@ -529,6 +530,7 @@ void Widget::onTransferClicked() { hideMainForms(); filesForm->show(*ui); + setWindowTitle(tr("File transfers") + " - qTox"); activeChatroomWidget = nullptr; } @@ -553,6 +555,7 @@ void Widget::onSettingsClicked() { hideMainForms(); settingsWidget->show(*ui); + setWindowTitle(tr("Settings") + " - qTox"); activeChatroomWidget = nullptr; } @@ -712,6 +715,7 @@ void Widget::onChatroomWidgetClicked(GenericChatroomWidget *widget) } activeChatroomWidget = widget; widget->setAsActiveChatroom(); + setWindowTitle(widget->getName() + " - qTox"); widget->resetEventFlags(); widget->updateStatusLight(); } @@ -959,10 +963,7 @@ bool Widget::isFriendWidgetCurActiveWidget(Friend* f) if (!f) return false; - if (activeChatroomWidget == static_cast(f->widget)) - return true; - else - return false; + return (activeChatroomWidget == static_cast(f->widget)); } bool Widget::event(QEvent * e)