summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2013-05-20 00:18:40 +0200
committerGiovanni Campagna <gcampagna@src.gnome.org>2013-08-14 21:36:34 +0200
commit1fdb161f54431a5a852127b30d5e02827738c246 (patch)
tree22f1860028bba2146d91069a28cdaa545cc08d14
parentf3d1653f13f05bbcdda932310daf31f57d61aa5e (diff)
downloadmutter-1fdb161f54431a5a852127b30d5e02827738c246.tar.gz
main: remove a lot of code to handle wrong theme config
mutter has a hard dependency on gnome-themes-standard, which provides the Adwaita theme. If that is not satisfied, it is a distribution problem, so we can just fail (and let the automatic smoketests notice it)
-rw-r--r--src/core/main.c38
1 files changed, 7 insertions, 31 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 567e98892..a4e49bce2 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -484,43 +484,19 @@ meta_run (void)
meta_ui_set_current_theme (meta_prefs_get_theme ());
- /* Try to find some theme that'll work if the theme preference
- * doesn't exist. First try Simple (the default theme) then just
- * try anything in the themes directory.
+ /* If the theme preference does not exists, fallback to
+ * Adwaita (the default theme), or abort if that doesn't
+ * exists.
*/
if (!meta_ui_have_a_theme ())
- meta_ui_set_current_theme ("Simple");
-
- if (!meta_ui_have_a_theme ())
- {
- const char *dir_entry = NULL;
- GError *err = NULL;
- GDir *themes_dir = NULL;
-
- if (!(themes_dir = g_dir_open (MUTTER_DATADIR"/themes", 0, &err)))
- {
- meta_fatal (_("Failed to scan themes directory: %s\n"), err->message);
- g_error_free (err);
- }
- else
- {
- while (((dir_entry = g_dir_read_name (themes_dir)) != NULL) &&
- (!meta_ui_have_a_theme ()))
- {
- meta_ui_set_current_theme (dir_entry);
- }
-
- g_dir_close (themes_dir);
- }
- }
-
+ meta_ui_set_current_theme ("Adwaita");
+
if (!meta_ui_have_a_theme ())
- meta_fatal (_("Could not find a theme! Be sure %s exists and contains the usual themes.\n"),
- MUTTER_DATADIR"/themes");
+ meta_fatal ("Adwaita theme missing, please install the gnome-themes-standard package");
if (!meta_display_open ())
meta_exit (META_EXIT_ERROR);
-
+
g_main_loop_run (meta_main_loop);
meta_finalize ();