diff options
Diffstat (limited to 'meta-xfce/recipes-panel-plugins')
32 files changed, 1637 insertions, 52 deletions
diff --git a/meta-xfce/recipes-panel-plugins/battery/xfce4-battery-plugin_1.1.5.bb b/meta-xfce/recipes-panel-plugins/battery/xfce4-battery-plugin_1.1.6.bb index ce119bb6da..80a948a9d5 100644 --- a/meta-xfce/recipes-panel-plugins/battery/xfce4-battery-plugin_1.1.5.bb +++ b/meta-xfce/recipes-panel-plugins/battery/xfce4-battery-plugin_1.1.6.bb | |||
@@ -1,8 +1,8 @@ | |||
1 | SUMMARY = "A battery monitor panel plugin for Xfce4, compatible with APM and ACP" | 1 | SUMMARY = "A battery monitor panel plugin for Xfce4, compatible with APM and ACP" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-battery-plugin/start" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
5 | 5 | ||
6 | inherit xfce-panel-plugin | 6 | inherit xfce-panel-plugin |
7 | 7 | ||
8 | SRC_URI[sha256sum] = "752233bfb320ee1e26104a656cbb868299f562733063e2b9a18f0966585ce213" | 8 | SRC_URI[sha256sum] = "327d7304dded8411cd1a48da4f46bac248b44d8b27ffbc2036e0268cb37c3676" |
diff --git a/meta-xfce/recipes-panel-plugins/calculator/xfce4-calculator-plugin_0.7.2.bb b/meta-xfce/recipes-panel-plugins/calculator/xfce4-calculator-plugin_0.7.3.bb index 0c464930e1..540935cee4 100644 --- a/meta-xfce/recipes-panel-plugins/calculator/xfce4-calculator-plugin_0.7.2.bb +++ b/meta-xfce/recipes-panel-plugins/calculator/xfce4-calculator-plugin_0.7.3.bb | |||
@@ -1,8 +1,8 @@ | |||
1 | SUMMARY = "A calculator plugin for the Xfce panel" | 1 | SUMMARY = "A calculator plugin for the Xfce panel" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-calculator-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-calculator-plugin/start" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=909430f63fddd63f120ba29e8979f65c" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=909430f63fddd63f120ba29e8979f65c" |
5 | 5 | ||
6 | inherit xfce-panel-plugin gtk-icon-cache | 6 | inherit xfce-panel-plugin gtk-icon-cache |
7 | 7 | ||
8 | SRC_URI[sha256sum] = "d1f622bea41a90c1686bf9f13c488ab28e995e2762b84712dea9027e0c94028b" | 8 | SRC_URI[sha256sum] = "3feb5f56092ceef2858c3c1bd443317d4caf289a6409f9db506f49088e19a2e8" |
diff --git a/meta-xfce/recipes-panel-plugins/clipman/xfce4-clipman-plugin_1.6.2.bb b/meta-xfce/recipes-panel-plugins/clipman/xfce4-clipman-plugin_1.6.3.bb index 39a8f2edfe..e1eed88098 100644 --- a/meta-xfce/recipes-panel-plugins/clipman/xfce4-clipman-plugin_1.6.2.bb +++ b/meta-xfce/recipes-panel-plugins/clipman/xfce4-clipman-plugin_1.6.3.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Clipman is a clipboard manager for Xfce" | 1 | SUMMARY = "Clipman is a clipboard manager for Xfce" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-clipman-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-clipman-plugin/start" |
3 | SECTION = "x11/application" | 3 | SECTION = "x11/application" |
4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
@@ -8,7 +8,7 @@ inherit xfce-panel-plugin | |||
8 | 8 | ||
9 | DEPENDS += "xfconf xorgproto libxtst" | 9 | DEPENDS += "xfconf xorgproto libxtst" |
10 | 10 | ||
11 | SRC_URI[sha256sum] = "ab8a5fe6f68fb1789190e498243a1d1385de3f64e984f470cbd3d1eb779399b8" | 11 | SRC_URI[sha256sum] = "e11c1f976217fc959cee98ecfb934058ae485cb363d2c25c7ddede44394c9a10" |
12 | 12 | ||
13 | PACKAGECONFIG ??= "" | 13 | PACKAGECONFIG ??= "" |
14 | PACKAGECONFIG[qrencode] = "--enable-libqrencode,--disable-libqrencode,qrencode" | 14 | PACKAGECONFIG[qrencode] = "--enable-libqrencode,--disable-libqrencode,qrencode" |
diff --git a/meta-xfce/recipes-panel-plugins/closebutton/xfce4-closebutton-plugin_git.bb b/meta-xfce/recipes-panel-plugins/closebutton/xfce4-closebutton-plugin_git.bb index 2384682ecb..f2a5e544d5 100644 --- a/meta-xfce/recipes-panel-plugins/closebutton/xfce4-closebutton-plugin_git.bb +++ b/meta-xfce/recipes-panel-plugins/closebutton/xfce4-closebutton-plugin_git.bb | |||
@@ -11,7 +11,6 @@ PV = "4.16.0" | |||
11 | 11 | ||
12 | SRC_URI = "git://github.com/schnitzeltony/xfce4-closebutton-plugin.git;branch=master;protocol=https" | 12 | SRC_URI = "git://github.com/schnitzeltony/xfce4-closebutton-plugin.git;branch=master;protocol=https" |
13 | SRCREV = "538f9acfc5d5019f5cde734d056bcc0c95da9b4c" | 13 | SRCREV = "538f9acfc5d5019f5cde734d056bcc0c95da9b4c" |
14 | S = "${WORKDIR}/git" | ||
15 | 14 | ||
16 | EXTRA_OECONF += "--enable-maintainer-mode" | 15 | EXTRA_OECONF += "--enable-maintainer-mode" |
17 | 16 | ||
diff --git a/meta-xfce/recipes-panel-plugins/cpufreq/xfce4-cpufreq-plugin_1.2.8.bb b/meta-xfce/recipes-panel-plugins/cpufreq/xfce4-cpufreq-plugin_1.2.8.bb index 8ddf48d6ef..1a19f488c0 100644 --- a/meta-xfce/recipes-panel-plugins/cpufreq/xfce4-cpufreq-plugin_1.2.8.bb +++ b/meta-xfce/recipes-panel-plugins/cpufreq/xfce4-cpufreq-plugin_1.2.8.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Panel plugin to display frequency of all cpus" | 1 | SUMMARY = "Panel plugin to display frequency of all cpus" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-cpufreq-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-cpufreq-plugin/start" |
3 | LICENSE = "GPL-2.0-or-later" | 3 | LICENSE = "GPL-2.0-or-later" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=1f6f1c0be32491a0c8d2915607a28f36" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=1f6f1c0be32491a0c8d2915607a28f36" |
5 | 5 | ||
diff --git a/meta-xfce/recipes-panel-plugins/cpugraph/xfce4-cpugraph-plugin_1.2.8.bb b/meta-xfce/recipes-panel-plugins/cpugraph/xfce4-cpugraph-plugin_1.2.8.bb index 8e58175615..b240eaad5e 100644 --- a/meta-xfce/recipes-panel-plugins/cpugraph/xfce4-cpugraph-plugin_1.2.8.bb +++ b/meta-xfce/recipes-panel-plugins/cpugraph/xfce4-cpugraph-plugin_1.2.8.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Panel plugin with graphical representation of the cpu frequency" | 1 | SUMMARY = "Panel plugin with graphical representation of the cpu frequency" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-cpugraph-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-cpugraph-plugin/start" |
3 | LICENSE = "GPL-2.0-or-later" | 3 | LICENSE = "GPL-2.0-or-later" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=415654f59d8fa70fe4eac2c3f86c8f5e" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=415654f59d8fa70fe4eac2c3f86c8f5e" |
5 | 5 | ||
diff --git a/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_0.8.3.bb b/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_0.8.3.bb index f292a6deaf..f025edd4c5 100644 --- a/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_0.8.3.bb +++ b/meta-xfce/recipes-panel-plugins/datetime/xfce4-datetime-plugin_0.8.3.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Panel plugin displaying date and time and a calendar when left-clicked" | 1 | SUMMARY = "Panel plugin displaying date and time and a calendar when left-clicked" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-datetime-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-datetime-plugin/start" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" |
5 | 5 | ||
diff --git a/meta-xfce/recipes-panel-plugins/diskperf/xfce4-diskperf-plugin_2.7.0.bb b/meta-xfce/recipes-panel-plugins/diskperf/xfce4-diskperf-plugin_2.7.0.bb index 25a57f3233..583aa9a006 100644 --- a/meta-xfce/recipes-panel-plugins/diskperf/xfce4-diskperf-plugin_2.7.0.bb +++ b/meta-xfce/recipes-panel-plugins/diskperf/xfce4-diskperf-plugin_2.7.0.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Panel plugin displaying instant disk/partition performance" | 1 | SUMMARY = "Panel plugin displaying instant disk/partition performance" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-diskperf-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-diskperf-plugin/start" |
3 | LICENSE = "BSD-2-Clause" | 3 | LICENSE = "BSD-2-Clause" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d3e627798d6a60bece47aa8b3532e1f1" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d3e627798d6a60bece47aa8b3532e1f1" |
5 | 5 | ||
diff --git a/meta-xfce/recipes-panel-plugins/eyes/xfce4-eyes-plugin_4.6.0.bb b/meta-xfce/recipes-panel-plugins/eyes/xfce4-eyes-plugin_4.6.1.bb index 0c796534ab..61de603756 100644 --- a/meta-xfce/recipes-panel-plugins/eyes/xfce4-eyes-plugin_4.6.0.bb +++ b/meta-xfce/recipes-panel-plugins/eyes/xfce4-eyes-plugin_4.6.1.bb | |||
@@ -1,10 +1,10 @@ | |||
1 | SUMMARY = "Panel plugin with graphical representation of the cpu frequency" | 1 | SUMMARY = "Panel plugin with graphical representation of the cpu frequency" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-eyes-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-eyes-plugin/start" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
5 | 5 | ||
6 | inherit xfce-panel-plugin | 6 | inherit xfce-panel-plugin |
7 | 7 | ||
8 | SRC_URI[sha256sum] = "ad0ff05d88ba393b7c8922f8233edd33fc0a4e8b000b61de1f8f3a10c5ae5324" | 8 | SRC_URI[sha256sum] = "5219b2ec0f203ab65990671a95b1607f539201e09e8910b854aea848d478cb53" |
9 | 9 | ||
10 | FILES:${PN} += "${datadir}/xfce4/eyes" | 10 | FILES:${PN} += "${datadir}/xfce4/eyes" |
diff --git a/meta-xfce/recipes-panel-plugins/fsguard/xfce4-fsguard-plugin_1.1.3.bb b/meta-xfce/recipes-panel-plugins/fsguard/xfce4-fsguard-plugin_1.1.4.bb index 380d2e19e3..d94ccadb5f 100644 --- a/meta-xfce/recipes-panel-plugins/fsguard/xfce4-fsguard-plugin_1.1.3.bb +++ b/meta-xfce/recipes-panel-plugins/fsguard/xfce4-fsguard-plugin_1.1.4.bb | |||
@@ -1,8 +1,8 @@ | |||
1 | DESCRIPTION = "The FSGuard panel plugin checks free space on a chosen mount point frequently and displays a message when a limit is reached" | 1 | DESCRIPTION = "The FSGuard panel plugin checks free space on a chosen mount point frequently and displays a message when a limit is reached" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-fsguard-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-fsguard-plugin/start" |
3 | LICENSE = "BSD-2-Clause" | 3 | LICENSE = "BSD-2-Clause" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=3434d79d62df09abf5f78bb76d6cd21b" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=3434d79d62df09abf5f78bb76d6cd21b" |
5 | 5 | ||
6 | inherit xfce-panel-plugin | 6 | inherit xfce-panel-plugin |
7 | 7 | ||
8 | SRC_URI[sha256sum] = "84ef8bb4752292d64c0ef101badf7b14448790bfa0a85de644dbfa22986ec258" | 8 | SRC_URI[sha256sum] = "24b3789be6de92678e7036678530c4da4b3838aa3cda428439aa8d140704a4a6" |
diff --git a/meta-xfce/recipes-panel-plugins/genmon/xfce4-genmon-plugin_4.2.0.bb b/meta-xfce/recipes-panel-plugins/genmon/xfce4-genmon-plugin_4.2.1.bb index 31ad5e7ced..158dd2fbaa 100644 --- a/meta-xfce/recipes-panel-plugins/genmon/xfce4-genmon-plugin_4.2.0.bb +++ b/meta-xfce/recipes-panel-plugins/genmon/xfce4-genmon-plugin_4.2.1.bb | |||
@@ -1,8 +1,10 @@ | |||
1 | DESCRIPTION = "This plugin cyclically spawns the indicated script/program, captures its output (stdout) and displays the resulting string into the panel." | 1 | DESCRIPTION = "This plugin cyclically spawns the indicated script/program, captures its output (stdout) and displays the resulting string into the panel." |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin/start" |
3 | LICENSE = "LGPL-2.1-only" | 3 | LICENSE = "LGPL-2.1-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=4b54a1fd55a448865a0b32d41598759d" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=4b54a1fd55a448865a0b32d41598759d" |
5 | 5 | ||
6 | inherit xfce-panel-plugin | 6 | inherit xfce-panel-plugin |
7 | 7 | ||
8 | SRC_URI[sha256sum] = "948d08ee5f2140847f109b531bc1d4cc6268496913ea7600d3c5ad89025a0362" | 8 | SRC_URI[sha256sum] = "de540562e1ea58f35a9c815e20736d26af541a0a9372011148cb75b5f0b65951" |
9 | |||
10 | FILES:${PN} += "${datadir}/xfce4/genmon" | ||
diff --git a/meta-xfce/recipes-panel-plugins/mailwatch/xfce4-mailwatch-plugin_1.3.1.bb b/meta-xfce/recipes-panel-plugins/mailwatch/xfce4-mailwatch-plugin_1.3.2.bb index 6ea260765f..9ac375999f 100644 --- a/meta-xfce/recipes-panel-plugins/mailwatch/xfce4-mailwatch-plugin_1.3.1.bb +++ b/meta-xfce/recipes-panel-plugins/mailwatch/xfce4-mailwatch-plugin_1.3.2.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Multi-protocol, multi-mailbox mail watcher for the Xfce4 panel" | 1 | SUMMARY = "Multi-protocol, multi-mailbox mail watcher for the Xfce4 panel" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-mailwatch-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-mailwatch-plugin/start" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
5 | 5 | ||
@@ -7,7 +7,7 @@ inherit xfce-panel-plugin | |||
7 | 7 | ||
8 | DEPENDS += "gnutls" | 8 | DEPENDS += "gnutls" |
9 | 9 | ||
10 | SRC_URI[sha256sum] = "054964e9fe4ca668486400991ce1ea01d07aac7ba235f4b14d4a8f7d9800046a" | 10 | SRC_URI[sha256sum] = "c4783f1533891cd2e0c34066da859864dce45a23caa6015b58cb9fa9d65a7e44" |
11 | 11 | ||
12 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | 12 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
13 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | 13 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
diff --git a/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_1.1.5.bb b/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_1.1.5.bb index 3a6baf21f9..f11e41f9bd 100644 --- a/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_1.1.5.bb +++ b/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_1.1.5.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Mount/umount utility for the xfce panel" | 1 | SUMMARY = "Mount/umount utility for the xfce panel" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-mount-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-mount-plugin/start" |
3 | SECTION = "x11/application" | 3 | SECTION = "x11/application" |
4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
diff --git a/meta-xfce/recipes-panel-plugins/netload/xfce4-netload-plugin_1.4.1.bb b/meta-xfce/recipes-panel-plugins/netload/xfce4-netload-plugin_1.4.2.bb index c30f17a7d4..3c113290fd 100644 --- a/meta-xfce/recipes-panel-plugins/netload/xfce4-netload-plugin_1.4.1.bb +++ b/meta-xfce/recipes-panel-plugins/netload/xfce4-netload-plugin_1.4.2.bb | |||
@@ -1,9 +1,9 @@ | |||
1 | SUMMARY = "Panel plugin displaying current load of the network interfaces" | 1 | SUMMARY = "Panel plugin displaying current load of the network interfaces" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-netload-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-netload-plugin/start" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=2b6065ae7d3696cdad6869dd8627a9fe" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=2b6065ae7d3696cdad6869dd8627a9fe" |
5 | 5 | ||
6 | inherit xfce-panel-plugin | 6 | inherit xfce-panel-plugin |
7 | 7 | ||
8 | SRC_URI = "http://archive.xfce.org/src/panel-plugins/${BPN}/${@'${PV}'[0:3]}/${BPN}-${PV}.tar.bz2" | 8 | SRC_URI = "http://archive.xfce.org/src/panel-plugins/${BPN}/${@'${PV}'[0:3]}/${BPN}-${PV}.tar.bz2" |
9 | SRC_URI[sha256sum] = "9fac3a3ad52e18584bfb127cd1721d56de1004b9fdd140915fded89704ccb44e" | 9 | SRC_URI[sha256sum] = "a2041338408b2670f8debe57fcec6af539f704659eba853943c1524936ebabeb" |
diff --git a/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.11.0.bb b/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.11.2.bb index 0262620e6c..83e527e380 100644 --- a/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.11.0.bb +++ b/meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.11.2.bb | |||
@@ -1,14 +1,14 @@ | |||
1 | SUMMARY = "Notes plugin for the Xfce Panel" | 1 | SUMMARY = "Notes plugin for the Xfce Panel" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-notes-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-notes-plugin/start" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
5 | 5 | ||
6 | inherit xfce-panel-plugin | 6 | inherit xfce-panel-plugin |
7 | 7 | ||
8 | DEPENDS += "gtk+3 libxfce4ui xfce4-panel xfconf" | 8 | DEPENDS += "gtk+3 libxfce4ui xfce4-panel xfconf gtksourceview4" |
9 | 9 | ||
10 | CFLAGS += "-Wno-error=incompatible-pointer-types" | 10 | CFLAGS += "-Wno-error=incompatible-pointer-types" |
11 | SRC_URI[sha256sum] = "eb38246deb0fc89535fa9ff9b953c762cece232b5585d8210fab9abbf282aae3" | 11 | SRC_URI[sha256sum] = "8301fcd397bbc98a3def3d94f04de30cc128b4a35477024d2bcb2952a161a3b5" |
12 | 12 | ||
13 | # Add /usr/share/xfce4/notes/gtk-3.0/gtk.css | 13 | # Add /usr/share/xfce4/notes/gtk-3.0/gtk.css |
14 | FILES:${PN} += "${datadir}/xfce4/notes" | 14 | FILES:${PN} += "${datadir}/xfce4/notes" |
diff --git a/meta-xfce/recipes-panel-plugins/places/xfce4-places-plugin_1.8.3.bb b/meta-xfce/recipes-panel-plugins/places/xfce4-places-plugin_1.8.4.bb index 6400e0d3e4..4fe293898d 100644 --- a/meta-xfce/recipes-panel-plugins/places/xfce4-places-plugin_1.8.3.bb +++ b/meta-xfce/recipes-panel-plugins/places/xfce4-places-plugin_1.8.4.bb | |||
@@ -1,12 +1,12 @@ | |||
1 | SUMMARY = "Menu for quick access to folders, documents and removable media" | 1 | SUMMARY = "Menu for quick access to folders, documents and removable media" |
2 | DESCRIPTION = "Panel plugin displaying menu with quick access to folders, documents and removable media" | 2 | DESCRIPTION = "Panel plugin displaying menu with quick access to folders, documents and removable media" |
3 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-places-plugin" | 3 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-places-plugin/start" |
4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b6952d9a47fc2ad0f315510e1290455f" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b6952d9a47fc2ad0f315510e1290455f" |
6 | 6 | ||
7 | inherit xfce-panel-plugin | 7 | inherit xfce-panel-plugin |
8 | 8 | ||
9 | SRC_URI[sha256sum] = "f11d0e6d03f22ab02c2e6b507d365b5a918532e8819e50647ee1860eca60c743" | 9 | SRC_URI[sha256sum] = "ba766a5d31580fad043fbd1fd66b811cbda706229473d24a734a590d49ef710e" |
10 | 10 | ||
11 | PACKAGECONFIG ??= "notify" | 11 | PACKAGECONFIG ??= "notify" |
12 | PACKAGECONFIG[notify] = "--enable-notifications,--disable-notifications,libnotify" | 12 | PACKAGECONFIG[notify] = "--enable-notifications,--disable-notifications,libnotify" |
diff --git a/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.4.8.bb b/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.4.9.bb index c01b4966f0..1729ebfb29 100644 --- a/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.4.8.bb +++ b/meta-xfce/recipes-panel-plugins/pulseaudio/xfce4-pulseaudio-plugin_0.4.9.bb | |||
@@ -1,4 +1,5 @@ | |||
1 | SUMMARY = "Pulseaudio mixer for the xfce panel" | 1 | SUMMARY = "Pulseaudio mixer for the xfce panel" |
2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/start" | ||
2 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=f5eac6bb0d6ec0dc655e417781d4015f" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=f5eac6bb0d6ec0dc655e417781d4015f" |
4 | 5 | ||
@@ -8,7 +9,7 @@ REQUIRED_DISTRO_FEATURES = "pulseaudio x11" | |||
8 | 9 | ||
9 | DEPENDS += "dbus-glib pulseaudio" | 10 | DEPENDS += "dbus-glib pulseaudio" |
10 | 11 | ||
11 | SRC_URI[sha256sum] = "bd742b207c39c221e91c57c9c9be2839eb802d1b1ee01a02b7427cd02d3f0348" | 12 | SRC_URI[sha256sum] = "a0807615fb2848d0361b7e4568a44f26d189fda48011c7ba074986c8bfddc99a" |
12 | 13 | ||
13 | PACKAGECONFIG ??= "libnotify" | 14 | PACKAGECONFIG ??= "libnotify" |
14 | PACKAGECONFIG[libnotify] = "--enable-libnotify,--disable-libnotify,libnotify" | 15 | PACKAGECONFIG[libnotify] = "--enable-libnotify,--disable-libnotify,libnotify" |
diff --git a/meta-xfce/recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.4.bb b/meta-xfce/recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.5.bb index eb1165c578..d283684aa2 100644 --- a/meta-xfce/recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.4.bb +++ b/meta-xfce/recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.5.bb | |||
@@ -1,12 +1,12 @@ | |||
1 | SUMMARY = "Sensors plugin for the Xfce Panel" | 1 | SUMMARY = "Sensors plugin for the Xfce Panel" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-sensors-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-sensors-plugin/start" |
3 | LICENSE = "GPL-2.0-or-later" | 3 | LICENSE = "GPL-2.0-or-later" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
5 | 5 | ||
6 | inherit xfce-panel-plugin | 6 | inherit xfce-panel-plugin |
7 | 7 | ||
8 | SRC_URI += "file://0001-Do-not-check-for-sys-class-power_supply-we-are-cross.patch" | 8 | SRC_URI += "file://0001-Do-not-check-for-sys-class-power_supply-we-are-cross.patch" |
9 | SRC_URI[sha256sum] = "6c1605a738e5df40e084d08ac93f962cd445093396de1e9bfadc7ab4588c36b6" | 9 | SRC_URI[sha256sum] = "f69fdf79b7f76d2a81724828124a6fce76803a9122a4c82de8f3dfa3efbb179a" |
10 | 10 | ||
11 | EXTRA_OECONF = " \ | 11 | EXTRA_OECONF = " \ |
12 | --disable-procacpi \ | 12 | --disable-procacpi \ |
@@ -22,7 +22,7 @@ do_configure:prepend() { | |||
22 | PACKAGECONFIG ??= "libnotify" | 22 | PACKAGECONFIG ??= "libnotify" |
23 | PACKAGECONFIG[libsensors] = "--enable-libsensors,--disable-libsensors, lmsensors" | 23 | PACKAGECONFIG[libsensors] = "--enable-libsensors,--disable-libsensors, lmsensors" |
24 | PACKAGECONFIG[hddtemp] = "--enable-hddtemp,--disable-hddtemp, hddtemp" | 24 | PACKAGECONFIG[hddtemp] = "--enable-hddtemp,--disable-hddtemp, hddtemp" |
25 | PACKAGECONFIG[netcat] = "--enable-netcat,--disable-netcat, netcat" | 25 | PACKAGECONFIG[netcat] = "--enable-netcat --disable-pathchecks,--disable-netcat, netcat" |
26 | PACKAGECONFIG[libnotify] = "--enable-notification,--disable-notification, libnotify" | 26 | PACKAGECONFIG[libnotify] = "--enable-notification,--disable-notification, libnotify" |
27 | 27 | ||
28 | FILES_SOLIBSDEV = "${libdir}/xfce4/modules/lib*${SOLIBSDEV}" | 28 | FILES_SOLIBSDEV = "${libdir}/xfce4/modules/lib*${SOLIBSDEV}" |
diff --git a/meta-xfce/recipes-panel-plugins/smartbookmark/xfce4-smartbookmark-plugin_0.5.2.bb b/meta-xfce/recipes-panel-plugins/smartbookmark/xfce4-smartbookmark-plugin_0.5.3.bb index fdec598190..18083ec697 100644 --- a/meta-xfce/recipes-panel-plugins/smartbookmark/xfce4-smartbookmark-plugin_0.5.2.bb +++ b/meta-xfce/recipes-panel-plugins/smartbookmark/xfce4-smartbookmark-plugin_0.5.3.bb | |||
@@ -1,8 +1,8 @@ | |||
1 | SUMMARY = "Panel plugin allowing to send requests directly to browser" | 1 | SUMMARY = "Panel plugin allowing to send requests directly to browser" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-smartbookmark-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-smartbookmark-plugin/start" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
5 | 5 | ||
6 | inherit xfce-panel-plugin | 6 | inherit xfce-panel-plugin |
7 | 7 | ||
8 | SRC_URI[sha256sum] = "2a279e2f5a54518684e62ad1f3cd8ef950826505b39725f1b5d8f0c43031cdd3" | 8 | SRC_URI[sha256sum] = "3b4db0ac198339197a7682935f0bba5a7e8dd7f35bf575ac6665afa4cecec236" |
diff --git a/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb b/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb index e7a3e9936e..0b07bda32b 100644 --- a/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb +++ b/meta-xfce/recipes-panel-plugins/systemload/xfce4-systemload-plugin_1.3.2.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | DESCRIPTION = "Panel plugin displaying current CPU load, the memory in use, the swap space and the system uptime" | 1 | DESCRIPTION = "Panel plugin displaying current CPU load, the memory in use, the swap space and the system uptime" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-systemload-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-systemload-plugin/start" |
3 | LICENSE = "BSD-2-Clause" | 3 | LICENSE = "BSD-2-Clause" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=9acb172a93ff6c43cce2aff790a8aef8" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=9acb172a93ff6c43cce2aff790a8aef8" |
5 | 5 | ||
diff --git a/meta-xfce/recipes-panel-plugins/time-out/xfce4-time-out-plugin_1.1.3.bb b/meta-xfce/recipes-panel-plugins/time-out/xfce4-time-out-plugin_1.1.4.bb index 9fa287a1ca..f68b051e4f 100644 --- a/meta-xfce/recipes-panel-plugins/time-out/xfce4-time-out-plugin_1.1.3.bb +++ b/meta-xfce/recipes-panel-plugins/time-out/xfce4-time-out-plugin_1.1.4.bb | |||
@@ -1,9 +1,9 @@ | |||
1 | SUMMARY = "This plugin makes it possible to take periodical breaks" | 1 | SUMMARY = "This plugin makes it possible to take periodical breaks" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-time-out-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-time-out-plugin/start" |
3 | SECTION = "x11/application" | 3 | SECTION = "x11/application" |
4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" |
6 | 6 | ||
7 | inherit xfce-panel-plugin | 7 | inherit xfce-panel-plugin |
8 | 8 | ||
9 | SRC_URI[sha256sum] = "5a1ca36361e95ec718bbd887ea5be6a270ab458d1c2d672186721522a7228ee8" | 9 | SRC_URI[sha256sum] = "b6b708900d7fd0cc3d8a045514962db94b60d959c266049aa2cff768fc381726" |
diff --git a/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.2.bb b/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.2.bb index 33b60438d1..0f164b79c5 100644 --- a/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.2.bb +++ b/meta-xfce/recipes-panel-plugins/timer/xfce4-timer-plugin_1.7.2.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | SUMMARY = "XFCE panel plugin to generate alarm messages" | 1 | SUMMARY = "XFCE panel plugin to generate alarm messages" |
2 | DESCRIPTION = "This is a simple plugin that lets the user run an alarm at a specified time or at the end of a specified countdown period" | 2 | DESCRIPTION = "This is a simple plugin that lets the user run an alarm at a specified time or at the end of a specified countdown period" |
3 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-timer-plugin" | 3 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-timer-plugin/start" |
4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=f1c52159bdaebd029cb11927cbe709e4" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=f1c52159bdaebd029cb11927cbe709e4" |
6 | 6 | ||
diff --git a/meta-xfce/recipes-panel-plugins/verve/xfce4-verve-plugin_2.0.3.bb b/meta-xfce/recipes-panel-plugins/verve/xfce4-verve-plugin_2.0.3.bb index 9dcaae8ceb..844d8caf17 100644 --- a/meta-xfce/recipes-panel-plugins/verve/xfce4-verve-plugin_2.0.3.bb +++ b/meta-xfce/recipes-panel-plugins/verve/xfce4-verve-plugin_2.0.3.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Verve panel plugin is a comfortable command line plugin for the Xfce panel" | 1 | SUMMARY = "Verve panel plugin is a comfortable command line plugin for the Xfce panel" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-verve-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-verve-plugin/start" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
5 | 5 | ||
diff --git a/meta-xfce/recipes-panel-plugins/wavelan/xfce4-wavelan-plugin_0.6.3.bb b/meta-xfce/recipes-panel-plugins/wavelan/xfce4-wavelan-plugin_0.6.3.bb index 530f52425a..64e7ea6a18 100644 --- a/meta-xfce/recipes-panel-plugins/wavelan/xfce4-wavelan-plugin_0.6.3.bb +++ b/meta-xfce/recipes-panel-plugins/wavelan/xfce4-wavelan-plugin_0.6.3.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "Panel plugin displaying stats from a wireless lan interface" | 1 | SUMMARY = "Panel plugin displaying stats from a wireless lan interface" |
2 | HOMEPAGE = "https://goodies.xfce.org/projects/panel-plugins/xfce4-wavelan-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-wavelan-plugin/start" |
3 | LICENSE = "BSD-2-Clause" | 3 | LICENSE = "BSD-2-Clause" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=e1e5872df9c5cf1a23f16493d9104920" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=e1e5872df9c5cf1a23f16493d9104920" |
5 | 5 | ||
diff --git a/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0001-libxfce4ui-Avoid-deprecated-functions.patch b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0001-libxfce4ui-Avoid-deprecated-functions.patch new file mode 100644 index 0000000000..981ba560d4 --- /dev/null +++ b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0001-libxfce4ui-Avoid-deprecated-functions.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From 9a3fc89f924f7a322c3b537256621640561daf95 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= | ||
3 | <congdanhqx@gmail.com> | ||
4 | Date: Fri, 1 Mar 2024 21:56:34 +0700 | ||
5 | Subject: [PATCH 1/5] libxfce4ui: Avoid deprecated functions | ||
6 | |||
7 | - xfce_titled_dialog_new_with_buttons is deprecated from 4.16. | ||
8 | - xfce_spawn_command_line_on_screen is deprecated from 4.16 | ||
9 | |||
10 | - xfce_titled_dialog_new_with_mixed_buttons is available from 4.14 | ||
11 | - xfce_spawn_command_line is available from 4.16 | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/xfce-mirror/xfce4-weather-plugin/commit/9115037ed7cfe722d3739ca800d5247f4bb3bc53] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | configure.ac | 2 +- | ||
17 | panel-plugin/weather-config.c | 4 ++-- | ||
18 | panel-plugin/weather-search.c | 20 +++++++++++--------- | ||
19 | 3 files changed, 14 insertions(+), 12 deletions(-) | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index e0516e6..cf82b7e 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -66,7 +66,7 @@ XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.22.0]) | ||
26 | XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.64.0]) | ||
27 | XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.64.0]) | ||
28 | XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.12.0]) | ||
29 | -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.12.0]) | ||
30 | +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.16.0]) | ||
31 | XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-2.0], [4.14.0]) | ||
32 | XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0]) | ||
33 | XDT_CHECK_PACKAGE([LIBXML], [libxml-2.0], [2.4.0]) | ||
34 | diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c | ||
35 | index 9f77340..2645408 100644 | ||
36 | --- a/panel-plugin/weather-config.c | ||
37 | +++ b/panel-plugin/weather-config.c | ||
38 | @@ -958,8 +958,8 @@ button_icons_dir_clicked(GtkWidget *button, | ||
39 | g_mkdir_with_parents(dir, 0755); | ||
40 | command = g_strdup_printf("exo-open %s", dir); | ||
41 | g_free(dir); | ||
42 | - xfce_spawn_command_line_on_screen(gdk_screen_get_default(), | ||
43 | - command, FALSE, TRUE, NULL); | ||
44 | + xfce_spawn_command_line(gdk_screen_get_default(), command, FALSE, | ||
45 | + TRUE, TRUE, NULL); | ||
46 | g_free(command); | ||
47 | } | ||
48 | |||
49 | diff --git a/panel-plugin/weather-search.c b/panel-plugin/weather-search.c | ||
50 | index 83f1d71..7e87ae8 100644 | ||
51 | --- a/panel-plugin/weather-search.c | ||
52 | +++ b/panel-plugin/weather-search.c | ||
53 | @@ -205,15 +205,17 @@ create_search_dialog(GtkWindow *parent, | ||
54 | dialog->session = session; | ||
55 | |||
56 | dialog->dialog = | ||
57 | - xfce_titled_dialog_new_with_buttons(_("Search location"), | ||
58 | - parent, | ||
59 | - GTK_DIALOG_MODAL | | ||
60 | - GTK_DIALOG_DESTROY_WITH_PARENT, | ||
61 | - _("Cancel"), | ||
62 | - GTK_RESPONSE_REJECT, | ||
63 | - _("OK"), | ||
64 | - GTK_RESPONSE_ACCEPT, | ||
65 | - NULL); | ||
66 | + xfce_titled_dialog_new_with_mixed_buttons(_("Search location"), | ||
67 | + parent, | ||
68 | + GTK_DIALOG_MODAL | | ||
69 | + GTK_DIALOG_DESTROY_WITH_PARENT, | ||
70 | + "", | ||
71 | + _("Cancel"), | ||
72 | + GTK_RESPONSE_REJECT, | ||
73 | + "", | ||
74 | + _("OK"), | ||
75 | + GTK_RESPONSE_ACCEPT, | ||
76 | + NULL); | ||
77 | gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog->dialog), | ||
78 | GTK_RESPONSE_ACCEPT, FALSE); | ||
79 | gtk_window_set_icon_name(GTK_WINDOW(dialog->dialog), "edit-find"); | ||
diff --git a/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0002-parsers-Generalise-input-to-array-of-gchar.patch b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0002-parsers-Generalise-input-to-array-of-gchar.patch new file mode 100644 index 0000000000..a76a7741bf --- /dev/null +++ b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0002-parsers-Generalise-input-to-array-of-gchar.patch | |||
@@ -0,0 +1,289 @@ | |||
1 | From 3c095487e3a6c14f2900762c18c6e2170d22a283 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= | ||
3 | <congdanhqx@gmail.com> | ||
4 | Date: Fri, 1 Mar 2024 21:56:34 +0700 | ||
5 | Subject: [PATCH 2/5] parsers: Generalise input to array of gchar | ||
6 | |||
7 | In a later change, we will move to libsoup-3.0, which doesn't expose | ||
8 | `response_body' in SoupMessage. | ||
9 | |||
10 | Prepare for that move. | ||
11 | |||
12 | Upstream-Status: Backport [https://github.com/xfce-mirror/xfce4-weather-plugin/commit/3c095487e3a6c14f2900762c18c6e2170d22a283] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | panel-plugin/weather-config.c | 18 +++++++++++++++-- | ||
16 | panel-plugin/weather-parsers.c | 36 ++++++++++++++++++---------------- | ||
17 | panel-plugin/weather-parsers.h | 7 +++---- | ||
18 | panel-plugin/weather-search.c | 18 +++++++++++++++-- | ||
19 | panel-plugin/weather.c | 26 ++++++++++++++++++++---- | ||
20 | 5 files changed, 76 insertions(+), 29 deletions(-) | ||
21 | |||
22 | diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c | ||
23 | index 2645408..19fa1d8 100644 | ||
24 | --- a/panel-plugin/weather-config.c | ||
25 | +++ b/panel-plugin/weather-config.c | ||
26 | @@ -245,6 +245,13 @@ cb_lookup_altitude(SoupSession *session, | ||
27 | xfceweather_dialog *dialog = (xfceweather_dialog *) user_data; | ||
28 | xml_altitude *altitude; | ||
29 | gdouble alt = 0; | ||
30 | + const gchar *body = NULL; | ||
31 | + gsize len = 0; | ||
32 | + | ||
33 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
34 | + body = msg->response_body->data; | ||
35 | + len = msg->response_body->length; | ||
36 | + } | ||
37 | |||
38 | if (global_dialog == NULL) { | ||
39 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
40 | @@ -252,7 +259,7 @@ cb_lookup_altitude(SoupSession *session, | ||
41 | } | ||
42 | |||
43 | altitude = (xml_altitude *) | ||
44 | - parse_xml_document(msg, (XmlParseFunc) parse_altitude); | ||
45 | + parse_xml_document(body, len, (XmlParseFunc) parse_altitude); | ||
46 | |||
47 | if (altitude) { | ||
48 | alt = string_to_double(altitude->altitude, -9999); | ||
49 | @@ -274,6 +281,13 @@ cb_lookup_timezone(SoupSession *session, | ||
50 | { | ||
51 | xfceweather_dialog *dialog = (xfceweather_dialog *) user_data; | ||
52 | xml_timezone *xml_tz; | ||
53 | + const gchar *body = NULL; | ||
54 | + gsize len = 0; | ||
55 | + | ||
56 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
57 | + body = msg->response_body->data; | ||
58 | + len = msg->response_body->length; | ||
59 | + } | ||
60 | |||
61 | if (global_dialog == NULL) { | ||
62 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
63 | @@ -281,7 +295,7 @@ cb_lookup_timezone(SoupSession *session, | ||
64 | } | ||
65 | |||
66 | xml_tz = (xml_timezone *) | ||
67 | - parse_xml_document(msg, (XmlParseFunc) parse_timezone); | ||
68 | + parse_xml_document(body, len, (XmlParseFunc) parse_timezone); | ||
69 | weather_dump(weather_dump_timezone, xml_tz); | ||
70 | |||
71 | if (xml_tz) { | ||
72 | diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c | ||
73 | index d53a2bc..28934c4 100644 | ||
74 | --- a/panel-plugin/weather-parsers.c | ||
75 | +++ b/panel-plugin/weather-parsers.c | ||
76 | @@ -791,49 +791,51 @@ parse_timezone(xmlNode *cur_node) | ||
77 | |||
78 | |||
79 | xmlDoc * | ||
80 | -get_xml_document(SoupMessage *msg) | ||
81 | +get_xml_document(const gchar *data, gsize len) | ||
82 | { | ||
83 | - if (G_LIKELY(msg && msg->response_body && msg->response_body->data)) { | ||
84 | - if (g_utf8_validate(msg->response_body->data, -1, NULL)) { | ||
85 | + if (G_LIKELY(data && len)) { | ||
86 | + if (g_utf8_validate(data, len, NULL)) { | ||
87 | /* force parsing as UTF-8, the XML encoding header may lie */ | ||
88 | - return xmlReadMemory(msg->response_body->data, | ||
89 | - strlen(msg->response_body->data), | ||
90 | + return xmlReadMemory(data, len, | ||
91 | NULL, "UTF-8", 0); | ||
92 | } else { | ||
93 | - return xmlParseMemory(msg->response_body->data, | ||
94 | - strlen(msg->response_body->data)); | ||
95 | + return xmlParseMemory(data, len); | ||
96 | } | ||
97 | } | ||
98 | return NULL; | ||
99 | } | ||
100 | |||
101 | json_object * | ||
102 | -get_json_tree(SoupMessage *msg) | ||
103 | +get_json_tree(const gchar *data, gsize len) | ||
104 | { | ||
105 | json_object *res=NULL; | ||
106 | - enum json_tokener_error err; | ||
107 | + struct json_tokener *tok = json_tokener_new(); | ||
108 | |||
109 | - if (G_LIKELY(msg && msg->response_body && msg->response_body->data)) { | ||
110 | - res = json_tokener_parse_verbose(msg->response_body->data, &err); | ||
111 | - if (err != json_tokener_success) | ||
112 | - g_warning("get_json_tree: error =%d",err); | ||
113 | + if (G_UNLIKELY(tok == NULL)) { | ||
114 | + return NULL; | ||
115 | + } else if (G_LIKELY(data && len)) { | ||
116 | + res = json_tokener_parse_ex(tok, data, len); | ||
117 | + if (res == NULL) | ||
118 | + g_warning("get_json_tree: error =%d", | ||
119 | + json_tokener_get_error(tok)); | ||
120 | } | ||
121 | + json_tokener_free(tok); | ||
122 | return res; | ||
123 | } | ||
124 | |||
125 | gpointer | ||
126 | -parse_xml_document(SoupMessage *msg, | ||
127 | +parse_xml_document(const gchar *data, gsize len, | ||
128 | XmlParseFunc parse_func) | ||
129 | { | ||
130 | xmlDoc *doc; | ||
131 | xmlNode *root_node; | ||
132 | gpointer user_data = NULL; | ||
133 | |||
134 | - g_assert(msg != NULL); | ||
135 | - if (G_UNLIKELY(msg == NULL)) | ||
136 | + g_assert(data != NULL); | ||
137 | + if (G_UNLIKELY(data == NULL || len == 0)) | ||
138 | return NULL; | ||
139 | |||
140 | - doc = get_xml_document(msg); | ||
141 | + doc = get_xml_document(data, len); | ||
142 | if (G_LIKELY(doc)) { | ||
143 | root_node = xmlDocGetRootElement(doc); | ||
144 | if (G_LIKELY(root_node)) | ||
145 | diff --git a/panel-plugin/weather-parsers.h b/panel-plugin/weather-parsers.h | ||
146 | index a9d019d..09b9c02 100644 | ||
147 | --- a/panel-plugin/weather-parsers.h | ||
148 | +++ b/panel-plugin/weather-parsers.h | ||
149 | @@ -22,7 +22,6 @@ | ||
150 | #include <glib.h> | ||
151 | #include <gtk/gtk.h> | ||
152 | #include <libxml/parser.h> | ||
153 | -#include <libsoup/soup.h> | ||
154 | #include <json-c/json_tokener.h> | ||
155 | |||
156 | #define DATA_EXPIRY_TIME (24 * 3600) | ||
157 | @@ -157,11 +156,11 @@ xml_astro *get_astro(const GArray *astrodata, | ||
158 | const time_t day_t, | ||
159 | guint *index); | ||
160 | |||
161 | -xmlDoc *get_xml_document(SoupMessage *msg); | ||
162 | +xmlDoc *get_xml_document(const gchar *data, gsize len); | ||
163 | |||
164 | -json_object *get_json_tree(SoupMessage *msg); | ||
165 | +json_object *get_json_tree(const gchar *data, gsize len); | ||
166 | |||
167 | -gpointer parse_xml_document(SoupMessage *msg, | ||
168 | +gpointer parse_xml_document(const gchar *data, gsize len, | ||
169 | XmlParseFunc parse_func); | ||
170 | |||
171 | xml_astro *xml_astro_copy(const xml_astro *src); | ||
172 | diff --git a/panel-plugin/weather-search.c b/panel-plugin/weather-search.c | ||
173 | index 7e87ae8..6a2ba1f 100644 | ||
174 | --- a/panel-plugin/weather-search.c | ||
175 | +++ b/panel-plugin/weather-search.c | ||
176 | @@ -89,6 +89,13 @@ cb_searchdone(SoupSession *session, | ||
177 | gint found = 0; | ||
178 | GtkTreeIter iter; | ||
179 | GtkTreeSelection *selection; | ||
180 | + const gchar *body = NULL; | ||
181 | + gsize len = 0; | ||
182 | + | ||
183 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
184 | + body = msg->response_body->data; | ||
185 | + len = msg->response_body->length; | ||
186 | + } | ||
187 | |||
188 | if (global_dialog == NULL) { | ||
189 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
190 | @@ -97,7 +104,7 @@ cb_searchdone(SoupSession *session, | ||
191 | |||
192 | gtk_widget_set_sensitive(dialog->find_button, TRUE); | ||
193 | |||
194 | - doc = get_xml_document(msg); | ||
195 | + doc = get_xml_document(body, len); | ||
196 | if (!doc) | ||
197 | return; | ||
198 | |||
199 | @@ -385,6 +392,13 @@ cb_geolocation(SoupSession *session, | ||
200 | xml_geolocation *geo; | ||
201 | gchar *full_loc; | ||
202 | units_config *units; | ||
203 | + const gchar *body = NULL; | ||
204 | + gsize len = 0; | ||
205 | + | ||
206 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
207 | + body = msg->response_body->data; | ||
208 | + len = msg->response_body->length; | ||
209 | + } | ||
210 | |||
211 | if (global_dialog == NULL) { | ||
212 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
213 | @@ -392,7 +406,7 @@ cb_geolocation(SoupSession *session, | ||
214 | } | ||
215 | |||
216 | geo = (xml_geolocation *) | ||
217 | - parse_xml_document(msg, (XmlParseFunc) parse_geolocation); | ||
218 | + parse_xml_document(body, len, (XmlParseFunc) parse_geolocation); | ||
219 | weather_dump(weather_dump_geolocation, geo); | ||
220 | |||
221 | if (!geo) { | ||
222 | diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c | ||
223 | index 0a92b4e..b75c633 100644 | ||
224 | --- a/panel-plugin/weather.c | ||
225 | +++ b/panel-plugin/weather.c | ||
226 | @@ -489,11 +489,17 @@ cb_astro_update_sun(SoupSession *session, | ||
227 | json_object *json_tree; | ||
228 | time_t now_t; | ||
229 | guint astro_forecast_days; | ||
230 | + const gchar *body = NULL; | ||
231 | + gsize len = 0; | ||
232 | |||
233 | data->msg_parse->sun_msg_processed++; | ||
234 | data->astro_update->http_status_code = msg->status_code; | ||
235 | if ((msg->status_code == 200 || msg->status_code == 203)) { | ||
236 | - json_tree = get_json_tree(msg); | ||
237 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
238 | + body = msg->response_body->data; | ||
239 | + len = msg->response_body->length; | ||
240 | + } | ||
241 | + json_tree = get_json_tree(body, len); | ||
242 | if (G_LIKELY(json_tree)) { | ||
243 | if (!parse_astrodata_sun(json_tree, data->astrodata)) { | ||
244 | data->msg_parse->sun_msg_parse_error++; | ||
245 | @@ -545,11 +551,17 @@ cb_astro_update_moon(SoupSession *session, | ||
246 | json_object *json_tree; | ||
247 | time_t now_t; | ||
248 | guint astro_forecast_days; | ||
249 | + const gchar *body = NULL; | ||
250 | + gsize len = 0; | ||
251 | |||
252 | data->msg_parse->moon_msg_processed++; | ||
253 | data->astro_update->http_status_code = msg->status_code; | ||
254 | if ((msg->status_code == 200 || msg->status_code == 203)) { | ||
255 | - json_tree = get_json_tree(msg); | ||
256 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
257 | + body = msg->response_body->data; | ||
258 | + len = msg->response_body->length; | ||
259 | + } | ||
260 | + json_tree = get_json_tree(body, len); | ||
261 | if (G_LIKELY(json_tree)) { | ||
262 | if (!parse_astrodata_moon(json_tree, data->astrodata)) { | ||
263 | data->msg_parse->moon_msg_parse_error++; | ||
264 | @@ -606,17 +618,23 @@ cb_weather_update(SoupSession *session, | ||
265 | gpointer user_data) | ||
266 | { | ||
267 | plugin_data *data = user_data; | ||
268 | - xmlDoc *doc; | ||
269 | + xmlDoc *doc = NULL; | ||
270 | xmlNode *root_node; | ||
271 | time_t now_t; | ||
272 | gboolean parsing_error = TRUE; | ||
273 | + const gchar *body = NULL; | ||
274 | + gsize len = 0; | ||
275 | |||
276 | weather_debug("Processing downloaded weather data."); | ||
277 | time(&now_t); | ||
278 | data->weather_update->attempt++; | ||
279 | data->weather_update->http_status_code = msg->status_code; | ||
280 | if (msg->status_code == 200 || msg->status_code == 203) { | ||
281 | - doc = get_xml_document(msg); | ||
282 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
283 | + body = msg->response_body->data; | ||
284 | + len = msg->response_body->length; | ||
285 | + } | ||
286 | + doc = get_xml_document(body, len); | ||
287 | if (G_LIKELY(doc)) { | ||
288 | root_node = xmlDocGetRootElement(doc); | ||
289 | if (G_LIKELY(root_node)) | ||
diff --git a/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0003-libsoup-Port-to-libsoup-3.0.patch b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0003-libsoup-Port-to-libsoup-3.0.patch new file mode 100644 index 0000000000..3970df672b --- /dev/null +++ b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0003-libsoup-Port-to-libsoup-3.0.patch | |||
@@ -0,0 +1,563 @@ | |||
1 | From 05b3ab7c755d7a6667852576ed11944304acdd4a Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= | ||
3 | <congdanhqx@gmail.com> | ||
4 | Date: Fri, 1 Mar 2024 21:56:34 +0700 | ||
5 | Subject: [PATCH 3/5] libsoup: Port to libsoup-3.0 | ||
6 | |||
7 | Upstream-Status: Backport [https://github.com/xfce-mirror/xfce4-weather-plugin/commit/05b3ab7c755d7a6667852576ed11944304acdd4a] | ||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | README | 4 +- | ||
11 | configure.ac | 2 +- | ||
12 | panel-plugin/weather-config.c | 32 ++++--- | ||
13 | panel-plugin/weather-search.c | 37 ++++++--- | ||
14 | panel-plugin/weather-summary.c | 23 ++++-- | ||
15 | panel-plugin/weather.c | 147 +++++++++++++++------------------ | ||
16 | panel-plugin/weather.h | 2 +- | ||
17 | 7 files changed, 132 insertions(+), 115 deletions(-) | ||
18 | |||
19 | diff --git a/README b/README | ||
20 | index 6587581..3530b1f 100644 | ||
21 | --- a/README | ||
22 | +++ b/README | ||
23 | @@ -152,10 +152,10 @@ using gdb or any other debugger should the plugin crash: | ||
24 | BUILD REQUIREMENTS AND DEPENDENCIES | ||
25 | ========================================================================== | ||
26 | To be able to build the plugin, the following requirements have to be | ||
27 | -met in addition to those of XFCE-4.14: | ||
28 | +met in addition to those of XFCE-4.16: | ||
29 | |||
30 | * >=libxml-2.4.0 | ||
31 | -* >=libsoup-2.42.0 | ||
32 | +* >=libsoup-3.0.0 | ||
33 | * >=upower-0.9.0 (optional) | ||
34 | |||
35 | You might also need developer libraries necessary for building other | ||
36 | diff --git a/configure.ac b/configure.ac | ||
37 | index cf82b7e..15e8b46 100644 | ||
38 | --- a/configure.ac | ||
39 | +++ b/configure.ac | ||
40 | @@ -70,7 +70,7 @@ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.16.0]) | ||
41 | XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-2.0], [4.14.0]) | ||
42 | XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0]) | ||
43 | XDT_CHECK_PACKAGE([LIBXML], [libxml-2.0], [2.4.0]) | ||
44 | -XDT_CHECK_PACKAGE([SOUP], [libsoup-2.4], [2.42.0]) | ||
45 | +XDT_CHECK_PACKAGE([SOUP], [libsoup-3.0], [3.0.0]) | ||
46 | XDT_CHECK_PACKAGE([JSON], [json-c], [0.13.1]) | ||
47 | XDT_CHECK_OPTIONAL_PACKAGE([UPOWER_GLIB], [upower-glib], [0.9.0], [upower], | ||
48 | [upower for adapting update interval to power state]) | ||
49 | diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c | ||
50 | index 19fa1d8..d27c825 100644 | ||
51 | --- a/panel-plugin/weather-config.c | ||
52 | +++ b/panel-plugin/weather-config.c | ||
53 | @@ -238,8 +238,8 @@ sanitize_location_name(const gchar *location_name) | ||
54 | |||
55 | |||
56 | static void | ||
57 | -cb_lookup_altitude(SoupSession *session, | ||
58 | - SoupMessage *msg, | ||
59 | +cb_lookup_altitude(GObject *source, | ||
60 | + GAsyncResult *result, | ||
61 | gpointer user_data) | ||
62 | { | ||
63 | xfceweather_dialog *dialog = (xfceweather_dialog *) user_data; | ||
64 | @@ -247,11 +247,14 @@ cb_lookup_altitude(SoupSession *session, | ||
65 | gdouble alt = 0; | ||
66 | const gchar *body = NULL; | ||
67 | gsize len = 0; | ||
68 | + GError *error = NULL; | ||
69 | + GBytes *response = | ||
70 | + soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
71 | |||
72 | - if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
73 | - body = msg->response_body->data; | ||
74 | - len = msg->response_body->length; | ||
75 | - } | ||
76 | + if (G_UNLIKELY(error)) | ||
77 | + g_error_free(error); | ||
78 | + else | ||
79 | + body = g_bytes_get_data(response, &len); | ||
80 | |||
81 | if (global_dialog == NULL) { | ||
82 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
83 | @@ -271,23 +274,27 @@ cb_lookup_altitude(SoupSession *session, | ||
84 | else if (dialog->pd->units->altitude == FEET) | ||
85 | alt /= 0.3048; | ||
86 | gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->spin_alt), alt); | ||
87 | + g_bytes_unref(response); | ||
88 | } | ||
89 | |||
90 | |||
91 | static void | ||
92 | -cb_lookup_timezone(SoupSession *session, | ||
93 | - SoupMessage *msg, | ||
94 | +cb_lookup_timezone(GObject *source, | ||
95 | + GAsyncResult *result, | ||
96 | gpointer user_data) | ||
97 | { | ||
98 | xfceweather_dialog *dialog = (xfceweather_dialog *) user_data; | ||
99 | xml_timezone *xml_tz; | ||
100 | const gchar *body = NULL; | ||
101 | gsize len = 0; | ||
102 | + GError *error = NULL; | ||
103 | + GBytes *response = | ||
104 | + soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
105 | |||
106 | - if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
107 | - body = msg->response_body->data; | ||
108 | - len = msg->response_body->length; | ||
109 | - } | ||
110 | + if (G_UNLIKELY(error)) | ||
111 | + g_error_free(error); | ||
112 | + else | ||
113 | + body = g_bytes_get_data(response, &len); | ||
114 | |||
115 | if (global_dialog == NULL) { | ||
116 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
117 | @@ -304,6 +311,7 @@ cb_lookup_timezone(SoupSession *session, | ||
118 | xml_timezone_free(xml_tz); | ||
119 | } else | ||
120 | gtk_entry_set_text(GTK_ENTRY(dialog->text_timezone), ""); | ||
121 | + g_bytes_unref(response); | ||
122 | } | ||
123 | |||
124 | |||
125 | diff --git a/panel-plugin/weather-search.c b/panel-plugin/weather-search.c | ||
126 | index 6a2ba1f..e030ff8 100644 | ||
127 | --- a/panel-plugin/weather-search.c | ||
128 | +++ b/panel-plugin/weather-search.c | ||
129 | @@ -78,8 +78,8 @@ sanitize_str(const gchar *str) | ||
130 | |||
131 | |||
132 | static void | ||
133 | -cb_searchdone(SoupSession *session, | ||
134 | - SoupMessage *msg, | ||
135 | +cb_searchdone(GObject *source, | ||
136 | + GAsyncResult *result, | ||
137 | gpointer user_data) | ||
138 | { | ||
139 | search_dialog *dialog = (search_dialog *) user_data; | ||
140 | @@ -91,11 +91,14 @@ cb_searchdone(SoupSession *session, | ||
141 | GtkTreeSelection *selection; | ||
142 | const gchar *body = NULL; | ||
143 | gsize len = 0; | ||
144 | + GError *error = NULL; | ||
145 | + GBytes *response = | ||
146 | + soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
147 | |||
148 | - if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
149 | - body = msg->response_body->data; | ||
150 | - len = msg->response_body->length; | ||
151 | - } | ||
152 | + if (G_UNLIKELY(error)) | ||
153 | + g_error_free(error); | ||
154 | + else | ||
155 | + body = g_bytes_get_data(response, &len); | ||
156 | |||
157 | if (global_dialog == NULL) { | ||
158 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
159 | @@ -105,8 +108,10 @@ cb_searchdone(SoupSession *session, | ||
160 | gtk_widget_set_sensitive(dialog->find_button, TRUE); | ||
161 | |||
162 | doc = get_xml_document(body, len); | ||
163 | - if (!doc) | ||
164 | + if (!doc) { | ||
165 | + g_bytes_unref(response); | ||
166 | return; | ||
167 | + } | ||
168 | |||
169 | cur_node = xmlDocGetRootElement(doc); | ||
170 | if (cur_node) { | ||
171 | @@ -140,6 +145,7 @@ cb_searchdone(SoupSession *session, | ||
172 | } | ||
173 | |||
174 | gtk_tree_view_column_set_title(dialog->column, _("Results")); | ||
175 | + g_bytes_unref(response); | ||
176 | } | ||
177 | |||
178 | |||
179 | @@ -384,8 +390,8 @@ get_preferred_units(const gchar *country_code) | ||
180 | |||
181 | |||
182 | static void | ||
183 | -cb_geolocation(SoupSession *session, | ||
184 | - SoupMessage *msg, | ||
185 | +cb_geolocation(GObject *source, | ||
186 | + GAsyncResult *result, | ||
187 | gpointer user_data) | ||
188 | { | ||
189 | geolocation_data *data = (geolocation_data *) user_data; | ||
190 | @@ -394,11 +400,14 @@ cb_geolocation(SoupSession *session, | ||
191 | units_config *units; | ||
192 | const gchar *body = NULL; | ||
193 | gsize len = 0; | ||
194 | + GError *error = NULL; | ||
195 | + GBytes *response = | ||
196 | + soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
197 | |||
198 | - if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
199 | - body = msg->response_body->data; | ||
200 | - len = msg->response_body->length; | ||
201 | - } | ||
202 | + if (G_UNLIKELY(error)) | ||
203 | + g_error_free(error); | ||
204 | + else | ||
205 | + body = g_bytes_get_data(response, &len); | ||
206 | |||
207 | if (global_dialog == NULL) { | ||
208 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
209 | @@ -411,6 +420,7 @@ cb_geolocation(SoupSession *session, | ||
210 | |||
211 | if (!geo) { | ||
212 | data->cb(NULL, NULL, NULL, NULL, data->user_data); | ||
213 | + g_bytes_unref(response); | ||
214 | g_free(data); | ||
215 | return; | ||
216 | } | ||
217 | @@ -441,6 +451,7 @@ cb_geolocation(SoupSession *session, | ||
218 | g_slice_free(units_config, units); | ||
219 | xml_geolocation_free(geo); | ||
220 | g_free(full_loc); | ||
221 | + g_bytes_unref(response); | ||
222 | g_free(data); | ||
223 | } | ||
224 | |||
225 | diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c | ||
226 | index a6a2f56..224bb34 100644 | ||
227 | --- a/panel-plugin/weather-summary.c | ||
228 | +++ b/panel-plugin/weather-summary.c | ||
229 | @@ -234,22 +234,29 @@ get_logo_path(void) | ||
230 | |||
231 | |||
232 | static void | ||
233 | -logo_fetched(SoupSession *session, | ||
234 | - SoupMessage *msg, | ||
235 | +logo_fetched(GObject *source, | ||
236 | + GAsyncResult *result, | ||
237 | gpointer user_data) | ||
238 | { | ||
239 | - if (msg && msg->response_body && msg->response_body->length > 0) { | ||
240 | + GError *error = NULL; | ||
241 | + GBytes *response = | ||
242 | + soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
243 | + | ||
244 | + if (G_LIKELY(error == NULL)) { | ||
245 | + gsize len = 0; | ||
246 | + const gchar *body = g_bytes_get_data(response, &len); | ||
247 | gchar *path = get_logo_path(); | ||
248 | - GError *error = NULL; | ||
249 | GdkPixbuf *pixbuf = NULL; | ||
250 | gint scale_factor; | ||
251 | - if (!g_file_set_contents(path, msg->response_body->data, | ||
252 | - msg->response_body->length, &error)) { | ||
253 | + g_file_set_contents(path, body, len, &error); | ||
254 | + g_bytes_unref(response); | ||
255 | + if (error) { | ||
256 | g_warning("Error downloading met.no logo image to %s, " | ||
257 | "reason: %s\n", path, | ||
258 | error ? error->message : "unknown"); | ||
259 | g_error_free(error); | ||
260 | g_free(path); | ||
261 | + g_bytes_unref(response); | ||
262 | return; | ||
263 | } | ||
264 | scale_factor = gtk_widget_get_scale_factor(user_data); | ||
265 | @@ -261,7 +268,9 @@ logo_fetched(SoupSession *session, | ||
266 | cairo_surface_destroy(surface); | ||
267 | g_object_unref(pixbuf); | ||
268 | } | ||
269 | - } | ||
270 | + g_bytes_unref(response); | ||
271 | + } else | ||
272 | + g_error_free(error); | ||
273 | } | ||
274 | |||
275 | |||
276 | diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c | ||
277 | index b75c633..1a84537 100644 | ||
278 | --- a/panel-plugin/weather.c | ||
279 | +++ b/panel-plugin/weather.c | ||
280 | @@ -23,6 +23,8 @@ | ||
281 | #include <string.h> | ||
282 | #include <sys/stat.h> | ||
283 | |||
284 | +#include <glib.h> | ||
285 | + | ||
286 | #include <libxfce4util/libxfce4util.h> | ||
287 | #include <libxfce4ui/libxfce4ui.h> | ||
288 | #include <xfconf/xfconf.h> | ||
289 | @@ -106,13 +108,14 @@ static void schedule_next_wakeup(plugin_data *data); | ||
290 | void | ||
291 | weather_http_queue_request(SoupSession *session, | ||
292 | const gchar *uri, | ||
293 | - SoupSessionCallback callback_func, | ||
294 | + GAsyncReadyCallback callback_func, | ||
295 | gpointer user_data) | ||
296 | { | ||
297 | SoupMessage *msg; | ||
298 | |||
299 | msg = soup_message_new("GET", uri); | ||
300 | - soup_session_queue_message(session, msg, callback_func, user_data); | ||
301 | + soup_session_send_and_read_async(session, msg, G_PRIORITY_DEFAULT, NULL, | ||
302 | + callback_func, user_data); | ||
303 | } | ||
304 | |||
305 | |||
306 | @@ -481,8 +484,8 @@ calc_next_download_time(const update_info *upi, | ||
307 | * Process downloaded sun astro data and schedule next astro update. | ||
308 | */ | ||
309 | static void | ||
310 | -cb_astro_update_sun(SoupSession *session, | ||
311 | - SoupMessage *msg, | ||
312 | +cb_astro_update_sun(GObject *source, | ||
313 | + GAsyncResult *result, | ||
314 | gpointer user_data) | ||
315 | { | ||
316 | plugin_data *data = user_data; | ||
317 | @@ -491,14 +494,17 @@ cb_astro_update_sun(SoupSession *session, | ||
318 | guint astro_forecast_days; | ||
319 | const gchar *body = NULL; | ||
320 | gsize len = 0; | ||
321 | + SoupMessage *msg; | ||
322 | + GError *error = NULL; | ||
323 | + GBytes *response; | ||
324 | |||
325 | + msg = soup_session_get_async_result_message(SOUP_SESSION(source), result); | ||
326 | data->msg_parse->sun_msg_processed++; | ||
327 | - data->astro_update->http_status_code = msg->status_code; | ||
328 | - if ((msg->status_code == 200 || msg->status_code == 203)) { | ||
329 | - if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
330 | - body = msg->response_body->data; | ||
331 | - len = msg->response_body->length; | ||
332 | - } | ||
333 | + data->astro_update->http_status_code = soup_message_get_status(msg); | ||
334 | + response = soup_session_send_and_read_finish(SOUP_SESSION(source), | ||
335 | + result, &error); | ||
336 | + if (G_LIKELY(error == NULL)) { | ||
337 | + body = g_bytes_get_data(response, &len); | ||
338 | json_tree = get_json_tree(body, len); | ||
339 | if (G_LIKELY(json_tree)) { | ||
340 | if (!parse_astrodata_sun(json_tree, data->astrodata)) { | ||
341 | @@ -514,10 +520,12 @@ cb_astro_update_sun(SoupSession *session, | ||
342 | g_warning("Error parsing sun astronomical data!"); | ||
343 | weather_debug("No json_tree"); | ||
344 | } | ||
345 | + g_bytes_unref(response); | ||
346 | } else { | ||
347 | data->msg_parse->http_msg_fail = TRUE; | ||
348 | - g_warning_once("Download of sun astronomical data failed with HTTP Status Code %d, Reason phrase: %s", | ||
349 | - msg->status_code, msg->reason_phrase); | ||
350 | + g_warning_once("Download of sun astronomical data failed: %s", | ||
351 | + error->message); | ||
352 | + g_error_free(error); | ||
353 | } | ||
354 | |||
355 | astro_forecast_days = data->forecast_days + 1; | ||
356 | @@ -543,8 +551,8 @@ cb_astro_update_sun(SoupSession *session, | ||
357 | * Process downloaded moon astro data and schedule next astro update. | ||
358 | */ | ||
359 | static void | ||
360 | -cb_astro_update_moon(SoupSession *session, | ||
361 | - SoupMessage *msg, | ||
362 | +cb_astro_update_moon(GObject *source, | ||
363 | + GAsyncResult *result, | ||
364 | gpointer user_data) | ||
365 | { | ||
366 | plugin_data *data = user_data; | ||
367 | @@ -553,14 +561,17 @@ cb_astro_update_moon(SoupSession *session, | ||
368 | guint astro_forecast_days; | ||
369 | const gchar *body = NULL; | ||
370 | gsize len = 0; | ||
371 | + SoupMessage *msg; | ||
372 | + GError *error = NULL; | ||
373 | + GBytes *response; | ||
374 | |||
375 | + response = soup_session_send_and_read_finish(SOUP_SESSION(source), | ||
376 | + result, &error); | ||
377 | + msg = soup_session_get_async_result_message(SOUP_SESSION(source), result); | ||
378 | data->msg_parse->moon_msg_processed++; | ||
379 | - data->astro_update->http_status_code = msg->status_code; | ||
380 | - if ((msg->status_code == 200 || msg->status_code == 203)) { | ||
381 | - if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
382 | - body = msg->response_body->data; | ||
383 | - len = msg->response_body->length; | ||
384 | - } | ||
385 | + data->astro_update->http_status_code = soup_message_get_status(msg); | ||
386 | + if (G_LIKELY(error == NULL)) { | ||
387 | + body = g_bytes_get_data(response, &len); | ||
388 | json_tree = get_json_tree(body, len); | ||
389 | if (G_LIKELY(json_tree)) { | ||
390 | if (!parse_astrodata_moon(json_tree, data->astrodata)) { | ||
391 | @@ -576,10 +587,12 @@ cb_astro_update_moon(SoupSession *session, | ||
392 | g_warning("Error parsing moon astronomical data"); | ||
393 | weather_debug("No json_tree"); | ||
394 | } | ||
395 | + g_bytes_unref(response); | ||
396 | } else { | ||
397 | data->msg_parse->http_msg_fail = TRUE; | ||
398 | - g_warning_once("Download of moon astronomical data failed with HTTP Status Code %d, Reason phrase: %s", | ||
399 | - msg->status_code, msg->reason_phrase); | ||
400 | + g_warning_once("Download of moon astronomical data failed: %s", | ||
401 | + error->message); | ||
402 | + g_error_free(error); | ||
403 | } | ||
404 | |||
405 | astro_forecast_days = data->forecast_days + 1; | ||
406 | @@ -613,8 +626,8 @@ cb_astro_update_moon(SoupSession *session, | ||
407 | * Process downloaded weather data and schedule next weather update. | ||
408 | */ | ||
409 | static void | ||
410 | -cb_weather_update(SoupSession *session, | ||
411 | - SoupMessage *msg, | ||
412 | +cb_weather_update(GObject *source, | ||
413 | + GAsyncResult *result, | ||
414 | gpointer user_data) | ||
415 | { | ||
416 | plugin_data *data = user_data; | ||
417 | @@ -624,16 +637,19 @@ cb_weather_update(SoupSession *session, | ||
418 | gboolean parsing_error = TRUE; | ||
419 | const gchar *body = NULL; | ||
420 | gsize len = 0; | ||
421 | + SoupMessage *msg; | ||
422 | + GError *error = NULL; | ||
423 | + GBytes *response = NULL; | ||
424 | |||
425 | weather_debug("Processing downloaded weather data."); | ||
426 | + response = soup_session_send_and_read_finish(SOUP_SESSION(source), | ||
427 | + result, &error); | ||
428 | + msg = soup_session_get_async_result_message(SOUP_SESSION(source), result); | ||
429 | time(&now_t); | ||
430 | data->weather_update->attempt++; | ||
431 | - data->weather_update->http_status_code = msg->status_code; | ||
432 | - if (msg->status_code == 200 || msg->status_code == 203) { | ||
433 | - if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
434 | - body = msg->response_body->data; | ||
435 | - len = msg->response_body->length; | ||
436 | - } | ||
437 | + data->weather_update->http_status_code = soup_message_get_status(msg); | ||
438 | + if (G_LIKELY(error == NULL)) { | ||
439 | + body = g_bytes_get_data(response, &len); | ||
440 | doc = get_xml_document(body, len); | ||
441 | if (G_LIKELY(doc)) { | ||
442 | root_node = xmlDocGetRootElement(doc); | ||
443 | @@ -645,12 +661,13 @@ cb_weather_update(SoupSession *session, | ||
444 | } | ||
445 | xmlFreeDoc(doc); | ||
446 | } | ||
447 | + g_bytes_unref(response); | ||
448 | if (parsing_error) | ||
449 | g_warning("Error parsing weather data!"); | ||
450 | - } else | ||
451 | - weather_debug | ||
452 | - ("Download of weather data failed with HTTP Status Code %d, " | ||
453 | - "Reason phrase: %s", msg->status_code, msg->reason_phrase); | ||
454 | + } else { | ||
455 | + weather_debug("Download of weather data failed: %s", error->message); | ||
456 | + g_error_free(error); | ||
457 | + } | ||
458 | data->weather_update->next = calc_next_download_time(data->weather_update, | ||
459 | now_t); | ||
460 | |||
461 | @@ -1708,32 +1725,6 @@ mi_click(GtkWidget *widget, | ||
462 | update_weatherdata_with_reset(data); | ||
463 | } | ||
464 | |||
465 | -static void | ||
466 | -proxy_auth(SoupSession *session, | ||
467 | - SoupMessage *msg, | ||
468 | - SoupAuth *auth, | ||
469 | - gboolean retrying, | ||
470 | - gpointer user_data) | ||
471 | -{ | ||
472 | - SoupURI *soup_proxy_uri; | ||
473 | - const gchar *proxy_uri; | ||
474 | - | ||
475 | - if (!retrying) { | ||
476 | - if (msg->status_code == SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED) { | ||
477 | - proxy_uri = g_getenv("HTTP_PROXY"); | ||
478 | - if (!proxy_uri) | ||
479 | - proxy_uri = g_getenv("http_proxy"); | ||
480 | - if (proxy_uri) { | ||
481 | - soup_proxy_uri = soup_uri_new(proxy_uri); | ||
482 | - soup_auth_authenticate(auth, | ||
483 | - soup_uri_get_user(soup_proxy_uri), | ||
484 | - soup_uri_get_password(soup_proxy_uri)); | ||
485 | - soup_uri_free(soup_proxy_uri); | ||
486 | - } | ||
487 | - } | ||
488 | - } | ||
489 | -} | ||
490 | - | ||
491 | |||
492 | #ifdef HAVE_UPOWER_GLIB | ||
493 | static void | ||
494 | @@ -2037,9 +2028,10 @@ static plugin_data * | ||
495 | xfceweather_create_control(XfcePanelPlugin *plugin) | ||
496 | { | ||
497 | plugin_data *data = g_slice_new0(plugin_data); | ||
498 | - SoupURI *soup_proxy_uri; | ||
499 | + GProxyResolver *proxy_resolver; | ||
500 | const gchar *proxy_uri; | ||
501 | - const gchar *proxy_user; | ||
502 | + const gchar *no_proxy; | ||
503 | + gchar **no_proxy_lst = NULL; | ||
504 | GtkWidget *refresh; | ||
505 | cairo_surface_t *icon = NULL; | ||
506 | data_types lbl; | ||
507 | @@ -2077,29 +2069,26 @@ xfceweather_create_control(XfcePanelPlugin *plugin) | ||
508 | |||
509 | /* Setup session for HTTP connections */ | ||
510 | data->session = soup_session_new(); | ||
511 | - g_object_set(data->session, SOUP_SESSION_USER_AGENT, | ||
512 | - PACKAGE_NAME "-" PACKAGE_VERSION, NULL); | ||
513 | - g_object_set(data->session, SOUP_SESSION_TIMEOUT, | ||
514 | - CONN_TIMEOUT, NULL); | ||
515 | + soup_session_set_user_agent(data->session, | ||
516 | + PACKAGE_NAME "-" PACKAGE_VERSION); | ||
517 | + soup_session_set_timeout(data->session, CONN_TIMEOUT); | ||
518 | |||
519 | /* Set the proxy URI from environment */ | ||
520 | proxy_uri = g_getenv("HTTP_PROXY"); | ||
521 | if (!proxy_uri) | ||
522 | proxy_uri = g_getenv("http_proxy"); | ||
523 | if (proxy_uri) { | ||
524 | - soup_proxy_uri = soup_uri_new(proxy_uri); | ||
525 | - g_object_set(data->session, SOUP_SESSION_PROXY_URI, | ||
526 | - soup_proxy_uri, NULL); | ||
527 | - | ||
528 | - /* check if uri contains authentication info */ | ||
529 | - proxy_user = soup_uri_get_user(soup_proxy_uri); | ||
530 | - if (proxy_user && strlen(proxy_user) > 0) { | ||
531 | - g_signal_connect(G_OBJECT(data->session), "authenticate", | ||
532 | - G_CALLBACK(proxy_auth), NULL); | ||
533 | - } | ||
534 | - | ||
535 | - soup_uri_free(soup_proxy_uri); | ||
536 | - } | ||
537 | + no_proxy = g_getenv("no_proxy"); | ||
538 | + if (!no_proxy) | ||
539 | + no_proxy = g_getenv("NO_PROXY"); | ||
540 | + if (no_proxy) | ||
541 | + no_proxy_lst = g_strsplit(no_proxy, ",", -1); | ||
542 | + proxy_resolver = g_simple_proxy_resolver_new(proxy_uri, no_proxy_lst); | ||
543 | + g_strfreev(no_proxy_lst); | ||
544 | + soup_session_set_proxy_resolver(data->session, proxy_resolver); | ||
545 | + g_object_unref(proxy_resolver); | ||
546 | + } | ||
547 | + /* Otherwise, g_proxy_resolver_get_default() will be used */ | ||
548 | |||
549 | data->scrollbox = gtk_scrollbox_new(); | ||
550 | |||
551 | diff --git a/panel-plugin/weather.h b/panel-plugin/weather.h | ||
552 | index 208de09..01974ce 100644 | ||
553 | --- a/panel-plugin/weather.h | ||
554 | +++ b/panel-plugin/weather.h | ||
555 | @@ -183,7 +183,7 @@ extern gboolean debug_mode; | ||
556 | |||
557 | void weather_http_queue_request(SoupSession *session, | ||
558 | const gchar *uri, | ||
559 | - SoupSessionCallback callback_func, | ||
560 | + GAsyncReadyCallback callback_func, | ||
561 | gpointer user_data); | ||
562 | |||
563 | void scrollbox_set_visible(plugin_data *data); | ||
diff --git a/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0004-Report-UPower-Glib-support.patch b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0004-Report-UPower-Glib-support.patch new file mode 100644 index 0000000000..d7ee7b8135 --- /dev/null +++ b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0004-Report-UPower-Glib-support.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | From 34ac536970d2e9f3c3f8ffd691d6a8ef6f434b1a Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrzej Radecki <andrzejr@xfce.org> | ||
3 | Date: Sun, 10 Nov 2024 16:24:28 +0000 | ||
4 | Subject: [PATCH 4/5] Report UPower Glib support | ||
5 | |||
6 | Upstream-Status: Submitted [Upstream-Status: Backport [https://github.com/xfce-mirror/xfce4-weather-plugin/commit/34ac536970d2e9f3c3f8ffd691d6a8ef6f434b1a] | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | configure.ac | 1 + | ||
10 | 1 file changed, 1 insertion(+) | ||
11 | |||
12 | diff --git a/configure.ac b/configure.ac | ||
13 | index 15e8b46..da98a5e 100644 | ||
14 | --- a/configure.ac | ||
15 | +++ b/configure.ac | ||
16 | @@ -120,3 +120,4 @@ echo | ||
17 | echo "Build Configuration:" | ||
18 | echo | ||
19 | echo "* Debug Support: $enable_debug" | ||
20 | +echo "* UPower Glib Support: ${UPOWER_GLIB_FOUND:-no}" | ||
diff --git a/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0005-Make-libsoup-v3-support-optional.patch b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0005-Make-libsoup-v3-support-optional.patch new file mode 100644 index 0000000000..46042154f9 --- /dev/null +++ b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0005-Make-libsoup-v3-support-optional.patch | |||
@@ -0,0 +1,626 @@ | |||
1 | From 663c416c59ea8e063d4b5a181104f26e4bd1658c Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrzej Radecki <andrzejr@xfce.org> | ||
3 | Date: Sun, 10 Nov 2024 16:29:21 +0000 | ||
4 | Subject: [PATCH 5/5] Make libsoup v3 support optional | ||
5 | |||
6 | The plugin still targets Xfce4.16 and its contemporary is libsoup-2.4. | ||
7 | This commit is to be reverted when support for libsoup-2.4 is | ||
8 | no longer needed as all the #if's make the libsoup code less maintainable. | ||
9 | |||
10 | Upstream-Status: Submitted [Upstream-Status: Backport [https://github.com/xfce-mirror/xfce4-weather-plugin/commit/663c416c59ea8e063d4b5a181104f26e4bd1658c] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | configure.ac | 5 +- | ||
14 | panel-plugin/weather-config.c | 28 +++++++ | ||
15 | panel-plugin/weather-search.c | 32 ++++++++ | ||
16 | panel-plugin/weather-summary.c | 21 +++++ | ||
17 | panel-plugin/weather.c | 140 ++++++++++++++++++++++++++++++++- | ||
18 | panel-plugin/weather.h | 4 + | ||
19 | 6 files changed, 225 insertions(+), 5 deletions(-) | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index da98a5e..f60ad64 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -70,7 +70,9 @@ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.16.0]) | ||
26 | XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-2.0], [4.14.0]) | ||
27 | XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0]) | ||
28 | XDT_CHECK_PACKAGE([LIBXML], [libxml-2.0], [2.4.0]) | ||
29 | -XDT_CHECK_PACKAGE([SOUP], [libsoup-3.0], [3.0.0]) | ||
30 | +dnl XDT_CHECK_PACKAGE([SOUP], [libsoup-3.0], [3.0.0]) | ||
31 | +XDT_CHECK_PACKAGE([SOUP], [libsoup-3.0], [3.0.0], [], | ||
32 | + [XDT_CHECK_PACKAGE([SOUP], [libsoup-2.4], [2.42.0])]) | ||
33 | XDT_CHECK_PACKAGE([JSON], [json-c], [0.13.1]) | ||
34 | XDT_CHECK_OPTIONAL_PACKAGE([UPOWER_GLIB], [upower-glib], [0.9.0], [upower], | ||
35 | [upower for adapting update interval to power state]) | ||
36 | @@ -121,3 +123,4 @@ echo "Build Configuration:" | ||
37 | echo | ||
38 | echo "* Debug Support: $enable_debug" | ||
39 | echo "* UPower Glib Support: ${UPOWER_GLIB_FOUND:-no}" | ||
40 | +echo "* Soup Version: ${SOUP_VERSION:-no}" | ||
41 | diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c | ||
42 | index d27c825..1035ddd 100644 | ||
43 | --- a/panel-plugin/weather-config.c | ||
44 | +++ b/panel-plugin/weather-config.c | ||
45 | @@ -238,8 +238,13 @@ sanitize_location_name(const gchar *location_name) | ||
46 | |||
47 | |||
48 | static void | ||
49 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
50 | cb_lookup_altitude(GObject *source, | ||
51 | GAsyncResult *result, | ||
52 | +#else | ||
53 | +cb_lookup_altitude(SoupSession *session, | ||
54 | + SoupMessage *msg, | ||
55 | +#endif | ||
56 | gpointer user_data) | ||
57 | { | ||
58 | xfceweather_dialog *dialog = (xfceweather_dialog *) user_data; | ||
59 | @@ -247,6 +252,7 @@ cb_lookup_altitude(GObject *source, | ||
60 | gdouble alt = 0; | ||
61 | const gchar *body = NULL; | ||
62 | gsize len = 0; | ||
63 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
64 | GError *error = NULL; | ||
65 | GBytes *response = | ||
66 | soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
67 | @@ -255,6 +261,12 @@ cb_lookup_altitude(GObject *source, | ||
68 | g_error_free(error); | ||
69 | else | ||
70 | body = g_bytes_get_data(response, &len); | ||
71 | +#else | ||
72 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
73 | + body = msg->response_body->data; | ||
74 | + len = msg->response_body->length; | ||
75 | + } | ||
76 | +#endif | ||
77 | |||
78 | if (global_dialog == NULL) { | ||
79 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
80 | @@ -274,19 +286,27 @@ cb_lookup_altitude(GObject *source, | ||
81 | else if (dialog->pd->units->altitude == FEET) | ||
82 | alt /= 0.3048; | ||
83 | gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->spin_alt), alt); | ||
84 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
85 | g_bytes_unref(response); | ||
86 | +#endif | ||
87 | } | ||
88 | |||
89 | |||
90 | static void | ||
91 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
92 | cb_lookup_timezone(GObject *source, | ||
93 | GAsyncResult *result, | ||
94 | +#else | ||
95 | +cb_lookup_timezone(SoupSession *session, | ||
96 | + SoupMessage *msg, | ||
97 | +#endif | ||
98 | gpointer user_data) | ||
99 | { | ||
100 | xfceweather_dialog *dialog = (xfceweather_dialog *) user_data; | ||
101 | xml_timezone *xml_tz; | ||
102 | const gchar *body = NULL; | ||
103 | gsize len = 0; | ||
104 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
105 | GError *error = NULL; | ||
106 | GBytes *response = | ||
107 | soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
108 | @@ -295,6 +315,12 @@ cb_lookup_timezone(GObject *source, | ||
109 | g_error_free(error); | ||
110 | else | ||
111 | body = g_bytes_get_data(response, &len); | ||
112 | +#else | ||
113 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
114 | + body = msg->response_body->data; | ||
115 | + len = msg->response_body->length; | ||
116 | + } | ||
117 | +#endif | ||
118 | |||
119 | if (global_dialog == NULL) { | ||
120 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
121 | @@ -311,7 +337,9 @@ cb_lookup_timezone(GObject *source, | ||
122 | xml_timezone_free(xml_tz); | ||
123 | } else | ||
124 | gtk_entry_set_text(GTK_ENTRY(dialog->text_timezone), ""); | ||
125 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
126 | g_bytes_unref(response); | ||
127 | +#endif | ||
128 | } | ||
129 | |||
130 | |||
131 | diff --git a/panel-plugin/weather-search.c b/panel-plugin/weather-search.c | ||
132 | index e030ff8..b07627e 100644 | ||
133 | --- a/panel-plugin/weather-search.c | ||
134 | +++ b/panel-plugin/weather-search.c | ||
135 | @@ -78,8 +78,13 @@ sanitize_str(const gchar *str) | ||
136 | |||
137 | |||
138 | static void | ||
139 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
140 | cb_searchdone(GObject *source, | ||
141 | GAsyncResult *result, | ||
142 | +#else | ||
143 | +cb_searchdone(SoupSession *session, | ||
144 | + SoupMessage *msg, | ||
145 | +#endif | ||
146 | gpointer user_data) | ||
147 | { | ||
148 | search_dialog *dialog = (search_dialog *) user_data; | ||
149 | @@ -91,6 +96,7 @@ cb_searchdone(GObject *source, | ||
150 | GtkTreeSelection *selection; | ||
151 | const gchar *body = NULL; | ||
152 | gsize len = 0; | ||
153 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
154 | GError *error = NULL; | ||
155 | GBytes *response = | ||
156 | soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
157 | @@ -99,6 +105,12 @@ cb_searchdone(GObject *source, | ||
158 | g_error_free(error); | ||
159 | else | ||
160 | body = g_bytes_get_data(response, &len); | ||
161 | +#else | ||
162 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
163 | + body = msg->response_body->data; | ||
164 | + len = msg->response_body->length; | ||
165 | + } | ||
166 | +#endif | ||
167 | |||
168 | if (global_dialog == NULL) { | ||
169 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
170 | @@ -109,7 +121,9 @@ cb_searchdone(GObject *source, | ||
171 | |||
172 | doc = get_xml_document(body, len); | ||
173 | if (!doc) { | ||
174 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
175 | g_bytes_unref(response); | ||
176 | +#endif | ||
177 | return; | ||
178 | } | ||
179 | |||
180 | @@ -145,7 +159,9 @@ cb_searchdone(GObject *source, | ||
181 | } | ||
182 | |||
183 | gtk_tree_view_column_set_title(dialog->column, _("Results")); | ||
184 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
185 | g_bytes_unref(response); | ||
186 | +#endif | ||
187 | } | ||
188 | |||
189 | |||
190 | @@ -390,8 +406,13 @@ get_preferred_units(const gchar *country_code) | ||
191 | |||
192 | |||
193 | static void | ||
194 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
195 | cb_geolocation(GObject *source, | ||
196 | GAsyncResult *result, | ||
197 | +#else | ||
198 | +cb_geolocation(SoupSession *session, | ||
199 | + SoupMessage *msg, | ||
200 | +#endif | ||
201 | gpointer user_data) | ||
202 | { | ||
203 | geolocation_data *data = (geolocation_data *) user_data; | ||
204 | @@ -400,6 +421,7 @@ cb_geolocation(GObject *source, | ||
205 | units_config *units; | ||
206 | const gchar *body = NULL; | ||
207 | gsize len = 0; | ||
208 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
209 | GError *error = NULL; | ||
210 | GBytes *response = | ||
211 | soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
212 | @@ -408,6 +430,12 @@ cb_geolocation(GObject *source, | ||
213 | g_error_free(error); | ||
214 | else | ||
215 | body = g_bytes_get_data(response, &len); | ||
216 | +#else | ||
217 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
218 | + body = msg->response_body->data; | ||
219 | + len = msg->response_body->length; | ||
220 | + } | ||
221 | +#endif | ||
222 | |||
223 | if (global_dialog == NULL) { | ||
224 | weather_debug("%s called after dialog was destroyed", G_STRFUNC); | ||
225 | @@ -420,7 +448,9 @@ cb_geolocation(GObject *source, | ||
226 | |||
227 | if (!geo) { | ||
228 | data->cb(NULL, NULL, NULL, NULL, data->user_data); | ||
229 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
230 | g_bytes_unref(response); | ||
231 | +#endif | ||
232 | g_free(data); | ||
233 | return; | ||
234 | } | ||
235 | @@ -451,7 +481,9 @@ cb_geolocation(GObject *source, | ||
236 | g_slice_free(units_config, units); | ||
237 | xml_geolocation_free(geo); | ||
238 | g_free(full_loc); | ||
239 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
240 | g_bytes_unref(response); | ||
241 | +#endif | ||
242 | g_free(data); | ||
243 | } | ||
244 | |||
245 | diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c | ||
246 | index 224bb34..8e79b0a 100644 | ||
247 | --- a/panel-plugin/weather-summary.c | ||
248 | +++ b/panel-plugin/weather-summary.c | ||
249 | @@ -234,10 +234,16 @@ get_logo_path(void) | ||
250 | |||
251 | |||
252 | static void | ||
253 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
254 | logo_fetched(GObject *source, | ||
255 | GAsyncResult *result, | ||
256 | +#else | ||
257 | +logo_fetched(SoupSession *session, | ||
258 | + SoupMessage *msg, | ||
259 | +#endif | ||
260 | gpointer user_data) | ||
261 | { | ||
262 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
263 | GError *error = NULL; | ||
264 | GBytes *response = | ||
265 | soup_session_send_and_read_finish(SOUP_SESSION(source), result, &error); | ||
266 | @@ -251,12 +257,23 @@ logo_fetched(GObject *source, | ||
267 | g_file_set_contents(path, body, len, &error); | ||
268 | g_bytes_unref(response); | ||
269 | if (error) { | ||
270 | +#else | ||
271 | + if (msg && msg->response_body && msg->response_body->length > 0) { | ||
272 | + gchar *path = get_logo_path(); | ||
273 | + GError *error = NULL; | ||
274 | + GdkPixbuf *pixbuf = NULL; | ||
275 | + gint scale_factor; | ||
276 | + if (!g_file_set_contents(path, msg->response_body->data, | ||
277 | + msg->response_body->length, &error)) { | ||
278 | +#endif | ||
279 | g_warning("Error downloading met.no logo image to %s, " | ||
280 | "reason: %s\n", path, | ||
281 | error ? error->message : "unknown"); | ||
282 | g_error_free(error); | ||
283 | g_free(path); | ||
284 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
285 | g_bytes_unref(response); | ||
286 | +#endif | ||
287 | return; | ||
288 | } | ||
289 | scale_factor = gtk_widget_get_scale_factor(user_data); | ||
290 | @@ -268,9 +285,13 @@ logo_fetched(GObject *source, | ||
291 | cairo_surface_destroy(surface); | ||
292 | g_object_unref(pixbuf); | ||
293 | } | ||
294 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
295 | g_bytes_unref(response); | ||
296 | } else | ||
297 | g_error_free(error); | ||
298 | +#else | ||
299 | + } | ||
300 | +#endif | ||
301 | } | ||
302 | |||
303 | |||
304 | diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c | ||
305 | index 1a84537..db123fa 100644 | ||
306 | --- a/panel-plugin/weather.c | ||
307 | +++ b/panel-plugin/weather.c | ||
308 | @@ -108,14 +108,22 @@ static void schedule_next_wakeup(plugin_data *data); | ||
309 | void | ||
310 | weather_http_queue_request(SoupSession *session, | ||
311 | const gchar *uri, | ||
312 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
313 | GAsyncReadyCallback callback_func, | ||
314 | +#else | ||
315 | + SoupSessionCallback callback_func, | ||
316 | +#endif | ||
317 | gpointer user_data) | ||
318 | { | ||
319 | SoupMessage *msg; | ||
320 | |||
321 | msg = soup_message_new("GET", uri); | ||
322 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
323 | soup_session_send_and_read_async(session, msg, G_PRIORITY_DEFAULT, NULL, | ||
324 | callback_func, user_data); | ||
325 | +#else | ||
326 | + soup_session_queue_message(session, msg, callback_func, user_data); | ||
327 | +#endif | ||
328 | } | ||
329 | |||
330 | |||
331 | @@ -484,8 +492,13 @@ calc_next_download_time(const update_info *upi, | ||
332 | * Process downloaded sun astro data and schedule next astro update. | ||
333 | */ | ||
334 | static void | ||
335 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
336 | cb_astro_update_sun(GObject *source, | ||
337 | GAsyncResult *result, | ||
338 | +#else | ||
339 | +cb_astro_update_sun(SoupSession *session, | ||
340 | + SoupMessage *msg, | ||
341 | +#endif | ||
342 | gpointer user_data) | ||
343 | { | ||
344 | plugin_data *data = user_data; | ||
345 | @@ -494,6 +507,7 @@ cb_astro_update_sun(GObject *source, | ||
346 | guint astro_forecast_days; | ||
347 | const gchar *body = NULL; | ||
348 | gsize len = 0; | ||
349 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
350 | SoupMessage *msg; | ||
351 | GError *error = NULL; | ||
352 | GBytes *response; | ||
353 | @@ -505,6 +519,15 @@ cb_astro_update_sun(GObject *source, | ||
354 | result, &error); | ||
355 | if (G_LIKELY(error == NULL)) { | ||
356 | body = g_bytes_get_data(response, &len); | ||
357 | +#else | ||
358 | + data->msg_parse->sun_msg_processed++; | ||
359 | + data->astro_update->http_status_code = msg->status_code; | ||
360 | + if ((msg->status_code == 200 || msg->status_code == 203)) { | ||
361 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
362 | + body = msg->response_body->data; | ||
363 | + len = msg->response_body->length; | ||
364 | + } | ||
365 | +#endif | ||
366 | json_tree = get_json_tree(body, len); | ||
367 | if (G_LIKELY(json_tree)) { | ||
368 | if (!parse_astrodata_sun(json_tree, data->astrodata)) { | ||
369 | @@ -520,12 +543,19 @@ cb_astro_update_sun(GObject *source, | ||
370 | g_warning("Error parsing sun astronomical data!"); | ||
371 | weather_debug("No json_tree"); | ||
372 | } | ||
373 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
374 | g_bytes_unref(response); | ||
375 | - } else { | ||
376 | +#endif | ||
377 | + } else { | ||
378 | data->msg_parse->http_msg_fail = TRUE; | ||
379 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
380 | g_warning_once("Download of sun astronomical data failed: %s", | ||
381 | error->message); | ||
382 | g_error_free(error); | ||
383 | +#else | ||
384 | + g_warning_once("Download of sun astronomical data failed with HTTP Status Code %d, Reason phrase: %s", | ||
385 | + msg->status_code, msg->reason_phrase); | ||
386 | +#endif | ||
387 | } | ||
388 | |||
389 | astro_forecast_days = data->forecast_days + 1; | ||
390 | @@ -551,8 +581,13 @@ cb_astro_update_sun(GObject *source, | ||
391 | * Process downloaded moon astro data and schedule next astro update. | ||
392 | */ | ||
393 | static void | ||
394 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
395 | cb_astro_update_moon(GObject *source, | ||
396 | GAsyncResult *result, | ||
397 | +#else | ||
398 | +cb_astro_update_moon(SoupSession *session, | ||
399 | + SoupMessage *msg, | ||
400 | +#endif | ||
401 | gpointer user_data) | ||
402 | { | ||
403 | plugin_data *data = user_data; | ||
404 | @@ -561,6 +596,7 @@ cb_astro_update_moon(GObject *source, | ||
405 | guint astro_forecast_days; | ||
406 | const gchar *body = NULL; | ||
407 | gsize len = 0; | ||
408 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
409 | SoupMessage *msg; | ||
410 | GError *error = NULL; | ||
411 | GBytes *response; | ||
412 | @@ -572,6 +608,15 @@ cb_astro_update_moon(GObject *source, | ||
413 | data->astro_update->http_status_code = soup_message_get_status(msg); | ||
414 | if (G_LIKELY(error == NULL)) { | ||
415 | body = g_bytes_get_data(response, &len); | ||
416 | +#else | ||
417 | + data->msg_parse->moon_msg_processed++; | ||
418 | + data->astro_update->http_status_code = msg->status_code; | ||
419 | + if ((msg->status_code == 200 || msg->status_code == 203)) { | ||
420 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
421 | + body = msg->response_body->data; | ||
422 | + len = msg->response_body->length; | ||
423 | + } | ||
424 | +#endif | ||
425 | json_tree = get_json_tree(body, len); | ||
426 | if (G_LIKELY(json_tree)) { | ||
427 | if (!parse_astrodata_moon(json_tree, data->astrodata)) { | ||
428 | @@ -587,13 +632,20 @@ cb_astro_update_moon(GObject *source, | ||
429 | g_warning("Error parsing moon astronomical data"); | ||
430 | weather_debug("No json_tree"); | ||
431 | } | ||
432 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
433 | g_bytes_unref(response); | ||
434 | - } else { | ||
435 | +#endif | ||
436 | + } else { | ||
437 | data->msg_parse->http_msg_fail = TRUE; | ||
438 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
439 | g_warning_once("Download of moon astronomical data failed: %s", | ||
440 | error->message); | ||
441 | g_error_free(error); | ||
442 | - } | ||
443 | +#else | ||
444 | + g_warning_once("Download of moon astronomical data failed with HTTP Status Code %d, Reason phrase: %s", | ||
445 | + msg->status_code, msg->reason_phrase); | ||
446 | +#endif | ||
447 | + } | ||
448 | |||
449 | astro_forecast_days = data->forecast_days + 1; | ||
450 | if (data->msg_parse->sun_msg_processed == astro_forecast_days && data->msg_parse->moon_msg_processed == astro_forecast_days) { | ||
451 | @@ -626,8 +678,13 @@ cb_astro_update_moon(GObject *source, | ||
452 | * Process downloaded weather data and schedule next weather update. | ||
453 | */ | ||
454 | static void | ||
455 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
456 | cb_weather_update(GObject *source, | ||
457 | GAsyncResult *result, | ||
458 | +#else | ||
459 | +cb_weather_update(SoupSession *session, | ||
460 | + SoupMessage *msg, | ||
461 | +#endif | ||
462 | gpointer user_data) | ||
463 | { | ||
464 | plugin_data *data = user_data; | ||
465 | @@ -637,6 +694,7 @@ cb_weather_update(GObject *source, | ||
466 | gboolean parsing_error = TRUE; | ||
467 | const gchar *body = NULL; | ||
468 | gsize len = 0; | ||
469 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
470 | SoupMessage *msg; | ||
471 | GError *error = NULL; | ||
472 | GBytes *response = NULL; | ||
473 | @@ -650,6 +708,17 @@ cb_weather_update(GObject *source, | ||
474 | data->weather_update->http_status_code = soup_message_get_status(msg); | ||
475 | if (G_LIKELY(error == NULL)) { | ||
476 | body = g_bytes_get_data(response, &len); | ||
477 | +#else | ||
478 | + weather_debug("Processing downloaded weather data."); | ||
479 | + time(&now_t); | ||
480 | + data->weather_update->attempt++; | ||
481 | + data->weather_update->http_status_code = msg->status_code; | ||
482 | + if (msg->status_code == 200 || msg->status_code == 203) { | ||
483 | + if (G_LIKELY(msg->response_body && msg->response_body->data)) { | ||
484 | + body = msg->response_body->data; | ||
485 | + len = msg->response_body->length; | ||
486 | + } | ||
487 | +#endif | ||
488 | doc = get_xml_document(body, len); | ||
489 | if (G_LIKELY(doc)) { | ||
490 | root_node = xmlDocGetRootElement(doc); | ||
491 | @@ -661,14 +730,22 @@ cb_weather_update(GObject *source, | ||
492 | } | ||
493 | xmlFreeDoc(doc); | ||
494 | } | ||
495 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
496 | g_bytes_unref(response); | ||
497 | +#endif | ||
498 | if (parsing_error) | ||
499 | g_warning("Error parsing weather data!"); | ||
500 | } else { | ||
501 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
502 | weather_debug("Download of weather data failed: %s", error->message); | ||
503 | g_error_free(error); | ||
504 | +#else | ||
505 | + weather_debug | ||
506 | + ("Download of weather data failed with HTTP Status Code %d, " | ||
507 | + "Reason phrase: %s", msg->status_code, msg->reason_phrase); | ||
508 | +#endif | ||
509 | } | ||
510 | - data->weather_update->next = calc_next_download_time(data->weather_update, | ||
511 | + data->weather_update->next = calc_next_download_time(data->weather_update, | ||
512 | now_t); | ||
513 | |||
514 | xml_weather_clean(data->weatherdata); | ||
515 | @@ -1725,6 +1802,33 @@ mi_click(GtkWidget *widget, | ||
516 | update_weatherdata_with_reset(data); | ||
517 | } | ||
518 | |||
519 | +#if !SOUP_CHECK_VERSION(3, 0, 0) | ||
520 | +static void | ||
521 | +proxy_auth(SoupSession *session, | ||
522 | + SoupMessage *msg, | ||
523 | + SoupAuth *auth, | ||
524 | + gboolean retrying, | ||
525 | + gpointer user_data) | ||
526 | +{ | ||
527 | + SoupURI *soup_proxy_uri; | ||
528 | + const gchar *proxy_uri; | ||
529 | + | ||
530 | + if (!retrying) { | ||
531 | + if (msg->status_code == SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED) { | ||
532 | + proxy_uri = g_getenv("HTTP_PROXY"); | ||
533 | + if (!proxy_uri) | ||
534 | + proxy_uri = g_getenv("http_proxy"); | ||
535 | + if (proxy_uri) { | ||
536 | + soup_proxy_uri = soup_uri_new(proxy_uri); | ||
537 | + soup_auth_authenticate(auth, | ||
538 | + soup_uri_get_user(soup_proxy_uri), | ||
539 | + soup_uri_get_password(soup_proxy_uri)); | ||
540 | + soup_uri_free(soup_proxy_uri); | ||
541 | + } | ||
542 | + } | ||
543 | + } | ||
544 | +} | ||
545 | +#endif | ||
546 | |||
547 | #ifdef HAVE_UPOWER_GLIB | ||
548 | static void | ||
549 | @@ -2028,10 +2132,18 @@ static plugin_data * | ||
550 | xfceweather_create_control(XfcePanelPlugin *plugin) | ||
551 | { | ||
552 | plugin_data *data = g_slice_new0(plugin_data); | ||
553 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
554 | GProxyResolver *proxy_resolver; | ||
555 | +#else | ||
556 | + SoupURI *soup_proxy_uri; | ||
557 | +#endif | ||
558 | const gchar *proxy_uri; | ||
559 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
560 | const gchar *no_proxy; | ||
561 | gchar **no_proxy_lst = NULL; | ||
562 | +#else | ||
563 | + const gchar *proxy_user; | ||
564 | +#endif | ||
565 | GtkWidget *refresh; | ||
566 | cairo_surface_t *icon = NULL; | ||
567 | data_types lbl; | ||
568 | @@ -2069,15 +2181,23 @@ xfceweather_create_control(XfcePanelPlugin *plugin) | ||
569 | |||
570 | /* Setup session for HTTP connections */ | ||
571 | data->session = soup_session_new(); | ||
572 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
573 | soup_session_set_user_agent(data->session, | ||
574 | PACKAGE_NAME "-" PACKAGE_VERSION); | ||
575 | soup_session_set_timeout(data->session, CONN_TIMEOUT); | ||
576 | +#else | ||
577 | + g_object_set(data->session, SOUP_SESSION_USER_AGENT, | ||
578 | + PACKAGE_NAME "-" PACKAGE_VERSION, NULL); | ||
579 | + g_object_set(data->session, SOUP_SESSION_TIMEOUT, | ||
580 | + CONN_TIMEOUT, NULL); | ||
581 | +#endif | ||
582 | |||
583 | /* Set the proxy URI from environment */ | ||
584 | proxy_uri = g_getenv("HTTP_PROXY"); | ||
585 | if (!proxy_uri) | ||
586 | proxy_uri = g_getenv("http_proxy"); | ||
587 | if (proxy_uri) { | ||
588 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
589 | no_proxy = g_getenv("no_proxy"); | ||
590 | if (!no_proxy) | ||
591 | no_proxy = g_getenv("NO_PROXY"); | ||
592 | @@ -2087,6 +2207,18 @@ xfceweather_create_control(XfcePanelPlugin *plugin) | ||
593 | g_strfreev(no_proxy_lst); | ||
594 | soup_session_set_proxy_resolver(data->session, proxy_resolver); | ||
595 | g_object_unref(proxy_resolver); | ||
596 | +#else | ||
597 | + soup_proxy_uri = soup_uri_new(proxy_uri); | ||
598 | + g_object_set(data->session, SOUP_SESSION_PROXY_URI, | ||
599 | + soup_proxy_uri, NULL); | ||
600 | + /* check if uri contains authentication info */ | ||
601 | + proxy_user = soup_uri_get_user(soup_proxy_uri); | ||
602 | + if (proxy_user && strlen(proxy_user) > 0) { | ||
603 | + g_signal_connect(G_OBJECT(data->session), "authenticate", | ||
604 | + G_CALLBACK(proxy_auth), NULL); | ||
605 | + } | ||
606 | + soup_uri_free(soup_proxy_uri); | ||
607 | +#endif | ||
608 | } | ||
609 | /* Otherwise, g_proxy_resolver_get_default() will be used */ | ||
610 | |||
611 | diff --git a/panel-plugin/weather.h b/panel-plugin/weather.h | ||
612 | index 01974ce..87a6157 100644 | ||
613 | --- a/panel-plugin/weather.h | ||
614 | +++ b/panel-plugin/weather.h | ||
615 | @@ -183,7 +183,11 @@ extern gboolean debug_mode; | ||
616 | |||
617 | void weather_http_queue_request(SoupSession *session, | ||
618 | const gchar *uri, | ||
619 | +#if SOUP_CHECK_VERSION(3, 0, 0) | ||
620 | GAsyncReadyCallback callback_func, | ||
621 | +#else | ||
622 | + SoupSessionCallback callback_func, | ||
623 | +#endif | ||
624 | gpointer user_data); | ||
625 | |||
626 | void scrollbox_set_visible(plugin_data *data); | ||
diff --git a/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.1.bb b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.1.bb deleted file mode 100644 index 858bd5459b..0000000000 --- a/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.1.bb +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | SUMMARY = "Panel plugin to display current temperature and weather condition" | ||
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin" | ||
3 | LICENSE = "GPL-2.0-only" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
5 | |||
6 | inherit xfce-panel-plugin | ||
7 | |||
8 | DEPENDS += "libsoup-2.4 dbus-glib upower" | ||
9 | |||
10 | SRC_URI[sha256sum] = "a45146f9a0dcdc95d191c09c64ad279ae289cf8f811c4433e08e31a656845239" | ||
11 | |||
12 | FILES:${PN} += "${datadir}/xfce4/weather" | ||
diff --git a/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.3.bb b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.3.bb new file mode 100644 index 0000000000..c0c2ad3313 --- /dev/null +++ b/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin_0.11.3.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "Panel plugin to display current temperature and weather condition" | ||
2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-weather-plugin/start" | ||
3 | LICENSE = "GPL-2.0-only" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
5 | |||
6 | inherit xfce-panel-plugin | ||
7 | |||
8 | DEPENDS += "libsoup dbus-glib upower json-c" | ||
9 | |||
10 | SRC_URI += "file://0001-libxfce4ui-Avoid-deprecated-functions.patch \ | ||
11 | file://0002-parsers-Generalise-input-to-array-of-gchar.patch \ | ||
12 | file://0003-libsoup-Port-to-libsoup-3.0.patch \ | ||
13 | file://0004-Report-UPower-Glib-support.patch \ | ||
14 | file://0005-Make-libsoup-v3-support-optional.patch \ | ||
15 | " | ||
16 | SRC_URI[sha256sum] = "002d1fe63906d2f3a012f3cb58cceff1dfbcc466759e36c76d3b03dd01c0dc57" | ||
17 | |||
18 | FILES:${PN} += "${datadir}/xfce4/weather" | ||
diff --git a/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.2.bb b/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.2.bb index 3d935a3d71..0e482af353 100644 --- a/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.2.bb +++ b/meta-xfce/recipes-panel-plugins/xkb/xfce4-xkb-plugin_0.8.2.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | SUMMARY = "XKB layout switching panel plug-in for the Xfce desktop environment" | 1 | SUMMARY = "XKB layout switching panel plug-in for the Xfce desktop environment" |
2 | HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-xkb-plugin" | 2 | HOMEPAGE = "https://docs.xfce.org/panel-plugins/xfce4-xkb-plugin/start" |
3 | SECTION = "x11/application" | 3 | SECTION = "x11/application" |
4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=496f09f084b0f7e6f02f769a84490c6b" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=496f09f084b0f7e6f02f769a84490c6b" |