Added help and about dialogs and actions
authorTommi Asp <tomma.asp@gmail.com>
Fri, 9 Apr 2010 13:46:39 +0000 (16:46 +0300)
committerTommi Asp <tomma.asp@gmail.com>
Fri, 9 Apr 2010 13:46:39 +0000 (16:46 +0300)
src/cuteexplorertranslation_fi_FI.qm
src/cuteexplorertranslation_fi_FI.ts
src/mainwindow.cpp
src/mainwindow.h
src/mainwindow.ui
src/src.pro

index 41afdda..ec31975 100644 (file)
Binary files a/src/cuteexplorertranslation_fi_FI.qm and b/src/cuteexplorertranslation_fi_FI.qm differ
index 5631905..423ca93 100644 (file)
@@ -4,67 +4,71 @@
 <context>
     <name>FileListWidget</name>
     <message>
-        <location filename="filelistwidget.cpp" line="71"/>
+        <location filename="filelistwidget.cpp" line="72"/>
         <source>Rename</source>
         <translation>Uudelleen nimeä</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="71"/>
+        <location filename="filelistwidget.cpp" line="72"/>
         <source>New filename: </source>
         <translation>Uusi tiedoston nimi:</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="77"/>
-        <location filename="filelistwidget.cpp" line="119"/>
-        <location filename="filelistwidget.cpp" line="135"/>
-        <location filename="filelistwidget.cpp" line="167"/>
+        <location filename="filelistwidget.cpp" line="78"/>
+        <location filename="filelistwidget.cpp" line="120"/>
+        <location filename="filelistwidget.cpp" line="136"/>
+        <location filename="filelistwidget.cpp" line="168"/>
         <source>Error!</source>
         <translation>Virhe!</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="78"/>
+        <location filename="filelistwidget.cpp" line="79"/>
         <source>Renaming file %1 failed</source>
         <translation>Tiedoston %1 uudelleen nimeäminen epäonnistui</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="120"/>
+        <location filename="filelistwidget.cpp" line="121"/>
         <source>Copying file %1 failed</source>
         <translation>Tiedoston %1 kopiointi epäonnistui</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="136"/>
+        <location filename="filelistwidget.cpp" line="137"/>
         <source>Moving file %1 failed</source>
         <translation>Tiedoston %1 siirto epäonnistui</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="156"/>
+        <location filename="filelistwidget.cpp" line="157"/>
         <source>Deleting file</source>
         <translation>Tiedoston poisto</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="157"/>
+        <location filename="filelistwidget.cpp" line="158"/>
         <source>You are about to delete %1 file(s).
 Are you sure you want to continue?</source>
         <translation>Olet poistamassa %1 tiedostoa.\nOletko varma että tahdot jatkaa?</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="168"/>
+        <location filename="filelistwidget.cpp" line="169"/>
         <source>Deleting file %1 failed</source>
         <translation>Tiedoston %1 poistaminen epäonnistui</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="247"/>
-        <location filename="filelistwidget.cpp" line="264"/>
+        <location filename="filelistwidget.cpp" line="258"/>
+        <location filename="filelistwidget.cpp" line="272"/>
         <source>Sending files</source>
         <translation>Tiedostojen lähetys</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="248"/>
+        <location filename="filelistwidget.cpp" line="259"/>
+        <source>Sending directories not supported</source>
+        <translation>Hakemistojen lähetys ei tuettu</translation>
+    </message>
+    <message>
         <source>To send files, select files you want to send and copy them.</source>
-        <translation>Lähettääksesi tiedostoja; valitse tiedostot, kopioi ja lähetä tiedostot.</translation>
+        <translation type="obsolete">Lähettääksesi tiedostoja; valitse tiedostot, kopioi ja lähetä tiedostot.</translation>
     </message>
     <message>
-        <location filename="filelistwidget.cpp" line="265"/>
+        <location filename="filelistwidget.cpp" line="273"/>
         <source>Only in maemo5 for now</source>
         <translation>Vain maemo5:ssä tällähetkellä</translation>
     </message>
@@ -73,8 +77,9 @@ Are you sure you want to continue?</source>
     <name>MainWindow</name>
     <message>
         <location filename="mainwindow.ui" line="14"/>
