diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-10-19 21:19:49 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-10-19 21:20:11 +0200 |
commit | 65807b8c2383023f7db69dea885c2f25a5abfeab (patch) | |
tree | 1d789b81bf679709836f01f5d80162d5611bcb9c /kde-apps | |
parent | eclass/rust-toolchain: switch back to tar.xz for sources (diff) | |
download | gentoo-65807b8c2383023f7db69dea885c2f25a5abfeab.tar.gz gentoo-65807b8c2383023f7db69dea885c2f25a5abfeab.tar.bz2 gentoo-65807b8c2383023f7db69dea885c2f25a5abfeab.zip |
kde-apps/kmail: Fix main/status toolbar option persistence
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=396339
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=395988
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'kde-apps')
-rw-r--r-- | kde-apps/kmail/files/kmail-18.04.3-no-sync-after-save.patch | 90 | ||||
-rw-r--r-- | kde-apps/kmail/files/kmail-18.04.3-setAutoSaveSettings.patch | 52 | ||||
-rw-r--r-- | kde-apps/kmail/kmail-18.04.3-r1.ebuild | 115 |
3 files changed, 257 insertions, 0 deletions
diff --git a/kde-apps/kmail/files/kmail-18.04.3-no-sync-after-save.patch b/kde-apps/kmail/files/kmail-18.04.3-no-sync-after-save.patch new file mode 100644 index 000000000000..c770dac239b4 --- /dev/null +++ b/kde-apps/kmail/files/kmail-18.04.3-no-sync-after-save.patch @@ -0,0 +1,90 @@ +From fcd21f9712143afb956dca2f67fb930fffc074fd Mon Sep 17 00:00:00 2001 +From: David Faure <faure@kde.org> +Date: Tue, 31 Jul 2018 11:59:24 +0200 +Subject: KMail: don't sync after save, don't reload after last sync + +Summary: +* save() takes care of sync() already, if anything changed. +* When quitting there's no reason to reload the configuration. + +Test Plan: None yet + +Reviewers: mlaurent + +Reviewed By: mlaurent + +Subscribers: kde-pim + +Tags: #kde_pim + +Differential Revision: https://phabricator.kde.org/D14509 +--- + src/kmkernel.cpp | 26 +++++++++++++++----------- + src/kmkernel.h | 1 + + 2 files changed, 16 insertions(+), 11 deletions(-) + +diff --git a/src/kmkernel.cpp b/src/kmkernel.cpp +index aafb9ee..7af593d 100644 +--- a/src/kmkernel.cpp ++++ b/src/kmkernel.cpp +@@ -231,7 +231,7 @@ KMKernel::~KMKernel() + mMailService = nullptr; + + stopAgentInstance(); +- slotSyncConfig(); ++ saveConfig(); + + delete mAutoCorrection; + delete mMailCommonSettings; +@@ -1172,16 +1172,7 @@ void KMKernel::slotRequestConfigSync() + + void KMKernel::slotSyncConfig() + { +- PimCommon::PimCommonSettings::self()->save(); +- MessageCore::MessageCoreSettings::self()->save(); +- MessageViewer::MessageViewerSettings::self()->save(); +- MessageComposer::MessageComposerSettings::self()->save(); +- TemplateParser::TemplateParserSettings::self()->save(); +- MessageList::MessageListSettings::self()->save(); +- mMailCommonSettings->save(); +- Gravatar::GravatarSettings::self()->save(); +- KMailSettings::self()->save(); +- KMKernel::config()->sync(); ++ saveConfig(); + //Laurent investigate why we need to reload them. + PimCommon::PimCommonSettings::self()->load(); + MessageCore::MessageCoreSettings::self()->load(); +@@ -1195,6 +1186,19 @@ void KMKernel::slotSyncConfig() + KMKernel::config()->reparseConfiguration(); + } + ++void KMKernel::saveConfig() ++{ ++ PimCommon::PimCommonSettings::self()->save(); ++ MessageCore::MessageCoreSettings::self()->save(); ++ MessageViewer::MessageViewerSettings::self()->save(); ++ MessageComposer::MessageComposerSettings::self()->save(); ++ TemplateParser::TemplateParserSettings::self()->save(); ++ MessageList::MessageListSettings::self()->save(); ++ mMailCommonSettings->save(); ++ Gravatar::GravatarSettings::self()->save(); ++ KMailSettings::self()->save(); ++} ++ + void KMKernel::updateConfig() + { + slotConfigChanged(); +diff --git a/src/kmkernel.h b/src/kmkernel.h +index e7fc071..f5da22d 100644 +--- a/src/kmkernel.h ++++ b/src/kmkernel.h +@@ -487,6 +487,7 @@ private: + void resourceGoOnLine(); + void openReader(bool onlyCheck); + QSharedPointer<MailCommon::FolderSettings> currentFolderCollection(); ++ void saveConfig(); + + KMail::UndoStack *the_undoStack = nullptr; + MessageComposer::AkonadiSender *the_msgSender = nullptr; +-- +cgit v0.11.2 diff --git a/kde-apps/kmail/files/kmail-18.04.3-setAutoSaveSettings.patch b/kde-apps/kmail/files/kmail-18.04.3-setAutoSaveSettings.patch new file mode 100644 index 000000000000..a7377b61f190 --- /dev/null +++ b/kde-apps/kmail/files/kmail-18.04.3-setAutoSaveSettings.patch @@ -0,0 +1,52 @@ +From 814f0db2a1ae5b15bf91909ce80a5d6792f9aeed Mon Sep 17 00:00:00 2001 +From: David Faure <faure@kde.org> +Date: Sun, 29 Jul 2018 13:05:38 +0200 +Subject: Port to setAutoSaveSettings so that saving happens before hiding. + +Summary: +See d35a882895 in kxmlgui for more complete explanation. + +BUG: 396339 +CCBUG: 395988 + +Test Plan: kmail ; Alt+F4 ; kmail -> now the statusbar and toolbar are visible again + +Reviewers: ngraham, elvisangelaccio, broulik, cfeck, mlaurent + +Reviewed By: mlaurent + +Subscribers: kde-pim + +Tags: #kde_pim + +Differential Revision: https://phabricator.kde.org/D14454 +--- + src/kmmainwin.cpp | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/kmmainwin.cpp b/src/kmmainwin.cpp +index ce3b042..f3550ba 100644 +--- a/src/kmmainwin.cpp ++++ b/src/kmmainwin.cpp +@@ -76,7 +76,7 @@ KMMainWin::KMMainWin(QWidget *) + createGUI(QStringLiteral("kmmainwin.rc")); + + //must be after createGUI, otherwise e.g toolbar settings are not loaded +- applyMainWindowSettings(KMKernel::self()->config()->group("Main Window")); ++ setAutoSaveSettings(KMKernel::self()->config()->group("Main Window")); + + connect(KPIM::BroadcastStatus::instance(), &KPIM::BroadcastStatus::statusMsg, + this, &KMMainWin::displayStatusMessage); +@@ -94,10 +94,6 @@ KMMainWin::~KMMainWin() + // Avoids a crash if there are any Akonadi jobs running, which may + // attempt to display a status message when they are killed. + disconnect(KPIM::BroadcastStatus::instance(), &KPIM::BroadcastStatus::statusMsg, this, nullptr); +- +- KConfigGroup grp(KMKernel::self()->config()->group("Main Window")); +- saveMainWindowSettings(grp); +- KMKernel::self()->config()->sync(); + } + + KMMainWidget *KMMainWin::mainKMWidget() const +-- +cgit v0.11.2 diff --git a/kde-apps/kmail/kmail-18.04.3-r1.ebuild b/kde-apps/kmail/kmail-18.04.3-r1.ebuild new file mode 100644 index 000000000000..80a2769dd4ac --- /dev/null +++ b/kde-apps/kmail/kmail-18.04.3-r1.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +KDE_HANDBOOK="forceoptional" +KDE_TEST="forceoptional" +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Email client, supporting POP3 and IMAP mailboxes." +HOMEPAGE="https://www.kde.org/applications/internet/kmail/" +LICENSE="GPL-2+ handbook? ( FDL-1.2+ )" +KEYWORDS="~amd64 ~x86" +IUSE="" + +COMMON_DEPEND=" + $(add_frameworks_dep kbookmarks) + $(add_frameworks_dep kcmutils) + $(add_frameworks_dep kcodecs) + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep kcrash) + $(add_frameworks_dep kdbusaddons) + $(add_frameworks_dep kguiaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kitemviews) + $(add_frameworks_dep kio) + $(add_frameworks_dep kjobwidgets) + $(add_frameworks_dep knotifications) + $(add_frameworks_dep knotifyconfig) + $(add_frameworks_dep kparts) + $(add_frameworks_dep kservice) + $(add_frameworks_dep ktextwidgets) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kwindowsystem) + $(add_frameworks_dep kxmlgui) + $(add_frameworks_dep sonnet) + $(add_kdeapps_dep akonadi) + $(add_kdeapps_dep akonadi-contacts) + $(add_kdeapps_dep akonadi-mime) + $(add_kdeapps_dep akonadi-search) + $(add_kdeapps_dep kcalcore) + $(add_kdeapps_dep kcontacts) + $(add_kdeapps_dep kdepim-apps-libs) + $(add_kdeapps_dep kidentitymanagement) + $(add_kdeapps_dep kmailtransport) + $(add_kdeapps_dep kmime) + $(add_kdeapps_dep kontactinterface) + $(add_kdeapps_dep kpimtextedit) + $(add_kdeapps_dep libgravatar) + $(add_kdeapps_dep libkdepim) + $(add_kdeapps_dep libkleo) + $(add_kdeapps_dep libksieve) + $(add_kdeapps_dep libktnef) + $(add_kdeapps_dep mailcommon) + $(add_kdeapps_dep messagelib) + $(add_kdeapps_dep pimcommon) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui) + $(add_qt_dep qtnetwork) + $(add_qt_dep qtwebengine 'widgets') + $(add_qt_dep qtwidgets) + >=app-crypt/gpgme-1.7.1[cxx,qt5] +" +DEPEND="${COMMON_DEPEND} + $(add_kdeapps_dep kcalutils) + $(add_kdeapps_dep kldap) + dev-libs/libxslt + test? ( $(add_kdeapps_dep akonadi 'sqlite,tools') ) +" +RDEPEND="${COMMON_DEPEND} + !kde-apps/kdepim-common-libs:4 + !kde-apps/kdepim-l10n + !kde-apps/ktnef + $(add_kdeapps_dep kdepim-runtime) + $(add_kdeapps_dep kmail-account-wizard) +" + +RESTRICT+=" test" # bug 616878 + +PATCHES=( + "${FILESDIR}/${P}-no-sync-after-save.patch" + "${FILESDIR}/${P}-setAutoSaveSettings.patch" +) + +src_prepare() { + kde5_src_prepare + + if ! use handbook; then + sed -i ktnef/CMakeLists.txt -e "/add_subdirectory(doc)/ s/^/#DONT/" || die + fi +} + +pkg_postinst() { + kde5_pkg_postinst + + pkg_is_installed() { + echo "${1} ($(has_version ${1} || echo "not ")installed)" + } + + elog "KMail supports the following runtime dependencies:" + elog " Virus detection:" + elog " $(pkg_is_installed app-antivirus/clamav)" + elog " Spam filtering:" + elog " $(pkg_is_installed mail-filter/bogofilter)" + elog " $(pkg_is_installed mail-filter/spamassassin)" + elog " Fancy e-mail headers and various useful plugins:" + elog " $(pkg_is_installed kde-apps/kdepim-addons:${SLOT})" + elog " Crypto config and certificate details GUI:" + elog " $(pkg_is_installed kde-apps/kleopatra:${SLOT})" +} |