fixes for previous patch (indentation/compilation)
This commit is contained in:
@@ -15,6 +15,9 @@ Connect to server at host [localhost]
|
|||||||
.B \-p, \-\-port
|
.B \-p, \-\-port
|
||||||
Connect to server at port [6600]
|
Connect to server at port [6600]
|
||||||
.TP
|
.TP
|
||||||
|
.B \-s, \-\-screen <name>
|
||||||
|
Specify the startup screen (<name> may be: help, playlist, browser, search-engine, media-library, playlist-editor, tag-editor, outputs, visualizer, clock)
|
||||||
|
.TP
|
||||||
.B \-?, \-\-help
|
.B \-?, \-\-help
|
||||||
Display help.
|
Display help.
|
||||||
.TP
|
.TP
|
||||||
@@ -24,9 +27,6 @@ Display version information.
|
|||||||
.B \-\-now\-playing
|
.B \-\-now\-playing
|
||||||
Display now playing song [{{(%l) }{{%a - }%t}}|{%f}}]
|
Display now playing song [{{(%l) }{{%a - }%t}}|{%f}}]
|
||||||
.TP
|
.TP
|
||||||
.B \-\-screen <name>
|
|
||||||
Specify the startup screen.
|
|
||||||
.TP
|
|
||||||
.B play
|
.B play
|
||||||
Start playing and exit.
|
Start playing and exit.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
#include "clock.h"
|
||||||
#include "charset.h"
|
#include "charset.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
@@ -34,6 +35,8 @@
|
|||||||
#include "browser.h"
|
#include "browser.h"
|
||||||
#include "media_library.h"
|
#include "media_library.h"
|
||||||
#include "search_engine.h"
|
#include "search_engine.h"
|
||||||
|
#include "outputs.h"
|
||||||
|
#include "visualizer.h"
|
||||||
|
|
||||||
bool ConnectToMPD()
|
bool ConnectToMPD()
|
||||||
{
|
{
|
||||||
@@ -122,10 +125,10 @@ void ParseArgv(int argc, char **argv)
|
|||||||
<< "Usage: ncmpcpp [OPTION]...\n"
|
<< "Usage: ncmpcpp [OPTION]...\n"
|
||||||
<< " -h, --host connect to server at host [localhost]\n"
|
<< " -h, --host connect to server at host [localhost]\n"
|
||||||
<< " -p, --port connect to server at port [6600]\n"
|
<< " -p, --port connect to server at port [6600]\n"
|
||||||
|
<< " -s, --screen <name> specify the startup screen\n"
|
||||||
<< " -?, --help show this help message\n"
|
<< " -?, --help show this help message\n"
|
||||||
<< " -v, --version display version information\n"
|
<< " -v, --version display version information\n"
|
||||||
<< " --now-playing display now playing song [" << now_playing_format << "]\n"
|
<< " --now-playing display now playing song [" << now_playing_format << "]\n"
|
||||||
<< " --screen <name> specify the startup screen\n"
|
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< " play start playing\n"
|
<< " play start playing\n"
|
||||||
<< " pause pause the currently playing song\n"
|
<< " pause pause the currently playing song\n"
|
||||||
@@ -143,8 +146,7 @@ void ParseArgv(int argc, char **argv)
|
|||||||
|
|
||||||
if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--screen"))
|
if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--screen"))
|
||||||
{
|
{
|
||||||
i++;
|
if (++i == argc) {
|
||||||
if (i == argc) {
|
|
||||||
std::cout << "ncmpcpp: no screen specified" << std::endl;
|
std::cout << "ncmpcpp: no screen specified" << std::endl;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@@ -154,9 +156,9 @@ void ParseArgv(int argc, char **argv)
|
|||||||
Config.startup_screen = myPlaylist;
|
Config.startup_screen = myPlaylist;
|
||||||
else if (!strcmp(argv[i], "browser"))
|
else if (!strcmp(argv[i], "browser"))
|
||||||
Config.startup_screen = myBrowser;
|
Config.startup_screen = myBrowser;
|
||||||
else if (!strcmp(argv[i], "search"))
|
else if (!strcmp(argv[i], "search-engine"))
|
||||||
Config.startup_screen = mySearcher;
|
Config.startup_screen = mySearcher;
|
||||||
else if (!strcmp(argv[i], "media-library") || !strcmp(argv[i], "library"))
|
else if (!strcmp(argv[i], "media-library"))
|
||||||
Config.startup_screen = myLibrary;
|
Config.startup_screen = myLibrary;
|
||||||
else if (!strcmp(argv[i], "playlist-editor"))
|
else if (!strcmp(argv[i], "playlist-editor"))
|
||||||
Config.startup_screen = myPlaylistEditor;
|
Config.startup_screen = myPlaylistEditor;
|
||||||
|
|||||||
Reference in New Issue
Block a user