[gnome-break-timer] Remove needless Application references



commit 79e2fc8f594f6cd5db6f1d817180ba4ae1c6ac7b
Author: Dylan McCall <dylan dylanmccall ca>
Date:   Sat Nov 28 23:23:45 2020 -0800

    Remove needless Application references

 src/daemon/Application.vala    | 2 +-
 src/daemon/SessionStatus.vala  | 5 -----
 src/settings/Application.vala  | 2 +-
 src/settings/BreakManager.vala | 6 +-----
 4 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/src/daemon/Application.vala b/src/daemon/Application.vala
index a1d74f4..0fb9432 100644
--- a/src/daemon/Application.vala
+++ b/src/daemon/Application.vala
@@ -80,7 +80,7 @@ public class Application : Gtk.Application {
             Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
         );
 
-        this.session_status = new SessionStatus (this);
+        this.session_status = new SessionStatus ();
         try {
             this.session_status.init (null);
         } catch (GLib.Error error) {
diff --git a/src/daemon/SessionStatus.vala b/src/daemon/SessionStatus.vala
index b75b19b..52670f7 100644
--- a/src/daemon/SessionStatus.vala
+++ b/src/daemon/SessionStatus.vala
@@ -27,15 +27,10 @@ namespace BreakTimer.Daemon {
  * case we are unable to connect.
  */
 public class SessionStatus : GLib.Object, ISessionStatus, GLib.Initable {
-    private Gtk.Application application;
     private GLib.DBusConnection dbus_connection;
     private IGnomeScreenSaver? screensaver;
     private bool screensaver_is_active = false;
 
-    public SessionStatus (Gtk.Application application) {
-        this.application = application;
-    }
-
     public bool init (GLib.Cancellable? cancellable) throws GLib.Error {
         this.dbus_connection = GLib.Bus.get_sync (GLib.BusType.SESSION, cancellable);
 
diff --git a/src/settings/Application.vala b/src/settings/Application.vala
index f7b744d..dfe5c11 100644
--- a/src/settings/Application.vala
+++ b/src/settings/Application.vala
@@ -102,7 +102,7 @@ public class Application : Gtk.Application {
 
         this.set_accels_for_action ("app.quit", {"<Primary>q"});
 
-        this.break_manager = new BreakManager (this);
+        this.break_manager = new BreakManager ();
         try {
             this.break_manager.init (null);
         } catch (GLib.Error error) {
diff --git a/src/settings/BreakManager.vala b/src/settings/BreakManager.vala
index 7404838..1b89eb7 100644
--- a/src/settings/BreakManager.vala
+++ b/src/settings/BreakManager.vala
@@ -29,8 +29,6 @@ using BreakTimer.Settings.RestBreak;
 namespace BreakTimer.Settings {
 
 public class BreakManager : GLib.Object {
-    private Application application;
-
     private IBreakTimer break_daemon;
 
     private GLib.List<BreakType> breaks;
@@ -58,9 +56,7 @@ public class BreakManager : GLib.Object {
         BACKGROUND_NOT_ALLOWED
     }
 
-    public BreakManager (Application application) {
-        this.application = application;
-
+    public BreakManager () {
         this.settings = new GLib.Settings (Config.APPLICATION_ID);
 
         this.breaks = new GLib.List<BreakType> ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]