add fancier tray icons with status, remove relevant option
BIN
img/taskbar/taskbar_busy.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
img/taskbar/taskbar_busy_2x.png
Normal file
After Width: | Height: | Size: 716 B |
BIN
img/taskbar/taskbar_idle.png
Normal file
After Width: | Height: | Size: 410 B |
BIN
img/taskbar/taskbar_idle_2x.png
Normal file
After Width: | Height: | Size: 719 B |
BIN
img/taskbar/taskbar_invisible.png
Normal file
After Width: | Height: | Size: 478 B |
BIN
img/taskbar/taskbar_invisible_2x.png
Normal file
After Width: | Height: | Size: 704 B |
BIN
img/taskbar/taskbar_offline.png
Normal file
After Width: | Height: | Size: 395 B |
BIN
img/taskbar/taskbar_offline_2x.png
Normal file
After Width: | Height: | Size: 711 B |
BIN
img/taskbar/taskbar_online.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
img/taskbar/taskbar_online_2x.png
Normal file
After Width: | Height: | Size: 637 B |
4
res.qrc
@ -37,6 +37,10 @@
|
|||||||
<file>img/status/dot_online.png</file>
|
<file>img/status/dot_online.png</file>
|
||||||
<file>img/status/dot_online_2x.png</file>
|
<file>img/status/dot_online_2x.png</file>
|
||||||
<file>img/status/dot_online_notification.png</file>
|
<file>img/status/dot_online_notification.png</file>
|
||||||
|
<file>img/taskbar/taskbar_online_2x.png</file>
|
||||||
|
<file>img/taskbar/taskbar_idle_2x.png</file>
|
||||||
|
<file>img/taskbar/taskbar_busy_2x.png</file>
|
||||||
|
<file>img/taskbar/taskbar_offline_2x.png</file>
|
||||||
<file>img/transfer.png</file>
|
<file>img/transfer.png</file>
|
||||||
<file>smileys/cylgom/angel.png</file>
|
<file>smileys/cylgom/angel.png</file>
|
||||||
<file>smileys/cylgom/angry.png</file>
|
<file>smileys/cylgom/angry.png</file>
|
||||||
|
@ -129,7 +129,6 @@ void Settings::load()
|
|||||||
makeToxPortable = s.value("makeToxPortable", false).toBool();
|
makeToxPortable = s.value("makeToxPortable", false).toBool();
|
||||||
autostartInTray = s.value("autostartInTray", false).toBool();
|
autostartInTray = s.value("autostartInTray", false).toBool();
|
||||||
closeToTray = s.value("closeToTray", false).toBool();
|
closeToTray = s.value("closeToTray", false).toBool();
|
||||||
trayShowsUserStatus = s.value("trayShowsUserStatus", false).toBool();
|
|
||||||
forceTCP = s.value("forceTCP", false).toBool();
|
forceTCP = s.value("forceTCP", false).toBool();
|
||||||
useProxy = s.value("useProxy", false).toBool();
|
useProxy = s.value("useProxy", false).toBool();
|
||||||
proxyAddr = s.value("proxyAddr", "").toString();
|
proxyAddr = s.value("proxyAddr", "").toString();
|
||||||
@ -281,7 +280,6 @@ void Settings::save(QString path, bool writeFriends)
|
|||||||
s.setValue("showSystemTray", showSystemTray);
|
s.setValue("showSystemTray", showSystemTray);
|
||||||
s.setValue("autostartInTray",autostartInTray);
|
s.setValue("autostartInTray",autostartInTray);
|
||||||
s.setValue("closeToTray", closeToTray);
|
s.setValue("closeToTray", closeToTray);
|
||||||
s.setValue("trayShowsUserStatus", trayShowsUserStatus);
|
|
||||||
s.setValue("useProxy", useProxy);
|
s.setValue("useProxy", useProxy);
|
||||||
s.setValue("forceTCP", forceTCP);
|
s.setValue("forceTCP", forceTCP);
|
||||||
s.setValue("proxyAddr", proxyAddr);
|
s.setValue("proxyAddr", proxyAddr);
|
||||||
@ -521,16 +519,6 @@ void Settings::setCloseToTray(bool newValue)
|
|||||||
closeToTray = newValue;
|
closeToTray = newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::getTrayShowsUserStatus() const
|
|
||||||
{
|
|
||||||
return trayShowsUserStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Settings::setTrayShowsUserStatus(bool newValue)
|
|
||||||
{
|
|
||||||
trayShowsUserStatus = newValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Settings::getMinimizeToTray() const
|
bool Settings::getMinimizeToTray() const
|
||||||
{
|
{
|
||||||
return minimizeToTray;
|
return minimizeToTray;
|
||||||
|
@ -58,9 +58,6 @@ public:
|
|||||||
|
|
||||||
bool getCloseToTray() const;
|
bool getCloseToTray() const;
|
||||||
void setCloseToTray(bool newValue);
|
void setCloseToTray(bool newValue);
|
||||||
|
|
||||||
bool getTrayShowsUserStatus() const;
|
|
||||||
void setTrayShowsUserStatus(bool newValue);
|
|
||||||
|
|
||||||
bool getMinimizeToTray() const;
|
bool getMinimizeToTray() const;
|
||||||
void setMinimizeToTray(bool newValue);
|
void setMinimizeToTray(bool newValue);
|
||||||
@ -247,7 +244,6 @@ private:
|
|||||||
bool autostartInTray;
|
bool autostartInTray;
|
||||||
bool closeToTray;
|
bool closeToTray;
|
||||||
bool minimizeToTray;
|
bool minimizeToTray;
|
||||||
bool trayShowsUserStatus;
|
|
||||||
bool useEmoticons;
|
bool useEmoticons;
|
||||||
bool checkUpdates;
|
bool checkUpdates;
|
||||||
bool showInFront;
|
bool showInFront;
|
||||||
|
@ -62,8 +62,6 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
|||||||
bodyUI->closeToTray->setEnabled(showSystemTray);
|
bodyUI->closeToTray->setEnabled(showSystemTray);
|
||||||
bodyUI->minimizeToTray->setChecked(Settings::getInstance().getMinimizeToTray());
|
bodyUI->minimizeToTray->setChecked(Settings::getInstance().getMinimizeToTray());
|
||||||
bodyUI->minimizeToTray->setEnabled(showSystemTray);
|
bodyUI->minimizeToTray->setEnabled(showSystemTray);
|
||||||
bodyUI->trayShowsUserStatus->setChecked(Settings::getInstance().getTrayShowsUserStatus());
|
|
||||||
bodyUI->trayShowsUserStatus->setEnabled(showSystemTray);
|
|
||||||
bodyUI->statusChanges->setChecked(Settings::getInstance().getStatusChangeNotificationEnabled());
|
bodyUI->statusChanges->setChecked(Settings::getInstance().getStatusChangeNotificationEnabled());
|
||||||
bodyUI->useEmoticons->setChecked(Settings::getInstance().getUseEmoticons());
|
bodyUI->useEmoticons->setChecked(Settings::getInstance().getUseEmoticons());
|
||||||
bodyUI->autoacceptFiles->setChecked(Settings::getInstance().getAutoSaveEnabled());
|
bodyUI->autoacceptFiles->setChecked(Settings::getInstance().getAutoSaveEnabled());
|
||||||
@ -122,7 +120,6 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
|||||||
connect(bodyUI->startInTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetAutostartInTray);
|
connect(bodyUI->startInTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetAutostartInTray);
|
||||||
connect(bodyUI->closeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetCloseToTray);
|
connect(bodyUI->closeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetCloseToTray);
|
||||||
connect(bodyUI->minimizeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetMinimizeToTray);
|
connect(bodyUI->minimizeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetMinimizeToTray);
|
||||||
connect(bodyUI->trayShowsUserStatus, &QCheckBox::stateChanged, this, &GeneralForm::onSettrayShowsUserStatus);
|
|
||||||
connect(bodyUI->statusChanges, &QCheckBox::stateChanged, this, &GeneralForm::onSetStatusChange);
|
connect(bodyUI->statusChanges, &QCheckBox::stateChanged, this, &GeneralForm::onSetStatusChange);
|
||||||
connect(bodyUI->autoAwaySpinBox, SIGNAL(editingFinished()), this, SLOT(onAutoAwayChanged()));
|
connect(bodyUI->autoAwaySpinBox, SIGNAL(editingFinished()), this, SLOT(onAutoAwayChanged()));
|
||||||
connect(bodyUI->showInFront, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowInFront);
|
connect(bodyUI->showInFront, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowInFront);
|
||||||
@ -193,12 +190,6 @@ void GeneralForm::onSetMinimizeToTray()
|
|||||||
Settings::getInstance().setMinimizeToTray(bodyUI->minimizeToTray->isChecked());
|
Settings::getInstance().setMinimizeToTray(bodyUI->minimizeToTray->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralForm::onSettrayShowsUserStatus()
|
|
||||||
{
|
|
||||||
Settings::getInstance().setTrayShowsUserStatus(bodyUI->trayShowsUserStatus->isChecked());
|
|
||||||
Widget::getInstance()->updateTrayIcon();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GeneralForm::onStyleSelected(QString style)
|
void GeneralForm::onStyleSelected(QString style)
|
||||||
{
|
{
|
||||||
if(bodyUI->styleBrowser->currentIndex() == 0)
|
if(bodyUI->styleBrowser->currentIndex() == 0)
|
||||||
|
@ -49,7 +49,6 @@ private slots:
|
|||||||
void onAutoAwayChanged();
|
void onAutoAwayChanged();
|
||||||
void onUseEmoticonsChange();
|
void onUseEmoticonsChange();
|
||||||
void onSetMinimizeToTray();
|
void onSetMinimizeToTray();
|
||||||
void onSettrayShowsUserStatus();
|
|
||||||
void onReconnectClicked();
|
void onReconnectClicked();
|
||||||
void onAutoAcceptFileChange();
|
void onAutoAcceptFileChange();
|
||||||
void onAutoSaveDirChange();
|
void onAutoSaveDirChange();
|
||||||
|
@ -152,22 +152,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="trayShowsUserStatus">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Tray icon displays user status</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>This is a temporary work around until proper systray status icons are available.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -607,21 +591,5 @@
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>showSystemTray</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>trayShowsUserStatus</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>148</x>
|
|
||||||
<y>143</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>158</x>
|
|
||||||
<y>205</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -295,22 +295,17 @@ void Widget::setTranslation()
|
|||||||
|
|
||||||
void Widget::updateTrayIcon()
|
void Widget::updateTrayIcon()
|
||||||
{
|
{
|
||||||
if(Settings::getInstance().getTrayShowsUserStatus())
|
QString status = ui->statusButton->property("status").toString();
|
||||||
{
|
QString icon;
|
||||||
QString status = ui->statusButton->property("status").toString();
|
if(status == "online")
|
||||||
QString icon;
|
icon = ":img/taskbar/taskbar_online_2x.png";
|
||||||
if(status == "online")
|
else if(status == "away")
|
||||||
icon = ":img/status/dot_online_2x.png";
|
icon = ":img/taskbar/taskbar_idle_2x.png";
|
||||||
else if(status == "away")
|
else if(status == "busy")
|
||||||
icon = ":img/status/dot_idle_2x.png";
|
icon = ":img/taskbar/taskbar_busy_2x.png";
|
||||||
else if(status == "busy")
|
|
||||||
icon = ":img/status/dot_busy_2x.png";
|
|
||||||
else
|
|
||||||
icon = ":img/status/dot_away_2x.png";
|
|
||||||
this->icon->setIcon(QIcon(icon));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
icon->setIcon(windowIcon());
|
icon = ":img/taskbar/taskbar_offline_2x.png";
|
||||||
|
this->icon->setIcon(QIcon(icon));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget::~Widget()
|
Widget::~Widget()
|
||||||
|