mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-25 23:06:10 -05:00
New setting for adding the feeds at the end in friend storm.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3422 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7f837e9778
commit
e67412cc8c
@ -155,6 +155,15 @@ void NewsFeed::updateFeed()
|
||||
}
|
||||
}
|
||||
|
||||
void NewsFeed::addFeedItem(QWidget *item)
|
||||
{
|
||||
if (Settings->getAddFeedsAtEnd()) {
|
||||
verticalLayout->addWidget(item);
|
||||
} else {
|
||||
verticalLayout->insertWidget(0, item);
|
||||
}
|
||||
}
|
||||
|
||||
void NewsFeed::addFeedItemPeerConnect(RsFeedItem &fi)
|
||||
{
|
||||
/* make new widget */
|
||||
@ -163,7 +172,7 @@ void NewsFeed::addFeedItemPeerConnect(RsFeedItem &fi)
|
||||
/* store */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, pi);
|
||||
addFeedItem(pi);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemPeerConnect()";
|
||||
@ -181,9 +190,7 @@ void NewsFeed::addFeedItemPeerDisconnect(RsFeedItem &fi)
|
||||
/* store */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, pi);
|
||||
|
||||
|
||||
addFeedItem(pi);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemPeerDisconnect()";
|
||||
@ -200,8 +207,7 @@ void NewsFeed::addFeedItemPeerHello(RsFeedItem &fi)
|
||||
/* store */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, pi);
|
||||
|
||||
addFeedItem(pi);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemPeerHello()";
|
||||
@ -218,7 +224,7 @@ void NewsFeed::addFeedItemPeerNew(RsFeedItem &fi)
|
||||
/* store */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, pi);
|
||||
addFeedItem(pi);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemPeerNew()";
|
||||
@ -235,7 +241,7 @@ void NewsFeed::addFeedItemChanNew(RsFeedItem &fi)
|
||||
/* store in list */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, cni);
|
||||
addFeedItem(cni);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemChanNew()";
|
||||
@ -252,7 +258,7 @@ void NewsFeed::addFeedItemChanUpdate(RsFeedItem &fi)
|
||||
/* store in list */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, cni);
|
||||
addFeedItem(cni);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemChanUpdate()";
|
||||
@ -269,7 +275,7 @@ void NewsFeed::addFeedItemChanMsg(RsFeedItem &fi)
|
||||
/* store in forum list */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, cm);
|
||||
addFeedItem(cm);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemChanMsg()";
|
||||
@ -287,8 +293,7 @@ void NewsFeed::addFeedItemForumNew(RsFeedItem &fi)
|
||||
mForumNewItems.push_back(fni);
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, fni);
|
||||
|
||||
addFeedItem(fni);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemForumNew()";
|
||||
@ -306,7 +311,7 @@ void NewsFeed::addFeedItemForumUpdate(RsFeedItem &fi)
|
||||
mForumNewItems.push_back(fni);
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, fni);
|
||||
addFeedItem(fni);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemForumUpdate()";
|
||||
@ -323,7 +328,7 @@ void NewsFeed::addFeedItemForumMsg(RsFeedItem &fi)
|
||||
/* store in forum list */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, fm);
|
||||
addFeedItem(fm);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemForumMsg()";
|
||||
@ -340,7 +345,7 @@ void NewsFeed::addFeedItemBlogNew(RsFeedItem &fi)
|
||||
/* store in list */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, bni);
|
||||
addFeedItem(bni);
|
||||
#endif
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
@ -358,7 +363,7 @@ void NewsFeed::addFeedItemBlogMsg(RsFeedItem &fi)
|
||||
/* store in forum list */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, bm);
|
||||
addFeedItem(bm);
|
||||
#endif
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
@ -386,7 +391,7 @@ void NewsFeed::addFeedItemChatNew(RsFeedItem &fi)
|
||||
/* store in forum list */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, cm);
|
||||
addFeedItem(cm);
|
||||
}
|
||||
|
||||
void NewsFeed::addFeedItemMessage(RsFeedItem &fi)
|
||||
@ -397,7 +402,7 @@ void NewsFeed::addFeedItemMessage(RsFeedItem &fi)
|
||||
/* store in list */
|
||||
|
||||
/* add to layout */
|
||||
verticalLayout->insertWidget(0, mi);
|
||||
addFeedItem(mi);
|
||||
|
||||
#ifdef NEWS_DEBUG
|
||||
std::cerr << "NewsFeed::addFeedItemMessage()";
|
||||
|
@ -51,6 +51,7 @@ private slots:
|
||||
void updateFeed();
|
||||
|
||||
private:
|
||||
void addFeedItem(QWidget *item);
|
||||
|
||||
void addFeedItemPeerConnect(RsFeedItem &fi);
|
||||
void addFeedItemPeerDisconnect(RsFeedItem &fi);
|
||||
|
@ -113,6 +113,8 @@ NotifyPage::save(QString &errmsg)
|
||||
Settings->setDisplayTrayGroupChat(ui.systray_GroupChat->isChecked());
|
||||
MainWindow::installGroupChatNotifier();
|
||||
|
||||
Settings->setAddFeedsAtEnd(ui.addFeedsAtEnd->isChecked());
|
||||
|
||||
load();
|
||||
return true;
|
||||
}
|
||||
@ -128,7 +130,6 @@ void NotifyPage::load()
|
||||
|
||||
ui.popup_Connect->setChecked(notifyflags & RS_POPUP_CONNECT);
|
||||
ui.popup_NewMsg->setChecked(notifyflags & RS_POPUP_MSG);
|
||||
ui.systray_GroupChat->setChecked(true) ;
|
||||
//ui.popup_NewChat->setChecked(notifyflags & RS_POPUP_CHAT);
|
||||
//ui.popup_Call->setChecked(notifyflags & RS_POPUP_CALL);
|
||||
|
||||
@ -146,8 +147,7 @@ void NotifyPage::load()
|
||||
|
||||
ui.systray_GroupChat->setChecked(Settings->getDisplayTrayGroupChat());
|
||||
|
||||
/* disable ones that don't work yet */
|
||||
|
||||
ui.addFeedsAtEnd->setChecked(Settings->getAddFeedsAtEnd());
|
||||
}
|
||||
|
||||
|
||||
|
@ -558,6 +558,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="addFeedsAtEnd">
|
||||
<property name="text">
|
||||
<string>Add feeds at end</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -136,6 +136,7 @@ void RshareSettings::initSettings()
|
||||
setDefault(SETTING_NOTIFY_FLAGS, defNotify);
|
||||
|
||||
setDefault("DisplayTrayGroupChat", true);
|
||||
setDefault("AddFeedsAtEnd", false);
|
||||
}
|
||||
|
||||
/** Gets/sets the currently saved chat avatar. */
|
||||
@ -278,6 +279,16 @@ void RshareSettings::setDisplayTrayGroupChat(bool bValue)
|
||||
setValue("DisplayTrayGroupChat", bValue);
|
||||
}
|
||||
|
||||
bool RshareSettings::getAddFeedsAtEnd()
|
||||
{
|
||||
return value("AddFeedsAtEnd").toBool();
|
||||
}
|
||||
|
||||
void RshareSettings::setAddFeedsAtEnd(bool bValue)
|
||||
{
|
||||
setValue("AddFeedsAtEnd", bValue);
|
||||
}
|
||||
|
||||
/** Returns true if RetroShare is set to run on system boot. */
|
||||
bool
|
||||
RshareSettings::runRetroshareOnBoot()
|
||||
|
@ -117,6 +117,9 @@ public:
|
||||
bool getDisplayTrayGroupChat();
|
||||
void setDisplayTrayGroupChat(bool bValue);
|
||||
|
||||
bool getAddFeedsAtEnd();
|
||||
void setAddFeedsAtEnd(bool bValue);
|
||||
|
||||
//! Save placement, state and size information of a window.
|
||||
void saveWidgetInformation(QWidget *widget);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user