summaryrefslogtreecommitdiffstats
path: root/src/dolphincontextmenu.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 14:58:49 -0600
committerTimothy Pearson <[email protected]>2013-02-01 14:58:49 -0600
commit6240d69b1f11d3e6c59df5f736549b1fafc49dd0 (patch)
treeda2273cc419ec68179c86f7deccfc0f5fdfe9181 /src/dolphincontextmenu.cpp
parent5f2980e30e8c46f5bc9ac8b2694e3465d02424ff (diff)
downloaddolphin-6240d69b1f11d3e6c59df5f736549b1fafc49dd0.tar.gz
dolphin-6240d69b1f11d3e6c59df5f736549b1fafc49dd0.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'src/dolphincontextmenu.cpp')
-rw-r--r--src/dolphincontextmenu.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp
index a814a2a..6589962 100644
--- a/src/dolphincontextmenu.cpp
+++ b/src/dolphincontextmenu.cpp
@@ -78,22 +78,22 @@ void DolphinContextMenu::openViewportContextMenu()
const int propertiesID = 100;
const int bookmarkID = 101;
- KPopupMenu* popup = new KPopupMenu(m_dolphinView);
+ TDEPopupMenu* popup = new TDEPopupMenu(m_dolphinView);
Dolphin& dolphin = Dolphin::mainWin();
// setup 'Create New' menu
- KPopupMenu* createNewMenu = new KPopupMenu();
+ TDEPopupMenu* createNewMenu = new TDEPopupMenu();
- KAction* createFolderAction = dolphin.actionCollection()->action("create_folder");
+ TDEAction* createFolderAction = dolphin.actionCollection()->action("create_folder");
if (createFolderAction != 0) {
createFolderAction->plug(createNewMenu);
}
createNewMenu->insertSeparator();
- KAction* action = 0;
+ TDEAction* action = 0;
- TQPtrListIterator<KAction> fileGrouptIt(dolphin.fileGroupActions());
+ TQPtrListIterator<TDEAction> fileGrouptIt(dolphin.fileGroupActions());
while ((action = fileGrouptIt.current()) != 0) {
action->plug(createNewMenu);
++fileGrouptIt;
@@ -104,14 +104,14 @@ void DolphinContextMenu::openViewportContextMenu()
//
//createNewMenu->insertSeparator();
//
- //TQPtrListIterator<KAction> linkGroupIt(dolphin.linkGroupActions());
+ //TQPtrListIterator<TDEAction> linkGroupIt(dolphin.linkGroupActions());
//while ((action = linkGroupIt.current()) != 0) {
// action->plug(createNewMenu);
// ++linkGroupIt;
//}
//
- //KPopupMenu* linkToDeviceMenu = new KPopupMenu();
- //TQPtrListIterator<KAction> linkToDeviceIt(dolphin.linkToDeviceActions());
+ //TDEPopupMenu* linkToDeviceMenu = new TDEPopupMenu();
+ //TQPtrListIterator<TDEAction> linkToDeviceIt(dolphin.linkToDeviceActions());
//while ((action = linkToDeviceIt.current()) != 0) {
// action->plug(linkToDeviceMenu);
// ++linkToDeviceIt;
@@ -130,19 +130,19 @@ void DolphinContextMenu::openViewportContextMenu()
}
popup->insertSeparator();
- KAction* pasteAction = dolphin.actionCollection()->action(KStdAction::stdName(KStdAction::Paste));
+ TDEAction* pasteAction = dolphin.actionCollection()->action(KStdAction::stdName(KStdAction::Paste));
pasteAction->plug(popup);
// setup 'View Mode' menu
- KPopupMenu* viewModeMenu = new KPopupMenu();
+ TDEPopupMenu* viewModeMenu = new TDEPopupMenu();
- KAction* iconsMode = dolphin.actionCollection()->action("icons");
+ TDEAction* iconsMode = dolphin.actionCollection()->action("icons");
iconsMode->plug(viewModeMenu);
- KAction* detailsMode = dolphin.actionCollection()->action("details");
+ TDEAction* detailsMode = dolphin.actionCollection()->action("details");
detailsMode->plug(viewModeMenu);
- KAction* previewsMode = dolphin.actionCollection()->action("previews");
+ TDEAction* previewsMode = dolphin.actionCollection()->action("previews");
previewsMode->plug(viewModeMenu);
popup->insertItem(i18n("View Mode"), viewModeMenu);
@@ -186,7 +186,7 @@ void DolphinContextMenu::openItemContextMenu()
assert(m_fileInfo != 0);
- KPopupMenu* popup = new KPopupMenu(m_dolphinView);
+ TDEPopupMenu* popup = new TDEPopupMenu(m_dolphinView);
Dolphin& dolphin = Dolphin::mainWin();
const KURL::List urls = m_dolphinView->selectedURLs();
@@ -200,7 +200,7 @@ void DolphinContextMenu::openItemContextMenu()
const KStdAction::StdAction actionNames[] = { KStdAction::Cut, KStdAction::Copy, KStdAction::Paste };
const int count = sizeof(actionNames) / sizeof(KStdAction::StdAction);
for (int i = 0; i < count; ++i) {
- KAction* action = dolphin.actionCollection()->action(KStdAction::stdName(actionNames[i]));
+ TDEAction* action = dolphin.actionCollection()->action(KStdAction::stdName(actionNames[i]));
if (action != 0) {
action->plug(popup);
}
@@ -208,16 +208,16 @@ void DolphinContextMenu::openItemContextMenu()
popup->insertSeparator();
// insert 'Rename'
- KAction* renameAction = dolphin.actionCollection()->action("rename");
+ TDEAction* renameAction = dolphin.actionCollection()->action("rename");
renameAction->plug(popup);
// insert 'Move to Trash' for local URLs, otherwise insert 'Delete'
if (url.isLocalFile()) {
- KAction* moveToTrashAction = dolphin.actionCollection()->action("move_to_trash");
+ TDEAction* moveToTrashAction = dolphin.actionCollection()->action("move_to_trash");
moveToTrashAction->plug(popup);
}
else {
- KAction* deleteAction = dolphin.actionCollection()->action("delete");
+ TDEAction* deleteAction = dolphin.actionCollection()->action("delete");
deleteAction->plug(popup);
}
@@ -240,7 +240,7 @@ void DolphinContextMenu::openItemContextMenu()
// insert 'Properties...' entry
popup->insertSeparator();
- KAction* propertiesAction = dolphin.actionCollection()->action("properties");
+ TDEAction* propertiesAction = dolphin.actionCollection()->action("properties");
propertiesAction->plug(popup);
int id = popup->exec(m_pos);
@@ -282,7 +282,7 @@ void DolphinContextMenu::openItemContextMenu()
popup->deleteLater();
}
-int DolphinContextMenu::insertOpenWithItems(KPopupMenu* popup,
+int DolphinContextMenu::insertOpenWithItems(TDEPopupMenu* popup,
TQValueVector<KService::Ptr>& openWithVector)
{
// Prepare 'Open With' sub menu. Usually a sub menu is created, where all applications
@@ -311,7 +311,7 @@ int DolphinContextMenu::insertOpenWithItems(KPopupMenu* popup,
int index = openWithIDStart;
if (offers.count() > 0) {
TDETrader::OfferList::Iterator it;
- KPopupMenu* openWithMenu = new KPopupMenu();
+ TDEPopupMenu* openWithMenu = new TDEPopupMenu();
for(it = offers.begin(); it != offers.end(); ++it) {
// The offer list from the TDETrader returns duplicate
// application entries. Although this seems to be a configuration
@@ -350,16 +350,16 @@ int DolphinContextMenu::insertOpenWithItems(KPopupMenu* popup,
return openWithID;
}
-void DolphinContextMenu::insertActionItems(KPopupMenu* popup,
+void DolphinContextMenu::insertActionItems(TDEPopupMenu* popup,
TQValueVector<KDEDesktopMimeType::Service>& actionsVector)
{
- KPopupMenu* actionsMenu = new KPopupMenu();
+ TDEPopupMenu* actionsMenu = new TDEPopupMenu();
int actionsIndex = 0;
TQStringList dirs = TDEGlobal::dirs()->findDirs("data", "d3lphin/servicemenus/");
- KPopupMenu* menu = 0;
+ TDEPopupMenu* menu = 0;
for (TQStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) {
TQDir dir(*dirIt);
TQStringList entries = dir.entryList("*.desktop", TQDir::Files);
@@ -415,7 +415,7 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup,
const TQString submenuName = cfg.readEntry( "X-TDE-Submenu" );
if (!submenuName.isEmpty()) {
- menu = new KPopupMenu();
+ menu = new TDEPopupMenu();
actionsMenu->insertItem(submenuName, menu, submenuID);
}
@@ -477,7 +477,7 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup,
}
}
-bool DolphinContextMenu::containsEntry(const KPopupMenu* menu,
+bool DolphinContextMenu::containsEntry(const TDEPopupMenu* menu,
const TQString& entryName) const
{
assert(menu != 0);