aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDomenico Panella <pandom79@gmail.com>2020-08-29 18:06:07 +0000
committerNate Graham <nate@kde.org>2020-08-29 18:06:07 +0000
commiteeb2bbeff7f1ee74b907d92acb0eae6a65590ad7 (patch)
tree52251211cca1e8cf7c0c798fab6840862a67deda
parent7dbe2eb69e5b251b0c193f1a4dbbf4c69e2a3330 (diff)
downloadkconfig-eeb2bbeff7f1ee74b907d92acb0eae6a65590ad7.tar.gz
kconfig-eeb2bbeff7f1ee74b907d92acb0eae6a65590ad7.tar.bz2
Add standard shortcut for "Create Folder"
-rw-r--r--src/gui/kstandardshortcut.cpp5
-rw-r--r--src/gui/kstandardshortcut.h8
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kstandardshortcut.cpp b/src/gui/kstandardshortcut.cpp
index a91a2397..70fef713 100644
--- a/src/gui/kstandardshortcut.cpp
+++ b/src/gui/kstandardshortcut.cpp
@@ -167,6 +167,7 @@ static KStandardShortcutInfo g_infoStandardShortcut[] = {
// https://commits.kde.org/kxmlgui/8eabbf6725386e716b7536c71a9181dfe5d959f0
{ DeleteFile, "DeleteFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Delete", "@action"), SHIFT(Delete), 0, QList<QKeySequence>(), false, Category::File },
{ RenameFile, "RenameFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Rename", "@action"), Qt::Key_F2, 0, QList<QKeySequence>(), false, Category::File },
+ { CreateFolder, "CreateFolder", QT_TRANSLATE_NOOP3("KStandardShortcut", "Create Folder", "@action"), Qt::Key_F10, 0, QList<QKeySequence>(), false, Category::File },
{ MoveToTrash, "MoveToTrash", QT_TRANSLATE_NOOP3("KStandardShortcut", "Move to Trash", "@action"), Qt::Key_Delete, 0, QList<QKeySequence>(), false, Category::File },
{ Donate, "Donate", QT_TRANSLATE_NOOP3("KStandardShortcut", "Donate", "@action"), 0, 0, QList<QKeySequence>(), false, Category::Help },
{ ShowHideHiddenFiles, "ShowHideHiddenFiles", QT_TRANSLATE_NOOP3("KStandardShortcut", "Show/Hide Hidden Files", "@action"), CTRL(H), ALT(Period), QList<QKeySequence>(), false, Category::View },
@@ -575,6 +576,10 @@ const QList<QKeySequence> &renameFile()
{
return shortcut(RenameFile);
}
+const QList<QKeySequence> &createFolder()
+{
+ return shortcut(CreateFolder);
+}
const QList<QKeySequence> &moveToTrash()
{
return shortcut(MoveToTrash);
diff --git a/src/gui/kstandardshortcut.h b/src/gui/kstandardshortcut.h
index 89d1fe9b..46885e28 100644
--- a/src/gui/kstandardshortcut.h
+++ b/src/gui/kstandardshortcut.h
@@ -139,6 +139,7 @@ enum StandardShortcut {
AboutKDE, ///< Display the About KDE dialog.
DeleteFile, ///< Permanently delete files or folders. @since 5.25
RenameFile, ///< Rename files or folders. @since 5.25
+ CreateFolder, ///< Create a folder. @since 5.74
MoveToTrash, ///< Move files or folders to the trash. @since 5.25
Donate, ///< Open donation page on kde.org. @since 5.26
ShowHideHiddenFiles, ///< Toggle showing or hiding hidden files @since 5.70
@@ -549,6 +550,13 @@ KCONFIGGUI_EXPORT const QList<QKeySequence> &deleteFile();
KCONFIGGUI_EXPORT const QList<QKeySequence> &renameFile();
/**
+ * Create a folder. Default: F10
+ * @return the shortcut of the standard accelerator
+ * @since 5.74
+ */
+KCONFIGGUI_EXPORT const QList<QKeySequence> &createFolder();
+
+/**
* Moves files or folders to the trash. Default: Delete
* @return the shortcut of the standard accelerator
* @since 5.25