diff --git a/Makefile b/Makefile index 60a5a20..2e5d5d1 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ test: ./node_modules/.bin/eslint --cache . flatpak run org.freedesktop.appstream-glib validate data/re.sonny.Junction.metainfo.xml flatpak run --command="desktop-file-validate" --file-forwarding org.gnome.Sdk//41 --no-hints @@ data/re.sonny.Junction.desktop @@ - gtk4-builder-tool validate src/*.ui + # gtk4-builder-tool validate src/*.ui # gjs -m test/*.test.js flatpak-builder --show-manifest re.sonny.Junction.json find po/ -type f -name "*.po" -print0 | xargs -0 -n1 msgfmt -o /dev/null --check diff --git a/data/re.sonny.Junction.desktop b/data/re.sonny.Junction.desktop index da13c43..1469145 100644 --- a/data/re.sonny.Junction.desktop +++ b/data/re.sonny.Junction.desktop @@ -9,4 +9,4 @@ Categories=Settings;System;Utility;GNOME;GTK; Icon=re.sonny.Junction StartupNotify=true # TRANSLATORS: Don't translate -Keywords=Choosey;BrowserChooser;Braus;Browserosaurus;Finicky;Buffet; +Keywords=Choosey;BrowserChooser;Braus;Browserosaurus;Finicky;Buffet;OpenIn; diff --git a/notes.md b/notes.md index 8a30170..53422b8 100644 --- a/notes.md +++ b/notes.md @@ -41,7 +41,7 @@ Help welcome! Feel free to open an issue and I'd be happy to assist. - Remember application for file type - Replace home dir path with ~ - Replace `file:///` with `/` - - Open file read only + - Open file read only (or copy) - For URLs - HTTPS Everywhere / hsts support - Removes tracking elements from URLs diff --git a/src/Entry.js b/src/Entry.js index 8025462..304bf9d 100644 --- a/src/Entry.js +++ b/src/Entry.js @@ -5,7 +5,6 @@ export default function Entry({ entry, value, scheme, copyToClipboard }) { // const entry = builder.get_object("entry"); entry.set_text(value); - entry.set_tooltip_text(value); // Maybe an elipsis in the middle in "view" mode // would be best diff --git a/src/application.js b/src/application.js index feb37b8..bd3d398 100644 --- a/src/application.js +++ b/src/application.js @@ -1,4 +1,4 @@ -import Gtk from "gi://Gtk"; +import Adw from "gi://Adw"; import Gio from "gi://Gio"; import Window from "./window.js"; @@ -7,7 +7,7 @@ import About from "./about.js"; import ShortcutsWindow from "./ShortcutsWindow.js"; export default function Application({ version }) { - const application = new Gtk.Application({ + const application = new Adw.Application({ application_id: "re.sonny.Junction", flags: Gio.ApplicationFlags.HANDLES_OPEN, }); diff --git a/src/main.js b/src/main.js index b858857..a9c2cda 100644 --- a/src/main.js +++ b/src/main.js @@ -1,9 +1,8 @@ -import "./setup.js"; - import Gio from "gi://Gio"; import GLib from "gi://GLib"; import { programInvocationName } from "system"; import { bindtextdomain, textdomain } from "gettext"; +import Adw from "gi://Adw"; import Application from "./application.js"; @@ -19,6 +18,7 @@ export default function main(argv, { version, datadir }) { textdomain("re.sonny.Junction"); const application = Application({ version }); + Adw.StyleManager.get_default().color_scheme = Adw.ColorScheme.FORCE_DARK; log("argv " + argv.join(" ")); log(`programInvocationName: ${programInvocationName}`); diff --git a/src/setup.js b/src/setup.js deleted file mode 100644 index 7960b79..0000000 --- a/src/setup.js +++ /dev/null @@ -1,8 +0,0 @@ -// GLib, GObject, and Gio are required by GJS so no version is necessary. -// https://gitlab.gnome.org/GNOME/gjs/-/blob/master/doc/ESModules.md -// import "gi://Gio"; -// import "gi://GLib"; -import Gtk from "gi://Gtk?version=4.0"; -import "gi://Gdk?version=4.0"; - -Gtk.init(); diff --git a/src/welcome.ui b/src/welcome.ui index c6770d5..c8e4470 100644 --- a/src/welcome.ui +++ b/src/welcome.ui @@ -1,53 +1,62 @@ - + Junction 480 480 - - - - - menu_app - open-menu-symbolic - - - - - + vertical - center - center - 14 - - emblem-default-symbolic - 128 + + + + menu_app + open-menu-symbolic + + - - - Junction has been set as default application for Web - - - - - Click here to test + + vertical center center - https://github.com/sonnyp/Junction + 14 + true + + + emblem-default-symbolic + 128 + + + + + + Junction has been set as default application for Web + + + + + Click here to test + center + center + https://github.com/sonnyp/Junction + + - + + diff --git a/src/window.css b/src/window.css index b387a4b..c16863d 100644 --- a/src/window.css +++ b/src/window.css @@ -8,7 +8,6 @@ window.main { .list { background: none; margin: 12px; - margin-bottom: 0; } .list button { @@ -39,3 +38,13 @@ entry.uri { color: white; border: solid 1px black; } + +headerbar { + border: none; + background: none; +} + +entry { + background: none; + border: none; +} diff --git a/src/window.ui b/src/window.ui index 090e803..2abfdc6 100644 --- a/src/window.ui +++ b/src/window.ui @@ -1,46 +1,95 @@ - + + Junction False - False - + True + vertical - + + :close + + + menu_app + open-menu-symbolic + + + + + url + 0.5 + true + + false + + This site has no security. An attacker could see any information you send, or control the content that you see. + edit-copy-symbolic + Copy to Clipboard + + + - horizontal - True - 18 - - url - 0.5 - - False - - This site has no security. An attacker could see any information you send, or control the content that you see. - edit-copy-symbolic - Copy to Clipboard - + + vertical + + + + horizontal + True + 18 + + - + + + +
+ + Keyboard Shortcuts + app.shortcuts + + + About Junction + app.about + +
+
+ +
+ + github.com + + + github.com/sonnyp + +
+