-        <source>Maemo Explorer</source>
-        <translation>Maemo Explorer</translation>
+        <source>CuteExplorer</source>
+        <oldsource>Maemo Explorer</oldsource>
+        <translation>CuteExplorer</translation>
     </message>
     <message>
         <location filename="mainwindow.ui" line="26"/>
@@ -87,68 +92,137 @@ Are you sure you want to continue?</source>
         <translation>Backspace</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="91"/>
+        <location filename="mainwindow.ui" line="81"/>
         <source>File</source>
         <translation>Tiedosto</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="74"/>
         <source>Edit</source>
-        <translation>Muokkaa</translation>
+        <translation type="obsolete">Muokkaa</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="84"/>
+        <location filename="mainwindow.ui" line="74"/>
         <source>View</source>
         <translation>Näkymä</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="102"/>
+        <location filename="mainwindow.ui" line="87"/>
+        <location filename="mainwindow.ui" line="149"/>
+        <location filename="mainwindow.cpp" line="76"/>
+        <location filename="mainwindow.cpp" line="80"/>
+        <source>Help</source>
+        <translation>Apua</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.ui" line="98"/>
         <source>Exit</source>
         <translation>Lopeta</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="107"/>
+        <location filename="mainwindow.ui" line="103"/>
         <source>Cut</source>
         <translation>Leikkaa</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="112"/>
+        <location filename="mainwindow.ui" line="108"/>
         <source>Copy</source>
         <translation>Kopioi</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="117"/>
+        <location filename="mainwindow.ui" line="113"/>
         <source>Paste</source>
         <translation>Liitä</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="122"/>
+        <location filename="mainwindow.ui" line="118"/>
         <source>Delete</source>
         <translation>Poista</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="130"/>
+        <location filename="mainwindow.ui" line="126"/>
         <source>Icon view</source>
         <translation>Kuvake näkymä</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="148"/>
+        <location filename="mainwindow.ui" line="144"/>
         <source>Send files</source>
         <translation>Lähetä tiedostoja</translation>
     </message>
     <message>
+        <location filename="mainwindow.ui" line="154"/>
+        <source>About</source>
+        <translation></translation>
+    </message>
+    <message>
         <source>Switch Mode</source>
         <translation type="obsolete">Vaihda näkymä</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="135"/>
+        <location filename="mainwindow.ui" line="131"/>
         <source>Rename</source>
         <translation>Uudelleen nimeä</translation>
     </message>
     <message>
-        <location filename="mainwindow.ui" line="143"/>
+        <location filename="mainwindow.ui" line="139"/>
         <source>Show hidden</source>
         <translation>Näytä piilotetut</translation>
     </message>
+    <message>
+        <location filename="mainwindow.cpp" line="77"/>
+        <source>Cut, copy, delete, rename, paste and send files</source>
+        <translation>Leikkaa, kopioi, poista, uudelleen nimeä ja lähetä tiedostoja</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="78"/>
+        <source>commands can be found from context menu (click and hold on maemo).</source>
+        <translation>komennot löytyvät context valikosta (pitkä painallus maemossa).</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="79"/>
+        <source>To select files, use ctrl and shift</source>
+        <translation>Valitaksesi tiedostoja paina ctrl tai shift pohjassa</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="87"/>
+        <source>&lt;p&gt;Version %1&lt;br/&gt;</source>
+        <translation>&lt;p&gt;Versio %1&lt;br/&gt;</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="88"/>
+        <source>Using Qt %1&lt;br/&gt;</source>
+        <oldsource>Using Qt %1
+&lt;br/&gt;</oldsource>
+        <translation>Käyttää Qt %1&lt;br/&gt;</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="89"/>
+        <source>Copyright</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="91"/>
+        <source>&lt;p&gt;CuteExplorer is file manager mainly for maemo5.&lt;br/&gt;</source>
+        <translation>&lt;p&gt;CuteExplorer on tiedosto manageri pääasiassa maemo5:lle.&lt;br/&gt;</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="92"/>
+        <source>This is still under development so please visit&lt;br/&gt;</source>
+        <translation>Tämä on vielä kehityksen alla, joten käy&lt;br/&gt;</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="93"/>
+        <source>&lt;a href=http://cuteexplorer.garage.maemo.org&gt;http://cuteexplorer.garage.maemo.org&lt;/a&gt;&lt;br/&gt;</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="94"/>
+        <source>to report bugs or leave feature requests. Thanks!&lt;/p&gt;</source>
+        <translation>ilmoittaaksesi bugeista. Kiitos! &lt;/p&gt;</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="96"/>
+        <source>About CuteExplorer</source>
+        <translation></translation>
+    </message>
 </context>
 </TS>
