if ( m_nowLoading ) return FALSE;
bool ret = FALSE;
- if( !m_thread ) ret = Kita::Access::deleteLog( m_thread, parent );
+ if( m_thread ) ret = Kita::Access::deleteLog( m_thread, parent );
+ KitaThreadInfo::removeThreadInfo( m_datURL.prettyURL() );
if(ret) initPrivate();
return ret;
}
}
+void KitaThreadInfo::removeThreadInfo( const QString& url )
+{
+ KitaThreadInfo * instance = KitaThreadInfo::getInstance();
+ instance->m_readDict.remove( url );
+}
+
QDataStream& operator<<( QDataStream& s, KitaThreadInfo& c )
{
s << c.m_readDict;
static void setResNum( const QString& url, int num );
static int resNum( const QString& url );
static void replace( const QString fromURL, const QString toURL );
+ static void removeThreadInfo( const QString& url );
friend QDataStream& operator<<( QDataStream& s, KitaThreadInfo& c );
friend QDataStream& operator>>( QDataStream& s, KitaThreadInfo& c );
private:
GobackAnchorButton->setPixmap( SmallIcon( "2leftarrow" ) );
BookmarkButton->setPixmap( SmallIcon( "bookmark_add" ) );
writeButton->setPixmap( SmallIcon( "pencil" ) );
+ deleteButton->setPixmap( SmallIcon( "edittrash" ) );
}
setAcceptDrops( true ); // DND Drop eneble: 2nd stage. - enable on "KitaThreadView" widget and disable on the others(child widgets of "KitaThreadView").
m_threadPart->enableMetaRefresh( false ); //disable <meta refresh="...">
-
+ connect( deleteButton, SIGNAL( clicked() ),
+ SLOT( slotDeleteButtonClicked() ) );
connect( writeButton, SIGNAL( clicked() ),
SLOT( slotWriteButtonClicked() ) );
connect( m_threadPart, SIGNAL( openWriteDialog( QString ) ),
}
}
+void KitaThreadView::slotDeleteButtonClicked()
+{
+ Kita::DatManager::deleteCache( threadURL(), this );
+}
+
/*--------------------------------------------------------*/
/* These public functions are used for KitaNavi & preview */
/*--------------------------------------------------------*/
void slotShowErrorDialog( const QString& input, const KURL& urlOfInput = 0 );
void slotComboActivated( int index );
void slotUpdateInfo();
+ void slotDeleteButtonClicked();
signals:
void showThreadCompleted( const KURL& threadUrl );
<rect>
<x>0</x>
<y>0</y>
- <width>804</width>
+ <width>870</width>
<height>480</height>
</rect>
</property>
<cstring>GobackAnchorButton</cstring>
</property>
<property name="text">
- <string>GobackAnchor</string>
+ <string>Goback</string>
</property>
<property name="toolTip" stdset="0">
<string>go back anchor</string>
<bool>false</bool>
</property>
<property name="text">
- <string>AddBookmark</string>
+ <string>Bookmark</string>
</property>
<property name="toggleButton">
<bool>true</bool>
<enum>Horizontal</enum>
</property>
<property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QToolButton">
+ <property name="name">
+ <cstring>deleteButton</cstring>
+ </property>
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
- <width>82</width>
+ <width>40</width>
<height>20</height>
</size>
</property>