window: Inherit from HdyApplicationWindow
This commit makes the toplevel GcalWindow inherit from HdyApplicationWindow instead of GtkApplicationWindow.
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
8be361b6ce
commit
402ad34f42
@@ -88,7 +88,7 @@ typedef struct
|
|||||||
|
|
||||||
struct _GcalWindow
|
struct _GcalWindow
|
||||||
{
|
{
|
||||||
GtkApplicationWindow parent;
|
HdyApplicationWindow parent;
|
||||||
|
|
||||||
/* timeout ids */
|
/* timeout ids */
|
||||||
guint notification_timeout;
|
guint notification_timeout;
|
||||||
@@ -179,7 +179,7 @@ enum
|
|||||||
gtk_application_set_accels_for_action (GTK_APPLICATION (app), action, tmp);\
|
gtk_application_set_accels_for_action (GTK_APPLICATION (app), action, tmp);\
|
||||||
}
|
}
|
||||||
|
|
||||||
G_DEFINE_TYPE (GcalWindow, gcal_window, GTK_TYPE_APPLICATION_WINDOW)
|
G_DEFINE_TYPE (GcalWindow, gcal_window, HDY_TYPE_APPLICATION_WINDOW)
|
||||||
|
|
||||||
static GParamSpec* properties[N_PROPS] = { NULL, };
|
static GParamSpec* properties[N_PROPS] = { NULL, };
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,14 @@
|
|||||||
#include "gcal-enums.h"
|
#include "gcal-enums.h"
|
||||||
#include "gcal-utils.h"
|
#include "gcal-utils.h"
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <handy.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GCAL_TYPE_WINDOW (gcal_window_get_type ())
|
#define GCAL_TYPE_WINDOW (gcal_window_get_type ())
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (GcalWindow, gcal_window, GCAL, WINDOW, GtkApplicationWindow)
|
G_DECLARE_FINAL_TYPE (GcalWindow, gcal_window, GCAL, WINDOW, HdyApplicationWindow)
|
||||||
|
|
||||||
GtkWidget* gcal_window_new_with_date (GcalApplication *app,
|
GtkWidget* gcal_window_new_with_date (GcalApplication *app,
|
||||||
GDateTime *date);
|
GDateTime *date);
|
||||||
|
|||||||
+11
-2
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.14"/>
|
<requires lib="gtk+" version="3.14"/>
|
||||||
<template class="GcalWindow" parent="GtkApplicationWindow">
|
<template class="GcalWindow" parent="HdyApplicationWindow">
|
||||||
<property name="window_position">center</property>
|
<property name="window_position">center</property>
|
||||||
<property name="default_width">800</property>
|
<property name="default_width">800</property>
|
||||||
<property name="default_height">600</property>
|
<property name="default_height">600</property>
|
||||||
@@ -11,6 +11,10 @@
|
|||||||
<style>
|
<style>
|
||||||
<class name="org-gnome-Calendar"/>
|
<class name="org-gnome-Calendar"/>
|
||||||
</style>
|
</style>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkOverlay" id="views_overlay">
|
<object class="GtkOverlay" id="views_overlay">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -155,8 +159,11 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="pack_type">end</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child type="titlebar">
|
<child>
|
||||||
<object class="GtkHeaderBar" id="header_bar">
|
<object class="GtkHeaderBar" id="header_bar">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="show_close_button">True</property>
|
<property name="show_close_button">True</property>
|
||||||
@@ -274,6 +281,8 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</template>
|
</template>
|
||||||
<object class="GcalCalendarPopover" id="calendar_popover" />
|
<object class="GcalCalendarPopover" id="calendar_popover" />
|
||||||
<object class="GcalQuickAddPopover" id="quick_add_popover">
|
<object class="GcalQuickAddPopover" id="quick_add_popover">
|
||||||
|
|||||||
Reference in New Issue
Block a user