[gnome-shell] Add a "datadir" property



commit 459a3b18f22ee4c9d549da664d6bca581a4d9da9
Author: Colin Walters <walters verbum org>
Date:   Thu Sep 10 01:36:05 2009 -0400

    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 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 3d05c68..96e1c3c 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
@@ -255,6 +261,13 @@ shell_global_class_init (ShellGlobalClass *klass)
                                                         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",
                                                         "Image directory",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]