views/dazzling: Make it *the* month view

And move the old one to the attic. I'll keep the files around for
a while.
This commit is contained in:
Georges Basile Stavracas Neto
2023-08-11 15:13:44 -03:00
parent 7f7f55826c
commit 7e26bd5649
13 changed files with 3047 additions and 3074 deletions
File diff suppressed because it is too large Load Diff
-31
View File
@@ -1,31 +0,0 @@
/*
* gcal-dazzling-month-view.h
*
* Copyright 2023 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#pragma once
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GCAL_TYPE_DAZZLING_MONTH_VIEW (gcal_dazzling_month_view_get_type())
G_DECLARE_FINAL_TYPE (GcalDazzlingMonthView, gcal_dazzling_month_view, GCAL, DAZZLING_MONTH_VIEW, GtkWidget)
G_END_DECLS
-136
View File
@@ -1,136 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalDazzlingMonthView" parent="GtkWidget">
<property name="overflow">hidden</property>
<child>
<object class="GtkEventControllerScroll">
<property name="flags">vertical|kinetic</property>
<signal name="scroll-begin" handler="on_scroll_controller_scroll_begin_cb" object="GcalDazzlingMonthView" swapped="no" />
<signal name="scroll" handler="on_scroll_controller_scroll_cb" object="GcalDazzlingMonthView" swapped="no" />
<signal name="scroll-end" handler="on_scroll_controller_scroll_end_cb" object="GcalDazzlingMonthView" swapped="no" />
<signal name="decelerate" handler="on_scroll_controller_decelerate_cb" object="GcalDazzlingMonthView" swapped="no" />
</object>
</child>
<child>
<object class="GtkEventControllerScroll">
<property name="flags">vertical|discrete</property>
<signal name="scroll" handler="on_discrete_scroll_controller_scroll_cb" object="GcalDazzlingMonthView" swapped="no" />
</object>
</child>
<!-- Header -->
<child type="header">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<child>
<object class="GtkLabel" id="month_label">
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="month-name" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="year_label">
<property name="hexpand">true</property>
<property name="xalign">1.0</property>
<style>
<class name="secondary-label" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="margin-bottom">6</property>
<child>
<object class="GtkLabel" id="label_0">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_1">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_2">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_3">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_4">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_5">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
<child>
<object class="GtkLabel" id="label_6">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
<class name="header" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>
File diff suppressed because it is too large Load Diff
+11 -13
View File
@@ -1,10 +1,11 @@
/* gcal-month-view.h
/*
* gcal-month-view.h
*
* Copyright (C) 2012 - Erick Pérez Castellanos
* Copyright 2023 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -13,21 +14,18 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef __GCAL_MONTH_VIEW_H__
#define __GCAL_MONTH_VIEW_H__
#pragma once
#include "gcal-manager.h"
#include "gcal-weather-service.h"
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GCAL_TYPE_MONTH_VIEW (gcal_month_view_get_type ())
#define GCAL_TYPE_MONTH_VIEW (gcal_month_view_get_type())
G_DECLARE_FINAL_TYPE (GcalMonthView, gcal_month_view, GCAL, MONTH_VIEW, GtkWidget)
G_END_DECLS
#endif /* __GCAL_MONTH_VIEW_H__ */
+16 -29
View File
@@ -1,32 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GcalMonthView" parent="GtkWidget">
<property name="overflow">hidden</property>
<child>
<object class="GtkGestureClick">
<property name="button">1</property>
<signal name="pressed" handler="on_click_gesture_pressed_cb" object="GcalMonthView" swapped="no" />
<signal name="released" handler="on_click_gesture_released_cb" object="GcalMonthView" swapped="no" />
</object>
</child>
<child>
<object class="GtkEventControllerMotion" id="motion_controller">
<property name="propagation-phase">none</property>
<signal name="motion" handler="on_motion_controller_motion_cb" object="GcalMonthView" swapped="no" />
</object>
</child>
<child>
<object class="GtkEventControllerKey">
<signal name="key-pressed" handler="on_key_controller_key_pressed_cb" object="GcalMonthView" swapped="no" />
<object class="GtkEventControllerScroll">
<property name="flags">vertical|kinetic</property>
<signal name="scroll-begin" handler="on_scroll_controller_scroll_begin_cb" object="GcalMonthView" swapped="no" />
<signal name="scroll" handler="on_scroll_controller_scroll_cb" object="GcalMonthView" swapped="no" />
<signal name="scroll-end" handler="on_scroll_controller_scroll_end_cb" object="GcalMonthView" swapped="no" />
<signal name="decelerate" handler="on_scroll_controller_decelerate_cb" object="GcalMonthView" swapped="no" />
</object>
</child>
<child>
<object class="GtkEventControllerScroll">
<property name="flags">vertical</property>
<signal name="scroll" handler="on_scroll_controller_scrolled_cb" object="GcalMonthView" swapped="no" />
<property name="flags">vertical|discrete</property>
<signal name="scroll" handler="on_discrete_scroll_controller_scroll_cb" object="GcalMonthView" swapped="no" />
</object>
</child>
@@ -59,12 +49,10 @@
<child>
<object class="GtkBox">
<property name="spacing">6</property>
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="margin-bottom">6</property>
<child>
<object class="GtkLabel" id="label_0">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
@@ -75,6 +63,7 @@
<child>
<object class="GtkLabel" id="label_1">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
@@ -85,6 +74,7 @@
<child>
<object class="GtkLabel" id="label_2">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
@@ -95,6 +85,7 @@
<child>
<object class="GtkLabel" id="label_3">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
@@ -105,6 +96,7 @@
<child>
<object class="GtkLabel" id="label_4">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
@@ -115,6 +107,7 @@
<child>
<object class="GtkLabel" id="label_5">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
@@ -125,6 +118,7 @@
<child>
<object class="GtkLabel" id="label_6">
<property name="margin-start">6</property>
<property name="hexpand">true</property>
<property name="xalign">0.0</property>
<style>
@@ -138,12 +132,5 @@
</object>
</child>
<!-- Grid -->
<child type="grid">
<object class="GtkGrid" id="grid">
<property name="row-homogeneous">true</property>
<property name="column-homogeneous">true</property>
</object>
</child>
</template>
</interface>
-1
View File
@@ -8,7 +8,6 @@ built_sources += gnome.compile_resources(
sources += files(
'gcal-agenda-view.c',
'gcal-dazzling-month-view.c',
'gcal-month-cell.c',
'gcal-month-popover.c',
'gcal-month-view.c',
-1
View File
@@ -2,7 +2,6 @@
<gresources>
<gresource prefix="/org/gnome/calendar/ui/views">
<file compressed="true">gcal-agenda-view.ui</file>
<file compressed="true">gcal-dazzling-month-view.ui</file>
<file compressed="true">gcal-month-cell.ui</file>
<file compressed="true">gcal-month-popover.ui</file>
<file compressed="true">gcal-month-view.ui</file>