From b2ead42a56c863db8cbc1b6679e386b145018d2f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 27 Jan 2013 00:56:28 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- src/amarokscript/Makefile.am | 3 + src/amarokscript/README | 43 +++ src/amarokscript/soundKonverter.rb | 296 +++++++++++++++++++++ src/amarotdescript/Makefile.am | 3 - src/amarotdescript/README | 43 --- src/amarotdescript/soundKonverter.rb | 296 --------------------- src/cdopener.cpp | 2 +- src/config.cpp | 4 +- src/configdialog.cpp | 2 +- src/configenvironmentpage.cpp | 2 +- src/configgeneralpage.cpp | 2 +- src/configpluginspage.cpp | 4 +- src/configpluginspage.h | 2 +- src/convert.cpp | 2 +- src/convert.h | 2 +- src/dirdialog.cpp | 2 +- src/metadata/tplugins.cpp | 2 +- src/metadata/wavpack/Makefile.am | 4 +- .../wavpack/taglib_wavpackfiletyperesolver.cpp | 44 --- .../wavpack/taglib_wavpackfiletyperesolver.h | 36 --- .../wavpack/taglib_wavpactdefiletyperesolver.cpp | 44 +++ .../wavpack/taglib_wavpactdefiletyperesolver.h | 36 +++ src/options.cpp | 2 +- src/options.h | 2 +- src/outputdirectory.cpp | 2 +- src/paranoia.cpp | 2 +- src/replaygainscanner.cpp | 2 +- src/soundkonverter.cpp | 4 +- 28 files changed, 444 insertions(+), 444 deletions(-) create mode 100755 src/amarokscript/Makefile.am create mode 100644 src/amarokscript/README create mode 100755 src/amarokscript/soundKonverter.rb delete mode 100755 src/amarotdescript/Makefile.am delete mode 100644 src/amarotdescript/README delete mode 100755 src/amarotdescript/soundKonverter.rb delete mode 100644 src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp delete mode 100644 src/metadata/wavpack/taglib_wavpackfiletyperesolver.h create mode 100644 src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp create mode 100644 src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h (limited to 'src') diff --git a/src/amarokscript/Makefile.am b/src/amarokscript/Makefile.am new file mode 100755 index 0000000..b8049a7 --- /dev/null +++ b/src/amarokscript/Makefile.am @@ -0,0 +1,3 @@ +amarokscriptdir = $(kde_datadir)/soundkonverter/amarokscript +amarokscript_DATA = README \ + soundKonverter.rb diff --git a/src/amarokscript/README b/src/amarokscript/README new file mode 100644 index 0000000..1186231 --- /dev/null +++ b/src/amarokscript/README @@ -0,0 +1,43 @@ +
soundKonverter amaroK-Script (v0.3.8)
+ +

+About:
+This script only adds a context menu for easily accesssing the soundKonverter tool.
This version was designed to work with soundKonverter 0.2.80+
With soundKonverter you can convert audio files into another audio format. And you can add/remove the ReplayGain tag to/from audio files. +

+ +

+Usage:
+Just run this script and click on one or multiple files in your playlist with the right mouse button. Select soundKonverter and your desired action. After that soundKonverter should start (if you have installed it). Look into the handbook of soundKonverter for further information. +

+ +

+Dependencies:
+

+

+ +

+ChangeLog:
+Version 0.1:
+

+Version 0.2.80:
+ +

+ +

+License:
+GNU General Public License V2 +

+ +

+Author:
+Daniel Faust (daniel@kaligames.de) +

