]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
resize the pixmap in a smooth way instead of using a blending effect
[dolphin.git] / src / dolphinmainwindow.cpp
index eed6da4ea74b26a8011ce6b3b7d1828ec4653cac..73de1b56cf6114cf999a4789d1aa1e4c9ffb4b9f 100644 (file)
@@ -73,7 +73,7 @@
 #include <QDockWidget>
 
 DolphinMainWindow::DolphinMainWindow(int id) :
-        KMainWindow(0),
+        KXmlGuiWindow(0),
         m_newMenu(0),
         m_splitter(0),
         m_activeView(0),
@@ -394,18 +394,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event)
 
     settings.save();
 
-    // TODO: I assume there will be a generic way in KDE 4 to store the docks
-    // of the main window. In the meantime they are stored manually:
-    QString filename = KStandardDirs::locateLocal("data", KGlobal::mainComponent().componentName());
-    filename.append("/panels_layout");
-    QFile file(filename);
-    if (file.open(QIODevice::WriteOnly)) {
-        QByteArray data = saveState();
-        file.write(data);
-        file.close();
-    }
-
-    KMainWindow::closeEvent(event);
+    KXmlGuiWindow::closeEvent(event);
 }
 
 void DolphinMainWindow::saveProperties(KConfig* config)
@@ -538,7 +527,7 @@ void DolphinMainWindow::slotUndoAvailable(bool available)
             break;
 
         case KonqUndoManager::MKDIR:
-            statusBar->setMessage(i18n("Created directory."),
+            statusBar->setMessage(i18n("Created folder."),
                                   DolphinStatusBar::OperationCompleted);
             break;
 
@@ -1031,17 +1020,6 @@ void DolphinMainWindow::loadSettings()
     }
 
     updateViewActions();
-
-    // TODO: I assume there will be a generic way in KDE 4 to restore the docks
-    // of the main window. In the meantime they are restored manually (see also
-    // DolphinMainWindow::closeEvent() for more details):
-    QString filename = KStandardDirs::locateLocal("data", KGlobal::mainComponent().componentName());   filename.append("/panels_layout");
-    QFile file(filename);
-    if (file.open(QIODevice::ReadOnly)) {
-        QByteArray data = file.readAll();
-        restoreState(data);
-        file.close();
-    }
 }
 
 void DolphinMainWindow::setupActions()
@@ -1127,7 +1105,7 @@ void DolphinMainWindow::setupActions()
     KToggleAction* columnView = actionCollection()->add<KToggleAction>("columns");
     columnView->setText(i18n("Columns"));
     columnView->setShortcut(Qt::CTRL | Qt::Key_3);
-    columnView->setIcon(KIcon("view-tree"));
+    columnView->setIcon(KIcon("fileview-column"));
     connect(columnView, SIGNAL(triggered()), this, SLOT(setColumnView()));
 
     QActionGroup* viewModeGroup = new QActionGroup(this);
@@ -1256,7 +1234,7 @@ void DolphinMainWindow::setupActions()
 
     QAction* findFile = actionCollection()->addAction("find_file");
     findFile->setText(i18n("Find File..."));
-    findFile->setShortcut(Qt::Key_F);
+    findFile->setShortcut(Qt::CTRL | Qt::Key_F);
     findFile->setIcon(KIcon("file-find"));
     connect(findFile, SIGNAL(triggered()), this, SLOT(findFile()));
 
@@ -1281,13 +1259,12 @@ void DolphinMainWindow::setupDockWidgets()
     // after the dock concept has been finalized.
 
     // setup "Information"
-    QDockWidget* infoDock = new QDockWidget(i18n("Information"), this);
+    QDockWidget* infoDock = new QDockWidget(i18n("Information"));
     infoDock->setObjectName("infoDock");
     infoDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
     SidebarPage* infoWidget = new InfoSidebarPage(infoDock);
     infoDock->setWidget(infoWidget);
 
-
     infoDock->toggleViewAction()->setText(i18n("Show Information Panel"));
     actionCollection()->addAction("show_info_panel", infoDock->toggleViewAction());
 
@@ -1295,7 +1272,7 @@ void DolphinMainWindow::setupDockWidgets()
     connectSidebarPage(infoWidget);
 
     // setup "Tree View"
-    QDockWidget* treeViewDock = new QDockWidget(i18n("Folders")); // TODO: naming?
+    QDockWidget* treeViewDock = new QDockWidget(i18n("Folders"));
     treeViewDock->setObjectName("treeViewDock");
     treeViewDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
     TreeViewSidebarPage* treeWidget = new TreeViewSidebarPage(treeViewDock);
@@ -1319,6 +1296,10 @@ void DolphinMainWindow::setupDockWidgets()
     KFilePlacesView *listView = new KFilePlacesView(placesDock);
     placesDock->setWidget(listView);
     listView->setModel(DolphinSettings::instance().placesModel());
+
+    placesDock->toggleViewAction()->setText(i18n("Show Places Panel"));
+    actionCollection()->addAction("show_places_panel", placesDock->toggleViewAction());
+
     addDockWidget(Qt::LeftDockWidgetArea, placesDock);
     connect(listView, SIGNAL(urlChanged(KUrl)),
             this, SLOT(changeUrl(KUrl)));
@@ -1492,6 +1473,7 @@ void DolphinMainWindow::connectViewSignals(int viewIndex)
     connect(navigator, SIGNAL(historyChanged()),
             this, SLOT(slotHistoryChanged()));
 }
+
 void DolphinMainWindow::connectSidebarPage(SidebarPage* page)
 {
     connect(page, SIGNAL(changeUrl(KUrl)),
@@ -1508,14 +1490,15 @@ void DolphinMainWindow::connectSidebarPage(SidebarPage* page)
 }
 
 DolphinMainWindow::UndoUiInterface::UndoUiInterface(DolphinMainWindow* mainWin) :
-        KonqUndoManager::UiInterface(mainWin),
-        m_mainWin(mainWin)
+    KonqUndoManager::UiInterface(mainWin),
+    m_mainWin(mainWin)
 {
     Q_ASSERT(m_mainWin != 0);
 }
 
 DolphinMainWindow::UndoUiInterface::~UndoUiInterface()
-{}
+{
+}
 
 void DolphinMainWindow::UndoUiInterface::jobError(KIO::Job* job)
 {