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