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 692091 - Fix regressions in notification images
Fix regressions in notification images
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 687682 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-19 17:54 UTC by Giovanni Campagna
Modified: 2013-01-19 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
MessageTray: simplify image handling (1.54 KB, patch)
2013-01-19 17:55 UTC, Giovanni Campagna
committed Details | Review
MessageTray: restore symbolic icons to notification buttons (1.39 KB, patch)
2013-01-19 17:56 UTC, Giovanni Campagna
reviewed Details | Review
Notification: fix regression in notification image handling (1.65 KB, patch)
2013-01-19 17:59 UTC, Giovanni Campagna
committed Details | Review
MessageTray: don't show expanded content when the notification is collapsed (4.74 KB, patch)
2013-01-19 18:16 UTC, Giovanni Campagna
reviewed Details | Review
MessageTray: restore symbolic icons to notification buttons (1.71 KB, patch)
2013-01-19 18:26 UTC, Giovanni Campagna
committed Details | Review
MessageTray: don't show expanded content when the notification is collapsed (3.57 KB, patch)
2013-01-19 18:30 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-01-19 17:54:23 UTC
See patches.
Comment 1 Giovanni Campagna 2013-01-19 17:55:11 UTC
Created attachment 233878 [details] [review]
MessageTray: simplify image handling

Remove duplicate checks before calling unsetImage, and set properties
directly in the constructor.
Comment 2 Giovanni Campagna 2013-01-19 17:56:35 UTC
Created attachment 233879 [details] [review]
MessageTray: restore symbolic icons to notification buttons

These were lost when we moved away with StIconType. The idea was that
apps needed to include -symbolic in their action IDs, but apps were
not updated, and it never makes sense to have non symbolic icons there,
so let's restore the previous behavior.
Comment 3 Giovanni Campagna 2013-01-19 17:59:11 UTC
Created attachment 233880 [details] [review]
Notification: fix regression in notification image handling

We must set the image after calling .update(), because we're passing
clear: true and thus we're removing the image too.
Also, we need to specify an explicit icon size, or St.Icon will use
the default (48px)
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-01-19 18:08:50 UTC
Review of attachment 233878 [details] [review]:

OK.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-01-19 18:11:08 UTC
Review of attachment 233879 [details] [review]:

::: js/ui/messageTray.js
@@ +662,3 @@
         button._actionId = id;
 
+        if (this._useActionIcons && Gtk.IconTheme.get_default().has_icon(id + '-symbolic')) {

function endsWith(str, suffix) {
    return str.slice(-suffix.length, 0) == suffix;
}

// Force symbolic icons on buttons.
let icon = id;
if (!endsWith(icon, '-symbolic')
    icon += '-symbolic';
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-01-19 18:11:34 UTC
Review of attachment 233880 [details] [review]:

OK.
Comment 7 Giovanni Campagna 2013-01-19 18:16:37 UTC
Created attachment 233881 [details] [review]
MessageTray: don't show expanded content when the notification is collapsed

This fixes the image and scrollbars peeking through in banner mode,
because StTable wasn't unable to allocate them at the restricted height
imposed by CSS.
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-01-19 18:18:26 UTC
Review of attachment 233881 [details] [review]:

"wasn't unable"?
Comment 9 Giovanni Campagna 2013-01-19 18:23:34 UTC
(In reply to comment #8)
> Review of attachment 233881 [details] [review]:
> 
> "wasn't unable"?

Typo, I meant wasn't able.
Comment 10 Jasper St. Pierre (not reading bugmail) 2013-01-19 18:25:04 UTC
Review of attachment 233881 [details] [review]:

::: js/ui/components/telepathyClient.js
@@ +745,3 @@
         this._responseEntry = new St.Entry({ style_class: 'chat-response',
+                                             can_focus: true,
+                                             visible: this.expanded });

Couldn't we set this at setActionArea time?
Comment 11 Giovanni Campagna 2013-01-19 18:26:45 UTC
Created attachment 233882 [details] [review]
MessageTray: restore symbolic icons to notification buttons

These were lost when we moved away with StIconType. The idea was that
apps needed to include -symbolic in their action IDs, but apps were
not updated, and it never makes sense to have non symbolic icons there,
so let's restore the previous behavior.
Comment 12 Giovanni Campagna 2013-01-19 18:30:09 UTC
Created attachment 233884 [details] [review]
MessageTray: don't show expanded content when the notification is collapsed

This fixes the image and scrollbars peeking through in banner mode,
because StTable wasn't able to allocate them at the restricted height
imposed by CSS.
Comment 13 Jasper St. Pierre (not reading bugmail) 2013-01-19 18:33:58 UTC
Review of attachment 233884 [details] [review]:

OK with one nit.

::: js/ui/messageTray.js
@@ +896,3 @@
         this.expanded = false;
+
+        // Show additional content that we keep hidden in banner mode

Hide additional content.
Comment 14 Jasper St. Pierre (not reading bugmail) 2013-01-19 18:34:32 UTC
Review of attachment 233882 [details] [review]:

OK.

::: js/ui/messageTray.js
@@ +245,3 @@
 
+function strHasSuffix(string, suffix) {
+    return string.substr(-suffix.length) == suffix;

Huh, I never knew that substr handled negative indexes.
Comment 15 Giovanni Campagna 2013-01-19 18:41:44 UTC
Attachment 233878 [details] pushed as 484ef5f - MessageTray: simplify image handling
Attachment 233880 [details] pushed as 45fde48 - Notification: fix regression in notification image handling
Attachment 233882 [details] pushed as 9aa84ec - MessageTray: restore symbolic icons to notification buttons
Attachment 233884 [details] pushed as 91a6520 - MessageTray: don't show expanded content when the notification is collapsed
Comment 16 Giovanni Campagna 2013-01-19 18:45:48 UTC
*** Bug 687682 has been marked as a duplicate of this bug. ***