diff --git a/src/application.vala b/src/application.vala deleted file mode 100644 index 74cf982..0000000 --- a/src/application.vala +++ /dev/null @@ -1,48 +0,0 @@ -public class Audrey.Application : Adw.Application { - public Application () { - Object ( - application_id: "eu.callcc.audrey", - flags: ApplicationFlags.DEFAULT_FLAGS - ); - } - - construct { - GLib.ActionEntry[] action_entries = { - { "about", this.on_about_action }, - { "preferences", this.on_preferences_action }, - { "quit", this.quit } - }; - this.add_action_entries (action_entries, this); - this.set_accels_for_action ("app.quit", {"q"}); - } - - public override void activate () { - base.activate (); - // if this.active_window not null, this isnt the primary instance - var win = this.active_window ?? new Ui.Window (this); - win.present (); - } - - private void on_about_action () { - string[] developers = { "Erica Z" }; - var about = new Adw.AboutDialog () { - application_name = "audrey", - application_icon = "eu.callcc.audrey", - developer_name = "Erica Z", - translator_credits = _("translator-credits"), - version = "0.1.0", // AUDREY_VERSION - developers = developers, - copyright = "© 2024 Erica Z", - }; - - about.present (this.active_window); - } - - private void on_preferences_action () { - message ("app.preferences action activated"); - } - - ~Application () { - debug ("destroying application"); - } -} diff --git a/src/meson.build b/src/meson.build index 8a23701..b50a17c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,5 +1,4 @@ audrey_sources = [ - 'application.vala', 'globalconf.vala', 'mpris.vala', 'playbin.vala', diff --git a/src/mpris.vala b/src/mpris.vala index 674f24f..14b5a6f 100644 --- a/src/mpris.vala +++ b/src/mpris.vala @@ -1,38 +1,3 @@ -/* -[DBus (name = "org.mpris.MediaPlayer2")] -class Audrey.Mpris : Object { - internal signal void on_raise (); - internal signal void on_quit (); - - public bool can_raise { get { return true; } } - public void raise () throws Error { - this.on_raise (); - } - - public bool can_quit { get { return true; } } - public void quit () throws Error { - this.on_quit (); - } - - public bool can_set_fullscreen { get { return false; } } - public bool fullscreen { get { return false; } set { assert (false); } } - public bool has_track_list { get { return false; } } - public string identity { owned get { return "audrey"; } } - public string desktop_entry { owned get { return "eu.callcc.audrey"; } } - public string[] supported_uri_schemes { owned get { return {}; } } - public string[] supported_mime_types { owned get { return {}; } } - - internal Mpris (Ui.Window window) { - this.on_raise.connect (() => window.present ()); - this.on_quit.connect (() => window.close ()); - } - - ~Mpris () { - debug ("destroying mpris"); - } -} -*/ - [DBus (name = "org.mpris.MediaPlayer2.Player")] class Audrey.MprisPlayer : Object { internal signal void on_next ();