OSDN Git Service

>>907
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Fri, 18 Jun 2004 04:02:41 +0000 (04:02 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Fri, 18 Jun 2004 04:02:41 +0000 (04:02 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1175 56b19765-1e22-0410-a548-a0f45d66c51a

23 files changed:
kita/src/Makefile.am
kita/src/asciiartprefbase.ui
kita/src/debugprefbase.ui
kita/src/kita.cpp
kita/src/kita.h
kita/src/kitacolorprefbase.ui
kita/src/kitafontprefbase.ui
kita/src/kitasubjecttabwidget.cpp
kita/src/kitasubjecttabwidget.h
kita/src/kitasubjectview.cpp
kita/src/kitasubjectview.h
kita/src/kitathreadtabwidget.cpp
kita/src/kitathreadtabwidget.h
kita/src/kitaui.rc
kita/src/part/Makefile.am
kita/src/part/kitathreadpart.cpp
kita/src/part/kitathreadpart.h
kita/src/part/kitathreadview.cpp
kita/src/part/kitathreadview.h
kita/src/part/kitathreadviewbase.ui
kita/src/part/kitawritedialog.cpp
kita/src/part/kitawritedialogbase.ui
kita/src/uiprefbase.ui

index 543a083..fc7ec6d 100644 (file)
@@ -48,7 +48,7 @@ kdelnk_DATA = kita.desktop
 
 # this is where the XML-GUI resource file goes
 rcdir = $(kde_datadir)/kita
-rc_DATA = kitaui.rc kitathreadtabwidgetui.rc
+rc_DATA = kitaui.rc
 
 dummy.cpp:
        echo > dummy.cpp
index c0b0e4f..1160865 100644 (file)
     <property name="caption">
         <string>Form1</string>
     </property>
-    <widget class="KTextEdit">
+    <vbox>
         <property name="name">
-            <cstring>asciiArtText</cstring>
+            <cstring>unnamed</cstring>
         </property>
-        <property name="geometry">
-            <rect>
-                <x>10</x>
-                <y>10</y>
-                <width>240</width>
-                <height>190</height>
-            </rect>
-        </property>
-    </widget>
-    <widget class="QCheckBox">
-        <property name="name">
-            <cstring>showAACheckBox</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>10</x>
-                <y>210</y>
-                <width>288</width>
-                <height>18</height>
-            </rect>
-        </property>
-        <property name="text">
-            <string>show AA (for KDE 3.1.x)</string>
-        </property>
-    </widget>
+        <widget class="KTextEdit">
+            <property name="name">
+                <cstring>asciiArtText</cstring>
+            </property>
+        </widget>
+        <widget class="QCheckBox">
+            <property name="name">
+                <cstring>showAACheckBox</cstring>
+            </property>
+            <property name="text">
+                <string>show AA (for KDE 3.1.x)</string>
+            </property>
+        </widget>
+    </vbox>
 </widget>
+<customwidgets>
+</customwidgets>
 <layoutdefaults spacing="6" margin="11"/>
 <includehints>
     <includehint>ktextedit.h</includehint>
index 02bc77e..9efb444 100644 (file)
     <property name="caption">
         <string>Form2</string>
     </property>
-    <widget class="QLabel">
+    <vbox>
         <property name="name">
-            <cstring>textLabel1</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>10</x>
-                <y>20</y>
-                <width>70</width>
-                <height>20</height>
-            </rect>
-        </property>
-        <property name="frameShape">
-            <enum>NoFrame</enum>
-        </property>
-        <property name="frameShadow">
-            <enum>Plain</enum>
-        </property>
-        <property name="text">
-            <string>from:</string>
-        </property>
-    </widget>
-    <widget class="QLabel">
-        <property name="name">
-            <cstring>textLabel2</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>10</x>
-                <y>50</y>
-                <width>70</width>
-                <height>20</height>
-            </rect>
-        </property>
-        <property name="text">
-            <string>to:</string>
-        </property>
-    </widget>
-    <widget class="QLineEdit">
-        <property name="name">
-            <cstring>toURLLine</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>90</x>
-                <y>50</y>
-                <width>280</width>
-                <height>20</height>
-            </rect>
-        </property>
-        <property name="text">
-            <string>http://</string>
-        </property>
-    </widget>
-    <widget class="QLineEdit">
-        <property name="name">
-            <cstring>fromURLLine</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>90</x>
-                <y>20</y>
-                <width>280</width>
-                <height>20</height>
-            </rect>
-        </property>
-        <property name="text">
-            <string>http://</string>
-        </property>
-    </widget>
-    <widget class="QPushButton">
-        <property name="name">
-            <cstring>replaceButton</cstring>
-        </property>
-        <property name="geometry">
-            <rect>
-                <x>260</x>
-                <y>80</y>
-                <width>115</width>
-                <height>27</height>
-            </rect>
-        </property>
-        <property name="text">
-            <string>replace</string>
-        </property>
-    </widget>
+            <cstring>unnamed</cstring>
+        </property>
+        <widget class="QLayoutWidget">
+            <property name="name">
+                <cstring>layout2</cstring>
+            </property>
+            <grid>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <spacer row="2" column="1">
+                    <property name="name">
+                        <cstring>spacer1</cstring>
+                    </property>
+                    <property name="orientation">
+                        <enum>Horizontal</enum>
+                    </property>
+                    <property name="sizeType">
+                        <enum>Expanding</enum>
+                    </property>
+                    <property name="sizeHint">
+                        <size>
+                            <width>65</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+                <widget class="QPushButton" row="2" column="2">
+                    <property name="name">
+                        <cstring>replaceButton</cstring>
+                    </property>
+                    <property name="text">
+                        <string>replace</string>
+                    </property>
+                </widget>
+                <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="2">
+                    <property name="name">
+                        <cstring>toURLLine</cstring>
+                    </property>
+                    <property name="text">
+                        <string>http://</string>
+                    </property>
+                </widget>
+                <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2">
+                    <property name="name">
+                        <cstring>fromURLLine</cstring>
+                    </property>
+                    <property name="text">
+                        <string>http://</string>
+                    </property>
+                </widget>
+                <widget class="QLabel" row="1" column="0">
+                    <property name="name">
+                        <cstring>textLabel2</cstring>
+                    </property>
+                    <property name="text">
+                        <string>to:</string>
+                    </property>
+                </widget>
+                <widget class="QLabel" row="0" column="0">
+                    <property name="name">
+                        <cstring>textLabel1</cstring>
+                    </property>
+                    <property name="frameShape">
+                        <enum>NoFrame</enum>
+                    </property>
+                    <property name="frameShadow">
+                        <enum>Plain</enum>
+                    </property>
+                    <property name="text">
+                        <string>from:</string>
+                    </property>
+                </widget>
+            </grid>
+        </widget>
+        <spacer>
+            <property name="name">
+                <cstring>spacer2</cstring>
+            </property>
+            <property name="orientation">
+                <enum>Vertical</enum>
+            </property>
+            <property name="sizeType">
+                <enum>Expanding</enum>
+            </property>
+            <property name="sizeHint">
+                <size>
+                    <width>20</width>
+                    <height>40</height>
+                </size>
+            </property>
+        </spacer>
+    </vbox>
 </widget>
 <tabstops>
     <tabstop>fromURLLine</tabstop>
index bf0043c..0418b05 100644 (file)
 #include <kaction.h>
 #include <kstdaction.h>
 #include <kshortcut.h>
-#include <qlayout.h>
+#include <kaboutdata.h>
+#include <kparts/partmanager.h>
 
 KitaMainWindow::KitaMainWindow()
-        : KDockMainWindow( 0, "Kita" ),
+        : KParts::DockMainWindow( 0, "Kita" ),
         m_printer( 0 )
 {
     // accept dnd
@@ -103,10 +104,13 @@ KitaMainWindow::KitaMainWindow()
              SLOT( changeStatusbar( const QString& ) ) );
 
     connect( signalCollection, SIGNAL( openBoardRequested( const QString&, bool ) ),
-             m_subjectTab, SLOT( loadBoard( const QString&, bool ) ) );
+             SLOT( switchSubjectView( const QString&, bool ) ) );
 
     connect( signalCollection, SIGNAL( openBoardRequested( const QString&, bool ) ),
-             SLOT( openBoardRequested( const QString&, bool ) ) );
+             m_subjectTab, SLOT( loadBoard( const QString&, bool ) ) );
+
+    connect( m_subjectTab, SIGNAL( showThreadRequested( const QString&, bool ) ),
+             SLOT( switchThreadView( const QString&, bool ) ) );
 
     connect( m_subjectTab, SIGNAL( showThreadRequested( const QString&, bool ) ),
              m_threadTab, SLOT( showThread( const QString&, bool ) ) );
