icontheme: Keep a serial

This will let us identify when we have to re-lookup
icons because they may have changed despite the theme
object being the same.
This commit is contained in:
Matthias Clasen 2020-04-22 13:47:17 -04:00
parent 2ddff872cd
commit fe6ef5256b
2 changed files with 11 additions and 0 deletions

View File

@ -331,6 +331,8 @@ struct _GtkIconTheme
GList *dir_mtimes;
gulong theme_changed_idle;
int serial;
};
struct _GtkIconThemeClass
@ -1367,6 +1369,13 @@ blow_themes (GtkIconTheme *self)
self->unthemed_icons = NULL;
self->dir_mtimes = NULL;
self->themes_valid = FALSE;
self->serial++;
}
int
gtk_icon_theme_get_serial (GtkIconTheme *self)
{
return self->serial;
}
static void

View File

@ -41,4 +41,6 @@ void gtk_icon_paintable_snapshot_with_colors (GtkIconPaintable *icon,
const GdkRGBA *warning_color,
const GdkRGBA *error_color);
int gtk_icon_theme_get_serial (GtkIconTheme *self);
#endif /* __GTK_ICON_THEME_PRIVATE_H__ */