[gnome-calendar/gbsneto/event-editor: 6/16] edit-dialog: Make it a HdyDialog subclass
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/gbsneto/event-editor: 6/16] edit-dialog: Make it a HdyDialog subclass
- Date: Mon, 25 Nov 2019 14:36:44 +0000 (UTC)
commit 43bb5d5bf810fd6c6f927e7f34b98a3e00cc3dc7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Nov 13 19:04:35 2019 -0300
edit-dialog: Make it a HdyDialog subclass
meson.build | 1 +
src/gui/gcal-edit-dialog.c | 4 ++--
src/gui/gcal-edit-dialog.h | 4 ++--
src/gui/gcal-edit-dialog.ui | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index 18c49d6f..ecf1dc96 100644
--- a/meson.build
+++ b/meson.build
@@ -81,6 +81,7 @@ assert(cc.has_function('strerror'), '"strerror" not found')
# options
config_h.set('ENABLE_TRACING', enable_tracing)
+config_h.set('HANDY_USE_UNSTABLE_API', true)
# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
nl_time_first_weekday_src = '''
diff --git a/src/gui/gcal-edit-dialog.c b/src/gui/gcal-edit-dialog.c
index a5881872..55a14066 100644
--- a/src/gui/gcal-edit-dialog.c
+++ b/src/gui/gcal-edit-dialog.c
@@ -45,7 +45,7 @@
struct _GcalEditDialog
{
- GtkDialog parent;
+ HdyDialog parent;
gboolean writable;
@@ -134,7 +134,7 @@ static void on_remove_alarm_button_clicked (GtkButton
static void on_add_alarm_button_clicked_cb (GtkWidget *button,
GcalEditDialog *self);
-G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE (GcalEditDialog, gcal_edit_dialog, HDY_TYPE_DIALOG)
enum
{
diff --git a/src/gui/gcal-edit-dialog.h b/src/gui/gcal-edit-dialog.h
index d4bea553..e4f44ec5 100644
--- a/src/gui/gcal-edit-dialog.h
+++ b/src/gui/gcal-edit-dialog.h
@@ -22,7 +22,7 @@
#include "gcal-event.h"
#include "gcal-manager.h"
-#include <gtk/gtk.h>
+#include <handy.h>
G_BEGIN_DECLS
@@ -32,7 +32,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, GtkDialog);
+G_DECLARE_FINAL_TYPE (GcalEditDialog, gcal_edit_dialog, GCAL, EDIT_DIALOG, HdyDialog);
GtkWidget* gcal_edit_dialog_new (void);
diff --git a/src/gui/gcal-edit-dialog.ui b/src/gui/gcal-edit-dialog.ui
index 94f2ea44..5c2fcfaf 100644
--- a/src/gui/gcal-edit-dialog.ui
+++ b/src/gui/gcal-edit-dialog.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <template class="GcalEditDialog" parent="GtkDialog">
+ <template class="GcalEditDialog" parent="HdyDialog">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]