[chrome-gnome-shell] update: log update errors to console instead of making notification.



commit ea33e2e04f0f84dd95ecbfb12c617e81ec4d7684
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Mon Jun 12 21:53:42 2017 +0400

    update: log update errors to console instead of making notification.
    
    Gnome-Bug: https://bugzilla.gnome.org/show_bug.cgi?id=783469

 extension/include/update.js |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/extension/include/update.js b/extension/include/update.js
index 82657d6..fa3f682 100644
--- a/extension/include/update.js
+++ b/extension/include/update.js
@@ -43,9 +43,9 @@ GSC.update = (function($) {
                                                        {
                                                                onSweetToothResponse(response.upgrade, 
response.extensions);
                                                        }
-                                                       else
+                                                       else if(console)
                                                        {
-                                                               
createUpdateFailedNotification(response.message ? response.message : m('native_request_failed', 
'checkUpdate'));
+                                                               console.error(response.message ? 
response.message : m('native_request_failed', 'checkUpdate'));
                                                        }
                                                });
                                        });
@@ -57,9 +57,9 @@ GSC.update = (function($) {
                                        });
                                }
                        }
-                       else
+                       else if(console)
                        {
-                               createUpdateFailedNotification(response.message ? response.message : 
m('native_request_failed', 'initialize'));
+                               console.error(response.message ? response.message : 
m('native_request_failed', 'initialize'));
                        }
                });
        }
@@ -94,16 +94,6 @@ GSC.update = (function($) {
                });
        }
 
-       function createUpdateFailedNotification(cause) {
-               GSC.notifications.create(NOTIFICATION_UPDATE_CHECK_FAILED, {
-                       message: m('update_check_failed', cause),
-                       buttons: [
-                               {title: m('retry')},
-                               {title: m('close')}
-                       ]
-               });
-       }
-
        function init() {
                function onNotificationAction(notificationId, buttonIndex) {
                        if ($.inArray(notificationId, [NOTIFICATION_UPDATE_AVAILABLE, 
NOTIFICATION_UPDATE_CHECK_FAILED]) === -1)


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