date-chooser: Drop the unused day options callback
The day options callback is never set, so let's just drop it and all its methods.
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
02613d80a2
commit
91afd1b06d
@@ -51,10 +51,6 @@ struct _GcalDateChooser
|
||||
gboolean show_day_names;
|
||||
gboolean show_week_numbers;
|
||||
gboolean no_month_change;
|
||||
|
||||
GcalDateChooserDayOptionsCallback day_options_cb;
|
||||
gpointer day_options_data;
|
||||
GDestroyNotify day_options_destroy;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GcalDateChooser, gcal_date_chooser, ADW_TYPE_BIN)
|
||||
@@ -198,8 +194,6 @@ calendar_compute_days (GcalDateChooser *self)
|
||||
gtk_label_set_label (GTK_LABEL (self->rows[row]), text);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
gcal_date_chooser_invalidate_day_options (self);
|
||||
}
|
||||
|
||||
/* 0 == sunday */
|
||||
@@ -753,45 +747,3 @@ gcal_date_chooser_get_date (GcalDateChooser *self)
|
||||
{
|
||||
return self->date;
|
||||
}
|
||||
|
||||
void
|
||||
gcal_date_chooser_set_day_options_callback (GcalDateChooser *self,
|
||||
GcalDateChooserDayOptionsCallback callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy)
|
||||
{
|
||||
if (self->day_options_destroy)
|
||||
self->day_options_destroy (self->day_options_data);
|
||||
|
||||
self->day_options_cb = callback;
|
||||
self->day_options_data = data;
|
||||
self->day_options_destroy = destroy;
|
||||
|
||||
gcal_date_chooser_invalidate_day_options (self);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gcal_date_chooser_invalidate_day_options (GcalDateChooser *self)
|
||||
{
|
||||
GcalDateChooserDayOptions options;
|
||||
GcalDateChooserDay *d;
|
||||
GDateTime *date;
|
||||
gint row, col;
|
||||
|
||||
for (row = 0; row < 6; row++)
|
||||
{
|
||||
for (col = 0; col < 7; col++)
|
||||
{
|
||||
d = GCAL_DATE_CHOOSER_DAY (self->days[row][col]);
|
||||
date = gcal_date_chooser_day_get_date (d);
|
||||
|
||||
if (self->day_options_cb)
|
||||
options = self->day_options_cb (self, date, self->day_options_data);
|
||||
else
|
||||
options = GCAL_DATE_CHOOSER_DAY_NONE;
|
||||
|
||||
gcal_date_chooser_day_set_options (d, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,10 +34,6 @@ typedef enum
|
||||
|
||||
G_DECLARE_FINAL_TYPE (GcalDateChooser, gcal_date_chooser, GCAL, DATE_CHOOSER, AdwBin)
|
||||
|
||||
typedef GcalDateChooserDayOptions (*GcalDateChooserDayOptionsCallback) (GcalDateChooser *self,
|
||||
GDateTime *date,
|
||||
gpointer user_data);
|
||||
|
||||
GtkWidget* gcal_date_chooser_new (void);
|
||||
|
||||
GDateTime* gcal_date_chooser_get_date (GcalDateChooser *self);
|
||||
@@ -45,13 +41,6 @@ GDateTime* gcal_date_chooser_get_date (GcalDateChoose
|
||||
void gcal_date_chooser_set_date (GcalDateChooser *self,
|
||||
GDateTime *date);
|
||||
|
||||
void gcal_date_chooser_set_day_options_callback (GcalDateChooser *self,
|
||||
GcalDateChooserDayOptionsCallback callback,
|
||||
gpointer data,
|
||||
GDestroyNotify destroy);
|
||||
|
||||
void gcal_date_chooser_invalidate_day_options (GcalDateChooser *self);
|
||||
|
||||
gboolean gcal_date_chooser_get_no_month_change (GcalDateChooser *self);
|
||||
|
||||
void gcal_date_chooser_set_no_month_change (GcalDateChooser *self,
|
||||
|
||||
Reference in New Issue
Block a user