From 5b561d7cfea233230633067eb0f1e9ef03499cf0 Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Fri, 2 Oct 2015 08:19:58 +0200 Subject: [PATCH] Fix error, if gnome-shell's version is > 3.16. --- src/extension.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/extension.js b/src/extension.js index f27ce9d..30f2d5a 100644 --- a/src/extension.js +++ b/src/extension.js @@ -557,21 +557,21 @@ function enable() { { notificationWidget = Main.messageTray._notificationWidget; originalExpandMethod = Main.messageTray._onNotificationExpanded; + Main.messageTray._onNotificationExpanded = extensiononNotificationExpanded; } originalShowNotification = Main.messageTray._showNotification; - originalUpdateShowingNotification = Main.messageTray._updateShowingNotification; - originalHideNotification = Main.messageTray._hideNotification; - panel = Main.layoutManager.panelBox; + Main.messageTray._showNotification = extensionShowNotification; + originalUpdateShowingNotification = Main.messageTray._updateShowingNotification; + Main.messageTray._updateShowingNotification = extensionUpdateShowingNotification; originalNotificationWidgetX = notificationWidget.x; + originalHideNotification = Main.messageTray._hideNotification; + Main.messageTray._hideNotification = extensionHideNotification; + panel = Main.layoutManager.panelBox; - Main.messageTray._showNotification = extensionShowNotification; - Main.messageTray._hideNotification = extensionHideNotification; - Main.messageTray._updateShowingNotification = extensionUpdateShowingNotification; - Main.messageTray._onNotificationExpanded = extensiononNotificationExpanded; loadConfig(); } @@ -588,15 +588,15 @@ function disable() { if (showTestNotificationTimeout !== undefined) Mainloop.source_remove(showTestNotificationTimeout); - // remove our (inline-)style, in case we just show a notification, otherwise the radius is drawn incorrect - if (Main.messageTray._notification) - Main.messageTray._notification.set_style('border-radius:;'); // reset x-position notificationWidget.x = originalNotificationWidgetX; Main.messageTray._showNotification = originalShowNotification; Main.messageTray._hideNotification = originalHideNotification; Main.messageTray._updateShowingNotification = originalUpdateShowingNotification; if (!versionAtLeast('3.16', Config.PACKAGE_VERSION)) { + // remove our (inline-)style, in case we just show a notification, otherwise the radius is drawn incorrect + if (Main.messageTray._notification) + Main.messageTray._notification.set_style('border-radius:;'); Main.messageTray._onNotificationExpanded = originalExpandMethod; } }