@@ -126,6 +130,9 @@ KitaMainWindow::KitaMainWindow()
     connect( m_threadTab, SIGNAL( sigHideSubject() ),
              SLOT( hideSubject() ) );
 
+    connect( m_threadTab->manager(), SIGNAL( activePartChanged( KParts::Part* ) ),
+             SLOT( createGUI( KParts::Part* ) ) );
+
     connect( m_boardView, SIGNAL( sigShowSubject() ),
              SLOT( showSubject() ) );
 
@@ -265,9 +272,23 @@ void KitaMainWindow::setupActions()
         actionCollection(),
         "window_toggle_view" );
 
+    // action for subjecttabwidget
+    new KAction( i18n( "Close Current Thread Tab" ),
+                 KStdAccel::close(),
+                 m_threadTab,
+                 SLOT( closeCurrentTab() ),
+                 actionCollection(),
+                 "threadtab_closetab" );
+    new KAction( i18n( "&Reload subject list"),
+                 KStdAccel::reload(),
+                 m_subjectTab,
+                 SLOT( reloadSubjectList() ),
+                 actionCollection(),
+                 "threadlist_reload" );
 
-    createGUI();
-    factory()->addClient(m_threadTab);
+    m_threadTab->manager()->addManagedTopLevelWidget( m_mainDock );
+    setXMLFile( "kitaui.rc" );
+    createGUI( m_threadTab->manager()->activePart() );
 }
 
 void KitaMainWindow::slotURLLine()
@@ -406,7 +427,14 @@ void KitaMainWindow::optionsShowStatusbar()
 
 void KitaMainWindow::optionsConfigureKeys()
 {
-    KKeyDialog::configureKeys( actionCollection(), "kitaui.rc" );
+    KKeyDialog dlg( TRUE, this);
+    QPtrList<KXMLGUIClient> actList = guiFactory()->clients();
+    for ( QPtrListIterator<KXMLGUIClient> act( actList ) ; act.current() ; ++act )
+    {
+        const KAboutData *dat = (*act)->instance()->aboutData();
+        dlg.insert( (*act)->actionCollection(),dat->programName() );
+    }
+    dlg.configure();
 }
 
 void KitaMainWindow::optionsConfigureToolbars()
@@ -544,9 +572,8 @@ void KitaMainWindow::setupView()
     connect( this, SIGNAL( kitaIsActive() ),
              Kita::SignalCollection::getInstance(), SIGNAL( kitaIsActive() ) );
     
-    QLayout *ql = static_cast<QWidget*>( m_mainDock ) ->layout();
-    ql->setResizeMode( QLayout::FreeResize );
-
+    setView( m_mainDock );
+    setMainDockWidget( m_mainDock );
 
     m_subjectDock = createDockWidget( "subject", 0L, 0L, i18n( "subject" ), i18n( "subject" ) );
     m_subjectTab = new KitaSubjectTabWidget( m_subjectDock );
@@ -562,9 +589,6 @@ void KitaMainWindow::setupView()
     connect( m_boardDock, SIGNAL( headerCloseButtonClicked() ), SLOT( closeBoardView() ) );
     connect( m_boardDock, SIGNAL( iMBeingClosed() ), SLOT( closeBoardView() ) );
 
-    setView( m_mainDock );
-    setMainDockWidget( m_mainDock );
-
     m_boardDock->manualDock( m_mainDock, KDockWidget::DockLeft, 20 );
     m_subjectDock->manualDock( m_mainDock, KDockWidget::DockTop, 30 );
 
@@ -860,16 +884,20 @@ void KitaMainWindow::saveAboneWordList()
     }    
 }
 
-void KitaMainWindow::openBoardRequested( const QString& datURL, bool newTab)
+void KitaMainWindow::switchSubjectView( const QString& datURL, bool newTab)
 {
     if ( m_subjectListAction->isChecked() )
         m_subjectDock->makeDockVisible();
 }
 
+void KitaMainWindow::switchThreadView( const QString& datURL, bool newtab )
+{
+    m_mainDock->makeDockVisible();
+}
+
 void KitaMainWindow::slotThread( const Kita::Thread* thread )
 {
     setCaption( thread->name() + QString( " (%1)" ).arg( thread->resNum() ) );
-    m_mainDock->makeDockVisible();
 }
 
 void KitaMainWindow::slotEditCopy()
index 0ae77fc..c892f3d 100644 (file)
@@ -16,7 +16,7 @@
 #endif
 
 #include <kapplication.h>
-#include <kdockwidget.h>
+#include <kparts/dockmainwindow.h>
 
 class KPrinter;
 class KToggleAction;
@@ -29,6 +29,7 @@ class KLineEdit;
 namespace KParts
 {
     class URLArgs;
+    class Part;
 }
 
 namespace Kita
@@ -45,7 +46,7 @@ namespace Kita
  * @version $APP_VERSION
  */
 
