From fc9a3ecd52d39717c0c8a5a5776ea04fe8f5969f10617c2bfd0f62534f9baa0a Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 31 Jul 2009 17:55:02 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/k3b?expand=0&rev=4 --- k3b.changes | 5 + k3b.spec | 17 +- trunk.diff | 3219 +++++++++++++++++++++++++++++++++++++++------------ 3 files changed, 2500 insertions(+), 741 deletions(-) diff --git a/k3b.changes b/k3b.changes index 03a59a3..1a415aa 100644 --- a/k3b.changes +++ b/k3b.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 30 12:16:20 CEST 2009 - beineri@opensuse.org + +- apply trunk diff (r1004480) when building on 11.2 + ------------------------------------------------------------------- Thu Jul 23 12:59:15 CEST 2009 - beineri@opensuse.org diff --git a/k3b.spec b/k3b.spec index 66006a9..cd9ee8f 100644 --- a/k3b.spec +++ b/k3b.spec @@ -1,5 +1,5 @@ # -# spec file for package k3b (Version 1.66.0) +# spec file for package k3b (Version 1.66.0.svn1004480) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -41,8 +41,9 @@ License: GPL v2 or later Group: Productivity/Multimedia/CD/Record Summary: A Universal CD and DVD Burning Application Requires: /usr/bin/cdrecord /usr/bin/mkisofs /usr/bin/cdrdao dvd+rw-tools -Version: 1.66.0 -Release: 2 +Version: 1.66.0.svn1004480 +Release: 1 +%define rversion 1.66.0 # svn.kde.org/home/kde/trunk/extragear/multimedia/k3b Source0: k3b-1.66.0alpha2.tar.bz2 Patch1: trunk.diff @@ -82,12 +83,12 @@ Authors: Thomas Froescher %prep -%setup -q -n k3b-%{version} -%if %suse_version > 1110 +%setup -q -n k3b-%{rversion} +#%if %suse_version > 1110 %patch1 -%else -%patch2 -%endif +#%else +#%patch2 +#%endif %build %cmake_kde4 -d build -- -DK3B_BUILD_K3BSETUP=OFF diff --git a/trunk.diff b/trunk.diff index c84c3c7..c872404 100644 --- a/trunk.diff +++ b/trunk.diff @@ -1,6 +1,5 @@ -diff -ru CMakeLists.txt CMakeLists.txt ---- CMakeLists.txt 2009-05-26 20:43:38.000000000 +0200 -+++ CMakeLists.txt 2009-07-23 11:42:06.000000000 +0200 +--- CMakeLists.txt ++++ CMakeLists.txt @@ -6,7 +6,7 @@ ################## K3b version ################################ @@ -10,9 +9,8 @@ diff -ru CMakeLists.txt CMakeLists.txt set(K3B_VERSION_RELEASE 0) set(K3B_VERSION_STRING "${K3B_VERSION_MAJOR}.${K3B_VERSION_MINOR}.${K3B_VERSION_RELEASE}") -diff -ru k3bsetup/k3bsetup.desktop k3bsetup/k3bsetup.desktop ---- k3bsetup/k3bsetup.desktop 2009-05-26 16:22:58.000000000 +0200 -+++ k3bsetup/k3bsetup.desktop 2009-07-23 11:42:05.000000000 +0200 +--- k3bsetup/k3bsetup.desktop ++++ k3bsetup/k3bsetup.desktop @@ -1,12 +1,16 @@ [Desktop Entry] Encoding=UTF-8 @@ -61,9 +59,8 @@ diff -ru k3bsetup/k3bsetup.desktop k3bsetup/k3bsetup.desktop GenericName[x-test]=xxCD & DVD Burning Setupxx GenericName[zh_CN]=CD & DVD 刻录程序设置 +GenericName[zh_TW]=CD 與 DVD 燒錄設定 -diff -ru kioslaves/videodvd/videodvd.desktop kioslaves/videodvd/videodvd.desktop ---- kioslaves/videodvd/videodvd.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ kioslaves/videodvd/videodvd.desktop 2009-07-23 11:42:06.000000000 +0200 +--- kioslaves/videodvd/videodvd.desktop ++++ kioslaves/videodvd/videodvd.desktop @@ -4,7 +4,7 @@ URL=videodvd:/ Icon=dvd_unmount @@ -89,9 +86,8 @@ diff -ru kioslaves/videodvd/videodvd.desktop kioslaves/videodvd/videodvd.desktop Open=false X-KDE-TreeModule=Directory X-KDE-KonqSidebarModule=konqsidebar_tree -diff -ru kioslaves/videodvd/videodvd.protocol kioslaves/videodvd/videodvd.protocol ---- kioslaves/videodvd/videodvd.protocol 2009-05-03 15:17:04.000000000 +0200 -+++ kioslaves/videodvd/videodvd.protocol 2009-07-23 11:42:06.000000000 +0200 +--- kioslaves/videodvd/videodvd.protocol ++++ kioslaves/videodvd/videodvd.protocol @@ -25,6 +25,7 @@ Description[gl]=Un kioslave que permite copiar ficheiros desde un DVD de vídeo (incluindo a decifraxe) Description[he]=עבד קלט/פלט של KDE המאפשר לקבצים להיות מועתקים מתקליטור וידאו של DVD (כולל פענוח) @@ -105,60 +101,8 @@ diff -ru kioslaves/videodvd/videodvd.protocol kioslaves/videodvd/videodvd.protoc Description[x-test]=xxA kioslave that allows files to be copied from a Video DVD (including decryption)xx Description[zh_CN]=允许从视频 DVD(包括加密影碟)中复制文件的 kioslave +Description[zh_TW]=允許檔案從影像 DVD 中(解壓並)複製出來的 kioslave -diff -ru libk3b/core/k3bglobals.cpp libk3b/core/k3bglobals.cpp ---- libk3b/core/k3bglobals.cpp 2009-05-27 11:58:34.000000000 +0200 -+++ libk3b/core/k3bglobals.cpp 2009-07-23 11:41:53.000000000 +0200 -@@ -34,7 +34,17 @@ - #include - #include - #include -+#if KDE_IS_VERSION(4,2,0) - #include -+#else -+#include -+#ifdef HAVE_SYS_STATVFS_H -+# include -+#endif -+#ifdef HAVE_SYS_VFS_H -+# include -+#endif -+#endif - - #include - #include -@@ -210,6 +220,7 @@ - - bool K3b::kbFreeOnFs( const QString& path, unsigned long& size, unsigned long& avail ) - { -+#if KDE_IS_VERSION(4,2,0) - KDiskFreeSpaceInfo fs = KDiskFreeSpaceInfo::freeSpaceInfo( path ); - if ( fs.isValid() ) { - size = fs.size()/1024; -@@ -219,6 +230,21 @@ - else { - return false; - } -+#else -+#ifdef HAVE_SYS_STATVFS_H -+ struct statvfs fs; -+ if( ::statvfs( QFile::encodeName(path), &fs ) == 0 ) { -+ unsigned long kBfak = fs.f_frsize/1024; -+ -+ size = fs.f_blocks*kBfak; -+ avail = fs.f_bavail*kBfak; -+ -+ return true; -+ } -+ else -+#endif -+ return false; -+#endif - } - - -diff -ru libk3b/core/k3bthreadjobcommunicationevent.cpp libk3b/core/k3bthreadjobcommunicationevent.cpp ---- libk3b/core/k3bthreadjobcommunicationevent.cpp 2009-03-23 09:47:00.000000000 +0100 -+++ libk3b/core/k3bthreadjobcommunicationevent.cpp 2009-07-23 11:41:53.000000000 +0200 +--- libk3b/core/k3bthreadjobcommunicationevent.cpp ++++ libk3b/core/k3bthreadjobcommunicationevent.cpp @@ -16,11 +16,8 @@ #include @@ -337,9 +281,8 @@ diff -ru libk3b/core/k3bthreadjobcommunicationevent.cpp libk3b/core/k3bthreadjob + event->m_data->m_caption = caption; return event; } -diff -ru libk3b/core/k3bthreadjobcommunicationevent.h libk3b/core/k3bthreadjobcommunicationevent.h ---- libk3b/core/k3bthreadjobcommunicationevent.h 2009-03-23 09:47:00.000000000 +0100 -+++ libk3b/core/k3bthreadjobcommunicationevent.h 2009-07-23 11:41:53.000000000 +0200 +--- libk3b/core/k3bthreadjobcommunicationevent.h ++++ libk3b/core/k3bthreadjobcommunicationevent.h @@ -42,29 +42,55 @@ int type() const; @@ -434,9 +377,8 @@ diff -ru libk3b/core/k3bthreadjobcommunicationevent.h libk3b/core/k3bthreadjobco }; } -diff -ru libk3b/core/k3bthreadjob.cpp libk3b/core/k3bthreadjob.cpp ---- libk3b/core/k3bthreadjob.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/core/k3bthreadjob.cpp 2009-07-23 11:41:53.000000000 +0200 +--- libk3b/core/k3bthreadjob.cpp ++++ libk3b/core/k3bthreadjob.cpp @@ -20,6 +20,8 @@ #include #include @@ -522,9 +464,8 @@ diff -ru libk3b/core/k3bthreadjob.cpp libk3b/core/k3bthreadjob.cpp } } -diff -ru libk3b/plugin/k3bplugin.desktop libk3b/plugin/k3bplugin.desktop ---- libk3b/plugin/k3bplugin.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ libk3b/plugin/k3bplugin.desktop 2009-07-23 11:41:57.000000000 +0200 +--- libk3b/plugin/k3bplugin.desktop ++++ libk3b/plugin/k3bplugin.desktop @@ -2,7 +2,6 @@ Type=ServiceType X-KDE-ServiceType=K3b/Plugin @@ -538,9 +479,8 @@ diff -ru libk3b/plugin/k3bplugin.desktop libk3b/plugin/k3bplugin.desktop Name[x-test]=xxK3b Pluginxx Name[zh_CN]=k3b 插件 +Name[zh_TW]=K3b 外掛程式 -diff -ru libk3b/plugin/k3bprojectplugin.cpp libk3b/plugin/k3bprojectplugin.cpp ---- libk3b/plugin/k3bprojectplugin.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/plugin/k3bprojectplugin.cpp 2009-07-23 11:41:57.000000000 +0200 +--- libk3b/plugin/k3bprojectplugin.cpp ++++ libk3b/plugin/k3bprojectplugin.cpp @@ -13,7 +13,7 @@ */ #include "k3bprojectplugin.h" @@ -550,9 +490,8 @@ diff -ru libk3b/plugin/k3bprojectplugin.cpp libk3b/plugin/k3bprojectplugin.cpp : K3b::Plugin( parent ), m_type(type), m_hasGUI(gui) -diff -ru libk3b/plugin/k3bprojectplugin.h libk3b/plugin/k3bprojectplugin.h ---- libk3b/plugin/k3bprojectplugin.h 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/plugin/k3bprojectplugin.h 2009-07-23 11:41:57.000000000 +0200 +--- libk3b/plugin/k3bprojectplugin.h ++++ libk3b/plugin/k3bprojectplugin.h @@ -15,14 +15,16 @@ #ifndef _K3B_PROJECT_PLUGIN_H_ #define _K3B_PROJECT_PLUGIN_H_ @@ -632,9 +571,8 @@ diff -ru libk3b/plugin/k3bprojectplugin.h libk3b/plugin/k3bprojectplugin.h +Q_DECLARE_OPERATORS_FOR_FLAGS( K3b::ProjectPlugin::Type ) #endif -diff -ru libk3b/projects/audiocd/k3baudiodoc.cpp libk3b/projects/audiocd/k3baudiodoc.cpp ---- libk3b/projects/audiocd/k3baudiodoc.cpp 2009-04-15 11:34:06.000000000 +0200 -+++ libk3b/projects/audiocd/k3baudiodoc.cpp 2009-07-23 11:41:55.000000000 +0200 +--- libk3b/projects/audiocd/k3baudiodoc.cpp ++++ libk3b/projects/audiocd/k3baudiodoc.cpp @@ -26,29 +26,21 @@ #include "k3bcore.h" #include "k3baudiodecoder.h" @@ -700,9 +638,8 @@ diff -ru libk3b/projects/audiocd/k3baudiodoc.cpp libk3b/projects/audiocd/k3baudi bool K3b::AudioDoc::loadDocumentData( QDomElement* root ) { newDocument(); -diff -ru libk3b/projects/audiocd/k3baudiodoc.h libk3b/projects/audiocd/k3baudiodoc.h ---- libk3b/projects/audiocd/k3baudiodoc.h 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/audiocd/k3baudiodoc.h 2009-07-23 11:41:55.000000000 +0200 +--- libk3b/projects/audiocd/k3baudiodoc.h ++++ libk3b/projects/audiocd/k3baudiodoc.h @@ -18,16 +18,10 @@ #define K3BAUDIODOC_H @@ -739,9 +676,8 @@ diff -ru libk3b/projects/audiocd/k3baudiodoc.h libk3b/projects/audiocd/k3baudiod private: // the stuff for adding files // --------------------------------------------------------- -diff -ru libk3b/projects/datacd/k3bdatadoc.cpp libk3b/projects/datacd/k3bdatadoc.cpp ---- libk3b/projects/datacd/k3bdatadoc.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/datacd/k3bdatadoc.cpp 2009-07-23 11:41:54.000000000 +0200 +--- libk3b/projects/datacd/k3bdatadoc.cpp ++++ libk3b/projects/datacd/k3bdatadoc.cpp @@ -34,25 +34,21 @@ #include "k3bvalidators.h" #include "k3bglobalsettings.h" @@ -796,9 +732,8 @@ diff -ru libk3b/projects/datacd/k3bdatadoc.cpp libk3b/projects/datacd/k3bdatadoc bool K3b::DataDoc::loadDocumentData( QDomElement* rootElem ) { if( !root() ) -diff -ru libk3b/projects/datacd/k3bdatadoc.h libk3b/projects/datacd/k3bdatadoc.h ---- libk3b/projects/datacd/k3bdatadoc.h 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/datacd/k3bdatadoc.h 2009-07-23 11:41:54.000000000 +0200 +--- libk3b/projects/datacd/k3bdatadoc.h ++++ libk3b/projects/datacd/k3bdatadoc.h @@ -18,20 +18,16 @@ #include "k3bdoc.h" @@ -833,9 +768,8 @@ diff -ru libk3b/projects/datacd/k3bdatadoc.h libk3b/projects/datacd/k3bdatadoc.h virtual QString name() const; -diff -ru libk3b/projects/datacd/k3bdatajob.cpp libk3b/projects/datacd/k3bdatajob.cpp ---- libk3b/projects/datacd/k3bdatajob.cpp 2009-05-27 11:58:34.000000000 +0200 -+++ libk3b/projects/datacd/k3bdatajob.cpp 2009-07-23 11:41:54.000000000 +0200 +--- libk3b/projects/datacd/k3bdatajob.cpp ++++ libk3b/projects/datacd/k3bdatajob.cpp @@ -406,18 +406,24 @@ jobFinished( false ); } @@ -1017,9 +951,8 @@ diff -ru libk3b/projects/datacd/k3bdatajob.cpp libk3b/projects/datacd/k3bdatajob } } } -diff -ru libk3b/projects/datacd/k3bdatajob.h libk3b/projects/datacd/k3bdatajob.h ---- libk3b/projects/datacd/k3bdatajob.h 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/datacd/k3bdatajob.h 2009-07-23 11:41:54.000000000 +0200 +--- libk3b/projects/datacd/k3bdatajob.h ++++ libk3b/projects/datacd/k3bdatajob.h @@ -106,6 +106,7 @@ bool setupCdrdaoJob(); bool setupGrowisofsJob(); @@ -1028,9 +961,8 @@ diff -ru libk3b/projects/datacd/k3bdatajob.h libk3b/projects/datacd/k3bdatajob.h class Private; Private* d; -diff -ru libk3b/projects/datacd/k3bdatamultisessionparameterjob.cpp libk3b/projects/datacd/k3bdatamultisessionparameterjob.cpp ---- libk3b/projects/datacd/k3bdatamultisessionparameterjob.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/datacd/k3bdatamultisessionparameterjob.cpp 2009-07-23 11:41:54.000000000 +0200 +--- libk3b/projects/datacd/k3bdatamultisessionparameterjob.cpp ++++ libk3b/projects/datacd/k3bdatamultisessionparameterjob.cpp @@ -200,15 +200,13 @@ // 2. Special case for the 4GB boundary which seems to be enforced by a linux kernel issue // @@ -1050,9 +982,8 @@ diff -ru libk3b/projects/datacd/k3bdatamultisessionparameterjob.cpp libk3b/proje return K3b::DataDoc::NONE; } else { -diff -ru libk3b/projects/datacd/k3bdatapreparationjob.cpp libk3b/projects/datacd/k3bdatapreparationjob.cpp ---- libk3b/projects/datacd/k3bdatapreparationjob.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/datacd/k3bdatapreparationjob.cpp 2009-07-23 11:41:54.000000000 +0200 +--- libk3b/projects/datacd/k3bdatapreparationjob.cpp ++++ libk3b/projects/datacd/k3bdatapreparationjob.cpp @@ -26,6 +26,7 @@ #include @@ -1061,9 +992,8 @@ diff -ru libk3b/projects/datacd/k3bdatapreparationjob.cpp libk3b/projects/datacd #include namespace { -diff -ru libk3b/projects/datacd/k3bisoimager.cpp libk3b/projects/datacd/k3bisoimager.cpp ---- libk3b/projects/datacd/k3bisoimager.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/datacd/k3bisoimager.cpp 2009-07-23 11:41:54.000000000 +0200 +--- libk3b/projects/datacd/k3bisoimager.cpp ++++ libk3b/projects/datacd/k3bisoimager.cpp @@ -131,6 +131,8 @@ { kDebug(); @@ -1091,9 +1021,8 @@ diff -ru libk3b/projects/datacd/k3bisoimager.cpp libk3b/projects/datacd/k3bisoim jobFinished( false ); cleanup(); } -diff -ru libk3b/projects/k3bdoc.cpp libk3b/projects/k3bdoc.cpp ---- libk3b/projects/k3bdoc.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/k3bdoc.cpp 2009-07-23 11:41:56.000000000 +0200 +--- libk3b/projects/k3bdoc.cpp ++++ libk3b/projects/k3bdoc.cpp @@ -12,17 +12,6 @@ * See the file "COPYING" for the exact licensing terms. */ @@ -1126,9 +1055,8 @@ diff -ru libk3b/projects/k3bdoc.cpp libk3b/projects/k3bdoc.cpp K3b::Doc::Doc( QObject* parent ) : QObject( parent ), -diff -ru libk3b/projects/k3bdoc.h libk3b/projects/k3bdoc.h ---- libk3b/projects/k3bdoc.h 2009-03-21 23:36:06.000000000 +0100 -+++ libk3b/projects/k3bdoc.h 2009-07-23 11:41:56.000000000 +0200 +--- libk3b/projects/k3bdoc.h ++++ libk3b/projects/k3bdoc.h @@ -19,14 +19,12 @@ #include "config-k3b.h" #include "k3bglobals.h" @@ -1198,9 +1126,8 @@ diff -ru libk3b/projects/k3bdoc.h libk3b/projects/k3bdoc.h bool saveGeneralDocumentData( QDomElement* ); bool readGeneralDocumentData( const QDomElement& ); -diff -ru libk3b/projects/mixedcd/k3bmixeddoc.cpp libk3b/projects/mixedcd/k3bmixeddoc.cpp ---- libk3b/projects/mixedcd/k3bmixeddoc.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/mixedcd/k3bmixeddoc.cpp 2009-07-23 11:41:55.000000000 +0200 +--- libk3b/projects/mixedcd/k3bmixeddoc.cpp ++++ libk3b/projects/mixedcd/k3bmixeddoc.cpp @@ -14,19 +14,18 @@ #include "k3bmixeddoc.h" @@ -1227,9 +1154,8 @@ diff -ru libk3b/projects/mixedcd/k3bmixeddoc.cpp libk3b/projects/mixedcd/k3bmixe -diff -ru libk3b/projects/mixedcd/k3bmixeddoc.h libk3b/projects/mixedcd/k3bmixeddoc.h ---- libk3b/projects/mixedcd/k3bmixeddoc.h 2009-03-21 23:36:06.000000000 +0100 -+++ libk3b/projects/mixedcd/k3bmixeddoc.h 2009-07-23 11:41:55.000000000 +0200 +--- libk3b/projects/mixedcd/k3bmixeddoc.h ++++ libk3b/projects/mixedcd/k3bmixeddoc.h @@ -32,6 +32,9 @@ public: MixedDoc( QObject* parent = 0 ); @@ -1256,9 +1182,8 @@ diff -ru libk3b/projects/mixedcd/k3bmixeddoc.h libk3b/projects/mixedcd/k3bmixedd private: DataDoc* m_dataDoc; -diff -ru libk3b/projects/movixcd/k3bmovixdoc.cpp libk3b/projects/movixcd/k3bmovixdoc.cpp ---- libk3b/projects/movixcd/k3bmovixdoc.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/movixcd/k3bmovixdoc.cpp 2009-07-23 11:41:55.000000000 +0200 +--- libk3b/projects/movixcd/k3bmovixdoc.cpp ++++ libk3b/projects/movixcd/k3bmovixdoc.cpp @@ -17,21 +17,19 @@ #include "k3bmovixdoc.h" #include "k3bmovixjob.h" @@ -1303,9 +1228,8 @@ diff -ru libk3b/projects/movixcd/k3bmovixdoc.cpp libk3b/projects/movixcd/k3bmovi bool K3b::MovixDoc::newDocument() { m_loopPlaylist = 1; -diff -ru libk3b/projects/movixcd/k3bmovixdoc.h libk3b/projects/movixcd/k3bmovixdoc.h ---- libk3b/projects/movixcd/k3bmovixdoc.h 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/movixcd/k3bmovixdoc.h 2009-07-23 11:41:55.000000000 +0200 +--- libk3b/projects/movixcd/k3bmovixdoc.h ++++ libk3b/projects/movixcd/k3bmovixdoc.h @@ -17,10 +17,10 @@ #ifndef _K3B_MOVIX_DOC_H_ #define _K3B_MOVIX_DOC_H_ @@ -1330,9 +1254,8 @@ diff -ru libk3b/projects/movixcd/k3bmovixdoc.h libk3b/projects/movixcd/k3bmovixd bool newDocument(); -diff -ru libk3b/projects/videocd/k3bvcddoc.cpp libk3b/projects/videocd/k3bvcddoc.cpp ---- libk3b/projects/videocd/k3bvcddoc.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/videocd/k3bvcddoc.cpp 2009-07-23 11:41:56.000000000 +0200 +--- libk3b/projects/videocd/k3bvcddoc.cpp ++++ libk3b/projects/videocd/k3bvcddoc.cpp @@ -13,33 +13,28 @@ * See the file "COPYING" for the exact licensing terms. */ @@ -1404,9 +1327,8 @@ diff -ru libk3b/projects/videocd/k3bvcddoc.cpp libk3b/projects/videocd/k3bvcddoc K3b::BurnJob* K3b::VcdDoc::newBurnJob( K3b::JobHandler* hdl, QObject* parent ) { return new K3b::VcdJob( this, hdl, parent ); -diff -ru libk3b/projects/videocd/k3bvcddoc.h libk3b/projects/videocd/k3bvcddoc.h ---- libk3b/projects/videocd/k3bvcddoc.h 2009-03-21 23:36:06.000000000 +0100 -+++ libk3b/projects/videocd/k3bvcddoc.h 2009-07-23 11:41:56.000000000 +0200 +--- libk3b/projects/videocd/k3bvcddoc.h ++++ libk3b/projects/videocd/k3bvcddoc.h @@ -16,21 +16,13 @@ #ifndef K3BVCDDOC_H #define K3BVCDDOC_H @@ -1453,9 +1375,8 @@ diff -ru libk3b/projects/videocd/k3bvcddoc.h libk3b/projects/videocd/k3bvcddoc.h private: VcdTrack* createTrack( const KUrl& url ); void informAboutNotFoundFiles(); -diff -ru libk3b/projects/videodvd/k3bvideodvddoc.cpp libk3b/projects/videodvd/k3bvideodvddoc.cpp ---- libk3b/projects/videodvd/k3bvideodvddoc.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/videodvd/k3bvideodvddoc.cpp 2009-07-23 11:41:55.000000000 +0200 +--- libk3b/projects/videodvd/k3bvideodvddoc.cpp ++++ libk3b/projects/videodvd/k3bvideodvddoc.cpp @@ -15,12 +15,10 @@ #include "k3bvideodvddoc.h" @@ -1470,9 +1391,8 @@ diff -ru libk3b/projects/videodvd/k3bvideodvddoc.cpp libk3b/projects/videodvd/k3 K3b::VideoDvdDoc::VideoDvdDoc( QObject* parent ) -diff -ru libk3b/projects/videodvd/k3bvideodvddoc.h libk3b/projects/videodvd/k3bvideodvddoc.h ---- libk3b/projects/videodvd/k3bvideodvddoc.h 2009-04-21 19:54:02.000000000 +0200 -+++ libk3b/projects/videodvd/k3bvideodvddoc.h 2009-07-23 11:41:55.000000000 +0200 +--- libk3b/projects/videodvd/k3bvideodvddoc.h ++++ libk3b/projects/videodvd/k3bvideodvddoc.h @@ -25,7 +25,8 @@ VideoDvdDoc( QObject* parent = 0 ); virtual ~VideoDvdDoc(); @@ -1493,9 +1413,33 @@ diff -ru libk3b/projects/videodvd/k3bvideodvddoc.h libk3b/projects/videodvd/k3bv private: DirItem* m_videoTsDir; }; -diff -ru libk3b/tools/k3biso9660.cpp libk3b/tools/k3biso9660.cpp ---- libk3b/tools/k3biso9660.cpp 2009-04-22 12:40:45.000000000 +0200 -+++ libk3b/tools/k3biso9660.cpp 2009-07-23 11:41:53.000000000 +0200 +--- libk3b/tools/k3bcdparanoialib.cpp ++++ libk3b/tools/k3bcdparanoialib.cpp +@@ -22,7 +22,7 @@ + + #include + +-// TODO replace dlopen/dlsym/dlclose by platform independent QLibrary ++// TODO replace dlopen/dlsym/dlclose by platform independent QLibrary + #ifdef Q_OS_WIN32 + + #include +@@ -265,11 +265,11 @@ + + bool K3b::CdparanoiaLibData::paranoiaInit() + { +- mutex.lock(); +- + if( m_drive ) + paranoiaFree(); + ++ mutex.lock(); ++ + // since we use cdparanoia to open the device it is important to close + // the device here + m_device->close(); +--- libk3b/tools/k3biso9660.cpp ++++ libk3b/tools/k3biso9660.cpp @@ -618,6 +618,8 @@ else d->backend = new K3b::Iso9660DeviceBackend( d->cdDevice ); @@ -1505,9 +1449,8 @@ diff -ru libk3b/tools/k3biso9660.cpp libk3b/tools/k3biso9660.cpp } d->isOpen = d->backend->open(); -diff -ru libk3b/tools/k3bmediacache.cpp libk3b/tools/k3bmediacache.cpp ---- libk3b/tools/k3bmediacache.cpp 2009-05-27 11:58:34.000000000 +0200 -+++ libk3b/tools/k3bmediacache.cpp 2009-07-23 11:41:53.000000000 +0200 +--- libk3b/tools/k3bmediacache.cpp ++++ libk3b/tools/k3bmediacache.cpp @@ -75,24 +75,31 @@ emit checkingMedium( m_deviceEntry->medium.device(), QString() ); @@ -1658,9 +1601,8 @@ diff -ru libk3b/tools/k3bmediacache.cpp libk3b/tools/k3bmediacache.cpp } } -diff -ru libk3b/tools/k3bmediacache_p.h libk3b/tools/k3bmediacache_p.h ---- libk3b/tools/k3bmediacache_p.h 2009-02-23 00:22:53.000000000 +0100 -+++ libk3b/tools/k3bmediacache_p.h 2009-07-23 11:41:53.000000000 +0200 +--- libk3b/tools/k3bmediacache_p.h ++++ libk3b/tools/k3bmediacache_p.h @@ -28,7 +28,8 @@ int blockedId; @@ -1671,9 +1613,8 @@ diff -ru libk3b/tools/k3bmediacache_p.h libk3b/tools/k3bmediacache_p.h MediaCache::PollThread* thread; -diff -ru libk3b/tools/k3bmedium.cpp libk3b/tools/k3bmedium.cpp ---- libk3b/tools/k3bmedium.cpp 2009-04-30 01:12:43.000000000 +0200 -+++ libk3b/tools/k3bmedium.cpp 2009-07-23 11:41:53.000000000 +0200 +--- libk3b/tools/k3bmedium.cpp ++++ libk3b/tools/k3bmedium.cpp @@ -155,11 +155,14 @@ d->diskInfo = d->device->diskInfo(); @@ -1690,9 +1631,8 @@ diff -ru libk3b/tools/k3bmedium.cpp libk3b/tools/k3bmedium.cpp if( diskInfo().diskState() == K3b::Device::STATE_COMPLETE || diskInfo().diskState() == K3b::Device::STATE_INCOMPLETE ) { -diff -ru plugins/decoder/ffmpeg/CMakeLists.txt plugins/decoder/ffmpeg/CMakeLists.txt ---- plugins/decoder/ffmpeg/CMakeLists.txt 2008-09-27 08:33:36.000000000 +0200 -+++ plugins/decoder/ffmpeg/CMakeLists.txt 2009-07-23 11:41:58.000000000 +0200 +--- plugins/decoder/ffmpeg/CMakeLists.txt ++++ plugins/decoder/ffmpeg/CMakeLists.txt @@ -3,14 +3,14 @@ ########### next target ############### @@ -1714,9 +1654,8 @@ diff -ru plugins/decoder/ffmpeg/CMakeLists.txt plugins/decoder/ffmpeg/CMakeLists set(k3bffmpegdecoder_PART_SRCS k3bffmpegdecoder.cpp k3bffmpegwrapper.cpp ) -diff -ru plugins/decoder/ffmpeg/k3bffmpegdecoder.desktop plugins/decoder/ffmpeg/k3bffmpegdecoder.desktop ---- plugins/decoder/ffmpeg/k3bffmpegdecoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/decoder/ffmpeg/k3bffmpegdecoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/decoder/ffmpeg/k3bffmpegdecoder.desktop ++++ plugins/decoder/ffmpeg/k3bffmpegdecoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Descodificador FFMpeg para K3b Name[he]=מפענח FFMpeg של K3b @@ -1751,9 +1690,8 @@ diff -ru plugins/decoder/ffmpeg/k3bffmpegdecoder.desktop plugins/decoder/ffmpeg/ Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/decoder/flac/k3bflacdecoder.desktop plugins/decoder/flac/k3bflacdecoder.desktop ---- plugins/decoder/flac/k3bflacdecoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/decoder/flac/k3bflacdecoder.desktop 2009-07-23 11:41:59.000000000 +0200 +--- plugins/decoder/flac/k3bflacdecoder.desktop ++++ plugins/decoder/flac/k3bflacdecoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Descodificador FLAC para K3b Name[he]=מפענח FLAC של K3b @@ -1788,9 +1726,8 @@ diff -ru plugins/decoder/flac/k3bflacdecoder.desktop plugins/decoder/flac/k3bfla Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/decoder/libsndfile/k3blibsndfiledecoder.desktop plugins/decoder/libsndfile/k3blibsndfiledecoder.desktop ---- plugins/decoder/libsndfile/k3blibsndfiledecoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/decoder/libsndfile/k3blibsndfiledecoder.desktop 2009-07-23 11:41:59.000000000 +0200 +--- plugins/decoder/libsndfile/k3blibsndfiledecoder.desktop ++++ plugins/decoder/libsndfile/k3blibsndfiledecoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Descodificador Libsndfile para K3b Name[he]=מפענח libsndfile של K3b @@ -1825,9 +1762,8 @@ diff -ru plugins/decoder/libsndfile/k3blibsndfiledecoder.desktop plugins/decoder Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/decoder/mp3/k3bmaddecoder.desktop plugins/decoder/mp3/k3bmaddecoder.desktop ---- plugins/decoder/mp3/k3bmaddecoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/decoder/mp3/k3bmaddecoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/decoder/mp3/k3bmaddecoder.desktop ++++ plugins/decoder/mp3/k3bmaddecoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Descodificador MAD para K3b Name[he]=מפענח MAD של K3b @@ -1862,9 +1798,8 @@ diff -ru plugins/decoder/mp3/k3bmaddecoder.desktop plugins/decoder/mp3/k3bmaddec Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/decoder/musepack/k3bmpcdecoder.desktop plugins/decoder/musepack/k3bmpcdecoder.desktop ---- plugins/decoder/musepack/k3bmpcdecoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/decoder/musepack/k3bmpcdecoder.desktop 2009-07-23 11:41:59.000000000 +0200 +--- plugins/decoder/musepack/k3bmpcdecoder.desktop ++++ plugins/decoder/musepack/k3bmpcdecoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Descodificador Musepack para K3b Name[he]=מפענח Musepack של K3b @@ -1899,9 +1834,8 @@ diff -ru plugins/decoder/musepack/k3bmpcdecoder.desktop plugins/decoder/musepack Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/decoder/ogg/k3boggvorbisdecoder.desktop plugins/decoder/ogg/k3boggvorbisdecoder.desktop ---- plugins/decoder/ogg/k3boggvorbisdecoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/decoder/ogg/k3boggvorbisdecoder.desktop 2009-07-23 11:41:59.000000000 +0200 +--- plugins/decoder/ogg/k3boggvorbisdecoder.desktop ++++ plugins/decoder/ogg/k3boggvorbisdecoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Descodificador de Ogg Vorbis para K3b Name[he]=מפענח Ogg Vorbis של K3b @@ -1937,9 +1871,8 @@ diff -ru plugins/decoder/ogg/k3boggvorbisdecoder.desktop plugins/decoder/ogg/k3b Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/decoder/skeleton.desktop plugins/decoder/skeleton.desktop ---- plugins/decoder/skeleton.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/decoder/skeleton.desktop 2009-07-23 11:41:59.000000000 +0200 +--- plugins/decoder/skeleton.desktop ++++ plugins/decoder/skeleton.desktop @@ -13,6 +13,7 @@ Name[gl]=Descodificador ??? para K3b Name[he]=מפענח ??? של K3b @@ -1974,9 +1907,8 @@ diff -ru plugins/decoder/skeleton.desktop plugins/decoder/skeleton.desktop Type=Service X-KDE-ServiceTypes=K3b/Plugin -diff -ru plugins/decoder/wave/k3bwavedecoder.desktop plugins/decoder/wave/k3bwavedecoder.desktop ---- plugins/decoder/wave/k3bwavedecoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/decoder/wave/k3bwavedecoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/decoder/wave/k3bwavedecoder.desktop ++++ plugins/decoder/wave/k3bwavedecoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Descodificador de Wave para K3b Name[he]=מפענח Wave של K3b @@ -2011,9 +1943,8 @@ diff -ru plugins/decoder/wave/k3bwavedecoder.desktop plugins/decoder/wave/k3bwav Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/encoder/external/k3bexternalencodercommand.cpp plugins/encoder/external/k3bexternalencodercommand.cpp ---- plugins/encoder/external/k3bexternalencodercommand.cpp 2009-05-26 13:37:33.000000000 +0200 -+++ plugins/encoder/external/k3bexternalencodercommand.cpp 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/external/k3bexternalencodercommand.cpp ++++ plugins/encoder/external/k3bexternalencodercommand.cpp @@ -28,7 +28,7 @@ KSharedConfig::Ptr c = KGlobal::config(); KConfigGroup grp(c,"K3bExternalEncoderPlugin" ); @@ -2107,9 +2038,8 @@ diff -ru plugins/encoder/external/k3bexternalencodercommand.cpp plugins/encoder/ } -diff -ru plugins/encoder/external/k3bexternalencoder.cpp plugins/encoder/external/k3bexternalencoder.cpp ---- plugins/encoder/external/k3bexternalencoder.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ plugins/encoder/external/k3bexternalencoder.cpp 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/external/k3bexternalencoder.cpp ++++ plugins/encoder/external/k3bexternalencoder.cpp @@ -1,10 +1,8 @@ /* - * @@ -2171,9 +2101,8 @@ diff -ru plugins/encoder/external/k3bexternalencoder.cpp plugins/encoder/externa return written; } else -diff -ru plugins/encoder/external/k3bexternalencoder.desktop plugins/encoder/external/k3bexternalencoder.desktop ---- plugins/encoder/external/k3bexternalencoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/encoder/external/k3bexternalencoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/external/k3bexternalencoder.desktop ++++ plugins/encoder/external/k3bexternalencoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Codificador externo de son para K3b Name[he]=מקודד שמע חיצוני של K3b @@ -2217,9 +2146,8 @@ diff -ru plugins/encoder/external/k3bexternalencoder.desktop plugins/encoder/ext Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/encoder/external/k3bexternalencoder.h plugins/encoder/external/k3bexternalencoder.h ---- plugins/encoder/external/k3bexternalencoder.h 2009-04-21 19:54:02.000000000 +0200 -+++ plugins/encoder/external/k3bexternalencoder.h 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/external/k3bexternalencoder.h ++++ plugins/encoder/external/k3bexternalencoder.h @@ -1,10 +1,8 @@ /* - * @@ -2233,9 +2161,8 @@ diff -ru plugins/encoder/external/k3bexternalencoder.h plugins/encoder/external/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by -diff -ru plugins/encoder/external/kcm_k3bexternalencoder.desktop plugins/encoder/external/kcm_k3bexternalencoder.desktop ---- plugins/encoder/external/kcm_k3bexternalencoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/encoder/external/kcm_k3bexternalencoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/external/kcm_k3bexternalencoder.desktop ++++ plugins/encoder/external/kcm_k3bexternalencoder.desktop @@ -1,6 +1,5 @@ [Desktop Entry] Name=K3b External Audio Encoder Config Widget @@ -2259,9 +2186,8 @@ diff -ru plugins/encoder/external/kcm_k3bexternalencoder.desktop plugins/encoder Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_k3bexternalencoder -diff -ru plugins/encoder/lame/k3blameencoder.desktop plugins/encoder/lame/k3blameencoder.desktop ---- plugins/encoder/lame/k3blameencoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/encoder/lame/k3blameencoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/lame/k3blameencoder.desktop ++++ plugins/encoder/lame/k3blameencoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Codificador de Mp3 Lame para K3b Name[he]=מקודד קבצי Lame Mp3 של K3b @@ -2296,9 +2222,8 @@ diff -ru plugins/encoder/lame/k3blameencoder.desktop plugins/encoder/lame/k3blam Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/encoder/lame/kcm_k3blameencoder.desktop plugins/encoder/lame/kcm_k3blameencoder.desktop ---- plugins/encoder/lame/kcm_k3blameencoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/encoder/lame/kcm_k3blameencoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/lame/kcm_k3blameencoder.desktop ++++ plugins/encoder/lame/kcm_k3blameencoder.desktop @@ -1,6 +1,5 @@ [Desktop Entry] Name=K3b Lame Mp3 Encoder Config Module @@ -2322,9 +2247,8 @@ diff -ru plugins/encoder/lame/kcm_k3blameencoder.desktop plugins/encoder/lame/kc Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_k3blameencoder -diff -ru plugins/encoder/ogg/k3boggvorbisencoder.desktop plugins/encoder/ogg/k3boggvorbisencoder.desktop ---- plugins/encoder/ogg/k3boggvorbisencoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/encoder/ogg/k3boggvorbisencoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/ogg/k3boggvorbisencoder.desktop ++++ plugins/encoder/ogg/k3boggvorbisencoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Codificador de Ogg Vorbis para K3b Name[he]=מקודד Ogg Vorbis של K3b @@ -2359,9 +2283,8 @@ diff -ru plugins/encoder/ogg/k3boggvorbisencoder.desktop plugins/encoder/ogg/k3b Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/encoder/ogg/kcm_k3boggvorbisencoder.desktop plugins/encoder/ogg/kcm_k3boggvorbisencoder.desktop ---- plugins/encoder/ogg/kcm_k3boggvorbisencoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/encoder/ogg/kcm_k3boggvorbisencoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/ogg/kcm_k3boggvorbisencoder.desktop ++++ plugins/encoder/ogg/kcm_k3boggvorbisencoder.desktop @@ -1,6 +1,5 @@ [Desktop Entry] Name=K3b Ogg Vorbis Encoder Config Widget @@ -2385,9 +2308,8 @@ diff -ru plugins/encoder/ogg/kcm_k3boggvorbisencoder.desktop plugins/encoder/ogg Type=Service X-KDE-ServiceTypes=KCModule X-KDE-Library=kcm_k3boggvorbisencoder -diff -ru plugins/encoder/skeleton.desktop plugins/encoder/skeleton.desktop ---- plugins/encoder/skeleton.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/encoder/skeleton.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/skeleton.desktop ++++ plugins/encoder/skeleton.desktop @@ -13,6 +13,7 @@ Name[gl]=Codificador ??? para K3b Name[he]=מקודד ??? של K3b @@ -2422,9 +2344,8 @@ diff -ru plugins/encoder/skeleton.desktop plugins/encoder/skeleton.desktop Type=Service X-KDE-ServiceTypes=K3b/Plugin -diff -ru plugins/encoder/sox/k3bsoxencoder.desktop plugins/encoder/sox/k3bsoxencoder.desktop ---- plugins/encoder/sox/k3bsoxencoder.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ plugins/encoder/sox/k3bsoxencoder.desktop 2009-07-23 11:41:58.000000000 +0200 +--- plugins/encoder/sox/k3bsoxencoder.desktop ++++ plugins/encoder/sox/k3bsoxencoder.desktop @@ -14,6 +14,7 @@ Name[gl]=Codificador de son SoX para K3b Name[he]=מקודד קבצי שמע SoX של K3b @@ -2459,9 +2380,8 @@ diff -ru plugins/encoder/sox/k3bsoxencoder.desktop plugins/encoder/sox/k3bsoxenc Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp ---- plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp 2009-07-23 11:41:59.000000000 +0200 +--- plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp ++++ plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp @@ -380,7 +380,7 @@ @@ -2471,9 +2391,8 @@ diff -ru plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp { setText( i18n("Rename Audio Files") ); setToolTip( i18n("Rename audio files based on their meta info.") ); -diff -ru plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.desktop plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.desktop ---- plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.desktop 2009-05-26 16:22:58.000000000 +0200 -+++ plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.desktop 2009-07-23 11:41:59.000000000 +0200 +--- plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.desktop ++++ plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.desktop @@ -4,8 +4,10 @@ Name[de]=K3b-Audio-Metadaten-Umbenennungs-Modul Name[es]=Renombrador de meta información de audio de K3b @@ -2510,9 +2429,8 @@ diff -ru plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.desk Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp ---- plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp 2009-07-23 11:41:59.000000000 +0200 +--- plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp ++++ plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp @@ -41,7 +41,7 @@ @@ -2522,9 +2440,8 @@ diff -ru plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp plugins/ m_progress(0) { setText( i18n("Query Cddb") ); -diff -ru plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.desktop plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.desktop ---- plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.desktop 2009-05-26 16:22:58.000000000 +0200 -+++ plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.desktop 2009-07-23 11:41:59.000000000 +0200 +--- plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.desktop ++++ plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.desktop @@ -4,8 +4,10 @@ Name[de]=K3b-CDDB-Audio-Modul Name[es]=Complemento de audio Cddb de K3b @@ -2565,9 +2482,26 @@ diff -ru plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.desktop plug Type=Service ServiceTypes=K3b/Plugin Icon=preferences-plugin -diff -ru src/k3b.cpp src/k3b.cpp ---- src/k3b.cpp 2009-05-11 09:58:10.000000000 +0200 -+++ src/k3b.cpp 2009-07-23 11:42:05.000000000 +0200 +--- src/CMakeLists.txt ++++ src/CMakeLists.txt +@@ -47,6 +47,7 @@ + projects/k3baudiotracksplitdialog.cpp + projects/k3baudiotrackview.cpp + projects/k3baudioview.cpp ++ projects/k3baudioviewimpl.cpp + projects/k3baudioprojectmodel.cpp + projects/k3bmixedburndialog.cpp + projects/k3bmixedview.cpp +@@ -57,6 +58,7 @@ + projects/k3bdataimagesettingswidget.cpp + projects/k3bdatapropertiesdialog.cpp + projects/k3bdataview.cpp ++ projects/k3bdataviewimpl.cpp + projects/k3bdatavolumedescdialog.cpp + projects/k3bdataburndialog.cpp + projects/k3bdataprojectmodel.cpp +--- src/k3b.cpp ++++ src/k3b.cpp @@ -463,13 +463,13 @@ // create the proper K3b::View (maybe we should put this into some other class like K3b::ProjectManager) K3b::View* view = 0; @@ -2665,9 +2599,8 @@ diff -ru src/k3b.cpp src/k3b.cpp return doc; } -diff -ru src/k3b.desktop src/k3b.desktop ---- src/k3b.desktop 2009-05-22 15:37:17.000000000 +0200 -+++ src/k3b.desktop 2009-07-23 11:42:05.000000000 +0200 +--- src/k3b.desktop ++++ src/k3b.desktop @@ -22,6 +22,7 @@ GenericName[he]=צריבת CD ו- DVD GenericName[hne]=सीडी अउ डीवीडी बर्निंग @@ -2700,9 +2633,8 @@ diff -ru src/k3b.desktop src/k3b.desktop Terminal=false Name=K3b Name[hi]=के3बी -diff -ru src/k3bfiletreeview.cpp src/k3bfiletreeview.cpp ---- src/k3bfiletreeview.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/k3bfiletreeview.cpp 2009-07-23 11:42:05.000000000 +0200 +--- src/k3bfiletreeview.cpp ++++ src/k3bfiletreeview.cpp @@ -276,6 +276,7 @@ header()->hide(); @@ -2722,9 +2654,8 @@ diff -ru src/k3bfiletreeview.cpp src/k3bfiletreeview.cpp connect( this, SIGNAL(clicked(const QModelIndex&)), SLOT(slotClicked(const QModelIndex&)) ); connect( this, SIGNAL(customContextMenuRequested( const QPoint& )), SLOT( slotContextMenu( const QPoint& ) ) ); } -diff -ru src/k3bmetaitemmodel.cpp src/k3bmetaitemmodel.cpp ---- src/k3bmetaitemmodel.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/k3bmetaitemmodel.cpp 2009-07-23 11:42:05.000000000 +0200 +--- src/k3bmetaitemmodel.cpp ++++ src/k3bmetaitemmodel.cpp @@ -324,6 +324,16 @@ } @@ -2742,9 +2673,8 @@ diff -ru src/k3bmetaitemmodel.cpp src/k3bmetaitemmodel.cpp QAbstractItemModel* K3b::MetaItemModel::subModelForIndex( const QModelIndex& index ) const { if ( index.isValid() ) { -diff -ru src/k3bmetaitemmodel.h src/k3bmetaitemmodel.h ---- src/k3bmetaitemmodel.h 2009-05-26 11:39:57.000000000 +0200 -+++ src/k3bmetaitemmodel.h 2009-07-23 11:42:05.000000000 +0200 +--- src/k3bmetaitemmodel.h ++++ src/k3bmetaitemmodel.h @@ -41,6 +41,7 @@ MetaItemModel( QObject* parent = 0 ); ~MetaItemModel(); @@ -2753,9 +2683,8 @@ diff -ru src/k3bmetaitemmodel.h src/k3bmetaitemmodel.h QAbstractItemModel* subModelForIndex( const QModelIndex& index ) const; /** -diff -ru src/k3b.notifyrc src/k3b.notifyrc ---- src/k3b.notifyrc 2009-05-03 15:17:04.000000000 +0200 -+++ src/k3b.notifyrc 2009-07-23 11:42:05.000000000 +0200 +--- src/k3b.notifyrc ++++ src/k3b.notifyrc @@ -25,6 +25,7 @@ Name[hi]=प्रक्रिया सफल Name[hne]=काम सफल @@ -2851,9 +2780,8 @@ diff -ru src/k3b.notifyrc src/k3b.notifyrc +Comment[zh_TW]=使用者需要插入媒體 Sound=k3b_wait_media1.wav Action=Sound -diff -ru src/k3bplacesmodel.cpp src/k3bplacesmodel.cpp ---- src/k3bplacesmodel.cpp 2009-05-26 23:58:58.000000000 +0200 -+++ src/k3bplacesmodel.cpp 2009-07-23 11:42:05.000000000 +0200 +--- src/k3bplacesmodel.cpp ++++ src/k3bplacesmodel.cpp @@ -22,14 +22,20 @@ #include #include // use .h to build with KDE 4.2 @@ -2953,9 +2881,8 @@ diff -ru src/k3bplacesmodel.cpp src/k3bplacesmodel.cpp } } -diff -ru src/k3bprojectmanager.cpp src/k3bprojectmanager.cpp ---- src/k3bprojectmanager.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/k3bprojectmanager.cpp 2009-07-23 11:42:05.000000000 +0200 +--- src/k3bprojectmanager.cpp ++++ src/k3bprojectmanager.cpp @@ -179,7 +179,7 @@ } @@ -3118,9 +3045,8 @@ diff -ru src/k3bprojectmanager.cpp src/k3bprojectmanager.cpp } else { kDebug() << "(K3b::Doc) unknown doc type: " << xmlDoc.doctype().name(); QApplication::restoreOverrideCursor(); -diff -ru src/k3bprojectmanager.h src/k3bprojectmanager.h ---- src/k3bprojectmanager.h 2009-04-21 19:54:02.000000000 +0200 -+++ src/k3bprojectmanager.h 2009-07-23 11:42:05.000000000 +0200 +--- src/k3bprojectmanager.h ++++ src/k3bprojectmanager.h @@ -41,7 +41,7 @@ * Create a new project including loading user defaults and creating * the dcop interface. @@ -3139,9 +3065,8 @@ diff -ru src/k3bprojectmanager.h src/k3bprojectmanager.h class Private; Private* d; -diff -ru src/k3bstatusbarmanager.cpp src/k3bstatusbarmanager.cpp ---- src/k3bstatusbarmanager.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/k3bstatusbarmanager.cpp 2009-07-23 11:42:05.000000000 +0200 +--- src/k3bstatusbarmanager.cpp ++++ src/k3bstatusbarmanager.cpp @@ -194,19 +194,19 @@ K3b::Doc* doc = k3bappcore->projectManager()->activeProject(); if( doc ) { @@ -3188,9 +3113,8 @@ diff -ru src/k3bstatusbarmanager.cpp src/k3bstatusbarmanager.cpp K3b::DataDoc* dataDoc = static_cast( doc ); m_labelProjectInfo->setText( i18n("Video DVD (%1)",dataDocStats(dataDoc)) ); break; -diff -ru src/k3bthememanager.cpp src/k3bthememanager.cpp ---- src/k3bthememanager.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/k3bthememanager.cpp 2009-07-23 11:42:05.000000000 +0200 +--- src/k3bthememanager.cpp ++++ src/k3bthememanager.cpp @@ -236,7 +236,7 @@ void K3b::ThemeManager::setCurrentTheme( K3b::Theme* theme ) @@ -3200,9 +3124,8 @@ diff -ru src/k3bthememanager.cpp src/k3bthememanager.cpp theme = d->themes.first(); if( theme ) { -diff -ru src/k3burlnavigator.cpp src/k3burlnavigator.cpp ---- src/k3burlnavigator.cpp 2009-02-22 23:39:42.000000000 +0100 -+++ src/k3burlnavigator.cpp 2009-07-23 11:42:05.000000000 +0200 +--- src/k3burlnavigator.cpp ++++ src/k3burlnavigator.cpp @@ -25,6 +25,9 @@ K3b::UrlNavigator::UrlNavigator( KFilePlacesModel* model, QWidget* parent ) : KUrlNavigator( model, KUrl(QDir::home().absolutePath()), parent ) @@ -3213,9 +3136,8 @@ diff -ru src/k3burlnavigator.cpp src/k3burlnavigator.cpp connect( this, SIGNAL(urlChanged(const KUrl&)), this, SLOT(urlActivated(const KUrl&)) ); } -diff -ru src/konqi/k3b_audiocd_rip.desktop src/konqi/k3b_audiocd_rip.desktop ---- src/konqi/k3b_audiocd_rip.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ src/konqi/k3b_audiocd_rip.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_audiocd_rip.desktop ++++ src/konqi/k3b_audiocd_rip.desktop @@ -24,6 +24,7 @@ Name[he]=חלק שמע דיגיטלי עם K3b Name[hne]=के३बी के साथ डिजिटल आडियो एक्सट्रेक्ट करव @@ -3231,9 +3153,8 @@ diff -ru src/konqi/k3b_audiocd_rip.desktop src/konqi/k3b_audiocd_rip.desktop +Name[zh_TW]=用 K3b 解開數位音效 Exec=k3b --cddarip %i Icon=k3b -diff -ru src/konqi/k3b_copy_disc.desktop src/konqi/k3b_copy_disc.desktop ---- src/konqi/k3b_copy_disc.desktop 2009-05-26 16:22:58.000000000 +0200 -+++ src/konqi/k3b_copy_disc.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_copy_disc.desktop ++++ src/konqi/k3b_copy_disc.desktop @@ -6,12 +6,15 @@ [Desktop Action K3bCopy] @@ -3257,9 +3178,8 @@ diff -ru src/konqi/k3b_copy_disc.desktop src/konqi/k3b_copy_disc.desktop +Name[zh_TW]=使用 K3b 複製 Exec=k3b --copy %i Icon=k3b -diff -ru src/konqi/k3b_create_audio_cd.desktop src/konqi/k3b_create_audio_cd.desktop ---- src/konqi/k3b_create_audio_cd.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ src/konqi/k3b_create_audio_cd.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_create_audio_cd.desktop ++++ src/konqi/k3b_create_audio_cd.desktop @@ -8,7 +8,7 @@ [Desktop Action CreateK3bAudioProject] Exec=k3b --audiocd %F @@ -3283,9 +3203,8 @@ diff -ru src/konqi/k3b_create_audio_cd.desktop src/konqi/k3b_create_audio_cd.des Name[zh_CN]=用 K3b 创建音频 CD... +Name[zh_TW]=用 K3b 建立音效 CD... Icon=k3b -diff -ru src/konqi/k3b_create_audio_cd_from_blank_medium.desktop src/konqi/k3b_create_audio_cd_from_blank_medium.desktop ---- src/konqi/k3b_create_audio_cd_from_blank_medium.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ src/konqi/k3b_create_audio_cd_from_blank_medium.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_create_audio_cd_from_blank_medium.desktop ++++ src/konqi/k3b_create_audio_cd_from_blank_medium.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -X-KDE-Solid-Predicate=[[StorageVolume.ignored == false AND OpticalDisc.isBlank == true ] AND OpticalDisc.discType == 'CdRecordable|CdRewritable'] @@ -3316,9 +3235,8 @@ diff -ru src/konqi/k3b_create_audio_cd_from_blank_medium.desktop src/konqi/k3b_c Name[zh_CN]=用 K3b 创建音频 CD... +Name[zh_TW]=用 K3b 建立音效 CD... Icon=k3b -diff -ru src/konqi/k3b_create_data_project.desktop src/konqi/k3b_create_data_project.desktop ---- src/konqi/k3b_create_data_project.desktop 2009-05-26 16:22:58.000000000 +0200 -+++ src/konqi/k3b_create_data_project.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_create_data_project.desktop ++++ src/konqi/k3b_create_data_project.desktop @@ -8,12 +8,15 @@ [Desktop Action CreateK3bDataProject] Exec=k3b --data %F @@ -3341,9 +3259,8 @@ diff -ru src/konqi/k3b_create_data_project.desktop src/konqi/k3b_create_data_pro Name[x-test]=xxCreate file project with K3b...xx +Name[zh_TW]=用 K3b 建立檔案專案... Icon=k3b -diff -ru src/konqi/k3b_create_data_project_from_blank_medium.desktop src/konqi/k3b_create_data_project_from_blank_medium.desktop ---- src/konqi/k3b_create_data_project_from_blank_medium.desktop 2009-05-26 16:22:58.000000000 +0200 -+++ src/konqi/k3b_create_data_project_from_blank_medium.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_create_data_project_from_blank_medium.desktop ++++ src/konqi/k3b_create_data_project_from_blank_medium.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -X-KDE-Solid-Predicate=[StorageVolume.ignored == false AND OpticalDisc.isBlank == true] @@ -3373,9 +3290,8 @@ diff -ru src/konqi/k3b_create_data_project_from_blank_medium.desktop src/konqi/k Name[x-test]=xxCreate file project with K3b...xx +Name[zh_TW]=用 K3b 建立檔案專案... Icon=k3b -diff -ru src/konqi/k3b_create_video_cd.desktop src/konqi/k3b_create_video_cd.desktop ---- src/konqi/k3b_create_video_cd.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ src/konqi/k3b_create_video_cd.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_create_video_cd.desktop ++++ src/konqi/k3b_create_video_cd.desktop @@ -26,6 +26,7 @@ Name[hi]=के3बी के जरिए वीडियो सीडी बनाएं.... Name[hne]=के3बी के साथ वीडियो सीडी बनाव.... @@ -3390,9 +3306,8 @@ diff -ru src/konqi/k3b_create_video_cd.desktop src/konqi/k3b_create_video_cd.des Name[zh_CN]=用 K3b 创建 VCD... +Name[zh_TW]=用 K3b 建立影像 CD... Icon=k3b -diff -ru src/konqi/k3b_dvd_copy.desktop src/konqi/k3b_dvd_copy.desktop ---- src/konqi/k3b_dvd_copy.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ src/konqi/k3b_dvd_copy.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_dvd_copy.desktop ++++ src/konqi/k3b_dvd_copy.desktop @@ -24,6 +24,7 @@ Name[he]=העתק DVD עם K3b Name[hne]=के३बी के साथ डीवीडी नकल बनाव @@ -3408,9 +3323,8 @@ diff -ru src/konqi/k3b_dvd_copy.desktop src/konqi/k3b_dvd_copy.desktop +Name[zh_TW]=用 K3b 複製 DVD Exec=k3b --copydvd %u Icon=k3b -diff -ru src/konqi/k3b_videodvd_rip.desktop src/konqi/k3b_videodvd_rip.desktop ---- src/konqi/k3b_videodvd_rip.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ src/konqi/k3b_videodvd_rip.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_videodvd_rip.desktop ++++ src/konqi/k3b_videodvd_rip.desktop @@ -24,6 +24,7 @@ Name[he]=קריעת כותר וידאו DVD עם K3b Name[hne]=के3बी के साथ वीडियो डीवीडी रिप करव.... @@ -3426,9 +3340,8 @@ diff -ru src/konqi/k3b_videodvd_rip.desktop src/konqi/k3b_videodvd_rip.desktop +Name[zh_TW]=用 K3b 擷取影像 DVD 標題 Exec=k3b --videodvdrip %i Icon=k3b -diff -ru src/konqi/k3b_write_bin_image.desktop src/konqi/k3b_write_bin_image.desktop ---- src/konqi/k3b_write_bin_image.desktop 2009-05-03 15:17:04.000000000 +0200 -+++ src/konqi/k3b_write_bin_image.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_write_bin_image.desktop ++++ src/konqi/k3b_write_bin_image.desktop @@ -18,7 +18,7 @@ Name[eo]=Skribi KD imagon per K3b... Name[es]=Escribir imagen de CD con K3b... @@ -3452,9 +3365,8 @@ diff -ru src/konqi/k3b_write_bin_image.desktop src/konqi/k3b_write_bin_image.des Name[zh_CN]=用 K3b 刻录 CD 映像... +Name[zh_TW]=用 K3b 寫入 CD 映像檔... Icon=k3b -diff -ru src/konqi/k3b_write_iso_image.desktop src/konqi/k3b_write_iso_image.desktop ---- src/konqi/k3b_write_iso_image.desktop 2009-05-26 16:22:58.000000000 +0200 -+++ src/konqi/k3b_write_iso_image.desktop 2009-07-23 11:42:04.000000000 +0200 +--- src/konqi/k3b_write_iso_image.desktop ++++ src/konqi/k3b_write_iso_image.desktop @@ -7,15 +7,18 @@ [Desktop Action WriteCdImage] Exec=k3b --image %F @@ -3481,9 +3393,8 @@ diff -ru src/konqi/k3b_write_iso_image.desktop src/konqi/k3b_write_iso_image.des Name[x-test]=xxWrite image to disc with K3b...xx +Name[zh_TW]=用 K3b 寫入光碟映像檔到磁碟中... Icon=k3b -diff -ru src/misc/k3bimagewritingdialog.cpp src/misc/k3bimagewritingdialog.cpp ---- src/misc/k3bimagewritingdialog.cpp 2009-04-21 23:00:49.000000000 +0200 -+++ src/misc/k3bimagewritingdialog.cpp 2009-07-23 11:42:00.000000000 +0200 +--- src/misc/k3bimagewritingdialog.cpp ++++ src/misc/k3bimagewritingdialog.cpp @@ -182,9 +182,10 @@ QString image = c.readPathEntry( "last written image", QString() ); if( QFile::exists( image ) ) @@ -3496,9 +3407,8 @@ diff -ru src/misc/k3bimagewritingdialog.cpp src/misc/k3bimagewritingdialog.cpp m_comboRecentImages->addItems( c.readPathEntry( "recent images", QStringList() ) ); } -diff -ru src/option/base_k3bmiscoptiontab.ui src/option/base_k3bmiscoptiontab.ui ---- src/option/base_k3bmiscoptiontab.ui 2009-03-21 22:55:41.000000000 +0100 -+++ src/option/base_k3bmiscoptiontab.ui 2009-07-23 11:42:03.000000000 +0200 +--- src/option/base_k3bmiscoptiontab.ui ++++ src/option/base_k3bmiscoptiontab.ui @@ -69,7 +69,7 @@ Check system Configuration @@ -3508,9 +3418,8 @@ diff -ru src/option/base_k3bmiscoptiontab.ui src/option/base_k3bmiscoptiontab.ui &Check system configuration -diff -ru src/option/k3badvancedoptiontab.cpp src/option/k3badvancedoptiontab.cpp ---- src/option/k3badvancedoptiontab.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/option/k3badvancedoptiontab.cpp 2009-07-23 11:42:03.000000000 +0200 +--- src/option/k3badvancedoptiontab.cpp ++++ src/option/k3badvancedoptiontab.cpp @@ -106,10 +106,7 @@ "elements which allow to influence the behaviour of K3b are shown. " "This includes the manual selection of the used burning tool " @@ -3523,9 +3432,8 @@ diff -ru src/option/k3badvancedoptiontab.cpp src/option/k3badvancedoptiontab.cpp "

