fixes for previous patch (indentation/compilation)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "clock.h"
|
||||
#include "charset.h"
|
||||
#include "global.h"
|
||||
#include "helpers.h"
|
||||
@@ -34,6 +35,8 @@
|
||||
#include "browser.h"
|
||||
#include "media_library.h"
|
||||
#include "search_engine.h"
|
||||
#include "outputs.h"
|
||||
#include "visualizer.h"
|
||||
|
||||
bool ConnectToMPD()
|
||||
{
|
||||
@@ -122,10 +125,10 @@ void ParseArgv(int argc, char **argv)
|
||||
<< "Usage: ncmpcpp [OPTION]...\n"
|
||||
<< " -h, --host connect to server at host [localhost]\n"
|
||||
<< " -p, --port connect to server at port [6600]\n"
|
||||
<< " -s, --screen <name> specify the startup screen\n"
|
||||
<< " -?, --help show this help message\n"
|
||||
<< " -v, --version display version information\n"
|
||||
<< " --now-playing display now playing song [" << now_playing_format << "]\n"
|
||||
<< " --screen <name> specify the startup screen\n"
|
||||
<< "\n"
|
||||
<< " play start playing\n"
|
||||
<< " pause pause the currently playing song\n"
|
||||
@@ -141,47 +144,46 @@ void ParseArgv(int argc, char **argv)
|
||||
if (!ConnectToMPD())
|
||||
exit(0);
|
||||
|
||||
if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--screen"))
|
||||
{
|
||||
i++;
|
||||
if (i == argc) {
|
||||
std::cout << "ncmpcpp: no screen specified" << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
if (!strcmp(argv[i], "help"))
|
||||
Config.startup_screen = myHelp;
|
||||
else if (!strcmp(argv[i], "playlist"))
|
||||
Config.startup_screen = myPlaylist;
|
||||
else if (!strcmp(argv[i], "browser"))
|
||||
Config.startup_screen = myBrowser;
|
||||
else if (!strcmp(argv[i], "search"))
|
||||
Config.startup_screen = mySearcher;
|
||||
else if (!strcmp(argv[i], "media-library") || !strcmp(argv[i], "library"))
|
||||
Config.startup_screen = myLibrary;
|
||||
else if (!strcmp(argv[i], "playlist-editor"))
|
||||
Config.startup_screen = myPlaylistEditor;
|
||||
# ifdef HAVE_TAGLIB_H
|
||||
else if (!strcmp(argv[i], "tag-editor"))
|
||||
Config.startup_screen = myTagEditor;
|
||||
# endif // HAVE_TAGLIB_H
|
||||
# ifdef ENABLE_OUTPUTS
|
||||
else if (!strcmp(argv[i], "outputs"))
|
||||
Config.startup_screen = myOutputs;
|
||||
# endif // ENABLE_OUTPUTS
|
||||
# ifdef ENABLE_VISUALIZER
|
||||
else if (!strcmp(argv[i], "visualizer"))
|
||||
Config.startup_screen = myVisualizer;
|
||||
# endif // ENABLE_VISUALIZER
|
||||
# ifdef ENABLE_CLOCK
|
||||
else if (!strcmp(argv[i], "clock"))
|
||||
Config.startup_screen = myClock;
|
||||
# endif // ENABLE_CLOCK
|
||||
else {
|
||||
std::cout << "ncmpcpp: invalid screen: " << argv[i] << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(argv[i], "--now-playing"))
|
||||
if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--screen"))
|
||||
{
|
||||
if (++i == argc) {
|
||||
std::cout << "ncmpcpp: no screen specified" << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
if (!strcmp(argv[i], "help"))
|
||||
Config.startup_screen = myHelp;
|
||||
else if (!strcmp(argv[i], "playlist"))
|
||||
Config.startup_screen = myPlaylist;
|
||||
else if (!strcmp(argv[i], "browser"))
|
||||
Config.startup_screen = myBrowser;
|
||||
else if (!strcmp(argv[i], "search-engine"))
|
||||
Config.startup_screen = mySearcher;
|
||||
else if (!strcmp(argv[i], "media-library"))
|
||||
Config.startup_screen = myLibrary;
|
||||
else if (!strcmp(argv[i], "playlist-editor"))
|
||||
Config.startup_screen = myPlaylistEditor;
|
||||
# ifdef HAVE_TAGLIB_H
|
||||
else if (!strcmp(argv[i], "tag-editor"))
|
||||
Config.startup_screen = myTagEditor;
|
||||
# endif // HAVE_TAGLIB_H
|
||||
# ifdef ENABLE_OUTPUTS
|
||||
else if (!strcmp(argv[i], "outputs"))
|
||||
Config.startup_screen = myOutputs;
|
||||
# endif // ENABLE_OUTPUTS
|
||||
# ifdef ENABLE_VISUALIZER
|
||||
else if (!strcmp(argv[i], "visualizer"))
|
||||
Config.startup_screen = myVisualizer;
|
||||
# endif // ENABLE_VISUALIZER
|
||||
# ifdef ENABLE_CLOCK
|
||||
else if (!strcmp(argv[i], "clock"))
|
||||
Config.startup_screen = myClock;
|
||||
# endif // ENABLE_CLOCK
|
||||
else {
|
||||
std::cout << "ncmpcpp: invalid screen: " << argv[i] << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(argv[i], "--now-playing"))
|
||||
{
|
||||
Mpd.UpdateStatus();
|
||||
if (!Mpd.GetErrorMessage().empty())
|
||||
|
||||
Reference in New Issue
Block a user