Commit 07a9bd96 authored by Mehrdad Momeny's avatar Mehrdad Momeny
Browse files

BUG:250574 "mark all read" button isn't shown if only unread in searches FIXED

parent cf025b93
......@@ -114,6 +114,7 @@ TwitterApiSearchTimelineWidget* TwitterApiMicroBlogWidget::addSearchTimelineWidg
if(mbw) {
mbw->setObjectName(name);
mSearchTimelines.insert(name, mbw);
timelines().insert(name, mbw);
timelinesTabWidget()->addTab(mbw, name);
timelinesTabWidget()->setTabIcon(timelinesTabWidget()->indexOf(mbw), KIcon("edit-find"));
connect( mbw, SIGNAL(updateUnreadCount(int)),
......@@ -155,17 +156,17 @@ void TwitterApiMicroBlogWidget::slotCloseCurrentSearch()
closeSearch(stw);
}
void TwitterApiMicroBlogWidget::markAllAsRead()
{
Choqok::UI::MicroBlogWidget::markAllAsRead();
foreach(TwitterApiSearchTimelineWidget *wd, mSearchTimelines) {
wd->markAllAsRead();
int tabIndex = timelinesTabWidget()->indexOf(wd);
if(tabIndex == -1)
continue;
timelinesTabWidget()->setTabText( tabIndex, wd->timelineName() );
}
}
// void TwitterApiMicroBlogWidget::markAllAsRead()
// {
// Choqok::UI::MicroBlogWidget::markAllAsRead();
// foreach(TwitterApiSearchTimelineWidget *wd, mSearchTimelines) {
// wd->markAllAsRead();
// int tabIndex = timelinesTabWidget()->indexOf(wd);
// if(tabIndex == -1)
// continue;
// timelinesTabWidget()->setTabText( tabIndex, wd->timelineName() );
// }
// }
void TwitterApiMicroBlogWidget::slotAccountModified(Choqok::Account* account)
{
......@@ -244,6 +245,7 @@ void TwitterApiMicroBlogWidget::closeSearch(Choqok::UI::TimelineWidget* searchWi
QString name = mSearchTimelines.key(tst);
mSearchTimelines.value(name)->close();
mSearchTimelines.remove(name);
timelines().remove(name);
} else {
QStringList lst = d->account->timelineNames();
lst.removeOne(searchWidget->timelineName());
......
......@@ -39,7 +39,7 @@ public:
virtual void initUi();
public Q_SLOTS:
virtual void markAllAsRead();
// virtual void markAllAsRead();
void slotContextMenu(QWidget *w, const QPoint& pt);
protected Q_SLOTS:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment