mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
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:
parent
2ddff872cd
commit
fe6ef5256b
@ -331,6 +331,8 @@ struct _GtkIconTheme
|
|||||||
GList *dir_mtimes;
|
GList *dir_mtimes;
|
||||||
|
|
||||||
gulong theme_changed_idle;
|
gulong theme_changed_idle;
|
||||||
|
|
||||||
|
int serial;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GtkIconThemeClass
|
struct _GtkIconThemeClass
|
||||||
@ -1367,6 +1369,13 @@ blow_themes (GtkIconTheme *self)
|
|||||||
self->unthemed_icons = NULL;
|
self->unthemed_icons = NULL;
|
||||||
self->dir_mtimes = NULL;
|
self->dir_mtimes = NULL;
|
||||||
self->themes_valid = FALSE;
|
self->themes_valid = FALSE;
|
||||||
|
self->serial++;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
gtk_icon_theme_get_serial (GtkIconTheme *self)
|
||||||
|
{
|
||||||
|
return self->serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -41,4 +41,6 @@ void gtk_icon_paintable_snapshot_with_colors (GtkIconPaintable *icon,
|
|||||||
const GdkRGBA *warning_color,
|
const GdkRGBA *warning_color,
|
||||||
const GdkRGBA *error_color);
|
const GdkRGBA *error_color);
|
||||||
|
|
||||||
|
int gtk_icon_theme_get_serial (GtkIconTheme *self);
|
||||||
|
|
||||||
#endif /* __GTK_ICON_THEME_PRIVATE_H__ */
|
#endif /* __GTK_ICON_THEME_PRIVATE_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user