-class KitaMainWindow : public KDockMainWindow
+class KitaMainWindow : public KParts::DockMainWindow
 {
     Q_OBJECT
 public:
@@ -120,8 +121,9 @@ private slots:
     void setUrl( const KURL& url );
     void bookmark( const QString& datURL, bool on );
     void slotThread( const Kita::Thread* thread );
-    void openBoardRequested( const QString& datURL, bool newTab);
     void slotIsKitaActive();
+    void switchSubjectView( const QString& datURL, bool newTab);
+    void switchThreadView( const QString&, bool );
 
 private:
     KitaThreadTabWidget* m_threadTab;
index bbe8055..32c745b 100644 (file)
     <property name="caption">
         <string>Form1</string>
     </property>
-    <vbox>
+    <grid>
         <property name="name">
             <cstring>unnamed</cstring>
         </property>
-        <widget class="QLayoutWidget">
+        <widget class="QLayoutWidget" row="0" column="0">
             <property name="name">
-                <cstring>layout3</cstring>
+                <cstring>layout1</cstring>
             </property>
-            <hbox>
+            <grid>
                 <property name="name">
                     <cstring>unnamed</cstring>
                 </property>
-                <widget class="QLayoutWidget">
+                <widget class="KColorButton" row="0" column="1">
                     <property name="name">
-                        <cstring>layout1</cstring>
+                        <cstring>popupColorButton</cstring>
+                    </property>
+                    <property name="text">
+                        <string></string>
+                    </property>
+                </widget>
+                <widget class="QLabel" row="0" column="0">
+                    <property name="name">
+                        <cstring>popupLabel</cstring>
+                    </property>
+                    <property name="text">
+                        <string>popup text</string>
                     </property>
-                    <grid>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="KColorButton" row="0" column="1">
-                            <property name="name">
-                                <cstring>popupColorButton</cstring>
-                            </property>
-                            <property name="text">
-                                <string></string>
-                            </property>
-                        </widget>
-                        <widget class="QLabel" row="0" column="0">
-                            <property name="name">
-                                <cstring>popupLabel</cstring>
-                            </property>
-                            <property name="text">
-                                <string>popup text</string>
-                            </property>
-                        </widget>
-                        <widget class="QLabel" row="1" column="0">
-                            <property name="name">
-                                <cstring>popupBackgroundLabel</cstring>
-                            </property>
-                            <property name="text">
-                                <string>popup background</string>
-                            </property>
-                        </widget>
-                        <widget class="KColorButton" row="1" column="1">
-                            <property name="name">
-                                <cstring>popupBackgroundColorButton</cstring>
-                            </property>
-                            <property name="text">
-                                <string></string>
-                            </property>
-                        </widget>
-                    </grid>
                 </widget>
-                <spacer>
+                <widget class="QLabel" row="1" column="0">
                     <property name="name">
-                        <cstring>spacer1</cstring>
+                        <cstring>popupBackgroundLabel</cstring>
                     </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
+                    <property name="text">
+                        <string>popup background</string>
                     </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
+                </widget>
+                <widget class="KColorButton" row="1" column="1">
+                    <property name="name">
+                        <cstring>popupBackgroundColorButton</cstring>
                     </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>40</width>
-                            <height>20</height>
-                        </size>
+                    <property name="text">
+                        <string></string>
                     </property>
-                </spacer>
-            </hbox>
+                </widget>
+            </grid>
         </widget>
-        <spacer>
+        <spacer row="0" column="1">
+            <property name="name">
+                <cstring>spacer1</cstring>
+            </property>
+            <property name="orientation">
+                <enum>Horizontal</enum>
+            </property>
+            <property name="sizeType">
+                <enum>Expanding</enum>
+            </property>
+            <property name="sizeHint">
+                <size>
+                    <width>374</width>
+                    <height>20</height>
+                </size>
+            </property>
+        </spacer>
+        <spacer row="1" column="0">
             <property name="name">
                 <cstring>spacer2</cstring>
             </property>
                 </size>
             </property>
         </spacer>
-    </vbox>
+    </grid>
 </widget>
+<customwidgets>
+</customwidgets>
 <layoutdefaults spacing="6" margin="11"/>
+<includehints>
+    <includehint>kcolorbutton.h</includehint>
+    <includehint>kcolorbutton.h</includehint>
+</includehints>
 </UI>
index 62cae68..9ac2d7e 100644 (file)
     <property name="caption">
         <string>Form1</string>
     </property>
-    <vbox>
+    <grid>
         <property name="name">
             <cstring>unnamed</cstring>
         </property>
-        <widget class="QLayoutWidget">
+        <spacer row="0" column="1">
             <property name="name">
-                <cstring>layout9</cstring>
+                <cstring>spacer2</cstring>
             </property>
-            <hbox>
+            <property name="orientation">
+                <enum>Horizontal</enum>
+            </property>
+            <property name="sizeType">
+                <enum>Expanding</enum>
+            </property>
+            <property name="sizeHint">
+                <size>
+                    <width>365</width>
+                    <height>20</height>
+                </size>
+            </property>
+        </spacer>
+        <widget class="QLayoutWidget" row="0" column="0">
+            <property name="name">
+                <cstring>layout8</cstring>
+            </property>
+            <grid>
                 <property name="name">
                     <cstring>unnamed</cstring>
                 </property>
-                <widget class="QLayoutWidget">
+                <widget class="QPushButton" row="0" column="1">
                     <property name="name">
-                        <cstring>layout6</cstring>
+                        <cstring>fontButton</cstring>
+                    </property>
+                    <property name="text">
+                        <string>set font</string>
                     </property>
-                    <vbox>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="QLabel">
-                            <property name="name">
-                                <cstring>fontLabel</cstring>
-                            </property>
-                            <property name="text">
-                                <string>set list font</string>
-                            </property>
-                        </widget>
-                        <widget class="QLabel">
-                            <property name="name">
-                                <cstring>threadFontLabel</cstring>
-                            </property>
-                            <property name="text">
-                                <string>set thread font</string>
-                            </property>
-                        </widget>
-                    </vbox>
                 </widget>
-                <widget class="QLayoutWidget">
+                <widget class="QLabel" row="0" column="0">
                     <property name="name">
-                        <cstring>layout5</cstring>
+                        <cstring>fontLabel</cstring>
+                    </property>
+                    <property name="text">
+                        <string>set list font</string>
                     </property>
-                    <vbox>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="QPushButton">
-                            <property name="name">
-                                <cstring>fontButton</cstring>
-                            </property>
-                            <property name="text">
-                                <string>set font</string>
-                            </property>
-                        </widget>
-                        <widget class="QPushButton">
-                            <property name="name">
-                                <cstring>threadFontButton</cstring>
-                            </property>
-                            <property name="text">
-                                <string>set font</string>
-                            </property>
-                        </widget>
-                    </vbox>
                 </widget>
-                <spacer>
+                <widget class="QPushButton" row="1" column="1">
                     <property name="name">
-                        <cstring>spacer2</cstring>
+                        <cstring>threadFontButton</cstring>
                     </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
+                    <property name="text">
+                        <string>set font</string>
                     </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
+                </widget>
+                <widget class="QLabel" row="1" column="0">
+                    <property name="name">
+                        <cstring>threadFontLabel</cstring>
                     </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>424</width>
-                            <height>20</height>
-                        </size>
+                    <property name="text">
+                        <string>set thread font</string>
                     </property>
-                </spacer>
-            </hbox>
+                </widget>
+            </grid>
         </widget>
-        <spacer>
+        <spacer row="1" column="0">
             <property name="name">
                 <cstring>spacer3</cstring>
             </property>
                 </size>
             </property>
         </spacer>
-    </vbox>
+    </grid>
 </widget>
 <layoutdefaults spacing="6" margin="11"/>
 </UI>
index 302a5d4..6694b37 100644 (file)
@@ -125,6 +125,12 @@ void KitaSubjectTabWidget::deleteView( KitaSubjectView* view )
     m_latestView = static_cast<KitaSubjectView *>( currentPage() );
 }
 
