This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Notification messages appearing two places at same time

Tags: None
(comma "," separated)
stevedundee2
Registered Member
Posts
5
Karma
0
I just upgraded my Kubuntu 10.04 to use KDE 4.5. There are a couple of problems - I'm creating a separate post for each.

When there is a Notification message, it appears in two places at the same time: the top left corner and under the Notification icon. Is this configuration (in which case, where do I change it)? Or is it a side-effect of my small screen (I am using an eeePC 901 netbook)?

Any ideas?

Thanks

Steve
Sir_Brizz
Registered Member
Posts
28
Karma
0
OS
Which notifications do that? All of them?

On my laptop if someone is typing in Kopete it shows the typing message twice in the same place in the bottom right of the screen.
User avatar
aseigo
KDE Developer
Posts
124
Karma
2
"it appears in two places at the same time: the top left corner and under the Notification icon."

this implies that there are two system tray widgets running. without seeing your screen, my guess is that the first tray is running on the desktop and obscured by something, e.g. a panel at the top of the screen.

this would also explain your other problem with non-kde apps not showing in the system tray: those can only be shown in one system tray, not multiple system trays like kde ones (or the gtk+ apps that canonical have patched for use on Ubuntu). this is a limitation of the old protocol.

so .. if you have a top-of-the-screen panel, try moving it to see if there is indeed a system tray widget under it. if not, try this:

* bring up krunner (alt+f2)
* type "desktop console"

this will start a window that you can enter a script into. enter this script there and hit execute:

Code: Select all
function findSystemTrays(containments)
{
  for (i in containments) {
      var widgets = containments[i].widgets()
      for (j in widgets) {
     if (widgets[j].type == 'systemtray') {
         print("Found a system tray in " + containments[i].type + " with id " + containments[i].id)
          }
      }
   }
}

findSystemTrays(panels())
findSystemTrays(activities())



it will print out one line per system tray that exists in the output area in the bottom of the scripting window. you can also remove the widget using the scripting if it exists by calling remove() on it. e.g. if it is on the desktop, you should get something like this:

Found a system tray with id 7 in desktop with id 1

then this in the scripting console should nuke it:

Code: Select all
activityById(1).widgetById(7).remove()


aseigo, proud to be a member of KDE forums since 2008-Oct.
User avatar
Snowhog
Registered Member
Posts
198
Karma
1
OS
Interesting. Is the script specific to KDE 4.5? It produces an error in KDE 4.4.5 on line 13: findSystemTrays(panels())

The error is:
Error: ReferenceError: Can't find variable: panels at line 13

Backtrace:
<anonymous>()@:13


Administrator
Kubuntu Forums . Net - https://kubuntuforums.net
User avatar
aseigo
KDE Developer
Posts
124
Karma
2
Snowhog wrote:Interesting. Is the script specific to KDE 4.5? It produces an error in KDE 4.4.5 on line 13: findSystemTrays(panels())

The error is:
Error: ReferenceError: Can't find variable: panels at line 13

Backtrace:
<anonymous>()@:13


yes, it uses some additions in 4.5. you can do it in 4.4 with the somewhat more awkward:

Code: Select all
function findSystemTrays(ids, panels)
{
  for (i in ids) {
      var containment = panels ? panelById(ids[i]) : activityById(ids[i])
      var widgets = containment.widgets()
      for (j in widgets) {
     if (widgets[j].type == 'systemtray') {
         print("Found a system tray with id " + widgets[j].id + " in " + containment.type + " with id " + containment.id)
          }
      }
   }
}

findSystemTrays(panelIds, true)
findSystemTrays(activityIds, false)

Last edited by sayakb on Sat Aug 28, 2010 6:45 pm, edited 2 times in total.
Reason: Added [code] BBCode


aseigo, proud to be a member of KDE forums since 2008-Oct.
stevedundee2
Registered Member
Posts
5
Karma
0
aseigo -

I used the script and sure enough I had 2 system trays. The script output however said:

Found a system tray in panel with id 4
Found a system tray in panel with id 101

No activity number and so your remove() statement wouldn't work. So I took a punt and inserted widgets[j].remove() after the print. This crashed the panel, but it got rid of the system trays. I've added one back and it works correctly - single notifications and non-KDE icons now appearing.

Thanks very much for your help. Brilliant!

Steve
User avatar
Snowhog
Registered Member
Posts
198
Karma
1
OS
aseigo wrote:yes, it uses some additions in 4.5. you can do it in 4.4 with the somewhat more awkward:

Code: Select all
function findSystemTrays(ids, panels)
{
  for (i in ids) {
      var containment = panels ? panelById(ids[i]) : activityById(ids[i])
      var widgets = containment.widgets()
      for (j in widgets) {
     if (widgets[j].type == 'systemtray') {
         print("Found a system tray with id " + widgets[j].id + " in " + containment.type + " with id " + containment.id)
          }
      }
   }
}

findSystemTrays(panelIds, true)
findSystemTrays(activityIds, false)

Running this still gives an error:

Error: TypeError: Result of expression 'containment.widgets' [undefined] is not a function. at line 5

Backtrace:
<anonymous>()@:5


Administrator
Kubuntu Forums . Net - https://kubuntuforums.net
john_hudson
Registered Member
Posts
549
Karma
2
OS
Just delete the older one; that was what I did when I upgraded to KDE4.4.4. Also don't forget to configure the new Notification icon to get it to work as you want.


John Hudson, proud to be a member of KDE forums since 2008-Oct.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], q.ignora, watchstar, Yahoo [Bot]