summaryrefslogtreecommitdiff
path: root/libmetacity/meta-theme.c
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-02-23 03:10:39 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-02-23 03:10:39 +0200
commit7ecb3e035c593703601bedb855010fbdc3b7cb16 (patch)
treeb9ac8d1c35f5284d26df43e9364a0e574cd0ada8 /libmetacity/meta-theme.c
parentc9f01260c4cbb2212113a9669db3522301fadaf3 (diff)
downloadmetacity-7ecb3e035c593703601bedb855010fbdc3b7cb16.tar.gz
theme: redo theme settings
Diffstat (limited to 'libmetacity/meta-theme.c')
-rw-r--r--libmetacity/meta-theme.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/libmetacity/meta-theme.c b/libmetacity/meta-theme.c
index 76db5882..69d1afce 100644
--- a/libmetacity/meta-theme.c
+++ b/libmetacity/meta-theme.c
@@ -591,65 +591,3 @@ meta_theme_draw_frame (MetaTheme *theme,
mini_icon,
icon);
}
-
-/**
- * The current theme. (Themes are singleton.)
- */
-static MetaTheme *meta_current_theme = NULL;
-
-MetaTheme*
-meta_theme_get_current (void)
-{
- return meta_current_theme;
-}
-
-void
-meta_theme_set_current (const gchar *name,
- gboolean force_reload,
- gboolean composited,
- const PangoFontDescription *titlebar_font)
-{
- MetaTheme *new_theme;
- GError *error;
-
- g_debug ("Setting current theme to '%s'", name);
-
- if (!force_reload && meta_current_theme)
- {
- gchar *theme_name;
-
- theme_name = meta_theme_get_name (meta_current_theme);
- if (g_strcmp0 (name, theme_name) == 0)
- {
- g_free (theme_name);
- return;
- }
-
- g_free (theme_name);
- }
-
- if (name != NULL && strcmp (name, "") != 0)
- new_theme = meta_theme_new (META_THEME_TYPE_METACITY);
- else
- new_theme = meta_theme_new (META_THEME_TYPE_GTK);
-
- meta_theme_set_composited (new_theme, composited);
- meta_theme_set_titlebar_font (new_theme, titlebar_font);
-
- error = NULL;
- if (!meta_theme_load (new_theme, name, &error))
- {
- g_warning (_("Failed to load theme '%s': %s"), name, error->message);
- g_error_free (error);
-
- g_object_unref (new_theme);
- }
- else
- {
- if (meta_current_theme)
- g_object_unref (meta_current_theme);
- meta_current_theme = new_theme;
-
- g_debug ("New theme is '%s'", name);
- }
-}