Skip to content

Commit

Permalink
Webground -> Playhouse
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp committed Jan 14, 2022
1 parent 40312bc commit 7ffa057
Show file tree
Hide file tree
Showing 30 changed files with 172 additions and 81 deletions.
8 changes: 4 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package-lock.json -diff
data/icons/re.sonny.Webground-symbolic.svg -diff
data/icons/re.sonny.Webground.Devel.svg -diff
data/icons/re.sonny.Webground.svg -diff
data/icons/re.sonny.Playhouse-symbolic.svg -diff
data/icons/re.sonny.Playhouse.Devel.svg -diff
data/icons/re.sonny.Playhouse.svg -diff

# po/re.sonny.Webground.pot -diff
# po/re.sonny.Playhouse.pot -diff
# po/*.po -diff
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ install
.eslintcache
*~
*.compiled
Webground.flatpak
Playhouse.flatpak
8 changes: 4 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

xgettext -f po/POTFILES -o po/re.sonny.Webground.pot --no-wrap -cTRANSLATORS --from-code=UTF-8
sed -i "s/same license as the PACKAGE package./same license as the re.sonny.Webground package./" po/re.sonny.Webground.pot
sed -i "s/Project-Id-Version: PACKAGE VERSION/Project-Id-Version: re.sonny.Webground/" po/re.sonny.Webground.pot
git add po/re.sonny.Webground.pot
xgettext -f po/POTFILES -o po/re.sonny.Playhouse.pot --no-wrap -cTRANSLATORS --from-code=UTF-8
sed -i "s/same license as the PACKAGE package./same license as the re.sonny.Playhouse package./" po/re.sonny.Playhouse.pot
sed -i "s/Project-Id-Version: PACKAGE VERSION/Project-Id-Version: re.sonny.Playhouse/" po/re.sonny.Playhouse.pot
git add po/re.sonny.Playhouse.pot

npx lint-staged
6 changes: 3 additions & 3 deletions Webground.doap → Playground.doap
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#"
>
<name>Webground</name>
<name>Playhouse</name>
<shortdesc>A Playground for HTML/CSS/JavaScript</shortdesc>
<description
>Something clever.</description>

<homepage rdf:resource="https://webground.sonny.re" />
<bug-database rdf:resource="https://webground.sonny.re/feedback" />
<homepage rdf:resource="https://playhouse.sonny.re" />
<bug-database rdf:resource="https://playhouse.sonny.re/feedback" />
<programming-language>JavaScript</programming-language>

<maintainer>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Webground
# Playhouse

A Playground for HTML/CSS/JavaScript

