]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
The icons view and details view don't use hardcoded (test-) values anymore, instead...
[dolphin.git] / src / dolphinmainwindow.cpp
index 2cf524bbd7f124c9558474387c1361ac3b95006b..7a0ff6c6a59112d2d11c0a2b9a5e15289cabf0b7 100644 (file)
@@ -19,6 +19,7 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *\r
  ***************************************************************************/\r
 \r
+#include <config-kmetadata.h>\r
 #include "dolphinmainwindow.h"\r
 \r
 #include <assert.h>\r
@@ -36,6 +37,7 @@
 #include "dolphin_generalsettings.h"\r
 #include "viewpropertiesdialog.h"\r
 #include "viewproperties.h"\r
+#include "metadataloader.h"\r
 #include "mainwindowadaptor.h"\r
 \r
 #include <kaction.h>\r
@@ -153,17 +155,17 @@ void DolphinMainWindow::dropUrls(const KUrl::List& urls,
         QString seq = QKeySequence(Qt::ShiftModifier).toString();\r
         seq.chop(1); // chop superfluous '+'\r
         QAction* moveAction = popup.addAction(KIcon("goto"),\r
-                                              i18n("&Move Here") + "\t" + seq);\r
+                                              i18n("&Move Here") + '\t' + seq);\r
 \r
         seq = QKeySequence(Qt::ControlModifier).toString();\r
         seq.chop(1);\r
         QAction* copyAction = popup.addAction(KIcon("editcopy"),\r
-                                              i18n("&Copy Here") + "\t" + seq);\r
+                                              i18n("&Copy Here") + '\t' + seq);\r
 \r
         seq = QKeySequence(Qt::ControlModifier + Qt::ShiftModifier).toString();\r
         seq.chop(1);\r
         QAction* linkAction = popup.addAction(KIcon("www"),\r
-                                              i18n("&Link Here") + "\t" + seq);\r
+                                              i18n("&Link Here") + '\t' + seq);\r
 \r
         popup.addSeparator();\r
         popup.addAction(KIcon("stop"), i18n("Cancel"));\r
@@ -427,7 +429,7 @@ void DolphinMainWindow::deleteItems()
 \r
     const bool del = KMessageBox::warningContinueCancel(this,\r
                                                         text,\r
-                                                        QString::null,\r
+                                                        QString(),\r
                                                         KGuiItem(i18n("Delete"), KIcon("editdelete"))\r
                                                        ) == KMessageBox::Continue;\r
     if (del) {\r
@@ -952,6 +954,10 @@ void DolphinMainWindow::init()
         // assure a proper default size if Dolphin runs the first time\r
         resize(640, 480);\r
     }\r
+    #ifdef HAVE_KMETADATA\r
+    if (!DolphinApplication::app()->metadataLoader()->storageUp())\r
+        activeView()->statusBar()->setMessage(i18n("Failed to contact Nepomuk service, annotation and tagging are disabled."), DolphinStatusBar::Error);\r
+    #endif\r
 }\r
 \r
 void DolphinMainWindow::loadSettings()\r
@@ -988,10 +994,11 @@ void DolphinMainWindow::setupActions()
     connect(menu, SIGNAL(aboutToShow()),\r
             this, SLOT(updateNewMenu()));\r
 \r
-    QAction* action = actionCollection()->addAction("new_window");\r
-    action->setIcon(KIcon("window_new"));\r
-    action->setText(i18n("New &Window"));\r
-    connect(action, SIGNAL(triggered()), this, SLOT(openNewMainWindow()));\r
+    QAction* newWindow = actionCollection()->addAction("new_window");\r
+    newWindow->setIcon(KIcon("window_new"));\r
+    newWindow->setText(i18n("New &Window"));\r
+    newWindow->setShortcut(Qt::CTRL | Qt::Key_N);\r
+    connect(newWindow, SIGNAL(triggered()), this, SLOT(openNewMainWindow()));\r
 \r
     QAction* rename = actionCollection()->addAction("rename");\r
     rename->setText(i18n("Rename"));\r
@@ -1006,7 +1013,7 @@ void DolphinMainWindow::setupActions()
 \r
     QAction* deleteAction = actionCollection()->addAction("delete");\r
     deleteAction->setText(i18n("Delete"));\r
-    deleteAction->setShortcut(Qt::ALT | Qt::Key_Delete);\r
+    deleteAction->setShortcut(Qt::SHIFT | Qt::Key_Delete);\r
     deleteAction->setIcon(KIcon("editdelete"));\r
     connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteItems()));\r
 \r