#include "libkita/kita_misc.h"
#include "libkita/kitaconfig.h"
#include "libkita/favoritethreads.h"
+#include "libkita/datmanager.h"
#include "part/kita2ch.h"
KitaSubjectView::KitaSubjectView( QWidget* parent, const char* name )
} else {
popup.insertItem( i18n( "Add to Favorites" ), 3 );
}
+ popup.insertSeparator();
+ popup.insertItem( i18n( "Delete Log" ), 4 );
QClipboard* clipboard = QApplication::clipboard();
} else {
emit bookmarked( thread->datURL(), true );
}
+ break;
+ case 4:
+ deleteLog( Kita::DatManager::threadURL( thread->datURL() ) );
+ break;
default:
break;
}
}
+
+void KitaSubjectView::deleteLog( const KURL& url )
+{
+ if ( QMessageBox::warning( this,
+ "Kita",
+ "Do you want to delete Log ?",
+ QMessageBox::Ok, QMessageBox::Cancel | QMessageBox::Default )
+ == QMessageBox::Ok )
+ {
+ Kita::DatManager::deleteCache( url, this );
+ }
+}
QString m_boardURL;
int m_unreadNum, m_readNum, m_newNum;
void UpdateKindLabel();
+ void deleteLog( const KURL& url );
private slots:
void loadThread( QListViewItem* item );