mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 13:21:13 +00:00
Fixed compile on OSX.
This commit is contained in:
parent
c418305b30
commit
be34186303
@ -1,6 +1,7 @@
|
||||
set (BOX_SRCS
|
||||
./Main.cpp
|
||||
./stdafx.cpp
|
||||
./app/layout/BrowseLayout.cpp
|
||||
./app/layout/ConsoleLayout.cpp
|
||||
./app/layout/LibraryLayout.cpp
|
||||
./app/layout/NowPlayingLayout.cpp
|
||||
@ -39,10 +40,10 @@ set (BOX_SRCS
|
||||
set (BOX_HEADERS
|
||||
./stdafx.h
|
||||
./app/layout/LibraryLayout.h
|
||||
./app/layout/MainLayout.h
|
||||
./app/layout/ConsoleLayout.h
|
||||
./app/query/CategoryListViewQuery.h
|
||||
./app/query/SingleTrackQuery.h
|
||||
./app/query/TrackListViewQuery.h
|
||||
./app/query/TrackListQueryBase.h
|
||||
./app/service/PlaybackService.h
|
||||
./app/util/GlobalHotkeys.h
|
||||
./app/util/SystemInfo.h
|
||||
|
@ -18,11 +18,10 @@ using namespace musik::box;
|
||||
using namespace cursespp;
|
||||
|
||||
BrowseLayout::BrowseLayout(
|
||||
PlaybackService& playback,
|
||||
PlaybackService& playback,
|
||||
LibraryPtr library)
|
||||
: LayoutBase()
|
||||
, playback(playback)
|
||||
, parent(parent) {
|
||||
, playback(playback) {
|
||||
this->library = library;
|
||||
this->InitializeWindows();
|
||||
}
|
||||
|
@ -14,7 +14,13 @@
|
||||
|
||||
namespace musik {
|
||||
namespace box {
|
||||
class BrowseLayout : public cursespp::LayoutBase, public sigslot::has_slots<> {
|
||||
class BrowseLayout :
|
||||
public cursespp::LayoutBase,
|
||||
#if (__clang_major__ == 7 && __clang_minor__ == 3)
|
||||
public std::enable_shared_from_this<BrowseLayout>,
|
||||
#endif
|
||||
public sigslot::has_slots<>
|
||||
{
|
||||
public:
|
||||
BrowseLayout(
|
||||
PlaybackService& playback,
|
||||
@ -43,7 +49,6 @@ namespace musik {
|
||||
std::shared_ptr<CategoryListView> categoryList;
|
||||
std::shared_ptr<TrackListView> trackList;
|
||||
cursespp::IWindowPtr focused;
|
||||
cursespp::IWindowPtr parent;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ IWindowPtr LibraryLayout::GetFocus() {
|
||||
}
|
||||
|
||||
bool LibraryLayout::KeyPress(const std::string& key) {
|
||||
if (key == "^[") { /* escape switches between browse/now playing */
|
||||
if (key == "^[" || key == "M-n") { /* escape switches between browse/now playing */
|
||||
(this->visibleLayout == this->nowPlayingLayout)
|
||||
? this->ShowBrowse() : this->ShowNowPlaying();
|
||||
}
|
||||
|
@ -14,7 +14,13 @@
|
||||
|
||||
namespace musik {
|
||||
namespace box {
|
||||
class NowPlayingLayout : public cursespp::LayoutBase, public sigslot::has_slots<> {
|
||||
class NowPlayingLayout :
|
||||
public cursespp::LayoutBase,
|
||||
#if (__clang_major__ == 7 && __clang_minor__ == 3)
|
||||
public std::enable_shared_from_this<NowPlayingLayout>,
|
||||
#endif
|
||||
public sigslot::has_slots<>
|
||||
{
|
||||
public:
|
||||
NowPlayingLayout(
|
||||
PlaybackService& playback,
|
||||
|
Loading…
x
Reference in New Issue
Block a user