8be361b6ce8f0f8053e1609decbdbdc164ec8448.patch 10 KB

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