]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Replace file-find icon by edit-find
[dolphin.git] / src / dolphinmainwindow.cpp
index f4f45ad709f9aaeeea07c6da59ed54becaa93fcd..8f68724ac2c889ae883748011274e0a4226f4aae 100644 (file)
@@ -178,7 +178,7 @@ void DolphinMainWindow::dropUrls(const KUrl::List& urls,
 
         QString seq = QKeySequence(Qt::ShiftModifier).toString();
         seq.chop(1); // chop superfluous '+'
-        QAction* moveAction = popup.addAction(KIcon("goto-page"),
+        QAction* moveAction = popup.addAction(KIcon("go-jump"),
                                               i18nc("@action:inmenu",
                                                     "&Move Here\t<shortcut>%1</shortcut>", seq));
 
@@ -190,7 +190,7 @@ void DolphinMainWindow::dropUrls(const KUrl::List& urls,
 
         seq = QKeySequence(Qt::ControlModifier + Qt::ShiftModifier).toString();
         seq.chop(1);
-        QAction* linkAction = popup.addAction(KIcon("www"),
+        QAction* linkAction = popup.addAction(KIcon("insert-link"),
                                               i18nc("@action:inmenu",
                                                     "&Link Here\t<shortcut>%1</shortcut>", seq));
 
@@ -917,7 +917,9 @@ void DolphinMainWindow::toggleEditLocation()
 
 void DolphinMainWindow::editLocation()
 {
-    m_activeViewContainer->urlNavigator()->setUrlEditable(true);
+    KUrlNavigator* navigator = m_activeViewContainer->urlNavigator();
+    navigator->setUrlEditable(true);
+    navigator->setFocus();
 }
 
 void DolphinMainWindow::adjustViewProperties()
@@ -1109,30 +1111,30 @@ void DolphinMainWindow::setupActions()
     connect(menu, SIGNAL(aboutToShow()),
             this, SLOT(updateNewMenu()));
 
-    QAction* newWindow = actionCollection()->addAction("new_window");
+    KAction* newWindow = actionCollection()->addAction("new_window");
     newWindow->setIcon(KIcon("window-new"));
     newWindow->setText(i18nc("@action:inmenu File", "New &Window"));
     newWindow->setShortcut(Qt::CTRL | Qt::Key_N);
     connect(newWindow, SIGNAL(triggered()), this, SLOT(openNewMainWindow()));
 
-    QAction* rename = actionCollection()->addAction("rename");
+    KAction* rename = actionCollection()->addAction("rename");
     rename->setText(i18nc("@action:inmenu File", "Rename..."));
     rename->setShortcut(Qt::Key_F2);
     connect(rename, SIGNAL(triggered()), this, SLOT(rename()));
 
-    QAction* moveToTrash = actionCollection()->addAction("move_to_trash");
+    KAction* moveToTrash = actionCollection()->addAction("move_to_trash");
     moveToTrash->setText(i18nc("@action:inmenu File", "Move to Trash"));
     moveToTrash->setIcon(KIcon("user-trash"));
     moveToTrash->setShortcut(QKeySequence::Delete);
     connect(moveToTrash, SIGNAL(triggered()), this, SLOT(moveToTrash()));
 
-    QAction* deleteAction = actionCollection()->addAction("delete");
+    KAction* deleteAction = actionCollection()->addAction("delete");
     deleteAction->setText(i18nc("@action:inmenu File", "Delete"));
     deleteAction->setShortcut(Qt::SHIFT | Qt::Key_Delete);
     deleteAction->setIcon(KIcon("edit-delete"));
     connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteItems()));
 
-    QAction* properties = actionCollection()->addAction("properties");
+    KAction* properties = actionCollection()->addAction("properties");
     properties->setText(i18nc("@action:inmenu File", "Properties"));
     properties->setShortcut(Qt::ALT | Qt::Key_Return);
     connect(properties, SIGNAL(triggered()), this, SLOT(properties()));
@@ -1144,16 +1146,21 @@ void DolphinMainWindow::setupActions()
                           SLOT(undo()),
                           actionCollection());
 
-    KStandardAction::cut(this, SLOT(cut()), actionCollection());
+    //Need to remove shift+del from cut action, else the shortcut for deletejob
+    //doesn't work
+    KAction* cut = KStandardAction::cut(this, SLOT(cut()), actionCollection());
+    KShortcut cutShortcut = cut->shortcut();
+    cutShortcut.remove(Qt::SHIFT + Qt::Key_Delete, KShortcut::KeepEmpty);
+    cut->setShortcut(cutShortcut);
     KStandardAction::copy(this, SLOT(copy()), actionCollection());
     KStandardAction::paste(this, SLOT(paste()), actionCollection());
 
-    QAction* selectAll = actionCollection()->addAction("select_all");
+    KAction* selectAll = actionCollection()->addAction("select_all");
     selectAll->setText(i18nc("@action:inmenu Edit", "Select All"));
     selectAll->setShortcut(Qt::CTRL + Qt::Key_A);
     connect(selectAll, SIGNAL(triggered()), this, SLOT(selectAll()));
 
-    QAction* invertSelection = actionCollection()->addAction("invert_selection");
+    KAction* invertSelection = actionCollection()->addAction("invert_selection");
     invertSelection->setText(i18nc("@action:inmenu Edit", "Invert Selection"));
     invertSelection->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_A);
     connect(invertSelection, SIGNAL(triggered()), this, SLOT(invertSelection()));
