public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/files/
Date: Sat,  8 Sep 2018 12:51:43 +0000 (UTC)	[thread overview]
Message-ID: <1536411094.4ba1b2e31f26bb8b31890fc3ce6eb7ef0aaf8b9b.asturm@gentoo> (raw)

commit:     4ba1b2e31f26bb8b31890fc3ce6eb7ef0aaf8b9b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  8 12:50:51 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Sep  8 12:51:34 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ba1b2e3

kde-apps/gwenview: Add missing patch

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../gwenview-18.07.90-activities-optional.patch    | 160 +++++++++++++++++++++
 1 file changed, 160 insertions(+)

diff --git a/kde-apps/gwenview/files/gwenview-18.07.90-activities-optional.patch b/kde-apps/gwenview/files/gwenview-18.07.90-activities-optional.patch
new file mode 100644
index 00000000000..bf66688a6b9
--- /dev/null
+++ b/kde-apps/gwenview/files/gwenview-18.07.90-activities-optional.patch
@@ -0,0 +1,160 @@
+From a00eecc78507f48843f719f32e80ae8805a34c15 Mon Sep 17 00:00:00 2001
+From: Alexander Volkov <a.volkov@rusbitech.ru>
+Date: Tue, 7 Aug 2018 23:59:15 +0300
+Subject: Make dependency on KActivities optional
+
+Reviewers: #gwenview, rkflx
+
+Reviewed By: #gwenview, rkflx
+
+Subscribers: asturmlechner, rkflx
+
+Differential Revision: https://phabricator.kde.org/D14512
+---
+ CMakeLists.txt          |  4 +++-
+ app/CMakeLists.txt      |  5 ++++-
+ app/viewmainpage.cpp    | 19 ++++++++++++++++---
+ config-gwenview.h.cmake |  1 +
+ 4 files changed, 24 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6e3e412..810813a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -71,7 +71,6 @@ add_definitions(-DPHONON_LIB_SONAME=\"${PHONON_LIB_SONAME}\")
+ 
+ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+     KIO
+-    Activities
+     ItemModels
+     I18n
+     DocTools
+@@ -80,6 +79,9 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+     IconThemes
+     Notifications
+ )
++find_package(KF5 ${KF5_MIN_VERSION} OPTIONAL_COMPONENTS
++    Activities
++)
+ 
+ ## Dependencies
+ find_package(JPEG)
+diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
+index 5fe34d6..0d24360 100644
+--- a/app/CMakeLists.txt
++++ b/app/CMakeLists.txt
+@@ -78,11 +78,14 @@ add_executable(gwenview ${gwenview_SRCS})
+ 
+ target_link_libraries(gwenview
+     KF5::ItemModels
+-    KF5::Activities
+     KF5::Notifications
+     gwenviewlib
+     )
+ 
++if (KF5Activities_FOUND)
++    target_link_libraries(gwenview KF5::Activities)
++endif()
++
+ target_link_libraries(gwenview LINK_INTERFACE_LIBRARIES KF5::KIOCore Qt5::Core)
+ 
+ if (KF5Kipi_FOUND)
+diff --git a/app/viewmainpage.cpp b/app/viewmainpage.cpp
+index fa06e80..480d3c2 100644
+--- a/app/viewmainpage.cpp
++++ b/app/viewmainpage.cpp
+@@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ 
+ */
+ #include "viewmainpage.h"
++#include "config-gwenview.h"
+ 
+ // Qt
+ #include <QCheckBox>
+@@ -35,8 +36,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ #include <KMessageBox>
+ #include <KModelIndexProxyMapper>
+ #include <KToggleAction>
+-#include <KActivities/ResourceInstance>
+ #include <KSqueezedTextLabel>
++#ifdef KF5Activities_FOUND
++#include <KActivities/ResourceInstance>
++#endif
+ 
+ // Local
+ #include "fileoperations.h"
+@@ -132,7 +135,9 @@ struct ViewMainPagePrivate
+     // Activity Resource events reporting needs to be above KPart,
+     // in the shell itself, to avoid problems with other MDI applications
+     // that use this KPart
++#ifdef KF5Activities_FOUND
+     QHash<DocumentView*, KActivities::ResourceInstance*> mActivityResources;
++#endif
+ 
+     bool mCompareMode;
+     ZoomMode::Enum mZoomMode;
+@@ -250,7 +255,9 @@ struct ViewMainPagePrivate
+         QObject::connect(view, &DocumentView::videoFinished, mSlideShow, &SlideShow::resumeAndGoToNextUrl);
+ 
+         mDocumentViews << view;
++#ifdef KF5Activities_FOUND
+         mActivityResources.insert(view, new KActivities::ResourceInstance(q->window()->winId(), view));
++#endif
+ 
+         return view;
+     }
+@@ -269,7 +276,9 @@ struct ViewMainPagePrivate
+         QObject::disconnect(view, nullptr, mSlideShow, nullptr);
+ 
+         mDocumentViews.removeOne(view);
++#ifdef KF5Activities_FOUND
+         mActivityResources.remove(view);
++#endif
+         mDocumentViewContainer->deleteView(view);
+     }
+ 
+@@ -344,8 +353,10 @@ struct ViewMainPagePrivate
+         }
+         if (oldView) {
+             oldView->setCurrent(false);
++#ifdef KF5Activities_FOUND
+             Q_ASSERT(mActivityResources.contains(oldView));
+             mActivityResources.value(oldView)->notifyFocusedOut();
++#endif
+         }
+         view->setCurrent(true);
+         mDocumentViewController->setView(view);
+@@ -358,10 +369,10 @@ struct ViewMainPagePrivate
+             // *before* listing /foo (because it matters less to the user)
+             mThumbnailBar->selectionModel()->setCurrentIndex(index, QItemSelectionModel::Current);
+         }
+-
++#ifdef KF5Activities_FOUND
+         Q_ASSERT(mActivityResources.contains(view));
+         mActivityResources.value(view)->notifyFocusedIn();
+-
++#endif
+         QObject::connect(view, &DocumentView::currentToolChanged,
+                          q, &ViewMainPage::updateFocus);
+     }
+@@ -701,7 +712,9 @@ void ViewMainPage::openUrls(const QList<QUrl>& allUrls, const QUrl &currentUrl)
+         DocumentView* view = it.value();
+         DocumentView::Setup savedSetup = d->mDocumentViewContainer->savedSetup(url);
+         view->openUrl(url, d->mZoomMode == ZoomMode::Individual && savedSetup.valid ? savedSetup : setup);
++#ifdef KF5Activities_FOUND
+         d->mActivityResources.value(view)->setUri(url);
++#endif
+     }
+ 
+     // Init views
+diff --git a/config-gwenview.h.cmake b/config-gwenview.h.cmake
+index 29a5a60..369442a 100644
+--- a/config-gwenview.h.cmake
++++ b/config-gwenview.h.cmake
+@@ -6,3 +6,4 @@
+ #cmakedefine HAVE_X11 ${HAVE_X11}
+ #cmakedefine HAVE_FITS ${HAVE_FITS}
+ #cmakedefine HAVE_QTDBUS ${HAVE_QTDBUS}
++#cmakedefine KF5Activities_FOUND 1
+-- 
+cgit v0.11.2


             reply	other threads:[~2018-09-08 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-08 12:51 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-01-17  0:36 [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/files/ Andreas Sturmlechner
2019-06-16 21:57 Andreas Sturmlechner
2025-03-23 14:30 Conrad Kostecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1536411094.4ba1b2e31f26bb8b31890fc3ce6eb7ef0aaf8b9b.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox