From c7173b98afb1cdaedf303c46e186b5cb50daf285 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 27 Aug 2023 00:24:09 +0300 Subject: [PATCH] kwin: use MIME type instead of glob for the window rules requires the following commit from kdelibs: 31553f8958bb3aa36957ae5d2ebe0b315cad27d8 the MIME type is translated while globs passed to KFileDialog::getSaveFileName() (and the related getters) have to be translated in each application Signed-off-by: Ivailo Monev --- kwin/kcmkwin/kwinrules/ruleslist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kwin/kcmkwin/kwinrules/ruleslist.cpp b/kwin/kcmkwin/kwinrules/ruleslist.cpp index 01e94120..84927517 100644 --- a/kwin/kcmkwin/kwinrules/ruleslist.cpp +++ b/kwin/kcmkwin/kwinrules/ruleslist.cpp @@ -152,7 +152,7 @@ void KCMRulesList::exportClicked() { int pos = rules_listbox->currentRow(); assert(pos != -1); - QString path = KFileDialog::getSaveFileName(KUrl(), "*.kwinrules|KWin window rules", this, i18n("Export Rules"), 0); + QString path = KFileDialog::getSaveFileName(KUrl(), "application/x-kwinrules", this, i18n("Export Rules"), 0); if (path.isEmpty()) return; KConfig config(path, KConfig::SimpleConfig); @@ -163,7 +163,7 @@ void KCMRulesList::exportClicked() void KCMRulesList::importClicked() { - QString path = KFileDialog::getOpenFileName(KUrl(), "*.kwinrules|KWin window rules", this, i18n("Import Rules")); + QString path = KFileDialog::getOpenFileName(KUrl(), "application/x-kwinrules", this, i18n("Import Rules")); if (path.isEmpty()) return; KConfig config(path, KConfig::SimpleConfig);