Permalink
Browse files

Rename CUEFILE_SUPPORT to CUESHEET_SUPPORT.

From the OCD^Wconsistency department.
  • Loading branch information...
1 parent c310d4c commit 9a3fdcc6d7358deaf3031b78c1f4747c18a92f8f @fernandotcl committed Jun 17, 2012
Showing with 19 additions and 19 deletions.
  1. +3 −3 CMakeLists.txt
  2. +7 −7 src/InteractiveTagger.cpp
  3. +3 −3 src/InteractiveTagger.h
  4. +1 −1 src/config.h.in
  5. +5 −5 src/main.cpp
View
@@ -41,12 +41,12 @@ set(BTAG_HEADERS
src/UnixRenamingFilter.h
src/wide_string_cast.h)
-option(CUEFILE_SUPPORT "Support for reading metadata from CUE files (requires libcue)" ON)
-if(CUEFILE_SUPPORT)
+option(CUESHEET_SUPPORT "Support for reading metadata from cue sheets (requires libcue)" ON)
+if(CUESHEET_SUPPORT)
pkg_check_modules(LIBCUE REQUIRED libcue)
set(BTAG_SOURCES ${BTAG_SOURCES} src/CueReader.cpp)
set(BTAG_HEADERS ${BTAG_HEADERS} src/CueReader.h)
-endif(CUEFILE_SUPPORT)
+endif(CUESHEET_SUPPORT)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
@@ -43,7 +43,7 @@ void InteractiveTagger::set_dir_rename_format(const std::string &format)
m_dir_rename_format = boost::lexical_cast<std::wstring>(format);
}
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
void InteractiveTagger::load_cue_sheet(const std::string &filename, const std::string &encoding)
{
try {
@@ -229,7 +229,7 @@ void InteractiveTagger::tag_file(const fs::path &path, ConfirmationHandler &arti
// Ask for the artist
artist_confirmation.reset();
bool set_artist = false;
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
if (m_cue) {
boost::optional<std::wstring> artist = m_cue->artist_for_track(track);
if (artist) {
@@ -248,7 +248,7 @@ void InteractiveTagger::tag_file(const fs::path &path, ConfirmationHandler &arti
// Ask for the album
album_confirmation.reset();
bool set_album = false;
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
if (m_cue) {
boost::optional<std::wstring> album = m_cue->album();
if (album) {
@@ -266,7 +266,7 @@ void InteractiveTagger::tag_file(const fs::path &path, ConfirmationHandler &arti
// Ask for the year
boost::optional<int> default_year;
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
boost::optional<int> cue_year;
if (m_cue) {
cue_year = m_cue->year();
@@ -279,7 +279,7 @@ void InteractiveTagger::tag_file(const fs::path &path, ConfirmationHandler &arti
default_year = *year;
else if (f.tag()->year())
default_year = f.tag()->year();
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
}
#endif
YearValidator year_validator;
@@ -295,7 +295,7 @@ void InteractiveTagger::tag_file(const fs::path &path, ConfirmationHandler &arti
ConfirmationHandler title_confirmation(*m_terminal, m_input_filter, m_output_filter);
title_confirmation.reset();
bool set_title = false;
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
if (m_cue) {
boost::optional<std::wstring> title = m_cue->title_for_track(track);
if (title) {
@@ -394,7 +394,7 @@ void InteractiveTagger::tag_directory(const fs::path &path)
BOOST_FOREACH(const fs::path &p, file_list)
tag_file(p, artist, album, &year, track++);
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
// Done using the CUE file, if any
m_cue.reset(NULL);
#endif
@@ -25,7 +25,7 @@
#include "InteractiveTerminal.h"
#include "RenamingFilter.h"
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
# include "CueReader.h"
#endif
@@ -45,7 +45,7 @@ class InteractiveTagger
void set_dry_run(bool dry_run = true) { m_dry_run = dry_run; }
void set_ask_track(bool ask_track = true) { m_ask_track = ask_track; }
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
void load_cue_sheet(const std::string &filename, const std::string &encoding);
#endif
@@ -71,7 +71,7 @@ class InteractiveTagger
std::list<std::wstring> m_supported_extensions;
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
boost::scoped_ptr<CueReader> m_cue;
#endif
};
View
@@ -1,6 +1,6 @@
#ifndef CONFIG_H
#define CONFIG_H
-#cmakedefine CUEFILE_SUPPORT
+#cmakedefine CUESHEET_SUPPORT
#endif
View
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
struct option long_options[] = {
{"always-ask-track", no_argument, NULL, 0},
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
{"cue-sheet", required_argument, NULL, 'C'},
{"cue-sheet-encoding", required_argument, NULL, 0},
#endif
@@ -123,13 +123,13 @@ int main(int argc, char **argv)
// Parse the command line options
int opt, option_index;
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
while ((opt = getopt_long(argc, argv, "C:Dd:i:f:o:hn:r:t:", long_options, &option_index)) != -1) {
#else
while ((opt = getopt_long(argc, argv, "Dd:i:f:o:hn:r:t:", long_options, &option_index)) != -1) {
#endif
switch (opt) {
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
case 'C':
cue_filename = optarg;
break;
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
case 0:
if (!strcmp(long_options[option_index].name, "always-ask-track"))
itag.set_ask_track();
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
else if (!strcmp(long_options[option_index].name, "cue-sheet-encoding"))
cue_encoding = optarg;
#endif
@@ -202,7 +202,7 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
-#ifdef CUEFILE_SUPPORT
+#ifdef CUESHEET_SUPPORT
// Load the cue sheet if needed
if (cue_filename)
itag.load_cue_sheet(*cue_filename, cue_encoding);

0 comments on commit 9a3fdcc

Please sign in to comment.