+void KitaSubjectTabWidget::reloadSubjectList()
+{
+    if ( !m_latestView )
+        m_latestView->reloadSubject();
+}
+
 Kita::SubjectTabBar::SubjectTabBar( QWidget* parent, const char* name )
         : QTabBar( parent, name )
 {}
index a52ba74..acdcbe3 100644 (file)
@@ -31,6 +31,7 @@ public:
 public slots:
     void loadBoard( const QString&, bool withNewTab = false );
     void updateThread( const Kita::Thread* );
+    void reloadSubjectList();
 
 private:
     FavoriteListView* m_favoriteList;
index 90eda76..684c5bf 100644 (file)
@@ -51,14 +51,18 @@ KitaSubjectView::KitaSubjectView( QWidget* parent, const char* name )
     connect( subjectList, SIGNAL( returnPressed( QListViewItem* ) ),
              SLOT( loadThread( QListViewItem* ) ) );
     connect( ReloadButton, SIGNAL( clicked() ),
-             SLOT( slotReloadButton() ) );
+             SLOT( reloadSubject() ) );
 }
 
 KitaSubjectView::~KitaSubjectView()
 {}
 
 void KitaSubjectView::reloadSubject()
-{}
+{
+    if ( ! m_boardURL.isEmpty() ) {
+        loadBoard( m_boardURL );
+    }
+}
 
 const QString KitaSubjectView::boardURL()
 {
@@ -279,10 +283,3 @@ void KitaSubjectView::slotContextMenuRequested( QListViewItem* item, const QPoin
         break;
     }
 }
-
-void KitaSubjectView::slotReloadButton()
-{
-    if ( ! m_boardURL.isEmpty() ) {
-        loadBoard( m_boardURL );
-    }
-}
index e42d57d..3189cf5 100644 (file)
@@ -47,7 +47,6 @@ private:
 private slots:
     void loadThread( QListViewItem* item );
     void slotContextMenuRequested( QListViewItem*, const QPoint&, int );
-    void slotReloadButton();
 
 signals:
     void loadBoardCompleted( const KURL& );
index 2144ad4..bb87d4a 100644 (file)
 #include <qapplication.h>
 #include <qmessagebox.h>
 #include <qregexp.h>
-
-#include <kxmlguifactory.h>
-#include <kxmlguiclient.h>
-#include <kaction.h>
-#include <kstdaccel.h>
-#include <kstdaction.h>
+#include <qptrlist.h>
 
 #include "libkita/kita_misc.h"
 #include "libkita/parsemisc.h"
@@ -48,7 +43,8 @@ KitaThreadTabWidget::KitaThreadTabWidget( QWidget* parent, const char* name, WFl
     connect( tabBar(), SIGNAL( deleteMenuSelected( KitaThreadView* ) ),
              SLOT( deleteView( KitaThreadView* ) ) );
 
-    KGlobal::locale() ->insertCatalogue( "kitapart" );
+    m_manager = new KParts::PartManager( topLevelWidget(), this, "KitaPartManager" );
+
     KitaThreadView* view = createView();
 
     if ( view ) {
@@ -59,33 +55,11 @@ KitaThreadTabWidget::KitaThreadTabWidget( QWidget* parent, const char* name, WFl
     connect( this, SIGNAL( currentChanged ( QWidget * ) ),
              SLOT( slotCurrentChanged ( QWidget * ) ) );
 
-    setupActions();
 }
 
 KitaThreadTabWidget::~KitaThreadTabWidget()
 {}
 
-
-/*-------------------------------*/
-/* setup actions                 */  
-/*
-   Child's actions are added in
-   slotCurrentChanged later.     */  /* private */
-void KitaThreadTabWidget::setupActions(){
-
-    setXMLFile("kitathreadtabwidgetui.rc");
-    
-    new KAction( i18n( "Close Current Thread Tab" ),
-                 KStdAccel::close(),
-                 this,
-                 SLOT( closeCurrentTab() ),
-                 actionCollection(),
-                 "threadtab_closetab" );
-    
-    m_oldXmlClient = NULL;
-}
-
-
 void KitaThreadTabWidget::showThread( const QString& datURL, bool withNewTab )
 {
     QString refstr;
@@ -106,7 +80,7 @@ void KitaThreadTabWidget::showThread( const QString& datURL, bool withNewTab )
         KitaThreadView * newView = createView();
 
         if ( newView ) {
-            addTab( newView, Kita::unescape( thread->name().left( MAX_TABLABEL_LEN ) ) );
+            addTab( newView, getTabLabel( thread->name() ) );
             connectSignals( newView );
             newView->showThread( thread );
             showPage( newView );
@@ -116,8 +90,7 @@ void KitaThreadTabWidget::showThread( const QString& datURL, bool withNewTab )
         static_cast<KitaThreadView *>( currentPage() ) ->showThread( thread );
     }
 
-    setTabLabel( currentPage(), Kita::unescape( thread->name().left( MAX_TABLABEL_LEN ) )
-                 + QString( " (%1)" ).arg( thread->resNum() ) );
+    setTabLabel( currentPage(), QString( "%1 (%2)" ).arg( getTabLabel( thread->name() ) ).arg( thread->resNum() ) );
     setTabToolTip( currentPage(), thread->name() );
 }
 
@@ -133,6 +106,8 @@ KitaThreadView* KitaThreadTabWidget::createView()
     KitaThreadPart* part = static_cast<KitaThreadPart *>( factory->create( this, "thread", "KitaThreadPart" ) );
     KitaThreadView* view = static_cast<KitaThreadView *>( part->widget() );
 
+    m_manager->addPart( part );
+
     return view;
 }
 
@@ -159,15 +134,26 @@ KitaThreadView* KitaThreadTabWidget::findView( const QString& threadURL )
     return 0;
 }
 
