Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite NotificationsMonitor #266

Merged
merged 6 commits into from
Aug 29, 2023
Merged

Rewrite NotificationsMonitor #266

merged 6 commits into from
Aug 29, 2023

Commits on Jul 28, 2023

  1. use SPDX header

    Signed-off-by: Gustavo Marques <[email protected]>
    Marukesu committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    677215f View commit details
    Browse the repository at this point in the history
  2. remove unused Fdo.Notifications proxy

    GLib.DBusProxy cannot be used to emit signals in the bus.
    
    Signed-off-by: Gustavo Marques <[email protected]>
    Marukesu committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    253d66d View commit details
    Browse the repository at this point in the history
  3. use SingleInstance attribute, mark as sealed, fix class name

    the [SingleInstance] attribute deal with making the class a singleton
    and forcing a unique instance is created and referenced everytime the
    constructor method is called, sealed mark the class as non-derivable.
    
    while here fix the class name to match the file name.
    
    Signed-off-by: Gustavo Marques <[email protected]>
    Marukesu committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    ad16490 View commit details
    Browse the repository at this point in the history
  4. private initialize() → public init()

    rather than calling initialize() in the construct block
    make it public and let the Indicator decides when to initalize
    the monitor.
    
    Signed-off-by: Gustavo Marques <[email protected]>
    Marukesu committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    965c2d2 View commit details
    Browse the repository at this point in the history
  5. rewrite match strings

    use a generic match for method calls and signal emissions for the
    org.freedesktop.Notifications interface, restrict the method_return
    and error ones to the org.freedesktop.Notifications name.
    
    Signed-off-by: Gustavo Marques <[email protected]>
    Marukesu committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    cbd9609 View commit details
    Browse the repository at this point in the history
  6. rewrite filter function

    rewrite the switch statement to check member_name instead of message_type, this
    allow to mege the CloseNotification and NotificationClosed cases. the case of
    the notify call beeing successfull or not is also merged.
    
    the monitor signals are now emitted before the next Gtk redraw cycle, making
    sure that the tray got updated in the current cycle.
    
    Signed-off-by: Gustavo Marques <[email protected]>
    Marukesu committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    76943d1 View commit details
    Browse the repository at this point in the history