+ diff --git a/src/amarokscript/soundKonverter.rb b/src/amarokscript/soundKonverter.rb new file mode 100755 index 0000000..144c0c8 --- /dev/null +++ b/src/amarokscript/soundKonverter.rb @@ -0,0 +1,296 @@ +#!/usr/bin/env ruby +# +# amaroK-Script for integrating soundKonverter into amaroK +# +# (c) 2005 Daniel Faust +# License: GNU General Public License V2 + + +# FIXME after adding some files to soundkonverter, it is impossible to repeat that, until soundkonverter gets closed. + +# FIXME don't open files on every request. load options on startup and save on exit! + +#`dcop amarok playlist addMedia KURL` +#`dcop amarok playlist addMediaList KURL::List` +#`dcop amarok collection scanCollectionChanges` + + +require "uri" + +begin + require "Qt" +rescue LoadError + error = 'Qt Ruby bindings are required for this script.' + `dcop amarok playlist popupMessage "soundKonverter: #{error}"` + exit +end + +class MainWidget < Qt::Dialog + +slots 'accept()' + +def initialize(parent = nil, name = nil) + super + + box = Qt::VBoxLayout.new( self, 11, 6 ); + + lTitle = Qt::Label.new('soundKonverter plugin settings', self) + box.addWidget( lTitle ) + lTitle.setAlignment(Qt::AlignCenter) + font = Qt::Font.new() + font.setPixelSize(18) + font.setBold(true) + lTitle.setFont(font) + + box.addSpacing( 5 ) + + mediaDeviceBox = Qt::GroupBox.new( 1, Qt::Vertical, "Options for transfering to media devices", self ) + box.addWidget( mediaDeviceBox ) + mediaDeviceBox.layout().setSpacing( 6 ) + mediaDeviceBox.layout().setMargin( 6 ) + Qt::Label.new('Profile for lossy conversion:', mediaDeviceBox) + @cTranscodeProfile = Qt::ComboBox.new(mediaDeviceBox) + @cTranscodeProfile.insertItem("Very low") + @cTranscodeProfile.insertItem("Low") + @cTranscodeProfile.insertItem("Medium") + @cTranscodeProfile.insertItem("High") + @cTranscodeProfile.insertItem("Very high") + @cTranscodeProfile.setCurrentItem( 1 ) + +# box.addSpacing( 5 ) +# +# rippingBox = Qt::GroupBox.new( 2, Qt::Horizontal, "Use pre-defined options for CD ripping", self ) +# box.addWidget( rippingBox ) +# rippingBox.layout().setSpacing( 6 ) +# rippingBox.layout().setMargin( 6 ) +# rippingBox.setCheckable( true ) +# rippingBox.setEnabled( false ) +# +# profileBox = Qt::HBoxLayout.new( rippingBox, 6 ); +# lRippingProfile = Qt::Label.new('Profile:', rippingBox) +# profileBox.addWidget( lRippingProfile ) +# @cRippingProfile = Qt::ComboBox.new(rippingBox) +# profileBox.addWidget( @cRippingProfile ) +# @cRippingProfile.insertItem("Very low") +# @cRippingProfile.insertItem("Low") +# @cRippingProfile.insertItem("Medium") +# @cRippingProfile.insertItem("High") +# @cRippingProfile.insertItem("Very high") +# @cRippingProfile.insertItem("Lossless") +# @cRippingProfile.insertItem("Last used") +# @cRippingProfile.setCurrentItem(3) +# lRippingFormat = Qt::Label.new('Format:', rippingBox) +# profileBox.addWidget( lRippingFormat ) +# @cRippingFormat = Qt::ComboBox.new(rippingBox) +# profileBox.addWidget( @cRippingFormat ) +# @cRippingFormat.insertItem("ogg") +# @cRippingFormat.insertItem("mp3") +# @cRippingFormat.insertItem("flac") +# directoryBox = Qt::HBoxLayout.new( rippingBox, 6 ); +# lRippingDirectory = Qt::Label.new('Directory:', rippingBox) +# directoryBox.addWidget( lRippingDirectory ) +# @cRippingDirectory = Qt::ComboBox.new(rippingBox) +# directoryBox.addWidget( @cRippingDirectory ) +# @cRippingDirectory.setEditable(true) +# @cRippingDirectory.insertItem("/home/daniel/soundKonverter/%b/%d - %n - %t") +# @cRippingDirectory.insertItem("Last used") + + box.addSpacing( 5 ) + + buttonsBox = Qt::HBoxLayout.new(box) + buttonsBox.setSpacing(6) + buttonsBox.addStretch() + okPushButton = Qt::PushButton.new( self, "ok" ) + buttonsBox.addWidget( okPushButton ) + okPushButton.setText( "OK" ) + okPushButton.setDefault( true ) + + connect( okPushButton, SIGNAL( 'clicked()' ), + self, SLOT( 'accept()' ) + ) + + cancelPushButton = Qt::PushButton.new( self, "cancel" ) + buttonsBox.addWidget( cancelPushButton ) + cancelPushButton.setText( "Cancel" ) + cancelPushButton.setAccel( Qt::KeySequence.new(Key_Escape) ) + + connect( cancelPushButton, SIGNAL( 'clicked()' ), + self, SLOT( 'reject()' ) + ) + + file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" ) + if file.open( Qt::IO_ReadOnly ) + ts = Qt::TextStream.new( file ) + content = '' + ts >> content + if content == 'Very_low' + @cTranscodeProfile.setCurrentItem( 0 ) + elsif content == 'Low' + @cTranscodeProfile.setCurrentItem( 1 ) + elsif content == 'Medium' + @cTranscodeProfile.setCurrentItem( 2 ) + elsif content == 'High' + @cTranscodeProfile.setCurrentItem( 3 ) + elsif content == 'Very_high' + @cTranscodeProfile.setCurrentItem( 4 ) + end + file.close() + end + +# file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/profiles" ) +# if file.open( Qt::IO_ReadOnly ) +# ts = Qt::TextStream.new( file ) +# while !ts.eof() +# content = '' +# ts >> content +# @cProfile.insertItem( content ) +# ts >> content +# end +# +# file.close() +# end +end + + +def accept() + file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" ) + if file.open( Qt::IO_WriteOnly ) + ts = Qt::TextStream.new( file ) + if @cTranscodeProfile.currentText() == 'Very low' + content = 'Very_low' + elsif @cTranscodeProfile.currentText() == 'Low' + content = 'Low' + elsif @cTranscodeProfile.currentText() == 'Medium' + content = 'Medium' + elsif @cTranscodeProfile.currentText() == 'High' + content = 'High' + elsif @cTranscodeProfile.currentText() == 'Very high' + content = 'Very_high' + end + ts << content + "\n" + file.close() + end + + super +end + +end + + +MenuItemName1 = "soundKonverter \"Convert selected files\"" +MenuItemName2 = "soundKonverter \"Add Replay Gain to selected files\"" +MenuItemName3 = "soundKonverter \"Rip and play audio CD\"" + + +def cleanup() + `dcop amarok script removeCustomMenuItem #{MenuItemName1}` + `dcop amarok script removeCustomMenuItem #{MenuItemName2}` + `dcop amarok script removeCustomMenuItem #{MenuItemName3}` +end + + +trap( "SIGTERM" ) { cleanup() } + +`dcop amarok script addCustomMenuItem #{MenuItemName1}` +`dcop amarok script addCustomMenuItem #{MenuItemName2}` +`dcop amarok script addCustomMenuItem #{MenuItemName3}` + +loop do + message = gets().chomp() + command = /[A-Za-z]*/.match( message ).to_s() + + case command + when "configure" + app = Qt::Application.new(ARGV) + widget = MainWidget.new + app.setMainWidget(widget) + widget.show() + app.exec() + + when "transcode" + args = message.split() + filename = args[1] + #uri = URI.parse( args[1] ) + #filename = URI.unescape( uri.path() ) + filetype = args[2] + profile = '' + + file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/formats" ) + if file.open( Qt::IO_ReadOnly ) + ts = Qt::TextStream.new( file ) + while !ts.eof() + mode = '' + formats = '' + ts >> mode + ts >> formats + if formats.split(',').include?( filetype ) + profile = mode + end + end + file.close() + end + + if profile == '' + file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" ) + if file.open( Qt::IO_ReadOnly ) + ts = Qt::TextStream.new( file ) + content = '' + ts >> content + if content == 'Very_low' + profile = 'Very low' + elsif content == 'Low' + profile = 'Low' + elsif content == 'Medium' + profile = 'Medium' + elsif content == 'High' + profile = 'High' + elsif content == 'Very_high' + profile = 'Very high' + end + file.close() + else + profile = 'Low' + end + end + + `dcop amarok playlist shortStatusMessage "starting soundKonverter in background"` + `soundkonverter --invisible --profile '#{profile}' --format '#{filetype}' --output '/tmp' --command "dcop amarok mediabrowser transcodingFinished %u file://%o" '#{filename}'` + + when "customMenuClicked" + if message.include?( "Convert selected files" ) + args = message.split() + # Remove the command args + 5.times() { args.delete_at( 0 ) } + + # Iterate over all selected files + files = '' + args.each() do |arg| + uri = URI.parse( arg ) + file = URI.unescape( uri.path() ) + files += ' "'+file+'"' + end + `dcop amarok playlist shortStatusMessage "starting soundKonverter"` + `soundkonverter #{files}` + end + if message.include?( "Add Replay Gain to selected files" ) + args = message.split() + # Remove the command args + 8.times() { args.delete_at( 0 ) } + + files = '' + args.each() do |arg| + uri = URI.parse( arg ) + file = URI.unescape( uri.path() ) + files += ' "'+file+'"' + end + `dcop amarok playlist shortStatusMessage "starting soundKonverter"` + `soundkonverter --replaygain #{files}` + end + if message.include?( "Rip and play audio CD" ) + `dcop amarok playlist popupMessage "Select all tracks to rip and press 'Start' in order to start ripping.\nThe tracks will be added to the playlist, when they are ready."` + #`dcop amarok playlist shortStatusMessage "starting soundKonverter"` + `soundkonverter --invisible --rip auto --command "dcop amarok playlist addMedia %o"` + end + end +end + diff --git a/src/amarotdescript/Makefile.am b/src/amarotdescript/Makefile.am deleted file mode 100755 index b8049a7..0000000 --- a/src/amarotdescript/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -amarokscriptdir = $(kde_datadir)/soundkonverter/amarokscript -amarokscript_DATA = README \ - soundKonverter.rb diff --git a/src/amarotdescript/README b/src/amarotdescript/README deleted file mode 100644 index 1186231..0000000 --- a/src/amarotdescript/README +++ /dev/null @@ -1,43 +0,0 @@ -
soundKonverter amaroK-Script (v0.3.8)
- -

