mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-11 14:56:09 -05:00
Added settings for the blinking icons
- private chat window/tab - chat lobby tab - all tray notifier git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5729 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
03e521c024
commit
af2257b1a9
28 changed files with 217 additions and 29 deletions
|
|
@ -165,9 +165,18 @@ ChatPage::save(QString &/*errmsg*/)
|
|||
chatflags |= RS_CHAT_FOCUS;
|
||||
if (ui.chat_tabbedWindow->isChecked())
|
||||
chatflags |= RS_CHAT_TABBED_WINDOW;
|
||||
if (ui.chat_Blink->isChecked())
|
||||
chatflags |= RS_CHAT_BLINK;
|
||||
|
||||
Settings->setChatFlags(chatflags);
|
||||
|
||||
uint chatLobbyFlags = 0;
|
||||
|
||||
if (ui.chatLobby_Blink->isChecked())
|
||||
chatLobbyFlags |= RS_CHATLOBBY_BLINK;
|
||||
|
||||
Settings->setChatLobbyFlags(chatLobbyFlags);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -215,6 +224,11 @@ ChatPage::load()
|
|||
ui.chat_NewWindow->setChecked(chatflags & RS_CHAT_OPEN);
|
||||
ui.chat_Focus->setChecked(chatflags & RS_CHAT_FOCUS);
|
||||
ui.chat_tabbedWindow->setChecked(chatflags & RS_CHAT_TABBED_WINDOW);
|
||||
ui.chat_Blink->setChecked(chatflags & RS_CHAT_BLINK);
|
||||
|
||||
uint chatLobbyFlags = Settings->getChatLobbyFlags();
|
||||
|
||||
ui.chatLobby_Blink->setChecked(chatLobbyFlags & RS_CHATLOBBY_BLINK);
|
||||
}
|
||||
|
||||
void ChatPage::on_pushButtonChangeChatFont_clicked()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>444</width>
|
||||
<height>378</height>
|
||||
<height>390</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
|
|
@ -148,6 +148,13 @@
|
|||
<string>Chat Lobby</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chatLobby_Blink">
|
||||
<property name="text">
|
||||
<string>Blink tab icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
|
|
@ -232,6 +239,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chat_Blink">
|
||||
<property name="text">
|
||||
<string>Blink window/tab icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
|
|
@ -61,9 +61,13 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WFlags flags)
|
|||
|
||||
QCheckBox *combinedCheckBox = new QCheckBox(tr("Combined"), this);
|
||||
combinedCheckBox->setFont(font);
|
||||
ui.notifyLayout->addWidget(combinedCheckBox, row++, 1);
|
||||
ui.notifyLayout->addWidget(combinedCheckBox, row, 1);
|
||||
|
||||
mUserNotifySettingList.push_back(UserNotifySetting(userNotify, enabledCheckBox, combinedCheckBox));
|
||||
QCheckBox *blinkCheckBox = new QCheckBox(tr("Blink"), this);
|
||||
blinkCheckBox->setFont(font);
|
||||
ui.notifyLayout->addWidget(blinkCheckBox, row++, 2);
|
||||
|
||||
mUserNotifySettingList.push_back(UserNotifySetting(userNotify, enabledCheckBox, combinedCheckBox, blinkCheckBox));
|
||||
}
|
||||
|
||||
/* Hide platform specific features */
|
||||
|
|
@ -134,7 +138,7 @@ NotifyPage::save(QString &/*errmsg*/)
|
|||
/* save user notify */
|
||||
QList<UserNotifySetting>::iterator notifyIt;
|
||||
for (notifyIt = mUserNotifySettingList.begin(); notifyIt != mUserNotifySettingList.end(); ++notifyIt) {
|
||||
notifyIt->mUserNotify->setNotifyEnabled(notifyIt->mEnabledCheckBox->isChecked(), notifyIt->mCombinedCheckBox->isChecked());
|
||||
notifyIt->mUserNotify->setNotifyEnabled(notifyIt->mEnabledCheckBox->isChecked(), notifyIt->mCombinedCheckBox->isChecked(), notifyIt->mBlinkCheckBox->isChecked());
|
||||
}
|
||||
|
||||
Settings->setNotifyFlags(getNotifyFlags());
|
||||
|
|
@ -219,6 +223,7 @@ void NotifyPage::load()
|
|||
for (notifyIt = mUserNotifySettingList.begin(); notifyIt != mUserNotifySettingList.end(); ++notifyIt) {
|
||||
notifyIt->mEnabledCheckBox->setChecked(notifyIt->mUserNotify->notifyEnabled());
|
||||
notifyIt->mCombinedCheckBox->setChecked(notifyIt->mUserNotify->notifyCombined());
|
||||
notifyIt->mBlinkCheckBox->setChecked(notifyIt->mUserNotify->notifyBlink());
|
||||
}
|
||||
|
||||
notifyToggled();
|
||||
|
|
@ -230,9 +235,13 @@ void NotifyPage::notifyToggled()
|
|||
for (notifyIt = mUserNotifySettingList.begin(); notifyIt != mUserNotifySettingList.end(); ++notifyIt) {
|
||||
if (notifyIt->mEnabledCheckBox->isChecked()) {
|
||||
notifyIt->mCombinedCheckBox->setEnabled(true);
|
||||
notifyIt->mBlinkCheckBox->setEnabled(true);
|
||||
} else {
|
||||
notifyIt->mCombinedCheckBox->setChecked(false);
|
||||
notifyIt->mCombinedCheckBox->setEnabled(false);
|
||||
|
||||
notifyIt->mBlinkCheckBox->setChecked(false);
|
||||
notifyIt->mBlinkCheckBox->setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,10 +33,11 @@ public:
|
|||
UserNotify *mUserNotify;
|
||||
QCheckBox *mEnabledCheckBox;
|
||||
QCheckBox *mCombinedCheckBox;
|
||||
QCheckBox *mBlinkCheckBox;
|
||||
|
||||
public:
|
||||
UserNotifySetting(UserNotify *userNotify, QCheckBox *enabledCheckBox, QCheckBox *combinedCheckBox)
|
||||
: mUserNotify(userNotify), mEnabledCheckBox(enabledCheckBox), mCombinedCheckBox(combinedCheckBox) {}
|
||||
UserNotifySetting(UserNotify *userNotify, QCheckBox *enabledCheckBox, QCheckBox *combinedCheckBox, QCheckBox *blinkCheckBox)
|
||||
: mUserNotify(userNotify), mEnabledCheckBox(enabledCheckBox), mCombinedCheckBox(combinedCheckBox), mBlinkCheckBox(blinkCheckBox) {}
|
||||
};
|
||||
|
||||
class NotifyPage : public ConfigPage
|
||||
|
|
|
|||
|
|
@ -295,6 +295,16 @@ void RshareSettings::setChatFlags(uint flags)
|
|||
setValue(SETTING_CHAT_FLAGS, flags);
|
||||
}
|
||||
|
||||
uint RshareSettings::getChatLobbyFlags()
|
||||
{
|
||||
return value("ChatLobbyFlags").toUInt();
|
||||
}
|
||||
|
||||
void RshareSettings::setChatLobbyFlags(uint flags)
|
||||
{
|
||||
setValue("ChatLobbyFlags", flags);
|
||||
}
|
||||
|
||||
uint RshareSettings::getNotifyFlags()
|
||||
{
|
||||
return value(SETTING_NOTIFY_FLAGS).toUInt();
|
||||
|
|
@ -315,6 +325,16 @@ void RshareSettings::setTrayNotifyFlags(uint flags)
|
|||
setValue(SETTING_TRAYNOTIFY_FLAGS, flags);
|
||||
}
|
||||
|
||||
uint RshareSettings::getTrayNotifyBlinkFlags()
|
||||
{
|
||||
return value("TrayNotifyBlinkFlags", 0).toUInt();
|
||||
}
|
||||
|
||||
void RshareSettings::setTrayNotifyBlinkFlags(uint flags)
|
||||
{
|
||||
setValue("TrayNotifyBlinkFlags", flags);
|
||||
}
|
||||
|
||||
uint RshareSettings::getMessageFlags()
|
||||
{
|
||||
return value("MessageFlags").toUInt();
|
||||
|
|
|
|||
|
|
@ -43,6 +43,14 @@
|
|||
#define TRAYNOTIFY_FORUMS_COMBINED 0x00000100
|
||||
#define TRAYNOTIFY_TRANSFERS_COMBINED 0x00000200
|
||||
|
||||
#define TRAYNOTIFY_BLINK_PRIVATECHAT 0x00000001
|
||||
#define TRAYNOTIFY_BLINK_MESSAGES 0x00000002
|
||||
#define TRAYNOTIFY_BLINK_CHANNELS 0x00000004
|
||||
#define TRAYNOTIFY_BLINK_FORUMS 0x00000008
|
||||
#define TRAYNOTIFY_BLINK_TRANSFERS 0x00000010
|
||||
|
||||
#define RS_CHATLOBBY_BLINK 0x00000001
|
||||
|
||||
#define STATUSBAR_DISC 0x00000001
|
||||
|
||||
//Forward declaration.
|
||||
|
|
@ -155,12 +163,18 @@ public:
|
|||
uint getChatFlags();
|
||||
void setChatFlags(uint flags);
|
||||
|
||||
uint getChatLobbyFlags();
|
||||
void setChatLobbyFlags(uint flags);
|
||||
|
||||
uint getNotifyFlags();
|
||||
void setNotifyFlags(uint flags);
|
||||
|
||||
uint getTrayNotifyFlags();
|
||||
void setTrayNotifyFlags(uint flags);
|
||||
|
||||
uint getTrayNotifyBlinkFlags();
|
||||
void setTrayNotifyBlinkFlags(uint flags);
|
||||
|
||||
uint getMessageFlags();
|
||||
void setMessageFlags(uint flags);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue