blob: eabf61aa5fc84fab58a42ad80b38024b39be398d [file] [log] [blame]
Andrew Geissler4b7c1152020-11-30 19:55:29 -06001From 8be361b6ce8f0f8053e1609decbdbdc164ec8448 Mon Sep 17 00:00:00 2001
2From: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
3Date: Sat, 5 Sep 2020 02:06:34 +0200
4Subject: [PATCH] project: Switch to libhandy-1
5
6This commit updates the dependencies for libhandy to the tagged 1.0
7release and changes the code to accomodate the changes from
8libhandy-0 to libhandy-1.
9
10Notable changes:
11edit-dialog: HdyDialog has been dropped in [1]
12alarm-row: action child type in HdyActionRow has been removed.
13
14[1] https://gitlab.gnome.org/GNOME/libhandy/-/merge_requests/434
15Upstream-Status: Backport
16Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
17---
18 build-aux/flatpak/org.gnome.Calendar.json | 4 ++--
19 meson.build | 2 +-
20 src/gui/gcal-alarm-row.c | 2 +-
21 src/gui/gcal-alarm-row.ui | 2 +-
22 src/gui/gcal-application.c | 4 ++++
23 src/gui/gcal-edit-dialog.c | 4 ++--
24 src/gui/gcal-edit-dialog.h | 3 +--
25 src/gui/gcal-edit-dialog.ui | 20 ++++++++++----------
26 8 files changed, 22 insertions(+), 19 deletions(-)
27
28diff --git a/build-aux/flatpak/org.gnome.Calendar.json b/build-aux/flatpak/org.gnome.Calendar.json
29index 18893ad6..0772ca8d 100644
30--- a/build-aux/flatpak/org.gnome.Calendar.json
31+++ b/build-aux/flatpak/org.gnome.Calendar.json
32@@ -174,8 +174,8 @@
33 "sources" : [
34 {
35 "type" : "git",
36- "url" : "https://source.puri.sm/Librem5/libhandy.git",
37- "branch" : "libhandy-0-0"
38+ "url" : "https://gitlab.gnome.org/GNOME/libhandy.git",
39+ "tag" : "1.0.0"
40 }
41 ]
42 },
43diff --git a/meson.build b/meson.build
44index 2a546252..b81b95c9 100644
45--- a/meson.build
46+++ b/meson.build
47@@ -165,7 +165,7 @@ libedataserver_dep = dependency('libedataserver-1.2', version: '>= 3.17.1')
48 libecal_dep = dependency('libecal-2.0', version: '>= 3.33.2')
49 libsoup_dep = dependency('libsoup-2.4')
50 libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.33.1')
51-libhandy_dep = dependency('libhandy-0.0', version: '>= 0.0.9')
52+libhandy_dep = dependency('libhandy-1', version: '>= 1.0.0')
53 glib_dep = dependency('glib-2.0', version: '>= 2.58.0')
54 gtk_dep = dependency('gtk+-3.0', version: '>= 3.22.20')
55 gio_dep = dependency('gio-2.0', version: '>= 2.58.0')
56diff --git a/src/gui/gcal-alarm-row.c b/src/gui/gcal-alarm-row.c
57index 1f95426c..1ada82f4 100644
58--- a/src/gui/gcal-alarm-row.c
59+++ b/src/gui/gcal-alarm-row.c
60@@ -214,7 +214,7 @@ setup_alarm (GcalAlarmRow *self)
61 duration = e_cal_component_alarm_trigger_get_duration (trigger);
62 formatted_duration = format_alarm_duration (duration);
63
64- hdy_action_row_set_title (HDY_ACTION_ROW (self), formatted_duration);
65+ hdy_preferences_row_set_title (HDY_PREFERENCES_ROW (self), formatted_duration);
66
67 action = e_cal_component_alarm_get_action (self->alarm);
68 gtk_toggle_button_set_active (self->volume_button, action == E_CAL_COMPONENT_ALARM_AUDIO);
69diff --git a/src/gui/gcal-alarm-row.ui b/src/gui/gcal-alarm-row.ui
70index 7d416c4c..bca8af50 100644
71--- a/src/gui/gcal-alarm-row.ui
72+++ b/src/gui/gcal-alarm-row.ui
73@@ -3,7 +3,7 @@
74 <template class="GcalAlarmRow" parent="HdyActionRow">
75 <property name="visible">True</property>
76 <property name="can_focus">False</property>
77- <child type="action">
78+ <child>
79 <object class="GtkBox">
80 <property name="visible">True</property>
81 <property name="can_focus">False</property>
82diff --git a/src/gui/gcal-application.c b/src/gui/gcal-application.c
83index b9d46cec..591b95c8 100644
84--- a/src/gui/gcal-application.c
85+++ b/src/gui/gcal-application.c
86@@ -34,6 +34,7 @@
87 #include <glib-object.h>
88 #include <gio/gio.h>
89 #include <glib/gi18n.h>
90+#include <handy.h>
91
92 struct _GcalApplication
93 {
94@@ -446,6 +447,9 @@ gcal_application_startup (GApplication *app)
95 if ((g_application_get_flags (app) & G_APPLICATION_IS_SERVICE) != 0)
96 g_application_set_inactivity_timeout (app, 3 * 60 * 1000);
97
98+ /* initialize libhandy */
99+ hdy_init();
100+
101 GCAL_EXIT;
102 }
103
104diff --git a/src/gui/gcal-edit-dialog.c b/src/gui/gcal-edit-dialog.c
105index ae2b6714..5494a700 100644
106--- a/src/gui/gcal-edit-dialog.c
107+++ b/src/gui/gcal-edit-dialog.c
108@@ -47,7 +47,7 @@
109
110 struct _GcalEditDialog
111 {
112- HdyDialog parent;
113+ GtkDialog parent;
114
115 gboolean writable;
116
117@@ -133,7 +133,7 @@ static void on_location_entry_changed_cb (GtkEntry
118 static void on_add_alarm_button_clicked_cb (GtkWidget *button,
119 GcalEditDialog *self);
120
121-G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, HDY_TYPE_DIALOG)
122+G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, GTK_TYPE_DIALOG)
123
124 enum
125 {
126diff --git a/src/gui/gcal-edit-dialog.h b/src/gui/gcal-edit-dialog.h
127index e4f44ec5..a557916b 100644
128--- a/src/gui/gcal-edit-dialog.h
129+++ b/src/gui/gcal-edit-dialog.h
130@@ -22,7 +22,6 @@
131 #include "gcal-event.h"
132 #include "gcal-manager.h"
133
134-#include <handy.h>
135
136 G_BEGIN_DECLS
137
138@@ -32,7 +31,7 @@ G_BEGIN_DECLS
139
140 #define GCAL_TYPE_EDIT_DIALOG (gcal_edit_dialog_get_type ())
141
142-G_DECLARE_FINAL_TYPE (GcalEditDialog, gcal_edit_dialog, GCAL, EDIT_DIALOG, HdyDialog);
143+G_DECLARE_FINAL_TYPE (GcalEditDialog, gcal_edit_dialog, GCAL, EDIT_DIALOG, GtkDialog);
144
145 GtkWidget* gcal_edit_dialog_new (void);
146
147diff --git a/src/gui/gcal-edit-dialog.ui b/src/gui/gcal-edit-dialog.ui
148index a36d8ae6..c28c22bb 100644
149--- a/src/gui/gcal-edit-dialog.ui
150+++ b/src/gui/gcal-edit-dialog.ui
151@@ -1,6 +1,6 @@
152 <?xml version="1.0" encoding="UTF-8"?>
153 <interface>
154- <template class="GcalEditDialog" parent="HdyDialog">
155+ <template class="GcalEditDialog" parent="GtkDialog">
156 <property name="can_focus">False</property>
157 <property name="resizable">False</property>
158 <property name="modal">True</property>
159@@ -156,7 +156,7 @@
160 <property name="title" translatable="yes">Title</property>
161 <property name="activatable-widget">summary_entry</property>
162
163- <child type="action">
164+ <child>
165 <object class="GtkEntry" id="summary_entry">
166 <property name="visible">True</property>
167 <property name="valign">center</property>
168@@ -177,7 +177,7 @@
169 <property name="title" translatable="yes">Location</property>
170 <property name="activatable-widget">location_entry</property>
171
172- <child type="action">
173+ <child>
174 <object class="GtkEntry" id="location_entry">
175 <property name="visible">True</property>
176 <property name="valign">center</property>
177@@ -226,7 +226,7 @@
178 <property name="title" translatable="yes">All Day</property>
179 <property name="activatable-widget">all_day_switch</property>
180
181- <child type="action">
182+ <child>
183 <object class="GtkSwitch" id="all_day_switch">
184 <property name="visible">True</property>
185 <property name="can_focus">True</property>
186@@ -246,7 +246,7 @@
187 <property name="visible">True</property>
188 <property name="title" translatable="yes">Starts</property>
189
190- <child type="action">
191+ <child>
192 <object class="GtkLabel" id="event_start_label">
193 <property name="visible">True</property>
194 <property name="can_focus">False</property>
195@@ -294,7 +294,7 @@
196 <property name="visible">True</property>
197 <property name="title" translatable="yes">Ends</property>
198
199- <child type="action">
200+ <child>
201 <object class="GtkLabel" id="event_end_label">
202 <property name="visible">True</property>
203 <property name="can_focus">False</property>
204@@ -343,7 +343,7 @@
205 <property name="title" translatable="yes">Repeat</property>
206 <property name="activatable-widget">repeat_combo</property>
207
208- <child type="action">
209+ <child>
210 <object class="GtkComboBoxText" id="repeat_combo">
211 <property name="visible">True</property>
212 <property name="can_focus">False</property>
213@@ -372,7 +372,7 @@
214 <property name="title" translatable="yes">End Repeat</property>
215 <property name="activatable-widget">repeat_combo</property>
216
217- <child type="action">
218+ <child>
219 <object class="GtkComboBoxText" id="repeat_duration_combo">
220 <property name="visible">True</property>
221 <property name="can_focus">False</property>
222@@ -397,7 +397,7 @@
223 <property name="title" translatable="yes">Number of Occurrences</property>
224 <property name="activatable-widget">number_of_occurrences_spin</property>
225
226- <child type="action">
227+ <child>
228 <object class = "GtkSpinButton" id="number_of_occurrences_spin">
229 <property name="input_purpose">number</property>
230 <property name="input-hints">no-emoji</property>
231@@ -415,7 +415,7 @@
232 <property name="title" translatable="yes">End Repeat Date</property>
233 <property name="activatable-widget">until_date_selector</property>
234
235- <child type="action">
236+ <child>
237 <object class = "GcalDateSelector" id="until_date_selector">
238 <property name="valign">center</property>
239 </object>
240--
241GitLab
242