[chrome-gnome-shell] opera: transform list notifications to basic



commit c2df1feef32fe6245685ad522866b6b497e876a5
Author: Yuri Konotopov <ykonotopov gmail com>
Date:   Mon Aug 8 15:55:40 2016 +0300

    opera: transform list notifications to basic

 extension/include/notifications.js |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/extension/include/notifications.js b/extension/include/notifications.js
index 9ad4e47..2c12141 100644
--- a/extension/include/notifications.js
+++ b/extension/include/notifications.js
@@ -65,6 +65,21 @@ GSC.notifications = (function($) {
                        if(IS_OPERA && options.buttons)
                        {
                                delete options.buttons;
+                               if(options.type === chrome.notifications.TemplateType.LIST)
+                               {
+                                       var items = [];
+                                       for(k in options.items)
+                                       {
+                                               if(options.items.hasOwnProperty(k))
+                                               {
+                                                       items.push(options.items[k].title + ' ' + 
options.items[k].message);
+                                               }
+                                       }
+                                       options.message += "\n" + items.join("\n");
+
+                                       options.type = chrome.notifications.TemplateType.BASIC;
+                                       delete options.items;
+                               }
                        }
 
                        if (callback)


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