Skip to content

Commit

Permalink
🐛 deepin-file-manager: a couple of typo
Browse files Browse the repository at this point in the history
Signed-off-by: 1dot75cm <sensor.wen@gmail.com>
  • Loading branch information
1dot75cm committed Sep 4, 2017
1 parent 3d4e515 commit a9f6b85
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
Expand Up @@ -220,7 +220,7 @@ index 0000000..4b7fbd0
+isEqual(IS_PLATFORM_FEDORA, YES){
+
+}else{
+ DEFINES += SUPPORT_FFMEPG
+ DEFINES += SUPPORT_FFMPEG
+ LIBS += -lffmpegthumbnailer
+}

Expand All @@ -232,7 +232,7 @@ index 0000000..4b7fbd0
//load temlate
m_settings = Dtk::Core::DSettings::fromJsonFile(":/configure/global-setting-template-pro.json").data();
#else
+#ifndef SUPPORT_FFMEPG
+#ifndef SUPPORT_FFMPEG
+ m_settings = Dtk::Core::DSettings::fromJsonFile(":/configure/global-setting-template-fedora.json").data();
+#else
m_settings = Dtk::Core::DSettings::fromJsonFile(":/configure/global-setting-template.json").data();
Expand All @@ -247,7 +247,7 @@ index 0000000..4b7fbd0
#include <poppler-page-renderer.h>

// ffmpeg
+#ifdef SUPPORT_FFMEPG
+#ifdef SUPPORT_FFMPEG
#include <libffmpegthumbnailer/videothumbnailer.h>
+#endif

Expand All @@ -259,7 +259,7 @@ index 0000000..4b7fbd0
*image = img.scaled(QSize(size,size), Qt::KeepAspectRatio, Qt::SmoothTransformation);
- } else if (mime.name().startsWith("video/")) {
+ }
+#ifdef SUPPORT_FFMEPG
+#ifdef SUPPORT_FFMPEG
+ else if (mime.name().startsWith("video/")) {
//video
//FIXME(zccrs): This should be done using the image plugin?
Expand All @@ -281,7 +281,7 @@ index 0000000..4b7fbd0
#include <poppler-page-renderer.h>

// ffmpeg
+#ifdef SUPPORT_FFMEPG
+#ifdef SUPPORT_FFMPEG
#include "libffmpegthumbnailer/videothumbnailer.h"
+using namespace ffmpegthumbnailer;
+#endif
Expand All @@ -298,7 +298,7 @@ index 0000000..4b7fbd0
pixmap = getTextplainThumbnail(fPath, size);
if(isPDFFile(fPath))
pixmap = getPDFThumbnail(fPath, size);
+#ifdef SUPPORT_FFMEPG
+#ifdef SUPPORT_FFMPEG
if(isVideoFile(fPath))
pixmap = getVideoThumbnail(fPath, size);
+#endif
Expand Down
24 changes: 22 additions & 2 deletions rpms/deepin_project/deepin-file-manager.spec
Expand Up @@ -7,8 +7,9 @@ Summary: Deepin File Manager
License: GPLv3
URL: https://github.com/linuxdeepin/dde-file-manager
Source0: %{url}/archive/%{version}/%{repo}-%{version}.tar.gz
Patch0: %{name}-diable_ffmpeg.patch
Patch0: %{name}-disable_ffmpeg.patch

BuildRequires: desktop-file-utils
BuildRequires: deepin-gettext-tools
BuildRequires: deepin-dock-devel
BuildRequires: file-devel
Expand All @@ -32,14 +33,14 @@ BuildRequires: qt5-linguist

# run command by QProcess
Requires: deepin-shortcut-viewer
Requires: deepin-manual
Requires: deepin-terminal
Requires: deepin-desktop
Requires: file-roller
Requires: gvfs-client
Requires: samba
Requires: xdg-user-dirs
Requires: gstreamer-plugins-good
Recommends: deepin-manual

%description
File manager front end of Deepin OS.
Expand Down Expand Up @@ -83,6 +84,11 @@ sed -i 's|%{_datadir}|%{_libdir}|' dde-sharefiles/appbase.pri
%install
%make_install INSTALL_ROOT=%{buildroot}

%check
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{repo}.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/dde-computer.desktop ||:
desktop-file-validate %{buildroot}/%{_datadir}/applications/dde-trash.desktop ||:

%post
/sbin/ldconfig
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null ||:
Expand Down Expand Up @@ -119,9 +125,15 @@ fi
%{_bindir}/usb-device-formatter
%{_bindir}/usb-device-formatter-pkexec
%{_libdir}/lib%{repo}.so.*
%dir %{_libdir}/dde-dock
%dir %{_libdir}/dde-dock/plugins
%{_libdir}/dde-dock/plugins/*.so
%{_libdir}/%{repo}/plugins/previews/*.so
%dir %{_datadir}/%{repo}
%dir %{_datadir}/%{repo}/plugins
%dir %{_datadir}/%{repo}/plugins/previews
%{_datadir}/%{repo}/
%dir %{_datadir}/dman/%{repo}
%{_datadir}/dman/%{repo}/
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%{_datadir}/applications/%{repo}.desktop
Expand All @@ -130,15 +142,21 @@ fi
%{_datadir}/dbus-1/services/com.deepin.filemanager.filedialog.service
%{_datadir}/dbus-1/services/org.freedesktop.FileManager.service
%{_datadir}/dbus-1/system-services/com.deepin.filemanager.daemon.service
%dir %{_datadir}/usb-device-formatter
%dir %{_datadir}/usb-device-formatter/translations
%{_datadir}/usb-device-formatter/translations/*.qm
%{_polkit_qt_policydir}/com.deepin.filemanager.daemon.policy
%{_polkit_qt_policydir}/com.deepin.pkexec.dde-file-manager.policy
%{_polkit_qt_policydir}/com.deepin.pkexec.usb-device-formatter.policy

%files devel
%dir %{_includedir}/%{repo}
%{_includedir}/%{repo}/*.h
%dir %{_includedir}/%{repo}/gvfs
%{_includedir}/%{repo}/gvfs/*.h
%dir %{_includedir}/%{repo}/%{repo}-plugins
%{_includedir}/%{repo}/%{repo}-plugins/*.h
%dir %{_includedir}/%{repo}/private
%{_includedir}/%{repo}/private/*.h
%{_libdir}/pkgconfig/%{repo}.pc
%{_libdir}/lib%{repo}.so
Expand All @@ -147,6 +165,8 @@ fi
%{_bindir}/dde-desktop
%{_datadir}/applications/dde-computer.desktop
%{_datadir}/applications/dde-trash.desktop
%dir %{_datadir}/dde-desktop
%dir %{_datadir}/dde-desktop/translations
%{_datadir}/dde-desktop/translations/*.qm
%{_datadir}/dbus-1/services/com.deepin.dde.desktop.service

Expand Down

0 comments on commit a9f6b85

Please sign in to comment.