+KParts::Part* KitaThreadTabWidget::findPartFromView( QWidget* view )
+{
+    KParts::Part *p;
+    QPtrListIterator<KParts::Part> it( *( m_manager->parts() ) );
+    while ( ( p = (*it) ) != NULL )
+    {
+        if ( p->widget() == view ) return p;
+        ++it;
+    }
+    return NULL;
+}
+
 void KitaThreadTabWidget::deleteView( KitaThreadView* view )
 {
     kdDebug() << "deleteView(" << static_cast<void*>( view ) << ")" << endl;
 
-    factory()->removeClient( view );
-    m_oldXmlClient = NULL;
-
     removePage( view );
     m_viewList.remove( view );
+
+    m_manager->removePart( findPartFromView( view ) );
     delete view;
 
     if ( count() == 0 ) {
@@ -238,16 +224,20 @@ void KitaThreadTabBar::contextMenuEvent( QContextMenuEvent* e )
 void KitaThreadTabWidget::slotCurrentChanged( QWidget * w )
 {
     KitaThreadView* view = static_cast<KitaThreadView *>( w );
-    if(m_oldXmlClient) factory()->removeClient(m_oldXmlClient);
-    factory()->addClient(view);
     view->showStatusBar( "" );
-    m_oldXmlClient = view;
+    m_manager->setActivePart( findPartFromView( view ) );
+}
+
+const QString KitaThreadTabWidget::getTabLabel( const QString &name )
+{
+        QString threadTitle = Kita::unescape( name );
+        QString title = ( threadTitle.length() > MAX_TABLABEL_LEN ) ? threadTitle.left( MAX_TABLABEL_LEN ) + "..." : threadTitle;
+        return title;
 }
 
 void KitaThreadTabWidget::slotThread( const Kita::Thread* thread )
 {
     KitaThreadView * view = findView( thread->url() );
-    if ( view ) {
-        setTabLabel( currentPage(), Kita::unescape( thread->name().left( MAX_TABLABEL_LEN ) ) + QString( " (%1)" ).arg( thread->resNum() ) );
-    }
+    if ( view )
+        setTabLabel( currentPage(), QString( "%1 (%2)" ).arg( getTabLabel( thread->name() ) ).arg( thread->resNum() ) );
 }
index 588d72d..ffecbd3 100644 (file)
@@ -14,7 +14,7 @@
 #include <qtabwidget.h>
 #include <qtabbar.h>
 #include <kparts/browserextension.h>
-#include <kxmlguiclient.h>
+#include <kparts/partmanager.h>
 
 class KitaThreadPart;
 class KitaThreadView;
@@ -28,15 +28,17 @@ namespace Kita
 /**
 @author Hideki Ikemoto
 */
-class KitaThreadTabWidget : public QTabWidget , public KXMLGUIClient
+class KitaThreadTabWidget : public QTabWidget
 {
     Q_OBJECT
 
-       KXMLGUIClient * m_oldXmlClient;
+    KParts::PartManager *m_manager;
 
 public:
     KitaThreadTabWidget( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
     ~KitaThreadTabWidget();
+    KParts::Part* findPartFromView( QWidget* );
+    KParts::PartManager* manager() { return m_manager; }
 
 public slots:
     void showThread( const QString& datURL, bool withNewTab );
@@ -47,11 +49,11 @@ public slots:
     void closeCurrentTab();
     
 private:
-    void setupActions();
     void connectSignals( KitaThreadView* );
     KitaThreadView* createView();
     QPtrList<KitaThreadView> m_viewList;
     KitaThreadView* findView( const QString& threadURL );
+    const QString getTabLabel( const QString &name );
 
 private slots:
     void slotThread( const Kita::Thread* );
index 8611d8d..e0b92bc 100644 (file)
@@ -1,21 +1,20 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="kita" version="2">
+<kpartgui name="kita" version="3">
 <MenuBar>
-  <!--<Menu name="custom"><text>C&amp;ustom</text>
-    <Action name="custom_action" />
-  </Menu>-->
   <Menu name="file"><text>&amp;File</text>
     <Action name="load_board_list" />
   </Menu>
   <Menu name="view"><text>&amp;View</text>
-    <Action name="reload" />
+    <Action name="threadlist_reload" />
+  </Menu>
+  <Menu name="thread"><text>&amp;Thread</text>
+    <Action name="threadtab_closetab" />
   </Menu>
   <Menu name="window"><text>&amp;Window</text>
     <Action name="window_show_board_list" />
     <Action name="window_show_subject_list" />
     <Action name="window_toggle_view" />
     <Action name="reset_win" />
-    <Action name="close_tab" />
   </Menu>
 </MenuBar>
 <ToolBar name="mainToolBar">
index 7c7e366..a8d91bf 100644 (file)
@@ -22,6 +22,6 @@ rc.cpp:
        touch rc.cpp
 
 # this is where the XML-GUI resource file goes
-rcdir = $(kde_datadir)/kita
+rcdir = $(kde_datadir)/kitapart
 rc_DATA = kitathreadviewui.rc
 
index 2cf8001..ce3b2b6 100644 (file)
@@ -3,6 +3,10 @@
 
 #include <kio/job.h>
 #include <khtml_part.h>
+#include <kglobal.h>
+#include <kaction.h>
+#include <kstdaccel.h>
+#include <kstdaction.h>
 
 #include "kitahtmlpart.h"
 #include "libkita/board.h"
@@ -36,10 +40,14 @@ KitaThreadPart::KitaThreadPart( QWidget* parentWidget, const char*, QObject* par
         , m_threadview( 0 )
         , m_extension( 0 )
 {
+    KGlobal::locale() ->insertCatalogue( "kitapart" );
+
     m_threadview = new KitaThreadView( parentWidget ); // auto delete
     setInstance( KitaThreadFactory::instance() );
     setWidget( m_threadview );
 
+    setupActions();
+
     m_threadview->show();
 }
 
@@ -52,6 +60,36 @@ KitaThreadPart::~KitaThreadPart()
     }
 }
 
+void KitaThreadPart::setupActions()
+{
+    if ( !m_threadview ) return;
+    setXMLFile("kitathreadviewui.rc");
+
+    new KAction( i18n( "Find" ),
+                 "find",
+                 KStdAccel::find(),
+                 m_threadview,
+                 SLOT( focusSearchCombo() ),
+                 actionCollection(),
+                 "threadview_find" );
+
+    new KAction( i18n( "Reload" ),
+                 "reload",
+                 KStdAccel::reload(),
+                 m_threadview,
+                 SLOT( slotReloadButton() ),
+                 actionCollection(),
+                 "threadview_reload" );
+
+    new KAction(i18n("Stop"),
+                "stop",
+                Key_Escape,
+                m_threadview,
+                SLOT(slotStopLoading()),
+               actionCollection(),
+                "threadview_stop");
+}
+
 KParts::BrowserExtension* KitaThreadPart::browserExtension() const
 {
     return m_extension;
index dd89c6c..4b421f1 100644 (file)
@@ -20,6 +20,7 @@ public:
     virtual ~KitaThreadPart();
 
     static KAboutData * createAboutData(); //needed by GenericFactory
+    void setupActions();
 
     KParts::BrowserExtension *browserExtension() const;
 
index d270c9e..13ec57e 100644 (file)
 #include <qsimplerichtext.h>
 #include <qpopupmenu.h>
 
-#include <kxmlguifactory.h>
-#include <kaction.h>
-#include <kstdaccel.h>
-#include <kstdaction.h>
-
 #include "kitahtmlpart.h"
 #include "kitawritedialog.h"
 #include "kita2ch.h"
@@ -75,9 +70,7 @@ static const char* cookie_message =
     "Á´ÀÕǤ¤òÉ餦¤³¤È¤ò¾µÂú¤·¤Æ½ñ¤­¹þ¤ß¤Þ¤¹¤«\n";
 
 KitaThreadView::KitaThreadView( QWidget* parent, const char* name )
-        : KitaThreadViewBase( parent, name )
-         , KXMLGUIClient()
-        , m_popup( 0 )
+        : KitaThreadViewBase( parent, name ), m_popup( 0 )
 {
     m_thread = new Kita::NullThread();
     m_threadPart = new KitaHTMLPart( threadFrame );
@@ -159,8 +152,6 @@ KitaThreadView::KitaThreadView( QWidget* parent, const char* name )
     connect( this, SIGNAL( openBoardRequested( const QString&, bool ) ),
              signalCollection, SIGNAL( openBoardRequested( const QString&, bool ) ) );
     
-    setupActions();
-
     m_viewmode = VIEWMODE_PARENT;
     m_rescode = 200;
     m_serverTime = 0;
@@ -192,39 +183,6 @@ KitaThreadView::~KitaThreadView()
     }
 }
 
-
-/*---------------*/
-/* setup actions */  /* private */
-void KitaThreadView::setupActions(){
-    
-    setXMLFile("kitathreadviewui.rc");
-
-    new KAction( i18n( "Find" ),
-                "find",
-                 KStdAccel::find(),
-                 this,
-                 SLOT( focusSearchCombo() ),
-                 actionCollection(),
-                 "threadview_find" );
-    
-    new KAction( i18n( "Reload" ),
-                "reload",
-                 KStdAccel::reload(),
-                 this,
-                 SLOT( slotReloadButton() ),
-                 actionCollection(),
-                 "threadview_reload" );
-    
-    new KAction(i18n("Stop"),
-               "stop",
-               Key_Escape,
-               this,
-               SLOT(slotStopLoading()),
-              actionCollection(),
-               "threadview_stop");
-}
-
-
 const QString KitaThreadView::threadName() const
 {
     return m_thread->name();
index 35b9bf5..d87e963 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <kparts/browserextension.h>
 #include <dom/html_base.h>
-#include <kxmlguiclient.h>
 
 #include <qtextbrowser.h>
 #include <ktextbrowser.h>
@@ -56,7 +55,7 @@ namespace KIO
  * @author Hideki Ikemoto <ikemo@users.sourceforge.jp>
  **/
 
-class KitaThreadView : public KitaThreadViewBase, public KXMLGUIClient
+class KitaThreadView : public KitaThreadViewBase
 {
     Q_OBJECT
 
@@ -121,8 +120,6 @@ private:        // Private attributes
     bool m_online;
     bool m_firstReceive;
 
-    void setupActions();
-       
     void updateScreen();
     void updateInfo();
 
index a7222cb..f0ee97d 100644 (file)
@@ -15,6 +15,9 @@
     <property name="caption">
         <string>Form1</string>
     </property>
+    <property name="focusPolicy">
+        <enum>ClickFocus</enum>
+    </property>
     <vbox>
         <property name="name">
             <cstring>unnamed</cstring>
index ebbaf3e..33c2c63 100644 (file)
@@ -79,7 +79,7 @@ KitaWriteDialog::KitaWriteDialog( const Kita::Thread* thread, QWidget* parent, c
              this, SLOT( slotCurrentChanged ( QWidget * ) ) );
 
     m_preview = new KitaThreadView( qtw );
-    qtw->addTab( m_preview, "preview" );
+    qtw->addTab( m_preview, i18n( "preview" ) );
 
     m_preview->setupEx( m_thread , 0, VIEWMODE_PREVIEW );
 }
index 6bab302..a6bd742 100644 (file)
         </property>
         <widget class="QLayoutWidget">
             <property name="name">
-                <cstring>layout8</cstring>
+                <cstring>layout20</cstring>
             </property>
-            <hbox>
+            <grid>
                 <property name="name">
                     <cstring>unnamed</cstring>
                 </property>
-                <widget class="QLayoutWidget">
+                <widget class="KSqueezedTextLabel" row="1" column="1">
                     <property name="name">
-                        <cstring>layout6</cstring>
-                    </property>
-                    <vbox>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="QLabel">
-                            <property name="name">
-                                <cstring>textLabel1</cstring>
-                            </property>
-                            <property name="sizePolicy">
-                                <sizepolicy>
-                                    <hsizetype>5</hsizetype>
-                                    <vsizetype>5</vsizetype>
-                                    <horstretch>0</horstretch>
-                                    <verstretch>0</verstretch>
-                                </sizepolicy>
-                            </property>
-                            <property name="text">
-                                <string>Board Name:</string>
-                            </property>
-                        </widget>
-                        <widget class="QLabel">
-                            <property name="name">
-                                <cstring>textLabel1_2</cstring>
-                            </property>
-                            <property name="text">
-                                <string>Thread Name:</string>
-                            </property>
-                        </widget>
-                        <widget class="QLabel">
-                            <property name="name">
-                                <cstring>textLabel1_2_2</cstring>
-                            </property>
-                            <property name="text">
-                                <string>Thread URL:</string>
-                            </property>
-                        </widget>
-                    </vbox>
+                        <cstring>threadNameLabel</cstring>
+                    </property>
+                    <property name="text">
+                        <string>thread name</string>
+                    </property>
                 </widget>
-                <widget class="QLayoutWidget">
+                <widget class="KSqueezedTextLabel" row="0" column="1">
                     <property name="name">
-                        <cstring>layout7</cstring>
-                    </property>
-                    <vbox>
-                        <property name="name">
-                            <cstring>unnamed</cstring>
-                        </property>
-                        <widget class="KSqueezedTextLabel">
-                            <property name="name">
-                                <cstring>boardNameLabel</cstring>
-                            </property>
-                            <property name="text">
-                                <string>board name</string>
-                            </property>
-                        </widget>
-                        <widget class="KSqueezedTextLabel">
-                            <property name="name">
-                                <cstring>threadNameLabel</cstring>
-                            </property>
-                            <property name="text">
-                                <string>thread name</string>
-                            </property>
-                        </widget>
-                        <widget class="KSqueezedTextLabel">
-                            <property name="name">
-                                <cstring>threadURLLabel</cstring>
-                            </property>
-                            <property name="text">
-                                <string>thread url</string>
-                            </property>
-                        </widget>
-                    </vbox>
+                        <cstring>boardNameLabel</cstring>
+                    </property>
+                    <property name="text">
+                        <string>board name</string>
+                    </property>
                 </widget>
-            </hbox>
+                <widget class="KSqueezedTextLabel" row="2" column="1">
+                    <property name="name">
+                        <cstring>threadURLLabel</cstring>
+                    </property>
+                    <property name="text">
+                        <string>thread url</string>
+                    </property>
+                </widget>
+                <widget class="QLabel" row="2" column="0">
+                    <property name="name">
+                        <cstring>textLabel1_2_2</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Thread URL:</string>
+                    </property>
+                </widget>
+                <widget class="QLabel" row="0" column="0">
+                    <property name="name">
+                        <cstring>textLabel1</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>5</hsizetype>
+                            <vsizetype>5</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="text">
+                        <string>Board Name:</string>
+                    </property>
+                </widget>
+                <widget class="QLabel" row="1" column="0">
+                    <property name="name">
+                        <cstring>textLabel1_2</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Thread Name:</string>
+                    </property>
+                </widget>
+            </grid>
         </widget>
         <widget class="QLayoutWidget">
             <property name="name">
                 </widget>
             </hbox>
         </widget>
-       <widget class="QTabWidget">
+        <widget class="QTabWidget">
             <property name="name">
                 <cstring>qtw</cstring>
             </property>
-        <widget class="QTextEdit">
-            <property name="name">
-                <cstring>bodyText</cstring>
-            </property>
-         <attribute name="title">
-                <string>body</string>
-            </attribute>
-        </widget>
+            <widget class="QTextEdit">
+                <property name="name">
+                    <cstring>bodyText</cstring>
+                </property>
+                <attribute name="title">
+                    <string>body</string>
+                </attribute>
+            </widget>
         </widget>
         <widget class="QLayoutWidget">
             <property name="name">
         </widget>
     </vbox>
 </widget>
+<customwidgets>
+</customwidgets>
 <connections>
     <connection>
         <sender>buttonOk</sender>
         <receiver>KitaWriteDialogBase</receiver>
         <slot>sageBoxToggled(bool)</slot>
     </connection>
-    <connection>
-        <sender>faceCombo</sender>
-        <signal>activated(const QString&amp;)</signal>
-        <receiver>bodyText</receiver>
-        <slot>insert(const QString&amp;)</slot>
-    </connection>
 </connections>
 <includes>
     <include location="local" impldecl="in implementation">kitawritedialogbase.ui.h</include>
index 8470f57..5e71420 100644 (file)
         </property>
         <widget class="QLayoutWidget">
             <property name="name">
-                <cstring>layout4</cstring>
+                <cstring>layout3</cstring>
             </property>
-            <hbox>
+            <vbox>
                 <property name="name">
                     <cstring>unnamed</cstring>
                 </property>
+                <widget class="QCheckBox">
+                    <property name="name">
+                        <cstring>useTabCheckBox</cstring>
+                    </property>
+                    <property name="text">
+                        <string>Use new tab when opening the thread(board).</string>
+                    </property>
+                </widget>
                 <widget class="QLayoutWidget">
                     <property name="name">
-                        <cstring>layout3</cstring>
+                        <cstring>layout2</cstring>
+                    </property>
+                    <hbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QLabel">
+                            <property name="name">
+                                <cstring>MarkLabel</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Mark new thread to made:</string>
+                            </property>
+                        </widget>
+                        <spacer>
+                            <property name="name">
+                                <cstring>spacer6</cstring>
+                            </property>
+                            <property name="orientation">
+                                <enum>Horizontal</enum>
+                            </property>
+                            <property name="sizeType">
+                                <enum>Expanding</enum>
+                            </property>
+                            <property name="sizeHint">
+                                <size>
+                                    <width>20</width>
+                                    <height>20</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <widget class="QSpinBox">
+                            <property name="name">
+                                <cstring>MarkTimespinBox</cstring>
+                            </property>
+                            <property name="prefix">
+                                <string>within </string>
+                            </property>
+                            <property name="suffix">
+                                <string> hour</string>
+                            </property>
+                            <property name="specialValueText">
+                                <string>after last access</string>
+                            </property>
+                            <property name="maxValue">
+                                <number>24</number>
+                            </property>
+                            <property name="minValue">
+                                <number>0</number>
+                            </property>
+                            <property name="value">
+                                <number>24</number>
+                            </property>
+                            <property name="toolTip" stdset="0">
+                                <string></string>
+                            </property>
+                        </widget>
+                    </hbox>
+                </widget>
+                <widget class="QButtonGroup">
+                    <property name="name">
+                        <cstring>buttonGroup3</cstring>
+                    </property>
+                    <property name="title">
+                        <string>Thread</string>
                     </property>
                     <vbox>
                         <property name="name">
                             <cstring>unnamed</cstring>
                         </property>
+                        <widget class="QLabel">
+                            <property name="name">
+                                <cstring>textLabel1</cstring>
+                            </property>
+                            <property name="text">
+                                <string>this option affects from the next thread.</string>
+                            </property>
+                        </widget>
                         <widget class="QCheckBox">
                             <property name="name">
-                                <cstring>useTabCheckBox</cstring>
+                                <cstring>showMailCheckBox</cstring>
                             </property>
                             <property name="text">
-                                <string>Use new tab when opening the thread(board).</string>
+                                <string>Show mail address in the thread.</string>
                             </property>
                         </widget>
                         <widget class="QLayoutWidget">
                             <property name="name">
-                                <cstring>layout2</cstring>
+                                <cstring>layout13</cstring>
                             </property>
                             <hbox>
                                 <property name="name">
                                     <cstring>unnamed</cstring>
                                 </property>
+                                <widget class="QSpinBox">
+                                    <property name="name">
+                                        <cstring>afterShowNumSpin</cstring>
+                                    </property>
+                                    <property name="prefix">
+                                        <string>Display </string>
+                                    </property>
+                                    <property name="suffix">
+                                        <string> res</string>
+                                    </property>
+                                    <property name="specialValueText">
+                                        <string>Display all res</string>
+                                    </property>
+                                    <property name="maxValue">
+                                        <number>1000</number>
+                                    </property>
+                                    <property name="lineStep">
+                                        <number>50</number>
+                                    </property>
+                                    <property name="value">
+                                        <number>100</number>
+                                    </property>
+                                </widget>
                                 <widget class="QLabel">
                                     <property name="name">
-                                        <cstring>MarkLabel</cstring>
+                                        <cstring>textLabel3</cstring>
                                     </property>
                                     <property name="text">
-                                        <string>Mark new thread to made:</string>
+                                        <string>from the last read response.</string>
                                     </property>
                                 </widget>
                                 <spacer>
                                     <property name="name">
-                                        <cstring>spacer6</cstring>
+                                        <cstring>spacer11_2</cstring>
                                     </property>
                                     <property name="orientation">
                                         <enum>Horizontal</enum>
                                     </property>
                                     <property name="sizeHint">
                                         <size>
-                                            <width>20</width>
+                                            <width>40</width>
                                             <height>20</height>
                                         </size>
                                     </property>
                                 </spacer>
-                                <widget class="QSpinBox">
-                                    <property name="name">
-                                        <cstring>MarkTimespinBox</cstring>
-                                    </property>
-                                    <property name="prefix">
-                                        <string>within </string>
-                                    </property>
-                                    <property name="suffix">
-                                        <string> hour</string>
-                                    </property>
-                                    <property name="specialValueText">
-                                        <string>after last access</string>
-                                    </property>
-                                    <property name="maxValue">
-                                        <number>24</number>
-                                    </property>
-                                    <property name="minValue">
-                                        <number>0</number>
-                                    </property>
-                                    <property name="value">
-                                        <number>24</number>
-                                    </property>
-                                    <property name="toolTip" stdset="0">
-                                        <string></string>
-                                    </property>
-                                </widget>
                             </hbox>
                         </widget>
-                        <widget class="QButtonGroup">
+                    </vbox>
+                </widget>
+                <widget class="QButtonGroup">
+                    <property name="name">
+                        <cstring>viewGroup</cstring>
+                    </property>
+                    <property name="title">
+                        <string>Views</string>
+                    </property>
+                    <vbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QRadioButton">
                             <property name="name">
-                                <cstring>buttonGroup3</cstring>
+                                <cstring>twoPaneRadio</cstring>
                             </property>
-                            <property name="title">
-                                <string>Thread</string>
+                            <property name="text">
+                                <string>(pseudo) Two pane</string>
                             </property>
-                            <widget class="QCheckBox">
-                                <property name="name">
-                                    <cstring>showMailCheckBox</cstring>
-                                </property>
-                                <property name="geometry">
-                                    <rect>
-                                        <x>30</x>
-                                        <y>40</y>
-                                        <width>193</width>
-                                        <height>19</height>
-                                    </rect>
-                                </property>
-                                <property name="text">
-                                    <string>Show mail address in the thread.</string>
-                                </property>
-                            </widget>
-                            <widget class="QLabel">
-                                <property name="name">
-                                    <cstring>textLabel1</cstring>
-                                </property>
-                                <property name="geometry">
-                                    <rect>
-                                        <x>10</x>
-                                        <y>20</y>
-                                        <width>270</width>
-                                        <height>16</height>
-                                    </rect>
-                                </property>
-                                <property name="text">
-                                    <string>this option affects from the next thread.</string>
-                                </property>
-                            </widget>
-                            <widget class="QSpinBox">
-                                <property name="name">
-                                    <cstring>afterShowNumSpin</cstring>
-                                </property>
-                                <property name="geometry">
-                                    <rect>
-                                        <x>11</x>
-                                        <y>71</y>
-                                        <width>105</width>
-                                        <height>19</height>
-                                    </rect>
-                                </property>
-                                <property name="prefix">
-                                    <string>Display </string>
-                                </property>
-                                <property name="suffix">
-                                    <string> res</string>
-                                </property>
-                                <property name="specialValueText">
-                                    <string>Display all res</string>
-                                </property>
-                                <property name="maxValue">
-                                    <number>1000</number>
-                                </property>
-                                <property name="lineStep">
-                                    <number>50</number>
-                                </property>
-                                <property name="value">
-                                    <number>100</number>
-                                </property>
-                            </widget>
-                            <widget class="QLabel">
-                                <property name="name">
-                                    <cstring>textLabel3</cstring>
-                                </property>
-                                <property name="geometry">
-                                    <rect>
-                                        <x>122</x>
-                                        <y>71</y>
-                                        <width>160</width>
-                                        <height>19</height>
-                                    </rect>
-                                </property>
-                                <property name="text">
-                                    <string>from the last read response.</string>
-                                </property>
-                            </widget>
-                        </widget>
-                        <widget class="QButtonGroup">
-                            <property name="name">
-                                <cstring>viewGroup</cstring>
+                            <property name="checked">
+                                <bool>true</bool>
                             </property>
-                            <property name="title">
-                                <string>Views</string>
+                            <property name="buttonGroupId">
+                                <number>0</number>
                             </property>
-                            <widget class="QRadioButton">
-                                <property name="name">
-                                    <cstring>threePaneRadio</cstring>
-                                </property>
-                                <property name="geometry">
-                                    <rect>
-                                        <x>20</x>
-                                        <y>50</y>
-                                        <width>80</width>
-                                        <height>19</height>
-                                    </rect>
-                                </property>
-                                <property name="text">
-                                    <string>Three pane</string>
-                                </property>
-                                <property name="buttonGroupId">
-                                    <number>1</number>
-                                </property>
-                            </widget>
-                            <widget class="QRadioButton">
-                                <property name="name">
-                                    <cstring>twoPaneRadio</cstring>
-                                </property>
-                                <property name="geometry">
-                                    <rect>
-                                        <x>20</x>
-                                        <y>20</y>
-                                        <width>120</width>
-                                        <height>19</height>
-                                    </rect>
-                                </property>
-                                <property name="text">
-                                    <string>(pseudo) Two pane</string>
-                                </property>
-                                <property name="checked">
-                                    <bool>true</bool>
-                                </property>
-                                <property name="buttonGroupId">
-                                    <number>0</number>
-                                </property>
-                            </widget>
                         </widget>
-                        <widget class="QButtonGroup">
+                        <widget class="QRadioButton">
                             <property name="name">
-                                <cstring>orderGroup</cstring>
+                                <cstring>threePaneRadio</cstring>
                             </property>
-                            <property name="title">
-                                <string>When open the board</string>
+                            <property name="text">
+                                <string>Three pane</string>
+                            </property>
+                            <property name="buttonGroupId">
+                                <number>1</number>
                             </property>
-                            <widget class="QRadioButton">
-                                <property name="name">
-                                    <cstring>numOrderRadio</cstring>
-                                </property>
-                                <property name="geometry">
-                                    <rect>
-                                        <x>20</x>
-                                        <y>50</y>
-                                        <width>185</width>
-                                        <height>19</height>
-                                    </rect>
-                                </property>
-                                <property name="text">
-                                    <string>Show thread in numerical order</string>
-                                </property>
-                                <property name="buttonGroupId">
-                                    <number>1</number>
-                                </property>
-                            </widget>
-                            <widget class="QRadioButton">
-                                <property name="name">
-                                    <cstring>unreadFirstRadio</cstring>
-                                </property>
-                                <property name="geometry">
-                                    <rect>
-                                        <x>20</x>
-                                        <y>20</y>
-                                        <width>250</width>
-                                        <height>19</height>
-                                    </rect>
-                                </property>
-                                <property name="text">
-                                    <string>Show unread thread first</string>
-                                </property>
-                                <property name="checked">
-                                    <bool>true</bool>
-                                </property>
-                                <property name="buttonGroupId">
-                                    <number>0</number>
-                                </property>
-                            </widget>
                         </widget>
                     </vbox>
                 </widget>
-                <spacer>
+                <widget class="QButtonGroup">
                     <property name="name">
-                        <cstring>spacer11</cstring>
-                    </property>
-                    <property name="orientation">
-                        <enum>Horizontal</enum>
+                        <cstring>orderGroup</cstring>
                     </property>
-                    <property name="sizeType">
-                        <enum>Expanding</enum>
+                    <property name="title">
+                        <string>When open the board</string>
                     </property>
-                    <property name="sizeHint">
-                        <size>
-                            <width>279</width>
-                            <height>31</height>
-                        </size>
-                    </property>
-                </spacer>
-            </hbox>
+                    <vbox>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <widget class="QRadioButton">
+                            <property name="name">
+                                <cstring>unreadFirstRadio</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Show unread thread first</string>
+                            </property>
+                            <property name="checked">
+                                <bool>true</bool>
+                            </property>
+                            <property name="buttonGroupId">
+                                <number>0</number>
+                            </property>
+                        </widget>
+                        <widget class="QRadioButton">
+                            <property name="name">
+                                <cstring>numOrderRadio</cstring>
+                            </property>
+                            <property name="text">
+                                <string>Show thread in numerical order</string>
+                            </property>
+                            <property name="buttonGroupId">
+                                <number>1</number>
+                            </property>
+                        </widget>
+                    </vbox>
+                </widget>
+            </vbox>
         </widget>
         <spacer>
             <property name="name">