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.

merge-requests/218/head
Jens Lody 9 years ago
parent 4085de619c
commit cd050b652a
  1. 80
      gnome-shell-extension-openweather.bmarks
  2. 101
      gnome-shell-extension-openweather.layout
  3. 2
      src/extension.js
  4. 2
      src/prefs.js

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<BrowseTracker_layout_file>
<ActiveTarget name="extension" />
<File name="src/extension.js" open="0" top="0" tabpos="1">
<Cursor position="41840" topLine="1203" />
<BrowseMarks positions="" />
<Book_Marks positions="" />
</File>
<File name="src/openweathermap_org.js" open="0" top="0" tabpos="3">
<Cursor position="223" topLine="456" />
<BrowseMarks positions="" />
<Book_Marks positions="" />
</File>
<File name="po/LINGUAS" open="0" top="0" tabpos="1">
<Cursor position="0" topLine="0" />
</File>
<File name="configure.ac" open="0" top="0" tabpos="3">
<Cursor position="787" topLine="0" />
</File>
<File name="data/weather-settings.ui" open="0" top="0" tabpos="0">
<Cursor position="27481" topLine="563" />
<BrowseMarks positions="" />
<Book_Marks positions="" />
</File>
<File name="update_revision.sh" open="1" top="1" tabpos="11">
<Cursor position="0" topLine="0" />
<BrowseMarks positions="" />
<Book_Marks positions="" />
</File>
<File name="src/convenience.js" open="0" top="0" tabpos="9">
<Cursor position="2838" topLine="0" />
<BrowseMarks positions="1972" />
</File>
<File name="data/metadata.json.in" open="0" top="0" tabpos="2">
<Cursor position="690" topLine="0" />
<BrowseMarks positions="618" />
<Book_Marks positions="" />
</File>
<File name="src/prefs.js" open="1" top="0" tabpos="5">
<Cursor position="17255" topLine="166" />
<BrowseMarks positions="" />
<Book_Marks positions="" />
</File>
<File name="autogen.sh" open="0" top="0" tabpos="4">
<Cursor position="197" topLine="0" />
</File>
<File name="data/org.gnome.shell.extensions.openweather.gschema.xml.in" open="0" top="0" tabpos="6">
<Cursor position="5663" topLine="105" />
<BrowseMarks positions="" />
<Book_Marks positions="" />
</File>
<File name="src/forecast_io.js" open="0" top="0" tabpos="4">
<Cursor position="6597" topLine="172" />
<BrowseMarks positions="" />
<Book_Marks positions="" />
</File>
<File name="aclocal.m4" open="0" top="0" tabpos="7">
<Cursor position="4238" topLine="60" />
</File>
<File name="po/update.js" open="0" top="0" tabpos="3">
<Cursor position="253" topLine="0" />
</File>
<File name="COPYING" open="0" top="0" tabpos="10">
<Cursor position="81" topLine="0" />
</File>
<File name="Makefile.am" open="0" top="0" tabpos="2">
<Cursor position="61" topLine="0" />
</File>
<File name="data/Makefile.am" open="0" top="0" tabpos="2">
<Cursor position="674" topLine="0" />
</File>
<File name="src/Makefile.am" open="0" top="0" tabpos="7">
<Cursor position="55" topLine="0" />
</File>
<File name="gnome-shell-extension-openweather.spec" open="1" top="0" tabpos="4">
<Cursor position="255" topLine="0" />
<BrowseMarks positions="" />
<Book_Marks positions="" />
</File>
</BrowseTracker_layout_file>

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="extension" />
<File name="src/extension.js" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="41840" topLine="1203" />
</Cursor>
</File>
<File name="src/openweathermap_org.js" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="223" topLine="456" />
</Cursor>
</File>
<File name="po/LINGUAS" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="configure.ac" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="787" topLine="0" />
</Cursor>
</File>
<File name="data/weather-settings.ui" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="27481" topLine="563" />
</Cursor>
</File>
<File name="update_revision.sh" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2061" topLine="50" />
</Cursor>
</File>
<File name="src/convenience.js" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2838" topLine="0" />
</Cursor>
</File>
<File name="data/metadata.json.in" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="690" topLine="0" />
</Cursor>
</File>
<File name="src/prefs.js" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="32168" topLine="932" />
</Cursor>
</File>
<File name="autogen.sh" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="197" topLine="0" />
</Cursor>
</File>
<File name="data/org.gnome.shell.extensions.openweather.gschema.xml.in" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5663" topLine="105" />
</Cursor>
</File>
<File name="src/forecast_io.js" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6597" topLine="172" />
</Cursor>
</File>
<File name="aclocal.m4" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4238" topLine="60" />
</Cursor>
</File>
<File name="po/update.js" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="253" topLine="0" />
</Cursor>
</File>
<File name="COPYING" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="81" topLine="0" />
</Cursor>
</File>
<File name="Makefile.am" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="61" topLine="0" />
</Cursor>
</File>
<File name="data/Makefile.am" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="674" topLine="0" />
</Cursor>
</File>
<File name="src/Makefile.am" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="55" topLine="0" />
</Cursor>
</File>
<File name="gnome-shell-extension-openweather.spec" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="284" topLine="0" />
</Cursor>
</File>
<EditorTabsLayout layout="0796058055fafaf900923c6900000003=0;gnome-shell-extension-openweather:src/prefs.js,1;gnome-shell-extension-openweather:gnome-shell-extension-openweather.spec,*2;gnome-shell-extension-openweather:update_revision.sh@layout2|name=dummy;caption=;state=2098174;dir=3;layer=0;row=0;pos=0;prop=100000;bestw=598;besth=325;minw=598;minh=325;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=0796058055fafaf900923c6900000003;caption=;state=2098172;dir=5;layer=1;row=0;pos=0;prop=100000;bestw=598;besth=325;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|dock_size(5,1,0)=600|" />
</CodeBlocks_layout_file>

@ -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();

@ -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();

Loading…
Cancel
Save