-About:
-This script only adds a context menu for easily accesssing the soundKonverter tool.
This version was designed to work with soundKonverter 0.2.80+
With soundKonverter you can convert audio files into another audio format. And you can add/remove the ReplayGain tag to/from audio files. -

- -

-Usage:
-Just run this script and click on one or multiple files in your playlist with the right mouse button. Select soundKonverter and your desired action. After that soundKonverter should start (if you have installed it). Look into the handbook of soundKonverter for further information. -

- -

-Dependencies:
-

-

- -

-ChangeLog:
-Version 0.1:
-

-Version 0.2.80:
- -

- -

-License:
-GNU General Public License V2 -

- -

-Author:
-Daniel Faust (daniel@kaligames.de) -

- diff --git a/src/amarotdescript/soundKonverter.rb b/src/amarotdescript/soundKonverter.rb deleted file mode 100755 index 144c0c8..0000000 --- a/src/amarotdescript/soundKonverter.rb +++ /dev/null @@ -1,296 +0,0 @@ -#!/usr/bin/env ruby -# -# amaroK-Script for integrating soundKonverter into amaroK -# -# (c) 2005 Daniel Faust -# License: GNU General Public License V2 - - -# FIXME after adding some files to soundkonverter, it is impossible to repeat that, until soundkonverter gets closed. - -# FIXME don't open files on every request. load options on startup and save on exit! - -#`dcop amarok playlist addMedia KURL` -#`dcop amarok playlist addMediaList KURL::List` -#`dcop amarok collection scanCollectionChanges` - - -require "uri" - -begin - require "Qt" -rescue LoadError - error = 'Qt Ruby bindings are required for this script.' - `dcop amarok playlist popupMessage "soundKonverter: #{error}"` - exit -end - -class MainWidget < Qt::Dialog - -slots 'accept()' - -def initialize(parent = nil, name = nil) - super - - box = Qt::VBoxLayout.new( self, 11, 6 ); - - lTitle = Qt::Label.new('soundKonverter plugin settings', self) - box.addWidget( lTitle ) - lTitle.setAlignment(Qt::AlignCenter) - font = Qt::Font.new() - font.setPixelSize(18) - font.setBold(true) - lTitle.setFont(font) - - box.addSpacing( 5 ) - - mediaDeviceBox = Qt::GroupBox.new( 1, Qt::Vertical, "Options for transfering to media devices", self ) - box.addWidget( mediaDeviceBox ) - mediaDeviceBox.layout().setSpacing( 6 ) - mediaDeviceBox.layout().setMargin( 6 ) - Qt::Label.new('Profile for lossy conversion:', mediaDeviceBox) - @cTranscodeProfile = Qt::ComboBox.new(mediaDeviceBox) - @cTranscodeProfile.insertItem("Very low") - @cTranscodeProfile.insertItem("Low") - @cTranscodeProfile.insertItem("Medium") - @cTranscodeProfile.insertItem("High") - @cTranscodeProfile.insertItem("Very high") - @cTranscodeProfile.setCurrentItem( 1 ) - -# box.addSpacing( 5 ) -# -# rippingBox = Qt::GroupBox.new( 2, Qt::Horizontal, "Use pre-defined options for CD ripping", self ) -# box.addWidget( rippingBox ) -# rippingBox.layout().setSpacing( 6 ) -# rippingBox.layout().setMargin( 6 ) -# rippingBox.setCheckable( true ) -# rippingBox.setEnabled( false ) -# -# profileBox = Qt::HBoxLayout.new( rippingBox, 6 ); -# lRippingProfile = Qt::Label.new('Profile:', rippingBox) -# profileBox.addWidget( lRippingProfile ) -# @cRippingProfile = Qt::ComboBox.new(rippingBox) -# profileBox.addWidget( @cRippingProfile ) -# @cRippingProfile.insertItem("Very low") -# @cRippingProfile.insertItem("Low") -# @cRippingProfile.insertItem("Medium") -# @cRippingProfile.insertItem("High") -# @cRippingProfile.insertItem("Very high") -# @cRippingProfile.insertItem("Lossless") -# @cRippingProfile.insertItem("Last used") -# @cRippingProfile.setCurrentItem(3) -# lRippingFormat = Qt::Label.new('Format:', rippingBox) -# profileBox.addWidget( lRippingFormat ) -# @cRippingFormat = Qt::ComboBox.new(rippingBox) -# profileBox.addWidget( @cRippingFormat ) -# @cRippingFormat.insertItem("ogg") -# @cRippingFormat.insertItem("mp3") -# @cRippingFormat.insertItem("flac") -# directoryBox = Qt::HBoxLayout.new( rippingBox, 6 ); -# lRippingDirectory = Qt::Label.new('Directory:', rippingBox) -# directoryBox.addWidget( lRippingDirectory ) -# @cRippingDirectory = Qt::ComboBox.new(rippingBox) -# directoryBox.addWidget( @cRippingDirectory ) -# @cRippingDirectory.setEditable(true) -# @cRippingDirectory.insertItem("/home/daniel/soundKonverter/%b/%d - %n - %t") -# @cRippingDirectory.insertItem("Last used") - - box.addSpacing( 5 ) - - buttonsBox = Qt::HBoxLayout.new(box) - buttonsBox.setSpacing(6) - buttonsBox.addStretch() - okPushButton = Qt::PushButton.new( self, "ok" ) - buttonsBox.addWidget( okPushButton ) - okPushButton.setText( "OK" ) - okPushButton.setDefault( true ) - - connect( okPushButton, SIGNAL( 'clicked()' ), - self, SLOT( 'accept()' ) - ) - - cancelPushButton = Qt::PushButton.new( self, "cancel" ) - buttonsBox.addWidget( cancelPushButton ) - cancelPushButton.setText( "Cancel" ) - cancelPushButton.setAccel( Qt::KeySequence.new(Key_Escape) ) - - connect( cancelPushButton, SIGNAL( 'clicked()' ), - self, SLOT( 'reject()' ) - ) - - file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" ) - if file.open( Qt::IO_ReadOnly ) - ts = Qt::TextStream.new( file ) - content = '' - ts >> content - if content == 'Very_low' - @cTranscodeProfile.setCurrentItem( 0 ) - elsif content == 'Low' - @cTranscodeProfile.setCurrentItem( 1 ) - elsif content == 'Medium' - @cTranscodeProfile.setCurrentItem( 2 ) - elsif content == 'High' - @cTranscodeProfile.setCurrentItem( 3 ) - elsif content == 'Very_high' - @cTranscodeProfile.setCurrentItem( 4 ) - end - file.close() - end - -# file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/profiles" ) -# if file.open( Qt::IO_ReadOnly ) -# ts = Qt::TextStream.new( file ) -# while !ts.eof() -# content = '' -# ts >> content -# @cProfile.insertItem( content ) -# ts >> content -# end -# -# file.close() -# end -end - - -def accept() - file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" ) - if file.open( Qt::IO_WriteOnly ) - ts = Qt::TextStream.new( file ) - if @cTranscodeProfile.currentText() == 'Very low' - content = 'Very_low' - elsif @cTranscodeProfile.currentText() == 'Low' - content = 'Low' - elsif @cTranscodeProfile.currentText() == 'Medium' - content = 'Medium' - elsif @cTranscodeProfile.currentText() == 'High' - content = 'High' - elsif @cTranscodeProfile.currentText() == 'Very high' - content = 'Very_high' - end - ts << content + "\n" - file.close() - end - - super -end - -end - - -MenuItemName1 = "soundKonverter \"Convert selected files\"" -MenuItemName2 = "soundKonverter \"Add Replay Gain to selected files\"" -MenuItemName3 = "soundKonverter \"Rip and play audio CD\"" - - -def cleanup() - `dcop amarok script removeCustomMenuItem #{MenuItemName1}` - `dcop amarok script removeCustomMenuItem #{MenuItemName2}` - `dcop amarok script removeCustomMenuItem #{MenuItemName3}` -end - - -trap( "SIGTERM" ) { cleanup() } - -`dcop amarok script addCustomMenuItem #{MenuItemName1}` -`dcop amarok script addCustomMenuItem #{MenuItemName2}` -`dcop amarok script addCustomMenuItem #{MenuItemName3}` - -loop do - message = gets().chomp() - command = /[A-Za-z]*/.match( message ).to_s() - - case command - when "configure" - app = Qt::Application.new(ARGV) - widget = MainWidget.new - app.setMainWidget(widget) - widget.show() - app.exec() - - when "transcode" - args = message.split() - filename = args[1] - #uri = URI.parse( args[1] ) - #filename = URI.unescape( uri.path() ) - filetype = args[2] - profile = '' - - file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/formats" ) - if file.open( Qt::IO_ReadOnly ) - ts = Qt::TextStream.new( file ) - while !ts.eof() - mode = '' - formats = '' - ts >> mode - ts >> formats - if formats.split(',').include?( filetype ) - profile = mode - end - end - file.close() - end - - if profile == '' - file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" ) - if file.open( Qt::IO_ReadOnly ) - ts = Qt::TextStream.new( file ) - content = '' - ts >> content - if content == 'Very_low' - profile = 'Very low' - elsif content == 'Low' - profile = 'Low' - elsif content == 'Medium' - profile = 'Medium' - elsif content == 'High' - profile = 'High' - elsif content == 'Very_high' - profile = 'Very high' - end - file.close() - else - profile = 'Low' - end - end - - `dcop amarok playlist shortStatusMessage "starting soundKonverter in background"` - `soundkonverter --invisible --profile '#{profile}' --format '#{filetype}' --output '/tmp' --command "dcop amarok mediabrowser transcodingFinished %u file://%o" '#{filename}'` - - when "customMenuClicked" - if message.include?( "Convert selected files" ) - args = message.split() - # Remove the command args - 5.times() { args.delete_at( 0 ) } - - # Iterate over all selected files - files = '' - args.each() do |arg| - uri = URI.parse( arg ) - file = URI.unescape( uri.path() ) - files += ' "'+file+'"' - end - `dcop amarok playlist shortStatusMessage "starting soundKonverter"` - `soundkonverter #{files}` - end - if message.include?( "Add Replay Gain to selected files" ) - args = message.split() - # Remove the command args - 8.times() { args.delete_at( 0 ) } - - files = '' - args.each() do |arg| - uri = URI.parse( arg ) - file = URI.unescape( uri.path() ) - files += ' "'+file+'"' - end - `dcop amarok playlist shortStatusMessage "starting soundKonverter"` - `soundkonverter --replaygain #{files}` - end - if message.include?( "Rip and play audio CD" ) - `dcop amarok playlist popupMessage "Select all tracks to rip and press 'Start' in order to start ripping.\nThe tracks will be added to the playlist, when they are ready."` - #`dcop amarok playlist shortStatusMessage "starting soundKonverter"` - `soundkonverter --invisible --rip auto --command "dcop amarok playlist addMedia %o"` - end - end -end - diff --git a/src/cdopener.cpp b/src/cdopener.cpp index 7b4c959..56f8919 100755 --- a/src/cdopener.cpp +++ b/src/cdopener.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/config.cpp b/src/config.cpp index 4ec463b..ac169aa 100755 --- a/src/config.cpp +++ b/src/config.cpp @@ -14,8 +14,8 @@ #include #include #include -#include -#include +#include +#include // NOTE currently only the possibilities of a file format are respected, // the possibilities of the current encoder are ignored diff --git a/src/configdialog.cpp b/src/configdialog.cpp index f53844f..0d539dd 100755 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -20,7 +20,7 @@ #include */ -//#include +//#include #include #include #include diff --git a/src/configenvironmentpage.cpp b/src/configenvironmentpage.cpp index 3c4b776..d67e2ad 100755 --- a/src/configenvironmentpage.cpp +++ b/src/configenvironmentpage.cpp @@ -9,7 +9,7 @@ #include //#include //#include -#include +#include #include #include diff --git a/src/configgeneralpage.cpp b/src/configgeneralpage.cpp index b389f81..64bfd5b 100755 --- a/src/configgeneralpage.cpp +++ b/src/configgeneralpage.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/configpluginspage.cpp b/src/configpluginspage.cpp index f848def..7781677 100755 --- a/src/configpluginspage.cpp +++ b/src/configpluginspage.cpp @@ -18,11 +18,11 @@ #include #include -#include +#include #include #include #include -#include +#include #include //#include diff --git a/src/configpluginspage.h b/src/configpluginspage.h index cff82e4..70f77c9 100755 --- a/src/configpluginspage.h +++ b/src/configpluginspage.h @@ -4,7 +4,7 @@ #include -#include +#include class Config; class KPushButton; diff --git a/src/convert.cpp b/src/convert.cpp index 9e9ef3a..070b9b3 100755 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -18,7 +18,7 @@ #include //#include #include -#include +#include //#include #include diff --git a/src/convert.h b/src/convert.h index 94a0f64..cd4fc5e 100755 --- a/src/convert.h +++ b/src/convert.h @@ -3,7 +3,7 @@ #ifndef CONVERT_H #define CONVERT_H -#include +#include #include #include diff --git a/src/dirdialog.cpp b/src/dirdialog.cpp index b76d148..6e68a6b 100755 --- a/src/dirdialog.cpp +++ b/src/dirdialog.cpp @@ -13,7 +13,7 @@ #include // #include #include -#include +#include DirDialog::DirDialog( Config* config, Mode mode, TQWidget *parent, const char *name, bool modal, WFlags f ) : KDialog( parent, name, modal, f ) diff --git a/src/metadata/tplugins.cpp b/src/metadata/tplugins.cpp index 10d7107..81c3b6c 100755 --- a/src/metadata/tplugins.cpp +++ b/src/metadata/tplugins.cpp @@ -38,7 +38,7 @@ #include "trueaudio/taglib_trueaudiofiletyperesolver.h" #include "trueaudio/ttafile.h" -#include "wavpack/taglib_wavpackfiletyperesolver.h" +#include "wavpack/taglib_wavpactdefiletyperesolver.h" #include "wavpack/wvfile.h" #include "speex/taglib_speexfiletyperesolver.h" #include "speex/speexfile.h" diff --git a/src/metadata/wavpack/Makefile.am b/src/metadata/wavpack/Makefile.am index 93a98c6..64f60b6 100644 --- a/src/metadata/wavpack/Makefile.am +++ b/src/metadata/wavpack/Makefile.am @@ -8,9 +8,9 @@ noinst_LTLIBRARIES = libtagwavpack.la libtagwavpack_la_SOURCES = \ wvfile.cpp \ wvproperties.cpp \ - taglib_wavpackfiletyperesolver.cpp + taglib_wavpactdefiletyperesolver.cpp noinst_HEADERS = wvfile.h \ wvproperties.h \ - taglib_wavpackfiletyperesolver.h + taglib_wavpactdefiletyperesolver.h diff --git a/src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp b/src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp deleted file mode 100644 index fe289a2..0000000 --- a/src/metadata/wavpack/taglib_wavpackfiletyperesolver.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/*************************************************************************** - copyright : (C) 2006 by Martin Aumueller - email : aumuell@reserv.at - ***************************************************************************/ - -/*************************************************************************** - * This library is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License version * - * 2.1 as published by the Free Software Foundation. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ***************************************************************************/ - -#include "taglib_wavpackfiletyperesolver.h" -#include "wvfile.h" - -#include - -TagLib::File *WavPackFileTypeResolver::createFile(const char *fileName, - bool readProperties, - TagLib::AudioProperties::ReadStyle propertiesStyle) const -{ - const char *ext = strrchr(fileName, '.'); - if(ext && !strcasecmp(ext, ".wv")) - { - TagLib::WavPack::File *f = new TagLib::WavPack::File(fileName, readProperties, propertiesStyle); - if(f->isValid()) - return f; - else - { - delete f; - } - } - - return 0; -} diff --git a/src/metadata/wavpack/taglib_wavpackfiletyperesolver.h b/src/metadata/wavpack/taglib_wavpackfiletyperesolver.h deleted file mode 100644 index b9d4500..0000000 --- a/src/metadata/wavpack/taglib_wavpackfiletyperesolver.h +++ /dev/null @@ -1,36 +0,0 @@ -/*************************************************************************** - copyright : (C) 2006 by Martin Aumueller - email : aumuell@reserv.at - ***************************************************************************/ - -/*************************************************************************** - * This library is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License version * - * 2.1 as published by the Free Software Foundation. * - * * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with this library; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * - * MA 02110-1301 USA * - ***************************************************************************/ - -#ifndef TAGLIB_WAVPACKFILETYPERESOLVER_H -#define TAGLIB_WAVPACKFILETYPERESOLVER_H - -#include -#include - - -class WavPackFileTypeResolver : public TagLib::FileRef::FileTypeResolver -{ - TagLib::File *createFile(const char *fileName, - bool readAudioProperties, - TagLib::AudioProperties::ReadStyle audioPropertiesStyle) const; -}; - -#endif diff --git a/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp b/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp new file mode 100644 index 0000000..feadd8b --- /dev/null +++ b/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.cpp @@ -0,0 +1,44 @@ +/*************************************************************************** + copyright : (C) 2006 by Martin Aumueller + email : aumuell@reserv.at + ***************************************************************************/ + +/*************************************************************************** + * This library is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Lesser General Public License version * + * 2.1 as published by the Free Software Foundation. * + * * + * This library is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ***************************************************************************/ + +#include "taglib_wavpactdefiletyperesolver.h" +#include "wvfile.h" + +#include + +TagLib::File *WavPackFileTypeResolver::createFile(const char *fileName, + bool readProperties, + TagLib::AudioProperties::ReadStyle propertiesStyle) const +{ + const char *ext = strrchr(fileName, '.'); + if(ext && !strcasecmp(ext, ".wv")) + { + TagLib::WavPack::File *f = new TagLib::WavPack::File(fileName, readProperties, propertiesStyle); + if(f->isValid()) + return f; + else + { + delete f; + } + } + + return 0; +} diff --git a/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h b/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h new file mode 100644 index 0000000..b9d4500 --- /dev/null +++ b/src/metadata/wavpack/taglib_wavpactdefiletyperesolver.h @@ -0,0 +1,36 @@ +/*************************************************************************** + copyright : (C) 2006 by Martin Aumueller + email : aumuell@reserv.at + ***************************************************************************/ + +/*************************************************************************** + * This library is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Lesser General Public License version * + * 2.1 as published by the Free Software Foundation. * + * * + * This library is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * + * MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef TAGLIB_WAVPACKFILETYPERESOLVER_H +#define TAGLIB_WAVPACKFILETYPERESOLVER_H + +#include +#include + + +class WavPackFileTypeResolver : public TagLib::FileRef::FileTypeResolver +{ + TagLib::File *createFile(const char *fileName, + bool readAudioProperties, + TagLib::AudioProperties::ReadStyle audioPropertiesStyle) const; +}; + +#endif diff --git a/src/options.cpp b/src/options.cpp index 59e10e0..fe1e3ab 100755 --- a/src/options.cpp +++ b/src/options.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include // FIXME prevent converting wav files to wav diff --git a/src/options.h b/src/options.h index ddb5661..deb6cd2 100755 --- a/src/options.h +++ b/src/options.h @@ -7,7 +7,7 @@ #include "conversionoptions.h" -#include +#include class OptionsSimple; class OptionsDetailed; diff --git a/src/outputdirectory.cpp b/src/outputdirectory.cpp index 3119849..55a2ecf 100755 --- a/src/outputdirectory.cpp +++ b/src/outputdirectory.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/paranoia.cpp b/src/paranoia.cpp index 6031e84..66db95c 100755 --- a/src/paranoia.cpp +++ b/src/paranoia.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include diff --git a/src/replaygainscanner.cpp b/src/replaygainscanner.cpp index 0e34b88..da7bc4e 100755 --- a/src/replaygainscanner.cpp +++ b/src/replaygainscanner.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/src/soundkonverter.cpp b/src/soundkonverter.cpp index 155e746..c48645b 100755 --- a/src/soundkonverter.cpp +++ b/src/soundkonverter.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include -- cgit v1.2.1