From cd050b652a1254822786b6dda3da2dcec05d8f16 Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Sun, 20 Sep 2015 09:42:25 +0200 Subject: [PATCH] Fix user-agent creation. If the version is numeric, it did not work, I only tested it with empty version and version created of git-commit. In this case it's a string. --- gnome-shell-extension-openweather.bmarks | 80 ------------------ gnome-shell-extension-openweather.layout | 101 ----------------------- src/extension.js | 2 +- src/prefs.js | 2 +- 4 files changed, 2 insertions(+), 183 deletions(-) delete mode 100644 gnome-shell-extension-openweather.bmarks delete mode 100644 gnome-shell-extension-openweather.layout diff --git a/gnome-shell-extension-openweather.bmarks b/gnome-shell-extension-openweather.bmarks deleted file mode 100644 index 2608b85..0000000 --- a/gnome-shell-extension-openweather.bmarks +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gnome-shell-extension-openweather.layout b/gnome-shell-extension-openweather.layout deleted file mode 100644 index 45c39dc..0000000 --- a/gnome-shell-extension-openweather.layout +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/extension.js b/src/extension.js index 1769c89..5103e97 100644 --- a/src/extension.js +++ b/src/extension.js @@ -149,7 +149,7 @@ const OpenweatherMenuButton = new Lang.Class({ // Create user-agent string from uuid and (if present) the version this.user_agent = Me.metadata.uuid; - if (Me.metadata.version !== undefined && Me.metadata.version.trim() !== '') + if (Me.metadata.version !== undefined && Me.metadata.version.toString().trim() !== '') { this.user_agent += '/'; this.user_agent += Me.metadata.version.toString(); diff --git a/src/prefs.js b/src/prefs.js index d2ad3db..518da1f 100644 --- a/src/prefs.js +++ b/src/prefs.js @@ -107,7 +107,7 @@ const WeatherPrefsWidget = new GObject.Class({ // Create user-agent string from uuid and (if present) the version this.user_agent = Me.metadata.uuid; - if (Me.metadata.version !== undefined && Me.metadata.version.trim() !== '') + if (Me.metadata.version !== undefined && Me.metadata.version.toString().trim() !== '') { this.user_agent += '/'; this.user_agent += Me.metadata.version.toString();