Bug 702097 - Wrong display of new mail in tray
Summary: Wrong display of new mail in tray
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mail-notification
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dmitry Butskoy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-04 18:40 UTC by Javier Alejandro Castro
Modified: 2011-07-16 07:33 UTC (History)
3 users (show)

Fixed In Version: mail-notification-5.4-41.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-16 07:33:33 UTC
Type: ---


Attachments (Terms of Use)
Screenshot showing the bug (156.09 KB, image/png)
2011-05-04 18:43 UTC, Javier Alejandro Castro
no flags Details
fixes message list alignment (1.04 KB, patch)
2011-06-29 16:54 UTC, Enrico Scholz
no flags Details | Diff
screenshot of mail-notification with proposed patch (KDE) (43.70 KB, image/png)
2011-07-02 15:06 UTC, Erik van Pienbroek
no flags Details
before + after patch screenshots (19.63 KB, image/png)
2011-07-03 07:57 UTC, Enrico Scholz
no flags Details

Description Javier Alejandro Castro 2011-05-04 18:40:27 UTC
Description of problem:

Wrong display of new mail in tray

Version-Release number of selected component (if applicable):

mail-notification-5.4-34.fc15.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Receive new mail, then move the mouse over the notification
  
Actual results:

The display is incorrect (cropped)

Expected results:

Display just fine.

Additional info:

Comment 1 Javier Alejandro Castro 2011-05-04 18:43:42 UTC
Created attachment 496880 [details]
Screenshot showing the bug

Comment 2 Enrico Scholz 2011-06-20 19:52:19 UTC
ditto here (fedora 14 was fine). ~/.xsession-errors shows

| (mail-notification:27904): Gtk-CRITICAL **: gtk_widget_size_request: assertion `GTK_IS_WIDGET (widget)' failed
| (mail-notification:27904): Gtk-CRITICAL **: gtk_widget_get_style: assertion `GTK_IS_WIDGET (widget)' failed
| (mail-notification:27904): Gtk-CRITICAL **: gtk_paint_flat_box: assertion `GTK_IS_STYLE (style)' failed

when the tray is displayed.

Comment 3 Enrico Scholz 2011-06-29 16:54:42 UTC
Created attachment 510500 [details]
fixes message list alignment

I was able to fix the issue with the attached patch (the first two hunks; the last one fixes the GTK warning and makes the tray popup look nicer).  I am not a GUI developer and do not have an idea why it is required.

With this patch the 'allocation' variable and related code can be removed too; but again, I do not know what there is done...

Comment 4 Erik van Pienbroek 2011-07-02 12:32:55 UTC
Thanks for the patch!
I just tried to apply it, but I got a message that the patch was malformed:

$ patch -Np0 -i attachment.cgi 
patching file mail-notification-5.4-gtk3-support.patch
patch: **** malformed patch at line 11: @@ -557,7 +557,7 @@ 

I also suspect that the patch itself is incomplete. If I see it correctly (I could be wrong here) is that you're only removing lines without adding new ones. I'm also missing changes to the code where the x and y variables are used. Could you please verify your changes and publish a new patch?

Comment 5 Enrico Scholz 2011-07-02 14:02:25 UTC
The highlighted detail view in bugzilla is broken and does not display the new lines.  Else, it applies fine:

$ wget 'http://pkgs.fedoraproject.org/gitweb/?p=mail-notification.git;a=blob_plain;f=mail-notification-5.4-gtk3-support.patch;hb=HEAD' -O mail-notification-5.4-gtk3-support.patch
$ wget 'https://bugzilla.redhat.com/attachment.cgi?id=510500'

$ patch --verbose  -p0 < attachment.cgi\?id\=510500 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- mail-notification-5.4-gtk3-support.patch   2011-06-25 18:33:49.000000000 +0200
|+++ mail-notification-5.4-gtk3-support.patch~  2011-06-29 18:46:37.000000000 +0200
--------------------------
Patching file mail-notification-5.4-gtk3-support.patch using Plan A...
Hunk #1 succeeded at 545.
Hunk #2 succeeded at 557.
Hunk #3 succeeded at 621.
done

Comment 6 Erik van Pienbroek 2011-07-02 14:14:49 UTC
Ah yes, it looks like the bugzilla diff viewer broke the patch for me (I tried to pull the patch from https://bugzilla.redhat.com/attachment.cgi?id=510500&action=diff&context=patch&collapsed=&headers=1&format=raw but it turns out that is broken). Now I tried to pull the patch directly from this bugzilla ticket and now it applies fine.

Now testing it

Comment 7 Erik van Pienbroek 2011-07-02 15:06:39 UTC
Created attachment 510998 [details]
screenshot of mail-notification with proposed patch (KDE)

I just tried your patch, but it seems to be making things worse. On both KDE and GNOME3 only a black box will be shown when you keep the mouse cursor on the mail-notification tray icon. The contents of the popup aren't visible at all anymore..

Comment 8 Enrico Scholz 2011-07-03 07:57:20 UTC
Created attachment 511028 [details]
before + after patch screenshots

with xfce4 I get the attached result.

The black-on-black might be caused by the third hunk which applies some style to the window.  In old patch, this was a noop because GTK_WIDGET was used on a non widget (and caused warnings).

Comment 9 Erik van Pienbroek 2011-07-03 15:57:36 UTC
I just tried to update your patch so that it should work fine on all environments (tested on KDE and GNOME3). All that was necessary was to indicate that the entire tooltip-window should be themed with the 'tooltip' style instead of the default style:

--- build/src/mn-tooltips.c.orig	2011-07-03 17:41:11.093435842 +0200
+++ build/src/mn-tooltips.c	2011-07-03 17:44:15.064327160 +0200
@@ -422,7 +422,13 @@
 	
     if (! selfp->window)
       {
+	GtkStyleContext *ctx;
+
 	selfp->window = gtk_window_new(GTK_WINDOW_POPUP);
+
+	ctx = gtk_widget_get_style_context(GTK_WIDGET(selfp->window));
+	gtk_style_context_add_class(ctx, "tooltip");
+
 	self_update_screen(self, TRUE);
 	gtk_widget_set_app_paintable(selfp->window, TRUE);
 	gtk_window_set_resizable(GTK_WINDOW(selfp->window), FALSE);

I also updated your third hunk so that it uses gtk_render_background instead of gtk_paint_flat_box. This was done because the function gtk_paint_flat_box is deprecated in gtk3.

A scratch build containing this change was published at http://koji.fedoraproject.org/koji/taskinfo?taskID=3177196
Could you test if this works good for you on XFCE? If so, I'll publish it as an update

Comment 10 Enrico Scholz 2011-07-03 17:37:19 UTC
thanks; scratch build works fine for me.

Comment 11 Fedora Update System 2011-07-03 18:17:09 UTC
mail-notification-5.4-40.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mail-notification-5.4-40.fc15

Comment 12 Fedora Update System 2011-07-04 18:50:22 UTC
Package mail-notification-5.4-40.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mail-notification-5.4-40.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/mail-notification-5.4-40.fc15
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2011-07-08 12:02:55 UTC
mail-notification-5.4-41.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mail-notification-5.4-41.fc15

Comment 14 Fedora Update System 2011-07-16 07:33:22 UTC
mail-notification-5.4-41.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.