public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kevin Kofler <Kevin@tigcc.ticalc.org>
To: git-commits@fedoraproject.org
Subject: [rpms/amarok] epel10.2: * Sun Jan 29 2012 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.5.0-6
Date: Mon, 06 Jul 2026 18:31:34 GMT	[thread overview]
Message-ID: <178336269471.1.14641005023344155406.rpms-amarok-0b5f49452b4b@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/amarok
            Branch : epel10.2
            Commit : 0b5f49452b4b47e7ea0b3f48e07f2edf9583e5e0
            Author : Kevin Kofler <Kevin@tigcc.ticalc.org>
            Date   : 2012-01-29T07:11:16+01:00
            Stats  : +69/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/amarok/c/0b5f49452b4b47e7ea0b3f48e07f2edf9583e5e0?branch=epel10.2

            Log:
            * Sun Jan 29 2012 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.5.0-6
- help: invoke a browser on the online UserBase doc if amarok-doc not installed

---
diff --git a/amarok-2.5.0-onlinedoc.patch b/amarok-2.5.0-onlinedoc.patch
new file mode 100644
index 0000000..d42db67
--- /dev/null
+++ b/amarok-2.5.0-onlinedoc.patch
@@ -0,0 +1,60 @@
+diff -ur amarok-2.5.0/src/ActionClasses.cpp amarok-2.5.0-onlinedoc/src/ActionClasses.cpp
+--- amarok-2.5.0/src/ActionClasses.cpp	2011-12-15 08:36:48.000000000 +0100
++++ amarok-2.5.0-onlinedoc/src/ActionClasses.cpp	2012-01-28 08:01:44.000000000 +0100
+@@ -31,10 +31,12 @@
+ #include "playlist/PlaylistActions.h"
+ #include "playlist/PlaylistModelStack.h"
+ 
++#include <QFile>
+ #include <KAuthorized>
+ #include <KHelpMenu>
+ #include <KLocale>
+ #include <KToolBar>
++#include <KToolInvocation>
+ #include <Osd.h>
+ #include <EqualizerDialog.h>
+ 
+@@ -152,6 +154,17 @@
+ 
+     KMenu* menu = s_helpMenu->menu();
+ 
++    // If amarok-doc is not installed, bring up the online version instead.
++    if ( !QFile::exists( "/usr/share/doc/HTML/en/amarok/index.docbook" ) ) {
++        QAction *contentsAction = s_helpMenu->action( KHelpMenu::menuHelpContents );
++        // disconnect the default slot which fires up KHelpCenter
++        disconnect( contentsAction, SIGNAL(triggered(bool)), s_helpMenu, SLOT(appHelpActivated()) );
++        // ensure no duplicate connection
++        disconnect( contentsAction, SIGNAL(triggered(bool)), this, SLOT(onlineHelpActivated()) );
++        // connect our custom slot which fires up a browser on UserBase instead
++        connect( contentsAction, SIGNAL(triggered(bool)), this, SLOT(onlineHelpActivated()) );
++    }
++
+     // NOTE: We hide "Report Bug..." because we need to add it on our own to name the dialog
+     // so it can be blacklisted from LikeBack.
+     s_helpMenu->action( KHelpMenu::menuReportBug )->setVisible( false );
+@@ -164,6 +177,12 @@
+     return menu;
+ }
+ 
++void
++Menu::onlineHelpActivated()
++{
++    KToolInvocation::invokeBrowser( "http://userbase.kde.org/Amarok/Manual" );
++}
++
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // PlayPauseAction
+ //////////////////////////////////////////////////////////////////////////////////////////
+diff -ur amarok-2.5.0/src/ActionClasses.h amarok-2.5.0-onlinedoc/src/ActionClasses.h
+--- amarok-2.5.0/src/ActionClasses.h	2011-12-15 08:36:48.000000000 +0100
++++ amarok-2.5.0-onlinedoc/src/ActionClasses.h	2012-01-28 07:55:40.000000000 +0100
+@@ -42,6 +42,9 @@
+             static Menu *instance();
+             static KMenu *helpMenu( QWidget *parent = 0 );
+ 
++        private slots:
++            void onlineHelpActivated();
++
+         private:
+             static Menu       *s_instance;
+             static KHelpMenu  *s_helpMenu;

diff --git a/amarok.spec b/amarok.spec
index 4fd83a9..01a9c48 100644
--- a/amarok.spec
+++ b/amarok.spec
@@ -2,7 +2,7 @@
 Name:    amarok
 Summary: Media player
 Version: 2.5.0
-Release: 5%{?dist}
+Release: 6%{?dist}
 
 # KDE e.V. may determine that future GPL versions are accepted
 License: GPLv2 or GPLv3
@@ -10,6 +10,10 @@ Url:     http://amarok.kde.org/
 Source0: http://download.kde.org/stable/amarok/%{version}/src/amarok-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# Invoke a browser on the online UserBase documentation instead of KHelpCenter
+# for the help contents if the amarok-doc subpackage is not installed.
+Patch0:  amarok-2.5.0-onlinedoc.patch
+
 #Patch50: amarok-2.2.1.90-qtscript_not_required.patch
 
 ## upstream patches
@@ -83,6 +87,7 @@ BuildArch: noarch
 %prep
 %setup -q 
 
+%patch0 -p1 -b .onlinedoc
 #patch50 -p1 -b .qtscript_not_required
 %patch100 -p1 -b .kde48_context_view
 
@@ -174,6 +179,9 @@ fi
 
 
 %changelog
+* Sun Jan 29 2012 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.5.0-6
+- help: invoke a browser on the online UserBase doc if amarok-doc not installed
+
 * Fri Jan 27 2012 Rex Dieter <rdieter@fedoraproject.org> 2.5.0-5
 - make -doc only handbook, put translations back in main pkg
 

                 reply	other threads:[~2026-07-06 18:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=178336269471.1.14641005023344155406.rpms-amarok-0b5f49452b4b@fedoraproject.org \
    --to=kevin@tigcc.ticalc.org \
    --cc=git-commits@fedoraproject.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