From b05224b0597403c6c1f610a98d1baf4d642d2d4a Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Mon, 17 Sep 2012 07:40:54 -0400 Subject: [PATCH] Add back gtk_css_provider_get_named Was in the original patch but was not in 1f5dea9 probably due to a bad rebase. https://bugzilla.gnome.org/show_bug.cgi?id=683896 --- gtk/gtkcssprovider.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index f91dbbe3eb..f0f4eadab6 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -2817,6 +2817,29 @@ gtk_css_provider_get_default (void) return NULL; } +/** + * gtk_css_provider_get_named: + * @name: A theme name + * @variant: (allow-none): variant to load, for example, "dark", or + * %NULL for the default + * + * Loads a theme from the usual theme paths + * + * Returns: (transfer none): a #GtkCssProvider with the theme loaded. + * This memory is owned by GTK+, and you must not free it. + */ +GtkCssProvider * +gtk_css_provider_get_named (const gchar *name, + const gchar *variant) +{ + GdkScreen *screen = gdk_screen_get_default (); + + if (screen) + return _gtk_css_provider_get_named_for_screen (screen, name, variant); + else + return NULL; +} + gchar * _gtk_css_provider_get_theme_dir (void) {