@@ -1279,18 +1286,18 @@ void DolphinMainWindow::setupActions()
     showHiddenFiles->setShortcut(Qt::ALT | Qt::Key_Period);
     connect(showHiddenFiles, SIGNAL(triggered()), this, SLOT(toggleShowHiddenFiles()));
 
-    QAction* split = actionCollection()->addAction("split_view");
+    KAction* split = actionCollection()->addAction("split_view");
     split->setShortcut(Qt::Key_F10);
     updateSplitAction();
     connect(split, SIGNAL(triggered()), this, SLOT(toggleSplitView()));
 
-    QAction* reload = actionCollection()->addAction("reload");
+    KAction* reload = actionCollection()->addAction("reload");
     reload->setText(i18nc("@action:inmenu View", "Reload"));
     reload->setShortcut(Qt::Key_F5);
     reload->setIcon(KIcon("view-refresh"));
     connect(reload, SIGNAL(triggered()), this, SLOT(reloadView()));
 
-    QAction* stop = actionCollection()->addAction("stop");
+    KAction* stop = actionCollection()->addAction("stop");
     stop->setText(i18nc("@action:inmenu View", "Stop"));
     stop->setIcon(KIcon("process-stop"));
     connect(stop, SIGNAL(triggered()), this, SLOT(stopLoading()));
@@ -1303,12 +1310,12 @@ void DolphinMainWindow::setupActions()
     showFullLocation->setShortcut(Qt::CTRL | Qt::Key_L);
     connect(showFullLocation, SIGNAL(triggered()), this, SLOT(toggleEditLocation()));
 
-    QAction* editLocation = actionCollection()->addAction("edit_location");
+    KAction* editLocation = actionCollection()->addAction("edit_location");
     editLocation->setText(i18nc("@action:inmenu Navigation Bar", "Edit Location"));
     editLocation->setShortcut(Qt::Key_F6);
     connect(editLocation, SIGNAL(triggered()), this, SLOT(editLocation()));
 
-    QAction* adjustViewProps = actionCollection()->addAction("view_properties");
+    KAction* adjustViewProps = actionCollection()->addAction("view_properties");
     adjustViewProps->setText(i18nc("@action:inmenu View", "Adjust View Properties..."));
     connect(adjustViewProps, SIGNAL(triggered()), this, SLOT(adjustViewProperties()));
 
@@ -1326,7 +1333,7 @@ void DolphinMainWindow::setupActions()
     QAction* findFile = actionCollection()->addAction("find_file");
     findFile->setText(i18nc("@action:inmenu Tools", "Find File..."));
     findFile->setShortcut(Qt::CTRL | Qt::Key_F);
-    findFile->setIcon(KIcon("file-find"));
+    findFile->setIcon(KIcon("edit-find"));
     connect(findFile, SIGNAL(triggered()), this, SLOT(findFile()));
 
     KToggleAction* showFilterBar = actionCollection()->add<KToggleAction>("show_filter_bar");
@@ -1334,7 +1341,7 @@ void DolphinMainWindow::setupActions()
     showFilterBar->setShortcut(Qt::CTRL | Qt::Key_I);
     connect(showFilterBar, SIGNAL(triggered()), this, SLOT(toggleFilterBarVisibility()));
 
-    QAction* compareFiles = actionCollection()->addAction("compare_files");
+    KAction* compareFiles = actionCollection()->addAction("compare_files");
     compareFiles->setText(i18nc("@action:inmenu Tools", "Compare Files"));
     compareFiles->setIcon(KIcon("kompare"));
     compareFiles->setEnabled(false);