Skip to content

Commit

Permalink
Page: move to src/page/
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 9, 2024
1 parent 1302c5d commit 2da8487
Show file tree
Hide file tree
Showing 22 changed files with 41 additions and 21 deletions.
8 changes: 2 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,6 @@ if enable_chat_screen
need_screen_text = true
endif

if need_screen_text
sources += ['src/TextPage.cxx']
endif

if need_plugin_library
if host_machine.system() == 'windows'
error('Plugins not yet compatible with Windows')
Expand All @@ -384,6 +380,7 @@ subdir('src/system')
subdir('src/net')
subdir('src/event')
subdir('src/ui')
subdir('src/page')

ncmpc = executable('ncmpc',
'src/Main.cxx',
Expand Down Expand Up @@ -415,11 +412,9 @@ ncmpc = executable('ncmpc',
'src/screen_list.cxx',
'src/screen_find.cxx',
'src/screen_client.cxx',
'src/Page.cxx',
'src/QueuePage.cxx',
'src/FileListPage.cxx',
'src/FileBrowserPage.cxx',
'src/ProxyPage.cxx',
'src/save_playlist.cxx',
'src/SongRowPaint.cxx',
'src/BasicColors.cxx',
Expand All @@ -445,6 +440,7 @@ ncmpc = executable('ncmpc',
libmpdclient_dep,
fmt_dep,
ui_dep,
page_dep,
],
install: true
)
Expand Down
2 changes: 1 addition & 1 deletion src/ChatPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#include "PageMeta.hxx"
#include "screen_utils.hxx"
#include "screen_status.hxx"
#include "TextPage.hxx"
#include "mpdclient.hxx"
#include "i18n.h"
#include "charset.hxx"
#include "Command.hxx"
#include "Options.hxx"
#include "page/TextPage.hxx"
#include "util/StringAPI.hxx"

#include <mpd/idle.h>
Expand Down
2 changes: 1 addition & 1 deletion src/FileListPage.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#pragma once

#include "config.h"
#include "ListPage.hxx"
#include "page/ListPage.hxx"
#include "ui/ListRenderer.hxx"
#include "ui/ListText.hxx"

Expand Down
2 changes: 1 addition & 1 deletion src/HelpPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

#include "HelpPage.hxx"
#include "PageMeta.hxx"
#include "ListPage.hxx"
#include "screen_find.hxx"
#include "Bindings.hxx"
#include "GlobalBindings.hxx"
#include "config.h"
#include "i18n.h"
#include "page/ListPage.hxx"
#include "ui/ListRenderer.hxx"
#include "ui/ListText.hxx"
#include "ui/paint.hxx"
Expand Down
4 changes: 2 additions & 2 deletions src/KeyDefPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include "KeyDefPage.hxx"
#include "PageMeta.hxx"
#include "ListPage.hxx"
#include "ProxyPage.hxx"
#include "screen_status.hxx"
#include "screen_find.hxx"
#include "KeyName.hxx"
Expand All @@ -14,6 +12,8 @@
#include "GlobalBindings.hxx"
#include "screen_utils.hxx"
#include "Options.hxx"
#include "page/ListPage.hxx"
#include "page/ProxyPage.hxx"
#include "ui/Bell.hxx"
#include "ui/ListText.hxx"
#include "ui/TextListRenderer.hxx"
Expand Down
2 changes: 1 addition & 1 deletion src/LibraryPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#include "PageMeta.hxx"
#include "FileListPage.hxx"
#include "Command.hxx"
#include "ProxyPage.hxx"
#include "i18n.h"
#include "charset.hxx"
#include "mpdclient.hxx"
#include "filelist.hxx"
#include "Options.hxx"
#include "page/ProxyPage.hxx"
#include "lib/fmt/ToSpan.hxx"

#include <list>
Expand Down
2 changes: 1 addition & 1 deletion src/LyricsPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include "mpdclient.hxx"
#include "screen.hxx"
#include "plugin.hxx"
#include "TextPage.hxx"
#include "ncu.hxx"
#include "page/TextPage.hxx"
#include "lib/fmt/ToSpan.hxx"
#include "util/StringAPI.hxx"

Expand Down
2 changes: 1 addition & 1 deletion src/OutputsPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#include "OutputsPage.hxx"
#include "Deleter.hxx"
#include "PageMeta.hxx"
#include "ListPage.hxx"
#include "screen_status.hxx"
#include "Command.hxx"
#include "screen_utils.hxx"
#include "i18n.h"
#include "mpdclient.hxx"
#include "page/ListPage.hxx"
#include "ui/ListRenderer.hxx"
#include "ui/paint.hxx"
#include "util/FNVHash.hxx"
Expand Down
2 changes: 1 addition & 1 deletion src/QueuePage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "QueuePage.hxx"
#include "PageMeta.hxx"
#include "ListPage.hxx"
#include "FileBrowserPage.hxx"
#include "screen_status.hxx"
#include "screen_find.hxx"
Expand All @@ -24,6 +23,7 @@
#include "SongPage.hxx"
#include "LyricsPage.hxx"
#include "db_completion.hxx"
#include "page/ListPage.hxx"
#include "ui/ListRenderer.hxx"
#include "ui/ListText.hxx"
#include "event/CoarseTimerEvent.hxx"
Expand Down
2 changes: 1 addition & 1 deletion src/SongPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "SongPage.hxx"
#include "PageMeta.hxx"
#include "ListPage.hxx"
#include "FileBrowserPage.hxx"
#include "LyricsPage.hxx"
#include "screen_find.hxx"
Expand All @@ -13,6 +12,7 @@
#include "charset.hxx"
#include "time_format.hxx"
#include "mpdclient.hxx"
#include "page/ListPage.hxx"
#include "ui/ListText.hxx"
#include "ui/TextListRenderer.hxx"
#include "lib/fmt/ToSpan.hxx"
Expand Down
2 changes: 1 addition & 1 deletion src/TagListPage.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#pragma once

#include "TagFilter.hxx"
#include "ListPage.hxx"
#include "page/ListPage.hxx"
#include "ui/ListRenderer.hxx"
#include "ui/ListText.hxx"

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Page.hxx → src/page/Page.hxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-License-Identifier: GPL-2.0-or-lateryes
// Copyright The Music Player Daemon Project

#pragma once
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions src/page/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
page_sources = [
'Page.cxx',
'ProxyPage.cxx',
]

if need_screen_text
page_sources += 'TextPage.cxx'
endif

page = static_library(
'page',
page_sources,
include_directories: inc,
dependencies: [
ui_dep,
],
)

page_dep = declare_dependency(
link_with: page,
dependencies: [
ui_dep,
],
)
2 changes: 1 addition & 1 deletion src/screen.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "PageMeta.hxx"
#include "screen_list.hxx"
#include "screen_status.hxx"
#include "Page.hxx"
#include "Command.hxx"
#include "config.h"
#include "i18n.h"
Expand All @@ -15,6 +14,7 @@
#include "player_command.hxx"
#include "SongPage.hxx"
#include "LyricsPage.hxx"
#include "page/Page.hxx"
#include "ui/Options.hxx"
#include "util/StringAPI.hxx"

Expand Down
2 changes: 1 addition & 1 deletion src/screen_init.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Copyright The Music Player Daemon Project

#include "screen.hxx"
#include "Page.hxx"
#include "QueuePage.hxx"
#include "config.h"
#include "Styles.hxx"
#include "page/Page.hxx"
#include "ui/Options.hxx"

/* minimum window size */
Expand Down
2 changes: 1 addition & 1 deletion src/screen_paint.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright The Music Player Daemon Project

#include "screen.hxx"
#include "Page.hxx"
#include "page/Page.hxx"
#include "ui/Options.hxx"

void
Expand Down

0 comments on commit 2da8487

Please sign in to comment.