Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/krpopupmenu.cpp
Show First 20 Lines • Show All 268 Lines • ▼ Show 20 Line(s) | 265 | { | |||
---|---|---|---|---|---|
269 | QAction *newAct = addMenu(&createNewPopup); | 269 | QAction *newAct = addMenu(&createNewPopup); | ||
270 | newAct->setData(QVariant(CREATE_NEW_ID)); | 270 | newAct->setData(QVariant(CREATE_NEW_ID)); | ||
271 | newAct->setText(i18n("Create New")); | 271 | newAct->setText(i18n("Create New")); | ||
272 | 272 | | |||
273 | } | 273 | } | ||
274 | 274 | | |||
275 | void KrPopupMenu::performAction(int id) | 275 | void KrPopupMenu::performAction(int id) | ||
276 | { | 276 | { | ||
277 | QList<QUrl> lst; | | |||
278 | | ||||
279 | switch (id) { | 277 | switch (id) { | ||
280 | case - 1 : // the user clicked outside of the menu | 278 | case - 1 : // the user clicked outside of the menu | ||
281 | return ; | 279 | return ; | ||
282 | case OPEN_TAB_ID : | 280 | case OPEN_TAB_ID : | ||
283 | // assuming only 1 file is selected (otherwise we won't get here) | 281 | // assuming only 1 file is selected (otherwise we won't get here) | ||
284 | panel->manager()->newTab(_item->url(), panel); | 282 | panel->manager()->newTab(_item->url(), panel); | ||
285 | break; | 283 | break; | ||
286 | case OPEN_ID : | 284 | case OPEN_ID : | ||
Show All 26 Lines | 310 | if ( KMessageBox::warningContinueCancel( krApp, | |||
313 | i18n("<qt>Do you really want to shred <b>%1</b>? Once shred, the file is gone forever.</qt>", item->name()), | 311 | i18n("<qt>Do you really want to shred <b>%1</b>? Once shred, the file is gone forever.</qt>", item->name()), | ||
314 | QString(), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), "Shred" ) == KMessageBox::Continue ) | 312 | QString(), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), "Shred" ) == KMessageBox::Continue ) | ||
315 | KShred::shred( panel->func->files() ->vfs_getFile( item->name() ).adjusted(QUrl::RemoveTrailingSlash).path() ); | 313 | KShred::shred( panel->func->files() ->vfs_getFile( item->name() ).adjusted(QUrl::RemoveTrailingSlash).path() ); | ||
316 | break;*/ | 314 | break;*/ | ||
317 | case OPEN_KONQ_ID : | 315 | case OPEN_KONQ_ID : | ||
318 | KToolInvocation::startServiceByDesktopName("konqueror", _item->url().toDisplayString(QUrl::PreferLocalFile)); | 316 | KToolInvocation::startServiceByDesktopName("konqueror", _item->url().toDisplayString(QUrl::PreferLocalFile)); | ||
319 | break; | 317 | break; | ||
320 | case CHOOSE_ID : // open-with dialog | 318 | case CHOOSE_ID : // open-with dialog | ||
321 | lst << _item->url(); | 319 | panel->func->displayOpenWithDialog(_items.urlList()); | ||
322 | panel->func->displayOpenWithDialog(lst); | | |||
323 | break; | 320 | break; | ||
324 | case MOUNT_ID : | 321 | case MOUNT_ID : | ||
325 | krMtMan.mount(_item->url().adjusted(QUrl::StripTrailingSlash).path()); | 322 | krMtMan.mount(_item->url().adjusted(QUrl::StripTrailingSlash).path()); | ||
326 | break; | 323 | break; | ||
327 | case NEW_LINK_ID : | 324 | case NEW_LINK_ID : | ||
328 | panel->func->krlink(false); | 325 | panel->func->krlink(false); | ||
329 | break; | 326 | break; | ||
330 | case NEW_SYMLINK_ID : | 327 | case NEW_SYMLINK_ID : | ||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |