From 340cb36ecda046c157fffea71ce7ee9931a3d976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Thu, 21 Jan 2021 14:19:04 +0100 Subject: [PATCH] Move "clapper_src" dir to "src" The "clapper_src" directory name was unusual. This was done to make it work as a widget for other apps. Now that this functionality got removed it can be named simply "src" as recommended by guidelines. --- bin/com.github.rafostar.Clapper.Subprocess.in | 2 +- bin/com.github.rafostar.Clapper.in | 2 +- clapper_src/mainDaemon.js | 6 ------ meson.build | 2 +- {clapper_src => src}/app.js | 8 ++++---- {clapper_src => src}/appBase.js | 6 +++--- {clapper_src => src}/appRemote.js | 6 +++--- {clapper_src => src}/buttons.js | 0 {clapper_src => src}/controls.js | 8 ++++---- {clapper_src => src}/daemon.js | 2 +- {clapper_src => src}/debug.js | 0 {clapper_src => src}/dialogs.js | 8 ++++---- {clapper_src => src}/headerbar.js | 2 +- {clapper_src => src}/headerbarBase.js | 2 +- {clapper_src => src}/main.js | 2 +- src/mainDaemon.js | 6 ++++++ {clapper_src => src}/mainRemote.js | 4 ++-- {clapper_src => src}/menu.js | 2 +- {clapper_src => src}/misc.js | 2 +- {clapper_src => src}/player.js | 6 +++--- {clapper_src => src}/playerBase.js | 10 +++++----- {clapper_src => src}/playerRemote.js | 2 +- {clapper_src => src}/playlist.js | 0 {clapper_src => src}/prefs.js | 4 ++-- {clapper_src => src}/prefsBase.js | 4 ++-- {clapper_src => src}/revealers.js | 2 +- {clapper_src => src}/webApp.js | 4 ++-- {clapper_src => src}/webClient.js | 6 +++--- {clapper_src => src}/webHelpers.js | 2 +- {clapper_src => src}/webServer.js | 4 ++-- {clapper_src => src}/widget.js | 10 +++++----- {clapper_src => src}/widgetRemote.js | 6 +++--- 32 files changed, 65 insertions(+), 65 deletions(-) delete mode 100644 clapper_src/mainDaemon.js rename {clapper_src => src}/app.js (88%) rename {clapper_src => src}/appBase.js (95%) rename {clapper_src => src}/appRemote.js (72%) rename {clapper_src => src}/buttons.js (100%) rename {clapper_src => src}/controls.js (99%) rename {clapper_src => src}/daemon.js (97%) rename {clapper_src => src}/debug.js (100%) rename {clapper_src => src}/dialogs.js (97%) rename {clapper_src => src}/headerbar.js (91%) rename {clapper_src => src}/headerbarBase.js (98%) rename {clapper_src => src}/main.js (79%) create mode 100644 src/mainDaemon.js rename {clapper_src => src}/mainRemote.js (71%) rename {clapper_src => src}/menu.js (88%) rename {clapper_src => src}/misc.js (98%) rename {clapper_src => src}/player.js (99%) rename {clapper_src => src}/playerBase.js (97%) rename {clapper_src => src}/playerRemote.js (87%) rename {clapper_src => src}/playlist.js (100%) rename {clapper_src => src}/prefs.js (99%) rename {clapper_src => src}/prefsBase.js (98%) rename {clapper_src => src}/revealers.js (99%) rename {clapper_src => src}/webApp.js (92%) rename {clapper_src => src}/webClient.js (93%) rename {clapper_src => src}/webHelpers.js (93%) rename {clapper_src => src}/webServer.js (97%) rename {clapper_src => src}/widget.js (98%) rename {clapper_src => src}/widgetRemote.js (93%) diff --git a/bin/com.github.rafostar.Clapper.Subprocess.in b/bin/com.github.rafostar.Clapper.Subprocess.in index b8a463fd..b4621a03 100644 --- a/bin/com.github.rafostar.Clapper.Subprocess.in +++ b/bin/com.github.rafostar.Clapper.Subprocess.in @@ -14,4 +14,4 @@ Package.init({ libdir: '@libdir@', datadir: '@datadir@', }); -Package.run(imports.clapper_src.main@ID_POSTFIX@); +Package.run(imports.src.main@ID_POSTFIX@); diff --git a/bin/com.github.rafostar.Clapper.in b/bin/com.github.rafostar.Clapper.in index 78cd7495..22533e35 100644 --- a/bin/com.github.rafostar.Clapper.in +++ b/bin/com.github.rafostar.Clapper.in @@ -9,4 +9,4 @@ Package.init({ libdir: '@libdir@', datadir: '@datadir@', }); -Package.run(imports.clapper_src.main); +Package.run(imports.src.main); diff --git a/clapper_src/mainDaemon.js b/clapper_src/mainDaemon.js deleted file mode 100644 index 93302a4e..00000000 --- a/clapper_src/mainDaemon.js +++ /dev/null @@ -1,6 +0,0 @@ -const { Daemon } = imports.clapper_src.daemon; - -function main() -{ - new Daemon(); -} diff --git a/meson.build b/meson.build index 183eb1cf..225922a0 100644 --- a/meson.build +++ b/meson.build @@ -19,7 +19,7 @@ subdir('bin') subdir('data') installdir = join_paths(get_option('prefix'), 'share', meson.project_name()) -install_subdir('clapper_src', install_dir : installdir) +install_subdir('src', install_dir : installdir) install_subdir('extras', install_dir : installdir) install_subdir('css', install_dir : installdir) install_subdir('ui', install_dir : installdir) diff --git a/clapper_src/app.js b/src/app.js similarity index 88% rename from clapper_src/app.js rename to src/app.js index 85d51c8b..5115aeb5 100644 --- a/clapper_src/app.js +++ b/src/app.js @@ -1,8 +1,8 @@ const { Gio, GObject } = imports.gi; -const { AppBase } = imports.clapper_src.appBase; -const { HeaderBar } = imports.clapper_src.headerbar; -const { Widget } = imports.clapper_src.widget; -const Debug = imports.clapper_src.debug; +const { AppBase } = imports.src.appBase; +const { HeaderBar } = imports.src.headerbar; +const { Widget } = imports.src.widget; +const Debug = imports.src.debug; const { debug } = Debug; diff --git a/clapper_src/appBase.js b/src/appBase.js similarity index 95% rename from clapper_src/appBase.js rename to src/appBase.js index 9f6f2376..a3617531 100644 --- a/clapper_src/appBase.js +++ b/src/appBase.js @@ -1,7 +1,7 @@ const { Gio, GLib, GObject, Gtk } = imports.gi; -const Debug = imports.clapper_src.debug; -const Menu = imports.clapper_src.menu; -const Misc = imports.clapper_src.misc; +const Debug = imports.src.debug; +const Menu = imports.src.menu; +const Misc = imports.src.misc; const { debug } = Debug; const { settings } = Misc; diff --git a/clapper_src/appRemote.js b/src/appRemote.js similarity index 72% rename from clapper_src/appRemote.js rename to src/appRemote.js index 169c548f..aa396e7f 100644 --- a/clapper_src/appRemote.js +++ b/src/appRemote.js @@ -1,7 +1,7 @@ const { GObject } = imports.gi; -const { AppBase } = imports.clapper_src.appBase; -const { HeaderBarBase } = imports.clapper_src.headerbarBase; -const { WidgetRemote } = imports.clapper_src.widgetRemote; +const { AppBase } = imports.src.appBase; +const { HeaderBarBase } = imports.src.headerbarBase; +const { WidgetRemote } = imports.src.widgetRemote; var AppRemote = GObject.registerClass( class ClapperAppRemote extends AppBase diff --git a/clapper_src/buttons.js b/src/buttons.js similarity index 100% rename from clapper_src/buttons.js rename to src/buttons.js diff --git a/clapper_src/controls.js b/src/controls.js similarity index 99% rename from clapper_src/controls.js rename to src/controls.js index 6c1fc072..18c344f3 100644 --- a/clapper_src/controls.js +++ b/src/controls.js @@ -1,8 +1,8 @@ const { GLib, GObject, Gdk, Gtk } = imports.gi; -const Buttons = imports.clapper_src.buttons; -const Debug = imports.clapper_src.debug; -const Misc = imports.clapper_src.misc; -const Revealers = imports.clapper_src.revealers; +const Buttons = imports.src.buttons; +const Debug = imports.src.debug; +const Misc = imports.src.misc; +const Revealers = imports.src.revealers; const CONTROLS_MARGIN = 2; const CONTROLS_SPACING = 0; diff --git a/clapper_src/daemon.js b/src/daemon.js similarity index 97% rename from clapper_src/daemon.js rename to src/daemon.js index 2935f139..e4de8f59 100644 --- a/clapper_src/daemon.js +++ b/src/daemon.js @@ -1,5 +1,5 @@ const { Gio, GLib, GObject } = imports.gi; -const Debug = imports.clapper_src.debug; +const Debug = imports.src.debug; const { debug } = Debug; diff --git a/clapper_src/debug.js b/src/debug.js similarity index 100% rename from clapper_src/debug.js rename to src/debug.js diff --git a/clapper_src/dialogs.js b/src/dialogs.js similarity index 97% rename from clapper_src/dialogs.js rename to src/dialogs.js index dd36e719..4c153d70 100644 --- a/clapper_src/dialogs.js +++ b/src/dialogs.js @@ -1,8 +1,8 @@ const { Gio, GObject, Gtk, Gst } = imports.gi; -const Debug = imports.clapper_src.debug; -const Misc = imports.clapper_src.misc; -const Prefs = imports.clapper_src.prefs; -const PrefsBase = imports.clapper_src.prefsBase; +const Debug = imports.src.debug; +const Misc = imports.src.misc; +const Prefs = imports.src.prefs; +const PrefsBase = imports.src.prefsBase; const { debug } = Debug; diff --git a/clapper_src/headerbar.js b/src/headerbar.js similarity index 91% rename from clapper_src/headerbar.js rename to src/headerbar.js index 4a28f51c..32651366 100644 --- a/clapper_src/headerbar.js +++ b/src/headerbar.js @@ -1,5 +1,5 @@ const { GObject } = imports.gi; -const { HeaderBarBase } = imports.clapper_src.headerbarBase; +const { HeaderBarBase } = imports.src.headerbarBase; var HeaderBar = GObject.registerClass( class ClapperHeaderBar extends HeaderBarBase diff --git a/clapper_src/headerbarBase.js b/src/headerbarBase.js similarity index 98% rename from clapper_src/headerbarBase.js rename to src/headerbarBase.js index 7ca71257..eecb5573 100644 --- a/clapper_src/headerbarBase.js +++ b/src/headerbarBase.js @@ -1,5 +1,5 @@ const { GObject, Gtk, Pango } = imports.gi; -const Misc = imports.clapper_src.misc; +const Misc = imports.src.misc; var HeaderBarBase = GObject.registerClass( class ClapperHeaderBarBase extends Gtk.HeaderBar diff --git a/clapper_src/main.js b/src/main.js similarity index 79% rename from clapper_src/main.js rename to src/main.js index 7eddc9af..15bec1ab 100644 --- a/clapper_src/main.js +++ b/src/main.js @@ -2,7 +2,7 @@ imports.gi.versions.Gdk = '4.0'; imports.gi.versions.Gtk = '4.0'; const { Gst } = imports.gi; -const { App } = imports.clapper_src.app; +const { App } = imports.src.app; Gst.init(null); diff --git a/src/mainDaemon.js b/src/mainDaemon.js new file mode 100644 index 00000000..8e2f8c16 --- /dev/null +++ b/src/mainDaemon.js @@ -0,0 +1,6 @@ +const { Daemon } = imports.src.daemon; + +function main() +{ + new Daemon(); +} diff --git a/clapper_src/mainRemote.js b/src/mainRemote.js similarity index 71% rename from clapper_src/mainRemote.js rename to src/mainRemote.js index bdbf3b92..dc20ddf5 100644 --- a/clapper_src/mainRemote.js +++ b/src/mainRemote.js @@ -1,8 +1,8 @@ imports.gi.versions.Gdk = '4.0'; imports.gi.versions.Gtk = '4.0'; -const { AppRemote } = imports.clapper_src.appRemote; -const Misc = imports.clapper_src.misc; +const { AppRemote } = imports.src.appRemote; +const Misc = imports.src.misc; const ID_POSTFIX = 'Remote'; diff --git a/clapper_src/menu.js b/src/menu.js similarity index 88% rename from clapper_src/menu.js rename to src/menu.js index 0fb95f5f..601022c0 100644 --- a/clapper_src/menu.js +++ b/src/menu.js @@ -1,5 +1,5 @@ const { GObject, Gst, Gtk } = imports.gi; -const Dialogs = imports.clapper_src.dialogs; +const Dialogs = imports.src.dialogs; var actions = { openLocal: (window) => new Dialogs.FileChooser(window), diff --git a/clapper_src/misc.js b/src/misc.js similarity index 98% rename from clapper_src/misc.js rename to src/misc.js index 05c5d1eb..79ad654a 100644 --- a/clapper_src/misc.js +++ b/src/misc.js @@ -1,5 +1,5 @@ const { Gio, GstAudio, GstPlayer, Gdk, Gtk } = imports.gi; -const Debug = imports.clapper_src.debug; +const Debug = imports.src.debug; const { debug } = Debug; diff --git a/clapper_src/player.js b/src/player.js similarity index 99% rename from clapper_src/player.js rename to src/player.js index 1a49eaa8..2513d437 100644 --- a/clapper_src/player.js +++ b/src/player.js @@ -1,8 +1,8 @@ const { Gdk, Gio, GLib, GObject, Gst, GstPlayer, Gtk } = imports.gi; const ByteArray = imports.byteArray; -const Debug = imports.clapper_src.debug; -const Misc = imports.clapper_src.misc; -const { PlayerBase } = imports.clapper_src.playerBase; +const Debug = imports.src.debug; +const Misc = imports.src.misc; +const { PlayerBase } = imports.src.playerBase; const { debug } = Debug; const { settings } = Misc; diff --git a/clapper_src/playerBase.js b/src/playerBase.js similarity index 97% rename from clapper_src/playerBase.js rename to src/playerBase.js index d5a2be00..a2287e46 100644 --- a/clapper_src/playerBase.js +++ b/src/playerBase.js @@ -1,8 +1,8 @@ const { Gio, GLib, GObject, Gst, GstPlayer, Gtk } = imports.gi; -const Debug = imports.clapper_src.debug; -const Misc = imports.clapper_src.misc; -const { PlaylistWidget } = imports.clapper_src.playlist; -const { WebApp } = imports.clapper_src.webApp; +const Debug = imports.src.debug; +const Misc = imports.src.misc; +const { PlaylistWidget } = imports.src.playlist; +const { WebApp } = imports.src.webApp; const { debug } = Debug; const { settings } = Misc; @@ -275,7 +275,7 @@ class ClapperPlayerBase extends GstPlayer.Player if(!WebServer) { /* Probably most users will not use this, * so conditional import for faster startup */ - WebServer = imports.clapper_src.webServer.WebServer; + WebServer = imports.src.webServer.WebServer; } if(!this.webserver) { diff --git a/clapper_src/playerRemote.js b/src/playerRemote.js similarity index 87% rename from clapper_src/playerRemote.js rename to src/playerRemote.js index 166dd18c..40fda0f2 100644 --- a/clapper_src/playerRemote.js +++ b/src/playerRemote.js @@ -1,5 +1,5 @@ const { GObject } = imports.gi; -const { WebClient } = imports.clapper_src.webClient; +const { WebClient } = imports.src.webClient; var PlayerRemote = GObject.registerClass( class ClapperPlayerRemote extends GObject.Object diff --git a/clapper_src/playlist.js b/src/playlist.js similarity index 100% rename from clapper_src/playlist.js rename to src/playlist.js diff --git a/clapper_src/prefs.js b/src/prefs.js similarity index 99% rename from clapper_src/prefs.js rename to src/prefs.js index 24cf45b0..1e516d15 100644 --- a/clapper_src/prefs.js +++ b/src/prefs.js @@ -1,6 +1,6 @@ const { GObject, Gst, Gtk, Pango } = imports.gi; -const Misc = imports.clapper_src.misc; -const PrefsBase = imports.clapper_src.prefsBase; +const Misc = imports.src.misc; +const PrefsBase = imports.src.prefsBase; const { settings } = Misc; diff --git a/clapper_src/prefsBase.js b/src/prefsBase.js similarity index 98% rename from clapper_src/prefsBase.js rename to src/prefsBase.js index 02cddf5f..2d12442a 100644 --- a/clapper_src/prefsBase.js +++ b/src/prefsBase.js @@ -1,6 +1,6 @@ const { Gio, GObject, Gtk } = imports.gi; -const Debug = imports.clapper_src.debug; -const Misc = imports.clapper_src.misc; +const Debug = imports.src.debug; +const Misc = imports.src.misc; const { debug } = Debug; const { settings } = Misc; diff --git a/clapper_src/revealers.js b/src/revealers.js similarity index 99% rename from clapper_src/revealers.js rename to src/revealers.js index 9b8988c1..44db5fd4 100644 --- a/clapper_src/revealers.js +++ b/src/revealers.js @@ -1,5 +1,5 @@ const { GLib, GObject, Gtk, Pango } = imports.gi; -const Debug = imports.clapper_src.debug; +const Debug = imports.src.debug; const REVEAL_TIME = 800; diff --git a/clapper_src/webApp.js b/src/webApp.js similarity index 92% rename from clapper_src/webApp.js rename to src/webApp.js index fdcf4851..76ac5094 100644 --- a/clapper_src/webApp.js +++ b/src/webApp.js @@ -1,6 +1,6 @@ const { Gio, GObject } = imports.gi; -const Debug = imports.clapper_src.debug; -const Misc = imports.clapper_src.misc; +const Debug = imports.src.debug; +const Misc = imports.src.misc; const { debug } = Debug; diff --git a/clapper_src/webClient.js b/src/webClient.js similarity index 93% rename from clapper_src/webClient.js rename to src/webClient.js index f7bc8956..d95bcbea 100644 --- a/clapper_src/webClient.js +++ b/src/webClient.js @@ -1,7 +1,7 @@ const { Gio, GObject, Soup } = imports.gi; -const Debug = imports.clapper_src.debug; -const Misc = imports.clapper_src.misc; -const WebHelpers = imports.clapper_src.webHelpers; +const Debug = imports.src.debug; +const Misc = imports.src.misc; +const WebHelpers = imports.src.webHelpers; const { debug } = Debug; const { settings } = Misc; diff --git a/clapper_src/webHelpers.js b/src/webHelpers.js similarity index 93% rename from clapper_src/webHelpers.js rename to src/webHelpers.js index 263e6ab7..79e25fbd 100644 --- a/clapper_src/webHelpers.js +++ b/src/webHelpers.js @@ -1,6 +1,6 @@ const { Soup } = imports.gi; const ByteArray = imports.byteArray; -const Debug = imports.clapper_src.debug; +const Debug = imports.src.debug; const { debug } = Debug; diff --git a/clapper_src/webServer.js b/src/webServer.js similarity index 97% rename from clapper_src/webServer.js rename to src/webServer.js index 2cedc716..3442c596 100644 --- a/clapper_src/webServer.js +++ b/src/webServer.js @@ -1,6 +1,6 @@ const { Soup, GObject } = imports.gi; -const Debug = imports.clapper_src.debug; -const WebHelpers = imports.clapper_src.webHelpers; +const Debug = imports.src.debug; +const WebHelpers = imports.src.webHelpers; const { debug } = Debug; diff --git a/clapper_src/widget.js b/src/widget.js similarity index 98% rename from clapper_src/widget.js rename to src/widget.js index f0d5589c..970910e4 100644 --- a/clapper_src/widget.js +++ b/src/widget.js @@ -1,9 +1,9 @@ const { Gdk, GLib, GObject, GstPlayer, Gtk } = imports.gi; -const { Controls } = imports.clapper_src.controls; -const Debug = imports.clapper_src.debug; -const Misc = imports.clapper_src.misc; -const { Player } = imports.clapper_src.player; -const Revealers = imports.clapper_src.revealers; +const { Controls } = imports.src.controls; +const Debug = imports.src.debug; +const Misc = imports.src.misc; +const { Player } = imports.src.player; +const Revealers = imports.src.revealers; const { debug } = Debug; const { settings } = Misc; diff --git a/clapper_src/widgetRemote.js b/src/widgetRemote.js similarity index 93% rename from clapper_src/widgetRemote.js rename to src/widgetRemote.js index b95a96fd..a79ad4a7 100644 --- a/clapper_src/widgetRemote.js +++ b/src/widgetRemote.js @@ -1,7 +1,7 @@ const { GObject, Gtk, GstPlayer } = imports.gi; -const Buttons = imports.clapper_src.buttons; -const Misc = imports.clapper_src.misc; -const { PlayerRemote } = imports.clapper_src.playerRemote; +const Buttons = imports.src.buttons; +const Misc = imports.src.misc; +const { PlayerRemote } = imports.src.playerRemote; var WidgetRemote = GObject.registerClass( class ClapperWidgetRemote extends Gtk.Grid