After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 358382 - Notification showing in the wrong place
Notification showing in the wrong place
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.16.x
Other All
: Normal minor
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-09-29 21:55 UTC by Simon Law
Modified: 2006-10-10 20:26 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Verbose output of g-p-m when plugging the AC adapter in (4.66 KB, text/plain)
2006-10-01 22:51 UTC, David Planella
  Details
debug output of g-p-m when removing the AC adapter (15.21 KB, text/plain)
2006-10-02 10:32 UTC, David Planella
  Details
patch I've added to CVS (3.73 KB, patch)
2006-10-10 20:18 UTC, Richard Hughes
none Details | Review

Description Simon Law 2006-09-29 21:55:41 UTC
From https://launchpad.net/bugs/61148

I have gnome-power-manager in the tray in the top panel. When I remove power/add the power back. The notification popup displays attached to the bottom panel. It should be displaying from the power icon.

http://librarian.launchpad.net/4415788/Screenshot-1.png

This screenshot shows that the g-p-m notification appears on top of the bottom panel, whereas the notification area (and the g-p-m applet) are on the panel at the top of the screen.

Other information:
Comment 1 Richard Hughes 2006-09-29 22:09:12 UTC
Do you actually mean 2.16.x or 2.17.x? Is the icon showing (the g-p-m icon) when the notification is sent? i.e. is there anything to point to.

If there's no icon, then the bug is in notification-daemon rather than gnome-power-manager as it's that that decides the default message position.
Comment 2 David Planella 2006-10-01 21:55:58 UTC
* We mean 2.16.0, which is the version currently included in Ubuntu Edgy.

* The icon is showing in the notification area at the top panel when the notification is sent.
Comment 3 Richard Hughes 2006-10-01 22:30:45 UTC
Ahh, then that is odd. Can you grab the relevant output of:

killall gnome-power-manager
gnome-power-manager --verbose --no-daemon

when the notification is show. Cheers.
Comment 4 David Planella 2006-10-01 22:51:49 UTC
Created attachment 73797 [details]
Verbose output of g-p-m when plugging the AC adapter in

The attachment shows the output of g-p-m in verbose mode when showing the tooltip while plugging in the AC adapter.

Let me know if that's what you wanted or if you need more information.
Comment 5 Richard Hughes 2006-10-01 23:05:36 UTC
Sorry, maybe I wasn't clear: I need the debug output when the libnotify message is printed - i.e. you'll need to remove the ac-adapter to trigger this. Thanks.
Comment 6 David Planella 2006-10-01 23:14:23 UTC
Sorry, but I do not get it.

Could you please be more specific on the steps I have to follow in order to produce some useable output? Here's what I did:

1. killall gnome-power-manager
gnome-power-manager --verbose --no-daemon

2. connected the AC adapter (the tooltip was shown)

3. Submitted the output of that

So, what you are saying is that I should do exactly the same but in step 2 remove instead of insert the AC adapter? I do not quite see the logic in this, since the tooltip is shown in both cases.

Thanks.
Comment 7 Richard Hughes 2006-10-02 08:12:35 UTC
So you get a "The AC Power has been unplugged..." message when you *insert* your AC adapter? That is only meant to be shown when you *remove* your ac adapter.
Comment 8 David Planella 2006-10-02 09:32:18 UTC
Please, read my previous post again. 

There is no mention of the "The AC Power has been unplugged..." message whatsoever.

Maybe I should change the last sentence from:
"I do not quite see the logic in this, since the tooltip is shown in both cases."

to:

"I do not quite see the logic in this, since **a** tooltip is shown in both cases."

In any case, I think that comments #4 and #6 are clear enough. I submitted the output of g-p-m on #4 and there you can see exactly which tooltip was produced ([gpm_power_get_status_summary] gpm-power.c:1300 (00:45:56):      tooltip: Computer is running on AC power, if I'm correct), and on #6 I explained the procedure.

Please, let me know exactly what you need. As I said, I believe a simple and clear step-by-step description of the procedure we need to follow in order to submit some debugging info would be the best, and spare us most misunderstandings.

Cheers.


Comment 9 Richard Hughes 2006-10-02 09:55:40 UTC
A tooltip is not the same as a notification. A tooltip commonly has a yellow box and is a mouseover event. A notification is a new box, with an icon, title and message area that commonly points to an icon.

Your first point talks about a notification popup, and now you are talking about tooltips being incorrect. I'm very confused.
Comment 10 David Planella 2006-10-02 10:32:49 UTC
Created attachment 73838 [details]
debug output of g-p-m when removing the AC adapter

a) Sorry, when I said tooltip I meant notification.

b) On comment #5, I'm guessing that you meant that a notification is printed *only* when removing the AC adapter, and *not* when inserting it.

c)
> Please, let me know exactly what you need. As I said, I believe a simple 
> and clear step-by-step description of the procedure we need to follow in 
> order to submit some debugging info would be the best, and spare us most
> misunderstandings.

Since I still did not get that, I went ahead and did the following, hoping that that's what you need:

1. killall gnome-power-manager

2. gnome-power-manager --verbose --no-daemon

3. unplugged the AC adapter (the notification was shown)

4. Submitted the output of that.

On a side issue, I noticed that when starting g-p-m as per step 2, the gpm-primary-missing icon is used to show the state of the battery, but that's probably an issue which should be reported separately.

Cheers.
Comment 11 Richard Hughes 2006-10-10 18:31:38 UTC
Ahh, I see the problem now.

You are basically seeing the fallout of;

	GtkWidget *point = NULL;
#if USE_EGGTRAYICON
	if (icon->priv->is_visible) {
		point = icon->priv->image;
	}
#endif

i.e. because the package is being compiled with GtkStatusIcon support (and not EGGTRAYICON) then there is no "point" being defined. I've opened a bugreport here: https://launchpad.net/distros/ubuntu/+source/libnotify/+bug/65012 as this is a libnotify bug.

Realistically, there's no way i can fix this in the 2-16 timeframe as that would mean depending on a newer version of libnotify which isn't allowed. What probably is best is for me to sync this part of the code against head when the libnotify library has been updated and then provide a link for distros, or include lots of #ifdef junk everywhere.

Richard.
Comment 12 Richard Hughes 2006-10-10 20:18:10 UTC
Created attachment 74438 [details] [review]
patch I've added to CVS

I added the ifdefs :-)

This is the patch I've applied to 2-16 - a similar one went into HEAD also. When gnome-power-manager 2.16.2 is released, and libnotify 0.4.3 is released then this bug will fix itself.

Thanks for your help tracking this one down.

Richard.
Comment 13 David Planella 2006-10-10 20:26:14 UTC
> Thanks for your help tracking this one down.

No problem, thank you for g-p-m and the prompt reaction and solution to this.