utils: Remove get_source_parent_name_color
One less weird function lurking around. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/610>
This commit is contained in:
committed by
Marge Bot
parent
281191b5b3
commit
d16cc2bc68
@@ -617,41 +617,6 @@ e_utf8_strftime_fix_am_pm (gchar *str,
|
||||
return sz;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_source_parent_name_color:
|
||||
* @manager: a #GcalManager
|
||||
* @source: an #ESource
|
||||
* @name: (nullable): return location for the name
|
||||
* @color: (nullable): return location for the color
|
||||
*
|
||||
* Retrieves the name and the color of the #ESource that is
|
||||
* parent of @source.
|
||||
*/
|
||||
void
|
||||
get_source_parent_name_color (GcalManager *manager,
|
||||
ESource *source,
|
||||
gchar **name,
|
||||
gchar **color)
|
||||
{
|
||||
ESource *parent_source;
|
||||
|
||||
g_assert (source && E_IS_SOURCE (source));
|
||||
|
||||
parent_source = gcal_manager_get_source (manager, e_source_get_parent (source));
|
||||
|
||||
if (name != NULL)
|
||||
*name = e_source_dup_display_name (parent_source);
|
||||
|
||||
if (color != NULL)
|
||||
{
|
||||
GdkRGBA c;
|
||||
|
||||
get_color_name_from_source (parent_source, &c);
|
||||
|
||||
*color = gdk_rgba_to_string (&c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* format_utc_offset:
|
||||
* @offset: an UTC offset
|
||||
|
||||
@@ -92,11 +92,6 @@ gsize e_utf8_strftime_fix_am_pm (gchar
|
||||
const gchar *fmt,
|
||||
const struct tm *tm);
|
||||
|
||||
void get_source_parent_name_color (GcalManager *manager,
|
||||
ESource *source,
|
||||
gchar **name,
|
||||
gchar **color);
|
||||
|
||||
gchar* format_utc_offset (gint64 offset);
|
||||
|
||||
gint get_alarm_trigger_minutes (GcalEvent *event,
|
||||
|
||||
Reference in New Issue
Block a user