forked from pool/ktorrent
Accepting request 57324 from KDE:Distro:Factory
Accepted submit request 57324 from user dirkmueller OBS-URL: https://build.opensuse.org/request/show/57324 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ktorrent?expand=0&rev=68
This commit is contained in:
parent
549a2a4396
commit
dcf4f7f9e9
@ -1,6 +1,8 @@
|
||||
--- ktorrent/ktorrent.desktop 2010-06-14 18:29:38.000000000 +0200
|
||||
+++ ktorrent/ktorrent.desktop 2010-06-27 21:19:32.880094144 +0200
|
||||
@@ -106,6 +106,7 @@
|
||||
Index: ktorrent/ktorrent.desktop
|
||||
===================================================================
|
||||
--- ktorrent/ktorrent.desktop.orig 2010-11-30 21:38:26.000000000 +0200
|
||||
+++ ktorrent/ktorrent.desktop 2010-12-09 11:20:29.000000000 +0200
|
||||
@@ -107,6 +107,7 @@ Icon=ktorrent
|
||||
Type=Application
|
||||
DocPath=ktorrent/index.html
|
||||
MimeType=application/x-bittorrent;application/x-torrent;
|
||||
|
3
ktorrent-4.1beta1.tar.bz2
Normal file
3
ktorrent-4.1beta1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:64a7ddebfa211177ec1756875a2a879d13611329f05427f4995bc60719df329d
|
||||
size 2917511
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f189892ba27c7cd632c240a20477df38d0c9b91bdbf2a51d810046dafc0cd360
|
||||
size 1117029
|
57
ktorrent.1
Normal file
57
ktorrent.1
Normal file
@ -0,0 +1,57 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
|
||||
.TH KTORRENT: "1" "December 2010" "Qt: 4.7.1" "User Commands"
|
||||
.SH NAME
|
||||
ktorrent: \- Bittorrent client for KDE
|
||||
.SH SYNOPSIS
|
||||
.B ktorrent
|
||||
[\fIQt-options\fR] [\fIKDE-options\fR] [\fIUrl\fR]
|
||||
.SH DESCRIPTION
|
||||
Bittorrent client for KDE
|
||||
.SS "Generic options:"
|
||||
.TP
|
||||
\fB\-\-help\fR
|
||||
Show help about options
|
||||
.TP
|
||||
\fB\-\-help\-qt\fR
|
||||
Show Qt specific options
|
||||
.TP
|
||||
\fB\-\-help\-kde\fR
|
||||
Show KDE specific options
|
||||
.TP
|
||||
\fB\-\-help\-all\fR
|
||||
Show all options
|
||||
.TP
|
||||
\fB\-\-author\fR
|
||||
Show author information
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
Show version information
|
||||
.TP
|
||||
\fB\-\-license\fR
|
||||
Show license information
|
||||
.TP
|
||||
\fB\-\-\fR
|
||||
End of options
|
||||
.SS "Arguments:"
|
||||
.TP
|
||||
Url
|
||||
Document to open
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-\-silent\fR
|
||||
Silently open torrent given on URL
|
||||
.PP
|
||||
KDE Development Platform: 4.5.85 (4.6 Beta2)
|
||||
KTorrent: 4.1dev
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B Qt:
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B Qt:
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info Qt:
|
||||
.PP
|
||||
should give you access to the complete manual.
|
@ -1,3 +1,58 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 3 09:19:29 UTC 2011 - davejplater@gmail.com
|
||||
|
||||
- Update to ktorrent-1.0.80 (1.1beta1) fix kde #(261679) crash with
|
||||
rss syndication plugin.
|
||||
- Added "Requires libktcore12 = version-release to ensure the
|
||||
correct libktcore12 is upgraded.
|
||||
- Upstream changes :
|
||||
- * Video streaming support
|
||||
* Superseeding support
|
||||
* Data file moves are now tracked in the GUI
|
||||
* The GUI has been redesigned and now makes proper use of KDE's
|
||||
KParts technologie
|
||||
* The search plugin now uses webkit
|
||||
* Exclusion patterns have been added to the syndication plugin
|
||||
filters
|
||||
* And many other smaller changes. For a full overview of all the
|
||||
changes, take a look in the ChangeLog's of libktorrent and
|
||||
ktorrent.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 21 20:03:10 UTC 2010 - davejplater@gmail.com
|
||||
|
||||
- Used kde macros in the files section and added man pages -
|
||||
ktupnptest.1 and ktorrent.1 generated by help2man.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 17 20:28:51 UTC 2010 - davejplater@gmail.com
|
||||
|
||||
- Split off libktcore.so.12 into sub package libktcore12.
|
||||
- Update to 4.0.4.60git20101217 to fix crash #(kde#260338).
|
||||
- Removed new_kde_powermanagement.diff, incorporated upstream.
|
||||
- Upstream changes :
|
||||
*Make it possible to add TorrentFileStream from the dbus interface
|
||||
and also provide a dbus interface for this TorrentFileStream.
|
||||
*Improve perfor.ance of View
|
||||
*Remove unnecessary call to setEmitDownloadStatusChanged in
|
||||
FileSelectDlg.
|
||||
*Use QVector instead of in WebSeedsModel.
|
||||
*Add do not ask again option to dialog shown when torrent file is
|
||||
downloaded in the search plugin.
|
||||
*Support data check queueing feature of libktorrent.
|
||||
*Fix bug causing user modified filename not be shown for single
|
||||
file torrents.
|
||||
*Ensure that lastSaveDir is saved to the config.
|
||||
*Make sure ktorrent compiles and works with new solid
|
||||
powermanagement api introduced in KDE 4.6beta2.
|
||||
*Fix bug with properties extender not setting uniform row heights
|
||||
to false when it is shown.
|
||||
*Add option to rename single file torrents to the file inside.
|
||||
*Add patch from Duns Ens which adds a dbus call to remove the
|
||||
TorrentFileStream in DBusTorrent.
|
||||
*Fix bug causing the wrong path to be opened when opening a
|
||||
nested directory in a multifile torrent.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 9 12:59:58 UTC 2010 - tittiatcoke@gmail.com
|
||||
|
||||
|
141
ktorrent.spec
141
ktorrent.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package ktorrent (Version 4.0.4.60git20101130)
|
||||
# spec file for package ktorrent (Version 1.0.8)
|
||||
#
|
||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -14,29 +14,33 @@
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
|
||||
%define srcversion 4.1beta1
|
||||
Name: ktorrent
|
||||
BuildRequires: gmp-devel kdebase4-workspace-devel libkdepimlibs4-devel libqca2-devel taglib-devel
|
||||
BuildRequires: fdupes libktorrent-devel
|
||||
BuildRequires: hicolor-icon-theme jpackage-utils
|
||||
Url: http://ktorrent.pwsp.net/
|
||||
License: GPLv2+
|
||||
Group: Productivity/Networking/File-Sharing
|
||||
Summary: KDE BitTorrent Client
|
||||
Version: 4.0.4.60git20101130
|
||||
Version: 1.0.80
|
||||
Release: 1
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%define rversion %version
|
||||
Source: %{name}-git20101130.tar.bz2
|
||||
Source: %{name}-%{srcversion}.tar.bz2
|
||||
Source2: icons.tar.bz2
|
||||
Source3: ktorrent.1
|
||||
Source4: ktupnptest.1
|
||||
Patch1: remove-links.diff
|
||||
Patch4: suse-dht-warning.diff
|
||||
Patch5: initial-preference.diff
|
||||
Patch6: new_kde_powermanagement.diff
|
||||
Recommends: %{name}-lang
|
||||
Recommends: %{name}-lang = %{version}
|
||||
%kde4_runtime_requires
|
||||
%kde4_pimlibs_requires
|
||||
|
||||
Requires: oxygen-icon-theme
|
||||
# This specific "requires" is neccessary because rpm doesn't specify a version for the libktcore12 requirement
|
||||
Requires: libktcore12 = %{version}-%{release}
|
||||
|
||||
%description
|
||||
Torrent is a BitTorrent program for KDE. Its main features are:
|
||||
@ -46,6 +50,17 @@ Torrent is a BitTorrent program for KDE. Its main features are:
|
||||
* Internet searching using the BitTorrent Web site's search engine
|
||||
* UDP trackers
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Jois Guisson <jrois.guisson@gmail.com>
|
||||
|
||||
%package -n libktcore12
|
||||
License: GPLv2+
|
||||
Group: System/Libraries
|
||||
Summary: Library for ktorrent
|
||||
|
||||
%description -n libktcore12
|
||||
This package contains ktorrent's library
|
||||
Authors:
|
||||
--------
|
||||
Jois Guisson <jrois.guisson@gmail.com>
|
||||
@ -67,30 +82,38 @@ Authors:
|
||||
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q -n %name
|
||||
%setup -q -n %{name}-%{srcversion}
|
||||
%patch1
|
||||
%if ! 0%{?packman_bs}
|
||||
%patch4
|
||||
%endif
|
||||
%patch5
|
||||
%patch6 -p1
|
||||
tar xfj %{SOURCE2}
|
||||
|
||||
%build
|
||||
%cmake_kde4 -d build -- -DENABLE_DHT_SUPPORT=true
|
||||
%cmake_kde4 -d build -- -DENABLE_DHT_SUPPORT=true -DCMAKE_VERBOSE_MAKEFILE:BOOL=true
|
||||
%make_jobs
|
||||
|
||||
%install
|
||||
cd build
|
||||
%makeinstall
|
||||
%if %suse_version > 1020
|
||||
# Add man pages from help2man edited.
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
cp %{S:3} %{buildroot}%{_mandir}/man1
|
||||
cp %{S:4} %{buildroot}%{_mandir}/man1
|
||||
%fdupes -s $RPM_BUILD_ROOT
|
||||
%endif
|
||||
%if %suse_version > 1110
|
||||
%else
|
||||
rm -rf $RPM_BUILD_ROOT/usr/share/locale/hne
|
||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/hne
|
||||
%endif
|
||||
%suse_update_desktop_file -r ktorrent Qt KDE Network P2P
|
||||
|
||||
# Fix any .py files with shebangs and wrong permissions.
|
||||
if test -z `find %{buildroot} -name *.py -perm 0644 -print0|xargs -0r grep -l '#!'`; \
|
||||
then break;
|
||||
else chmod -f 0755 `find %{buildroot} -name *.py -perm 0644 -print0|xargs -0r grep -l '#!'`; \
|
||||
fi
|
||||
|
||||
%kde_post_install
|
||||
%find_lang %name
|
||||
|
||||
@ -100,14 +123,22 @@ tar xfj %{SOURCE2}
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%post -n libktcore12 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libktcore12 -p /sbin/ldconfig
|
||||
|
||||
%files lang -f build/%name.lang
|
||||
%defattr(-,root,root)
|
||||
%dir %{_datadir}/locale/sr@ijekavian
|
||||
%dir %{_datadir}/locale/sr@ijekavian/LC_MESSAGES
|
||||
%dir %{_datadir}/locale/sr@ijekavianlatin
|
||||
%dir %{_datadir}/locale/sr@ijekavianlatin/LC_MESSAGES
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/usr/bin/ktorrent
|
||||
/usr/bin/ktupnptest
|
||||
/usr/bin/ktmagnetdownloader
|
||||
%{_bindir}/ktorrent
|
||||
%{_bindir}/ktupnptest
|
||||
%{_bindir}/ktmagnetdownloader
|
||||
%_kde4_modules/ktbwschedulerplugin.so
|
||||
%_kde4_modules/ktinfowidgetplugin.so
|
||||
%_kde4_modules/ktipfilterplugin.so
|
||||
@ -118,46 +149,45 @@ tar xfj %{SOURCE2}
|
||||
%_kde4_modules/ktupnpplugin.so
|
||||
%_kde4_modules/ktwebinterfaceplugin.so
|
||||
%_kde4_modules/ktmediaplayerplugin.so
|
||||
%_libdir/libktcore.so.*
|
||||
%_kde4_modules/ktdownloadorderplugin.so
|
||||
%_kde4_modules/ktscriptingplugin.so
|
||||
%_kde4_modules/ktsyndicationplugin.so
|
||||
%_kde4_modules/plasma_applet_ktorrent.so
|
||||
%_kde4_modules/plasma_engine_ktorrent.so
|
||||
/usr/share/icons/hicolor/*/actions/kt-add-feeds.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-add-filters.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-remove-feeds.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-remove-filters.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-magnet.*
|
||||
%{_iconsbasedir}/*/actions/kt-add-feeds.*
|
||||
%{_iconsbasedir}/*/actions/kt-add-filters.*
|
||||
%{_iconsbasedir}/*/actions/kt-remove-feeds.*
|
||||
%{_iconsbasedir}/*/actions/kt-remove-filters.*
|
||||
%{_iconsbasedir}/*/actions/kt-magnet.*
|
||||
%_kde_share_dir/services/ktdownloadorderplugin.desktop
|
||||
%_kde_share_dir/services/ktscriptingplugin.desktop
|
||||
%_kde_share_dir/services/ktsyndicationplugin.desktop
|
||||
%_kde_share_dir/services/plasma-applet-ktorrent.desktop
|
||||
%_kde_share_dir/services/plasma-dataengine-ktorrent.desktop
|
||||
/usr/share/applications/kde4/ktorrent.desktop
|
||||
/usr/share/icons/hicolor/*/apps/ktorrent.*
|
||||
/usr/share/icons/hicolor/*/mimetypes/torrent.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-bandwidth-scheduler.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-change-tracker.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-check-data.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-chunks.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-encrypted.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-info-widget.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-pause.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-plugins.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-queue-manager.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-remove.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-restore-defaults.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-set-max-download-speed.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-set-max-upload-speed.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-show-hide.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-show-statusbar.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-speed-limits.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-start-all.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-start.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-stop-all.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-stop.*
|
||||
/usr/share/icons/hicolor/*/actions/kt-upnp.*
|
||||
%{_kde4_applicationsdir}/ktorrent.desktop
|
||||
%{_iconsbasedir}/*/apps/ktorrent.*
|
||||
%{_iconsbasedir}/*/mimetypes/torrent.*
|
||||
%{_iconsbasedir}/*/actions/kt-bandwidth-scheduler.*
|
||||
%{_iconsbasedir}/*/actions/kt-change-tracker.*
|
||||
%{_iconsbasedir}/*/actions/kt-check-data.*
|
||||
%{_iconsbasedir}/*/actions/kt-chunks.*
|
||||
%{_iconsbasedir}/*/actions/kt-encrypted.*
|
||||
%{_iconsbasedir}/*/actions/kt-info-widget.*
|
||||
%{_iconsbasedir}/*/actions/kt-pause.*
|
||||
%{_iconsbasedir}/*/actions/kt-plugins.*
|
||||
%{_iconsbasedir}/*/actions/kt-queue-manager.*
|
||||
%{_iconsbasedir}/*/actions/kt-remove.*
|
||||
%{_iconsbasedir}/*/actions/kt-restore-defaults.*
|
||||
%{_iconsbasedir}/*/actions/kt-set-max-download-speed.*
|
||||
%{_iconsbasedir}/*/actions/kt-set-max-upload-speed.*
|
||||
%{_iconsbasedir}/*/actions/kt-show-hide.*
|
||||
%{_iconsbasedir}/*/actions/kt-show-statusbar.*
|
||||
%{_iconsbasedir}/*/actions/kt-speed-limits.*
|
||||
%{_iconsbasedir}/*/actions/kt-start-all.*
|
||||
%{_iconsbasedir}/*/actions/kt-start.*
|
||||
%{_iconsbasedir}/*/actions/kt-stop-all.*
|
||||
%{_iconsbasedir}/*/actions/kt-stop.*
|
||||
%{_iconsbasedir}/*/actions/kt-upnp.*
|
||||
%_kde_share_dir/apps/ktorrent
|
||||
%_kde_share_dir/services/ktbwschedulerplugin.desktop
|
||||
%_kde_share_dir/services/ktinfowidgetplugin.desktop
|
||||
@ -171,12 +201,17 @@ tar xfj %{SOURCE2}
|
||||
%_kde_share_dir/services/ktmediaplayerplugin.desktop
|
||||
%_kde_share_dir/services/magnet.protocol
|
||||
%_kde_share_dir/servicetypes/ktorrentplugin.desktop
|
||||
/usr/%_lib/kde4/ktzeroconfplugin.so
|
||||
/usr/%_lib/kde4/ktshutdownplugin.so
|
||||
/usr/%_lib/kde4/ktmagnetgeneratorplugin.so
|
||||
/usr/share/kde4/services/ktzeroconfplugin.desktop
|
||||
/usr/share/kde4/services/ktshutdownplugin.desktop
|
||||
/usr/share/kde4/services/ktmagnetgeneratorplugin.desktop
|
||||
%{_kde4_modulesdir}/ktzeroconfplugin.so
|
||||
%{_kde4_modulesdir}/ktmagnetgeneratorplugin.so
|
||||
%{_kde4_sharedir}/services/ktzeroconfplugin.desktop
|
||||
%{_kde4_sharedir}/services/ktshutdownplugin.desktop
|
||||
%{_kde4_modulesdir}/ktshutdownplugin.so
|
||||
%{_kde4_sharedir}/services/ktmagnetgeneratorplugin.desktop
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%files -n libktcore12
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libktcore.so.12*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
|
37
ktupnptest.1
Normal file
37
ktupnptest.1
Normal file
@ -0,0 +1,37 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
|
||||
.TH KTUPNPTEST: "1" "December 2010" "Qt: 4.7.1" "UPnP test application"
|
||||
.SH NAME
|
||||
ktupnptest: \- KTorrent's UPnP test application
|
||||
.SH SYNOPSIS
|
||||
.B ktupnptest
|
||||
[\fIQt-options\fR] [\fIKDE-options\fR]
|
||||
.SH DESCRIPTION
|
||||
KTorrent's UPnP test application
|
||||
.SS "Generic options:"
|
||||
.TP
|
||||
\fB\-\-help\fR
|
||||
Show help about options
|
||||
.TP
|
||||
\fB\-\-help\-qt\fR
|
||||
Show Qt specific options
|
||||
.TP
|
||||
\fB\-\-help\-kde\fR
|
||||
Show KDE specific options
|
||||
.TP
|
||||
\fB\-\-help\-all\fR
|
||||
Show all options
|
||||
.TP
|
||||
\fB\-\-author\fR
|
||||
Show author information
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
Show version information
|
||||
.TP
|
||||
\fB\-\-license\fR
|
||||
Show license information
|
||||
.TP
|
||||
\fB\-\-\fR
|
||||
End of options
|
||||
.PP
|
||||
KDE Development Platform: 4.5.85 (4.6 Beta2)
|
||||
KTUPnPTest: 1.0
|
@ -1,196 +0,0 @@
|
||||
--- ktorrent/plugins/shutdown/CMakeLists.txt 2010-11-22 20:02:36.398000084 +0100
|
||||
+++ ktorrent/plugins/shutdown/CMakeLists.txt 2010-12-09 12:24:55.081000011 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
ktshutdownplugin
|
||||
ktcore
|
||||
${LIBKTORRENT_LIBRARIES}
|
||||
- solidcontrol
|
||||
+ ${KDE4_SOLID_LIBS}
|
||||
kworkspace
|
||||
${KDE4_KPARTS_LIBS}
|
||||
)
|
||||
--- ktorrent/plugins/shutdown/shutdowndlg.cpp 2010-11-22 20:02:36.398000084 +0100
|
||||
+++ ktorrent/plugins/shutdown/shutdowndlg.cpp 2010-12-09 13:40:06.532000009 +0100
|
||||
@@ -17,7 +17,12 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
+#include <kdeversion.h>
|
||||
+#if KDE_IS_VERSION(4,5,82)
|
||||
+#include <solid/powermanagement.h>
|
||||
+#else
|
||||
#include <solid/control/powermanager.h>
|
||||
+#endif
|
||||
#include "shutdowndlg.h"
|
||||
#include "shutdowntorrentmodel.h"
|
||||
|
||||
@@ -31,16 +36,27 @@
|
||||
|
||||
m_action->addItem(KIcon("system-shutdown"),i18n("Shutdown"));
|
||||
m_action->addItem(KIcon("system-lock-screen"),i18n("Lock"));
|
||||
- Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
|
||||
- if (spdMethods & Solid::Control::PowerManager::Standby)
|
||||
+#if KDE_IS_VERSION(4,5,82)
|
||||
+ QSet<Solid::PowerManagement::SleepState> spdMethods = Solid::PowerManagement::supportedSleepStates();
|
||||
+ if (spdMethods.contains(Solid::PowerManagement::StandbyState))
|
||||
m_action->addItem(KIcon("system-suspend"),i18n("Standby"));
|
||||
|
||||
- if (spdMethods & Solid::Control::PowerManager::ToRam)
|
||||
+ if (spdMethods.contains(Solid::PowerManagement::SuspendState))
|
||||
m_action->addItem(KIcon("system-suspend"),i18n("Sleep (suspend to RAM)"));
|
||||
|
||||
- if (spdMethods & Solid::Control::PowerManager::ToDisk)
|
||||
+ if (spdMethods.contains(Solid::PowerManagement::HibernateState))
|
||||
m_action->addItem(KIcon("system-suspend-hibernate"),i18n("Hibernate (suspend to disk)"));
|
||||
-
|
||||
+#else
|
||||
+ Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
|
||||
+ if (spdMethods & Solid::Control::PowerManager::Standby)
|
||||
+ m_action->addItem(KIcon("system-suspend"),i18n("Standby"));
|
||||
+
|
||||
+ if (spdMethods & Solid::Control::PowerManager::ToRam)
|
||||
+ m_action->addItem(KIcon("system-suspend"),i18n("Sleep (suspend to RAM)"));
|
||||
+
|
||||
+ if (spdMethods & Solid::Control::PowerManager::ToDisk)
|
||||
+ m_action->addItem(KIcon("system-suspend-hibernate"),i18n("Hibernate (suspend to disk)"));
|
||||
+#endif
|
||||
m_time_to_execute->addItem(i18n("When all torrents finish downloading"));
|
||||
m_time_to_execute->addItem(i18n("When all torrents finish seeding"));
|
||||
m_time_to_execute->addItem(i18n("When the events below happen"));
|
||||
@@ -104,16 +120,27 @@
|
||||
int stand_by = -1;
|
||||
int suspend_to_ram = -1;
|
||||
int suspend_to_disk = -1;
|
||||
- Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
|
||||
- if (spdMethods & Solid::Control::PowerManager::Standby)
|
||||
+#if KDE_IS_VERSION(4,5,82)
|
||||
+ QSet<Solid::PowerManagement::SleepState> spdMethods = Solid::PowerManagement::supportedSleepStates();
|
||||
+ if (spdMethods.contains(Solid::PowerManagement::StandbyState))
|
||||
stand_by = next++;
|
||||
|
||||
- if (spdMethods & Solid::Control::PowerManager::ToRam)
|
||||
+ if (spdMethods.contains(Solid::PowerManagement::SuspendState))
|
||||
suspend_to_ram = next++;
|
||||
|
||||
- if (spdMethods & Solid::Control::PowerManager::ToDisk)
|
||||
+ if (spdMethods.contains(Solid::PowerManagement::HibernateState))
|
||||
suspend_to_disk = next++;
|
||||
-
|
||||
+#else
|
||||
+ Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
|
||||
+ if (spdMethods & Solid::Control::PowerManager::Standby)
|
||||
+ stand_by = next++;
|
||||
+
|
||||
+ if (spdMethods & Solid::Control::PowerManager::ToRam)
|
||||
+ suspend_to_ram = next++;
|
||||
+
|
||||
+ if (spdMethods & Solid::Control::PowerManager::ToDisk)
|
||||
+ suspend_to_disk = next++;
|
||||
+#endif
|
||||
if (idx == 0)
|
||||
return SHUTDOWN;
|
||||
else if (idx == 1)
|
||||
@@ -134,15 +161,27 @@
|
||||
int stand_by = -1;
|
||||
int suspend_to_ram = -1;
|
||||
int suspend_to_disk = -1;
|
||||
- Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
|
||||
- if (spdMethods & Solid::Control::PowerManager::Standby)
|
||||
+#if KDE_IS_VERSION(4,5,82)
|
||||
+ QSet<Solid::PowerManagement::SleepState> spdMethods = Solid::PowerManagement::supportedSleepStates();
|
||||
+ if (spdMethods.contains(Solid::PowerManagement::StandbyState))
|
||||
stand_by = next++;
|
||||
|
||||
- if (spdMethods & Solid::Control::PowerManager::ToRam)
|
||||
+ if (spdMethods.contains(Solid::PowerManagement::SuspendState))
|
||||
suspend_to_ram = next++;
|
||||
|
||||
- if (spdMethods & Solid::Control::PowerManager::ToDisk)
|
||||
+ if (spdMethods.contains(Solid::PowerManagement::HibernateState))
|
||||
suspend_to_disk = next++;
|
||||
+#else
|
||||
+ Solid::Control::PowerManager::SuspendMethods spdMethods = Solid::Control::PowerManager::supportedSuspendMethods();
|
||||
+ if (spdMethods & Solid::Control::PowerManager::Standby)
|
||||
+ stand_by = next++;
|
||||
+
|
||||
+ if (spdMethods & Solid::Control::PowerManager::ToRam)
|
||||
+ suspend_to_ram = next++;
|
||||
+
|
||||
+ if (spdMethods & Solid::Control::PowerManager::ToDisk)
|
||||
+ suspend_to_disk = next++;
|
||||
+#endif
|
||||
|
||||
switch (act)
|
||||
{
|
||||
--- ktorrent/plugins/shutdown/shutdownplugin.cpp 2010-11-22 20:02:36.398000084 +0100
|
||||
+++ ktorrent/plugins/shutdown/shutdownplugin.cpp 2010-12-09 13:43:57.147000010 +0100
|
||||
@@ -17,13 +17,18 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
+#include <kdeversion.h>
|
||||
#include <kjob.h>
|
||||
#include <kgenericfactory.h>
|
||||
#include <kworkspace.h>
|
||||
#include <ktoggleaction.h>
|
||||
#include <kactioncollection.h>
|
||||
#include <kmessagebox.h>
|
||||
+#if KDE_IS_VERSION(4,5,82)
|
||||
+#include <solid/powermanagement.h>
|
||||
+#else
|
||||
#include <solid/control/powermanager.h>
|
||||
+#endif
|
||||
#include <util/log.h>
|
||||
#include <interfaces/functions.h>
|
||||
#include "shutdownplugin.h"
|
||||
@@ -100,28 +105,41 @@
|
||||
void ShutdownPlugin::suspendToDisk()
|
||||
{
|
||||
Out(SYS_GEN|LOG_NOTICE) << "Suspending to disk ..." << endl;
|
||||
+#if KDE_IS_VERSION(4,5,82)
|
||||
+ Solid::PowerManagement::requestSleep(Solid::PowerManagement::HibernateState,0,0);
|
||||
+#else
|
||||
Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::ToDisk;
|
||||
KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
|
||||
if (job != 0)
|
||||
- job->start();
|
||||
+ job->start();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void ShutdownPlugin::suspendToRam()
|
||||
{
|
||||
Out(SYS_GEN|LOG_NOTICE) << "Suspending to RAM ..." << endl;
|
||||
- Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::ToRam;
|
||||
- KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
|
||||
- if (job != 0)
|
||||
- job->start();
|
||||
+#if KDE_IS_VERSION(4,5,82)
|
||||
+ Solid::PowerManagement::requestSleep(Solid::PowerManagement::SuspendState,0,0);
|
||||
+#else
|
||||
+ Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::ToRam;
|
||||
+ KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
|
||||
+ if (job != 0)
|
||||
+ job->start();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void ShutdownPlugin::standby()
|
||||
{
|
||||
Out(SYS_GEN|LOG_NOTICE) << "Suspending to standby ..." << endl;
|
||||
- Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::Standby;
|
||||
- KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
|
||||
- if (job != 0)
|
||||
- job->start();
|
||||
+#if KDE_IS_VERSION(4,5,82)
|
||||
+ Solid::PowerManagement::requestSleep(Solid::PowerManagement::StandbyState,0,0);
|
||||
+#else
|
||||
+ Solid::Control::PowerManager::SuspendMethod spdMethod = Solid::Control::PowerManager::Standby;
|
||||
+ KJob *job = Solid::Control::PowerManager::suspend(spdMethod);
|
||||
+ if (job != 0)
|
||||
+ job->start();
|
||||
+#endif
|
||||
+
|
||||
}
|
||||
|
||||
void ShutdownPlugin::shutdownToggled(bool on)
|
Loading…
x
Reference in New Issue
Block a user