Fix fallout from notification changes
Commit 5f081b8f8d
moved code without moving a helper function
used.
https://bugzilla.gnome.org/show_bug.cgi?id=710596
This commit is contained in:
parent
a16f699dfc
commit
4b09d57ec2
@ -280,10 +280,6 @@ const URLHighlighter = new Lang.Class({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function strHasSuffix(string, suffix) {
|
|
||||||
return string.substr(-suffix.length) == suffix;
|
|
||||||
}
|
|
||||||
|
|
||||||
// NotificationPolicy:
|
// NotificationPolicy:
|
||||||
// An object that holds all bits of configurable policy related to a notification
|
// An object that holds all bits of configurable policy related to a notification
|
||||||
// source, such as whether to play sound or honour the critical bit.
|
// source, such as whether to play sound or honour the critical bit.
|
||||||
|
@ -357,7 +357,7 @@ const FdoNotificationDaemon = new Lang.Class({
|
|||||||
|
|
||||||
_makeButton: function(id, label, useActionIcons) {
|
_makeButton: function(id, label, useActionIcons) {
|
||||||
let button = new St.Button({ can_focus: true });
|
let button = new St.Button({ can_focus: true });
|
||||||
let iconName = strHasSuffix(id, '-symbolic') ? id : id + '-symbolic';
|
let iconName = id.endsWith('-symbolic') ? id : id + '-symbolic';
|
||||||
if (useActionIcons && Gtk.IconTheme.get_default().has_icon(iconName)) {
|
if (useActionIcons && Gtk.IconTheme.get_default().has_icon(iconName)) {
|
||||||
button.add_style_class_name('notification-icon-button');
|
button.add_style_class_name('notification-icon-button');
|
||||||
button.child = new St.Icon({ icon_name: iconName });
|
button.child = new St.Icon({ icon_name: iconName });
|
||||||
|
Loading…
Reference in New Issue
Block a user