Added new option for GxsForums and FeedReader - Open all forums/feeds in new tab.

Option=on (standard)
- no standard tab
- new tab by single click
- no menu entry "Open in new tab"

Option=off:
- standard tab (not closeable)
- open in standard tab by single click
- menu entry "Open in new tab"
- open new tab with middle mouse button


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6060 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-01-06 02:30:10 +00:00
parent 9cfe660e11
commit f488dbd15a
30 changed files with 425 additions and 185 deletions

View file

@ -42,7 +42,8 @@ bool
ForumPage::save(QString &/*errmsg*/)
{
Settings->setForumMsgSetToReadOnActivate(ui.setMsgToReadOnActivate->isChecked());
Settings->setExpandNewMessages(ui.expandNewMessages->isChecked());
Settings->setForumExpandNewMessages(ui.expandNewMessages->isChecked());
Settings->setForumOpenAllInNewTab(ui.openAllInNewTabCheckBox->isChecked());
return true;
}
@ -52,5 +53,6 @@ void
ForumPage::load()
{
ui.setMsgToReadOnActivate->setChecked(Settings->getForumMsgSetToReadOnActivate());
ui.expandNewMessages->setChecked(Settings->getExpandNewMessages());
ui.expandNewMessages->setChecked(Settings->getForumExpandNewMessages());
ui.openAllInNewTabCheckBox->setChecked(Settings->getForumOpenAllInNewTab());
}

View file

@ -34,7 +34,7 @@
</layout>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -47,6 +47,22 @@
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="gxsGroupBox">
<property name="title">
<string>New forum</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="openAllInNewTabCheckBox">
<property name="text">
<string>Open all forums in new tab</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>

View file

@ -39,6 +39,7 @@
#include "ForumPage.h"
#include "PluginsPage.h"
#include "rsharesettings.h"
#include "gui/notifyqt.h"
#define IMAGE_GENERAL ":/images/kcmsystem24.png"
@ -202,5 +203,9 @@ RSettingsWin::saveChanges()
/* call to RsIface save function.... */
//rsicontrol -> ConfigSave();
if (NotifyQt::getInstance()) {
NotifyQt::getInstance()->notifySettingsChanged();
}
close();
}

View file

@ -698,9 +698,9 @@ bool RshareSettings::getMsgSetToReadOnActivate ()
return valueFromGroup("MessageDialog", "SetMsgToReadOnActivate", true).toBool();
}
void RshareSettings::setMsgSetToReadOnActivate (bool bValue)
void RshareSettings::setMsgSetToReadOnActivate (bool value)
{
setValueToGroup("MessageDialog", "SetMsgToReadOnActivate", bValue);
setValueToGroup("MessageDialog", "SetMsgToReadOnActivate", value);
}
RshareSettings::enumMsgOpen RshareSettings::getMsgOpen()
@ -735,19 +735,29 @@ bool RshareSettings::getForumMsgSetToReadOnActivate ()
return valueFromGroup("ForumDialog", "SetMsgToReadOnActivate", true).toBool();
}
void RshareSettings::setForumMsgSetToReadOnActivate (bool bValue)
void RshareSettings::setForumMsgSetToReadOnActivate(bool value)
{
setValueToGroup("ForumDialog", "SetMsgToReadOnActivate", bValue);
setValueToGroup("ForumDialog", "SetMsgToReadOnActivate", value);
}
bool RshareSettings::getExpandNewMessages()
bool RshareSettings::getForumExpandNewMessages()
{
return valueFromGroup("ForumDialog", "ExpandNewMessages", true).toBool();
}
void RshareSettings::setExpandNewMessages (bool bValue)
void RshareSettings::setForumExpandNewMessages(bool value)
{
setValueToGroup("ForumDialog", "ExpandNewMessages", bValue);
setValueToGroup("ForumDialog", "ExpandNewMessages", value);
}
bool RshareSettings::getForumOpenAllInNewTab()
{
return valueFromGroup("ForumDialog", "OpenAllInNewTab", true).toBool();
}
bool RshareSettings::setForumOpenAllInNewTab(bool value)
{
setValueToGroup("ForumDialog", "OpenAllInNewTab", value);
}
/* time before idle */

View file

@ -236,21 +236,23 @@ public:
void setStatusBarFlag(uint flag, bool enable);
/* Messages */
bool getMsgSetToReadOnActivate ();
void setMsgSetToReadOnActivate (bool bValue);
bool getMsgSetToReadOnActivate();
void setMsgSetToReadOnActivate(bool value);
enumMsgOpen getMsgOpen();
void setMsgOpen(enumMsgOpen value);
/* Forums */
bool getForumMsgSetToReadOnActivate ();
void setForumMsgSetToReadOnActivate (bool bValue);
bool getExpandNewMessages ();
void setExpandNewMessages (bool bValue);
bool getForumMsgSetToReadOnActivate();
void setForumMsgSetToReadOnActivate(bool value);
bool getForumExpandNewMessages();
void setForumExpandNewMessages(bool value);
bool getForumOpenAllInNewTab();
bool setForumOpenAllInNewTab(bool value);
/* time before idle */
uint getMaxTimeBeforeIdle();
void setMaxTimeBeforeIdle(uint nValue);
void setMaxTimeBeforeIdle(uint value);
protected:
/** Default constructor. */