#include "gtkmain.h"
#include "gtkrecentmanager.h"
#include "gtkaccelmapprivate.h"
-#include "gtkicontheme.h"
+#include "gtkiconthemeprivate.h"
#include "gtkbuilder.h"
#include "gtkshortcutswindow.h"
#include "gtkintl.h"
iconspath = g_strconcat (base_path, "/icons/", NULL);
gtk_icon_theme_add_resource_path (default_theme, iconspath);
g_free (iconspath);
+ gtk_icon_theme_ensure_loaded (default_theme);
}
/* Load the menus */
blow_themes (self);
queue_theme_changed (self);
-
}
static void
IconThemeDirMtime *dir_mtime;
GStatBuf stat_buf;
GList *d;
+ gint64 before = g_get_monotonic_time ();
if (self->current_theme)
insert_theme (self, self->current_theme);
g_message ("%s", s->str);
g_string_free (s, TRUE);
});
+
+ self->loading_themes = FALSE;
+ gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "icon theme load", self->current_theme);
}
static void
{
GTimeVal tv;
gboolean was_valid = self->themes_valid;
- gint64 before = g_get_monotonic_time ();
if (self->loading_themes)
return;
if (was_valid)
queue_theme_changed (self);
}
+}
- if (gdk_profiler_is_running ())
- gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "icon theme load", NULL);
-
- self->loading_themes = FALSE;
+void
+gtk_icon_theme_ensure_loaded (GtkIconTheme *self)
+{
+ ensure_valid_themes (self);
}
static inline gboolean