OSDN Git Service

change ui
authorikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 22 Mar 2004 15:47:47 +0000 (15:47 +0000)
committerikemo <ikemo@56b19765-1e22-0410-a548-a0f45d66c51a>
Mon, 22 Mar 2004 15:47:47 +0000 (15:47 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@934 56b19765-1e22-0410-a548-a0f45d66c51a

kita/src/debugprefbase.ui
kita/src/pref.cpp

index aebf61c..e927580 100644 (file)
     </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>
-    </widget>
-    <widget class="QLineEdit">
-        <property name="name">
             <cstring>fromURLLine</cstring>
         </property>
         <property name="geometry">
             <string>replace</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>
+    </widget>
 </widget>
+<tabstops>
+    <tabstop>fromURLLine</tabstop>
+    <tabstop>toURLLine</tabstop>
+    <tabstop>replaceButton</tabstop>
+</tabstops>
 <layoutdefaults spacing="6" margin="11"/>
 </UI>
index 5b706b0..20e80f1 100644 (file)
 #include <qlabel.h>
 #include <qpushbutton.h>
 #include <qlistbox.h>
+#include <qmessagebox.h>
 
 #include "kitafontprefbase.h"
 #include "kitaconfig.h"
+#include "debugprefbase.h"
 
 using namespace Kita;
 
@@ -174,10 +176,18 @@ void DebugPrefPage::replace()
 {
     QString fromURL = fromURLLine->text();
     QString toURL = toURLLine->text();
-    
-    FavoriteThreads::replace( fromURL, toURL );
-    Kita::Thread::replace( fromURL, toURL );
-    KitaThreadInfo::replace( fromURL, toURL );
+
+    if ( QMessageBox::warning( this, QString( "replace" ),
+        QString( "This tool may possibly break thread's info.\n"
+        "Please create backups of '~/.kde/share/apps/kita/cache' "
+        "and '~/.kde/share/apps/kita/favorites.xml' before performing.\n"
+        "Are you ready?" ), QMessageBox::Ok, QMessageBox::Cancel | QMessageBox::Default | QMessageBox::Escape ) == QMessageBox::Ok ) {
+        FavoriteThreads::replace( fromURL, toURL );
+        Kita::Thread::replace( fromURL, toURL );
+        KitaThreadInfo::replace( fromURL, toURL );
+        
+        QMessageBox::information( this, "replace", "Complete." );
+    }
 }
 
 AsciiArtPrefPage::AsciiArtPrefPage( QWidget* parent )