mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
filelight: prepare for KShortcutsDialog changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
2e33c7fa83
commit
df0ff52a8c
1 changed files with 18 additions and 13 deletions
|
@ -164,7 +164,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|||
KParts::MainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
inline void MainWindow::configToolbars() //slot
|
||||
void MainWindow::configToolbars() //slot
|
||||
{
|
||||
KEditToolBar dialog(factory(), this);
|
||||
|
||||
|
@ -175,27 +175,32 @@ inline void MainWindow::configToolbars() //slot
|
|||
}
|
||||
}
|
||||
|
||||
inline void MainWindow::configKeys() //slot
|
||||
void MainWindow::configKeys() //slot
|
||||
{
|
||||
KShortcutsDialog::configure(actionCollection(), KShortcutsEditor::LetterShortcutsAllowed, this, true);
|
||||
KShortcutsDialog::configure(actionCollection(), KShortcutsEditor::LetterShortcutsAllowed, this);
|
||||
}
|
||||
|
||||
inline void MainWindow::slotScanFolder()
|
||||
void MainWindow::slotScanFolder()
|
||||
{
|
||||
slotScanUrl(KFileDialog::getExistingDirectoryUrl(m_part->url(), this, i18n("Select Folder to Scan")));
|
||||
}
|
||||
|
||||
inline void MainWindow::slotScanHomeFolder() {
|
||||
void MainWindow::slotScanHomeFolder()
|
||||
{
|
||||
slotScanPath(QDir::homePath());
|
||||
}
|
||||
inline void MainWindow::slotScanRootFolder() {
|
||||
|
||||
void MainWindow::slotScanRootFolder()
|
||||
{
|
||||
slotScanPath(QDir::rootPath());
|
||||
}
|
||||
inline void MainWindow::slotUp() {
|
||||
|
||||
void MainWindow::slotUp()
|
||||
{
|
||||
slotScanUrl(m_part->url().upUrl());
|
||||
}
|
||||
|
||||
inline void MainWindow::slotComboScan()
|
||||
void MainWindow::slotComboScan()
|
||||
{
|
||||
QString path = m_combo->lineEdit()->text();
|
||||
|
||||
|
@ -210,7 +215,7 @@ inline void MainWindow::slotComboScan()
|
|||
m_combo->addToHistory(path);
|
||||
}
|
||||
|
||||
inline bool MainWindow::slotScanPath(const QString &path)
|
||||
bool MainWindow::slotScanPath(const QString &path)
|
||||
{
|
||||
return slotScanUrl(KUrl(path));
|
||||
}
|
||||
|
@ -228,18 +233,18 @@ bool MainWindow::slotScanUrl(const KUrl &url)
|
|||
return false;
|
||||
}
|
||||
|
||||
inline void MainWindow::slotAbortScan()
|
||||
void MainWindow::slotAbortScan()
|
||||
{
|
||||
if (m_part->closeUrl()) action("scan_stop")->setEnabled(false);
|
||||
}
|
||||
|
||||
inline void MainWindow::scanStarted()
|
||||
void MainWindow::scanStarted()
|
||||
{
|
||||
stateChanged(QLatin1String( "scan_started" ));
|
||||
m_combo->clearFocus();
|
||||
}
|
||||
|
||||
inline void MainWindow::scanFailed()
|
||||
void MainWindow::scanFailed()
|
||||
{
|
||||
stateChanged(QLatin1String( "scan_failed" ));
|
||||
qobject_cast<KAction*>(action("go_up"))->setHelpText(QString());
|
||||
|
@ -265,7 +270,7 @@ void MainWindow::scanCompleted()
|
|||
m_recentScans->addUrl(url); //FIXME doesn't set the tick
|
||||
}
|
||||
|
||||
inline void MainWindow::urlAboutToChange()
|
||||
void MainWindow::urlAboutToChange()
|
||||
{
|
||||
//called when part's URL is about to change internally
|
||||
//the part will then create the Map and emit completed()
|
||||
|
|
Loading…
Add table
Reference in a new issue