Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/panelcontextmenu.cpp
Show First 20 Lines • Show All 307 Lines • ▼ Show 20 Line(s) | |||||
308 | void PanelContextMenu::addEmptyMenuEntries() | 308 | void PanelContextMenu::addEmptyMenuEntries() | ||
309 | { | 309 | { | ||
310 | addAction(panel->gui->actions()->actPaste); | 310 | addAction(panel->gui->actions()->actPaste); | ||
311 | } | 311 | } | ||
312 | 312 | | |||
313 | void PanelContextMenu::addCreateNewMenu() | 313 | void PanelContextMenu::addCreateNewMenu() | ||
314 | { | 314 | { | ||
315 | auto *createNewMenu = new QMenu(this); | 315 | auto *createNewMenu = new QMenu(this); | ||
316 | 316 | createNewMenu->addAction(panel->gui->actions()->actNewFolderF7); | |||
317 | createNewMenu->addAction(Icon("folder"), | 317 | createNewMenu->addAction(panel->gui->actions()->actNewFileShiftF4); | ||
318 | i18n("Folder..."))->setData(QVariant(MKDIR_ID)); | | |||
319 | createNewMenu->addAction(Icon("text-plain"), | | |||
320 | i18n("Text File..."))->setData(QVariant(NEW_TEXT_FILE_ID)); | | |||
321 | 318 | | |||
322 | QAction *newMenuAction = addMenu(createNewMenu); | 319 | QAction *newMenuAction = addMenu(createNewMenu); | ||
323 | newMenuAction->setText(i18n("Create New")); | 320 | newMenuAction->setText(i18n("Create New")); | ||
324 | newMenuAction->setIcon(Icon("document-new")); | 321 | newMenuAction->setIcon(Icon("document-new")); | ||
325 | } | 322 | } | ||
326 | 323 | | |||
327 | void PanelContextMenu::performAction(int id) | 324 | void PanelContextMenu::performAction(int id) | ||
328 | { | 325 | { | ||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 362 | // break; | |||
389 | break; | 386 | break; | ||
390 | case UNMOUNT_ID : | 387 | case UNMOUNT_ID : | ||
391 | krMtMan.unmount(singleURL.adjusted(QUrl::StripTrailingSlash).path()); | 388 | krMtMan.unmount(singleURL.adjusted(QUrl::StripTrailingSlash).path()); | ||
392 | break; | 389 | break; | ||
393 | case SEND_BY_EMAIL_ID : { | 390 | case SEND_BY_EMAIL_ID : { | ||
394 | SLOTS->sendFileByEmail(_items.urlList()); | 391 | SLOTS->sendFileByEmail(_items.urlList()); | ||
395 | break; | 392 | break; | ||
396 | } | 393 | } | ||
397 | case MKDIR_ID : | | |||
398 | panel->func->mkdir(); | | |||
399 | break; | | |||
400 | case NEW_TEXT_FILE_ID: | | |||
401 | panel->func->editNew(); | | |||
402 | break; | | |||
403 | #ifdef SYNCHRONIZER_ENABLED | 394 | #ifdef SYNCHRONIZER_ENABLED | ||
404 | case SYNC_SELECTED_ID : { | 395 | case SYNC_SELECTED_ID : { | ||
405 | QStringList selectedNames; | 396 | QStringList selectedNames; | ||
406 | for (const KFileItem& item : _items) { | 397 | for (const KFileItem& item : _items) { | ||
407 | selectedNames.append(item.name()); | 398 | selectedNames.append(item.name()); | ||
408 | } | 399 | } | ||
409 | const KrViewItemList otherItems = panel->otherPanel()->view->getSelectedKrViewItems(); | 400 | const KrViewItemList otherItems = panel->otherPanel()->view->getSelectedKrViewItems(); | ||
410 | for (KrViewItem *otherItem : otherItems) { | 401 | for (KrViewItem *otherItem : otherItems) { | ||
Show All 21 Lines |