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

Add more options to control the emblems visibility #1988

Merged
merged 7 commits into from Apr 14, 2023

Conversation

3v1n0
Copy link
Collaborator

@3v1n0 3v1n0 commented Apr 12, 2023

It's now possible to:

  • Toggle the emblems at all
  • Disable the notification counters
  • Control whether the notification numbers are summed with the applications-provided counts (no by default)

Closes: #1964

Increases the size fo the small screens, ensuring it can be visible in
most cases.

Closes: micheleg#1969
…tions

Otherwise the badge will be always visible even for those applications
that have been acked by the user.
… only

Counters could have been disabled together with the unity-API values
before, now allow to be more precise.
…summed

By default we don't override the applications-provided count anymore,
while disabling it the two values are summed.
There's no point to do all the monitoring if it has been disabled
explicitly or because we're i dnd mode.
@christophlsa
Copy link

I tested only my "case" by deactivating the checkbox "Show the number of unread notifications" and it's working fine for me. :)

@vageliskatsiotis
Copy link

vageliskatsiotis commented Apr 14, 2023

In my case in Thunderbird, after reading all the unread emails, when it gets down to the last, the emblem does not go away. Tried with applications-provided counts off and on with same result. A notice in Files file manager which I happen to come across, worked as expected

@3v1n0
Copy link
Collaborator Author

3v1n0 commented Apr 14, 2023

Tried with applications-provided counts off and on with same result

That option is not meant to disable them (there's the global option for it), but only to sum or not the two values.

Apparently in your case there's something still sending us that the number is > 0, because in my tests we hide them otherwise.

@vageliskatsiotis
Copy link

Thanx for the info Marco. Is there some way to discover this? Logs etc..?

@3v1n0
Copy link
Collaborator Author

3v1n0 commented Apr 14, 2023

Thanx for the info Marco. Is there some way to discover this? Logs etc..?

One way is probably to monitor the dbus session, so launching:

dbus-monitor --session --monitor "interface='com.canonical.Unity.LauncherEntry'" and see what it happens.

For reference, my test app sets it back to 0 and the emblem is hidden:

logs
signal time=1681482799.338801 sender=org.freedesktop.DBus -> destination=:1.43175 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.43175"
signal time=1681482799.338846 sender=org.freedesktop.DBus -> destination=:1.43175 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
   string ":1.43175"
signal time=1681482811.594818 sender=:1.43176 -> destination=(null destination) serial=5 path=/com/canonical/unity/launcherentry/1540790312; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Nautilus.desktop"
   array [
      dict entry(
         string "urgent"
         variant             boolean false
      )
      dict entry(
         string "count"
         variant             int64 5
      )
      dict entry(
         string "count-visible"
         variant             boolean true
      )
      dict entry(
         string "progress"
         variant             double 0.42
      )
      dict entry(
         string "progress-visible"
         variant             boolean true
      )
   ]
signal time=1681482811.594973 sender=:1.43176 -> destination=(null destination) serial=6 path=/com/canonical/unity/launcherentry/3074746109; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Calculator.desktop"
   array [
      dict entry(
         string "urgent"
         variant             boolean true
      )
      dict entry(
         string "count"
         variant             int64 0
      )
      dict entry(
         string "count-visible"
         variant             boolean false
      )
      dict entry(
         string "progress"
         variant             double 0
      )
      dict entry(
         string "progress-visible"
         variant             boolean false
      )
   ]
signal time=1681482811.595133 sender=:1.43176 -> destination=(null destination) serial=7 path=/com/canonical/unity/launcherentry/3747102703; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Terminal.desktop"
   array [
      dict entry(
         string "urgent"
         variant             boolean true
      )
      dict entry(
         string "count"
         variant             int64 0
      )
      dict entry(
         string "quicklist"
         variant             object path "/com/canonical/unity/launcherentry/3747102703"
      )
      dict entry(
         string "count-visible"
         variant             boolean false
      )
      dict entry(
         string "progress"
         variant             double 0
      )
      dict entry(
         string "progress-visible"
         variant             boolean false
      )
   ]
signal time=1681482811.597704 sender=:1.43176 -> destination=(null destination) serial=10 path=/com/canonical/unity/launcherentry/1540790312; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Nautilus.desktop"
   array [
      dict entry(
         string "count"
         variant             int64 5
      )
      dict entry(
         string "count-visible"
         variant             boolean true
      )
      dict entry(
         string "progress"
         variant             double 0.42
      )
      dict entry(
         string "progress-visible"
         variant             boolean true
      )
   ]
signal time=1681482811.597821 sender=:1.43176 -> destination=(null destination) serial=11 path=/com/canonical/unity/launcherentry/3074746109; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Calculator.desktop"
   array [
      dict entry(
         string "urgent"
         variant             boolean true
      )
   ]
signal time=1681482811.597862 sender=:1.43176 -> destination=(null destination) serial=12 path=/com/canonical/unity/launcherentry/3747102703; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Terminal.desktop"
   array [
      dict entry(
         string "urgent"
         variant             boolean true
      )
      dict entry(
         string "quicklist"
         variant             string "/com/canonical/unity/launcherentry/3747102703"
      )
   ]
signal time=1681482814.519248 sender=:1.43176 -> destination=(null destination) serial=17 path=/com/canonical/unity/launcherentry/1540790312; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Nautilus.desktop"
   array [
      dict entry(
         string "count"
         variant             int64 5
      )
   ]
signal time=1681482816.518544 sender=:1.43176 -> destination=(null destination) serial=18 path=/com/canonical/unity/launcherentry/1540790312; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Nautilus.desktop"
   array [
      dict entry(
         string "count"
         variant             int64 12345
      )
   ]
signal time=1681482817.516793 sender=:1.43176 -> destination=(null destination) serial=19 path=/com/canonical/unity/launcherentry/3074746109; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Calculator.desktop"
   array [
      dict entry(
         string "urgent"
         variant             boolean false
      )
   ]
signal time=1681482818.516378 sender=:1.43176 -> destination=(null destination) serial=20 path=/com/canonical/unity/launcherentry/3074746109; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Calculator.desktop"
   array [
      dict entry(
         string "urgent"
         variant             boolean true
      )
   ]
signal time=1681482818.516424 sender=:1.43176 -> destination=(null destination) serial=21 path=/com/canonical/unity/launcherentry/1540790312; interface=com.canonical.Unity.LauncherEntry; member=Update
   string "application://org.gnome.Nautilus.desktop"
   array [
      dict entry(
         string "count"
         variant             int64 0
      )
   ]

@3v1n0
Copy link
Collaborator Author

3v1n0 commented Apr 14, 2023

Also you can try the hello-unity snap and see how it behaves: https://snapcraft.io/hello-unity

@3v1n0 3v1n0 merged commit 89427a8 into micheleg:master Apr 14, 2023
1 check passed
@vageliskatsiotis
Copy link

Thanx Marco. Using hello-unity I figured out the functionality notification wise. As long as the notification on the unity bar is not dismissed, the count remains. And has nothing to do with the fact that I have read or not the emails. Glad to clear this out. Thanx again for contributing on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

size of notification badge counters Notification badge counter persistant or wrong number displayed
3 participants