mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
moved channel action menu into right click, for better consistency
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5309 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
233914c02d
commit
cda4adbf5b
@ -62,11 +62,6 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
||||
|
||||
connect(newChannelButton, SIGNAL(clicked()), this, SLOT(createChannel()));
|
||||
connect(postButton, SIGNAL(clicked()), this, SLOT(createMsg()));
|
||||
connect(subscribeButton, SIGNAL( clicked( void ) ), this, SLOT( subscribeChannel ( void ) ) );
|
||||
connect(unsubscribeButton, SIGNAL( clicked( void ) ), this, SLOT( unsubscribeChannel ( void ) ) );
|
||||
connect(actionsetAllAsRead, SIGNAL(triggered()), this, SLOT(setAllAsReadClicked()));
|
||||
connect(actionEnable_Auto_Download, SIGNAL(triggered()), this, SLOT(toggleAutoDownload()));
|
||||
|
||||
connect(NotifyQt::getInstance(), SIGNAL(channelMsgReadSatusChanged(QString,QString,int)), this, SLOT(channelMsgReadSatusChanged(QString,QString,int)));
|
||||
|
||||
/*************** Setup Left Hand Side (List of Channels) ****************/
|
||||
@ -89,11 +84,6 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
||||
popularChannels = treeWidget->addCategoryItem(tr("Popular Channels"), QIcon(), false);
|
||||
otherChannels = treeWidget->addCategoryItem(tr("Other Channels"), QIcon(), false);
|
||||
|
||||
QMenu * channeloptsmenu = new QMenu();
|
||||
channeloptsmenu->addAction(actionsetAllAsRead);
|
||||
channeloptsmenu->addAction(actionEnable_Auto_Download);
|
||||
channeloptions_Button->setMenu(channeloptsmenu);
|
||||
|
||||
progressLabel->hide();
|
||||
progressBar->hide();
|
||||
|
||||
@ -162,6 +152,17 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint /*point*/ )
|
||||
QAction *unsubscribechannelAct = new QAction(QIcon(":/images/cancel.png"), tr( "Unsubscribe to Channel" ), &contextMnu);
|
||||
connect( unsubscribechannelAct , SIGNAL( triggered() ), this, SLOT( unsubscribeChannel() ) );
|
||||
|
||||
QAction *setallasreadchannelAct = new QAction(QIcon(":/images/message-mail-read.png"), tr( "Set all as read" ), &contextMnu);
|
||||
connect( setallasreadchannelAct , SIGNAL( triggered() ), this, SLOT( setAllAsReadClicked() ) );
|
||||
|
||||
bool autoDl = false;
|
||||
rsChannels->channelGetAutoDl(mChannelId, autoDl);
|
||||
|
||||
QAction *autochannelAct = autoDl? (new QAction(QIcon(":/images/redled.png"), tr( "Disable Auto-Download" ), &contextMnu))
|
||||
: (new QAction(QIcon(":/images/start.png"),tr( "Enable Auto-Download" ), &contextMnu)) ;
|
||||
|
||||
connect( autochannelAct , SIGNAL( triggered() ), this, SLOT( toggleAutoDownload() ) );
|
||||
|
||||
QAction *channeldetailsAct = new QAction(QIcon(":/images/info16.png"), tr( "Show Channel Details" ), &contextMnu);
|
||||
connect( channeldetailsAct , SIGNAL( triggered() ), this, SLOT( showChannelDetails() ) );
|
||||
|
||||
@ -187,11 +188,17 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint /*point*/ )
|
||||
contextMnu.addAction( channeldetailsAct );
|
||||
contextMnu.addAction( shareKeyAct );
|
||||
contextMnu.addAction( restoreKeysAct );
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction( autochannelAct );
|
||||
contextMnu.addAction( setallasreadchannelAct );
|
||||
} else if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED) {
|
||||
contextMnu.addAction( unsubscribechannelAct );
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction( channeldetailsAct );
|
||||
contextMnu.addAction( restoreKeysAct );
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction( autochannelAct );
|
||||
contextMnu.addAction( setallasreadchannelAct );
|
||||
} else {
|
||||
contextMnu.addAction( subscribechannelAct );
|
||||
contextMnu.addSeparator();
|
||||
@ -199,6 +206,7 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint /*point*/ )
|
||||
contextMnu.addAction( restoreKeysAct );
|
||||
}
|
||||
|
||||
contextMnu.addSeparator();
|
||||
QAction *action = contextMnu.addAction(QIcon(":/images/copyrslink.png"), tr("Copy RetroShare Link"), this, SLOT(copyChannelLink()));
|
||||
action->setEnabled(!mChannelId.empty());
|
||||
|
||||
@ -471,12 +479,6 @@ void ChannelFeed::updateChannelMsgs()
|
||||
ChannelInfo ci;
|
||||
if (!rsChannels->getChannelInfo(mChannelId, ci)) {
|
||||
postButton->setEnabled(false);
|
||||
subscribeButton->setEnabled(false);
|
||||
unsubscribeButton->setEnabled(false);
|
||||
subscribeButton->hide();
|
||||
unsubscribeButton->hide();
|
||||
actionsetAllAsRead->setEnabled(false);
|
||||
actionEnable_Auto_Download->setEnabled(false);
|
||||
nameLabel->setText(tr("No Channel Selected"));
|
||||
iconLabel->setPixmap(QPixmap(":/images/channels.png"));
|
||||
iconLabel->setEnabled(false);
|
||||
@ -502,21 +504,6 @@ void ChannelFeed::updateChannelMsgs()
|
||||
QString cname = QString::fromStdWString(ci.channelName);
|
||||
nameLabel->setText(channelStr.arg(cname));
|
||||
|
||||
/* do buttons */
|
||||
if (ci.channelFlags & RS_DISTRIB_SUBSCRIBED) {
|
||||
subscribeButton->setEnabled(false);
|
||||
subscribeButton->hide();
|
||||
unsubscribeButton->show();
|
||||
unsubscribeButton->setEnabled(true);
|
||||
actionsetAllAsRead->setEnabled(true);
|
||||
} else {
|
||||
subscribeButton->setEnabled(true);
|
||||
subscribeButton->show();
|
||||
unsubscribeButton->setEnabled(false);
|
||||
unsubscribeButton->hide();
|
||||
actionsetAllAsRead->setEnabled(false);
|
||||
}
|
||||
|
||||
if (ci.channelFlags & RS_DISTRIB_PUBLISH) {
|
||||
postButton->setEnabled(true);
|
||||
} else {
|
||||
|
@ -298,100 +298,6 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="unsubscribeButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Unsubcribe To Channel</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton, QPushButton, QComboBox {
|
||||
border-image: url(:/images/btn_26.png) 4;
|
||||
border-width: 4;
|
||||
padding: 0px 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
QToolButton:hover, QPushButton:hover, QComboBox:hover {
|
||||
border-image: url(:/images/btn_26_hover.png) 4;
|
||||
}
|
||||
|
||||
QToolButton:disabled, QPushButton:disabled, QComboBox::disabled {
|
||||
color:gray;
|
||||
}
|
||||
|
||||
QToolButton:pressed, QPushButton:pressed{
|
||||
border-image: url(:/images/btn_26_pressed.png) 4;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unsubscribe</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="subscribeButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Subscribe To Channel</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton, QPushButton, QComboBox {
|
||||
border-image: url(:/images/btn_26.png) 4;
|
||||
border-width: 4;
|
||||
padding: 0px 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
QToolButton:hover, QPushButton:hover, QComboBox:hover {
|
||||
border-image: url(:/images/btn_26_hover.png) 4;
|
||||
}
|
||||
|
||||
QToolButton:disabled, QPushButton:disabled, QComboBox::disabled {
|
||||
color:gray;
|
||||
}
|
||||
|
||||
QToolButton:pressed, QPushButton:pressed{
|
||||
border-image: url(:/images/btn_26_pressed.png) 4;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Subscribe</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/konqsidebar_news16.png</normaloff>:/images/konqsidebar_news16.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
@ -463,46 +369,6 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QPushButton" name="channeloptions_Button">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolButton, QPushButton, QComboBox {
|
||||
border-image: url(:/images/btn_26.png) 4;
|
||||
border-width: 4;
|
||||
padding: 0px 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
QToolButton:hover, QPushButton:hover, QComboBox:hover {
|
||||
border-image: url(:/images/btn_26_hover.png) 4;
|
||||
}
|
||||
|
||||
QToolButton:disabled, QPushButton:disabled, QComboBox::disabled {
|
||||
color:gray;
|
||||
}
|
||||
|
||||
QToolButton:pressed, QPushButton:pressed{
|
||||
border-image: url(:/images/btn_26_pressed.png) 4;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/kcmsystem24.png</normaloff>:/images/kcmsystem24.png</iconset>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -518,7 +384,7 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<width>395</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user