[gnome-shell] Fix fallout from notification changes



commit 4b09d57ec2b0589dc69fad6269fc59e5b02c58d4
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Oct 22 01:30:14 2013 +0200

    Fix fallout from notification changes
    
    Commit 5f081b8f8d5c4 moved code without moving a helper function
    used.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710596

 js/ui/messageTray.js        |    4 ----
 js/ui/notificationDaemon.js |    2 +-
 2 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 75c3027..1e891fa 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -280,10 +280,6 @@ const URLHighlighter = new Lang.Class({
     }
 });
 
-function strHasSuffix(string, suffix) {
-    return string.substr(-suffix.length) == suffix;
-}
-
 // NotificationPolicy:
 // 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.
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index ddd390b..42dedbd 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -357,7 +357,7 @@ const FdoNotificationDaemon = new Lang.Class({
 
     _makeButton: function(id, label, useActionIcons) {
         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)) {
             button.add_style_class_name('notification-icon-button');
             button.child = new St.Icon({ icon_name: iconName });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]