Be aware that K3b does not support all possible tools " "in all project types and actions.") ); -diff -ru src/projects/k3baudioview.cpp src/projects/k3baudioview.cpp ---- src/projects/k3baudioview.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3baudioview.cpp 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3baudioview.cpp ++++ src/projects/k3baudioview.cpp @@ -3,6 +3,7 @@ * Copyright (C) 2003-2008 Sebastian Trueg * (C) 2009 Arthur Mello @@ -3534,24 +3442,154 @@ diff -ru src/projects/k3baudioview.cpp src/projects/k3baudioview.cpp * * This file is part of the K3b project. * Copyright (C) 1998-2009 Sebastian Trueg -@@ -40,7 +41,6 @@ +@@ -14,106 +15,102 @@ + * See the file "COPYING" for the exact licensing terms. + */ - #include "k3bfillstatusdisplay.h" - #include "k3bmsf.h" +-#include "k3baudioprojectmodel.h" + #include "k3baudioview.h" +-//#include "k3baudiotrackplayer.h" +-#include "k3baudioburndialog.h" +-#include "k3baudiotrackaddingdialog.h" +-#include "k3baudiozerodata.h" +-#include "k3baudiotracksplitdialog.h" +-#include "k3baudiodatasourceeditwidget.h" +-#include "k3baudiotrackdialog.h" +-#include "../rip/k3bviewcolumnadjuster.h" +- +-#include + + #include "k3bapplication.h" ++#include "k3baudioburndialog.h" + #include "k3baudiodoc.h" +-#include "k3baudiotrack.h" +-#include "k3baudiofile.h" ++#include "k3baudioprojectmodel.h" ++#include "k3baudioviewimpl.h" ++#include "k3bfillstatusdisplay.h" + #include "k3bpluginmanager.h" +-#include "k3bmsfedit.h" +-#include "k3baudiodecoder.h" +- +-// this is not here becasue of base_*.ui troubles +-#include "../rip/k3baudioprojectconvertingdialog.h" ++//#include "k3baudiotrackplayer.h" ++#include "../rip/k3bviewcolumnadjuster.h" + +-#include "k3bfillstatusdisplay.h" +-#include "k3bmsf.h" -#include "k3bprojectplugin.h" ++#include ++#include - // QT-includes - #include -@@ -61,6 +61,8 @@ - : K3b::StandardView( pDoc, parent ), +-// QT-includes +-#include +-#include +- +-// KDE-includes +-#include +-#include +-#include +-#include +-#include + #include + #include ++#include ++#include ++#include ++#include + #include + + +-K3b::AudioView::AudioView( K3b::AudioDoc* pDoc, QWidget* parent ) +- : K3b::StandardView( pDoc, parent ), ++K3b::AudioView::AudioView( K3b::AudioDoc* doc, QWidget* parent ) ++ : K3b::StandardView( doc, parent ), m_updatingColumnWidths(false) { -+ connect( this, SIGNAL(activated(QModelIndex)), SLOT(slotItemActivated(QModelIndex)) ); +- m_doc = pDoc; +- +- m_model = new K3b::AudioProjectModel(m_doc, this); +- // set the model for the K3b::StandardView's views +- setModel(m_model); ++ m_doc = doc; ++ m_model = new AudioProjectModel(m_doc, this); ++ m_audioViewImpl = new AudioViewImpl( this, m_doc, m_model, actionCollection() ); + - m_doc = pDoc; + setAutoExpandDelay(200); +- + // and hide the side panel as the audio project has no tree hierarchy + setShowDirPanel(false); - m_model = new K3b::AudioProjectModel(m_doc, this); -@@ -109,7 +111,7 @@ + // trueg: I don't see why we use StandardView here. IMHO it only makes things a bit weird +- m_columnAdjuster = new K3b::ViewColumnAdjuster( fileView() ); ++ m_columnAdjuster = new ViewColumnAdjuster( fileView() ); + connect( m_columnAdjuster, SIGNAL( columnsNeedAjusting() ), this, SLOT( slotAdjustColumns() ) ); ++ connect( this, SIGNAL(activated(QModelIndex)), ++ m_audioViewImpl, SLOT(slotItemActivated(QModelIndex)) ); ++ ++ // Connect audio actions ++ connect( actionCollection()->action( "track_add_silence" ), SIGNAL( triggered() ), ++ this, SLOT(slotAddSilence()) ); ++ connect( actionCollection()->action( "track_merge" ), SIGNAL( triggered() ), ++ this, SLOT(slotMergeTracks()) ); ++ connect( actionCollection()->action( "source_split" ), SIGNAL( triggered() ), ++ this, SLOT(slotSplitSource()) ); ++ connect( actionCollection()->action( "track_split" ), SIGNAL( triggered() ), ++ this, SLOT(slotSplitTrack()) ); ++ connect( actionCollection()->action( "edit_source" ), SIGNAL( triggered() ), ++ this, SLOT(slotEditSource()) ); ++ //connect( actionCollection()->action( "track_play" ), SIGNAL( triggered() ), ++ // this, SLOT(slotPlayTrack()) ); ++ connect( actionCollection()->action( "project_audio_musicbrainz" ), SIGNAL( triggered() ), ++ this, SLOT(slotQueryMusicBrainz()) ); ++ connect( actionCollection()->action( "track_properties" ), SIGNAL( triggered() ), ++ this, SLOT(slotTrackProperties()) ); ++ connect( actionCollection()->action( "track_remove" ), SIGNAL( triggered() ), ++ this, SLOT(slotRemove()) ); + + fillStatusDisplay()->showTime(); ++ ++ // set the model for the StandardView's views ++ setModel(m_model); + +- // add button for the audio conversion +- KAction* conversionAction = new KAction( this ); +- conversionAction->setText( i18n("Convert Tracks") ); +- conversionAction->setIcon( KIcon( "edit-redo" ) ); +- conversionAction->setToolTip( i18n("Convert audio tracks to other audio formats." ) ); +- connect( conversionAction, SIGNAL( triggered() ), this, SLOT(slotAudioConversion()) ); +- actionCollection()->addAction( "project_audio_convert", conversionAction ); +- +- toolBox()->addAction( conversionAction ); ++ toolBox()->addAction( actionCollection()->action( "project_audio_convert" ) ); + toolBox()->addSeparator(); + + #ifdef __GNUC__ + #warning enable player once ported to Phonon + #endif +-// toolBox()->addAction( m_songlist->player()->action( K3b::AudioTrackPlayer::ACTION_PLAY ) ); +-// toolBox()->addAction( m_songlist->player()->action( K3b::AudioTrackPlayer::ACTION_PAUSE ) ); +-// toolBox()->addAction( m_songlist->player()->action( K3b::AudioTrackPlayer::ACTION_STOP ) ); ++// toolBox()->addAction( m_songlist->player()->action( AudioTrackPlayer::ACTION_PLAY ) ); ++// toolBox()->addAction( m_songlist->player()->action( AudioTrackPlayer::ACTION_PAUSE ) ); ++// toolBox()->addAction( m_songlist->player()->action( AudioTrackPlayer::ACTION_STOP ) ); + // toolBox()->addSpacing(); +-// toolBox()->addAction( m_songlist->player()->action( K3b::AudioTrackPlayer::ACTION_PREV ) ); +-// toolBox()->addAction( m_songlist->player()->action( K3b::AudioTrackPlayer::ACTION_NEXT ) ); ++// toolBox()->addAction( m_songlist->player()->action( AudioTrackPlayer::ACTION_PREV ) ); ++// toolBox()->addAction( m_songlist->player()->action( AudioTrackPlayer::ACTION_NEXT ) ); + // toolBox()->addSpacing(); +-// m_songlist->player()->action( K3b::AudioTrackPlayer::ACTION_SEEK )->plug( toolBox() ); ++// m_songlist->player()->action( AudioTrackPlayer::ACTION_SEEK )->plug( toolBox() ); + // toolBox()->addSeparator(); + + #if 0 + #ifdef HAVE_MUSICBRAINZ +- kDebug() << "(K3b::AudioView) m_songlist->actionCollection()->actions().count() " << m_songlist->actionCollection()->actions().count(); ++ kDebug() << "(AudioView) m_songlist->actionCollection()->actions().count() " << m_songlist->actionCollection()->actions().count(); + toolBox()->addAction( m_songlist->actionCollection()->action( "project_audio_musicbrainz" ) ); + toolBox()->addSeparator(); #endif #endif @@ -3560,123 +3598,142 @@ diff -ru src/projects/k3baudioview.cpp src/projects/k3baudioview.cpp // this is just for testing (or not?) // most likely every project type will have it's rc file in the future -@@ -192,18 +194,64 @@ - actionCollection()->addAction( "project_audio_musicbrainz", mbAction ); - mbAction->setToolTip( i18n("Try to determine meta information over the Internet") ); - #endif -+ -+ m_popupMenu = new KMenu( this ); -+ if( m_actionPlayTrack != 0 ) { -+ m_popupMenu->addAction( m_actionPlayTrack ); -+ m_popupMenu->addSeparator(); -+ } -+ m_popupMenu->addAction( m_actionRemove ); -+ m_popupMenu->addAction( m_actionAddSilence ); -+ m_popupMenu->addSeparator(); -+ m_popupMenu->addAction( m_actionSplitSource ); -+ m_popupMenu->addAction( m_actionSplitTrack ); -+ m_popupMenu->addAction( m_actionEditSource ); -+ m_popupMenu->addAction( m_actionMergeTracks ); -+ m_popupMenu->addAction( m_actionProperties ); -+ m_popupMenu->addSeparator(); -+ m_popupMenu->addAction( actionCollection()->action("project_burn") ); -+} -+ -+ -+void K3b::AudioView::trackProperties( const QModelIndexList& indexes ) -+{ -+ QList tracks; -+ QList sources; -+ getSelectedItems( tracks, sources, indexes ); -+ -+ // TODO: add tracks from sources to tracks - -+ if( !tracks.isEmpty() ) { -+ K3b::AudioTrackDialog d( tracks, this ); -+ d.exec(); -+ } -+ else { -+ slotProperties(); -+ } +- // we only add the additional actions since K3b::View already added the default actions ++ // we only add the additional actions since View already added the default actions + setXML( "" + "" + "" +@@ -125,9 +122,6 @@ + " " + "" + "", true ); +- +- // setup context menu actions +- setupActions(); } - - void K3b::AudioView::getSelectedItems( QList& tracks, - QList& sources ) - { -+ getSelectedItems( tracks, sources, currentSelection() ); -+} -+ -+ -+ -+K3b::ProjectBurnDialog* K3b::AudioView::newBurnDialog( QWidget* parent ) -+{ -+ return new K3b::AudioBurnDialog( m_doc, parent ); -+} -+ -+ -+void K3b::AudioView::getSelectedItems( QList& tracks, -+ QList& sources, -+ const QModelIndexList& indexes ) -+{ - tracks.clear(); - sources.clear(); - -- QModelIndexList indexes = currentSelection(); -- - foreach( const QModelIndex& index, indexes ) { - if ( K3b::AudioTrack* track = m_model->trackForIndex( index ) ) { - tracks << track; -@@ -221,60 +269,51 @@ + K3b::AudioView::~AudioView() +@@ -142,343 +136,74 @@ + "to the audio project.") ); } - -- --K3b::ProjectBurnDialog* K3b::AudioView::newBurnDialog( QWidget* parent ) +-void K3b::AudioView::setupActions() -{ -- return new K3b::AudioBurnDialog( m_doc, parent ); +- m_actionProperties = new KAction( this ); +- m_actionProperties->setText( i18n("Properties") ); +- m_actionProperties->setIcon( KIcon( "document-properties" ) ); +- connect( m_actionProperties, SIGNAL( triggered() ), this, SLOT( slotTrackProperties() ) ); +- actionCollection()->addAction( "track_properties", m_actionProperties ); +- +- m_actionRemove = new KAction( this ); +- m_actionRemove->setText( i18n("Remove") ); +- m_actionRemove->setIcon( KIcon( "edit-delete" ) ); +- connect( m_actionRemove, SIGNAL( triggered() ), this, SLOT( slotRemove() ) ); +- actionCollection()->addAction( "track_remove", m_actionRemove ); +- +- m_actionAddSilence = new KAction( this ); +- m_actionAddSilence->setText( i18n("Add Silence...") ); +- connect( m_actionAddSilence, SIGNAL( triggered() ), this, SLOT( slotAddSilence() ) ); +- actionCollection()->addAction( "track_add_silence", m_actionAddSilence ); +- +- m_actionMergeTracks = new KAction( this ); +- m_actionMergeTracks->setText( i18n("Merge Tracks") ); +- connect( m_actionMergeTracks, SIGNAL( triggered() ), this, SLOT( slotMergeTracks() ) ); +- actionCollection()->addAction( "track_merge", m_actionMergeTracks ); +- +- m_actionSplitSource = new KAction( this ); +- m_actionSplitSource->setText( i18n("Source to Track") ); +- connect( m_actionSplitSource, SIGNAL( triggered() ), this, SLOT( slotSplitSource() ) ); +- actionCollection()->addAction( "source_split", m_actionSplitSource ); +- +- m_actionSplitTrack = new KAction( this ); +- m_actionSplitTrack->setText( i18n("Split Track...") ); +- connect( m_actionSplitTrack, SIGNAL( triggered() ), this, SLOT( slotSplitTrack() ) ); +- actionCollection()->addAction( "track_split", m_actionSplitTrack ); +- +- m_actionEditSource = new KAction( this ); +- m_actionEditSource->setText( i18n("Edit Source...") ); +- connect( m_actionEditSource, SIGNAL( triggered() ), this, SLOT( slotEditSource() ) ); +- actionCollection()->addAction( "track_split", m_actionEditSource ); +- +- m_actionPlayTrack = 0;//new KAction( i18n("Play Track"), "media-playback-start", +-// KShortcut(), this, SLOT(slotPlayTrack()), +-// actionCollection(), "track_play" ); +-#ifdef HAVE_MUSICBRAINZ +- KAction* mbAction = new KAction( this ); +- mbAction->setText( i18n("Musicbrainz Lookup") ); +- mbAction->setIcon( KIcon( "musicbrainz" ) ); +- connect( mbAction, SIGNAL( triggered() ), this, SLOT( slotQueryMusicBrainz() ) ); +- actionCollection()->addAction( "project_audio_musicbrainz", mbAction ); +- mbAction->setToolTip( i18n("Try to determine meta information over the Internet") ); +-#endif +- -} - - +-void K3b::AudioView::getSelectedItems( QList& tracks, +- QList& sources ) +-{ +- tracks.clear(); +- sources.clear(); +- +- QModelIndexList indexes = currentSelection(); +- +- foreach( const QModelIndex& index, indexes ) { +- if ( K3b::AudioTrack* track = m_model->trackForIndex( index ) ) { +- tracks << track; +- } +- else if ( K3b::AudioDataSource* source = m_model->sourceForIndex( index ) ) { +-#ifdef __GNUC__ +-#warning Do not select hidden sources once the hiding of sources works again +-#endif +- // do not select hidden source items or unfinished source files +- if( source->isValid() && source->length() != 0 ) { +- sources << source; +- } +- } +- } +-} +- +- + + K3b::ProjectBurnDialog* K3b::AudioView::newBurnDialog( QWidget* parent ) + { +- return new K3b::AudioBurnDialog( m_doc, parent ); ++ return new AudioBurnDialog( m_doc, parent ); + } + + -void K3b::AudioView::contextMenuForSelection(const QModelIndexList &selectedIndexes, const QPoint &pos) +void K3b::AudioView::selectionChanged( const QModelIndexList& indexes ) { - QList tracks; - QList sources; +- QList tracks; +- QList sources; - getSelectedItems( tracks, sources ); -+ getSelectedItems( tracks, sources, indexes ); - - int numTracks = tracks.count(); - int numSources = sources.count(); - +- +- int numTracks = tracks.count(); +- int numSources = sources.count(); +- - // build the menu - KMenu popupMenu; - - if( m_actionPlayTrack && numTracks >= 1 ) { - popupMenu.addAction( m_actionPlayTrack ); - popupMenu.addSeparator(); -+ if( m_actionPlayTrack != 0 ) { -+ m_actionPlayTrack->setVisible( numTracks >= 1 ); - } +- } - - if( numTracks + numSources ) - popupMenu.addAction( m_actionRemove ); - - if( numSources + numTracks == 1 ) - popupMenu.addAction( m_actionAddSilence ); -+ m_actionRemove->setVisible( numTracks + numSources ); -+ m_actionAddSilence->setVisible( numSources + numTracks == 1 ); - - if( numSources == 1 && numTracks == 0 ) { +- +- if( numSources == 1 && numTracks == 0 ) { - popupMenu.addSeparator(); - popupMenu.addAction( m_actionSplitSource ); - popupMenu.addAction( m_actionEditSource ); -+ m_actionSplitSource->setVisible( true ); -+ m_actionSplitTrack->setVisible( false ); -+ m_actionEditSource->setVisible( true ); -+ m_actionMergeTracks->setVisible( false ); - } - else if( numTracks == 1 && numSources == 0 ) { +- } +- else if( numTracks == 1 && numSources == 0 ) { - popupMenu.addSeparator(); - - if( tracks.first()->length().lba() > 60 ) @@ -3684,40 +3741,217 @@ diff -ru src/projects/k3baudioview.cpp src/projects/k3baudioview.cpp - - popupMenu.addAction( m_actionEditSource ); - -+ m_actionSplitSource->setVisible( false ); -+ m_actionSplitTrack->setVisible( tracks.first()->length().lba() > 60 ); -+ m_actionEditSource->setVisible( true ); -+ m_actionMergeTracks->setVisible( false ); - } +- } - else if( numTracks > 1 ) { - popupMenu.addSeparator(); - popupMenu.addAction( m_actionMergeTracks ); -+ else { -+ m_actionSplitSource->setVisible( false ); -+ m_actionSplitTrack->setVisible( false ); -+ m_actionEditSource->setVisible( false ); -+ m_actionMergeTracks->setVisible( numTracks > 1 ); - } -+} -+ -+ -+void K3b::AudioView::contextMenu( const QPoint& pos ) -+{ -+ m_popupMenu->exec( pos ); -+} - +- } +- - popupMenu.addAction( m_actionProperties ); - popupMenu.addSeparator(); - popupMenu.addAction( static_cast(m_doc->view())->actionCollection()->action( "project_burn" ) ); - +- - popupMenu.exec( pos ); -+void K3b::AudioView::slotItemActivated( const QModelIndex& index ) -+{ -+ trackProperties( QModelIndexList() << index ); ++ m_audioViewImpl->slotSelectionChanged( indexes ); + } + +- +-void K3b::AudioView::slotAudioConversion() ++ ++void K3b::AudioView::contextMenu( const QPoint& pos ) + { +- K3b::AudioProjectConvertingDialog dlg( m_doc, this ); +- dlg.exec(); ++ m_audioViewImpl->popupMenu()->exec( pos ); } -@@ -466,19 +505,7 @@ + void K3b::AudioView::addUrls( const KUrl::List& urls ) + { +- K3b::AudioTrackAddingDialog::addUrls( urls, m_doc, 0, 0, 0, this ); ++ m_audioViewImpl->addUrls( urls ); + } + + void K3b::AudioView::slotRemove() + { +- QList tracks; +- QList sources; +- getSelectedItems( tracks, sources ); +- +- // +- // remove all sources which belong to one of the selected tracks since they will be +- // deleted along with their tracks +- // +- QList::iterator srcIt = sources.begin(); +- while( srcIt != sources.end() ) { +- if( tracks.contains( ( *srcIt )->track() ) ) +- srcIt = sources.erase( srcIt ); +- else +- ++srcIt; +- } +- +- // +- // Now delete all the tracks +- // +- qDeleteAll( tracks ); +- +- // +- // Now delete all the sources +- // +- qDeleteAll( sources ); ++ m_audioViewImpl->remove( currentSelection() ); + } + + + void K3b::AudioView::slotAddSilence() + { +- QList tracks; +- QList sources; +- getSelectedItems( tracks, sources ); +- +- if( !sources.isEmpty() || !tracks.isEmpty() ) { +- // +- // create a simple dialog for asking the length of the silence +- // +- KDialog dlg( this); +- QWidget* widget = dlg.mainWidget(); +- dlg.setButtons(KDialog::Ok|KDialog::Cancel); +- dlg.setDefaultButton(KDialog::Ok); +- dlg.setCaption(i18n("Add Silence")); +- +- QHBoxLayout* dlgLayout = new QHBoxLayout( widget ); +- dlgLayout->setMargin( 0 ); +- QLabel* label = new QLabel( i18n("Length of silence:"), widget ); +- K3b::MsfEdit* msfEdit = new K3b::MsfEdit( widget ); +- msfEdit->setValue( 150 ); // 2 seconds default +- msfEdit->setFocus(); +- dlgLayout->addWidget( label ); +- dlgLayout->addWidget( msfEdit ); +- +- if( dlg.exec() == QDialog::Accepted ) { +- K3b::AudioZeroData* zero = new K3b::AudioZeroData( msfEdit->value() ); +- if ( !tracks.isEmpty() ) +- tracks.first()->addSource( zero ); +- else +- zero->moveAfter( sources.first() ); +- } +- } ++ m_audioViewImpl->addSilence( currentSelection() ); + } + + + void K3b::AudioView::slotMergeTracks() + { +- QList tracks; +- QList sources; +- getSelectedItems( tracks, sources ); +- +- // we simply merge the selected tracks ignoring any eventually selected sources +- if ( !tracks.isEmpty() ) { +- K3b::AudioTrack* firstTrack = tracks.takeFirst(); +- while( !tracks.isEmpty() ) { +- firstTrack->merge( tracks.takeFirst(), firstTrack->lastSource() ); +- } +- } ++ m_audioViewImpl->mergeTracks( currentSelection() ); + } + + + void K3b::AudioView::slotSplitSource() + { +- QList tracks; +- QList sources; +- getSelectedItems( tracks, sources ); +- +- if( !sources.isEmpty() ) { +- K3b::AudioDataSource* source = sources.first(); +- // create a new track +- K3b::AudioTrack* track = new K3b::AudioTrack( m_doc ); +- K3b::AudioTrack* trackAfter = source->track(); +- if( trackAfter->numberSources() == 1 ) +- trackAfter = trackAfter->prev(); +- track->addSource( source->take() ); +- track->moveAfter( trackAfter ); +- +- // let's see if it's a file because in that case we can reuse the metainfo :) +- // TODO: maybe add meta data to sources +- if( K3b::AudioFile* file = dynamic_cast( track->firstSource() ) ) { +- track->setArtist( file->decoder()->metaInfo( K3b::AudioDecoder::META_ARTIST ) ); +- track->setTitle( file->decoder()->metaInfo( K3b::AudioDecoder::META_TITLE ) ); +- track->setSongwriter( file->decoder()->metaInfo( K3b::AudioDecoder::META_SONGWRITER ) ); +- track->setComposer( file->decoder()->metaInfo( K3b::AudioDecoder::META_COMPOSER ) ); +- track->setCdTextMessage( file->decoder()->metaInfo( K3b::AudioDecoder::META_COMMENT ) ); +- } +- } ++ m_audioViewImpl->splitSource( currentSelection() ); + } + + + void K3b::AudioView::slotSplitTrack() + { +- QList tracks; +- QList sources; +- getSelectedItems( tracks, sources ); +- +- if( !tracks.isEmpty() ) { +- K3b::AudioTrackSplitDialog::splitTrack( tracks.first(), this ); +- } ++ m_audioViewImpl->splitTrack( currentSelection() ); + } + + + void K3b::AudioView::slotEditSource() + { +- QList tracks; +- QList sources; +- getSelectedItems( tracks, sources ); +- +- K3b::AudioDataSource* source = 0; +- if( !sources.isEmpty() && tracks.isEmpty() ) +- source = sources.first(); +- else if( !tracks.isEmpty() && sources.isEmpty() ) +- source = tracks.first()->firstSource(); +- +- if( source ) { +- KDialog dlg( this ); +- dlg.setCaption( i18n("Edit Audio Track Source") ); +- dlg.setButtons( KDialog::Ok|KDialog::Cancel ); +- dlg.setDefaultButton( KDialog::Ok ); +- +- K3b::AudioDataSourceEditWidget* editW = new K3b::AudioDataSourceEditWidget( &dlg ); +- dlg.setMainWidget( editW ); +- editW->loadSource( source ); +- if( dlg.exec() == QDialog::Accepted ) { +- editW->saveSource(); +- } +- } ++ m_audioViewImpl->editSource( currentSelection() ); + } + + void K3b::AudioView::slotQueryMusicBrainz() + { +-#ifdef HAVE_MUSICBRAINZ +- QList tracks; +- QList sources; +- getSelectedItems( tracks, sources ); +- +- if( tracks.isEmpty() ) { +- KMessageBox::sorry( this, i18n("Please select an audio track.") ); +- return; +- } +- +- // only one may use the tracks at the same time +-// if( m_currentlyPlayingTrack && +-// tracks.containsRef( m_currentlyPlayingTrack ) ) +-// m_player->stop(); +- +- // now do the lookup on the files. +- K3b::AudioTrackTRMLookupDialog dlg( this ); +- dlg.lookup( tracks ); +-#endif ++ m_audioViewImpl->queryMusicBrainz( currentSelection() ); + } + void K3b::AudioView::slotTrackProperties() { @@ -3734,13 +3968,70 @@ diff -ru src/projects/k3baudioview.cpp src/projects/k3baudioview.cpp - else { - slotProperties(); - } -+ trackProperties( currentSelection() ); ++ m_audioViewImpl->properties( currentSelection() ); } void K3b::AudioView::slotAdjustColumns() -diff -ru src/projects/k3baudioview.h src/projects/k3baudioview.h ---- src/projects/k3baudioview.h 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3baudioview.h 2009-07-23 11:42:02.000000000 +0200 +@@ -496,20 +221,20 @@ + // minimal width for type, length, pregap + // fixed for filename + // expand for cd-text +- int titleWidth = m_columnAdjuster->columnSizeHint( K3b::AudioProjectModel::TitleColumn ); +- int artistWidth = m_columnAdjuster->columnSizeHint( K3b::AudioProjectModel::ArtistColumn ); +- int typeWidth = m_columnAdjuster->columnSizeHint( K3b::AudioProjectModel::TypeColumn ); +- int lengthWidth = m_columnAdjuster->columnSizeHint( K3b::AudioProjectModel::LengthColumn ); +- int filenameWidth = m_columnAdjuster->columnSizeHint( K3b::AudioProjectModel::FilenameColumn ); ++ int titleWidth = m_columnAdjuster->columnSizeHint( AudioProjectModel::TitleColumn ); ++ int artistWidth = m_columnAdjuster->columnSizeHint( AudioProjectModel::ArtistColumn ); ++ int typeWidth = m_columnAdjuster->columnSizeHint( AudioProjectModel::TypeColumn ); ++ int lengthWidth = m_columnAdjuster->columnSizeHint( AudioProjectModel::LengthColumn ); ++ int filenameWidth = m_columnAdjuster->columnSizeHint( AudioProjectModel::FilenameColumn ); + + // add a margin + typeWidth += 10; + lengthWidth += 10; + + // these always need to be completely visible +- fileView()->setColumnWidth( K3b::AudioProjectModel::TrackNumberColumn, m_columnAdjuster->columnSizeHint( K3b::AudioProjectModel::TrackNumberColumn ) ); +- fileView()->setColumnWidth( K3b::AudioProjectModel::TypeColumn, typeWidth ); +- fileView()->setColumnWidth( K3b::AudioProjectModel::LengthColumn, lengthWidth ); ++ fileView()->setColumnWidth( AudioProjectModel::TrackNumberColumn, m_columnAdjuster->columnSizeHint( AudioProjectModel::TrackNumberColumn ) ); ++ fileView()->setColumnWidth( AudioProjectModel::TypeColumn, typeWidth ); ++ fileView()->setColumnWidth( AudioProjectModel::LengthColumn, lengthWidth ); + + int remaining = fileView()->contentsRect().width() - typeWidth - lengthWidth - fileView()->columnWidth(0); + +@@ -517,19 +242,19 @@ + if( remaining >= artistWidth + titleWidth + filenameWidth ) { + remaining -= filenameWidth; + remaining -= (titleWidth + artistWidth); +- fileView()->setColumnWidth( K3b::AudioProjectModel::ArtistColumn, artistWidth + remaining/2 ); +- fileView()->setColumnWidth( K3b::AudioProjectModel::TitleColumn, titleWidth + remaining/2 ); +- fileView()->setColumnWidth( K3b::AudioProjectModel::FilenameColumn, filenameWidth ); ++ fileView()->setColumnWidth( AudioProjectModel::ArtistColumn, artistWidth + remaining/2 ); ++ fileView()->setColumnWidth( AudioProjectModel::TitleColumn, titleWidth + remaining/2 ); ++ fileView()->setColumnWidth( AudioProjectModel::FilenameColumn, filenameWidth ); + } + else if( remaining >= artistWidth + titleWidth + 20 ) { +- fileView()->setColumnWidth( K3b::AudioProjectModel::ArtistColumn, artistWidth ); +- fileView()->setColumnWidth( K3b::AudioProjectModel::TitleColumn, titleWidth ); +- fileView()->setColumnWidth( K3b::AudioProjectModel::FilenameColumn, remaining - artistWidth - titleWidth ); ++ fileView()->setColumnWidth( AudioProjectModel::ArtistColumn, artistWidth ); ++ fileView()->setColumnWidth( AudioProjectModel::TitleColumn, titleWidth ); ++ fileView()->setColumnWidth( AudioProjectModel::FilenameColumn, remaining - artistWidth - titleWidth ); + } + else { +- fileView()->setColumnWidth( K3b::AudioProjectModel::ArtistColumn, remaining/3 ); +- fileView()->setColumnWidth( K3b::AudioProjectModel::TitleColumn, remaining/3 ); +- fileView()->setColumnWidth( K3b::AudioProjectModel::FilenameColumn, remaining/3 ); ++ fileView()->setColumnWidth( AudioProjectModel::ArtistColumn, remaining/3 ); ++ fileView()->setColumnWidth( AudioProjectModel::TitleColumn, remaining/3 ); ++ fileView()->setColumnWidth( AudioProjectModel::FilenameColumn, remaining/3 ); + } + + m_updatingColumnWidths = false; +--- src/projects/k3baudioview.h ++++ src/projects/k3baudioview.h @@ -3,6 +3,7 @@ * Copyright (C) 2003-2007 Sebastian Trueg * (C) 2009 Arthur Mello @@ -3749,7 +4040,7 @@ diff -ru src/projects/k3baudioview.h src/projects/k3baudioview.h * * This file is part of the K3b project. * Copyright (C) 1998-2009 Sebastian Trueg -@@ -23,6 +24,7 @@ +@@ -23,12 +24,14 @@ #include @@ -3757,14 +4048,30 @@ diff -ru src/projects/k3baudioview.h src/projects/k3baudioview.h namespace K3b { -@@ -50,14 +52,20 @@ - protected: - ProjectBurnDialog* newBurnDialog( QWidget* parent = 0 ); + class AudioDoc; + class AudioTrack; + class AudioProjectModel; ++ class AudioViewImpl; + class ViewColumnAdjuster; -+ void getSelectedItems( QList& tracks, -+ QList& sources, -+ const QModelIndexList& indexes ); -+ + class AudioView : public StandardView +@@ -36,14 +39,12 @@ + Q_OBJECT + + public: +- AudioView( AudioDoc* pDoc, QWidget* parent ); ++ AudioView( AudioDoc* doc, QWidget* parent ); + ~AudioView(); + + //AudioTrackPlayer* player() const { return m_songlist->player(); } + AudioTrackPlayer* player() const { return 0; } + +- void getSelectedItems( QList& tracks, +- QList& sources ); + public Q_SLOTS: + void addUrls( const KUrl::List& ); + +@@ -53,13 +54,12 @@ /** * reimplemented from \ref K3b::StandardView */ @@ -3775,29 +4082,511 @@ diff -ru src/projects/k3baudioview.h src/projects/k3baudioview.h void init(); private Q_SLOTS: -+ void slotItemActivated( const QModelIndex& index ); - void slotAudioConversion(); - +- void slotAudioConversion(); +- // action slots -@@ -74,6 +82,7 @@ + void slotAddSilence(); + void slotRemove(); +@@ -73,21 +73,11 @@ + void slotAdjustColumns(); private: - void setupActions(); -+ void trackProperties( const QModelIndexList& indexes ); - +- void setupActions(); +- AudioDoc* m_doc; - K3b::AudioProjectModel* m_model; -@@ -86,6 +95,7 @@ - KAction* m_actionSplitTrack; - KAction* m_actionEditSource; - KAction* m_actionPlayTrack; -+ KMenu* m_popupMenu; +- K3b::AudioProjectModel* m_model; +- +- KAction* m_actionProperties; +- KAction* m_actionRemove; +- KAction* m_actionAddSilence; +- KAction* m_actionMergeTracks; +- KAction* m_actionSplitSource; +- KAction* m_actionSplitTrack; +- KAction* m_actionEditSource; +- KAction* m_actionPlayTrack; ++ AudioProjectModel* m_model; ++ AudioViewImpl* m_audioViewImpl; - K3b::ViewColumnAdjuster* m_columnAdjuster; +- K3b::ViewColumnAdjuster* m_columnAdjuster; ++ ViewColumnAdjuster* m_columnAdjuster; bool m_updatingColumnWidths; -diff -ru src/projects/k3bdataburndialog.cpp src/projects/k3bdataburndialog.cpp ---- src/projects/k3bdataburndialog.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bdataburndialog.cpp 2009-07-23 11:42:02.000000000 +0200 + }; + } +--- src/projects/k3baudioviewimpl.cpp ++++ src/projects/k3baudioviewimpl.cpp +@@ -0,0 +1,378 @@ ++/* ++ * ++ * Copyright (C) 2003-2008 Sebastian Trueg ++ * Copyright (C) 2009 Arthur Mello ++ * Copyright (C) 2009 Gustavo Pichorim Boiko ++ * Copyright (C) 2009 Michal Malek ++ * ++ * This file is part of the K3b project. ++ * Copyright (C) 1998-2009 Sebastian Trueg ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * See the file "COPYING" for the exact licensing terms. ++ */ ++ ++#include "k3baudioviewimpl.h" ++ ++#include "k3baction.h" ++#include "k3baudiodatasourceeditwidget.h" ++#include "k3baudiodecoder.h" ++#include "k3baudiofile.h" ++#include "k3baudioprojectmodel.h" ++#include "k3baudiotrack.h" ++#include "k3baudiotrackaddingdialog.h" ++#include "k3baudiotrackdialog.h" ++#include "k3baudiotracksplitdialog.h" ++#include "k3baudiozerodata.h" ++#include "k3bmsfedit.h" ++#include "k3bview.h" ++// this is not here becasue of base_*.ui troubles ++#include "../rip/k3baudioprojectconvertingdialog.h" ++ ++#include ++ ++#include ++#include ++#include ++#include ++ ++ ++K3b::AudioViewImpl::AudioViewImpl( View* view, AudioDoc* doc, AudioProjectModel* model, KActionCollection* actionCollection ) ++ : QObject( view ), m_view( view ), m_doc( doc ), m_model( model ) ++{ ++ m_actionAddSilence = createAction( m_view, i18n("Add Silence..."), 0, 0, 0, 0, ++ actionCollection, "track_add_silence" ); ++ m_actionMergeTracks = createAction( m_view, i18n("Merge Tracks"), 0, 0, 0, 0, ++ actionCollection, "track_merge" ); ++ m_actionSplitSource = createAction( m_view, i18n("Source to Track"), 0, 0, 0, 0, ++ actionCollection, "source_split" ); ++ m_actionSplitTrack = createAction( m_view, i18n("Split Track..."), 0, 0, 0, 0, ++ actionCollection, "track_split" ); ++ m_actionEditSource = createAction( m_view, i18n("Edit Source..."), 0, 0, 0, 0, ++ actionCollection, "edit_source" ); ++ m_actionPlayTrack = createAction( m_view, i18n("Play Track"), "media-playback-start", 0, 0, 0, ++ actionCollection, "track_play" ); ++ m_actionMusicBrainz = createAction( m_view, i18n("Musicbrainz Lookup"), "musicbrainz", 0, 0, 0, ++ actionCollection, "project_audio_musicbrainz"); ++ m_actionMusicBrainz->setToolTip( i18n("Try to determine meta information over the Internet") ); ++ m_actionProperties = createAction( m_view, i18n("Properties"), "document-properties", 0, 0, 0, ++ actionCollection, "track_properties" ); ++ m_actionRemove = createAction( m_view, i18n("Remove"), "edit-delete", Qt::Key_Delete, 0, 0, ++ actionCollection, "track_remove" ); ++ m_conversionAction = createAction( m_view, i18n("Convert Tracks"), "edit-redo", 0, this, SLOT(slotAudioConversion()), ++ actionCollection, "project_audio_convert" ); ++ ++ // Create audio context menu ++ m_popupMenu = new KMenu( m_view ); ++ m_popupMenu->addAction( m_actionPlayTrack ); ++ m_popupMenu->addSeparator(); ++ m_popupMenu->addAction( m_actionRemove ); ++ m_popupMenu->addAction( m_actionAddSilence ); ++ m_popupMenu->addSeparator(); ++ m_popupMenu->addAction( m_actionSplitSource ); ++ m_popupMenu->addAction( m_actionSplitTrack ); ++ m_popupMenu->addAction( m_actionEditSource ); ++ m_popupMenu->addAction( m_actionMergeTracks ); ++ m_popupMenu->addAction( m_actionProperties ); ++ m_popupMenu->addSeparator(); ++ m_popupMenu->addAction( m_actionMusicBrainz ); ++ m_popupMenu->addSeparator(); ++ m_popupMenu->addAction( actionCollection->action("project_burn") ); ++ ++#ifndef HAVE_MUSICBRAINZ ++ m_actionMusicBrainz->setEnabled( false ); ++ m_actionMusicBrainz->setVisible( false ); ++#endif ++ ++#ifdef __GNUC__ ++#warning enable player once ported to Phonon ++#endif ++ m_actionPlayTrack->setEnabled( false ); ++ m_actionPlayTrack->setVisible( false ); ++} ++ ++ ++void K3b::AudioViewImpl::addUrls( const KUrl::List& urls ) ++{ ++ AudioTrackAddingDialog::addUrls( urls, m_doc, 0, 0, 0, m_view ); ++} ++ ++ ++void K3b::AudioViewImpl::remove( const QModelIndexList& indexes ) ++{ ++ QList tracks; ++ QList sources; ++ tracksForIndexes( tracks, indexes ); ++ sourcesForIndexes( sources, indexes ); ++ ++ // ++ // remove all sources which belong to one of the selected tracks since they will be ++ // deleted along with their tracks ++ // ++ QList::iterator srcIt = sources.begin(); ++ while( srcIt != sources.end() ) { ++ if( tracks.contains( ( *srcIt )->track() ) ) ++ srcIt = sources.erase( srcIt ); ++ else ++ ++srcIt; ++ } ++ ++ // ++ // Now delete all the tracks ++ // ++ qDeleteAll( tracks ); ++ ++ // ++ // Now delete all the sources ++ // ++ qDeleteAll( sources ); ++} ++ ++ ++void K3b::AudioViewImpl::addSilence( const QModelIndexList& indexes ) ++{ ++ QList tracks; ++ QList sources; ++ tracksForIndexes( tracks, indexes ); ++ sourcesForIndexes( sources, indexes ); ++ ++ if( !sources.isEmpty() || !tracks.isEmpty() ) { ++ // ++ // create a simple dialog for asking the length of the silence ++ // ++ KDialog dlg( m_view ); ++ QWidget* widget = dlg.mainWidget(); ++ dlg.setButtons(KDialog::Ok|KDialog::Cancel); ++ dlg.setDefaultButton(KDialog::Ok); ++ dlg.setCaption(i18n("Add Silence")); ++ ++ QHBoxLayout* dlgLayout = new QHBoxLayout( widget ); ++ dlgLayout->setMargin( 0 ); ++ QLabel* label = new QLabel( i18n("Length of silence:"), widget ); ++ MsfEdit* msfEdit = new MsfEdit( widget ); ++ msfEdit->setValue( 150 ); // 2 seconds default ++ msfEdit->setFocus(); ++ dlgLayout->addWidget( label ); ++ dlgLayout->addWidget( msfEdit ); ++ ++ if( dlg.exec() == QDialog::Accepted ) { ++ AudioZeroData* zero = new AudioZeroData( msfEdit->value() ); ++ if ( !tracks.isEmpty() ) ++ tracks.first()->addSource( zero ); ++ else ++ zero->moveAfter( sources.first() ); ++ } ++ } ++} ++ ++ ++void K3b::AudioViewImpl::mergeTracks( const QModelIndexList& indexes ) ++{ ++ QList tracks; ++ tracksForIndexes( tracks, indexes ); ++ ++ // we simply merge the selected tracks ignoring any eventually selected sources ++ if ( !tracks.isEmpty() ) { ++ AudioTrack* firstTrack = tracks.takeFirst(); ++ while( !tracks.isEmpty() ) { ++ firstTrack->merge( tracks.takeFirst(), firstTrack->lastSource() ); ++ } ++ } ++} ++ ++ ++void K3b::AudioViewImpl::splitSource( const QModelIndexList& indexes ) ++{ ++ QList sources; ++ sourcesForIndexes( sources, indexes ); ++ ++ if( !sources.isEmpty() ) { ++ AudioDataSource* source = sources.first(); ++ // create a new track ++ AudioTrack* track = new AudioTrack( m_doc ); ++ AudioTrack* trackAfter = source->track(); ++ if( trackAfter->numberSources() == 1 ) ++ trackAfter = trackAfter->prev(); ++ track->addSource( source->take() ); ++ track->moveAfter( trackAfter ); ++ ++ // let's see if it's a file because in that case we can reuse the metainfo :) ++ // TODO: maybe add meta data to sources ++ if( AudioFile* file = dynamic_cast( track->firstSource() ) ) { ++ track->setArtist( file->decoder()->metaInfo( AudioDecoder::META_ARTIST ) ); ++ track->setTitle( file->decoder()->metaInfo( AudioDecoder::META_TITLE ) ); ++ track->setSongwriter( file->decoder()->metaInfo( AudioDecoder::META_SONGWRITER ) ); ++ track->setComposer( file->decoder()->metaInfo( AudioDecoder::META_COMPOSER ) ); ++ track->setCdTextMessage( file->decoder()->metaInfo( AudioDecoder::META_COMMENT ) ); ++ } ++ } ++} ++ ++ ++void K3b::AudioViewImpl::splitTrack( const QModelIndexList& indexes ) ++{ ++ QList tracks; ++ tracksForIndexes( tracks, indexes ); ++ ++ if( !tracks.isEmpty() ) { ++ AudioTrackSplitDialog::splitTrack( tracks.first(), m_view ); ++ } ++} ++ ++ ++void K3b::AudioViewImpl::editSource( const QModelIndexList& indexes ) ++{ ++ QList tracks; ++ QList sources; ++ tracksForIndexes( tracks, indexes ); ++ sourcesForIndexes( sources, indexes ); ++ ++ AudioDataSource* source = 0; ++ if( !sources.isEmpty() && tracks.isEmpty() ) ++ source = sources.first(); ++ else if( !tracks.isEmpty() && sources.isEmpty() ) ++ source = tracks.first()->firstSource(); ++ ++ if( source ) { ++ KDialog dlg( m_view ); ++ dlg.setCaption( i18n("Edit Audio Track Source") ); ++ dlg.setButtons( KDialog::Ok|KDialog::Cancel ); ++ dlg.setDefaultButton( KDialog::Ok ); ++ ++ AudioDataSourceEditWidget* editW = new AudioDataSourceEditWidget( &dlg ); ++ dlg.setMainWidget( editW ); ++ editW->loadSource( source ); ++ if( dlg.exec() == QDialog::Accepted ) { ++ editW->saveSource(); ++ } ++ } ++} ++ ++ ++void K3b::AudioViewImpl::properties( const QModelIndexList& indexes ) ++{ ++ QList tracks; ++ tracksForIndexes( tracks, indexes ); ++ ++ // TODO: add tracks from sources to tracks ++ ++ if( !tracks.isEmpty() ) { ++ AudioTrackDialog d( tracks, m_view ); ++ d.exec(); ++ } ++ else { ++ m_view->slotProperties(); ++ } ++} ++ ++ ++void K3b::AudioViewImpl::queryMusicBrainz( const QModelIndexList& indexes ) ++{ ++#ifdef HAVE_MUSICBRAINZ ++ QList tracks; ++ tracksForIndexes( tracks, indexes ); ++ ++ if( tracks.isEmpty() ) { ++ KMessageBox::sorry( this, i18n("Please select an audio track.") ); ++ return; ++ } ++ ++ // only one may use the tracks at the same time ++// if( m_currentlyPlayingTrack && ++// tracks.containsRef( m_currentlyPlayingTrack ) ) ++// m_player->stop(); ++ ++ // now do the lookup on the files. ++ AudioTrackTRMLookupDialog dlg( this ); ++ dlg.lookup( tracks ); ++#else ++ Q_UNUSED( indexes ); ++#endif ++} ++ ++ ++void K3b::AudioViewImpl::slotSelectionChanged( const QModelIndexList& indexes ) ++{ ++ QList tracks; ++ QList sources; ++ tracksForIndexes( tracks, indexes ); ++ sourcesForIndexes( sources, indexes ); ++ ++ int numTracks = tracks.count(); ++ int numSources = sources.count(); ++ ++ if( m_actionPlayTrack != 0 ) { ++ m_actionPlayTrack->setVisible( numTracks >= 1 ); ++ } ++ m_actionRemove->setVisible( numTracks + numSources ); ++ m_actionAddSilence->setVisible( numSources + numTracks == 1 ); ++ ++ if( numSources == 1 && numTracks == 0 ) { ++ m_actionSplitSource->setVisible( true ); ++ m_actionSplitTrack->setVisible( false ); ++ m_actionEditSource->setVisible( true ); ++ m_actionMergeTracks->setVisible( false ); ++ } ++ else if( numTracks == 1 && numSources == 0 ) { ++ m_actionSplitSource->setVisible( false ); ++ m_actionSplitTrack->setVisible( tracks.first()->length().lba() > 60 ); ++ m_actionEditSource->setVisible( true ); ++ m_actionMergeTracks->setVisible( false ); ++ } ++ else { ++ m_actionSplitSource->setVisible( false ); ++ m_actionSplitTrack->setVisible( false ); ++ m_actionEditSource->setVisible( false ); ++ m_actionMergeTracks->setVisible( numTracks > 1 ); ++ } ++} ++ ++ ++void K3b::AudioViewImpl::slotItemActivated( const QModelIndex& index ) ++{ ++ properties( QModelIndexList() << index ); ++} ++ ++ ++void K3b::AudioViewImpl::slotAudioConversion() ++{ ++ AudioProjectConvertingDialog dlg( m_doc, m_view ); ++ dlg.exec(); ++} ++ ++ ++void K3b::AudioViewImpl::tracksForIndexes( QList& tracks, ++ const QModelIndexList& indexes ) const ++{ ++ tracks.clear(); ++ ++ foreach( const QModelIndex& index, indexes ) { ++ if ( AudioTrack* track = m_model->trackForIndex( index ) ) { ++ tracks << track; ++ } ++ } ++} ++ ++ ++void K3b::AudioViewImpl::sourcesForIndexes( QList& sources, ++ const QModelIndexList& indexes ) const ++{ ++ sources.clear(); ++ ++ foreach( const QModelIndex& index, indexes ) { ++ if ( AudioDataSource* source = m_model->sourceForIndex( index ) ) { ++#ifdef __GNUC__ ++#warning Do not select hidden sources once the hiding of sources works again ++#endif ++ // do not select hidden source items or unfinished source files ++ if( source->isValid() && source->length() != 0 ) { ++ sources << source; ++ } ++ } ++ } ++} ++ ++#include "k3baudioviewimpl.moc" +--- src/projects/k3baudioviewimpl.h ++++ src/projects/k3baudioviewimpl.h +@@ -0,0 +1,89 @@ ++/* ++ * ++ * Copyright (C) 2009 Michal Malek ++ * ++ * This file is part of the K3b project. ++ * Copyright (C) 1998-2009 Sebastian Trueg ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * See the file "COPYING" for the exact licensing terms. ++ */ ++ ++#ifndef K3B_AUDIO_VIEW_IMPL_H ++#define K3B_AUDIO_VIEW_IMPL_H ++ ++#include ++#include ++#include ++#include ++ ++class KAction; ++class KActionCollection; ++class KMenu; ++ ++namespace K3b { ++ class AudioDataSource; ++ class AudioDoc; ++ class AudioProjectModel; ++ class AudioTrack; ++ class View; ++ ++ /** ++ * This class was created to share code and behaviour between \ref K3b::AudioView and \ref K3b::MixedView. ++ */ ++ class AudioViewImpl : public QObject ++ { ++ Q_OBJECT ++ ++ public: ++ AudioViewImpl( View* view, AudioDoc* doc, AudioProjectModel* model, KActionCollection* actionCollection ); ++ ++ void addUrls( const KUrl::List& urls ); ++ void remove( const QModelIndexList& indexes ); ++ void addSilence( const QModelIndexList& indexes ); ++ void mergeTracks( const QModelIndexList& indexes ); ++ void splitSource( const QModelIndexList& indexes ); ++ void splitTrack( const QModelIndexList& indexes ); ++ void editSource( const QModelIndexList& indexes ); ++ void properties( const QModelIndexList& indexes ); ++ void queryMusicBrainz( const QModelIndexList& indexes ); ++ ++ KMenu* popupMenu() const { return m_popupMenu; } ++ ++ public Q_SLOTS: ++ void slotSelectionChanged( const QModelIndexList& indexes ); ++ void slotItemActivated( const QModelIndex& index ); ++ ++ private Q_SLOTS: ++ void slotAudioConversion(); ++ ++ private: ++ void tracksForIndexes( QList& tracks, ++ const QModelIndexList& indexes ) const; ++ void sourcesForIndexes( QList& sources, ++ const QModelIndexList& indexes ) const; ++ ++ private: ++ View* m_view; ++ AudioDoc* m_doc; ++ AudioProjectModel* m_model; ++ ++ KMenu* m_popupMenu; ++ KAction* m_actionAddSilence; ++ KAction* m_actionMergeTracks; ++ KAction* m_actionSplitSource; ++ KAction* m_actionSplitTrack; ++ KAction* m_actionEditSource; ++ KAction* m_actionPlayTrack; ++ KAction* m_actionMusicBrainz; ++ KAction* m_actionProperties; ++ KAction* m_actionRemove; ++ KAction* m_conversionAction; ++ }; ++ ++} // namespace K3b ++ ++#endif +--- src/projects/k3bdataburndialog.cpp ++++ src/projects/k3bdataburndialog.cpp @@ -153,8 +153,10 @@ QWidget* frame = new QWidget( this ); QGridLayout* frameLayout = new QGridLayout( frame ); @@ -3810,9 +4599,8 @@ diff -ru src/projects/k3bdataburndialog.cpp src/projects/k3bdataburndialog.cpp QGroupBox* groupMultiSession = new QGroupBox( i18n("Multisession Mode"), frame ); m_comboMultisession = new K3b::DataMultiSessionCombobox( groupMultiSession ); -diff -ru src/projects/k3bdataburndialog.h src/projects/k3bdataburndialog.h ---- src/projects/k3bdataburndialog.h 2009-02-24 08:23:40.000000000 +0100 -+++ src/projects/k3bdataburndialog.h 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bdataburndialog.h ++++ src/projects/k3bdataburndialog.h @@ -1,9 +1,9 @@ /* * @@ -3847,9 +4635,8 @@ diff -ru src/projects/k3bdataburndialog.h src/projects/k3bdataburndialog.h DataModeWidget* m_dataModeWidget; DataMultiSessionCombobox* m_comboMultisession; -diff -ru src/projects/k3bdataprojectmodel.cpp src/projects/k3bdataprojectmodel.cpp ---- src/projects/k3bdataprojectmodel.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bdataprojectmodel.cpp 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bdataprojectmodel.cpp ++++ src/projects/k3bdataprojectmodel.cpp @@ -187,6 +187,19 @@ if ( index.isValid() ) { K3b::DataItem* item = itemForIndex( index ); @@ -3889,9 +4676,8 @@ diff -ru src/projects/k3bdataprojectmodel.cpp src/projects/k3bdataprojectmodel.c break; case TypeColumn: -diff -ru src/projects/k3bdataview.cpp src/projects/k3bdataview.cpp ---- src/projects/k3bdataview.cpp 2009-04-26 11:20:20.000000000 +0200 -+++ src/projects/k3bdataview.cpp 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bdataview.cpp ++++ src/projects/k3bdataview.cpp @@ -2,6 +2,7 @@ * * Copyright (C) 2003-2008 Sebastian Trueg @@ -3900,24 +4686,91 @@ diff -ru src/projects/k3bdataview.cpp src/projects/k3bdataview.cpp * * This file is part of the K3b project. * Copyright (C) 1998-2009 Sebastian Trueg -@@ -28,7 +29,6 @@ - #include "k3bdeviceselectiondialog.h" - #include "k3bfillstatusdisplay.h" - #include "k3bcore.h" --#include "k3bprojectplugin.h" - #include "k3bvalidators.h" - #include "k3baction.h" +@@ -15,44 +16,24 @@ -@@ -68,31 +68,12 @@ - setModel(m_model); + + #include "k3bdataview.h" ++#include "k3bdataburndialog.h" + #include "k3bdatadoc.h" + #include "k3bdataprojectmodel.h" +-#include "k3bmodeltypes.h" +-#include "k3bdataburndialog.h" +-#include "k3bbootimageview.h" +-#include "k3bdataurladdingdialog.h" +-#include "k3bdatamultisessionimportdialog.h" +-#include "k3bdatapropertiesdialog.h" +-#include "k3bdiritem.h" +-#include "k3bdevice.h" +-#include "k3bdeviceselectiondialog.h" +-#include "k3bfillstatusdisplay.h" +-#include "k3bcore.h" +-#include "k3bprojectplugin.h" ++#include "k3bdataviewimpl.h" + #include "k3bvalidators.h" +-#include "k3baction.h" + + #include +-#include ++#include + #include +-#include +-#include +-#include +-#include ++#include + #include + #include +-#include +-#include + #include + #include + ++#include + #include + #include +-#include +-#include +-#include +-#include +-#include + + + K3b::DataView::DataView(K3b::DataDoc* doc, QWidget *parent ) +@@ -62,49 +43,53 @@ + // FIXME: allow sorting by clicking fileview headers + + m_doc = doc; +- +- m_model = new K3b::DataProjectModel(doc, this); +- // set the model for the K3b::StandardView's views +- setModel(m_model); ++ m_model = new DataProjectModel(doc, this); ++ m_dataViewImpl = new DataViewImpl( this, m_doc, m_model, actionCollection() ); connect( m_doc, SIGNAL(changed()), this, SLOT(slotDocChanged()) ); -+ connect( this, SIGNAL(currentRootChanged(QModelIndex)), SLOT(slotCurrentRootChanged(QModelIndex)) ); -+ connect( this, SIGNAL(activated(QModelIndex)), SLOT(slotFileItemActivated(QModelIndex)) ); ++ connect( this, SIGNAL(currentRootChanged(QModelIndex)), ++ m_dataViewImpl, SLOT(slotCurrentRootChanged(QModelIndex)) ); ++ connect( this, SIGNAL(activated(QModelIndex)), ++ m_dataViewImpl, SLOT(slotItemActivated(QModelIndex)) ); ++ connect( m_dataViewImpl, SIGNAL(setCurrentRoot(QModelIndex)), ++ this, SLOT(setCurrentRoot(QModelIndex)) ); ++ ++ // Connect data actions ++ connect( actionCollection()->action( "new_dir" ), SIGNAL( triggered() ), ++ this, SLOT(slotNewDir()) ); ++ connect( actionCollection()->action( "remove" ), SIGNAL( triggered() ), ++ this, SLOT(slotRemove()) ); ++ connect( actionCollection()->action( "rename" ), SIGNAL( triggered() ), ++ this, SLOT(slotRenameItem()) ); ++ connect( actionCollection()->action( "parent_dir" ), SIGNAL( triggered() ), ++ this, SLOT(slotParentDir()) ); ++ connect( actionCollection()->action( "properties" ), SIGNAL( triggered() ), ++ this, SLOT(slotItemProperties()) ); ++ connect( actionCollection()->action( "open" ), SIGNAL( triggered() ), ++ this, SLOT(slotOpen()) ); - setupContextMenu(); -+ setupActions(); - +- - // the data actions - KAction* actionImportSession = K3b::createAction( this, i18n("&Import Session..."), "document-import", 0, this, SLOT(importSession()), - actionCollection(), "project_data_import_session" ); @@ -3935,167 +4788,270 @@ diff -ru src/projects/k3bdataview.cpp src/projects/k3bdataview.cpp - toolBox()->addAction( actionImportSession ); - toolBox()->addAction( actionClearSession ); - toolBox()->addAction( actionEditBootImages ); -- toolBox()->addSeparator(); ++ m_volumeIDEdit = new QLineEdit( doc->isoOptions().volumeID(), toolBox() ); ++ m_volumeIDEdit->setValidator( new Latin1Validator( m_volumeIDEdit ) ); ++ ++ // Setup toolbar ++ toolBox()->addAction( actionCollection()->action( "project_data_import_session" ) ); ++ toolBox()->addAction( actionCollection()->action( "project_data_clear_imported_session" ) ); ++ toolBox()->addAction( actionCollection()->action( "project_data_edit_boot_images" ) ); + toolBox()->addSeparator(); - toolBox()->addAction( actionCollection()->action("parent_dir") ); -- toolBox()->addSeparator(); ++ toolBox()->addAction( actionCollection()->action( "parent_dir" ) ); + toolBox()->addSeparator(); - - addPluginButtons( K3b::ProjectPlugin::DATA_CD ); +- +- m_volumeIDEdit = new QLineEdit( doc->isoOptions().volumeID(), toolBox() ); +- m_volumeIDEdit->setValidator( new K3b::Latin1Validator( m_volumeIDEdit ) ); + addPluginButtons(); - - m_volumeIDEdit = new QLineEdit( doc->isoOptions().volumeID(), toolBox() ); - m_volumeIDEdit->setValidator( new K3b::Latin1Validator( m_volumeIDEdit ) ); -@@ -101,6 +82,9 @@ + toolBox()->addWidget( new QLabel( i18n("Volume Name:"), toolBox() ) ); + toolBox()->addWidget( m_volumeIDEdit ); connect( m_volumeIDEdit, SIGNAL(textChanged(const QString&)), - m_doc, - SLOT(setVolumeID(const QString&)) ); +- m_doc, +- SLOT(setVolumeID(const QString&)) ); ++ m_doc, SLOT(setVolumeID(const QString&)) ); + -+ // Update actions associated with current directory -+ slotCurrentRootChanged( currentRoot() ); ++ // set the model for the StandardView's views ++ setModel(m_model); // this is just for testing (or not?) // most likely every project type will have it's rc file in the future -@@ -182,8 +166,22 @@ - DataUrlAddingDialog::addUrls( urls, item); +- // we only add the additional actions since K3b::View already added the default actions ++ // we only add the additional actions since View already added the default actions + setXML( "" + "" + "" +@@ -125,30 +110,25 @@ + + void K3b::DataView::importSession() + { +- K3b::DataMultisessionImportDialog::importSession( m_doc, this ); ++ m_dataViewImpl->slotImportSession(); } --void K3b::DataView::setupContextMenu() -+void K3b::DataView::setupActions() + + void K3b::DataView::clearImportedSession() { -+ // the data actions -+ m_actionImportSession = K3b::createAction( this, i18n("&Import Session..."), "document-import", 0, this, SLOT(importSession()), -+ actionCollection(), "project_data_import_session" ); -+ m_actionClearSession = K3b::createAction( this, i18n("&Clear Imported Session"), "edit-clear", 0, this, -+ SLOT(clearImportedSession()), actionCollection(), -+ "project_data_clear_imported_session" ); -+ m_actionEditBootImages = K3b::createAction( this, i18n("&Edit Boot Images..."), "document-properties", 0, this, -+ SLOT(editBootImages()), actionCollection(), -+ "project_data_edit_boot_images" ); -+ -+ m_actionImportSession->setToolTip( i18n("Import a previously burned session into the current project") ); -+ m_actionClearSession->setToolTip( i18n("Remove the imported items from a previous session") ); -+ m_actionEditBootImages->setToolTip( i18n("Modify the bootable settings of the current project") ); -+ - m_actionProperties = new KAction( this ); - m_actionProperties->setText( i18n("Properties") ); - m_actionProperties->setIcon( KIcon( "document-properties" ) ); -@@ -205,7 +203,16 @@ - actionCollection(), "parent_dir" ); - m_actionOpen = K3b::createAction( this, i18n("Open"), "document-open", 0, this, SLOT(slotOpen()), - actionCollection(), "open" ); +- m_doc->clearImportedSession(); ++ m_dataViewImpl->slotClearImportedSession(); + } + + + void K3b::DataView::editBootImages() + { +- KDialog dlg( this ); +- dlg.setCaption( i18n("Edit Boot Images") ); +- dlg.setButtons( KDialog::Ok ); +- dlg.setDefaultButton( KDialog::Ok ); +- dlg.setMainWidget( new K3b::BootImageView( m_doc, &dlg ) ); +- dlg.exec(); ++ m_dataViewImpl->slotEditBootImages(); + } + + + K3b::ProjectBurnDialog* K3b::DataView::newBurnDialog( QWidget* parent ) + { +- return new K3b::DataBurnDialog( m_doc, parent ); ++ return new DataBurnDialog( m_doc, parent ); + } + + +@@ -159,7 +139,7 @@ + i18n("No Data to Burn"), QString(), false ); + } + else { +- K3b::ProjectBurnDialog* dlg = newBurnDialog( this ); ++ ProjectBurnDialog* dlg = newBurnDialog( this ); + dlg->execBurnDialog(true); + delete dlg; + } +@@ -176,169 +156,37 @@ + + void K3b::DataView::addUrls( const KUrl::List& urls ) + { +- DirItem *item = dynamic_cast(m_model->itemForIndex(currentRoot())); +- if (!item) +- item = m_doc->root(); +- DataUrlAddingDialog::addUrls( urls, item); +-} +- +-void K3b::DataView::setupContextMenu() +-{ +- m_actionProperties = new KAction( this ); +- m_actionProperties->setText( i18n("Properties") ); +- m_actionProperties->setIcon( KIcon( "document-properties" ) ); +- connect( m_actionProperties, SIGNAL( triggered() ), this, SLOT(slotItemProperties()) ); +- actionCollection()->addAction( "properties", m_actionProperties ); +- +- m_actionNewDir = new KAction( this ); +- m_actionNewDir->setText( i18n("New Directory...") ); +- m_actionNewDir->setIcon( KIcon( "folder-new" ) ); +- m_actionNewDir->setShortcut( Qt::CTRL+Qt::Key_N ); +- connect( m_actionNewDir, SIGNAL( triggered() ), this, SLOT(slotNewDir()) ); +- actionCollection()->addAction( "new_dir", m_actionNewDir ); +- +- m_actionRemove = K3b::createAction( this, i18n("Remove"), "edit-delete", Qt::Key_Delete, this, SLOT(slotRemoveSelectedIndexes()), +- actionCollection(), "remove" ); +- m_actionRename = K3b::createAction( this, i18n("Rename"), "edit-rename", Qt::Key_F2, this, SLOT(slotRenameItem()), +- actionCollection(), "rename" ); +- m_actionParentDir = K3b::createAction( this, i18n("Parent Directory"), "go-up", 0, this, SLOT(slotParentDir()), +- actionCollection(), "parent_dir" ); +- m_actionOpen = K3b::createAction( this, i18n("Open"), "document-open", 0, this, SLOT(slotOpen()), +- actionCollection(), "open" ); +- +- m_popupMenu = new KMenu( this ); +- m_popupMenu->addAction( m_actionParentDir ); +- m_popupMenu->addSeparator(); +- m_popupMenu->addAction( m_actionRename ); +- m_popupMenu->addAction( m_actionRemove ); +- m_popupMenu->addAction( m_actionNewDir ); +- m_popupMenu->addSeparator(); +- m_popupMenu->addAction( m_actionOpen ); +- m_popupMenu->addSeparator(); +- m_popupMenu->addAction( m_actionProperties ); +- m_popupMenu->addSeparator(); +- m_popupMenu->addAction( actionCollection()->action("project_burn") ); +-} - -+ -+ // Setup toolbar -+ toolBox()->addAction( m_actionImportSession ); -+ toolBox()->addAction( m_actionClearSession ); -+ toolBox()->addAction( m_actionEditBootImages ); -+ toolBox()->addSeparator(); -+ toolBox()->addAction( m_actionParentDir ); -+ toolBox()->addSeparator(); -+ -+ // Create context menu - m_popupMenu = new KMenu( this ); - m_popupMenu->addAction( m_actionParentDir ); - m_popupMenu->addSeparator(); -@@ -220,20 +227,21 @@ - m_popupMenu->addAction( actionCollection()->action("project_burn") ); - } - -void K3b::DataView::contextMenuForSelection(const QModelIndexList &selectedIndexes, const QPoint &pos) -+ -+void K3b::DataView::selectionChanged( const QModelIndexList& indexes ) - { +-{ - bool open = true, rename = true, remove = true, parent = true; -+ bool open = true, rename = true, remove = true; - - // we can only rename one item at a time - // also, we can only create a new dir over a single directory +- +- // we can only rename one item at a time +- // also, we can only create a new dir over a single directory - if (selectedIndexes.count() > 1) -+ if (indexes.count() > 1) - { - rename = false; - open = false; - } +- { +- rename = false; +- open = false; +- } - else if (selectedIndexes.count() == 1) -+ else if (indexes.count() == 1) - { +- { - QModelIndex index = selectedIndexes.first(); -+ QModelIndex index = indexes.first(); - rename = (index.flags() & Qt::ItemIsEditable); - open = (index.data(K3b::ItemTypeRole).toInt() == (int) K3b::FileItemType); - } -@@ -245,7 +253,7 @@ - } +- rename = (index.flags() & Qt::ItemIsEditable); +- open = (index.data(K3b::ItemTypeRole).toInt() == (int) K3b::FileItemType); +- } +- else // selectedIndex.count() == 0 +- { +- remove = false; +- rename = false; +- open = false; +- } ++ m_dataViewImpl->addUrls( currentRoot(), urls ); ++} - // check if all selected items can be removed +- // check if all selected items can be removed - foreach(const QModelIndex &index, selectedIndexes) -+ foreach(const QModelIndex &index, indexes) - { - if (!index.data(K3b::CustomFlagsRole).toInt() & K3b::ItemIsRemovable) - { -@@ -254,17 +262,18 @@ - } - } +- { +- if (!index.data(K3b::CustomFlagsRole).toInt() & K3b::ItemIsRemovable) +- { +- remove = false; +- break; +- } +- } - if (m_model->indexForItem(m_doc->root()) == currentRoot()) - parent = false; -- - m_actionRename->setEnabled( rename ); - m_actionRemove->setEnabled( remove ); - m_actionOpen->setEnabled( open ); -- m_actionParentDir->setEnabled( parent ); ++void K3b::DataView::selectionChanged( const QModelIndexList& indexes ) ++{ ++ m_dataViewImpl->slotSelectionChanged( indexes ); +} +- m_actionRename->setEnabled( rename ); +- m_actionRemove->setEnabled( remove ); +- m_actionOpen->setEnabled( open ); +- m_actionParentDir->setEnabled( parent ); + - m_popupMenu->exec(pos); -+ +void K3b::DataView::contextMenu( const QPoint& pos ) +{ -+ m_popupMenu->exec( pos ); ++ m_dataViewImpl->popupMenu()->exec( pos ); } + void K3b::DataView::slotNewDir() { - K3b::DirItem *parent = 0; -@@ -297,6 +306,7 @@ - m_doc->addEmptyDir( name, parent ); +- K3b::DirItem *parent = 0; +- QModelIndex index = currentRoot(); +- +- if (index.isValid()) +- parent = dynamic_cast(m_model->itemForIndex(index)); +- +- if (!parent) +- parent = m_doc->root(); +- +- QString name; +- bool ok; +- +- name = KInputDialog::getText( i18n("New Directory"), +- i18n("Please insert the name for the new directory:"), +- i18n("New Directory"), &ok, this ); +- +- while( ok && K3b::DataDoc::nameAlreadyInDir( name, parent ) ) { +- name = KInputDialog::getText( i18n("New Directory"), +- i18n("A file with that name already exists. " +- "Please insert the name for the new directory:"), +- i18n("New Directory"), &ok, this ); +- } +- +- if( !ok ) +- return; +- +- +- m_doc->addEmptyDir( name, parent ); ++ m_dataViewImpl->newDir( currentRoot() ); } + void K3b::DataView::slotItemProperties() { - QModelIndexList selection = currentSelection(); -@@ -341,4 +351,28 @@ - } +- QModelIndexList selection = currentSelection(); +- +- if ( selection.isEmpty() ) +- { +- // show project properties +- slotProperties(); +- } +- else +- { +- QList items; +- +- foreach(const QModelIndex &index, selection) +- items.append(m_model->itemForIndex(index)); +- +- K3b::DataPropertiesDialog dlg( items, this ); +- dlg.exec(); +- } ++ m_dataViewImpl->properties( currentSelection() ); + } + + + void K3b::DataView::slotOpen() + { +- QModelIndexList selection = currentSelection(); +- if (selection.isEmpty()) +- return; +- +- K3b::DataItem* item = m_model->itemForIndex(selection.first()); +- +- if( !item->isFile() ) { +- KUrl url = item->localPath(); +- if( !KRun::isExecutableFile( url, +- item->mimeType()->name() ) ) { +- KRun::runUrl( url, +- item->mimeType()->name(), +- this ); +- } +- else { +- KRun::displayOpenWithDialog( KUrl::List() << url, false, this ); +- } +- } ++ m_dataViewImpl->open( currentSelection() ); } -+ -+void K3b::DataView::slotCurrentRootChanged( const QModelIndex& newRoot ) -+{ -+ m_actionParentDir->setEnabled( m_model->indexForItem(m_doc->root()) != newRoot ); -+} -+ -+ -+void K3b::DataView::slotFileItemActivated( const QModelIndex& index ) -+{ -+ if( index.isValid() ) { -+ int type = index.data(ItemTypeRole).toInt(); -+ if( type == (int)DirItemType ) { -+ StandardView::setCurrentRoot( index ); -+ } -+ else if( type == (int)FileItemType ) { -+ QList items; -+ items.append( m_model->itemForIndex(index) ); -+ DataPropertiesDialog dlg( items, this ); -+ dlg.exec(); -+ } -+ } -+} -+ -+ #include "k3bdataview.moc" -diff -ru src/projects/k3bdataview.h src/projects/k3bdataview.h ---- src/projects/k3bdataview.h 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bdataview.h 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bdataview.h ++++ src/projects/k3bdataview.h @@ -1,6 +1,7 @@ /* * @@ -4104,26 +5060,32 @@ diff -ru src/projects/k3bdataview.h src/projects/k3bdataview.h * * This file is part of the K3b project. * Copyright (C) 1998-2007 Sebastian Trueg -@@ -55,6 +56,8 @@ - void slotNewDir(); - void slotItemProperties(); - void slotOpen(); -+ void slotCurrentRootChanged( const QModelIndex& newRoot ); -+ void slotFileItemActivated( const QModelIndex& index ); +@@ -19,15 +20,16 @@ + #include "k3bstandardview.h" - protected: - QLineEdit* m_volumeIDEdit; -@@ -64,14 +67,19 @@ + class QLineEdit; +-class KMenu; +-class KAction; + class QModelIndex; ++class KAction; ++class KMenu; + + namespace K3b { + class DataDoc; + class DirItem; + class DataItem; + class DataProjectModel; ++ class DataViewImpl; + + namespace Device { + class Device; +@@ -64,22 +66,16 @@ /** * reimplemented from @ref StandardView */ - virtual void contextMenuForSelection(const QModelIndexList &selectedIndexes, const QPoint &pos); + virtual void selectionChanged( const QModelIndexList& indexes ); + virtual void contextMenu( const QPoint& pos ); -+ -+ KAction* m_actionImportSession; -+ KAction* m_actionClearSession; -+ KAction* m_actionEditBootImages; private: + void setupActions(); @@ -4133,32 +5095,858 @@ diff -ru src/projects/k3bdataview.h src/projects/k3bdataview.h - void setupContextMenu(); - - KMenu* m_popupMenu; - KAction* m_actionParentDir; - KAction* m_actionRemove; -diff -ru src/projects/k3bmixedview.cpp src/projects/k3bmixedview.cpp ---- src/projects/k3bmixedview.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bmixedview.cpp 2009-07-23 11:42:02.000000000 +0200 -@@ -27,7 +27,6 @@ - #include "k3baudiodoc.h" - #include "k3bdatadoc.h" - #include "k3bfillstatusdisplay.h" --#include "k3bprojectplugin.h" - #include "k3bdiritem.h" +- KMenu* m_popupMenu; +- KAction* m_actionParentDir; +- KAction* m_actionRemove; +- KAction* m_actionRename; +- KAction* m_actionNewDir; +- KAction* m_actionProperties; +- KAction* m_actionOpen; +- QModelIndexList m_currentSelection; ++ DataViewImpl* m_dataViewImpl; - #include -@@ -69,7 +68,7 @@ - toolBox()->addSeparator(); - #endif - #endif -- addPluginButtons( K3b::ProjectPlugin::MIXED_CD ); + // used for mounting when importing old session + Device::Device* m_device; +--- src/projects/k3bdataviewimpl.cpp ++++ src/projects/k3bdataviewimpl.cpp +@@ -0,0 +1,244 @@ ++/* ++ * ++ * Copyright (C) 2003-2008 Sebastian Trueg ++ * Copyright (C) 2009 Gustavo Pichorim Boiko ++ * Copyright (C) 2009 Michal Malek ++ * ++ * This file is part of the K3b project. ++ * Copyright (C) 1998-2009 Sebastian Trueg ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * See the file "COPYING" for the exact licensing terms. ++ */ ++ ++#include "k3bdataviewimpl.h" ++#include "k3baction.h" ++#include "k3bbootimageview.h" ++#include "k3bdatadoc.h" ++#include "k3bdatamultisessionimportdialog.h" ++#include "k3bdataprojectmodel.h" ++#include "k3bdatapropertiesdialog.h" ++#include "k3bdataurladdingdialog.h" ++#include "k3bdiritem.h" ++#include "k3bmodeltypes.h" ++#include "k3bview.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++K3b::DataViewImpl::DataViewImpl( View* view, DataDoc* doc, DataProjectModel* model, KActionCollection* actionCollection ) ++ : QObject( view ), m_view( view ), m_doc( doc ), m_model( model ) ++{ ++ m_actionNewDir = createAction( m_view, i18n("New Directory..."), "folder-new", Qt::CTRL+Qt::Key_N, 0, 0, ++ actionCollection, "new_dir" ); ++ m_actionRemove = createAction( m_view, i18n("Remove"), "edit-delete", Qt::Key_Delete, 0, 0, ++ actionCollection, "remove" ); ++ m_actionRename = createAction( m_view, i18n("Rename"), "edit-rename", Qt::Key_F2, 0, 0, ++ actionCollection, "rename" ); ++ m_actionParentDir = createAction( m_view, i18n("Parent Directory"), "go-up", 0, 0, 0, ++ actionCollection, "parent_dir" ); ++ m_actionProperties = createAction( m_view, i18n("Properties"), "document-properties", 0, 0, 0, ++ actionCollection, "properties" ); ++ m_actionOpen = createAction( m_view, i18n("Open"), "document-open", 0, 0, 0, ++ actionCollection, "open" ); ++ m_actionImportSession = createAction( m_view, i18n("&Import Session..."), "document-import", 0, this, SLOT(slotImportSession()), ++ actionCollection, "project_data_import_session" ); ++ m_actionClearSession = createAction( m_view, i18n("&Clear Imported Session"), "edit-clear", 0, this, SLOT(slotImportSession()), ++ actionCollection, "project_data_clear_imported_session" ); ++ m_actionEditBootImages = createAction( m_view, i18n("&Edit Boot Images..."), "document-properties", 0, this, SLOT(slotImportSession()), ++ actionCollection, "project_data_edit_boot_images" ); ++ ++ m_actionImportSession->setToolTip( i18n("Import a previously burned session into the current project") ); ++ m_actionClearSession->setToolTip( i18n("Remove the imported items from a previous session") ); ++ m_actionEditBootImages->setToolTip( i18n("Modify the bootable settings of the current project") ); ++ ++ // Create data context menu ++ m_popupMenu = new KMenu( m_view ); ++ m_popupMenu->addAction( m_actionParentDir ); ++ m_popupMenu->addSeparator(); ++ m_popupMenu->addAction( m_actionRename ); ++ m_popupMenu->addAction( m_actionRemove ); ++ m_popupMenu->addAction( m_actionNewDir ); ++ m_popupMenu->addSeparator(); ++ m_popupMenu->addAction( m_actionOpen ); ++ m_popupMenu->addSeparator(); ++ m_popupMenu->addAction( m_actionProperties ); ++ m_popupMenu->addSeparator(); ++ m_popupMenu->addAction( actionCollection->action("project_burn") ); ++} ++ ++ ++void K3b::DataViewImpl::addUrls( const QModelIndex& parent, const KUrl::List& urls ) ++{ ++ DirItem *item = dynamic_cast(m_model->itemForIndex(parent)); ++ if (!item) ++ item = m_doc->root(); ++ ++ DataUrlAddingDialog::addUrls( urls, item ); ++} ++ ++ ++void K3b::DataViewImpl::newDir( const QModelIndex& parent ) ++{ ++ DirItem* parentDir = 0; ++ ++ if (parent.isValid()) ++ parentDir = dynamic_cast(m_model->itemForIndex(parent)); ++ ++ if (!parentDir) ++ parentDir = m_doc->root(); ++ ++ QString name; ++ bool ok; ++ ++ name = KInputDialog::getText( i18n("New Directory"), ++ i18n("Please insert the name for the new directory:"), ++ i18n("New Directory"), &ok, m_view ); ++ ++ while( ok && DataDoc::nameAlreadyInDir( name, parentDir ) ) { ++ name = KInputDialog::getText( i18n("New Directory"), ++ i18n("A file with that name already exists. " ++ "Please insert the name for the new directory:"), ++ i18n("New Directory"), &ok, m_view ); ++ } ++ ++ if( !ok ) ++ return; ++ ++ m_doc->addEmptyDir( name, parentDir ); ++} ++ ++ ++void K3b::DataViewImpl::properties( const QModelIndexList& indexes ) ++{ ++ if ( indexes.isEmpty() ) ++ { ++ // show project properties ++ m_view->slotProperties(); ++ } ++ else ++ { ++ QList items; ++ ++ foreach(const QModelIndex& index, indexes) { ++ items.append( m_model->itemForIndex(index) ); ++ } ++ ++ DataPropertiesDialog dlg( items, m_view ); ++ dlg.exec(); ++ } ++} ++ ++ ++void K3b::DataViewImpl::open( const QModelIndexList& indexes ) ++{ ++ if (indexes.isEmpty()) ++ return; ++ ++ DataItem* item = m_model->itemForIndex( indexes.first() ); ++ ++ if( !item->isFile() ) { ++ KUrl url = item->localPath(); ++ if( !KRun::isExecutableFile( url, ++ item->mimeType()->name() ) ) { ++ KRun::runUrl( url, ++ item->mimeType()->name(), ++ m_view ); ++ } ++ else { ++ KRun::displayOpenWithDialog( KUrl::List() << url, false, m_view ); ++ } ++ } ++} ++ ++ ++void K3b::DataViewImpl::slotCurrentRootChanged( const QModelIndex& newRoot ) ++{ ++ m_actionParentDir->setEnabled( newRoot.isValid() && m_model->indexForItem(m_doc->root()) != newRoot ); ++} ++ ++ ++void K3b::DataViewImpl::slotSelectionChanged( const QModelIndexList& indexes ) ++{ ++ bool open = true, rename = true, remove = true; ++ ++ // we can only rename one item at a time ++ // also, we can only create a new dir over a single directory ++ if (indexes.count() > 1) ++ { ++ rename = false; ++ open = false; ++ } ++ else if (indexes.count() == 1) ++ { ++ QModelIndex index = indexes.first(); ++ rename = (index.flags() & Qt::ItemIsEditable); ++ open = (index.data(ItemTypeRole).toInt() == (int) FileItemType); ++ } ++ else // selectedIndex.count() == 0 ++ { ++ remove = false; ++ rename = false; ++ open = false; ++ } ++ ++ // check if all selected items can be removed ++ foreach(const QModelIndex &index, indexes) ++ { ++ if (!index.data(CustomFlagsRole).toInt() & ItemIsRemovable) ++ { ++ remove = false; ++ break; ++ } ++ } ++ ++ m_actionRename->setEnabled( rename ); ++ m_actionRemove->setEnabled( remove ); ++ m_actionOpen->setEnabled( open ); ++} ++ ++void K3b::DataViewImpl::slotItemActivated( const QModelIndex& index ) ++{ ++ if( index.isValid() ) { ++ int type = index.data(ItemTypeRole).toInt(); ++ if( type == (int)DirItemType ) { ++ emit setCurrentRoot( index ); ++ } ++ else if( type == (int)FileItemType ) { ++ properties( QModelIndexList() << index ); ++ } ++ } ++} ++ ++ ++void K3b::DataViewImpl::slotImportSession() ++{ ++ K3b::DataMultisessionImportDialog::importSession( m_doc, m_view ); ++} ++ ++ ++void K3b::DataViewImpl::slotClearImportedSession() ++{ ++ m_doc->clearImportedSession(); ++} ++ ++ ++void K3b::DataViewImpl::slotEditBootImages() ++{ ++ KDialog dlg( m_view ); ++ dlg.setCaption( i18n("Edit Boot Images") ); ++ dlg.setButtons( KDialog::Ok ); ++ dlg.setDefaultButton( KDialog::Ok ); ++ dlg.setMainWidget( new K3b::BootImageView( m_doc, &dlg ) ); ++ dlg.exec(); ++} ++ ++#include "k3bdataviewimpl.moc" +--- src/projects/k3bdataviewimpl.h ++++ src/projects/k3bdataviewimpl.h +@@ -0,0 +1,78 @@ ++/* ++ * ++ * Copyright (C) 2009 Michal Malek ++ * ++ * This file is part of the K3b project. ++ * Copyright (C) 1998-2009 Sebastian Trueg ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * See the file "COPYING" for the exact licensing terms. ++ */ ++ ++#ifndef K3B_DATA_VIEW_IMPL_H ++#define K3B_DATA_VIEW_IMPL_H ++ ++#include ++#include ++#include ++ ++class KAction; ++class KActionCollection; ++class KMenu; ++ ++namespace K3b { ++ class DataDoc; ++ class DataProjectModel; ++ class View; ++ ++ /** ++ * This class was created to share code and behaviour between \ref K3b::DataView and \ref K3b::MixedView. ++ */ ++ class DataViewImpl : public QObject ++ { ++ Q_OBJECT ++ ++ public: ++ DataViewImpl( View* view, DataDoc* doc, DataProjectModel* model, KActionCollection* actionCollection ); ++ ++ void addUrls( const QModelIndex& parent, const KUrl::List& urls ); ++ void newDir( const QModelIndex& parent ); ++ void properties( const QModelIndexList& indexes ); ++ void open( const QModelIndexList& indexes ); ++ ++ KMenu* popupMenu() const { return m_popupMenu; } ++ ++ signals: ++ void setCurrentRoot( const QModelIndex& index ); ++ ++ public Q_SLOTS: ++ void slotCurrentRootChanged( const QModelIndex& newRoot ); ++ void slotSelectionChanged( const QModelIndexList& indexes ); ++ void slotItemActivated( const QModelIndex& index ); ++ void slotImportSession(); ++ void slotClearImportedSession(); ++ void slotEditBootImages(); ++ ++ private: ++ View* m_view; ++ DataDoc* m_doc; ++ DataProjectModel* m_model; ++ ++ KMenu* m_popupMenu; ++ KAction* m_actionParentDir; ++ KAction* m_actionRemove; ++ KAction* m_actionRename; ++ KAction* m_actionNewDir; ++ KAction* m_actionProperties; ++ KAction* m_actionOpen; ++ KAction* m_actionImportSession; ++ KAction* m_actionClearSession; ++ KAction* m_actionEditBootImages; ++ }; ++ ++} // namespace K3b ++ ++#endif +--- src/projects/k3bmixedprojectmodel.h ++++ src/projects/k3bmixedprojectmodel.h +@@ -40,6 +40,9 @@ + MixedProjectModel( MixedDoc* doc, QObject* parent = 0 ); + ~MixedProjectModel(); + QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; ++ ++ DataProjectModel* dataModel() const { return m_dataModel; } ++ AudioProjectModel* audioModel() const { return m_audioModel; } + + public slots: + /** +--- src/projects/k3bmixedview.cpp ++++ src/projects/k3bmixedview.cpp +@@ -2,6 +2,7 @@ + * + * Copyright (C) 2003-2008 Sebastian Trueg + * Copyright (C) 2009 Gustavo Pichorim Boiko ++ * Copyright (C) 2009 Michal Malek + * + * This file is part of the K3b project. + * Copyright (C) 1998-2009 Sebastian Trueg +@@ -14,41 +15,79 @@ + */ + + #include "k3bmixedview.h" +- ++#include "k3baudiodoc.h" ++#include "k3baudioprojectmodel.h" ++//#include "k3baudiotrackplayer.h" ++#include "k3baudioviewimpl.h" + #include "k3bmixeddoc.h" + #include "k3bmixedburndialog.h" + #include "k3bmixedprojectmodel.h" ++#include "k3bdatadoc.h" + #include "k3bdataprojectmodel.h" +-#include "k3baudioprojectmodel.h" +-#include "k3baudiotrackaddingdialog.h" +-#include "k3bdataurladdingdialog.h" ++#include "k3bdataviewimpl.h" + +-//#include "k3baudiotrackplayer.h" +-#include "k3baudiodoc.h" +-#include "k3bdatadoc.h" +-#include "k3bfillstatusdisplay.h" +-#include "k3bprojectplugin.h" +-#include "k3bdiritem.h" +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include ++#include + #include + +- + K3b::MixedView::MixedView( K3b::MixedDoc* doc, QWidget* parent ) + : K3b::StandardView( doc, parent ), m_doc(doc) + { +- m_model = new K3b::MixedProjectModel(m_doc, this); +- +- connect( this, SIGNAL( currentRootChanged( const QModelIndex& ) ), +- m_model, SLOT( slotCurrentRootIndexChanged( const QModelIndex& ) ) ); ++ m_model = new MixedProjectModel(m_doc, this); ++ m_audioViewImpl = new AudioViewImpl( this, m_doc->audioDoc(), m_model->audioModel(), actionCollection() ); ++ m_dataViewImpl = new DataViewImpl( this, m_doc->dataDoc(), m_model->dataModel(), actionCollection() ); ++ ++ connect( this, SIGNAL( currentRootChanged(QModelIndex) ), ++ m_model, SLOT( slotCurrentRootIndexChanged(QModelIndex) ) ); ++ connect( this, SIGNAL( currentRootChanged(QModelIndex) ), SLOT( slotCurrentRootChanged(QModelIndex) ) ); ++ connect( this, SIGNAL(activated(QModelIndex)), SLOT(slotItemActivated(QModelIndex)) ); ++ connect( m_dataViewImpl, SIGNAL(setCurrentRoot(QModelIndex)), ++ this, SLOT(slotSetCurrentRoot(QModelIndex)) ); ++ ++ // Connect audio actions ++ connect( actionCollection()->action( "track_add_silence" ), SIGNAL( triggered() ), ++ this, SLOT(slotAddSilence()) ); ++ connect( actionCollection()->action( "track_merge" ), SIGNAL( triggered() ), ++ this, SLOT(slotMergeTracks()) ); ++ connect( actionCollection()->action( "source_split" ), SIGNAL( triggered() ), ++ this, SLOT(slotSplitSource()) ); ++ connect( actionCollection()->action( "track_split" ), SIGNAL( triggered() ), ++ this, SLOT(slotSplitTrack()) ); ++ connect( actionCollection()->action( "edit_source" ), SIGNAL( triggered() ), ++ this, SLOT(slotEditSource()) ); ++ //connect( actionCollection()->action( "track_play" ), SIGNAL( triggered() ), ++ // this, SLOT(slotPlayTrack()) ); ++ connect( actionCollection()->action( "project_audio_musicbrainz" ), SIGNAL( triggered() ), ++ this, SLOT(slotQueryMusicBrainz()) ); ++ connect( actionCollection()->action( "track_properties" ), SIGNAL( triggered() ), ++ this, SLOT(slotItemProperties()) ); ++ connect( actionCollection()->action( "track_remove" ), SIGNAL( triggered() ), ++ this, SLOT(slotRemove()) ); ++ ++ // Connect data actions ++ connect( actionCollection()->action( "new_dir" ), SIGNAL( triggered() ), ++ this, SLOT(slotNewDir()) ); ++ connect( actionCollection()->action( "remove" ), SIGNAL( triggered() ), ++ this, SLOT(slotRemove()) ); ++ connect( actionCollection()->action( "rename" ), SIGNAL( triggered() ), ++ this, SLOT(slotRenameItem()) ); ++ connect( actionCollection()->action( "parent_dir" ), SIGNAL( triggered() ), ++ this, SLOT(slotParentDir()) ); ++ connect( actionCollection()->action( "properties" ), SIGNAL( triggered() ), ++ this, SLOT(slotItemProperties()) ); ++ connect( actionCollection()->action( "open" ), SIGNAL( triggered() ), ++ this, SLOT(slotOpen()) ); + + setModel(m_model); ++ ++ // Setup toolbar ++ toolBox()->addAction( actionCollection()->action( "parent_dir" ) ); ++ toolBox()->addSeparator(); + addPluginButtons(); + + #ifdef __GNUC__ + #warning enable player once ported to Phonon +@@ -62,14 +101,6 @@ + // toolBox()->addSpacing(); + // m_audioListView->player()->action( K3b::AudioTrackPlayer::ACTION_SEEK )->plug( toolBox() ); + // toolBox()->addSeparator(); +- +-#if 0 +-#ifdef HAVE_MUSICBRAINZ +- toolBox()->addAction( m_audioListView->actionCollection()->action( "project_audio_musicbrainz" ) ); +- toolBox()->addSeparator(); +-#endif +-#endif +- addPluginButtons( K3b::ProjectPlugin::MIXED_CD ); } -diff -ru src/projects/k3bmovixview.cpp src/projects/k3bmovixview.cpp ---- src/projects/k3bmovixview.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bmovixview.cpp 2009-07-23 11:42:02.000000000 +0200 +@@ -85,30 +116,6 @@ + } + + +-void K3b::MixedView::slotAudioTreeSelected() +-{ +- //m_widgetStack->setCurrentWidget( m_audioListView ); +-} +- +- +-void K3b::MixedView::slotDataTreeSelected() +-{ +- //m_widgetStack->setCurrentWidget( m_dataFileView ); +-} +- +- +-K3b::DirItem* K3b::MixedView::currentDir() const +-{ +-#if 0 +- if( m_widgetStack->currentWidget() == m_dataFileView ) +- return m_dataFileView->currentDir(); +- else +- return 0; +-#endif +- return 0; +-} +- +- + void K3b::MixedView::slotBurn() + { + if( m_doc->audioDoc()->numOfTracks() == 0 || m_doc->dataDoc()->size() == 0 ) { +@@ -128,32 +135,192 @@ + } + + ++void K3b::MixedView::addUrls( const KUrl::List& urls ) ++{ ++ if( currentSubModel() == m_model->dataModel() ) { ++ QModelIndex parent = m_model->mapToSubModel( currentRoot() ); ++ m_dataViewImpl->addUrls( parent, urls ); ++ } ++ else if( currentSubModel() == m_model->audioModel() ) { ++ m_audioViewImpl->addUrls( urls ); ++ } ++} ++ ++ ++void K3b::MixedView::slotAddSilence() ++{ ++ if( currentSubModel() == m_model->audioModel() ) { ++ QModelIndexList selection; ++ mapToSubModel( selection, currentSelection() ); ++ m_audioViewImpl->addSilence( selection ); ++ } ++} ++ ++ ++void K3b::MixedView::slotRemove() ++{ ++ if( currentSubModel() == m_model->dataModel() ) { ++ slotRemoveSelectedIndexes(); ++ } ++ else if( currentSubModel() == m_model->audioModel() ) { ++ QModelIndexList selection; ++ mapToSubModel( selection, currentSelection() ); ++ m_audioViewImpl->remove( selection ); ++ } ++} ++ ++ ++void K3b::MixedView::slotMergeTracks() ++{ ++ if( currentSubModel() == m_model->audioModel() ) { ++ QModelIndexList selection; ++ mapToSubModel( selection, currentSelection() ); ++ m_audioViewImpl->mergeTracks( selection ); ++ } ++} ++ ++ ++void K3b::MixedView::slotSplitSource() ++{ ++ if( currentSubModel() == m_model->audioModel() ) { ++ QModelIndexList selection; ++ mapToSubModel( selection, currentSelection() ); ++ m_audioViewImpl->splitSource( selection ); ++ } ++} ++ ++ ++void K3b::MixedView::slotSplitTrack() ++{ ++ if( currentSubModel() == m_model->audioModel() ) { ++ QModelIndexList selection; ++ mapToSubModel( selection, currentSelection() ); ++ m_audioViewImpl->splitTrack( selection ); ++ } ++} ++ ++ ++void K3b::MixedView::slotEditSource() ++{ ++ if( currentSubModel() == m_model->audioModel() ) { ++ QModelIndexList selection; ++ mapToSubModel( selection, currentSelection() ); ++ m_audioViewImpl->editSource( selection ); ++ } ++} ++ ++ ++void K3b::MixedView::slotQueryMusicBrainz() ++{ ++ if( currentSubModel() == m_model->audioModel() ) { ++ QModelIndexList selection; ++ mapToSubModel( selection, currentSelection() ); ++ m_audioViewImpl->queryMusicBrainz( selection ); ++ } ++} ++ ++ ++void K3b::MixedView::slotNewDir() ++{ ++ if( currentSubModel() == m_model->dataModel() ) { ++ QModelIndex parent = m_model->mapToSubModel( currentRoot() ); ++ m_dataViewImpl->newDir( parent ); ++ } ++} ++ ++ ++void K3b::MixedView::slotItemProperties() ++{ ++ QModelIndexList selection; ++ mapToSubModel( selection, currentSelection() ); ++ ++ if( currentSubModel() == m_model->dataModel() ) { ++ m_dataViewImpl->properties( selection ); ++ } ++ else if( currentSubModel() == m_model->audioModel() ) { ++ m_audioViewImpl->properties( selection ); ++ } ++} ++ ++ ++void K3b::MixedView::slotOpen() ++{ ++ if( currentSubModel() == m_model->dataModel() ) { ++ QModelIndexList selection; ++ mapToSubModel( selection, currentSelection() ); ++ m_dataViewImpl->open( selection ); ++ } ++} ++ ++ ++void K3b::MixedView::slotCurrentRootChanged( const QModelIndex& newRoot ) ++{ ++ QAbstractItemModel* currentSubModel = m_model->subModelForIndex( newRoot ); ++ if( currentSubModel == m_model->dataModel() ) { ++ m_dataViewImpl->slotCurrentRootChanged( m_model->mapToSubModel( newRoot ) ); ++ } ++ else { ++ m_dataViewImpl->slotCurrentRootChanged( QModelIndex() ); ++ } ++} ++ ++ ++void K3b::MixedView::slotItemActivated( const QModelIndex& index ) ++{ ++ if( currentSubModel() == m_model->dataModel() ) { ++ m_dataViewImpl->slotItemActivated( m_model->mapToSubModel( index ) ); ++ } ++ else if( currentSubModel() == m_model->audioModel() ) { ++ m_audioViewImpl->slotItemActivated( m_model->mapToSubModel( index ) ); ++ } ++} ++ ++ ++void K3b::MixedView::slotSetCurrentRoot( const QModelIndex& index ) ++{ ++ StandardView::setCurrentRoot( m_model->mapFromSubModel( index ) ); ++} ++ ++ ++QAbstractItemModel* K3b::MixedView::currentSubModel() const ++{ ++ return m_model->subModelForIndex( currentRoot() ); ++} ++ ++ + K3b::ProjectBurnDialog* K3b::MixedView::newBurnDialog( QWidget* parent ) + { + return new K3b::MixedBurnDialog( m_doc, parent ); + } + + +-void K3b::MixedView::addUrls( const KUrl::List& urls ) ++void K3b::MixedView::selectionChanged( const QModelIndexList& indexes ) + { +- QAbstractItemModel *model = m_model->subModelForIndex( currentRoot() ); ++ QModelIndexList selection; ++ mapToSubModel( selection, indexes ); ++ ++ if( currentSubModel() == m_model->dataModel() ) { ++ m_dataViewImpl->slotSelectionChanged( selection ); ++ } ++ else if( currentSubModel() == m_model->audioModel() ) { ++ m_audioViewImpl->slotSelectionChanged( selection ); ++ } ++} + +- if (!model) +- return; + +- // use cast to determine which tree is currently selected +- K3b::DataProjectModel *dataModel = dynamic_cast(model); +- K3b::AudioProjectModel *audioModel = dynamic_cast(model); ++void K3b::MixedView::contextMenu( const QPoint& pos ) ++{ ++ if( currentSubModel() == m_model->dataModel() ) ++ m_dataViewImpl->popupMenu()->exec( pos ); ++ else if( currentSubModel() == m_model->audioModel() ) ++ m_audioViewImpl->popupMenu()->exec( pos ); ++} + +- if (dataModel) { +- K3b::DirItem *item = dynamic_cast(dataModel->itemForIndex(m_model->mapToSubModel(currentRoot()))); +- if (!item) +- item = m_doc->dataDoc()->root(); + +- K3b::DataUrlAddingDialog::addUrls( urls, item ); +- } +- else if (audioModel) { +- K3b::AudioTrackAddingDialog::addUrls( urls, m_doc->audioDoc(), 0, 0, 0, this ); ++void K3b::MixedView::mapToSubModel( QModelIndexList& subIndexes, const QModelIndexList& indexes ) const ++{ ++ foreach( const QModelIndex& index, indexes ) { ++ subIndexes.push_back( m_model->mapToSubModel( index ) ); + } + } + +--- src/projects/k3bmixedview.h ++++ src/projects/k3bmixedview.h +@@ -2,6 +2,7 @@ + * + * Copyright (C) 2003-2007 Sebastian Trueg + * Copyright (C) 2009 Gustavo Pichorim Boiko ++ * Copyright (C) 2009 Michal Malek + * + * This file is part of the K3b project. + * Copyright (C) 1998-2009 Sebastian Trueg +@@ -18,61 +19,69 @@ + + #include "k3bstandardview.h" + +-#include ++class QAbstractItemModel; ++class QModelIndex; + + namespace K3b { +- class MixedDoc; +-} +-class QStackedWidget ; +-namespace K3b { +- class DataFileView; +-} +-namespace K3b { +- class MixedDirTreeView; +-} +-namespace K3b { +- class AudioTrackView; +-} +-namespace K3b { +- class DirItem; +-} +-namespace K3b { ++ class AudioTrack; + class AudioTrackPlayer; +-} +- +-namespace K3b +-{ ++ class AudioDataSource; ++ class AudioViewImpl; ++ class DataViewImpl; ++ class MixedDoc; + class MixedProjectModel; +-} +- +-namespace K3b { +-class MixedView : public StandardView +-{ +- Q_OBJECT +- +- public: +- MixedView( MixedDoc* doc, QWidget* parent = 0 ); +- ~MixedView(); +- +- DirItem* currentDir() const; +- +- AudioTrackPlayer* player() const; +- +- public Q_SLOTS: +- void slotBurn(); +- void addUrls( const KUrl::List& ); +- +- protected: +- ProjectBurnDialog* newBurnDialog( QWidget* parent = 0 ); +- +- private Q_SLOTS: +- void slotAudioTreeSelected(); +- void slotDataTreeSelected(); +- +- private: +- MixedDoc* m_doc; +- K3b::MixedProjectModel* m_model; +-}; ++ ++ class MixedView : public StandardView ++ { ++ Q_OBJECT ++ ++ public: ++ MixedView( MixedDoc* doc, QWidget* parent = 0 ); ++ ~MixedView(); ++ ++ AudioTrackPlayer* player() const; ++ ++ public Q_SLOTS: ++ void slotBurn(); ++ void addUrls( const KUrl::List& ); ++ ++ private Q_SLOTS: ++ void slotAddSilence(); ++ void slotRemove(); ++ void slotMergeTracks(); ++ void slotSplitSource(); ++ void slotSplitTrack(); ++ void slotEditSource(); ++ void slotQueryMusicBrainz(); ++ void slotNewDir(); ++ void slotItemProperties(); ++ void slotOpen(); ++ void slotCurrentRootChanged( const QModelIndex& newRoot ); ++ void slotItemActivated( const QModelIndex& index ); ++ void slotSetCurrentRoot( const QModelIndex& index ); ++ ++ protected: ++ QAbstractItemModel* currentSubModel() const; ++ ++ /** ++ * reimplemented from @ref View ++ */ ++ virtual ProjectBurnDialog* newBurnDialog( QWidget* parent = 0 ); ++ ++ /** ++ * reimplemented from @ref StandardView ++ */ ++ virtual void selectionChanged( const QModelIndexList& indexes ); ++ virtual void contextMenu( const QPoint& pos ); ++ ++ private: ++ void mapToSubModel( QModelIndexList& subIndexes, const QModelIndexList& indexes ) const; ++ ++ MixedDoc* m_doc; ++ MixedProjectModel* m_model; ++ AudioViewImpl* m_audioViewImpl; ++ DataViewImpl* m_dataViewImpl; ++ }; + } + + #endif +--- src/projects/k3bmovixview.cpp ++++ src/projects/k3bmovixview.cpp @@ -3,6 +3,7 @@ * Copyright (C) 2003-2007 Sebastian Trueg * (C) 2009 Arthur Renato Mello @@ -4258,9 +6046,8 @@ diff -ru src/projects/k3bmovixview.cpp src/projects/k3bmovixview.cpp K3b::ProjectBurnDialog* K3b::MovixView::newBurnDialog( QWidget* parent ) { return new K3b::MovixBurnDialog( m_doc, parent ); -diff -ru src/projects/k3bmovixview.h src/projects/k3bmovixview.h ---- src/projects/k3bmovixview.h 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bmovixview.h 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bmovixview.h ++++ src/projects/k3bmovixview.h @@ -3,6 +3,7 @@ * Copyright (C) 2003-2007 Sebastian Trueg * (C) 2009 Arthur Renato Mello @@ -4289,9 +6076,8 @@ diff -ru src/projects/k3bmovixview.h src/projects/k3bmovixview.h virtual ProjectBurnDialog* newBurnDialog( QWidget* parent = 0 ); private: -diff -ru src/projects/k3bstandardview.cpp src/projects/k3bstandardview.cpp ---- src/projects/k3bstandardview.cpp 2009-04-08 22:48:47.000000000 +0200 -+++ src/projects/k3bstandardview.cpp 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bstandardview.cpp ++++ src/projects/k3bstandardview.cpp @@ -1,6 +1,7 @@ /* * @@ -4365,7 +6151,7 @@ diff -ru src/projects/k3bstandardview.cpp src/projects/k3bstandardview.cpp // select the first item from the model if (m_dirProxy->rowCount() > 0) -@@ -99,15 +112,36 @@ +@@ -99,15 +112,31 @@ m_fileView->setRootIndex(QModelIndex()); } @@ -4397,25 +6183,16 @@ diff -ru src/projects/k3bstandardview.cpp src/projects/k3bstandardview.cpp + selected = m_fileView->selectionModel()->selectedRows(); + } + return selected; -+} -+ -+void K3b::StandardView::setCurrentRoot( const QModelIndex& index ) -+{ -+ m_dirView->setCurrentIndex( m_dirProxy->mapFromSource( index ) ); } QModelIndex K3b::StandardView::currentRoot() const -@@ -133,44 +167,30 @@ +@@ -133,44 +162,35 @@ QModelIndexList indexes = m_dirView->selectionModel()->selectedRows(); QModelIndex currentDir; - if (indexes.count()) + if (indexes.count()) { currentDir = m_dirProxy->mapToSource(indexes.first()); -+ -+ if( m_dirView->hasFocus() ) { -+ selectionChanged( QModelIndexList() << currentDir ); -+ } + } // make the file view show only the child nodes of the currently selected @@ -4425,6 +6202,10 @@ diff -ru src/projects/k3bstandardview.cpp src/projects/k3bstandardview.cpp - + emit currentRootChanged( currentDir ); ++ ++ if( m_dirView->hasFocus() && currentDir.isValid() ) { ++ selectionChanged( QModelIndexList() << currentDir ); ++ } } -void K3b::StandardView::slotCustomContextMenu(const QPoint &pos) @@ -4437,7 +6218,13 @@ diff -ru src/projects/k3bstandardview.cpp src/projects/k3bstandardview.cpp - // this should not happen, but just in case... - if (!view) - return; -- ++ if( QTreeView *view = dynamic_cast(sender()) ) { ++ // call the context menu method so that derived classes can place customized ++ // context menus ++ contextMenu( view->viewport()->mapToGlobal(pos) ); ++ } ++} + - // if the signal was emitted by the dirview, we need to map the indexes to the - // source model - if (view == m_dirView) @@ -4455,11 +6242,9 @@ diff -ru src/projects/k3bstandardview.cpp src/projects/k3bstandardview.cpp - // call the context menu method so that derived classes can place customized - // context menus - contextMenuForSelection(selection, view->viewport()->mapToGlobal(pos)); -+ if( QTreeView *view = dynamic_cast(sender()) ) { -+ // call the context menu method so that derived classes can place customized -+ // context menus -+ contextMenu( view->viewport()->mapToGlobal(pos) ); -+ } ++void K3b::StandardView::setCurrentRoot( const QModelIndex& index ) ++{ ++ m_dirView->setCurrentIndex( m_dirProxy->mapFromSource( index ) ); } void K3b::StandardView::slotParentDir() @@ -4522,9 +6307,8 @@ diff -ru src/projects/k3bstandardview.cpp src/projects/k3bstandardview.cpp +} + #include "k3bstandardview.moc" -diff -ru src/projects/k3bstandardview.h src/projects/k3bstandardview.h ---- src/projects/k3bstandardview.h 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bstandardview.h 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bstandardview.h ++++ src/projects/k3bstandardview.h @@ -1,6 +1,7 @@ /* * @@ -4533,7 +6317,7 @@ diff -ru src/projects/k3bstandardview.h src/projects/k3bstandardview.h * * This file is part of the K3b project. * Copyright (C) 1998-2009 Sebastian Trueg -@@ -63,27 +64,33 @@ +@@ -63,21 +64,26 @@ * or not. */ void setShowDirPanel(bool show); @@ -4567,14 +6351,19 @@ diff -ru src/projects/k3bstandardview.h src/projects/k3bstandardview.h * * The main purpose of its existence is for slots connected to actions in the context menu * to know which items they should operate in - */ - QModelIndexList currentSelection() const; - +@@ -104,6 +110,11 @@ + protected slots: + void slotCurrentDirChanged(); + void slotCustomContextMenu(const QPoint &pos); ++ ++ /** ++ * Sets current directory of the right pane ++ */ + void setCurrentRoot( const QModelIndex& index ); - QModelIndex currentRoot() const; /** -@@ -130,16 +137,18 @@ + * Go to the parent dir (meaning that the parent of the current dir is going +@@ -130,16 +141,18 @@ * file view */ void slotItemsAdded(); @@ -4594,9 +6383,8 @@ diff -ru src/projects/k3bstandardview.h src/projects/k3bstandardview.h bool m_expanded; }; } -diff -ru src/projects/k3bvcdview.cpp src/projects/k3bvcdview.cpp ---- src/projects/k3bvcdview.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bvcdview.cpp 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bvcdview.cpp ++++ src/projects/k3bvcdview.cpp @@ -2,6 +2,7 @@ * * Copyright (C) 2003-2004 Christian Kvasny @@ -4627,9 +6415,8 @@ diff -ru src/projects/k3bvcdview.cpp src/projects/k3bvcdview.cpp m_popupMenu->popup( pos ); } -diff -ru src/projects/k3bvcdview.h src/projects/k3bvcdview.h ---- src/projects/k3bvcdview.h 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bvcdview.h 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bvcdview.h ++++ src/projects/k3bvcdview.h @@ -2,6 +2,7 @@ * * Copyright (C) 2003-2004 Christian Kvasny @@ -4651,9 +6438,8 @@ diff -ru src/projects/k3bvcdview.h src/projects/k3bvcdview.h void showPropertiesDialog(); protected: -diff -ru src/projects/k3bvideodvdburndialog.cpp src/projects/k3bvideodvdburndialog.cpp ---- src/projects/k3bvideodvdburndialog.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bvideodvdburndialog.cpp 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bvideodvdburndialog.cpp ++++ src/projects/k3bvideodvdburndialog.cpp @@ -31,6 +31,7 @@ #include #include @@ -4662,9 +6448,8 @@ diff -ru src/projects/k3bvideodvdburndialog.cpp src/projects/k3bvideodvdburndial #include #include #include -diff -ru src/projects/k3bvideodvdview.cpp src/projects/k3bvideodvdview.cpp ---- src/projects/k3bvideodvdview.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bvideodvdview.cpp 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bvideodvdview.cpp ++++ src/projects/k3bvideodvdview.cpp @@ -2,6 +2,7 @@ * * Copyright (C) 2005-2007 Sebastian Trueg @@ -4673,7 +6458,7 @@ diff -ru src/projects/k3bvideodvdview.cpp src/projects/k3bvideodvdview.cpp * * This file is part of the K3b project. * Copyright (C) 1998-2009 Sebastian Trueg -@@ -14,46 +15,25 @@ +@@ -14,46 +15,30 @@ */ #include "k3bvideodvdview.h" @@ -4692,9 +6477,10 @@ diff -ru src/projects/k3bvideodvdview.cpp src/projects/k3bvideodvdview.cpp +#include "k3bvideodvddoc.h" -#include -+#include ++#include +#include +#include ++#include K3b::VideoDvdView::VideoDvdView( K3b::VideoDvdDoc* doc, QWidget *parent ) @@ -4718,12 +6504,16 @@ diff -ru src/projects/k3bvideodvdview.cpp src/projects/k3bvideodvdview.cpp - connect( m_dataFileView, SIGNAL(dirSelected(K3b::DirItem*)), m_dataDirTree, SLOT(setCurrentDir(K3b::DirItem*)) ); -#endif - addPluginButtons( K3b::ProjectPlugin::VIDEO_DVD ); -+ m_actionImportSession->setEnabled( false ); -+ m_actionImportSession->setVisible( false ); -+ m_actionClearSession->setEnabled( false ); -+ m_actionClearSession->setVisible( false ); -+ m_actionEditBootImages->setEnabled( false ); -+ m_actionEditBootImages->setVisible( false ); ++ QAction* actionImportSession = actionCollection()->action( "project_data_import_session" ); ++ QAction* actionClearSession = actionCollection()->action( "project_data_clear_imported_session" ); ++ QAction* actionEditBootImages = actionCollection()->action( "project_data_edit_boot_images" ); ++ ++ actionImportSession->setEnabled( false ); ++ actionImportSession->setVisible( false ); ++ actionClearSession->setEnabled( false ); ++ actionClearSession->setVisible( false ); ++ actionEditBootImages->setEnabled( false ); ++ actionEditBootImages->setVisible( false ); } -#ifdef __GNUC__ -#warning get the currentDir connections from K3b::DataView or maybe inherit from it @@ -4731,7 +6521,7 @@ diff -ru src/projects/k3bvideodvdview.cpp src/projects/k3bvideodvdview.cpp K3b::VideoDvdView::~VideoDvdView() -@@ -79,11 +59,4 @@ +@@ -79,11 +64,4 @@ } @@ -4743,9 +6533,8 @@ diff -ru src/projects/k3bvideodvdview.cpp src/projects/k3bvideodvdview.cpp -} - #include "k3bvideodvdview.moc" -diff -ru src/projects/k3bvideodvdview.h src/projects/k3bvideodvdview.h ---- src/projects/k3bvideodvdview.h 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bvideodvdview.h 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bvideodvdview.h ++++ src/projects/k3bvideodvdview.h @@ -2,6 +2,7 @@ * * Copyright (C) 2005-2007 Sebastian Trueg @@ -4789,9 +6578,8 @@ diff -ru src/projects/k3bvideodvdview.h src/projects/k3bvideodvdview.h }; } -diff -ru src/projects/k3bview.cpp src/projects/k3bview.cpp ---- src/projects/k3bview.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/projects/k3bview.cpp 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bview.cpp ++++ src/projects/k3bview.cpp @@ -117,13 +117,13 @@ } @@ -4808,9 +6596,8 @@ diff -ru src/projects/k3bview.cpp src/projects/k3bview.cpp QAction* button = toolBox()->addAction( pp->text(), this, SLOT(slotPluginButtonClicked()) ); -diff -ru src/projects/k3bview.h src/projects/k3bview.h ---- src/projects/k3bview.h 2009-02-22 23:46:14.000000000 +0100 -+++ src/projects/k3bview.h 2009-07-23 11:42:02.000000000 +0200 +--- src/projects/k3bview.h ++++ src/projects/k3bview.h @@ -86,10 +86,8 @@ /** * Call this to add the projectplugin buttons to the toolbox. It is not called @@ -4823,9 +6610,8 @@ diff -ru src/projects/k3bview.h src/projects/k3bview.h FillStatusDisplay* fillStatusDisplay() const { return m_fillStatusDisplay; } KToolBar* toolBox() const { return m_toolBox; } -diff -ru src/rip/k3baudioripjob.cpp src/rip/k3baudioripjob.cpp ---- src/rip/k3baudioripjob.cpp 2009-05-27 11:58:34.000000000 +0200 -+++ src/rip/k3baudioripjob.cpp 2009-07-23 11:42:04.000000000 +0200 +--- src/rip/k3baudioripjob.cpp ++++ src/rip/k3baudioripjob.cpp @@ -284,9 +284,6 @@ return false; } @@ -4836,9 +6622,8 @@ diff -ru src/rip/k3baudioripjob.cpp src/rip/k3baudioripjob.cpp return success; } } -diff -ru src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp ---- src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp 2009-07-23 11:42:04.000000000 +0200 +--- src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp ++++ src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp @@ -243,7 +243,7 @@ case 1: // Title X + length @@ -4848,35 +6633,3 @@ diff -ru src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp src/rip/videodvd/k m_title.playbackTime().toString( false ), i18np("%1 chapter", "%1 chapters", m_title.numPTTs() ) ); -diff -ru src/rip/videodvd/k3bvideodvdrippingwidget.cpp src/rip/videodvd/k3bvideodvdrippingwidget.cpp ---- src/rip/videodvd/k3bvideodvdrippingwidget.cpp 2009-04-21 19:54:02.000000000 +0200 -+++ src/rip/videodvd/k3bvideodvdrippingwidget.cpp 2009-04-24 10:39:13.000000000 +0200 -@@ -26,7 +26,10 @@ - #include - #include - #include -+#include -+#if KDE_IS_VERSION(4,2,0) - #include -+#endif - - #include - #include -@@ -255,10 +258,17 @@ - path.truncate( path.lastIndexOf('/') ); - - QPalette pal( m_labelFreeSpace->palette() ); -+#if KDE_IS_VERSION(4,2,0) - KDiskFreeSpaceInfo free = KDiskFreeSpaceInfo::freeSpaceInfo( path ); - if( free.isValid() ) { - m_labelFreeSpace->setText( KIO::convertSizeFromKiB(free.available()) ); - if( free.available() < m_neededSize/1024 ) -+#else -+ unsigned long size, avail; -+ if( K3b::kbFreeOnFs( path, size, avail ) ) { -+ m_labelFreeSpace->setText( KIO::convertSizeFromKiB(avail) ); -+ if( avail < m_neededSize/1024 ) -+#endif - pal.setColor( QPalette::Text, Qt::red ); - else - pal.setColor( QPalette::Text, palette().color( QPalette::Text ) );