Expand Down
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
18 changes: 9 additions & 9 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
desktop_file = i18n.merge_file(
input: 're.sonny.Webground.desktop',
output: 're.sonny.Webground.desktop',
input: 're.sonny.Playhouse.desktop',
output: 're.sonny.Playhouse.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
Expand All @@ -15,8 +15,8 @@ if desktop_utils.found()
endif

appstream_file = i18n.merge_file(
input: 're.sonny.Webground.metainfo.xml',
output: 're.sonny.Webground.metainfo.xml',
input: 're.sonny.Playhouse.metainfo.xml',
output: 're.sonny.Playhouse.metainfo.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
Expand All @@ -25,8 +25,8 @@ appstream_file = i18n.merge_file(
service_conf = configuration_data()
service_conf.set('bindir', bindir)
configure_file(
input: 're.sonny.Webground.service',
output: 're.sonny.Webground.service',
input: 're.sonny.Playhouse.service',
output: 're.sonny.Playhouse.service',
configuration: service_conf,
install_dir: join_paths(get_option('datadir'), 'dbus-1/services')
)
Expand All @@ -38,7 +38,7 @@ if appstream_util.found()
)
endif

install_data('re.sonny.Webground.gschema.xml',
install_data('re.sonny.Playhouse.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)

Expand All @@ -49,5 +49,5 @@ if compile_schemas.found()
)
endif

install_data('icons/re.sonny.Webground.svg', install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps'))
install_data('icons/re.sonny.Webground-symbolic.svg', install_dir: join_paths(get_option('datadir'), 'icons/hicolor/symbolic/apps'))
install_data('icons/re.sonny.Playhouse.svg', install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps'))
install_data('icons/re.sonny.Playhouse-symbolic.svg', install_dir: join_paths(get_option('datadir'), 'icons/hicolor/symbolic/apps'))
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[Desktop Entry]
# TRANSLATORS: Don't translate
Name=Webground
Name=Playhouse
Comment=A playground for Web code
Exec=re.sonny.Webground
Exec=re.sonny.Playhouse
Terminal=false
Type=Application
Categories=WebDevelopment;Development;IDE;GNOME;GTK;
Icon=re.sonny.Webground
Icon=re.sonny.Playhouse
# TRANSLATORS: Don't translate
Keywords=JS Bin;CodePen;JSFiddle;
DBusActivatable=true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<schemalist gettext-domain="re.sonny.Webground">
<schema id="re.sonny.Webground" path="/re/sonny/Webground/">
<schemalist gettext-domain="re.sonny.Playhouse">
<schema id="re.sonny.Playhouse" path="/re/sonny/Playhouse/">
<key name="show-html" type="b">
<default>true</default>
</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<component type="desktop">
<id>re.sonny.Webground</id>
<launchable type="desktop-id">re.sonny.Webground.desktop</launchable>
<name translatable="no">Webground</name>
<id>re.sonny.Playhouse</id>
<launchable type="desktop-id">re.sonny.Playhouse.desktop</launchable>
<name translatable="no">Playhouse</name>
<developer_name translatable="no">Sonny Piers</developer_name>
<update_contact>[email protected]</update_contact>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<summary>A Playground for HTML/CSS/JavaScript</summary>
<translation type="gettext">re.sonny.Webground</translation>
<translation type="gettext">re.sonny.Playhouse</translation>
<description>
<p>Something clever</p>
</description>
<url type="homepage">https://webground.sonny.re</url>
<url type="bugtracker">https://webground.sonny.re/feedback</url>
<url type="donation">https://webground.sonny.re/donate</url>
<url type="translate">https://webground.sonny.re/translate</url>
<url type="homepage">https://playhouse.sonny.re</url>
<url type="bugtracker">https://playhouse.sonny.re/feedback</url>
<url type="donation">https://playhouse.sonny.re/donate</url>
<url type="translate">https://playhouse.sonny.re/translate</url>
<content_rating type="oars-1.1" />
<releases>
</releases>
Expand Down
3 changes: 3 additions & 0 deletions data/re.sonny.Playhouse.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[D-BUS Service]
Name=re.sonny.Playhouse
Exec=@bindir@/re.sonny.Playhouse --gapplication-service
3 changes: 0 additions & 3 deletions data/re.sonny.Webground.service

This file was deleted.

2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('re.sonny.Webground',
project('re.sonny.Playhouse',
version: '0.1.0',
meson_version: '>= 0.59.0',
license: 'GPL-3.0-only'
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions po/POTFILES
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
data/re.sonny.Webground.desktop
data/re.sonny.Webground.gschema.xml
data/re.sonny.Webground.metainfo.xml
data/re.sonny.Playhouse.desktop
data/re.sonny.Playhouse.gschema.xml
data/re.sonny.Playhouse.metainfo.xml
src/about.js
src/ShortcutsWindow.ui
src/window.ui
Expand Down
18 changes: 9 additions & 9 deletions po/re.sonny.Webground.pot → po/re.sonny.Playground.pot
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the re.sonny.Webground package.
# This file is distributed under the same license as the re.sonny.Playhouse package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: re.sonny.Webground\n"
"Project-Id-Version: re.sonny.Playhouse\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-04 00:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
Expand All @@ -18,24 +18,24 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"

#. TRANSLATORS: Don't translate
#: data/re.sonny.Webground.desktop:4
msgid "Webground"
#: data/re.sonny.Playhouse.desktop:4
msgid "Playhouse"
msgstr ""

#: data/re.sonny.Webground.desktop:5
#: data/re.sonny.Playhouse.desktop:5
msgid "A playground for Web code"
msgstr ""

#. TRANSLATORS: Don't translate
#: data/re.sonny.Webground.desktop:12
#: data/re.sonny.Playhouse.desktop:12
msgid "JS Bin;CodePen;JSFiddle;"
msgstr ""

#: data/re.sonny.Webground.metainfo.xml:10 src/about.js:9
#: data/re.sonny.Playhouse.metainfo.xml:10 src/about.js:9
msgid "A Playground for HTML/CSS/JavaScript"
msgstr ""

#: data/re.sonny.Webground.metainfo.xml:13
#: data/re.sonny.Playhouse.metainfo.xml:13
msgid "Something clever"
msgstr ""

Expand All @@ -53,5 +53,5 @@ msgid "Quit"
msgstr ""

#: src/window.ui:165
msgid "About Webground"
msgid "About Playhouse"
msgstr ""
57 changes: 57 additions & 0 deletions po/re.sonny.Playhouse.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the re.sonny.Playhouse package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: re.sonny.Playhouse\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-14 13:46+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. TRANSLATORS: Don't translate
#: data/re.sonny.Playhouse.desktop:4
msgid "Playhouse"
msgstr ""

#: data/re.sonny.Playhouse.desktop:5
msgid "A playground for Web code"
msgstr ""

#. TRANSLATORS: Don't translate
#: data/re.sonny.Playhouse.desktop:12
msgid "JS Bin;CodePen;JSFiddle;"
msgstr ""

#: data/re.sonny.Playhouse.metainfo.xml:10 src/about.js:9
msgid "A Playground for HTML/CSS/JavaScript"
msgstr ""

#: data/re.sonny.Playhouse.metainfo.xml:13
msgid "Something clever"
msgstr ""

#. TRANSLATORS: eg. 'Translator Name <[email protected]>' or 'Translator Name https://website.example'
#: src/about.js:19
msgid "translator-credits"
msgstr ""

#: src/ShortcutsWindow.ui:15 src/window.ui:161
msgid "Keyboard Shortcuts"
msgstr ""

#: src/ShortcutsWindow.ui:21
msgid "Quit"
msgstr ""

#: src/window.ui:165
msgid "About Playhouse"
msgstr ""
6 changes: 3 additions & 3 deletions re.sonny.Webground.json → re.sonny.Playhouse.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"app-id": "re.sonny.Webground",
"app-id": "re.sonny.Playhouse",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"sdk-extensions": ["org.freedesktop.Sdk.Extension.node16"],
"command": "re.sonny.Webground",
"command": "re.sonny.Playhouse",
"build-options": {
"append-path": "/usr/lib/sdk/node16/bin"
},
Expand All @@ -30,7 +30,7 @@
]
},
{
"name": "Webground",
"name": "Playhouse",
"buildsystem": "meson",
"builddir": true,
"sources": [
Expand Down
10 changes: 10 additions & 0 deletions src/WebView.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
export default function WebView({ web_view }) {
const settings = web_view.get_settings();
settings.set_enable_developer_extras(true);

const user_content_manager = web_view.get_user_content_manager()

user_content_manager.connect('script-message-received::foobar', () => {
console.log('foo')
})


user_content_manager.register_script_message_handler ("foobar");

}
9 changes: 4 additions & 5 deletions src/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ export default function About({ application, datadir, version }) {
copyright: "Copyright 2021 Sonny Piers",
license_type: Gtk.License.GPL_3_0_ONLY,
version,
website: "https://webground.sonny.re",
website: "https://playhouse.sonny.re",
transient_for: application.get_active_window(),
// Prevents input on Webground when clicking on a link
// Prevents input on Playhouse when clicking on a link
// modal: true,
logo_icon_name: "re.sonny.Webground",
logo_icon_name: "re.sonny.Playhouse",
// TRANSLATORS: eg. 'Translator Name <[email protected]>' or 'Translator Name https://website.example'
translator_credits: _("translator-credits")
translator_credits: _("translator-credits"),
});
// dialog.add_credit_section("Contributors", [
// // Add yourself as
Expand All @@ -30,4 +30,3 @@ export default function About({ application, datadir, version }) {

return { dialog };
}

6 changes: 3 additions & 3 deletions src/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import { relativePath, loadStyleSheet } from "./util.js";

export default function Application({ version, datadir }) {
const application = new Adw.Application({
application_id: "re.sonny.Webground",
application_id: "re.sonny.Playhouse",
// flags: Gio.ApplicationFlags.HANDLES_OPEN,
});

application.connect("activate", () => {
Window({
application,
});
})
});

application.connect("startup", () => {
loadStyleSheet(relativePath("./style.css"));
Expand All @@ -39,7 +39,7 @@ export default function Application({ version, datadir }) {
null,
);

application.set_option_context_description("<https://webground.sonny.re>");
application.set_option_context_description("<https://playhouse.sonny.re>");
application.set_option_context_parameter_string("[URI…]");
// TODO: Add examples
// application.set_option_context_summary("");
Expand Down
Loading

0 comments on commit 7ffa057

Please sign in to comment.