application: Remove gcal_application_get_clock()
That moved to GcalContext, and now that all pieces who used it have access to the context, we can just use it.
This commit is contained in:
@@ -1669,8 +1669,6 @@ gcal_week_header_class_init (GcalWeekHeaderClass *kclass)
|
||||
static void
|
||||
gcal_week_header_init (GcalWeekHeader *self)
|
||||
{
|
||||
GcalApplication *application;
|
||||
|
||||
self->expanded = FALSE;
|
||||
self->selection_start = -1;
|
||||
self->selection_end = -1;
|
||||
@@ -1690,17 +1688,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
NULL,
|
||||
0,
|
||||
GDK_ACTION_MOVE);
|
||||
|
||||
/* Connect to the wall clock */
|
||||
application = GCAL_APPLICATION (g_application_get_default ());
|
||||
|
||||
g_assert (application != NULL);
|
||||
|
||||
g_signal_connect_object (gcal_application_get_clock (application),
|
||||
"day-changed",
|
||||
G_CALLBACK (gtk_widget_queue_draw),
|
||||
self,
|
||||
G_CONNECT_SWAPPED);
|
||||
}
|
||||
|
||||
/* Private API */
|
||||
@@ -1831,6 +1818,12 @@ gcal_week_header_set_context (GcalWeekHeader *self,
|
||||
g_return_if_fail (GCAL_IS_WEEK_HEADER (self));
|
||||
|
||||
self->context = context;
|
||||
|
||||
g_signal_connect_object (gcal_context_get_clock (context),
|
||||
"day-changed",
|
||||
G_CALLBACK (gtk_widget_queue_draw),
|
||||
self,
|
||||
G_CONNECT_SWAPPED);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user