#include <assert.h>\r
\r
#include "dolphinapplication.h"\r
+#include "dolphinnewmenu.h"\r
#include "dolphinsettings.h"\r
#include "dolphinsettingsdialog.h"\r
#include "dolphinstatusbar.h"\r
#include <kicon.h>\r
#include <kiconloader.h>\r
#include <kio/netaccess.h>\r
+#include <kio/deletejob.h>\r
#include <kio/renamedialog.h>\r
#include <kinputdialog.h>\r
#include <klocale.h>\r
#include <kmenu.h>\r
#include <kmessagebox.h>\r
-#include <knewmenu.h>\r
#include <konqmimedata.h>\r
#include <kpropertiesdialog.h>\r
#include <kprotocolinfo.h>\r
i18n("&Link Here") + "\t" + seq);\r
\r
popup.addSeparator();\r
- popup.addAction(KIcon("stop"), i18n("Cancel"));\r
+ QAction* cancelAction = popup.addAction(KIcon("stop"), i18n("Cancel"));\r
\r
QAction* activatedAction = popup.exec(QCursor::pos());\r
if (activatedAction == moveAction) {\r
else if (activatedAction == linkAction) {\r
action = Qt::LinkAction;\r
}\r
+ else if (activatedAction == cancelAction) {\r
+ return;\r
+ }\r
}\r
\r
switch (action) {\r
\r
// TODO: I assume there will be a generic way in KDE 4 to store the docks\r
// of the main window. In the meantime they are stored manually:\r
- QString filename = KStandardDirs::locateLocal("data", KGlobal::instance()->instanceName());\r
+ QString filename = KStandardDirs::locateLocal("data", KGlobal::mainComponent().componentName());\r
filename.append("/panels_layout");\r
QFile file(filename);\r
if (file.open(QIODevice::WriteOnly)) {\r
}\r
}\r
\r
+void DolphinMainWindow::undo()\r
+{\r
+ clearStatusBar();\r
+ KonqUndoManager::self()->undo();\r
+}\r
+\r
void DolphinMainWindow::cut()\r
{\r
QMimeData* mimeData = new QMimeData();\r
// TODO: I assume there will be a generic way in KDE 4 to restore the docks\r
// of the main window. In the meantime they are restored manually (see also\r
// DolphinMainWindow::closeEvent() for more details):\r
- QString filename = KStandardDirs::locateLocal("data", KGlobal::instance()->instanceName());\r
- filename.append("/panels_layout");\r
+ QString filename = KStandardDirs::locateLocal("data", KGlobal::mainComponent().componentName()); filename.append("/panels_layout");\r
QFile file(filename);\r
if (file.open(QIODevice::ReadOnly)) {\r
QByteArray data = file.readAll();\r
void DolphinMainWindow::setupActions()\r
{\r
// setup 'File' menu\r
- m_newMenu = new KNewMenu(actionCollection(), this, "create_new");\r
+ m_newMenu = new DolphinNewMenu(this);\r
KMenu* menu = m_newMenu->menu();\r
menu->setTitle(i18n("Create New..."));\r
menu->setIcon(SmallIcon("filenew"));\r
KStandardAction::quit(this, SLOT(quit()), actionCollection());\r
\r
// setup 'Edit' menu\r
- KStandardAction::undo(KonqUndoManager::self(),\r
+ KStandardAction::undo(this,\r
SLOT(undo()),\r
actionCollection());\r
\r