mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-11 22:14:21 +00:00
aesthetic and hotkey changes.
This commit is contained in:
parent
35750d9da3
commit
bfbb01fa57
@ -163,8 +163,10 @@ int main(int argc, char* argv[])
|
||||
musik::debug::init();
|
||||
PluginFactory::Instance(); /* initialize */
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef __PDCURSES__
|
||||
PDC_set_resize_limits(26, 38, 100, 150);
|
||||
PDC_set_title("musikbox ♫");
|
||||
PDC_set_function_key(FUNCTION_KEY_SHUT_DOWN, 4);
|
||||
#endif
|
||||
|
||||
initscr();
|
||||
@ -176,11 +178,6 @@ int main(int argc, char* argv[])
|
||||
refresh();
|
||||
curs_set(0);
|
||||
|
||||
#ifdef __PDCURSES__
|
||||
PDC_set_title("musikbox ♫");
|
||||
PDC_set_function_key(FUNCTION_KEY_SHUT_DOWN, 4);
|
||||
#endif
|
||||
|
||||
{
|
||||
Colors::Init();
|
||||
|
||||
@ -265,10 +262,10 @@ int main(int argc, char* argv[])
|
||||
consoleLayout->Layout();
|
||||
state.layout->BringToTop();
|
||||
}
|
||||
else if (ch == KEY_F(1)) {
|
||||
else if (ch == KEY_F(2)) {
|
||||
changeLayout(state, libraryLayout);
|
||||
}
|
||||
else if (ch == KEY_F(8)) {
|
||||
else if (ch == KEY_F(1)) {
|
||||
changeLayout(state, consoleLayout);
|
||||
}
|
||||
else if (!globalHotkeys.Handle(kn)) {
|
||||
|
@ -129,17 +129,20 @@ void CommandWindow::SetVolume(float volume) {
|
||||
void CommandWindow::Help() {
|
||||
int64 s = -1;
|
||||
this->output->WriteLine("help:\n", s);
|
||||
this->output->WriteLine(" <tab> to switch between windows\n", s);
|
||||
this->output->WriteLine(" pl [file]: play file at path", s);
|
||||
this->output->WriteLine(" pa: toggle pause/resume", s);
|
||||
this->output->WriteLine(" st: stop playing", s);
|
||||
this->output->WriteLine(" plugins: list loaded plugins", s);
|
||||
this->output->WriteLine(" v: <0 - 100>: set % volume", s);
|
||||
this->output->WriteLine(" sk <seconds>: seek to <seconds> into track", s);
|
||||
this->output->WriteLine(" <tab> to switch between windows", s);
|
||||
this->output->WriteLine(" <F1> console view", s);
|
||||
this->output->WriteLine(" <F2> library view", s);
|
||||
this->output->WriteLine("\n", s);
|
||||
this->output->WriteLine(" play <uri>: play audio at location", s);
|
||||
this->output->WriteLine(" pause: pause/resume", s);
|
||||
this->output->WriteLine(" stop: stop all playback", s);
|
||||
this->output->WriteLine(" volume: <0 - 100>: set % volume", s);
|
||||
this->output->WriteLine(" seek <seconds>: seek to <seconds> into track", s);
|
||||
this->output->WriteLine(" addir <dir>: add a directory to be indexed", s);
|
||||
this->output->WriteLine(" rmdir <dir>: remove indexed directory path", s);
|
||||
this->output->WriteLine(" lsdirs: list all directories used by the indexer", s);
|
||||
this->output->WriteLine(" rescan: rescan metadata in index paths", s);
|
||||
this->output->WriteLine(" lsdirs: list scanned directories", s);
|
||||
this->output->WriteLine(" rescan: rescan paths for new metadata", s);
|
||||
this->output->WriteLine(" plugins: list loaded plugins", s);
|
||||
this->output->WriteLine("\n <ctrl+d>: quit\n", s);
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ typedef IScrollAdapter::IEntry IEntry;
|
||||
|
||||
LogWindow::LogWindow(IWindow *parent)
|
||||
: ScrollableWindow(parent) {
|
||||
this->SetContentColor(BOX_COLOR_WHITE_ON_BLUE);
|
||||
this->SetContentColor(BOX_COLOR_WHITE_ON_BLACK);
|
||||
|
||||
this->adapter = new SimpleScrollAdapter();
|
||||
this->adapter->SetMaxEntries(500);
|
||||
@ -36,21 +36,21 @@ void LogWindow::Update() {
|
||||
return;
|
||||
}
|
||||
|
||||
int64 attrs = COLOR_PAIR(BOX_COLOR_WHITE_ON_BLACK);
|
||||
|
||||
WINDOW* contents = this->GetContent();
|
||||
|
||||
for (size_t i = 0; i < pending.size(); i++) {
|
||||
int64 attrs = COLOR_PAIR(BOX_COLOR_WHITE_ON_BLUE);
|
||||
|
||||
LogEntry* entry = pending[i];
|
||||
|
||||
switch (entry->level) {
|
||||
case musik::debug::level_error: {
|
||||
attrs = COLOR_PAIR(BOX_COLOR_RED_ON_BLUE) | A_BOLD;
|
||||
attrs = COLOR_PAIR(BOX_COLOR_RED_ON_BLACK) | A_BOLD;
|
||||
break;
|
||||
}
|
||||
|
||||
case musik::debug::level_warning: {
|
||||
attrs = COLOR_PAIR(BOX_COLOR_YELLOW_ON_BLUE) | A_BOLD;
|
||||
attrs = COLOR_PAIR(BOX_COLOR_YELLOW_ON_BLACK) | A_BOLD;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -202,9 +202,12 @@ void TransportWindow::Update() {
|
||||
wprintw(c, currentTime.c_str());
|
||||
wattroff(c, timerAttrs);
|
||||
|
||||
wprintw(c, " %s %s",
|
||||
timerTrack.c_str(),
|
||||
totalTime.c_str());
|
||||
/* using wprintw() here on large displays (1440p+) will exceed the internal
|
||||
buffer length of 512 characters, so use boost format. */
|
||||
std::string fmt = boost::str(boost::format(
|
||||
" %s %s") % timerTrack % totalTime);
|
||||
|
||||
waddstr(c, fmt.c_str());
|
||||
|
||||
this->Repaint();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user