mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
only show unread and grid view buttons when posts tab is selected
This commit is contained in:
parent
5069a1a10e
commit
456d742cd1
@ -418,6 +418,8 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||
connect(ui->postsTree->selectionModel(),SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)),this,SLOT(showPostDetails()));
|
||||
connect(ui->postsTree,SIGNAL(customContextMenuRequested(const QPoint&)),this,SLOT(postContextMenu(const QPoint&)));
|
||||
|
||||
connect(ui->channel_TW,SIGNAL(currentChanged(int)),this,SLOT(currentTabChanged(int)));
|
||||
|
||||
connect(mChannelPostsModel,SIGNAL(channelPostsLoaded()),this,SLOT(postChannelPostLoad()));
|
||||
|
||||
ui->postName_LB->hide();
|
||||
@ -503,6 +505,22 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||
}, mEventHandlerId, RsEventType::GXS_CHANNELS );
|
||||
}
|
||||
|
||||
void GxsChannelPostsWidgetWithModel::currentTabChanged(int t)
|
||||
{
|
||||
switch(t)
|
||||
{
|
||||
case CHANNEL_TABS_DETAILS:
|
||||
case CHANNEL_TABS_FILES:
|
||||
ui->showUnread_TB->setHidden(true);
|
||||
ui->viewType_TB->setHidden(true);
|
||||
break;
|
||||
|
||||
case CHANNEL_TABS_POSTS:
|
||||
ui->showUnread_TB->setHidden(false);
|
||||
ui->viewType_TB->setHidden(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
void GxsChannelPostsWidgetWithModel::updateZoomFactor(bool zoom_or_unzoom)
|
||||
{
|
||||
mChannelPostsDelegate->zoom(zoom_or_unzoom);
|
||||
|
@ -160,6 +160,7 @@ private slots:
|
||||
void markMessageUnread();
|
||||
|
||||
public slots:
|
||||
void currentTabChanged(int t);
|
||||
void sortColumnFiles(int col,Qt::SortOrder so);
|
||||
void sortColumnPostFiles(int col,Qt::SortOrder so);
|
||||
void updateCommentsCount(int n);
|
||||
|
@ -194,7 +194,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="channel_TW">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
|
Loading…
Reference in New Issue
Block a user