summaryrefslogtreecommitdiffstats
path: root/meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0001-libxfce4ui-Avoid-deprecated-functions.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0001-libxfce4ui-Avoid-deprecated-functions.patch')
-rw-r--r--meta-xfce/recipes-panel-plugins/weather/xfce4-weather-plugin/0001-libxfce4ui-Avoid-deprecated-functions.patch79
1 files changed, 79 insertions, 0 deletions
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 @@
1From 9a3fc89f924f7a322c3b537256621640561daf95 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
3 <congdanhqx@gmail.com>
4Date: Fri, 1 Mar 2024 21:56:34 +0700
5Subject: [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
13Upstream-Status: Backport [https://github.com/xfce-mirror/xfce4-weather-plugin/commit/9115037ed7cfe722d3739ca800d5247f4bb3bc53]
14Signed-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
21diff --git a/configure.ac b/configure.ac
22index 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])
34diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
35index 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
49diff --git a/panel-plugin/weather-search.c b/panel-plugin/weather-search.c
50index 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");