mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Warn when the unsuspecting user is about to create a directory that starts with a dot,
like Sabine's ".csv test files" folder, which did not appear in the directory view after being created. svn path=/trunk/KDE/kdebase/apps/; revision=1051124
This commit is contained in:
parent
d4a983d98c
commit
f2c315a147
3 changed files with 9 additions and 1 deletions
|
@ -189,6 +189,8 @@ void DolphinContextMenu::openItemContextMenu()
|
|||
if (m_fileInfo.isDir() && (m_selectedUrls.count() == 1)) {
|
||||
// setup 'Create New' menu
|
||||
DolphinNewMenu* newMenu = new DolphinNewMenu(popup, m_mainWindow);
|
||||
const DolphinView* view = m_mainWindow->activeViewContainer()->view();
|
||||
newMenu->setViewShowsHiddenFiles(view->showHiddenFiles());
|
||||
newMenu->slotCheckUpToDate();
|
||||
newMenu->setPopupFiles(m_fileInfo.url());
|
||||
newMenu->setEnabled(capabilities().supportsWriting());
|
||||
|
@ -268,6 +270,8 @@ void DolphinContextMenu::openViewportContextMenu()
|
|||
|
||||
// setup 'Create New' menu
|
||||
KNewMenu* newMenu = m_mainWindow->newMenu();
|
||||
const DolphinView* view = m_mainWindow->activeViewContainer()->view();
|
||||
newMenu->setViewShowsHiddenFiles(view->showHiddenFiles());
|
||||
newMenu->slotCheckUpToDate();
|
||||
newMenu->setPopupFiles(m_baseUrl);
|
||||
popup->addMenu(newMenu->menu());
|
||||
|
|
|
@ -552,12 +552,14 @@ void DolphinMainWindow::readProperties(const KConfigGroup& group)
|
|||
|
||||
void DolphinMainWindow::updateNewMenu()
|
||||
{
|
||||
m_newMenu->setViewShowsHiddenFiles(activeViewContainer()->view()->showHiddenFiles());
|
||||
m_newMenu->slotCheckUpToDate();
|
||||
m_newMenu->setPopupFiles(activeViewContainer()->url());
|
||||
}
|
||||
|
||||
void DolphinMainWindow::createDirectory()
|
||||
{
|
||||
m_newMenu->setViewShowsHiddenFiles(activeViewContainer()->view()->showHiddenFiles());
|
||||
m_newMenu->setPopupFiles(activeViewContainer()->url());
|
||||
m_newMenu->createDirectory();
|
||||
}
|
||||
|
@ -1658,7 +1660,7 @@ void DolphinMainWindow::setUrlAsCaption(const KUrl& url)
|
|||
caption = url.protocol();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setCaption(caption);
|
||||
}
|
||||
|
||||
|
|
|
@ -535,6 +535,7 @@ void DolphinPart::updateNewMenu()
|
|||
{
|
||||
// As requested by KNewMenu :
|
||||
m_newMenu->slotCheckUpToDate();
|
||||
m_newMenu->setViewShowsHiddenFiles(m_view->showHiddenFiles());
|
||||
// And set the files that the menu apply on :
|
||||
m_newMenu->setPopupFiles(url());
|
||||
}
|
||||
|
@ -551,6 +552,7 @@ void DolphinPart::updateProgress(int percent)
|
|||
|
||||
void DolphinPart::createDirectory()
|
||||
{
|
||||
m_newMenu->setViewShowsHiddenFiles(m_view->showHiddenFiles());
|
||||
m_newMenu->setPopupFiles(url());
|
||||
m_newMenu->createDirectory();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue