gnome-shell r136 - in trunk: . data scripts src
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-shell r136 - in trunk: . data scripts src
- Date: Mon, 22 Dec 2008 22:05:56 +0000 (UTC)
Author: danw
Date: Mon Dec 22 22:05:56 2008
New Revision: 136
URL: http://svn.gnome.org/viewvc/gnome-shell?rev=136&view=rev
Log:
Add (+) and (-) icon artwork, and a little bit of infrastructure for them
Added:
trunk/data/
trunk/data/Makefile.am
trunk/data/add-workspace.svg
trunk/data/remove-workspace.svg
Modified:
trunk/Makefile.am
trunk/configure.ac
trunk/scripts/launcher.py
trunk/src/Makefile.am
trunk/src/shell-global.c
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Mon Dec 22 22:05:56 2008
@@ -1,3 +1,3 @@
-SUBDIRS = src
+SUBDIRS = src data
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Dec 22 22:05:56 2008
@@ -53,5 +53,6 @@
AC_OUTPUT([
Makefile
+ data/Makefile
src/Makefile
])
Added: trunk/data/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/data/Makefile.am Mon Dec 22 22:05:56 2008
@@ -0,0 +1,4 @@
+imagedir = $(pkgdatadir)/images
+
+image_DATA = \
+ add-workspace.svg
Added: trunk/data/add-workspace.svg
==============================================================================
--- (empty file)
+++ trunk/data/add-workspace.svg Mon Dec 22 22:05:56 2008
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="59.995201"
+ height="59.995102"
+ id="svg3113"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ version="1.0"
+ sodipodi:docname="add-workspace.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3115">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective3121" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="375"
+ inkscape:cy="520"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="641"
+ inkscape:window-height="683"
+ inkscape:window-x="4"
+ inkscape:window-y="54" />
+ <metadata
+ id="metadata3118">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-498.57383,-439.50749)">
+ <path
+ id="path3269"
+ d="M 528.57143,439.91129 C 512.23433,439.91129 498.97763,453.16795 498.97763,469.50504 C 498.97763,485.84214 512.23433,499.09881 528.57143,499.09879 C 544.90853,499.09879 558.16513,485.84215 558.16523,469.50504 C 558.16523,453.16794 544.90853,439.9113 528.57143,439.91129 z M 525.29023,451.16129 L 531.88393,451.16129 C 533.75363,451.16129 535.25893,452.66659 535.25893,454.53629 L 535.25893,462.84879 L 543.54023,462.84879 C 545.40973,462.84879 546.91523,464.35409 546.91523,466.22379 L 546.91523,472.81754 C 546.91523,474.68728 545.40993,476.19255 543.54023,476.19254 L 535.25893,476.19254 L 535.25893,484.47379 C 535.25893,486.34353 533.75363,487.8488 531.88393,487.84879 L 525.29023,487.84879 C 523.42053,487.84881 521.91523,486.34351 521.91523,484.47379 L 521.91523,476.19254 L 513.60263,476.19254 C 511.73313,476.19257 510.22773,474.68726 510.22763,472.81754 L 510.22763,466.22379 C 510.22763,464.35407 511.73303,462.8488 513.60263,462.84879 L 521.91523,462.84879 L 521.91523,
454.53629 C 521.91523,452.66657 523.42043,451.1613 525.29023,451.16129 z"
+ style="opacity:0.30701785;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.807603px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline" />
+ </g>
+</svg>
Added: trunk/data/remove-workspace.svg
==============================================================================
--- (empty file)
+++ trunk/data/remove-workspace.svg Mon Dec 22 22:05:56 2008
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="59.995201"
+ height="59.995102"
+ id="svg3113"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ version="1.0"
+ sodipodi:docname="remove-workspace.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3115">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective3121" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="4.5"
+ inkscape:cx="-8.1974244"
+ inkscape:cy="38.948933"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1400"
+ inkscape:window-height="971"
+ inkscape:window-x="454"
+ inkscape:window-y="105" />
+ <metadata
+ id="metadata3118">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-498.57383,-439.50749)">
+ <path
+ style="opacity:0.30701785;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.807603px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline"
+ d="M 30 0.40625 C 13.662899 0.40624999 0.40625 13.66291 0.40625 30 C 0.40624999 46.337101 13.6629 59.59377 30 59.59375 C 46.337099 59.593749 59.59365 46.33711 59.59375 30 C 59.59375 13.662901 46.3371 0.40626 30 0.40625 z M 15.03125 23.34375 L 44.96875 23.34375 C 46.83825 23.343751 48.34375 24.84905 48.34375 26.71875 L 48.34375 33.3125 C 48.34375 35.182239 46.83845 36.68751 44.96875 36.6875 L 15.03125 36.6875 C 13.16175 36.687529 11.65635 35.18222 11.65625 33.3125 L 11.65625 26.71875 C 11.65625 24.849031 13.16165 23.34376 15.03125 23.34375 z "
+ transform="translate(498.57383,439.50749)"
+ id="path2382" />
+ </g>
+</svg>
Modified: trunk/scripts/launcher.py
==============================================================================
--- trunk/scripts/launcher.py (original)
+++ trunk/scripts/launcher.py Mon Dec 22 22:05:56 2008
@@ -32,6 +32,7 @@
top_dir = os.path.dirname(scripts_dir)
self.plugin_dir = os.path.join(top_dir, "src")
self.js_dir = os.path.join(top_dir, "js")
+ self.data_dir = os.path.join(top_dir, "data")
parser = OptionParser()
parser.add_option("-g", "--debug", action="store_true",
@@ -89,9 +90,10 @@
# Now launch metacity-clutter with our plugin
env=dict(os.environ)
- env.update({'GNOME_SHELL_JS' : self.js_dir,
- 'GI_TYPELIB_PATH' : self.plugin_dir,
- 'LD_LIBRARY_PATH' : os.environ.get('LD_LIBRARY_PATH', '') + ':' + self.plugin_dir,
+ env.update({'GNOME_SHELL_JS' : self.js_dir,
+ 'GNOME_SHELL_DATADIR' : self.data_dir,
+ 'GI_TYPELIB_PATH' : self.plugin_dir,
+ 'LD_LIBRARY_PATH' : os.environ.get('LD_LIBRARY_PATH', '') + ':' + self.plugin_dir,
'GNOME_DISABLE_CRASH_DIALOG' : '1'})
if force_indirect:
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Mon Dec 22 22:05:56 2008
@@ -12,6 +12,7 @@
$(MUTTER_PLUGIN_CFLAGS) \
-Itray \
-DGETTEXT_PACKAGE=gnome-shell \
+ -DGNOME_SHELL_DATADIR=\"$(pkgdatadir)\" \
-DGNOME_SHELL_PKGLIBDIR=\"$(pkglibdir)\" \
-DJSDIR=\"$(pkgdatadir)/js\"
Modified: trunk/src/shell-global.c
==============================================================================
--- trunk/src/shell-global.c (original)
+++ trunk/src/shell-global.c Mon Dec 22 22:05:56 2008
@@ -15,6 +15,7 @@
MutterPlugin *plugin;
ShellWM *wm;
gboolean keyboard_grabbed;
+ const char *imagedir;
};
enum {
@@ -26,7 +27,8 @@
PROP_SCREEN_HEIGHT,
PROP_STAGE,
PROP_WINDOW_GROUP,
- PROP_WINDOW_MANAGER
+ PROP_WINDOW_MANAGER,
+ PROP_IMAGEDIR
};
/* Signals */
@@ -96,6 +98,9 @@
case PROP_WINDOW_MANAGER:
g_value_set_object (value, global->wm);
break;
+ case PROP_IMAGEDIR:
+ g_value_set_string (value, global->imagedir);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -103,8 +108,26 @@
}
static void
-shell_global_init(ShellGlobal *global)
+shell_global_init (ShellGlobal *global)
{
+ const char *datadir = g_getenv ("GNOME_SHELL_DATADIR");
+ char *imagedir;
+
+ if (!datadir)
+ datadir = GNOME_SHELL_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
+ * concatenating global.imagedir to a filename.
+ */
+ imagedir = g_build_filename (datadir, "images/", NULL);
+ if (g_file_test (imagedir, G_FILE_TEST_IS_DIR))
+ global->imagedir = imagedir;
+ else
+ {
+ g_free (imagedir);
+ global->imagedir = g_strdup_printf ("%s/", datadir);
+ }
}
static void
@@ -183,6 +206,13 @@
"Window management interface",
SHELL_TYPE_WM,
G_PARAM_READABLE));
+ g_object_class_install_property (gobject_class,
+ PROP_IMAGEDIR,
+ g_param_spec_string ("imagedir",
+ "Image directory",
+ "Directory containing gnome-shell image files",
+ NULL,
+ G_PARAM_READABLE));
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]