This commit is contained in:
Martin Rotter 2014-11-05 16:56:02 +01:00
parent d2d23bda7f
commit bb29352afc
5 changed files with 24 additions and 6 deletions

View File

@ -9,6 +9,7 @@ Fixed:
Added:
<ul>
<li>Layout orientation of message list/viewer is now changeable via "View" menu (bug report #98).</li>
<li>Sort order/column in message list is now persistent (bug #97).</li>
<li>Inline searching in feed/message list is now case insensitive and more polished (bug report #84).</li>
<li>Items in feed list (categories and feeds) now can be re-arranged via drag-drop functionality (issue report #91).</li>

View File

@ -133,6 +133,15 @@ void FeedMessageViewer::quit() {
}
}
void FeedMessageViewer::switchMessageSplitterOrientation() {
if (m_messageSplitter->orientation() == Qt::Vertical) {
m_messageSplitter->setOrientation(Qt::Horizontal);
}
else {
m_messageSplitter->setOrientation(Qt::Vertical);
}
}
void FeedMessageViewer::setToolBarsEnabled(bool enable) {
m_toolBarsEnabled = enable;
m_toolBarFeeds->setVisible(enable);
@ -277,6 +286,8 @@ void FeedMessageViewer::createConnections() {
SIGNAL(triggered()), m_messagesView, SLOT(selectPreviousItem()));
connect(form_main->m_ui->m_actionDefragmentDatabase,
SIGNAL(triggered()), this, SLOT(vacuumDatabase()));
connect(form_main->m_ui->m_actionSwitchMessageListOrientation, SIGNAL(triggered()),
this, SLOT(switchMessageSplitterOrientation()));
}
void FeedMessageViewer::initialize() {
@ -354,7 +365,6 @@ void FeedMessageViewer::initializeViews() {
setTabOrder(m_messagesView, m_toolBarFeeds);
setTabOrder(m_toolBarFeeds, m_toolBarMessages);
setTabOrder(m_toolBarMessages, m_messagesBrowser);
}
void FeedMessageViewer::vacuumDatabase() {

View File

@ -83,6 +83,8 @@ class FeedMessageViewer : public TabContent {
}
public slots:
void switchMessageSplitterOrientation();
// Enables/disables main toolbars or list headers.
void setToolBarsEnabled(bool enable);
void setListHeadersEnabled(bool enable);

View File

@ -91,6 +91,7 @@
</widget>
<addaction name="m_menuShowHide"/>
<addaction name="m_actionSwitchMainWindow"/>
<addaction name="m_actionSwitchMessageListOrientation"/>
</widget>
<widget class="QMenu" name="m_menuTools">
<property name="title">
@ -628,6 +629,14 @@
<string>&amp;Backup database/settings</string>
</property>
</action>
<action name="m_actionSwitchMessageListOrientation">
<property name="text">
<string>Switch message list layout orientation</string>
</property>
<property name="shortcut">
<string notr="true"/>
</property>
</action>
</widget>
<customwidgets>
<customwidget>

View File

@ -236,15 +236,11 @@ void MessagesView::selectionChanged(const QItemSelection &selected,
void MessagesView::loadFeeds(const QList<int> &feed_ids) {
m_sourceModel->loadMessages(feed_ids);
// Make sure that initial sorting is that unread messages are visible
// first.
// TODO: pokračovat, při stortovani uložit column a order
int col = qApp->settings()->value(APP_CFG_GUI, "default_sort_column_messages", MSG_DB_DCREATED_INDEX).toInt();
Qt::SortOrder ord = static_cast<Qt::SortOrder>(qApp->settings()->value(APP_CFG_GUI,
"default_sort_order_messages", Qt::DescendingOrder).toInt());
sortByColumn(col,
ord);
sortByColumn(col, ord);
// Messages are loaded, make sure that previously
// active message is not shown in browser.