[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kgpg2
From: Rolf Eike Beer <kde () opensource ! sf-tec ! de>
Date: 2008-01-15 22:40:20
Message-ID: 1200436820.590783.13388.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 762032 by dakon:
Forward-port of r757360
dfaure wrote:
all/allfiles doesn't exist anymore, application/octet-stream is used instead.
Also ported the code to the new location and syntax for service menus [untested, but \
can't be worse than before :)]
M +3 -2 encryptfile.desktop
M +9 -6 kgpgoptions.cpp
--- branches/work/kgpg2/encryptfile.desktop #762031:762032
@@ -1,7 +1,8 @@
[Desktop Entry]
Type=Service
-X-KDE-ServiceTypes=all/allfiles,KonqPopupMenu/Plugin
-ExcludeServiceTypes=kdedevice/*
+# all files inherit from application/octet-stream
+MimeType=application/octet-stream;
+X-KDE-ServiceTypes=KonqPopupMenu/Plugin
Actions=encrypt;
[Desktop Action encrypt]
--- branches/work/kgpg2/kgpgoptions.cpp #762031:762032
@@ -332,12 +332,12 @@
// install service menus
if (m_page7->kcfg_SignMenu->currentIndex() == \
KGpgSettings::EnumSignMenu::AllFiles)
- slotInstallSign("all/allfiles");
+ slotInstallSign("application/octet-stream");
else
slotRemoveMenu("signfile.desktop");
if (m_page7->kcfg_DecryptMenu->currentIndex() == \
KGpgSettings::EnumDecryptMenu::AllFiles)
- slotInstallDecrypt("all/allfiles");
+ slotInstallDecrypt("application/octet-stream");
else
if (m_page7->kcfg_DecryptMenu->currentIndex() == \
KGpgSettings::EnumDecryptMenu::EncryptedFiles)
slotInstallDecrypt("application/pgp-encrypted,application/pgp-signature,application/pgp-keys");
@@ -442,7 +442,9 @@
if (configl2.isImmutable() == false)
{
KConfigGroup gr = configl2.group("Desktop Entry");
- gr.writeEntry("ServiceTypes", mimetype);
+
+ gr.writeXdgListEntry("MimeType", QStringList() << mimetype);
+ gr.writeEntry("X-KDE-ServiceTypes", "KonqPopupMenu/Plugin");
gr.writeEntry("Actions", "decrypt");
gr = configl2.group("Desktop Action decrypt");
@@ -455,12 +457,13 @@
void kgpgOptions::slotInstallSign(const QString &mimetype)
{
- QString path = KStandardDirs::locateLocal("data", \
"konqueror/servicemenus/signfile.desktop"); + QString path = \
KStandardDirs::locateLocal("services", "ServiceMenus/signfile.desktop"); \
KDesktopFile configl2(path); if (configl2.isImmutable() ==false)
{
KConfigGroup gr = configl2.group("Desktop Entry");
- gr.writeEntry("ServiceTypes", mimetype);
+ gr.writeXdgListEntry("MimeType", QStringList() << mimetype);
+ gr.writeEntry("X-KDE-ServiceTypes", "KonqPopupMenu/Plugin");
gr.writeEntry("Actions", "sign");
gr = configl2.group("Desktop Action sign");
@@ -473,7 +476,7 @@
void kgpgOptions::slotRemoveMenu(const QString &menu)
{
- QString path = KStandardDirs::locateLocal("data", "konqueror/servicemenus/" + \
menu); + QString path = KStandardDirs::locateLocal("services", "ServiceMenus/" + \
menu); QFile qfile(path);
if (qfile.exists())
qfile.remove();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic