guis/views: Introduce GcalAgendaViewItem
GcalAgendaViewItem is an auxiliary object that will be used instead of the raw events by GcalAgendaViewDay in a later commit to construct the event widgets inside the main ListView of the agenda view as opposed to a creating them inside of a `GtkListBox` inside each row of the ListView. Holding a reference to the event widget will be necessary in later commits, so when a ListView row is activated, we can query its model of GcalAgendaViewItem's with the given activated position, and pass the correct item's event widget to `gcal_view_event_activated ()` Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/809>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "gcal-agenda-view.h"
|
||||
#include "gcal-agenda-view-day.h"
|
||||
#include "gcal-agenda-view-day-row.h"
|
||||
#include "gcal-agenda-view-item.h"
|
||||
#include "gcal-debug.h"
|
||||
#include "gcal-enums.h"
|
||||
#include "gcal-event-widget.h"
|
||||
@@ -422,6 +423,7 @@ gcal_agenda_view_class_init (GcalAgendaViewClass *klass)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
g_type_ensure (GCAL_TYPE_AGENDA_VIEW_ITEM);
|
||||
g_type_ensure (GCAL_TYPE_AGENDA_VIEW_DAY_ROW);
|
||||
|
||||
object_class->dispose = gcal_agenda_view_dispose;
|
||||
|
||||
Reference in New Issue
Block a user