mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 00:49:28 -05:00
fixed coumn visibility depending on box
This commit is contained in:
parent
a7570b70eb
commit
7b78b87c65
@ -88,7 +88,7 @@ int RsMessageModel::rowCount(const QModelIndex& parent) const
|
||||
|
||||
int RsMessageModel::columnCount(const QModelIndex &/*parent*/) const
|
||||
{
|
||||
return COLUMN_THREAD_NB_COLUMNS ;
|
||||
return COLUMN_THREAD_NB_COLUMNS;
|
||||
}
|
||||
|
||||
bool RsMessageModel::getMessageData(const QModelIndex& i,Rs::Msgs::MessageInfo& fmpe) const
|
||||
|
@ -54,9 +54,9 @@ public:
|
||||
COLUMN_THREAD_DATE = 0x07,
|
||||
COLUMN_THREAD_TAGS = 0x08,
|
||||
COLUMN_THREAD_MSGID = 0x09,
|
||||
COLUMN_THREAD_NB_COLUMNS = 0x0a,
|
||||
COLUMN_THREAD_CONTENT = 0x0b
|
||||
};
|
||||
COLUMN_THREAD_CONTENT = 0x0a,
|
||||
COLUMN_THREAD_NB_COLUMNS = 0x0b
|
||||
};
|
||||
|
||||
enum QuickViewFilter {
|
||||
QUICK_VIEW_ALL = 0x00,
|
||||
|
@ -254,9 +254,6 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
|
||||
sortColumn(RsMessageModel::COLUMN_THREAD_DATE,Qt::DescendingOrder);
|
||||
|
||||
// load settings
|
||||
processSettings(true);
|
||||
|
||||
//ui.messageTreeWidget->installEventFilter(this);
|
||||
|
||||
// remove close button of the the first tab
|
||||
@ -299,6 +296,11 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
|
||||
connect(ui.messageTreeWidget->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)), this, SLOT(currentChanged(const QModelIndex&,const QModelIndex&)));
|
||||
|
||||
// load settings
|
||||
processSettings(true);
|
||||
|
||||
ui.listWidget->setCurrentRow(0); // always starts with inbox => allows to setup the proper number of columns
|
||||
|
||||
mEventHandlerId=0;
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event) { RsQThreadUtils::postToObject( [this,event]() { handleEvent_main_thread(event); }); }, mEventHandlerId, RsEventType::MAIL_STATUS );
|
||||
|
||||
@ -917,11 +919,14 @@ void MessagesDialog::changeBox(int box_row)
|
||||
}
|
||||
|
||||
insertMsgTxtAndFiles(ui.messageTreeWidget->currentIndex());
|
||||
|
||||
ui.messageTreeWidget->setPlaceholderText(placeholderText);
|
||||
ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_READ,box_row!=ROW_INBOX);
|
||||
ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_STAR,box_row==ROW_OUTBOX);
|
||||
ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_SPAM,box_row==ROW_OUTBOX);
|
||||
ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_TAGS,box_row==ROW_OUTBOX);
|
||||
ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_MSGID,true);
|
||||
ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_CONTENT,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user