From e2aa2a00f0e7bdba4486f66d6c780dafb2567c4b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 10 Sep 2009 01:36:05 -0400 Subject: [PATCH] Add a "datadir" property Will be used to load stylesheets from main.js. https://bugzilla.gnome.org/show_bug.cgi?id=591245 --- src/shell-global.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/shell-global.c b/src/shell-global.c index 727957046..e58eb14d9 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -40,6 +40,7 @@ struct _ShellGlobal { MutterPlugin *plugin; ShellWM *wm; + const char *datadir; const char *imagedir; const char *configdir; @@ -57,6 +58,7 @@ enum { PROP_STAGE, PROP_WINDOW_GROUP, PROP_WINDOW_MANAGER, + PROP_DATADIR, PROP_IMAGEDIR, PROP_CONFIGDIR, }; @@ -128,6 +130,9 @@ shell_global_get_property(GObject *object, case PROP_WINDOW_MANAGER: g_value_set_object (value, global->wm); break; + case PROP_DATADIR: + g_value_set_string (value, global->datadir); + break; case PROP_IMAGEDIR: g_value_set_string (value, global->imagedir); break; @@ -149,6 +154,7 @@ shell_global_init (ShellGlobal *global) if (!datadir) datadir = GNOME_SHELL_DATADIR; + global->datadir = datadir; /* We make sure imagedir ends with a '/', since the JS won't have * access to g_build_filename() and so will end up just @@ -254,6 +260,13 @@ shell_global_class_init (ShellGlobalClass *klass) "Window management interface", SHELL_TYPE_WM, G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_DATADIR, + g_param_spec_string ("datadir", + "Data directory", + "Directory containing gnome-shell data files", + NULL, + G_PARAM_READABLE)); g_object_class_install_property (gobject_class, PROP_IMAGEDIR, g_param_spec_string ("imagedir",