index a23c48b..fd19a08 100644 (file)
@@ -18,6 +18,10 @@ MainWindow::MainWindow(QWidget *parent) :
     connect(ui->actionShow_hidden, SIGNAL(toggled(bool)), ui->fileListWidget, SLOT(actionShowHidden(bool)));
     connect(ui->actionRename, SIGNAL(triggered()), ui->fileListWidget, SLOT(actionRename()));
     connect(ui->actionSend, SIGNAL(triggered()), ui->fileListWidget, SLOT(actionSendFiles()));
+
+    connect(ui->actionHelp, SIGNAL(triggered()), this, SLOT(showHelp()));
+    connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
+
     ui->locationLine->setText(ui->fileListWidget->getPath());
 
 
@@ -65,3 +69,31 @@ void MainWindow::changeEvent(QEvent *e)
     }
 }
 
+void MainWindow::showHelp()
+{
+    QString helpText;
+
+    helpText.append("<h2>CuteExplorer "+tr("Help") +"</h2>");
+    helpText.append("<p>"+ tr("Cut, copy, delete, rename, paste and send files")+"<br/>");
+    helpText.append(tr("commands can be found from context menu (click and hold on maemo).")+"<br/>");
+    helpText.append(tr("To select files, use ctrl and shift")+"<br/>");
+    QMessageBox::about(this, tr("Help"),
+                       helpText);
+}
+void MainWindow::showAbout()
+{
+    QString about;
+    about.append("<h2>CuteExplorer</h2>");
+    about.append(tr("<p>Version %1<br/>").arg(QString(CUTE_VERSION)));
+    about.append(tr("Using Qt %1<br/>").arg(QString(QT_VERSION_STR)));
+    about.append(tr("Copyright") + " 2010 Tommi \"tomma\" Asp &lt;tomma.asp@gmail.com&gt;<br/>");
+
+    about.append(tr("<p>CuteExplorer is file manager mainly for maemo5.<br/>"));
+    about.append(tr("This is still under development so please visit<br/>"));
+    about.append(tr("<a href=http://cuteexplorer.garage.maemo.org>http://cuteexplorer.garage.maemo.org</a><br/>"));
+    about.append(tr("to report bugs or leave feature requests. Thanks!</p>"));
+
+    QMessageBox::about(this, tr("About CuteExplorer"),
+                       about);
+}
+
index 8e9c517..b2fa0f9 100644 (file)
@@ -13,13 +13,16 @@ public:
     MainWindow(QWidget *parent = 0);
     ~MainWindow();
 
-
+public slots:
+    void showHelp();
+    void showAbout();
 protected:
     void changeEvent(QEvent *e);
     void keyPressEvent(QKeyEvent *e);
     void keyReleaseEvent(QKeyEvent *e);
 private slots:
    void locationLineEnterKeyHandler();
+
 private:
     Ui::MainWindow *ui;
 
index 0e115da..e0d73fd 100644 (file)
     </property>
     <addaction name="actionExit"/>
    </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>Help</string>
+    </property>
+    <addaction name="actionHelp"/>
+    <addaction name="actionAbout"/>
+   </widget>
    <addaction name="menuFile"/>
    <addaction name="menuView"/>
+   <addaction name="menuHelp"/>
   </widget>
   <action name="actionExit">
    <property name="text">
     <string>Send files</string>
    </property>
   </action>
+  <action name="actionHelp">
+   <property name="text">
+    <string>Help</string>
+   </property>
+  </action>
+  <action name="actionAbout">
+   <property name="text">
+    <string>About</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <customwidgets>
index cf54d45..e786153 100644 (file)
@@ -13,7 +13,7 @@ FORMS += mainwindow.ui
 TRANSLATIONS += cuteexplorertranslation_fi_FI.ts
 RESOURCES += i18n.qrc
 
-
+DEFINES += CUTE_VERSION=\\\"1.1\\\"
 maemo5 {
     #VARIABLES
     CONFIG += link_pkgconfig