mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added new column "Last Contact" to the FriendsDialog and MessengerWindow. Moved some more basic functions to FriendsList and optimized the exisiting code.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4669 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e315d4e48f
commit
e181127a30
@ -82,19 +82,6 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||
connect( ui.addfileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||
connect(ui.actionAdd_Friend, SIGNAL(triggered()), this, SLOT(addFriend()));
|
||||
|
||||
connect(ui.action_Hide_Offline_Friends, SIGNAL(toggled(bool)), ui.friendList, SLOT(setHideUnconnected(bool)));
|
||||
connect(ui.action_Hide_Status_Column, SIGNAL(toggled(bool)), ui.friendList, SLOT(setHideStatusColumn(bool)));
|
||||
connect(ui.action_Hide_Status_Column, SIGNAL(toggled(bool)), ui.friendList, SLOT(setHideHeader(bool)));
|
||||
connect(ui.action_Hide_Status_Column, SIGNAL(toggled(bool)), ui.action_Hide_State, SLOT(setEnabled(bool)));
|
||||
connect(ui.action_Hide_Avatar_Column, SIGNAL(toggled(bool)), ui.friendList, SLOT(setHideAvatarColumn(bool)));
|
||||
connect(ui.action_Hide_State, SIGNAL(toggled(bool)), ui.friendList, SLOT(setHideState(bool)));
|
||||
|
||||
connect(ui.action_Sort_by_State, SIGNAL(toggled(bool)), ui.friendList, SLOT(setSortByState(bool)));
|
||||
connect(ui.actionSort_Peers_Ascending_Order, SIGNAL(triggered()), ui.friendList, SLOT(sortPeersAscendingOrder()));
|
||||
connect(ui.actionSort_Peers_Descending_Order, SIGNAL(triggered()), ui.friendList, SLOT(sortPeersDescendingOrder()));
|
||||
|
||||
connect(ui.friendList, SIGNAL(peerSortColumnChanged(bool)), this, SLOT(peerSortColumnChanged(bool)));
|
||||
|
||||
ui.avatar->setFrameType(AvatarWidget::STATUS_FRAME);
|
||||
ui.avatar->setOwnId();
|
||||
|
||||
@ -177,10 +164,15 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||
ui.splitter_2->setSizes(sizes);
|
||||
|
||||
loadmypersonalstatus();
|
||||
displayMenu();
|
||||
ui.displayButton->setMenu(ui.friendList->createDisplayMenu());
|
||||
|
||||
// load settings
|
||||
RsAutoUpdatePage::lockAllEvents();
|
||||
ui.friendList->setShowStatusColumn(true);
|
||||
ui.friendList->setShowLastContactColumn(false);
|
||||
ui.friendList->setShowAvatarColumn(false);
|
||||
ui.friendList->setRootIsDecorated(true);
|
||||
ui.friendList->setShowGroups(true);
|
||||
processSettings(true);
|
||||
RsAutoUpdatePage::unlockAllEvents();
|
||||
|
||||
@ -213,66 +205,19 @@ void FriendsDialog::processSettings(bool bLoad)
|
||||
if (bLoad) {
|
||||
// load settings
|
||||
|
||||
// state of peer tree
|
||||
ui.friendList->restoreHeaderState(Settings->value("PeerTree").toByteArray());
|
||||
|
||||
// state of hideUnconnected
|
||||
ui.action_Hide_Offline_Friends->setChecked(Settings->value("hideUnconnected", false).toBool());
|
||||
|
||||
// state of the status
|
||||
ui.action_Hide_State->setChecked(Settings->value("hideState", false).toBool());
|
||||
|
||||
// state of hideStatusColumn
|
||||
ui.action_Hide_Status_Column->setChecked(Settings->value("hideStatusColumn", false).toBool());
|
||||
|
||||
// state of hideAvatar
|
||||
ui.action_Hide_Avatar_Column->setChecked(Settings->value("hideAvatar", true).toBool());
|
||||
|
||||
// state of splitter
|
||||
ui.splitter->restoreState(Settings->value("Splitter").toByteArray());
|
||||
ui.splitter_2->restoreState(Settings->value("GroupChatSplitter").toByteArray());
|
||||
|
||||
// open groups
|
||||
int arrayIndex = Settings->beginReadArray("Groups");
|
||||
for (int index = 0; index < arrayIndex; index++) {
|
||||
Settings->setArrayIndex(index);
|
||||
ui.friendList->addGroupToExpand(Settings->value("open").toString().toStdString());
|
||||
}
|
||||
Settings->endArray();
|
||||
} else {
|
||||
// save settings
|
||||
|
||||
// state of peer tree
|
||||
Settings->setValue("PeerTree", ui.friendList->saveHeaderState());
|
||||
|
||||
// state of hideUnconnected
|
||||
Settings->setValue("hideUnconnected", ui.action_Hide_Offline_Friends->isChecked());
|
||||
|
||||
// state of the status
|
||||
Settings->setValue("hideState", ui.action_Hide_State->isChecked());
|
||||
|
||||
// state of hideStatusColumn
|
||||
Settings->setValue("hideStatusColumn", ui.action_Hide_Status_Column->isChecked());
|
||||
|
||||
// state of hideAvatar
|
||||
Settings->setValue("hideAvatar", ui.action_Hide_Avatar_Column->isChecked());
|
||||
|
||||
// state of splitter
|
||||
Settings->setValue("Splitter", ui.splitter->saveState());
|
||||
Settings->setValue("GroupChatSplitter", ui.splitter_2->saveState());
|
||||
|
||||
// open groups
|
||||
Settings->beginWriteArray("Groups");
|
||||
int arrayIndex = 0;
|
||||
std::set<std::string> expandedPeers;
|
||||
ui.friendList->getExpandedGroups(expandedPeers);
|
||||
foreach (std::string groupId, expandedPeers) {
|
||||
Settings->setArrayIndex(arrayIndex++);
|
||||
Settings->setValue("open", QString::fromStdString(groupId));
|
||||
}
|
||||
Settings->endArray();
|
||||
}
|
||||
|
||||
ui.friendList->processSettings(bLoad);
|
||||
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
||||
@ -945,21 +890,6 @@ void FriendsDialog::playsound(){
|
||||
QSound::play(OnlineSound);
|
||||
}
|
||||
|
||||
void FriendsDialog::displayMenu()
|
||||
{
|
||||
QMenu *displaymenu = new QMenu();
|
||||
|
||||
displaymenu->addAction(ui.actionSort_Peers_Descending_Order);
|
||||
displaymenu->addAction(ui.actionSort_Peers_Ascending_Order);
|
||||
displaymenu->addAction(ui.action_Hide_Offline_Friends);
|
||||
displaymenu->addAction(ui.action_Sort_by_State);
|
||||
displaymenu->addAction(ui.action_Hide_Avatar_Column);
|
||||
displaymenu->addAction(ui.action_Hide_Status_Column);
|
||||
displaymenu->addAction(ui.action_Hide_State);
|
||||
|
||||
ui.displayButton->setMenu(displaymenu);
|
||||
}
|
||||
|
||||
void FriendsDialog::on_actionMessageHistory_triggered()
|
||||
{
|
||||
ImHistoryBrowser imBrowser("", ui.lineEdit, this);
|
||||
@ -984,8 +914,3 @@ void FriendsDialog::newsFeedChanged(int count)
|
||||
ui.peertabWidget->tabBar()->setTabIcon(newsFeedTabIndex, QIcon(IMAGE_NEWSFEED));
|
||||
}
|
||||
}
|
||||
|
||||
void FriendsDialog::peerSortColumnChanged(bool sortedByState)
|
||||
{
|
||||
ui.action_Sort_by_State->setChecked(sortedByState);
|
||||
}
|
||||
|
@ -115,8 +115,6 @@ private slots:
|
||||
|
||||
void newsFeedChanged(int count);
|
||||
|
||||
void peerSortColumnChanged(bool sortedByState);
|
||||
|
||||
signals:
|
||||
void notifyGroupChat(const QString&,const QString&) ;
|
||||
|
||||
@ -127,7 +125,6 @@ private:
|
||||
void colorChanged(const QColor &c);
|
||||
void fontChanged(const QFont &font);
|
||||
|
||||
void displayMenu();
|
||||
///play the sound when recv a message
|
||||
void playsound();
|
||||
|
||||
|
@ -653,10 +653,7 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="FriendList" name="friendList" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">b{}</string>
|
||||
</property>
|
||||
<widget class="FriendList" name="friendList" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@ -669,6 +666,9 @@ p, li { white-space: pre-wrap; }
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">b{}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -1423,79 +1423,6 @@ background: white;}</string>
|
||||
<string>Deletes all stored and displayed chat history</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Hide_Offline_Friends">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide Offline Friends</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Hide_Status_Column">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide Status Column</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Sort_by_State">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort by State</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort by State</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Hide_State">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide State </string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSort_Peers_Descending_Order">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/sort_decrease.png</normaloff>:/images/sort_decrease.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort Descending Order</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort Descending Order</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSort_Peers_Ascending_Order">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/sort_incr.png</normaloff>:/images/sort_incr.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort Ascending Order</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort Ascending Order</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Hide_Avatar_Column">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide Avatar Column</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Hide Avatar Column</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
@ -1516,7 +1443,6 @@ background: white;}</string>
|
||||
<header>gui/common/FriendList.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
|
@ -60,6 +60,7 @@
|
||||
|
||||
MessengerWindow* MessengerWindow::_instance = NULL;
|
||||
static std::set<std::string> *expandedPeers = NULL;
|
||||
static std::set<std::string> *expandedGroups = NULL;
|
||||
|
||||
/*static*/ void MessengerWindow::showYourself ()
|
||||
{
|
||||
@ -86,6 +87,11 @@ void MessengerWindow::releaseInstance()
|
||||
delete(expandedPeers);
|
||||
expandedPeers = NULL;
|
||||
}
|
||||
if (expandedGroups) {
|
||||
/* delete saved expanded groups */
|
||||
delete(expandedGroups);
|
||||
expandedGroups = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/** Constructor */
|
||||
@ -107,9 +113,6 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
||||
connect( ui.shareButton, SIGNAL(clicked()), SLOT(openShareManager()));
|
||||
connect( ui.addIMAccountButton, SIGNAL(clicked( bool ) ), this , SLOT( addFriend() ) );
|
||||
#endif // MINIMAL_RSGUI
|
||||
connect(ui.actionHide_Offline_Friends, SIGNAL(toggled(bool)), ui.friendList, SLOT(setHideUnconnected(bool)));
|
||||
connect(ui.actionSort_by_State, SIGNAL(toggled(bool)), ui.friendList, SLOT(setSortByState(bool)));
|
||||
connect(ui.actionRoot_is_decorated, SIGNAL(toggled(bool)), ui.friendList, SLOT(setRootIsDecorated(bool)));
|
||||
connect(ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
|
||||
connect(ui.messagelineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(savestatusmessage()));
|
||||
@ -129,20 +132,30 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
||||
expandedPeers = NULL;
|
||||
}
|
||||
|
||||
if (expandedGroups != NULL) {
|
||||
for (std::set<std::string>::iterator groupIt = expandedGroups->begin(); groupIt != expandedGroups->end(); groupIt++) {
|
||||
ui.friendList->addGroupToExpand(*groupIt);
|
||||
}
|
||||
delete expandedGroups;
|
||||
expandedGroups = NULL;
|
||||
}
|
||||
|
||||
//LogoBar
|
||||
_rsLogoBarmessenger = new LogoBar(ui.logoframe);
|
||||
Widget::createLayout(ui.logoframe)->addWidget(_rsLogoBarmessenger);
|
||||
|
||||
ui.messagelineEdit->setMinimumWidth(20);
|
||||
|
||||
displayMenu();
|
||||
ui.displaypushButton->setMenu(ui.friendList->createDisplayMenu());
|
||||
|
||||
// load settings
|
||||
RsAutoUpdatePage::lockAllEvents();
|
||||
ui.friendList->setShowStatusColumn(false);
|
||||
ui.friendList->setShowLastContactColumn(false);
|
||||
ui.friendList->setShowAvatarColumn(true);
|
||||
ui.friendList->setRootIsDecorated(true);
|
||||
ui.friendList->setShowGroups(false);
|
||||
processSettings(true);
|
||||
ui.friendList->setHideHeader(true);
|
||||
ui.friendList->setHideStatusColumn(true);
|
||||
ui.friendList->setHideGroups(true);
|
||||
ui.friendList->setBigName(true);
|
||||
RsAutoUpdatePage::unlockAllEvents();
|
||||
|
||||
@ -198,39 +211,7 @@ MessengerWindow::~MessengerWindow ()
|
||||
void MessengerWindow::processSettings(bool bLoad)
|
||||
{
|
||||
Settings->beginGroup(_name);
|
||||
|
||||
if (bLoad) {
|
||||
// load settings
|
||||
|
||||
// state of messenger tree
|
||||
ui.friendList->restoreHeaderState(Settings->value("MessengerTree").toByteArray());
|
||||
|
||||
// state of actionHide_Offline_Friends
|
||||
ui.actionHide_Offline_Friends->setChecked(Settings->value("hideOfflineFriends", false).toBool());
|
||||
|
||||
// state of actionSort_by_State
|
||||
ui.actionSort_by_State->setChecked(Settings->value("sortByState", false).toBool());
|
||||
|
||||
// state of actionRoot_is_decorated
|
||||
bool decorated = Settings->value("rootIsDecorated", true).toBool();
|
||||
ui.actionRoot_is_decorated->setChecked(decorated);
|
||||
ui.friendList->setRootIsDecorated(decorated);
|
||||
} else {
|
||||
// save settings
|
||||
|
||||
// state of messenger tree
|
||||
Settings->setValue("MessengerTree", ui.friendList->saveHeaderState());
|
||||
|
||||
// state of actionSort_by_State
|
||||
Settings->setValue("sortByState", ui.actionSort_by_State->isChecked());
|
||||
|
||||
// state of actionHide_Offline_Friends
|
||||
Settings->setValue("hideOfflineFriends", ui.actionHide_Offline_Friends->isChecked());
|
||||
|
||||
// state of actionRoot_is_decorated
|
||||
Settings->setValue("rootIsDecorated", ui.actionRoot_is_decorated->isChecked());
|
||||
}
|
||||
|
||||
ui.friendList->processSettings(bLoad);
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
||||
@ -256,6 +237,15 @@ void MessengerWindow::closeEvent (QCloseEvent * /*event*/)
|
||||
}
|
||||
|
||||
ui.friendList->getExpandedPeers(*expandedPeers);
|
||||
|
||||
/* save the expanded groups */
|
||||
if (expandedGroups == NULL) {
|
||||
expandedGroups = new std::set<std::string>;
|
||||
} else {
|
||||
expandedGroups->clear();
|
||||
}
|
||||
|
||||
ui.friendList->getExpandedGroups(*expandedGroups);
|
||||
}
|
||||
|
||||
LogoBar & MessengerWindow::getLogoBar() const {
|
||||
@ -296,18 +286,6 @@ void MessengerWindow::updateOwnStatus(const QString &peer_id, int status)
|
||||
|
||||
#endif // MINIMAL_RSGUI
|
||||
|
||||
void MessengerWindow::displayMenu()
|
||||
{
|
||||
QMenu *lookmenu = new QMenu();
|
||||
lookmenu->addAction(ui.actionSort_Peers_Descending_Order);
|
||||
lookmenu->addAction(ui.actionSort_Peers_Ascending_Order);
|
||||
lookmenu->addAction(ui.actionSort_by_State);
|
||||
lookmenu->addAction(ui.actionHide_Offline_Friends);
|
||||
lookmenu->addAction(ui.actionRoot_is_decorated);
|
||||
|
||||
ui.displaypushButton->setMenu(lookmenu);
|
||||
}
|
||||
|
||||
/* clear Filter */
|
||||
void MessengerWindow::clearFilter()
|
||||
{
|
||||
|
@ -75,9 +75,6 @@ private:
|
||||
|
||||
void processSettings(bool bLoad);
|
||||
|
||||
void displayMenu();
|
||||
|
||||
|
||||
LogoBar * _rsLogoBarmessenger;
|
||||
|
||||
QString m_nickName;
|
||||
|
@ -379,57 +379,6 @@ stop:0 #FEFEFE, stop:1 #E8E8E8);
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<action name="actionSort_Peers_Descending_Order">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/sort_decrease.png</normaloff>:/images/sort_decrease.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort Descending Order</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort Descending Order</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSort_Peers_Ascending_Order">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/sort_incr.png</normaloff>:/images/sort_incr.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort Ascending Order</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort Ascending Order</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRoot_is_decorated">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set root is Decorated</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set Root Decorated</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionHide_Offline_Friends">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide Offline Friends</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSort_by_State">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort by State</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -71,10 +71,11 @@
|
||||
#define IMAGE_PASTELINK ":/images/pasterslink.png"
|
||||
#define IMAGE_GROUP24 ":/images/user/group24.png"
|
||||
|
||||
#define COLUMN_COUNT 3
|
||||
#define COLUMN_NAME 0
|
||||
#define COLUMN_STATE 1
|
||||
#define COLUMN_AVATAR 2
|
||||
#define COLUMN_COUNT 4
|
||||
#define COLUMN_NAME 0
|
||||
#define COLUMN_STATE 1
|
||||
#define COLUMN_LAST_CONTACT 2
|
||||
#define COLUMN_AVATAR 3
|
||||
|
||||
#define COLUMN_DATA 0 // column for storing the userdata id
|
||||
|
||||
@ -109,36 +110,47 @@ FriendList::FriendList(QWidget *parent) :
|
||||
ui(new Ui::FriendList),
|
||||
m_compareRole(new RSTreeWidgetItemCompareRole),
|
||||
mBigName(false),
|
||||
mHideAvatarColumn(false),
|
||||
mHideGroups(false),
|
||||
mShowGroups(true),
|
||||
mHideState(false),
|
||||
mHideStatusColumn(false),
|
||||
mHideUnconnected(false),
|
||||
groupsHasChanged(false),
|
||||
openGroups(NULL),
|
||||
openPeers(NULL),
|
||||
correctColumnStatusSize(false),
|
||||
firstTimeShown(true)
|
||||
openPeers(NULL)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_compareRole->setRole(COLUMN_NAME, ROLE_SORT);
|
||||
m_compareRole->setRole(COLUMN_STATE, ROLE_SORT);
|
||||
m_compareRole->setRole(COLUMN_LAST_CONTACT, ROLE_SORT);
|
||||
m_compareRole->setRole(COLUMN_AVATAR, ROLE_STANDARD);
|
||||
|
||||
connect(ui->peerTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(peerTreeWidgetCostumPopupMenu()));
|
||||
connect(ui->peerTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(chatfriend(QTreeWidgetItem *)));
|
||||
connect(ui->peerTreeWidget->header(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(peerSortIndicatorChanged(int, Qt::SortOrder)));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(groupsChanged()));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(insertPeers()));
|
||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(const QString&)), this, SLOT(updateAvatar(const QString&)));
|
||||
|
||||
ui->peerTreeWidget->setColumnWidth(COLUMN_NAME, 150);
|
||||
connect(ui->actionHideOfflineFriends, SIGNAL(triggered(bool)), this, SLOT(setHideUnconnected(bool)));
|
||||
connect(ui->actionShowStatusColumn, SIGNAL(triggered(bool)), this, SLOT(setShowStatusColumn(bool)));
|
||||
connect(ui->actionShowAvatarColumn, SIGNAL(triggered(bool)), this, SLOT(setShowAvatarColumn(bool)));
|
||||
connect(ui->actionShowLastContactColumn, SIGNAL(triggered(bool)), this, SLOT(setShowLastContactColumn(bool)));
|
||||
connect(ui->actionHideState, SIGNAL(triggered(bool)), this, SLOT(setHideState(bool)));
|
||||
connect(ui->actionRootIsDecorated, SIGNAL(triggered(bool)), this, SLOT(setRootIsDecorated(bool)));
|
||||
connect(ui->actionShowGroups, SIGNAL(triggered(bool)), this, SLOT(setShowGroups(bool)));
|
||||
|
||||
connect(ui->actionSortByName, SIGNAL(triggered()), this, SLOT(setSortByName()));
|
||||
connect(ui->actionSortByState, SIGNAL(triggered()), this, SLOT(setSortByState()));
|
||||
connect(ui->actionSortByLastContact, SIGNAL(triggered()), this, SLOT(setSortByLastContact()));
|
||||
connect(ui->actionSortPeersAscendingOrder, SIGNAL(triggered()), this, SLOT(sortPeersAscendingOrder()));
|
||||
connect(ui->actionSortPeersDescendingOrder, SIGNAL(triggered()), this, SLOT(sortPeersDescendingOrder()));
|
||||
|
||||
initializeHeader(false);
|
||||
|
||||
ui->peerTreeWidget->sortItems(COLUMN_NAME, Qt::AscendingOrder);
|
||||
|
||||
// set header text aligment
|
||||
QTreeWidgetItem * headerItem = ui->peerTreeWidget->headerItem();
|
||||
QTreeWidgetItem *headerItem = ui->peerTreeWidget->headerItem();
|
||||
headerItem->setTextAlignment(COLUMN_NAME, Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
headerItem->setTextAlignment(COLUMN_STATE, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
headerItem->setTextAlignment(COLUMN_AVATAR, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
@ -155,6 +167,89 @@ FriendList::~FriendList()
|
||||
delete(m_compareRole);
|
||||
}
|
||||
|
||||
void FriendList::processSettings(bool bLoad)
|
||||
{
|
||||
int peerTreeVersion = 2; // version number for the settings to solve problems when modifying the column count
|
||||
|
||||
if (bLoad) {
|
||||
// load settings
|
||||
|
||||
// state of peer tree
|
||||
if (Settings->value("peerTreeVersion").toInt() == peerTreeVersion) {
|
||||
ui->peerTreeWidget->header()->restoreState(Settings->value("peerTree").toByteArray());
|
||||
}
|
||||
// ui->peerTreeWidget->header()->doItemsLayout(); // is needed because I added a third column
|
||||
// restoreState would corrupt the internal sectionCount
|
||||
|
||||
// state of the columns
|
||||
setShowStatusColumn(Settings->value("showStatusColumn", !ui->peerTreeWidget->isColumnHidden(COLUMN_STATE)).toBool());
|
||||
setShowLastContactColumn(Settings->value("showLastContactColumn", !ui->peerTreeWidget->isColumnHidden(COLUMN_LAST_CONTACT)).toBool());
|
||||
setShowAvatarColumn(Settings->value("showAvatarColumn", !ui->peerTreeWidget->isColumnHidden(COLUMN_AVATAR)).toBool());
|
||||
|
||||
// states
|
||||
setHideUnconnected(Settings->value("hideUnconnected", mHideUnconnected).toBool());
|
||||
setHideState(Settings->value("hideState", mHideState).toBool());
|
||||
setRootIsDecorated(Settings->value("rootIsDecorated", ui->peerTreeWidget->rootIsDecorated()).toBool());
|
||||
setShowGroups(Settings->value("showGroups", mShowGroups).toBool());
|
||||
|
||||
// open groups
|
||||
int arrayIndex = Settings->beginReadArray("Groups");
|
||||
for (int index = 0; index < arrayIndex; index++) {
|
||||
Settings->setArrayIndex(index);
|
||||
addGroupToExpand(Settings->value("open").toString().toStdString());
|
||||
}
|
||||
Settings->endArray();
|
||||
|
||||
initializeHeader(true);
|
||||
updateHeader();
|
||||
} else {
|
||||
// save settings
|
||||
|
||||
// state of peer tree
|
||||
Settings->setValue("peerTree", ui->peerTreeWidget->header()->saveState());
|
||||
Settings->setValue("peerTreeVersion", peerTreeVersion);
|
||||
|
||||
// state of the columns
|
||||
Settings->setValue("showStatusColumn", !ui->peerTreeWidget->isColumnHidden(COLUMN_STATE));
|
||||
Settings->setValue("showLastContactColumn", !ui->peerTreeWidget->isColumnHidden(COLUMN_LAST_CONTACT));
|
||||
Settings->setValue("showAvatarColumn", !ui->peerTreeWidget->isColumnHidden(COLUMN_AVATAR));
|
||||
|
||||
// states
|
||||
Settings->setValue("hideUnconnected", mHideUnconnected);
|
||||
Settings->setValue("hideState", mHideState);
|
||||
Settings->setValue("rootIsDecorated", ui->peerTreeWidget->rootIsDecorated());
|
||||
Settings->setValue("showGroups", mShowGroups);
|
||||
|
||||
// open groups
|
||||
Settings->beginWriteArray("Groups");
|
||||
int arrayIndex = 0;
|
||||
std::set<std::string> expandedPeers;
|
||||
getExpandedGroups(expandedPeers);
|
||||
foreach (std::string groupId, expandedPeers) {
|
||||
Settings->setArrayIndex(arrayIndex++);
|
||||
Settings->setValue("open", QString::fromStdString(groupId));
|
||||
}
|
||||
Settings->endArray();
|
||||
}
|
||||
}
|
||||
|
||||
void FriendList::initializeHeader(bool afterLoadSettings)
|
||||
{
|
||||
// set column size
|
||||
QHeaderView *header = ui->peerTreeWidget->header();
|
||||
header->setMovable(false);
|
||||
header->setResizeMode(COLUMN_NAME, QHeaderView::Stretch);
|
||||
header->setResizeMode(COLUMN_STATE, QHeaderView::Interactive);
|
||||
header->setResizeMode(COLUMN_LAST_CONTACT, QHeaderView::Interactive);
|
||||
header->setResizeMode(COLUMN_AVATAR, QHeaderView::Fixed);
|
||||
|
||||
if (!afterLoadSettings) {
|
||||
header->resizeSection(COLUMN_NAME, 150);
|
||||
header->resizeSection(COLUMN_LAST_CONTACT, 120);
|
||||
}
|
||||
header->resizeSection(COLUMN_AVATAR, COLUMN_AVATAR_WIDTH);
|
||||
}
|
||||
|
||||
/* Utility Fns */
|
||||
inline std::string getRsId(QTreeWidgetItem *item)
|
||||
{
|
||||
@ -267,7 +362,7 @@ void FriendList::peerTreeWidgetCostumPopupMenu()
|
||||
contextMnu.addAction(QIcon(IMAGE_REMOVEFRIEND), tr("Remove Friend Location"), this, SLOT(removefriend()));
|
||||
}
|
||||
|
||||
if (mHideGroups == false && type == TYPE_GPG) {
|
||||
if (mShowGroups && type == TYPE_GPG) {
|
||||
QMenu* addToGroupMenu = NULL;
|
||||
QMenu* moveToGroupMenu = NULL;
|
||||
|
||||
@ -361,7 +456,7 @@ void FriendList::groupsChanged()
|
||||
|
||||
void FriendList::updateAvatar(const QString& id)
|
||||
{
|
||||
if (mHideAvatarColumn)
|
||||
if (ui->peerTreeWidget->isColumnHidden(COLUMN_AVATAR))
|
||||
return;
|
||||
|
||||
QTreeWidgetItemIterator it(ui->peerTreeWidget);
|
||||
@ -378,16 +473,6 @@ void FriendList::updateAvatar(const QString& id)
|
||||
}
|
||||
}
|
||||
|
||||
void FriendList::showEvent(QShowEvent *event)
|
||||
{
|
||||
if (firstTimeShown) {
|
||||
firstTimeShown = false;
|
||||
updateHeaderSizes();
|
||||
}
|
||||
|
||||
RsAutoUpdatePage::showEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of peers from the RsIface.
|
||||
* Adds all friend gpg ids, with their locations as children to the peerTreeWidget.
|
||||
@ -403,6 +488,9 @@ void FriendList::insertPeers()
|
||||
std::cerr << "FriendList::insertPeers() called." << std::endl;
|
||||
#endif
|
||||
|
||||
bool isStatusColumnHidden = ui->peerTreeWidget->isColumnHidden(COLUMN_STATE);
|
||||
bool isAvatarColumnHidden = ui->peerTreeWidget->isColumnHidden(COLUMN_AVATAR);
|
||||
|
||||
std::list<StatusInfo> statusInfo;
|
||||
rsStatus->getStatusList(statusInfo);
|
||||
|
||||
@ -457,7 +545,7 @@ void FriendList::insertPeers()
|
||||
break;
|
||||
}
|
||||
|
||||
if (mHideGroups == false && groupsHasChanged) {
|
||||
if (mShowGroups && groupsHasChanged) {
|
||||
if (parent) {
|
||||
if (parent->type() == TYPE_GROUP) {
|
||||
std::string groupId = getRsId(parent);
|
||||
@ -486,7 +574,7 @@ void FriendList::insertPeers()
|
||||
break;
|
||||
case TYPE_GROUP:
|
||||
{
|
||||
if (mHideGroups) {
|
||||
if (!mShowGroups) {
|
||||
if (item->parent()) {
|
||||
delete(item->parent()->takeChild(item->parent()->indexOfChild(item)));
|
||||
} else {
|
||||
@ -522,7 +610,7 @@ void FriendList::insertPeers()
|
||||
RsGroupInfo *groupInfo = NULL;
|
||||
int onlineCount = 0;
|
||||
int availableCount = 0;
|
||||
if (!mHideGroups && groupIt != groupInfoList.end()) {
|
||||
if (mShowGroups && groupIt != groupInfoList.end()) {
|
||||
groupInfo = &(*groupIt);
|
||||
|
||||
if ((groupInfo->flag & RS_GROUP_FLAG_STANDARD) && groupInfo->peerIds.size() == 0) {
|
||||
@ -586,7 +674,7 @@ void FriendList::insertPeers()
|
||||
for (gpgIt = gpgFriends.begin(); gpgIt != gpgFriends.end(); gpgIt++) {
|
||||
std::string gpgId = *gpgIt;
|
||||
|
||||
if (!mHideGroups) {
|
||||
if (mShowGroups) {
|
||||
if (groupInfo) {
|
||||
// we fill a group, check if gpg id is assigned
|
||||
if (std::find(groupInfo->peerIds.begin(), groupInfo->peerIds.end(), gpgId) == groupInfo->peerIds.end()) {
|
||||
@ -647,17 +735,18 @@ void FriendList::insertPeers()
|
||||
}
|
||||
|
||||
gpgItem->setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicatorWhenChildless);
|
||||
if (!mBigName) {
|
||||
gpgItem->setSizeHint(COLUMN_NAME, QSize(26, 26));
|
||||
} else {
|
||||
gpgItem->setSizeHint(COLUMN_NAME, QSize(40, 40));
|
||||
}
|
||||
gpgItem->setTextAlignment(COLUMN_NAME, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
|
||||
/* not displayed, used to find back the item */
|
||||
gpgItem->setData(COLUMN_DATA, ROLE_ID, QString::fromStdString(detail.id));
|
||||
}
|
||||
|
||||
if (mBigName && !mHideState && isStatusColumnHidden) {
|
||||
gpgItem->setSizeHint(COLUMN_NAME, QSize(40, 40));
|
||||
} else {
|
||||
gpgItem->setSizeHint(COLUMN_NAME, QSize(26, 26));
|
||||
}
|
||||
|
||||
availableCount++;
|
||||
|
||||
QString gpgItemText = QString::fromUtf8(detail.name.c_str());
|
||||
@ -685,6 +774,7 @@ void FriendList::insertPeers()
|
||||
std::string bestSslId; // for gpg item
|
||||
QString bestCustomStateString;// for gpg item
|
||||
std::list<std::string> sslContacts;
|
||||
QDateTime lastContact;
|
||||
|
||||
rsPeers->getAssociatedSSLIds(detail.gpg_id, sslContacts);
|
||||
for (std::list<std::string>::iterator sslIt = sslContacts.begin(); sslIt != sslContacts.end(); sslIt++) {
|
||||
@ -740,14 +830,14 @@ void FriendList::insertPeers()
|
||||
}
|
||||
|
||||
QString connectStateString = StatusDefs::connectStateString(sslDetail);
|
||||
if (!mHideStatusColumn) {
|
||||
if (!isStatusColumnHidden) {
|
||||
sslItem->setText(COLUMN_STATE, connectStateString);
|
||||
} else if (!mHideState && connectStateString.isEmpty() == false) {
|
||||
sText += " [" + StatusDefs::connectStateString(sslDetail) + "]";
|
||||
}
|
||||
sslItem->setText( COLUMN_NAME, sText);
|
||||
|
||||
if (mHideStatusColumn == true && mHideState == true) {
|
||||
if (isStatusColumnHidden == true && mHideState == true) {
|
||||
/* Show the state as tooltip */
|
||||
sslItem->setToolTip(COLUMN_NAME, connectStateString);
|
||||
} else {
|
||||
@ -757,6 +847,14 @@ void FriendList::insertPeers()
|
||||
// sort location
|
||||
sslItem->setData(COLUMN_STATE, ROLE_SORT, sText);
|
||||
|
||||
/* last contact */
|
||||
QDateTime sslLastContact = QDateTime::fromTime_t(sslDetail.lastConnect);
|
||||
sslItem->setData(COLUMN_LAST_CONTACT, Qt::DisplayRole, QVariant(sslLastContact));
|
||||
sslItem->setData(COLUMN_LAST_CONTACT, ROLE_SORT, sslLastContact);
|
||||
if (sslLastContact > lastContact) {
|
||||
lastContact = sslLastContact;
|
||||
}
|
||||
|
||||
/* change color and icon */
|
||||
QIcon sslIcon;
|
||||
QFont sslFont;
|
||||
@ -879,21 +977,21 @@ void FriendList::insertPeers()
|
||||
|
||||
gpgIcon = QIcon(StatusDefs::imageUser(bestRSState));
|
||||
|
||||
if (!mHideStatusColumn) {
|
||||
if (!isStatusColumnHidden) {
|
||||
gpgItem->setText(COLUMN_STATE, StatusDefs::name(bestRSState));
|
||||
}
|
||||
|
||||
if (mBigName) {
|
||||
if (isStatusColumnHidden && mBigName && !mHideState) {
|
||||
if (bestCustomStateString.isEmpty()) {
|
||||
gpgItemText += "\n" + StatusDefs::name(bestRSState);
|
||||
} else {
|
||||
gpgItemText += "\n" + bestCustomStateString;
|
||||
}
|
||||
} else if (mHideStatusColumn && !mHideState){
|
||||
} else if (isStatusColumnHidden && !mHideState){
|
||||
gpgItemText += " [" + StatusDefs::name(bestRSState) + "]";
|
||||
}
|
||||
} else if (gpg_online) {
|
||||
if (!mHideStatusColumn) {
|
||||
if (!isStatusColumnHidden) {
|
||||
gpgItem->setText(COLUMN_STATE, tr("Available"));
|
||||
} else if (!mHideState && !mBigName) {
|
||||
gpgItemText += " [" + tr("Available") + "]";
|
||||
@ -911,7 +1009,7 @@ void FriendList::insertPeers()
|
||||
gpgItem->setFont(i,font);
|
||||
}
|
||||
} else {
|
||||
if (!mHideStatusColumn) {
|
||||
if (!isStatusColumnHidden) {
|
||||
gpgItem->setText(COLUMN_STATE, StatusDefs::name(RS_STATUS_OFFLINE));
|
||||
} else if (!mHideState && !mBigName) {
|
||||
gpgItemText += " [" + StatusDefs::name(RS_STATUS_OFFLINE) + "]";
|
||||
@ -933,7 +1031,7 @@ void FriendList::insertPeers()
|
||||
gpgIcon = QIcon(":/images/chat.png");
|
||||
}
|
||||
|
||||
if (!mHideAvatarColumn && gpgItem->icon(COLUMN_AVATAR).isNull()) {
|
||||
if (!isAvatarColumnHidden && gpgItem->icon(COLUMN_AVATAR).isNull()) {
|
||||
// only set the avatar image the first time, or when it changed
|
||||
// otherwise getAvatarFromSslId sends request packages to peers.
|
||||
QPixmap avatar;
|
||||
@ -946,6 +1044,8 @@ void FriendList::insertPeers()
|
||||
gpgItem->setData(COLUMN_NAME, ROLE_SORT, "2 " + gpgItemText);
|
||||
gpgItem->setData(COLUMN_STATE, ROLE_SORT, "2 " + BuildStateSortString(true, gpgItemText, bestPeerState));
|
||||
gpgItem->setIcon(COLUMN_NAME, gpgIcon);
|
||||
gpgItem->setData(COLUMN_LAST_CONTACT, Qt::DisplayRole, QVariant(lastContact));
|
||||
gpgItem->setData(COLUMN_LAST_CONTACT, ROLE_SORT, "2 " + lastContact.toString("yyyyMMdd_hhmmss"));
|
||||
|
||||
if (openPeers != NULL && openPeers->find(gpgId) != openPeers->end()) {
|
||||
gpgItem->setExpanded(true);
|
||||
@ -965,7 +1065,7 @@ void FriendList::insertPeers()
|
||||
}
|
||||
}
|
||||
|
||||
if (!mHideGroups && groupIt != groupInfoList.end()) {
|
||||
if (mShowGroups && groupIt != groupInfoList.end()) {
|
||||
groupIt++;
|
||||
} else {
|
||||
// all done
|
||||
@ -1392,60 +1492,48 @@ void FriendList::removeGroup()
|
||||
rsPeers->removeGroup(groupId);
|
||||
}
|
||||
|
||||
void FriendList::setHideUnconnected(bool hidden) {
|
||||
void FriendList::setHideUnconnected(bool hidden)
|
||||
{
|
||||
if (mHideUnconnected != hidden) {
|
||||
mHideUnconnected = hidden;
|
||||
insertPeers();
|
||||
}
|
||||
}
|
||||
|
||||
void FriendList::setHideStatusColumn(bool hidden)
|
||||
void FriendList::setShowStatusColumn(bool show)
|
||||
{
|
||||
if (mHideStatusColumn != hidden) {
|
||||
ui->peerTreeWidget->setColumnHidden(COLUMN_STATE, hidden);
|
||||
ui->actionHideState->setEnabled(!show);
|
||||
bool isColumnVisible = !ui->peerTreeWidget->isColumnHidden(COLUMN_STATE);
|
||||
|
||||
QHeaderView *header = ui->peerTreeWidget->header();
|
||||
if (mHideStatusColumn) { // if column was hidden
|
||||
if (correctColumnStatusSize) {
|
||||
correctColumnStatusSize = false;
|
||||
header->resizeSection(COLUMN_STATE, 100);
|
||||
}
|
||||
if (isColumnVisible != show) {
|
||||
ui->peerTreeWidget->setColumnHidden(COLUMN_STATE, !show);
|
||||
|
||||
if (header->sectionSize(COLUMN_STATE) < header->sectionSize(COLUMN_NAME)) {
|
||||
// resize name column to make room for status column, but only if it doesn't result in negative width
|
||||
header->resizeSection(COLUMN_NAME, header->sectionSize(COLUMN_NAME) - header->sectionSize(COLUMN_STATE));
|
||||
}
|
||||
}
|
||||
|
||||
mHideStatusColumn = hidden;
|
||||
updateHeaderSizes();
|
||||
updateHeader();
|
||||
insertPeers();
|
||||
}
|
||||
}
|
||||
|
||||
void FriendList::setHideAvatarColumn(bool hidden)
|
||||
void FriendList::setShowLastContactColumn(bool show)
|
||||
{
|
||||
if (mHideAvatarColumn == hidden)
|
||||
return;
|
||||
bool isColumnVisible = !ui->peerTreeWidget->isColumnHidden(COLUMN_LAST_CONTACT);
|
||||
|
||||
bool columnWasHidden = mHideAvatarColumn;
|
||||
mHideAvatarColumn = hidden;
|
||||
ui->peerTreeWidget->setColumnHidden(COLUMN_AVATAR, hidden);
|
||||
if (isColumnVisible != show) {
|
||||
ui->peerTreeWidget->setColumnHidden(COLUMN_LAST_CONTACT, !show);
|
||||
|
||||
if (RsAutoUpdatePage::eventsLocked()) // don't change header sizes
|
||||
return;
|
||||
|
||||
QHeaderView *header = ui->peerTreeWidget->header();
|
||||
if (columnWasHidden) {
|
||||
if (header->sectionSize(COLUMN_NAME) > COLUMN_AVATAR_WIDTH) {
|
||||
// resize name column to make room for avatar column, but only if it doesn't result in negative width
|
||||
header->resizeSection(COLUMN_NAME, header->sectionSize(COLUMN_NAME) - COLUMN_AVATAR_WIDTH);
|
||||
}
|
||||
} else {
|
||||
header->resizeSection(COLUMN_NAME, header->sectionSize(COLUMN_NAME) + COLUMN_AVATAR_WIDTH);
|
||||
updateHeader();
|
||||
insertPeers();
|
||||
}
|
||||
}
|
||||
|
||||
updateHeaderSizes();
|
||||
void FriendList::setShowAvatarColumn(bool show)
|
||||
{
|
||||
bool isColumnVisible = !ui->peerTreeWidget->isColumnHidden(COLUMN_AVATAR);
|
||||
if (isColumnVisible == show)
|
||||
return;
|
||||
|
||||
ui->peerTreeWidget->setColumnHidden(COLUMN_AVATAR, !show);
|
||||
|
||||
updateHeader();
|
||||
insertPeers();
|
||||
}
|
||||
|
||||
@ -1458,43 +1546,33 @@ void FriendList::setHideState(bool hidden)
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the correct header resize modes.
|
||||
* Set the header visible.
|
||||
*/
|
||||
void FriendList::updateHeaderSizes()
|
||||
void FriendList::updateHeader()
|
||||
{
|
||||
if (RsAutoUpdatePage::eventsLocked())
|
||||
return;
|
||||
|
||||
QHeaderView *header = ui->peerTreeWidget->header();
|
||||
if (mHideAvatarColumn) {
|
||||
/* Set header sizes for the fixed columns and resize modes, must be set after processSettings */
|
||||
if (!this->isVisible() && ui->peerTreeWidget->isColumnHidden(COLUMN_STATE)) {
|
||||
// Workaround
|
||||
correctColumnStatusSize = true;
|
||||
}
|
||||
header->setStretchLastSection(true);
|
||||
header->setResizeMode(COLUMN_NAME, QHeaderView::Interactive);
|
||||
header->setResizeMode(COLUMN_STATE, QHeaderView::Interactive);
|
||||
if (ui->peerTreeWidget->isColumnHidden(COLUMN_STATE) && ui->peerTreeWidget->isColumnHidden(COLUMN_LAST_CONTACT)) {
|
||||
ui->peerTreeWidget->setHeaderHidden(true);
|
||||
} else {
|
||||
header->setStretchLastSection(false);
|
||||
if (mHideStatusColumn) {
|
||||
header->setResizeMode(COLUMN_NAME, QHeaderView::Stretch);
|
||||
} else {
|
||||
header->setResizeMode(COLUMN_NAME, QHeaderView::Interactive);
|
||||
}
|
||||
header->setResizeMode(COLUMN_AVATAR, QHeaderView::Fixed);
|
||||
|
||||
header->resizeSection(COLUMN_AVATAR, COLUMN_AVATAR_WIDTH);
|
||||
ui->peerTreeWidget->setHeaderHidden(false);
|
||||
}
|
||||
}
|
||||
|
||||
void FriendList::setSortByState(bool sortByState)
|
||||
void FriendList::setSortByName()
|
||||
{
|
||||
if (sortByState) {
|
||||
ui->peerTreeWidget->sortByColumn(COLUMN_STATE);
|
||||
} else {
|
||||
ui->peerTreeWidget->sortByColumn(COLUMN_NAME);
|
||||
}
|
||||
ui->peerTreeWidget->sortByColumn(COLUMN_NAME);
|
||||
sortPeersAscendingOrder();
|
||||
}
|
||||
|
||||
void FriendList::setSortByState()
|
||||
{
|
||||
ui->peerTreeWidget->sortByColumn(COLUMN_STATE);
|
||||
sortPeersAscendingOrder();
|
||||
}
|
||||
|
||||
void FriendList::setSortByLastContact()
|
||||
{
|
||||
ui->peerTreeWidget->sortByColumn(COLUMN_LAST_CONTACT);
|
||||
sortPeersDescendingOrder();
|
||||
}
|
||||
|
||||
void FriendList::sortPeersAscendingOrder()
|
||||
@ -1507,25 +1585,29 @@ void FriendList::sortPeersDescendingOrder()
|
||||
ui->peerTreeWidget->sortByColumn(ui->peerTreeWidget->sortColumn(), Qt::DescendingOrder);
|
||||
}
|
||||
|
||||
void FriendList::peerSortIndicatorChanged(int column, Qt::SortOrder)
|
||||
{
|
||||
emit peerSortColumnChanged(column == COLUMN_STATE);
|
||||
}
|
||||
|
||||
void FriendList::setRootIsDecorated(bool show)
|
||||
{
|
||||
ui->peerTreeWidget->setRootIsDecorated(show);
|
||||
}
|
||||
|
||||
void FriendList::setHideHeader(bool hidden)
|
||||
void FriendList::setShowGroups(bool show)
|
||||
{
|
||||
ui->peerTreeWidget->setHeaderHidden(hidden);
|
||||
}
|
||||
|
||||
void FriendList::setHideGroups(bool hidden)
|
||||
{
|
||||
if (mHideGroups != hidden) {
|
||||
mHideGroups = hidden;
|
||||
if (mShowGroups != show) {
|
||||
mShowGroups = show;
|
||||
if (mShowGroups) {
|
||||
// remove all not assigned gpg ids
|
||||
int childCount = ui->peerTreeWidget->topLevelItemCount();
|
||||
int childIndex = 0;
|
||||
while (childIndex < childCount) {
|
||||
QTreeWidgetItem *item = ui->peerTreeWidget->topLevelItem(childIndex);
|
||||
if (item->type() == TYPE_GPG) {
|
||||
delete(ui->peerTreeWidget->takeTopLevelItem(childIndex));
|
||||
childCount = ui->peerTreeWidget->topLevelItemCount();
|
||||
continue;
|
||||
}
|
||||
childIndex++;
|
||||
}
|
||||
}
|
||||
insertPeers();
|
||||
}
|
||||
}
|
||||
@ -1559,20 +1641,6 @@ void FriendList::setBigName(bool bigName)
|
||||
}
|
||||
}
|
||||
|
||||
void FriendList::restoreHeaderState(const QByteArray &state)
|
||||
{
|
||||
ui->peerTreeWidget->header()->restoreState(state);
|
||||
ui->peerTreeWidget->header()->doItemsLayout(); // is needed because I added a third column
|
||||
// restoreState would corrupt the internal sectionCount
|
||||
ui->peerTreeWidget->setColumnHidden(COLUMN_STATE, mHideStatusColumn);
|
||||
ui->peerTreeWidget->setColumnHidden(COLUMN_AVATAR, mHideAvatarColumn);
|
||||
}
|
||||
|
||||
QByteArray FriendList::saveHeaderState() const
|
||||
{
|
||||
return ui->peerTreeWidget->header()->saveState();
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides all items that don't contain sPattern in the name column.
|
||||
*/
|
||||
@ -1641,3 +1709,55 @@ void FriendList::addPeerToExpand(const std::string &gpgId)
|
||||
}
|
||||
openPeers->insert(gpgId);
|
||||
}
|
||||
|
||||
QMenu *FriendList::createDisplayMenu()
|
||||
{
|
||||
QMenu *displayMenu = new QMenu(this);
|
||||
connect(displayMenu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
|
||||
|
||||
displayMenu->addAction(ui->actionSortPeersDescendingOrder);
|
||||
displayMenu->addAction(ui->actionSortPeersAscendingOrder);
|
||||
QMenu *menu = displayMenu->addMenu(tr("Columns"));
|
||||
menu->addAction(ui->actionShowAvatarColumn);
|
||||
menu->addAction(ui->actionShowLastContactColumn);
|
||||
menu->addAction(ui->actionShowStatusColumn);
|
||||
menu = displayMenu->addMenu(tr("Sort by"));
|
||||
menu->addAction(ui->actionSortByName);
|
||||
menu->addAction(ui->actionSortByState);
|
||||
menu->addAction(ui->actionSortByLastContact);
|
||||
displayMenu->addAction(ui->actionHideOfflineFriends);
|
||||
displayMenu->addAction(ui->actionHideState);
|
||||
displayMenu->addAction(ui->actionRootIsDecorated);
|
||||
displayMenu->addAction(ui->actionShowGroups);
|
||||
|
||||
QActionGroup *group = new QActionGroup(this);
|
||||
group->addAction(ui->actionSortByName);
|
||||
group->addAction(ui->actionSortByState);
|
||||
group->addAction(ui->actionSortByLastContact);
|
||||
|
||||
return displayMenu;
|
||||
}
|
||||
|
||||
void FriendList::updateMenu()
|
||||
{
|
||||
switch (ui->peerTreeWidget->sortColumn()) {
|
||||
case COLUMN_NAME:
|
||||
ui->actionSortByName->setChecked(true);
|
||||
break;
|
||||
case COLUMN_STATE:
|
||||
ui->actionSortByState->setChecked(true);
|
||||
break;
|
||||
case COLUMN_LAST_CONTACT:
|
||||
ui->actionSortByLastContact->setChecked(true);
|
||||
break;
|
||||
case COLUMN_AVATAR:
|
||||
break;
|
||||
}
|
||||
ui->actionShowStatusColumn->setChecked(!ui->peerTreeWidget->isColumnHidden(COLUMN_STATE));
|
||||
ui->actionShowLastContactColumn->setChecked(!ui->peerTreeWidget->isColumnHidden(COLUMN_LAST_CONTACT));
|
||||
ui->actionShowAvatarColumn->setChecked(!ui->peerTreeWidget->isColumnHidden(COLUMN_AVATAR));
|
||||
ui->actionHideOfflineFriends->setChecked(mHideUnconnected);
|
||||
ui->actionHideState->setChecked(mHideState);
|
||||
ui->actionRootIsDecorated->setChecked(ui->peerTreeWidget->rootIsDecorated());
|
||||
ui->actionShowGroups->setChecked(mShowGroups);
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ namespace Ui {
|
||||
|
||||
class RSTreeWidgetItemCompareRole;
|
||||
class QTreeWidgetItem;
|
||||
class QMenu;
|
||||
|
||||
class FriendList : public RsAutoUpdatePage
|
||||
{
|
||||
@ -43,6 +44,8 @@ public:
|
||||
explicit FriendList(QWidget *parent = 0);
|
||||
~FriendList();
|
||||
|
||||
QMenu *createDisplayMenu();
|
||||
void processSettings(bool bLoad);
|
||||
void addGroupToExpand(const std::string &groupId);
|
||||
bool getExpandedGroups(std::set<std::string> &groups) const;
|
||||
void addPeerToExpand(const std::string &gpgId);
|
||||
@ -50,42 +53,33 @@ public:
|
||||
|
||||
std::string getSelectedGroupId() const;
|
||||
|
||||
void restoreHeaderState(const QByteArray &state);
|
||||
QByteArray saveHeaderState() const;
|
||||
|
||||
virtual void updateDisplay();
|
||||
|
||||
signals:
|
||||
void peerSortColumnChanged(bool sortedByState);
|
||||
|
||||
public slots:
|
||||
void filterItems(const QString &sPattern);
|
||||
|
||||
void setBigName(bool bigName); // show customStateString in second line of the name cell
|
||||
void setHideAvatarColumn(bool hidden);
|
||||
void setHideGroups(bool hidden);
|
||||
void setShowGroups(bool show);
|
||||
void setHideUnconnected(bool hidden);
|
||||
void setHideState(bool hidden);
|
||||
void setHideStatusColumn(bool hidden);
|
||||
void setHideHeader(bool hidden);
|
||||
void setShowStatusColumn(bool show);
|
||||
void setShowLastContactColumn(bool show);
|
||||
void setShowAvatarColumn(bool show);
|
||||
void setRootIsDecorated(bool show);
|
||||
void setSortByState(bool sortByState);
|
||||
void setSortByName();
|
||||
void setSortByState();
|
||||
void setSortByLastContact();
|
||||
void sortPeersAscendingOrder();
|
||||
void sortPeersDescendingOrder();
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *event);
|
||||
|
||||
private:
|
||||
Ui::FriendList *ui;
|
||||
RSTreeWidgetItemCompareRole *m_compareRole;
|
||||
|
||||
// Settings for peer list display
|
||||
bool mBigName;
|
||||
bool mHideAvatarColumn;
|
||||
bool mHideGroups;
|
||||
bool mShowGroups;
|
||||
bool mHideState;
|
||||
bool mHideStatusColumn;
|
||||
bool mHideUnconnected;
|
||||
|
||||
QString filterText;
|
||||
@ -96,20 +90,15 @@ private:
|
||||
|
||||
QTreeWidgetItem *getCurrentPeer() const;
|
||||
static bool filterItem(QTreeWidgetItem *pItem, const QString &sPattern);
|
||||
void updateHeaderSizes();
|
||||
|
||||
bool correctColumnStatusSize;
|
||||
bool firstTimeShown;
|
||||
|
||||
|
||||
// QString fileName;
|
||||
void updateHeader();
|
||||
void initializeHeader(bool afterLoadSettings);
|
||||
|
||||
private slots:
|
||||
void groupsChanged();
|
||||
void insertPeers();
|
||||
void peerSortIndicatorChanged(int,Qt::SortOrder);
|
||||
void peerTreeWidgetCostumPopupMenu();
|
||||
void updateAvatar(const QString &);
|
||||
void updateMenu();
|
||||
|
||||
void pastePerson();
|
||||
|
||||
|
@ -1,90 +1,216 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FriendList</class>
|
||||
<widget class="QWidget" name="FriendList">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>337</width>
|
||||
<height>229</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="peerTreeWidget">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Arial</family>
|
||||
<pointsize>9</pointsize>
|
||||
<stylestrategy>PreferAntialias</stylestrategy>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoScroll">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>38</width>
|
||||
<height>38</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoExpandDelay">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="indentation">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="itemsExpandable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="allColumnsShowFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="expandsOnDoubleClick">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>200</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Friends</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Avatar</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FriendList</class>
|
||||
<widget class="QWidget" name="FriendList">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>337</width>
|
||||
<height>229</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="peerTreeWidget">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Arial</family>
|
||||
<pointsize>9</pointsize>
|
||||
<stylestrategy>PreferAntialias</stylestrategy>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>38</width>
|
||||
<height>38</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoExpandDelay">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="indentation">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="itemsExpandable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="allColumnsShowFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="expandsOnDoubleClick">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<attribute name="headerStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Friends</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Last Contact</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Avatar</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<action name="actionHideOfflineFriends">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide Offline Friends</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShowStatusColumn">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSortByState">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>State</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort by State</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionHideState">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide State</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSortPeersDescendingOrder">
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/sort_decrease.png</normaloff>:/images/sort_decrease.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort Descending Order</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort Descending Order</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSortPeersAscendingOrder">
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/sort_incr.png</normaloff>:/images/sort_incr.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort Ascending Order</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort Ascending Order</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShowAvatarColumn">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Avatar</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show Avatar Column</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSortByName">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort by Name</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSortByLastContact">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Last Contact</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort by last contact</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShowLastContactColumn">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Last Contact</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show Last Contact Column</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRootIsDecorated">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set root is Decorated</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set Root Decorated</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShowGroups">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Groups</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show Groups</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Binary file not shown.
@ -3524,7 +3524,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>FlatStyle_RDM</name>
|
||||
<message>
|
||||
<location filename="../gui/RemoteDirModel.cpp" line="+670"/>
|
||||
<location filename="../gui/RemoteDirModel.cpp" line="+674"/>
|
||||
<source>Friends Directories</source>
|
||||
<translation>Dateien von Freunden</translation>
|
||||
</message>
|
||||
@ -4033,7 +4033,7 @@ p, li { white-space: pre-wrap; }
|
||||
<message>
|
||||
<location line="+23"/>
|
||||
<source>Next unread</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Nächste ungelesene</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+154"/>
|
||||
@ -4136,22 +4136,112 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>FriendList</name>
|
||||
<message>
|
||||
<location filename="../gui/common/FriendList.ui" line="+71"/>
|
||||
<location filename="../gui/common/FriendList.ui" line="+62"/>
|
||||
<source>Friends</source>
|
||||
<translation>Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<location line="+26"/>
|
||||
<source>Hide Offline Friends</source>
|
||||
<translation>Verstecke offline Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-21"/>
|
||||
<location line="+29"/>
|
||||
<source>Status</source>
|
||||
<translation>Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+5"/>
|
||||
<location line="+8"/>
|
||||
<source>State</source>
|
||||
<translation>Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<source>Sort by State</source>
|
||||
<translation>Sortiere nach Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+11"/>
|
||||
<source>Hide State</source>
|
||||
<translation>Status ausblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location line="+3"/>
|
||||
<source>Sort Descending Order</source>
|
||||
<translation>Absteigend sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location line="+3"/>
|
||||
<source>Sort Ascending Order</source>
|
||||
<translation>Aufsteigend sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+44"/>
|
||||
<source>Show Last Contact Column</source>
|
||||
<translation>Zeige die Spalte letzer Kontakt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-109"/>
|
||||
<location line="+73"/>
|
||||
<source>Avatar</source>
|
||||
<translation>Avatar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/common/FriendList.cpp" line="+207"/>
|
||||
<source>Hide Avatar Column</source>
|
||||
<translation type="obsolete">Avatar ausblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+11"/>
|
||||
<source>Name</source>
|
||||
<translation>Name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<source>Sort by Name</source>
|
||||
<translation>Sortiere nach Name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-92"/>
|
||||
<location line="+100"/>
|
||||
<location line="+11"/>
|
||||
<source>Last Contact</source>
|
||||
<translation>Letzter Kontakt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-30"/>
|
||||
<source>Show Avatar Column</source>
|
||||
<translation>Zeige Avatar Spalte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+22"/>
|
||||
<source>Sort by last contact</source>
|
||||
<translation>Sortiere nach letztem Kontakt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hide Last Contact Column</source>
|
||||
<translation type="obsolete">Verstecke </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+19"/>
|
||||
<source>Set root is Decorated</source>
|
||||
<translation>Zeige Baumstruktur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<source>Set Root Decorated</source>
|
||||
<translation>Zeige Baumstruktur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+8"/>
|
||||
<location line="+3"/>
|
||||
<source>Show Groups</source>
|
||||
<translation>Zeige Gruppen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/common/FriendList.cpp" line="+302"/>
|
||||
<source>Group</source>
|
||||
<translation>Gruppe</translation>
|
||||
</message>
|
||||
@ -4267,16 +4357,26 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Alle reduzieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+551"/>
|
||||
<location line="+554"/>
|
||||
<location line="+2"/>
|
||||
<source>Available</source>
|
||||
<translation>Verfügbar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+329"/>
|
||||
<location line="+331"/>
|
||||
<source>Do you want to remove this Friend?</source>
|
||||
<translation>Möchtest du diesen Freund entfernen?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+396"/>
|
||||
<source>Sort by</source>
|
||||
<translation>Sortiere nach</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-4"/>
|
||||
<source>Columns</source>
|
||||
<translation>Spalten</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FriendsDialog</name>
|
||||
@ -4439,56 +4539,45 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Nachrichtenverlauf speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+32"/>
|
||||
<source>Hide Offline Friends</source>
|
||||
<translation>Verstecke offline Freunde</translation>
|
||||
<translation type="obsolete">Verstecke offline Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+8"/>
|
||||
<source>Hide Status Column</source>
|
||||
<translation>Status Spalte ausblenden</translation>
|
||||
<translation type="obsolete">Status Spalte ausblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+8"/>
|
||||
<location line="+3"/>
|
||||
<source>Sort by State</source>
|
||||
<translation>Sortiere nach Status</translation>
|
||||
<translation type="obsolete">Sortiere nach Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+43"/>
|
||||
<location line="+3"/>
|
||||
<source>Hide Avatar Column</source>
|
||||
<translation>Avatar ausblenden</translation>
|
||||
<translation type="obsolete">Avatar ausblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hide State</source>
|
||||
<translation type="obsolete">Status ausblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-88"/>
|
||||
<location line="+9"/>
|
||||
<location line="+3"/>
|
||||
<source>Add a new Group</source>
|
||||
<translation>Neue Gruppe hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+50"/>
|
||||
<source>Hide State </source>
|
||||
<translation>Status ausblenden</translation>
|
||||
<translation type="obsolete">Status ausblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location line="+3"/>
|
||||
<source>Sort Descending Order</source>
|
||||
<translation>Absteigend sortieren</translation>
|
||||
<translation type="obsolete">Absteigend sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sort Ascending Order</source>
|
||||
<translation type="obsolete">Aufsteigend sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location line="+3"/>
|
||||
<source>Sort Ascending Order</source>
|
||||
<translation>Aufsteigend sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-65"/>
|
||||
<source>Delete Chat History</source>
|
||||
<translation>Nachrichtenverlauf löschen</translation>
|
||||
</message>
|
||||
@ -4498,7 +4587,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Löscht den gespeicherten und angezeigten Chat Verlauf</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/FriendsDialog.cpp" line="+102"/>
|
||||
<location filename="../gui/FriendsDialog.cpp" line="+89"/>
|
||||
<source>Profile</source>
|
||||
<translation>Profil</translation>
|
||||
</message>
|
||||
@ -4513,12 +4602,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Willkommen bei RetroShare's Gruppenchat.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+59"/>
|
||||
<location line="+64"/>
|
||||
<source>me</source>
|
||||
<translation>ich</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+108"/>
|
||||
<location line="+61"/>
|
||||
<source>Paste RetroShare Link</source>
|
||||
<translation>RetroShare Link einfügen</translation>
|
||||
</message>
|
||||
@ -7617,48 +7706,40 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Suche Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+108"/>
|
||||
<location line="+3"/>
|
||||
<source>Sort Descending Order</source>
|
||||
<translation>Absteigend sortieren</translation>
|
||||
<translation type="obsolete">Absteigend sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location line="+3"/>
|
||||
<source>Sort Ascending Order</source>
|
||||
<translation>Aufsteigend sortieren</translation>
|
||||
<translation type="obsolete">Aufsteigend sortieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+8"/>
|
||||
<source>Set root is Decorated</source>
|
||||
<translation>Zeige Baumstruktur</translation>
|
||||
<translation type="obsolete">Zeige Baumstruktur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<source>Set Root Decorated</source>
|
||||
<translation>Zeige Baumstruktur</translation>
|
||||
<translation type="obsolete">Zeige Baumstruktur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+8"/>
|
||||
<source>Hide Offline Friends</source>
|
||||
<translation>Verstecke offline Freunde</translation>
|
||||
<translation type="obsolete">Verstecke offline Freunde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-118"/>
|
||||
<location line="+24"/>
|
||||
<source>Reset</source>
|
||||
<translation>Zurücksetzen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+126"/>
|
||||
<source>Sort by State</source>
|
||||
<translation>Sortiere nach Status</translation>
|
||||
<translation type="obsolete">Sortiere nach Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Recomend this Friend to...</source>
|
||||
<translation type="obsolete">Freund weiterempfehlen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-416"/>
|
||||
<location line="-290"/>
|
||||
<source>RetroShare Messenger</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -9964,6 +10045,31 @@ Lockdatei:
|
||||
<source>Round Trip Time:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/common/RsCollectionDialog.cpp" line="+137"/>
|
||||
<source>Unable to make path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>Unable to make path:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/common/RsUrlHandler.cpp" line="+39"/>
|
||||
<source>Treatment of collection file has failed.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>The collection file </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source> could not be openned. Reported error is: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QuickStartWizard</name>
|
||||
@ -10341,7 +10447,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>RetroshareDirModel</name>
|
||||
<message>
|
||||
<location filename="../gui/RemoteDirModel.cpp" line="-476"/>
|
||||
<location filename="../gui/RemoteDirModel.cpp" line="-478"/>
|
||||
<source>Anonymous</source>
|
||||
<translation>Anonym</translation>
|
||||
</message>
|
||||
@ -10360,6 +10466,34 @@ p, li { white-space: pre-wrap; }
|
||||
<source>NEW</source>
|
||||
<translation>NEU</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+701"/>
|
||||
<source>Create selection file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>Collection files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RsCollectionDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/common/RsCollectionDialog.cpp" line="-95"/>
|
||||
<source>File</source>
|
||||
<translation type="unfinished">Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<source>Size</source>
|
||||
<translation type="unfinished">Grösse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<source>Hash</source>
|
||||
<translation type="unfinished">Prüfsumme</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Rshare</name>
|
||||
@ -10494,7 +10628,7 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+319"/>
|
||||
<location filename="../gui/SearchDialog.cpp" line="+291"/>
|
||||
<location filename="../gui/SearchDialog.cpp" line="+292"/>
|
||||
<source>Download</source>
|
||||
<translation>Herunterladen</translation>
|
||||
</message>
|
||||
@ -10531,7 +10665,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Ordner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+466"/>
|
||||
<location line="+471"/>
|
||||
<source>New RetroShare Link(s)</source>
|
||||
<translation>Neu(e) RetroShare Link(s)</translation>
|
||||
</message>
|
||||
@ -10586,7 +10720,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Such ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/SearchDialog.cpp" line="-992"/>
|
||||
<location filename="../gui/SearchDialog.cpp" line="-997"/>
|
||||
<source>Download Notice</source>
|
||||
<translation>Download</translation>
|
||||
</message>
|
||||
@ -11040,7 +11174,7 @@ Es hilft auch, wenn Sie sich hinter einer Firewall/VPN befinden.</translation>
|
||||
<message>
|
||||
<location line="+18"/>
|
||||
<source>Plugins</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="unfinished">Plugins</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
@ -11397,7 +11531,7 @@ p, li { white-space: pre-wrap; }
|
||||
<name>SharedFilesDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/SharedFilesDialog.ui" line="+984"/>
|
||||
<location filename="../gui/SharedFilesDialog.cpp" line="+386"/>
|
||||
<location filename="../gui/SharedFilesDialog.cpp" line="+388"/>
|
||||
<source>Download</source>
|
||||
<translation>Herunterladen</translation>
|
||||
</message>
|
||||
@ -11481,22 +11615,22 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/SharedFilesDialog.cpp" line="-154"/>
|
||||
<location line="+569"/>
|
||||
<location line="+581"/>
|
||||
<source>Open File</source>
|
||||
<translation>Datei öffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-567"/>
|
||||
<location line="-579"/>
|
||||
<source>Open Folder</source>
|
||||
<translation>Ordner öffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+576"/>
|
||||
<location line="+588"/>
|
||||
<source>Set command for opening this file</source>
|
||||
<translation>Setze eine Regel zum Öffnen dieser Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-419"/>
|
||||
<location line="-431"/>
|
||||
<source>Copy retroshare Link</source>
|
||||
<translation>Kopiere RetroShare Link</translation>
|
||||
</message>
|
||||
@ -11516,7 +11650,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Sende RetroShare Link</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-176"/>
|
||||
<location line="-178"/>
|
||||
<source>Copy retroshare Links to Clipboard</source>
|
||||
<translation>Kopiere RetroShare Links in die Zwischenablage</translation>
|
||||
</message>
|
||||
@ -11546,13 +11680,18 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Füge die Links zur Verknüpfungs-Wolke hinzu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+172"/>
|
||||
<location line="+379"/>
|
||||
<location line="+3"/>
|
||||
<source>Create collection file</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+171"/>
|
||||
<location line="+391"/>
|
||||
<source>Recommend in a message to</source>
|
||||
<translation>Empfehle in einer Nachricht an</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-253"/>
|
||||
<location line="-257"/>
|
||||
<location line="+23"/>
|
||||
<location line="+24"/>
|
||||
<source>RetroShare Link</source>
|
||||
@ -11567,7 +11706,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Empfehlung(en)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+191"/>
|
||||
<location line="+195"/>
|
||||
<source><strong>My Shared Files</strong></source>
|
||||
<translation><strong>Meine Dateien</strong></translation>
|
||||
</message>
|
||||
@ -12545,7 +12684,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>TransfersDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/TransfersDialog.cpp" line="+335"/>
|
||||
<location filename="../gui/TransfersDialog.cpp" line="+336"/>
|
||||
<source>Cancel</source>
|
||||
<translation>Abbrechen</translation>
|
||||
</message>
|
||||
@ -12738,7 +12877,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Blockstrategie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+399"/>
|
||||
<location line="+401"/>
|
||||
<source>Queued</source>
|
||||
<translation>In Warteschleife</translation>
|
||||
</message>
|
||||
@ -12788,7 +12927,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Soll dieser Download wirklich abgebrochen und gelöscht werden?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-934"/>
|
||||
<location line="-936"/>
|
||||
<source>Speed / Queue position</source>
|
||||
<translation>Geschwindigkeits- / Warteschlangenposition</translation>
|
||||
</message>
|
||||
@ -12841,30 +12980,30 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+12"/>
|
||||
<location line="+539"/>
|
||||
<location line="+541"/>
|
||||
<source>Slower</source>
|
||||
<translation>Langsamer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-537"/>
|
||||
<location line="+538"/>
|
||||
<location line="-539"/>
|
||||
<location line="+540"/>
|
||||
<location line="+2"/>
|
||||
<source>Average</source>
|
||||
<translation>Durchschnitt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-538"/>
|
||||
<location line="+537"/>
|
||||
<location line="-540"/>
|
||||
<location line="+539"/>
|
||||
<source>Faster</source>
|
||||
<translation>Schneller</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-427"/>
|
||||
<location line="-429"/>
|
||||
<source>Move in Queue...</source>
|
||||
<translation>Verschiebe in Warteschlange...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+263"/>
|
||||
<location line="+265"/>
|
||||
<location line="+144"/>
|
||||
<location line="+135"/>
|
||||
<source>Failed</source>
|
||||
@ -12917,7 +13056,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Überprüfe...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-564"/>
|
||||
<location line="-566"/>
|
||||
<source>Force Check</source>
|
||||
<translation>Erzwinge Überprüfung</translation>
|
||||
</message>
|
||||
@ -12925,7 +13064,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>TreeStyle_RDM</name>
|
||||
<message>
|
||||
<location filename="../gui/RemoteDirModel.cpp" line="+109"/>
|
||||
<location filename="../gui/RemoteDirModel.cpp" line="-590"/>
|
||||
<source>My files</source>
|
||||
<translation>Meine Dateien</translation>
|
||||
</message>
|
||||
@ -13338,4 +13477,54 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Bilder (*.png *.xpm *.jpg *.tiff *.gif)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>rsCollectionDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/common/RsCollectionDialog.ui" line="+14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+10"/>
|
||||
<source>File name :</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+10"/>
|
||||
<source>Total size :</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+10"/>
|
||||
<source>Selected files:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+14"/>
|
||||
<location line="+7"/>
|
||||
<location line="+7"/>
|
||||
<source>TextLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+58"/>
|
||||
<source>Select all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+7"/>
|
||||
<source>Deselect all</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+7"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">Abbrechen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+7"/>
|
||||
<source>Download!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
Loading…
Reference in New Issue
Block a user