project: Switch to libhandy-1

This commit updates the dependencies for libhandy to the tagged 1.0
release and changes the code to accomodate the changes from
libhandy-0 to libhandy-1.

Notable changes:
edit-dialog: HdyDialog has been dropped in [1]
alarm-row: action child type in HdyActionRow has been removed.

[1] https://gitlab.gnome.org/GNOME/libhandy/-/merge_requests/434
This commit is contained in:
Evangelos Ribeiro Tzaras
2020-09-16 15:24:46 +00:00
committed by Georges Basile Stavracas Neto
parent 2d5b1aa9d1
commit 8be361b6ce
8 changed files with 22 additions and 19 deletions
+1 -1
View File
@@ -214,7 +214,7 @@ setup_alarm (GcalAlarmRow *self)
duration = e_cal_component_alarm_trigger_get_duration (trigger);
formatted_duration = format_alarm_duration (duration);
hdy_action_row_set_title (HDY_ACTION_ROW (self), formatted_duration);
hdy_preferences_row_set_title (HDY_PREFERENCES_ROW (self), formatted_duration);
action = e_cal_component_alarm_get_action (self->alarm);
gtk_toggle_button_set_active (self->volume_button, action == E_CAL_COMPONENT_ALARM_AUDIO);
+1 -1
View File
@@ -3,7 +3,7 @@
<template class="GcalAlarmRow" parent="HdyActionRow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child type="action">
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
+4
View File
@@ -34,6 +34,7 @@
#include <glib-object.h>
#include <gio/gio.h>
#include <glib/gi18n.h>
#include <handy.h>
struct _GcalApplication
{
@@ -446,6 +447,9 @@ gcal_application_startup (GApplication *app)
if ((g_application_get_flags (app) & G_APPLICATION_IS_SERVICE) != 0)
g_application_set_inactivity_timeout (app, 3 * 60 * 1000);
/* initialize libhandy */
hdy_init();
GCAL_EXIT;
}
+2 -2
View File
@@ -47,7 +47,7 @@
struct _GcalEditDialog
{
HdyDialog parent;
GtkDialog parent;
gboolean writable;
@@ -133,7 +133,7 @@ static void on_location_entry_changed_cb (GtkEntry
static void on_add_alarm_button_clicked_cb (GtkWidget *button,
GcalEditDialog *self);
G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, HDY_TYPE_DIALOG)
G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, GTK_TYPE_DIALOG)
enum
{
+1 -2
View File
@@ -22,7 +22,6 @@
#include "gcal-event.h"
#include "gcal-manager.h"
#include <handy.h>
G_BEGIN_DECLS
@@ -32,7 +31,7 @@ G_BEGIN_DECLS
#define GCAL_TYPE_EDIT_DIALOG (gcal_edit_dialog_get_type ())
G_DECLARE_FINAL_TYPE (GcalEditDialog, gcal_edit_dialog, GCAL, EDIT_DIALOG, HdyDialog);
G_DECLARE_FINAL_TYPE (GcalEditDialog, gcal_edit_dialog, GCAL, EDIT_DIALOG, GtkDialog);
GtkWidget* gcal_edit_dialog_new (void);
+10 -10
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalEditDialog" parent="HdyDialog">
<template class="GcalEditDialog" parent="GtkDialog">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
@@ -156,7 +156,7 @@
<property name="title" translatable="yes">Title</property>
<property name="activatable-widget">summary_entry</property>
<child type="action">
<child>
<object class="GtkEntry" id="summary_entry">
<property name="visible">True</property>
<property name="valign">center</property>
@@ -177,7 +177,7 @@
<property name="title" translatable="yes">Location</property>
<property name="activatable-widget">location_entry</property>
<child type="action">
<child>
<object class="GtkEntry" id="location_entry">
<property name="visible">True</property>
<property name="valign">center</property>
@@ -226,7 +226,7 @@
<property name="title" translatable="yes">All Day</property>
<property name="activatable-widget">all_day_switch</property>
<child type="action">
<child>
<object class="GtkSwitch" id="all_day_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -246,7 +246,7 @@
<property name="visible">True</property>
<property name="title" translatable="yes">Starts</property>
<child type="action">
<child>
<object class="GtkLabel" id="event_start_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -294,7 +294,7 @@
<property name="visible">True</property>
<property name="title" translatable="yes">Ends</property>
<child type="action">
<child>
<object class="GtkLabel" id="event_end_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -343,7 +343,7 @@
<property name="title" translatable="yes">Repeat</property>
<property name="activatable-widget">repeat_combo</property>
<child type="action">
<child>
<object class="GtkComboBoxText" id="repeat_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -372,7 +372,7 @@
<property name="title" translatable="yes">End Repeat</property>
<property name="activatable-widget">repeat_combo</property>
<child type="action">
<child>
<object class="GtkComboBoxText" id="repeat_duration_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -397,7 +397,7 @@
<property name="title" translatable="yes">Number of Occurrences</property>
<property name="activatable-widget">number_of_occurrences_spin</property>
<child type="action">
<child>
<object class = "GtkSpinButton" id="number_of_occurrences_spin">
<property name="input_purpose">number</property>
<property name="input-hints">no-emoji</property>
@@ -415,7 +415,7 @@
<property name="title" translatable="yes">End Repeat Date</property>
<property name="activatable-widget">until_date_selector</property>
<child type="action">
<child>
<object class = "GcalDateSelector" id="until_date_selector">
<property name="valign">center</property>
</object>