Compare commits
	
		
			14 Commits
		
	
	
		
			gnome-3-4
			...
			workspace-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 87ce301faa | ||
|   | 1ab526dc64 | ||
|   | c11162f794 | ||
|   | 8e5d613bfa | ||
|   | 8786da0044 | ||
|   | 3d5cb0f30a | ||
|   | fb28f77c85 | ||
|   | 58c8006f1f | ||
|   | 277cff3013 | ||
|   | cde3ce2e27 | ||
|   | 57a4ad2d00 | ||
|   | 8bc0caa21b | ||
|   | ae478c2344 | ||
|   | 0dfdc9371e | 
							
								
								
									
										35
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -3,11 +3,11 @@ | ||||
| *.o | ||||
| .deps | ||||
| .libs | ||||
| ABOUT-NLS | ||||
| ChangeLog | ||||
| INSTALL | ||||
| Makefile | ||||
| Makefile.in | ||||
| NEWS | ||||
| aclocal.m4 | ||||
| autom4te.cache | ||||
| config.h | ||||
| @@ -18,24 +18,11 @@ config | ||||
| configure | ||||
| data/gnome-shell.desktop | ||||
| data/gnome-shell.desktop.in | ||||
| data/gnome-shell-extension-prefs.desktop | ||||
| data/gnome-shell-extension-prefs.desktop.in | ||||
| data/gschemas.compiled | ||||
| data/org.gnome.shell.gschema.xml | ||||
| data/org.gnome.shell.gschema.valid | ||||
| docs/reference/*/*.args | ||||
| docs/reference/*/*.bak | ||||
| docs/reference/*/*.hierarchy | ||||
| docs/reference/*/*.interfaces | ||||
| docs/reference/*/*.prerequisites | ||||
| docs/reference/*/*.sgml | ||||
| docs/reference/*/*.signals | ||||
| docs/reference/*/*.stamp | ||||
| docs/reference/*/*.txt | ||||
| docs/reference/*/*.types | ||||
| docs/reference/*/html/ | ||||
| docs/reference/*/xml/ | ||||
| gtk-doc.make | ||||
| data/org.gnome.accessibility.magnifier.gschema.xml | ||||
| data/org.gnome.accessibility.magnifier.gschema.valid | ||||
| js/misc/config.js | ||||
| intltool-extract.in | ||||
| intltool-merge.in | ||||
| @@ -45,13 +32,8 @@ m4/ | ||||
| omf.make | ||||
| po/*.gmo | ||||
| po/gnome-shell.pot | ||||
| po/*.header | ||||
| po/*.sed | ||||
| po/*.sin | ||||
| po/Makefile.in.in | ||||
| po/Makevars.template | ||||
| po/POTFILES | ||||
| po/Rules-quot | ||||
| po/stamp-it | ||||
| scripts/launcher.pyc | ||||
| src/*.gir | ||||
| @@ -60,16 +42,8 @@ src/*-enum-types.[ch] | ||||
| src/*-marshal.[ch] | ||||
| src/Makefile | ||||
| src/Makefile.in | ||||
| src/calendar-server/org.gnome.Shell.CalendarServer.service | ||||
| src/gnomeshell-taskpanel | ||||
| src/gnome-shell | ||||
| src/gnome-shell-calendar-server | ||||
| src/gnome-shell-extension-tool | ||||
| src/gnome-shell-extension-prefs | ||||
| src/gnome-shell-hotplug-sniffer | ||||
| src/gnome-shell-jhbuild | ||||
| src/gnome-shell-perf-helper | ||||
| src/gnome-shell-real | ||||
| src/hotplug-sniffer/org.gnome.Shell.HotplugSniffer.service | ||||
| src/run-js-test | ||||
| src/test-recorder | ||||
| src/test-recorder.ogg | ||||
| @@ -82,4 +56,3 @@ tests/run-test.sh | ||||
| xmldocs.make | ||||
| *~ | ||||
| *.patch | ||||
| *.sw? | ||||
|   | ||||
| @@ -3,5 +3,5 @@ E-mail: otaylor@redhat.com | ||||
| Userid: otaylor | ||||
|  | ||||
| Colin Walters | ||||
| E-mail: walters@verbum.org | ||||
| E-mail: walters@redhat.com | ||||
| Userid: walters | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| # Point to our macro directory and pick up user flags from the environment | ||||
| ACLOCAL_AMFLAGS  = -I m4 ${ACLOCAL_FLAGS} | ||||
|  | ||||
| SUBDIRS = data js src browser-plugin tests po man docs | ||||
| SUBDIRS = data js src tests po man | ||||
|  | ||||
| EXTRA_DIST =		\ | ||||
| 	.project	\ | ||||
| @@ -19,5 +19,3 @@ DIST_EXCLUDE =					\ | ||||
| distcheck-hook: | ||||
| 	@echo "Checking disted files against files in git" | ||||
| 	@$(srcdir)/tools/check-for-missing.py $(srcdir) $(distdir) $(DIST_EXCLUDE) | ||||
|  | ||||
| DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc | ||||
|   | ||||
| @@ -1,21 +0,0 @@ | ||||
|  | ||||
| mozillalibdir = $(BROWSER_PLUGIN_DIR) | ||||
|  | ||||
| mozillalib_LTLIBRARIES = libgnome-shell-browser-plugin.la | ||||
|  | ||||
| libgnome_shell_browser_plugin_la_LDFLAGS = -module -avoid-version -no-undefined | ||||
|  | ||||
| libgnome_shell_browser_plugin_la_LIBADD = 	\ | ||||
| 	$(BROWSER_PLUGIN_LIBS) | ||||
|  | ||||
| libgnome_shell_browser_plugin_la_SOURCES = 	\ | ||||
| 	browser-plugin.c \ | ||||
| 	npapi/npapi.h \ | ||||
| 	npapi/npfunctions.h \ | ||||
| 	npapi/npruntime.h \ | ||||
| 	npapi/nptypes.h | ||||
|  | ||||
| libgnome_shell_browser_plugin_la_CFLAGS = 	\ | ||||
| 	$(BROWSER_PLUGIN_CFLAGS)		\ | ||||
| 	-DG_DISABLE_DEPRECATED			\ | ||||
| 	-DG_LOG_DOMAIN=\"GnomeShellBrowserPlugin\" | ||||
| @@ -1,17 +0,0 @@ | ||||
| The GNOME Shell Browser Plugin provides integration with gnome-shell and the | ||||
| corresponding extensions repository, codenamed "SweetTooth". The plugin allows | ||||
| the extensions repository to provide good integration, letting the website | ||||
| know which extensions are enabled and disabled, and allowing the website to | ||||
| enable, disable and install them. | ||||
|  | ||||
| Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell' | ||||
| product. | ||||
|  | ||||
| License | ||||
| ======= | ||||
| The GNOME Shell Browser Plugin, like GNOME Shell itself is distributed under | ||||
| the GNU General Public License, version 2 or later. The plugin also contains | ||||
| header files from the "NPAPI SDK" project, tri-licensed under MPL 1.1, GPL 2.0 | ||||
| and LGPL 2.1. These headers are third-party sources and can be retrieved from: | ||||
|  | ||||
|   http://code.google.com/p/npapi-sdk/ | ||||
| @@ -1,948 +0,0 @@ | ||||
| /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ | ||||
| /* | ||||
|  * Copyright (C) 2011 Red Hat | ||||
|  * | ||||
|  * This program is free software; you can redistribute it and/or | ||||
|  * modify it under the terms of the GNU General Public License as | ||||
|  * published by the Free Software Foundation; either version 2 of the | ||||
|  * License, or (at your option) any later version. | ||||
|  * | ||||
|  * This program is distributed in the hope that it will be useful, but | ||||
|  * WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | ||||
|  * General Public License for more details. | ||||
|  * | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program; if not, write to the Free Software | ||||
|  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||||
|  * 02111-1307, USA. | ||||
|  * | ||||
|  * Authors: | ||||
|  *      Jasper St. Pierre <jstpierre@mecheye.net> | ||||
|  *      Giovanni Campagna <scampa.giovanni@gmail.com> | ||||
|  */ | ||||
|  | ||||
| #include <string.h> | ||||
|  | ||||
| #define XP_UNIX 1 | ||||
|  | ||||
| #include "npapi/npapi.h" | ||||
| #include "npapi/npruntime.h" | ||||
| #include "npapi/npfunctions.h" | ||||
|  | ||||
| #include <glib.h> | ||||
| #include <gio/gio.h> | ||||
| #include <json-glib/json-glib.h> | ||||
|  | ||||
| #define ORIGIN "extensions.gnome.org" | ||||
| #define PLUGIN_NAME "Gnome Shell Integration" | ||||
| #define PLUGIN_DESCRIPTION "This plugin provides integration with Gnome Shell " \ | ||||
|       "for live extension enabling and disabling. " \ | ||||
|       "It can be used only by extensions.gnome.org" | ||||
| #define PLUGIN_MIME_STRING "application/x-gnome-shell-integration::Gnome Shell Integration Dummy Content-Type"; | ||||
|  | ||||
| #define PLUGIN_API_VERSION 3 | ||||
|  | ||||
| typedef struct { | ||||
|   GDBusProxy *proxy; | ||||
| } PluginData; | ||||
|  | ||||
| static NPNetscapeFuncs funcs; | ||||
|  | ||||
| static inline gchar * | ||||
| get_string_property (NPP         instance, | ||||
|                      NPObject   *obj, | ||||
|                      const char *name) | ||||
| { | ||||
|   NPVariant result = { NPVariantType_Void }; | ||||
|   NPString result_str; | ||||
|   gchar *result_copy; | ||||
|  | ||||
|   result_copy = NULL; | ||||
|  | ||||
|   if (!funcs.getproperty (instance, obj, | ||||
|                           funcs.getstringidentifier (name), | ||||
|                           &result)) | ||||
|     goto out; | ||||
|  | ||||
|   if (!NPVARIANT_IS_STRING (result)) | ||||
|     goto out; | ||||
|  | ||||
|   result_str = NPVARIANT_TO_STRING (result); | ||||
|   result_copy = g_strndup (result_str.UTF8Characters, result_str.UTF8Length); | ||||
|  | ||||
|  out: | ||||
|   funcs.releasevariantvalue (&result); | ||||
|   return result_copy; | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| check_origin_and_protocol (NPP instance) | ||||
| { | ||||
|   gboolean ret = FALSE; | ||||
|   NPError error; | ||||
|   NPObject *window = NULL; | ||||
|   NPVariant document = { NPVariantType_Void }; | ||||
|   NPVariant location = { NPVariantType_Void }; | ||||
|   gchar *hostname = NULL; | ||||
|   gchar *protocol = NULL; | ||||
|  | ||||
|   error = funcs.getvalue (instance, NPNVWindowNPObject, &window); | ||||
|   if (error != NPERR_NO_ERROR) | ||||
|     goto out; | ||||
|  | ||||
|   if (!funcs.getproperty (instance, window, | ||||
|                           funcs.getstringidentifier ("document"), | ||||
|                           &document)) | ||||
|     goto out; | ||||
|  | ||||
|   if (!NPVARIANT_IS_OBJECT (document)) | ||||
|     goto out; | ||||
|  | ||||
|   if (!funcs.getproperty (instance, NPVARIANT_TO_OBJECT (document), | ||||
|                           funcs.getstringidentifier ("location"), | ||||
|                           &location)) | ||||
|     goto out; | ||||
|  | ||||
|   if (!NPVARIANT_IS_OBJECT (location)) | ||||
|     goto out; | ||||
|  | ||||
|   hostname = get_string_property (instance, | ||||
|                                   NPVARIANT_TO_OBJECT (location), | ||||
|                                   "hostname"); | ||||
|  | ||||
|   if (g_strcmp0 (hostname, ORIGIN)) | ||||
|     { | ||||
|       g_debug ("origin does not match, is %s", | ||||
|                hostname); | ||||
|  | ||||
|       goto out; | ||||
|     } | ||||
|  | ||||
|   protocol = get_string_property (instance, | ||||
|                                   NPVARIANT_TO_OBJECT (location), | ||||
|                                   "protocol"); | ||||
|  | ||||
|   if (g_strcmp0 (protocol, "https:") != 0) | ||||
|     { | ||||
|       g_debug ("protocol does not match, is %s", | ||||
|                protocol); | ||||
|  | ||||
|       goto out; | ||||
|     } | ||||
|  | ||||
|   ret = TRUE; | ||||
|  | ||||
|  out: | ||||
|   g_free (protocol); | ||||
|   g_free (hostname); | ||||
|  | ||||
|   funcs.releasevariantvalue (&location); | ||||
|   funcs.releasevariantvalue (&document); | ||||
|  | ||||
|   if (window != NULL) | ||||
|     funcs.releaseobject (window); | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| /* =============== public entry points =================== */ | ||||
|  | ||||
| NPError | ||||
| NP_Initialize(NPNetscapeFuncs *pfuncs, NPPluginFuncs *plugin) | ||||
| { | ||||
|   /* global initialization routine, called once when plugin | ||||
|      is loaded */ | ||||
|  | ||||
|   g_type_init (); | ||||
|  | ||||
|   g_debug ("plugin loaded"); | ||||
|  | ||||
|   memcpy (&funcs, pfuncs, sizeof (funcs)); | ||||
|  | ||||
|   plugin->size = sizeof(NPPluginFuncs); | ||||
|   plugin->newp = NPP_New; | ||||
|   plugin->destroy = NPP_Destroy; | ||||
|   plugin->getvalue = NPP_GetValue; | ||||
|  | ||||
|   return NPERR_NO_ERROR; | ||||
| } | ||||
|  | ||||
| NPError | ||||
| NP_Shutdown(void) | ||||
| { | ||||
|   return NPERR_NO_ERROR; | ||||
| } | ||||
|  | ||||
| const char* | ||||
| NP_GetMIMEDescription(void) | ||||
| { | ||||
|   return PLUGIN_MIME_STRING; | ||||
| } | ||||
|  | ||||
| NPError | ||||
| NP_GetValue(void         *instance, | ||||
|             NPPVariable   variable, | ||||
|             void         *value) | ||||
| { | ||||
|   switch (variable) { | ||||
|   case NPPVpluginNameString: | ||||
|     *(char**)value = PLUGIN_NAME; | ||||
|     break; | ||||
|   case NPPVpluginDescriptionString: | ||||
|     *(char**)value = PLUGIN_DESCRIPTION; | ||||
|     break; | ||||
|   default: | ||||
|     ; | ||||
|   } | ||||
|  | ||||
|   return NPERR_NO_ERROR; | ||||
| } | ||||
|  | ||||
| NPError | ||||
| NPP_New(NPMIMEType    mimetype, | ||||
|         NPP           instance, | ||||
|         uint16_t      mode, | ||||
|         int16_t       argc, | ||||
|         char        **argn, | ||||
|         char        **argv, | ||||
|         NPSavedData  *saved) | ||||
| { | ||||
|   /* instance initialization function */ | ||||
|   PluginData *data; | ||||
|   GError *error = NULL; | ||||
|  | ||||
|   g_debug ("plugin created"); | ||||
|  | ||||
|   if (!check_origin_and_protocol (instance)) | ||||
|     return NPERR_GENERIC_ERROR; | ||||
|  | ||||
|   data = g_slice_new (PluginData); | ||||
|   instance->pdata = data; | ||||
|  | ||||
|   data->proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, | ||||
|                                                G_DBUS_PROXY_FLAGS_NONE, | ||||
|                                                NULL, /* interface info */ | ||||
|                                                "org.gnome.Shell", | ||||
|                                                "/org/gnome/Shell", | ||||
|                                                "org.gnome.Shell", | ||||
|                                                NULL, /* GCancellable */ | ||||
|                                                &error); | ||||
|   if (!data->proxy) | ||||
|     { | ||||
|       /* ignore error if the shell is not running, otherwise warn */ | ||||
|       if (error->domain != G_DBUS_ERROR || | ||||
|           error->code != G_DBUS_ERROR_NAME_HAS_NO_OWNER) | ||||
|         { | ||||
|           g_warning ("Failed to set up Shell proxy: %s", error->message); | ||||
|         } | ||||
|       g_clear_error (&error); | ||||
|       return NPERR_GENERIC_ERROR; | ||||
|     } | ||||
|  | ||||
|   g_debug ("plugin created successfully"); | ||||
|  | ||||
|   return NPERR_NO_ERROR; | ||||
| } | ||||
|  | ||||
| NPError | ||||
| NPP_Destroy(NPP           instance, | ||||
| 	    NPSavedData **saved) | ||||
| { | ||||
|   /* instance finalization function */ | ||||
|  | ||||
|   PluginData *data = instance->pdata; | ||||
|  | ||||
|   g_debug ("plugin destroyed"); | ||||
|  | ||||
|   g_object_unref (data->proxy); | ||||
|  | ||||
|   g_slice_free (PluginData, data); | ||||
|  | ||||
|   return NPERR_NO_ERROR; | ||||
| } | ||||
|  | ||||
| /* =================== scripting interface =================== */ | ||||
|  | ||||
| typedef struct { | ||||
|   NPObject     parent; | ||||
|   NPP          instance; | ||||
|   GDBusProxy  *proxy; | ||||
|   NPObject    *listener; | ||||
|   NPObject    *restart_listener; | ||||
|   gint         signal_id; | ||||
|   guint        watch_name_id; | ||||
| } PluginObject; | ||||
|  | ||||
| static void | ||||
| on_shell_signal (GDBusProxy *proxy, | ||||
|                  gchar      *sender_name, | ||||
|                  gchar      *signal_name, | ||||
|                  GVariant   *parameters, | ||||
|                  gpointer    user_data) | ||||
| { | ||||
|   PluginObject *obj = user_data; | ||||
|  | ||||
|   if (strcmp (signal_name, "ExtensionStatusChanged") == 0) | ||||
|     { | ||||
|       gchar *uuid; | ||||
|       gint32 status; | ||||
|       gchar *error; | ||||
|       NPVariant args[3]; | ||||
|       NPVariant result = { NPVariantType_Void }; | ||||
|  | ||||
|       g_variant_get (parameters, "(sis)", &uuid, &status, &error); | ||||
|       STRINGZ_TO_NPVARIANT (uuid, args[0]); | ||||
|       INT32_TO_NPVARIANT (status, args[1]); | ||||
|       STRINGZ_TO_NPVARIANT (error, args[2]); | ||||
|  | ||||
|       funcs.invokeDefault (obj->instance, obj->listener, | ||||
| 			   args, 3, &result); | ||||
|  | ||||
|       funcs.releasevariantvalue (&result); | ||||
|       g_free (uuid); | ||||
|       g_free (error); | ||||
|     } | ||||
| } | ||||
|  | ||||
| static void | ||||
| on_shell_appeared (GDBusConnection *connection, | ||||
|                    const gchar     *name, | ||||
|                    const gchar     *name_owner, | ||||
|                    gpointer         user_data) | ||||
| { | ||||
|   PluginObject *obj = (PluginObject*) user_data; | ||||
|  | ||||
|   if (obj->restart_listener) | ||||
|     { | ||||
|       NPVariant result = { NPVariantType_Void }; | ||||
|  | ||||
|       funcs.invokeDefault (obj->instance, obj->restart_listener, | ||||
|                            NULL, 0, &result); | ||||
|  | ||||
|       funcs.releasevariantvalue (&result); | ||||
|     } | ||||
| } | ||||
|  | ||||
| static NPObject * | ||||
| plugin_object_allocate (NPP      instance, | ||||
|                         NPClass *klass) | ||||
| { | ||||
|   PluginData *data = instance->pdata; | ||||
|   PluginObject *obj = g_slice_new0 (PluginObject); | ||||
|  | ||||
|   obj->instance = instance; | ||||
|   obj->proxy = g_object_ref (data->proxy); | ||||
|   obj->signal_id = g_signal_connect (obj->proxy, "g-signal", | ||||
|                                      G_CALLBACK (on_shell_signal), obj); | ||||
|  | ||||
|   obj->watch_name_id = g_bus_watch_name (G_BUS_TYPE_SESSION, | ||||
|                                          "org.gnome.Shell", | ||||
|                                          G_BUS_NAME_WATCHER_FLAGS_NONE, | ||||
|                                          on_shell_appeared, | ||||
|                                          NULL, | ||||
|                                          obj, | ||||
|                                          NULL); | ||||
|  | ||||
|   g_debug ("plugin object created"); | ||||
|  | ||||
|   return (NPObject*)obj; | ||||
| } | ||||
|  | ||||
| static void | ||||
| plugin_object_deallocate (NPObject *npobj) | ||||
| { | ||||
|   PluginObject *obj = (PluginObject*)npobj; | ||||
|  | ||||
|   g_signal_handler_disconnect (obj->proxy, obj->signal_id); | ||||
|   g_object_unref (obj->proxy); | ||||
|  | ||||
|   if (obj->listener) | ||||
|     funcs.releaseobject (obj->listener); | ||||
|  | ||||
|   if (obj->watch_name_id) | ||||
|     g_bus_unwatch_name (obj->watch_name_id); | ||||
|  | ||||
|   g_debug ("plugin object destroyed"); | ||||
|  | ||||
|   g_slice_free (PluginObject, obj); | ||||
| } | ||||
|  | ||||
| static NPIdentifier api_version_id; | ||||
| static NPIdentifier shell_version_id; | ||||
| static NPIdentifier get_info_id; | ||||
| static NPIdentifier list_extensions_id; | ||||
| static NPIdentifier enable_extension_id; | ||||
| static NPIdentifier install_extension_id; | ||||
| static NPIdentifier uninstall_extension_id; | ||||
| static NPIdentifier onextension_changed_id; | ||||
| static NPIdentifier onrestart_id; | ||||
| static NPIdentifier get_errors_id; | ||||
| static NPIdentifier launch_extension_prefs_id; | ||||
|  | ||||
| static bool | ||||
| plugin_object_has_method (NPObject     *npobj, | ||||
|                           NPIdentifier  name) | ||||
| { | ||||
|   return (name == get_info_id || | ||||
|           name == list_extensions_id || | ||||
|           name == enable_extension_id || | ||||
|           name == install_extension_id || | ||||
|           name == uninstall_extension_id || | ||||
|           name == get_errors_id || | ||||
|           name == launch_extension_prefs_id); | ||||
| } | ||||
|  | ||||
| static inline gboolean | ||||
| uuid_is_valid (const gchar *uuid) | ||||
| { | ||||
|   gsize i; | ||||
|  | ||||
|   for (i = 0; uuid[i]; i ++) | ||||
|     { | ||||
|       gchar c = uuid[i]; | ||||
|       if (c < 32 || c >= 127) | ||||
|         return FALSE; | ||||
|  | ||||
|       switch (c) | ||||
|         { | ||||
|         case '&': | ||||
|         case '<': | ||||
|         case '>': | ||||
|         case '/': | ||||
|         case '\\': | ||||
|           return FALSE; | ||||
|         default: | ||||
|           break; | ||||
|         } | ||||
|     } | ||||
|   return TRUE; | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| jsonify_variant (GVariant  *variant, | ||||
|                  NPVariant *result) | ||||
| { | ||||
|   gboolean ret; | ||||
|   GVariant *real_value; | ||||
|   JsonNode *root; | ||||
|   JsonGenerator *generator; | ||||
|   gsize json_length; | ||||
|   gchar *json; | ||||
|   gchar *buffer; | ||||
|  | ||||
|   ret = TRUE; | ||||
|  | ||||
|   /* DBus methods can return multiple values, | ||||
|    * but we're only interested in the first. */ | ||||
|   g_variant_get (variant, "(@*)", &real_value); | ||||
|  | ||||
|   root = json_gvariant_serialize (real_value); | ||||
|  | ||||
|   generator = json_generator_new (); | ||||
|   json_generator_set_root (generator, root); | ||||
|   json = json_generator_to_data (generator, &json_length); | ||||
|  | ||||
|   buffer = funcs.memalloc (json_length + 1); | ||||
|   if (!buffer) | ||||
|     { | ||||
|       ret = FALSE; | ||||
|       goto out; | ||||
|     } | ||||
|  | ||||
|   strcpy (buffer, json); | ||||
|  | ||||
|   STRINGN_TO_NPVARIANT (buffer, json_length, *result); | ||||
|  | ||||
|  out: | ||||
|   g_variant_unref (variant); | ||||
|   g_variant_unref (real_value); | ||||
|   json_node_free (root); | ||||
|   g_free (json); | ||||
|  | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| plugin_list_extensions (PluginObject  *obj, | ||||
|                         NPVariant     *result) | ||||
| { | ||||
|   GError *error = NULL; | ||||
|   GVariant *res; | ||||
|  | ||||
|   res = g_dbus_proxy_call_sync (obj->proxy, | ||||
|                                 "ListExtensions", | ||||
|                                 NULL, /* parameters */ | ||||
|                                 G_DBUS_CALL_FLAGS_NONE, | ||||
|                                 -1, /* timeout */ | ||||
|                                 NULL, /* cancellable */ | ||||
|                                 &error); | ||||
|  | ||||
|   if (!res) | ||||
|     { | ||||
|       g_warning ("Failed to retrieve extension list: %s", error->message); | ||||
|       g_error_free (error); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   return jsonify_variant (res, result); | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| plugin_enable_extension (PluginObject *obj, | ||||
|                          NPString      uuid, | ||||
|                          gboolean      enabled) | ||||
| { | ||||
|   gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); | ||||
|   if (!uuid_is_valid (uuid_str)) | ||||
|     { | ||||
|       g_free (uuid_str); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   g_dbus_proxy_call (obj->proxy, | ||||
|                      (enabled ? "EnableExtension" : "DisableExtension"), | ||||
|                      g_variant_new ("(s)", uuid_str), | ||||
|                      G_DBUS_CALL_FLAGS_NONE, | ||||
|                      -1, /* timeout */ | ||||
|                      NULL, /* cancellable */ | ||||
|                      NULL, /* callback */ | ||||
|                      NULL /* user_data */); | ||||
|  | ||||
|   g_free (uuid_str); | ||||
|  | ||||
|   return TRUE; | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| plugin_install_extension (PluginObject *obj, | ||||
|                           NPString      uuid, | ||||
|                           NPString      version_tag) | ||||
| { | ||||
|   gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); | ||||
|   gchar *version_tag_str; | ||||
|  | ||||
|   if (!uuid_is_valid (uuid_str)) | ||||
|     { | ||||
|       g_free (uuid_str); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   version_tag_str = g_strndup (version_tag.UTF8Characters, | ||||
|                                version_tag.UTF8Length); | ||||
|  | ||||
|   g_dbus_proxy_call (obj->proxy, | ||||
|                      "InstallRemoteExtension", | ||||
|                      g_variant_new ("(ss)", | ||||
|                                     uuid_str, | ||||
|                                     version_tag_str), | ||||
|                      G_DBUS_CALL_FLAGS_NONE, | ||||
|                      -1, /* timeout */ | ||||
|                      NULL, /* cancellable */ | ||||
|                      NULL, /* callback */ | ||||
|                      NULL /* user_data */); | ||||
|  | ||||
|   g_free (uuid_str); | ||||
|   g_free (version_tag_str); | ||||
|  | ||||
|   return TRUE; | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| plugin_uninstall_extension (PluginObject *obj, | ||||
|                             NPString      uuid, | ||||
|                             NPVariant    *result) | ||||
| { | ||||
|   GError *error = NULL; | ||||
|   GVariant *res; | ||||
|   gchar *uuid_str; | ||||
|  | ||||
|   uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); | ||||
|   if (!uuid_is_valid (uuid_str)) | ||||
|     { | ||||
|       g_free (uuid_str); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   res = g_dbus_proxy_call_sync (obj->proxy, | ||||
|                                 "UninstallExtension", | ||||
|                                 g_variant_new ("(s)", | ||||
|                                                uuid_str), | ||||
|                                 G_DBUS_CALL_FLAGS_NONE, | ||||
|                                 -1, /* timeout */ | ||||
|                                 NULL, /* cancellable */ | ||||
|                                 &error); | ||||
|  | ||||
|   g_free (uuid_str); | ||||
|  | ||||
|   if (!res) | ||||
|     { | ||||
|       g_warning ("Failed to uninstall extension: %s", error->message); | ||||
|       g_error_free (error); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   return jsonify_variant (res, result); | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| plugin_get_info (PluginObject *obj, | ||||
|                  NPString      uuid, | ||||
|                  NPVariant    *result) | ||||
| { | ||||
|   GError *error = NULL; | ||||
|   GVariant *res; | ||||
|   gchar *uuid_str; | ||||
|  | ||||
|   uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); | ||||
|   if (!uuid_is_valid (uuid_str)) | ||||
|     { | ||||
|       g_free (uuid_str); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   res = g_dbus_proxy_call_sync (obj->proxy, | ||||
|                                 "GetExtensionInfo", | ||||
|                                 g_variant_new ("(s)", uuid_str), | ||||
|                                 G_DBUS_CALL_FLAGS_NONE, | ||||
|                                 -1, /* timeout */ | ||||
|                                 NULL, /* cancellable */ | ||||
|                                 &error); | ||||
|  | ||||
|   g_free (uuid_str); | ||||
|  | ||||
|   if (!res) | ||||
|     { | ||||
|       g_warning ("Failed to retrieve extension metadata: %s", error->message); | ||||
|       g_error_free (error); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   return jsonify_variant (res, result); | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| plugin_get_errors (PluginObject *obj, | ||||
|                    NPString      uuid, | ||||
|                    NPVariant    *result) | ||||
| { | ||||
|   GError *error = NULL; | ||||
|   GVariant *res; | ||||
|   gchar *uuid_str; | ||||
|  | ||||
|   uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); | ||||
|   if (!uuid_is_valid (uuid_str)) | ||||
|     { | ||||
|       g_free (uuid_str); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   res = g_dbus_proxy_call_sync (obj->proxy, | ||||
|                                 "GetExtensionErrors", | ||||
|                                 g_variant_new ("(s)", uuid_str), | ||||
|                                 G_DBUS_CALL_FLAGS_NONE, | ||||
|                                 -1, /* timeout */ | ||||
|                                 NULL, /* cancellable */ | ||||
|                                 &error); | ||||
|  | ||||
|   g_free (uuid_str); | ||||
|  | ||||
|   if (!res) | ||||
|     { | ||||
|       g_warning ("Failed to retrieve errors: %s", error->message); | ||||
|       g_error_free (error); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   return jsonify_variant (res, result); | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| plugin_launch_extension_prefs (PluginObject *obj, | ||||
|                                NPString      uuid, | ||||
|                                NPVariant    *result) | ||||
| { | ||||
|   gchar *uuid_str; | ||||
|  | ||||
|   uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); | ||||
|   if (!uuid_is_valid (uuid_str)) | ||||
|     { | ||||
|       g_free (uuid_str); | ||||
|       return FALSE; | ||||
|     } | ||||
|  | ||||
|   g_dbus_proxy_call (obj->proxy, | ||||
|                      "LaunchExtensionPrefs", | ||||
|                      g_variant_new ("(s)", uuid_str), | ||||
|                      G_DBUS_CALL_FLAGS_NONE, | ||||
|                      -1, /* timeout */ | ||||
|                      NULL, /* cancellable */ | ||||
|                      NULL, /* callback */ | ||||
|                      NULL /* user_data */); | ||||
|  | ||||
|   g_free (uuid_str); | ||||
|   return TRUE; | ||||
| } | ||||
|  | ||||
| static int | ||||
| plugin_get_api_version (PluginObject  *obj, | ||||
|                         NPVariant     *result) | ||||
| { | ||||
|   INT32_TO_NPVARIANT (PLUGIN_API_VERSION, *result); | ||||
|   return TRUE; | ||||
| } | ||||
|  | ||||
| static gboolean | ||||
| plugin_get_shell_version (PluginObject  *obj, | ||||
|                           NPVariant     *result) | ||||
| { | ||||
|   GVariant *res; | ||||
|   const gchar *version; | ||||
|   gsize length; | ||||
|   gchar *buffer; | ||||
|   gboolean ret; | ||||
|  | ||||
|   ret = TRUE; | ||||
|  | ||||
|   res = g_dbus_proxy_get_cached_property (obj->proxy, | ||||
|                                           "ShellVersion"); | ||||
|  | ||||
|   if (res == NULL) | ||||
|     { | ||||
|       g_warning ("Failed to grab shell version."); | ||||
|       version = "-1"; | ||||
|     } | ||||
|   else | ||||
|     { | ||||
|       g_variant_get (res, "&s", &version); | ||||
|     } | ||||
|  | ||||
|   length = strlen (version); | ||||
|   buffer = funcs.memalloc (length + 1); | ||||
|   if (!buffer) | ||||
|     { | ||||
|       ret = FALSE; | ||||
|       goto out; | ||||
|     } | ||||
|   strcpy (buffer, version); | ||||
|  | ||||
|   STRINGN_TO_NPVARIANT (buffer, length, *result); | ||||
|  | ||||
|  out: | ||||
|   if (res) | ||||
|     g_variant_unref (res); | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| static bool | ||||
| plugin_object_invoke (NPObject        *npobj, | ||||
|                       NPIdentifier     name, | ||||
|                       const NPVariant *args, | ||||
|                       uint32_t         argc, | ||||
|                       NPVariant       *result) | ||||
| { | ||||
|   PluginObject *obj; | ||||
|  | ||||
|   g_debug ("invoking plugin object method"); | ||||
|  | ||||
|   obj = (PluginObject*) npobj; | ||||
|  | ||||
|   VOID_TO_NPVARIANT (*result); | ||||
|  | ||||
|   if (!plugin_object_has_method (npobj, name)) | ||||
|     return FALSE; | ||||
|  | ||||
|   if (name == list_extensions_id) | ||||
|     return plugin_list_extensions (obj, result); | ||||
|   else if (name == get_info_id) | ||||
|     { | ||||
|       if (!NPVARIANT_IS_STRING(args[0])) return FALSE; | ||||
|  | ||||
|       return plugin_get_info (obj, NPVARIANT_TO_STRING(args[0]), result); | ||||
|     } | ||||
|   else if (name == enable_extension_id) | ||||
|     { | ||||
|       if (!NPVARIANT_IS_STRING(args[0])) return FALSE; | ||||
|       if (!NPVARIANT_IS_BOOLEAN(args[1])) return FALSE; | ||||
|  | ||||
|       return plugin_enable_extension (obj, | ||||
|                                       NPVARIANT_TO_STRING(args[0]), | ||||
|                                       NPVARIANT_TO_BOOLEAN(args[1])); | ||||
|     } | ||||
|   else if (name == install_extension_id) | ||||
|     { | ||||
|       if (!NPVARIANT_IS_STRING(args[0])) return FALSE; | ||||
|       if (!NPVARIANT_IS_STRING(args[1])) return FALSE; | ||||
|  | ||||
|       return plugin_install_extension (obj, | ||||
|                                        NPVARIANT_TO_STRING(args[0]), | ||||
|                                        NPVARIANT_TO_STRING(args[1])); | ||||
|     } | ||||
|   else if (name == uninstall_extension_id) | ||||
|     { | ||||
|       if (!NPVARIANT_IS_STRING(args[0])) return FALSE; | ||||
|  | ||||
|       return plugin_uninstall_extension (obj, | ||||
|                                          NPVARIANT_TO_STRING(args[0]), | ||||
|                                          result); | ||||
|     } | ||||
|   else if (name == get_errors_id) | ||||
|     { | ||||
|       if (!NPVARIANT_IS_STRING(args[0])) return FALSE; | ||||
|  | ||||
|       return plugin_get_errors (obj, | ||||
|                                 NPVARIANT_TO_STRING(args[0]), | ||||
|                                 result); | ||||
|     } | ||||
|   else if (name == launch_extension_prefs_id) | ||||
|     { | ||||
|       if (!NPVARIANT_IS_STRING(args[0])) return FALSE; | ||||
|  | ||||
|       return plugin_launch_extension_prefs (obj, | ||||
|                                             NPVARIANT_TO_STRING(args[0]), | ||||
|                                             result); | ||||
|     } | ||||
|  | ||||
|   return TRUE; | ||||
| } | ||||
|  | ||||
| static bool | ||||
| plugin_object_has_property (NPObject     *npobj, | ||||
|                             NPIdentifier  name) | ||||
| { | ||||
|   return (name == onextension_changed_id || | ||||
|           name == onrestart_id || | ||||
|           name == api_version_id || | ||||
|           name == shell_version_id); | ||||
| } | ||||
|  | ||||
| static bool | ||||
| plugin_object_get_property (NPObject     *npobj, | ||||
|                             NPIdentifier  name, | ||||
|                             NPVariant    *result) | ||||
| { | ||||
|   PluginObject *obj; | ||||
|  | ||||
|   if (!plugin_object_has_property (npobj, name)) | ||||
|     return FALSE; | ||||
|  | ||||
|   obj = (PluginObject*) npobj; | ||||
|   if (name == api_version_id) | ||||
|     return plugin_get_api_version (obj, result); | ||||
|   else if (name == shell_version_id) | ||||
|     return plugin_get_shell_version (obj, result); | ||||
|   else if (name == onextension_changed_id) | ||||
|     { | ||||
|       if (obj->listener) | ||||
|         OBJECT_TO_NPVARIANT (obj->listener, *result); | ||||
|       else | ||||
|         NULL_TO_NPVARIANT (*result); | ||||
|     } | ||||
|   else if (name == onrestart_id) | ||||
|     { | ||||
|       if (obj->restart_listener) | ||||
|         OBJECT_TO_NPVARIANT (obj->restart_listener, *result); | ||||
|       else | ||||
|         NULL_TO_NPVARIANT (*result); | ||||
|     } | ||||
|  | ||||
|   return TRUE; | ||||
| } | ||||
|  | ||||
| static bool | ||||
| plugin_object_set_callback (NPObject        **listener, | ||||
|                             const NPVariant  *value) | ||||
| { | ||||
|   if (!NPVARIANT_IS_OBJECT (*value) && !NPVARIANT_IS_NULL (*value)) | ||||
|     return FALSE; | ||||
|  | ||||
|   if (*listener) | ||||
|     funcs.releaseobject (*listener); | ||||
|   *listener = NULL; | ||||
|  | ||||
|   if (NPVARIANT_IS_OBJECT (*value)) | ||||
|     { | ||||
|       *listener = NPVARIANT_TO_OBJECT (*value); | ||||
|       funcs.retainobject (*listener); | ||||
|     } | ||||
|  | ||||
|   return TRUE; | ||||
| } | ||||
|  | ||||
| static bool | ||||
| plugin_object_set_property (NPObject        *npobj, | ||||
|                             NPIdentifier     name, | ||||
|                             const NPVariant *value) | ||||
| { | ||||
|   PluginObject *obj; | ||||
|  | ||||
|   obj = (PluginObject *)npobj; | ||||
|  | ||||
|   if (name == onextension_changed_id) | ||||
|     return plugin_object_set_callback (&obj->listener, value); | ||||
|  | ||||
|   if (name == onrestart_id) | ||||
|     return plugin_object_set_callback (&obj->restart_listener, value); | ||||
|  | ||||
|   return FALSE; | ||||
| } | ||||
|  | ||||
| static NPClass plugin_class = { | ||||
|   NP_CLASS_STRUCT_VERSION, | ||||
|   plugin_object_allocate, | ||||
|   plugin_object_deallocate, | ||||
|   NULL, /* invalidate */ | ||||
|   plugin_object_has_method, | ||||
|   plugin_object_invoke, | ||||
|   NULL, /* invoke default */ | ||||
|   plugin_object_has_property, | ||||
|   plugin_object_get_property, | ||||
|   plugin_object_set_property, | ||||
|   NULL, /* remove property */ | ||||
|   NULL, /* enumerate */ | ||||
|   NULL, /* construct */ | ||||
| }; | ||||
|  | ||||
| static void | ||||
| init_methods_and_properties (void) | ||||
| { | ||||
|   /* this is the JS public API; it is manipulated through NPIdentifiers for speed */ | ||||
|   api_version_id = funcs.getstringidentifier ("apiVersion"); | ||||
|   shell_version_id = funcs.getstringidentifier ("shellVersion"); | ||||
|  | ||||
|   get_info_id = funcs.getstringidentifier ("getExtensionInfo"); | ||||
|   list_extensions_id = funcs.getstringidentifier ("listExtensions"); | ||||
|   enable_extension_id = funcs.getstringidentifier ("setExtensionEnabled"); | ||||
|   install_extension_id = funcs.getstringidentifier ("installExtension"); | ||||
|   uninstall_extension_id = funcs.getstringidentifier ("uninstallExtension"); | ||||
|   get_errors_id = funcs.getstringidentifier ("getExtensionErrors"); | ||||
|   launch_extension_prefs_id = funcs.getstringidentifier ("launchExtensionPrefs"); | ||||
|  | ||||
|   onrestart_id = funcs.getstringidentifier ("onshellrestart"); | ||||
|   onextension_changed_id = funcs.getstringidentifier ("onchange"); | ||||
| } | ||||
|  | ||||
| NPError | ||||
| NPP_GetValue(NPP          instance, | ||||
| 	     NPPVariable  variable, | ||||
| 	     void        *value) | ||||
| { | ||||
|   g_debug ("NPP_GetValue called"); | ||||
|  | ||||
|   switch (variable) { | ||||
|   case NPPVpluginScriptableNPObject: | ||||
|     g_debug ("creating scriptable object"); | ||||
|     init_methods_and_properties (); | ||||
|  | ||||
|     *(NPObject**)value = funcs.createobject (instance, &plugin_class); | ||||
|     break; | ||||
|  | ||||
|   case NPPVpluginNeedsXEmbed: | ||||
|     *(bool *)value = TRUE; | ||||
|     break; | ||||
|  | ||||
|   default: | ||||
|     ; | ||||
|   } | ||||
|  | ||||
|   return NPERR_NO_ERROR; | ||||
| } | ||||
| @@ -1,893 +0,0 @@ | ||||
| /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||||
| /* ***** BEGIN LICENSE BLOCK ***** | ||||
|  * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | ||||
|  * | ||||
|  * The contents of this file are subject to the Mozilla Public License Version | ||||
|  * 1.1 (the "License"); you may not use this file except in compliance with | ||||
|  * the License. You may obtain a copy of the License at | ||||
|  * http://www.mozilla.org/MPL/ | ||||
|  * | ||||
|  * Software distributed under the License is distributed on an "AS IS" basis, | ||||
|  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||||
|  * for the specific language governing rights and limitations under the | ||||
|  * License. | ||||
|  * | ||||
|  * The Original Code is mozilla.org code. | ||||
|  * | ||||
|  * The Initial Developer of the Original Code is | ||||
|  * Netscape Communications Corporation. | ||||
|  * Portions created by the Initial Developer are Copyright (C) 1998 | ||||
|  * the Initial Developer. All Rights Reserved. | ||||
|  * | ||||
|  * Contributor(s): | ||||
|  * | ||||
|  * Alternatively, the contents of this file may be used under the terms of | ||||
|  * either the GNU General Public License Version 2 or later (the "GPL"), or | ||||
|  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), | ||||
|  * in which case the provisions of the GPL or the LGPL are applicable instead | ||||
|  * of those above. If you wish to allow use of your version of this file only | ||||
|  * under the terms of either the GPL or the LGPL, and not to allow others to | ||||
|  * use your version of this file under the terms of the MPL, indicate your | ||||
|  * decision by deleting the provisions above and replace them with the notice | ||||
|  * and other provisions required by the GPL or the LGPL. If you do not delete | ||||
|  * the provisions above, a recipient may use your version of this file under | ||||
|  * the terms of any one of the MPL, the GPL or the LGPL. | ||||
|  * | ||||
|  * ***** END LICENSE BLOCK ***** */ | ||||
|  | ||||
| #ifndef npapi_h_ | ||||
| #define npapi_h_ | ||||
|  | ||||
| #if defined(__OS2__) | ||||
| #pragma pack(1) | ||||
| #endif | ||||
|  | ||||
| #include "nptypes.h" | ||||
|  | ||||
| #if defined(__OS2__) || defined(OS2) | ||||
| #ifndef XP_OS2 | ||||
| #define XP_OS2 1 | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #if defined(_WIN32) && !defined(__SYMBIAN32__) | ||||
| #include <windef.h> | ||||
| #ifndef XP_WIN | ||||
| #define XP_WIN 1 | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #if defined(__SYMBIAN32__) | ||||
| #ifndef XP_SYMBIAN | ||||
| #define XP_SYMBIAN 1 | ||||
| #undef XP_WIN | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #if defined(__APPLE_CC__) && !defined(XP_UNIX) | ||||
| #ifndef XP_MACOSX | ||||
| #define XP_MACOSX 1 | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #if defined(XP_MACOSX) && defined(__LP64__) | ||||
| #define NP_NO_QUICKDRAW | ||||
| #define NP_NO_CARBON | ||||
| #endif | ||||
|  | ||||
| #if defined(XP_MACOSX) | ||||
| #include <ApplicationServices/ApplicationServices.h> | ||||
| #include <OpenGL/OpenGL.h> | ||||
| #ifndef NP_NO_CARBON | ||||
| #include <Carbon/Carbon.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #if defined(XP_UNIX) | ||||
| #include <stdio.h> | ||||
| #if defined(MOZ_X11) | ||||
| #include <X11/Xlib.h> | ||||
| #include <X11/Xutil.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #if defined(XP_SYMBIAN) | ||||
| #include <QEvent> | ||||
| #include <QRegion> | ||||
| #endif | ||||
|  | ||||
| /*----------------------------------------------------------------------*/ | ||||
| /*                        Plugin Version Constants                      */ | ||||
| /*----------------------------------------------------------------------*/ | ||||
|  | ||||
| #define NP_VERSION_MAJOR 0 | ||||
| #define NP_VERSION_MINOR 27 | ||||
|  | ||||
|  | ||||
| /* The OS/2 version of Netscape uses RC_DATA to define the | ||||
|    mime types, file extensions, etc that are required. | ||||
|    Use a vertical bar to separate types, end types with \0. | ||||
|    FileVersion and ProductVersion are 32bit ints, all other | ||||
|    entries are strings that MUST be terminated with a \0. | ||||
|  | ||||
| AN EXAMPLE: | ||||
|  | ||||
| RCDATA NP_INFO_ProductVersion { 1,0,0,1,} | ||||
|  | ||||
| RCDATA NP_INFO_MIMEType    { "video/x-video|", | ||||
|                              "video/x-flick\0" } | ||||
| RCDATA NP_INFO_FileExtents { "avi|", | ||||
|                              "flc\0" } | ||||
| RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", | ||||
|                              "MMOS2 Flc/Fli player(*.flc)\0" } | ||||
|  | ||||
| RCDATA NP_INFO_FileVersion       { 1,0,0,1 } | ||||
| RCDATA NP_INFO_CompanyName       { "Netscape Communications\0" } | ||||
| RCDATA NP_INFO_FileDescription   { "NPAVI32 Extension DLL\0" | ||||
| RCDATA NP_INFO_InternalName      { "NPAVI32\0" ) | ||||
| RCDATA NP_INFO_LegalCopyright    { "Copyright Netscape Communications \251 1996\0" | ||||
| RCDATA NP_INFO_OriginalFilename  { "NVAPI32.DLL" } | ||||
| RCDATA NP_INFO_ProductName       { "NPAVI32 Dynamic Link Library\0" } | ||||
| */ | ||||
| /* RC_DATA types for version info - required */ | ||||
| #define NP_INFO_ProductVersion      1 | ||||
| #define NP_INFO_MIMEType            2 | ||||
| #define NP_INFO_FileOpenName        3 | ||||
| #define NP_INFO_FileExtents         4 | ||||
| /* RC_DATA types for version info - used if found */ | ||||
| #define NP_INFO_FileDescription     5 | ||||
| #define NP_INFO_ProductName         6 | ||||
| /* RC_DATA types for version info - optional */ | ||||
| #define NP_INFO_CompanyName         7 | ||||
| #define NP_INFO_FileVersion         8 | ||||
| #define NP_INFO_InternalName        9 | ||||
| #define NP_INFO_LegalCopyright      10 | ||||
| #define NP_INFO_OriginalFilename    11 | ||||
|  | ||||
| #ifndef RC_INVOKED | ||||
|  | ||||
| /*----------------------------------------------------------------------*/ | ||||
| /*                       Definition of Basic Types                      */ | ||||
| /*----------------------------------------------------------------------*/ | ||||
|  | ||||
| typedef unsigned char NPBool; | ||||
| typedef int16_t       NPError; | ||||
| typedef int16_t       NPReason; | ||||
| typedef char*         NPMIMEType; | ||||
|  | ||||
| /*----------------------------------------------------------------------*/ | ||||
| /*                       Structures and definitions                     */ | ||||
| /*----------------------------------------------------------------------*/ | ||||
|  | ||||
| #if !defined(__LP64__) | ||||
| #if defined(XP_MACOSX) | ||||
| #pragma options align=mac68k | ||||
| #endif | ||||
| #endif /* __LP64__ */ | ||||
|  | ||||
| /* | ||||
|  *  NPP is a plug-in's opaque instance handle | ||||
|  */ | ||||
| typedef struct _NPP | ||||
| { | ||||
|   void* pdata;      /* plug-in private data */ | ||||
|   void* ndata;      /* netscape private data */ | ||||
| } NPP_t; | ||||
|  | ||||
| typedef NPP_t*  NPP; | ||||
|  | ||||
| typedef struct _NPStream | ||||
| { | ||||
|   void*    pdata; /* plug-in private data */ | ||||
|   void*    ndata; /* netscape private data */ | ||||
|   const    char* url; | ||||
|   uint32_t end; | ||||
|   uint32_t lastmodified; | ||||
|   void*    notifyData; | ||||
|   const    char* headers; /* Response headers from host. | ||||
|                            * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS. | ||||
|                            * Used for HTTP only; NULL for non-HTTP. | ||||
|                            * Available from NPP_NewStream onwards. | ||||
|                            * Plugin should copy this data before storing it. | ||||
|                            * Includes HTTP status line and all headers, | ||||
|                            * preferably verbatim as received from server, | ||||
|                            * headers formatted as in HTTP ("Header: Value"), | ||||
|                            * and newlines (\n, NOT \r\n) separating lines. | ||||
|                            * Terminated by \n\0 (NOT \n\n\0). */ | ||||
| } NPStream; | ||||
|  | ||||
| typedef struct _NPByteRange | ||||
| { | ||||
|   int32_t  offset; /* negative offset means from the end */ | ||||
|   uint32_t length; | ||||
|   struct _NPByteRange* next; | ||||
| } NPByteRange; | ||||
|  | ||||
| typedef struct _NPSavedData | ||||
| { | ||||
|   int32_t len; | ||||
|   void*   buf; | ||||
| } NPSavedData; | ||||
|  | ||||
| typedef struct _NPRect | ||||
| { | ||||
|   uint16_t top; | ||||
|   uint16_t left; | ||||
|   uint16_t bottom; | ||||
|   uint16_t right; | ||||
| } NPRect; | ||||
|  | ||||
| typedef struct _NPSize | ||||
| { | ||||
|   int32_t width; | ||||
|   int32_t height; | ||||
| } NPSize; | ||||
|  | ||||
| typedef enum { | ||||
|   NPFocusNext = 0, | ||||
|   NPFocusPrevious = 1 | ||||
| } NPFocusDirection; | ||||
|  | ||||
| /* Return values for NPP_HandleEvent */ | ||||
| #define kNPEventNotHandled 0 | ||||
| #define kNPEventHandled 1 | ||||
| /* Exact meaning must be spec'd in event model. */ | ||||
| #define kNPEventStartIME 2 | ||||
|  | ||||
| #if defined(XP_UNIX) | ||||
| /* | ||||
|  * Unix specific structures and definitions | ||||
|  */ | ||||
|  | ||||
| /* | ||||
|  * Callback Structures. | ||||
|  * | ||||
|  * These are used to pass additional platform specific information. | ||||
|  */ | ||||
| enum { | ||||
|   NP_SETWINDOW = 1, | ||||
|   NP_PRINT | ||||
| }; | ||||
|  | ||||
| typedef struct | ||||
| { | ||||
|   int32_t type; | ||||
| } NPAnyCallbackStruct; | ||||
|  | ||||
| typedef struct | ||||
| { | ||||
|   int32_t      type; | ||||
| #if defined(MOZ_X11) | ||||
|   Display*     display; | ||||
|   Visual*      visual; | ||||
|   Colormap     colormap; | ||||
|   unsigned int depth; | ||||
| #endif | ||||
| } NPSetWindowCallbackStruct; | ||||
|  | ||||
| typedef struct | ||||
| { | ||||
|   int32_t type; | ||||
|   FILE* fp; | ||||
| } NPPrintCallbackStruct; | ||||
|  | ||||
| #endif /* XP_UNIX */ | ||||
|  | ||||
| #if defined(XP_MACOSX) | ||||
| typedef enum { | ||||
| #ifndef NP_NO_QUICKDRAW | ||||
|   NPDrawingModelQuickDraw = 0, | ||||
| #endif | ||||
|   NPDrawingModelCoreGraphics = 1, | ||||
|   NPDrawingModelOpenGL = 2, | ||||
|   NPDrawingModelCoreAnimation = 3, | ||||
|   NPDrawingModelInvalidatingCoreAnimation = 4 | ||||
| } NPDrawingModel; | ||||
|  | ||||
| typedef enum { | ||||
| #ifndef NP_NO_CARBON | ||||
|   NPEventModelCarbon = 0, | ||||
| #endif | ||||
|   NPEventModelCocoa = 1 | ||||
| } NPEventModel; | ||||
| #endif | ||||
|  | ||||
| /* | ||||
|  *   The following masks are applied on certain platforms to NPNV and | ||||
|  *   NPPV selectors that pass around pointers to COM interfaces. Newer | ||||
|  *   compilers on some platforms may generate vtables that are not | ||||
|  *   compatible with older compilers. To prevent older plugins from | ||||
|  *   not understanding a new browser's ABI, these masks change the | ||||
|  *   values of those selectors on those platforms. To remain backwards | ||||
|  *   compatible with different versions of the browser, plugins can | ||||
|  *   use these masks to dynamically determine and use the correct C++ | ||||
|  *   ABI that the browser is expecting. This does not apply to Windows | ||||
|  *   as Microsoft's COM ABI will likely not change. | ||||
|  */ | ||||
|  | ||||
| #define NP_ABI_GCC3_MASK  0x10000000 | ||||
| /* | ||||
|  *   gcc 3.x generated vtables on UNIX and OSX are incompatible with | ||||
|  *   previous compilers. | ||||
|  */ | ||||
| #if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) | ||||
| #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK | ||||
| #else | ||||
| #define _NP_ABI_MIXIN_FOR_GCC3 0 | ||||
| #endif | ||||
|  | ||||
| #if defined(XP_MACOSX) | ||||
| #define NP_ABI_MACHO_MASK 0x01000000 | ||||
| #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK | ||||
| #else | ||||
| #define _NP_ABI_MIXIN_FOR_MACHO 0 | ||||
| #endif | ||||
|  | ||||
| #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) | ||||
|  | ||||
| /* | ||||
|  * List of variable names for which NPP_GetValue shall be implemented | ||||
|  */ | ||||
| typedef enum { | ||||
|   NPPVpluginNameString = 1, | ||||
|   NPPVpluginDescriptionString, | ||||
|   NPPVpluginWindowBool, | ||||
|   NPPVpluginTransparentBool, | ||||
|   NPPVjavaClass, | ||||
|   NPPVpluginWindowSize, | ||||
|   NPPVpluginTimerInterval, | ||||
|   NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), | ||||
|   NPPVpluginScriptableIID = 11, | ||||
|   NPPVjavascriptPushCallerBool = 12, | ||||
|   NPPVpluginKeepLibraryInMemory = 13, | ||||
|   NPPVpluginNeedsXEmbed         = 14, | ||||
|  | ||||
|   /* Get the NPObject for scripting the plugin. Introduced in NPAPI minor version 14. | ||||
|    */ | ||||
|   NPPVpluginScriptableNPObject  = 15, | ||||
|  | ||||
|   /* Get the plugin value (as \0-terminated UTF-8 string data) for | ||||
|    * form submission if the plugin is part of a form. Use | ||||
|    * NPN_MemAlloc() to allocate memory for the string data. Introduced | ||||
|    * in NPAPI minor version 15. | ||||
|    */ | ||||
|   NPPVformValue = 16, | ||||
|  | ||||
|   NPPVpluginUrlRequestsDisplayedBool = 17, | ||||
|  | ||||
|   /* Checks if the plugin is interested in receiving the http body of | ||||
|    * all http requests (including failed ones, http status != 200). | ||||
|    */ | ||||
|   NPPVpluginWantsAllNetworkStreams = 18, | ||||
|  | ||||
|   /* Browsers can retrieve a native ATK accessibility plug ID via this variable. */ | ||||
|   NPPVpluginNativeAccessibleAtkPlugId = 19, | ||||
|  | ||||
|   /* Checks to see if the plug-in would like the browser to load the "src" attribute. */ | ||||
|   NPPVpluginCancelSrcStream = 20, | ||||
|  | ||||
|   NPPVsupportsAdvancedKeyHandling = 21, | ||||
|  | ||||
|   NPPVpluginUsesDOMForCursorBool = 22 | ||||
|  | ||||
| #if defined(XP_MACOSX) | ||||
|   /* Used for negotiating drawing models */ | ||||
|   , NPPVpluginDrawingModel = 1000 | ||||
|   /* Used for negotiating event models */ | ||||
|   , NPPVpluginEventModel = 1001 | ||||
|   /* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */ | ||||
|   , NPPVpluginCoreAnimationLayer = 1003 | ||||
| #endif | ||||
|  | ||||
| #if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) | ||||
|   , NPPVpluginWindowlessLocalBool = 2002 | ||||
| #endif | ||||
| } NPPVariable; | ||||
|  | ||||
| /* | ||||
|  * List of variable names for which NPN_GetValue should be implemented. | ||||
|  */ | ||||
| typedef enum { | ||||
|   NPNVxDisplay = 1, | ||||
|   NPNVxtAppContext, | ||||
|   NPNVnetscapeWindow, | ||||
|   NPNVjavascriptEnabledBool, | ||||
|   NPNVasdEnabledBool, | ||||
|   NPNVisOfflineBool, | ||||
|  | ||||
|   NPNVserviceManager = (10 | NP_ABI_MASK), | ||||
|   NPNVDOMElement     = (11 | NP_ABI_MASK), | ||||
|   NPNVDOMWindow      = (12 | NP_ABI_MASK), | ||||
|   NPNVToolkit        = (13 | NP_ABI_MASK), | ||||
|   NPNVSupportsXEmbedBool = 14, | ||||
|  | ||||
|   /* Get the NPObject wrapper for the browser window. */ | ||||
|   NPNVWindowNPObject = 15, | ||||
|  | ||||
|   /* Get the NPObject wrapper for the plugins DOM element. */ | ||||
|   NPNVPluginElementNPObject = 16, | ||||
|  | ||||
|   NPNVSupportsWindowless = 17, | ||||
|  | ||||
|   NPNVprivateModeBool = 18, | ||||
|  | ||||
|   NPNVsupportsAdvancedKeyHandling = 21 | ||||
|  | ||||
| #if defined(XP_MACOSX) | ||||
|   /* Used for negotiating drawing models */ | ||||
|   , NPNVpluginDrawingModel = 1000 | ||||
| #ifndef NP_NO_QUICKDRAW | ||||
|   , NPNVsupportsQuickDrawBool = 2000 | ||||
| #endif | ||||
|   , NPNVsupportsCoreGraphicsBool = 2001 | ||||
|   , NPNVsupportsOpenGLBool = 2002 | ||||
|   , NPNVsupportsCoreAnimationBool = 2003 | ||||
|   , NPNVsupportsInvalidatingCoreAnimationBool = 2004 | ||||
| #ifndef NP_NO_CARBON | ||||
|   , NPNVsupportsCarbonBool = 3000 /* TRUE if the browser supports the Carbon event model */ | ||||
| #endif | ||||
|   , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */ | ||||
|   , NPNVsupportsUpdatedCocoaTextInputBool = 3002 /* TRUE if the browser supports the updated | ||||
|                                                     Cocoa text input specification. */ | ||||
|   , NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports | ||||
|                                                                CA model compositing */ | ||||
| #endif | ||||
| #if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6) | ||||
|   , NPNVSupportsWindowlessLocal = 2002 | ||||
| #endif | ||||
| } NPNVariable; | ||||
|  | ||||
| typedef enum { | ||||
|   NPNURLVCookie = 501, | ||||
|   NPNURLVProxy | ||||
| } NPNURLVariable; | ||||
|  | ||||
| /* | ||||
|  * The type of Toolkit the widgets use | ||||
|  */ | ||||
| typedef enum { | ||||
|   NPNVGtk12 = 1, | ||||
|   NPNVGtk2 | ||||
| } NPNToolkitType; | ||||
|  | ||||
| /* | ||||
|  * The type of a NPWindow - it specifies the type of the data structure | ||||
|  * returned in the window field. | ||||
|  */ | ||||
| typedef enum { | ||||
|   NPWindowTypeWindow = 1, | ||||
|   NPWindowTypeDrawable | ||||
| } NPWindowType; | ||||
|  | ||||
| typedef struct _NPWindow | ||||
| { | ||||
|   void* window;  /* Platform specific window handle */ | ||||
|                  /* OS/2: x - Position of bottom left corner */ | ||||
|                  /* OS/2: y - relative to visible netscape window */ | ||||
|   int32_t  x;      /* Position of top left corner relative */ | ||||
|   int32_t  y;      /* to a netscape page. */ | ||||
|   uint32_t width;  /* Maximum window size */ | ||||
|   uint32_t height; | ||||
|   NPRect   clipRect; /* Clipping rectangle in port coordinates */ | ||||
| #if (defined(XP_UNIX) || defined(XP_SYMBIAN)) && !defined(XP_MACOSX) | ||||
|   void * ws_info; /* Platform-dependent additional data */ | ||||
| #endif /* XP_UNIX */ | ||||
|   NPWindowType type; /* Is this a window or a drawable? */ | ||||
| } NPWindow; | ||||
|  | ||||
| typedef struct _NPImageExpose | ||||
| { | ||||
|   char*    data;       /* image pointer */ | ||||
|   int32_t  stride;     /* Stride of data image pointer */ | ||||
|   int32_t  depth;      /* Depth of image pointer */ | ||||
|   int32_t  x;          /* Expose x */ | ||||
|   int32_t  y;          /* Expose y */ | ||||
|   uint32_t width;      /* Expose width */ | ||||
|   uint32_t height;     /* Expose height */ | ||||
|   NPSize   dataSize;   /* Data buffer size */ | ||||
|   float    translateX; /* translate X matrix value */ | ||||
|   float    translateY; /* translate Y matrix value */ | ||||
|   float    scaleX;     /* scale X matrix value */ | ||||
|   float    scaleY;     /* scale Y matrix value */ | ||||
| } NPImageExpose; | ||||
|  | ||||
| typedef struct _NPFullPrint | ||||
| { | ||||
|   NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ | ||||
|   NPBool printOne;     /* TRUE if plugin should print one copy to default | ||||
|                           printer */ | ||||
|   void* platformPrint; /* Platform-specific printing info */ | ||||
| } NPFullPrint; | ||||
|  | ||||
| typedef struct _NPEmbedPrint | ||||
| { | ||||
|   NPWindow window; | ||||
|   void* platformPrint; /* Platform-specific printing info */ | ||||
| } NPEmbedPrint; | ||||
|  | ||||
| typedef struct _NPPrint | ||||
| { | ||||
|   uint16_t mode;               /* NP_FULL or NP_EMBED */ | ||||
|   union | ||||
|   { | ||||
|     NPFullPrint fullPrint;   /* if mode is NP_FULL */ | ||||
|     NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ | ||||
|   } print; | ||||
| } NPPrint; | ||||
|  | ||||
| #if defined(XP_MACOSX) | ||||
| #ifndef NP_NO_CARBON | ||||
| typedef EventRecord NPEvent; | ||||
| #endif | ||||
| #elif defined(XP_SYMBIAN) | ||||
| typedef QEvent NPEvent; | ||||
| #elif defined(XP_WIN) | ||||
| typedef struct _NPEvent | ||||
| { | ||||
|   uint16_t event; | ||||
|   uintptr_t wParam; | ||||
|   uintptr_t lParam; | ||||
| } NPEvent; | ||||
| #elif defined(XP_OS2) | ||||
| typedef struct _NPEvent | ||||
| { | ||||
|   uint32_t event; | ||||
|   uint32_t wParam; | ||||
|   uint32_t lParam; | ||||
| } NPEvent; | ||||
| #elif defined(XP_UNIX) && defined(MOZ_X11) | ||||
| typedef XEvent NPEvent; | ||||
| #else | ||||
| typedef void*  NPEvent; | ||||
| #endif | ||||
|  | ||||
| #if defined(XP_MACOSX) | ||||
| typedef void* NPRegion; | ||||
| #ifndef NP_NO_QUICKDRAW | ||||
| typedef RgnHandle NPQDRegion; | ||||
| #endif | ||||
| typedef CGPathRef NPCGRegion; | ||||
| #elif defined(XP_WIN) | ||||
| typedef HRGN NPRegion; | ||||
| #elif defined(XP_UNIX) && defined(MOZ_X11) | ||||
| typedef Region NPRegion; | ||||
| #elif defined(XP_SYMBIAN) | ||||
| typedef QRegion* NPRegion; | ||||
| #else | ||||
| typedef void *NPRegion; | ||||
| #endif | ||||
|  | ||||
| typedef struct _NPNSString NPNSString; | ||||
| typedef struct _NPNSWindow NPNSWindow; | ||||
| typedef struct _NPNSMenu   NPNSMenu; | ||||
|  | ||||
| #if defined(XP_MACOSX) | ||||
| typedef NPNSMenu NPMenu; | ||||
| #else | ||||
| typedef void *NPMenu; | ||||
| #endif | ||||
|  | ||||
| typedef enum { | ||||
|   NPCoordinateSpacePlugin = 1, | ||||
|   NPCoordinateSpaceWindow, | ||||
|   NPCoordinateSpaceFlippedWindow, | ||||
|   NPCoordinateSpaceScreen, | ||||
|   NPCoordinateSpaceFlippedScreen | ||||
| } NPCoordinateSpace; | ||||
|  | ||||
| #if defined(XP_MACOSX) | ||||
|  | ||||
| #ifndef NP_NO_QUICKDRAW | ||||
| typedef struct NP_Port | ||||
| { | ||||
|   CGrafPtr port; | ||||
|   int32_t portx; /* position inside the topmost window */ | ||||
|   int32_t porty; | ||||
| } NP_Port; | ||||
| #endif /* NP_NO_QUICKDRAW */ | ||||
|  | ||||
| /* | ||||
|  * NP_CGContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelCoreGraphics | ||||
|  * as its drawing model. | ||||
|  */ | ||||
|  | ||||
| typedef struct NP_CGContext | ||||
| { | ||||
|   CGContextRef context; | ||||
|   void *window; /* A WindowRef under the Carbon event model. */ | ||||
| } NP_CGContext; | ||||
|  | ||||
| /* | ||||
|  * NP_GLContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelOpenGL as its | ||||
|  * drawing model. | ||||
|  */ | ||||
|  | ||||
| typedef struct NP_GLContext | ||||
| { | ||||
|   CGLContextObj context; | ||||
| #ifdef NP_NO_CARBON | ||||
|   NPNSWindow *window; | ||||
| #else | ||||
|   void *window; /* Can be either an NSWindow or a WindowRef depending on the event model */ | ||||
| #endif | ||||
| } NP_GLContext; | ||||
|  | ||||
| typedef enum { | ||||
|   NPCocoaEventDrawRect = 1, | ||||
|   NPCocoaEventMouseDown, | ||||
|   NPCocoaEventMouseUp, | ||||
|   NPCocoaEventMouseMoved, | ||||
|   NPCocoaEventMouseEntered, | ||||
|   NPCocoaEventMouseExited, | ||||
|   NPCocoaEventMouseDragged, | ||||
|   NPCocoaEventKeyDown, | ||||
|   NPCocoaEventKeyUp, | ||||
|   NPCocoaEventFlagsChanged, | ||||
|   NPCocoaEventFocusChanged, | ||||
|   NPCocoaEventWindowFocusChanged, | ||||
|   NPCocoaEventScrollWheel, | ||||
|   NPCocoaEventTextInput | ||||
| } NPCocoaEventType; | ||||
|  | ||||
| typedef struct _NPCocoaEvent { | ||||
|   NPCocoaEventType type; | ||||
|   uint32_t version; | ||||
|   union { | ||||
|     struct { | ||||
|       uint32_t modifierFlags; | ||||
|       double   pluginX; | ||||
|       double   pluginY; | ||||
|       int32_t  buttonNumber; | ||||
|       int32_t  clickCount; | ||||
|       double   deltaX; | ||||
|       double   deltaY; | ||||
|       double   deltaZ; | ||||
|     } mouse; | ||||
|     struct { | ||||
|       uint32_t    modifierFlags; | ||||
|       NPNSString *characters; | ||||
|       NPNSString *charactersIgnoringModifiers; | ||||
|       NPBool      isARepeat; | ||||
|       uint16_t    keyCode; | ||||
|     } key; | ||||
|     struct { | ||||
|       CGContextRef context; | ||||
|       double x; | ||||
|       double y; | ||||
|       double width; | ||||
|       double height; | ||||
|     } draw; | ||||
|     struct { | ||||
|       NPBool hasFocus; | ||||
|     } focus; | ||||
|     struct { | ||||
|       NPNSString *text; | ||||
|     } text; | ||||
|   } data; | ||||
| } NPCocoaEvent; | ||||
|  | ||||
| #ifndef NP_NO_CARBON | ||||
| /* Non-standard event types that can be passed to HandleEvent */ | ||||
| enum NPEventType { | ||||
|   NPEventType_GetFocusEvent = (osEvt + 16), | ||||
|   NPEventType_LoseFocusEvent, | ||||
|   NPEventType_AdjustCursorEvent, | ||||
|   NPEventType_MenuCommandEvent, | ||||
|   NPEventType_ClippingChangedEvent, | ||||
|   NPEventType_ScrollingBeginsEvent = 1000, | ||||
|   NPEventType_ScrollingEndsEvent | ||||
| }; | ||||
| #endif /* NP_NO_CARBON */ | ||||
|  | ||||
| #endif /* XP_MACOSX */ | ||||
|  | ||||
| /* | ||||
|  * Values for mode passed to NPP_New: | ||||
|  */ | ||||
| #define NP_EMBED 1 | ||||
| #define NP_FULL  2 | ||||
|  | ||||
| /* | ||||
|  * Values for stream type passed to NPP_NewStream: | ||||
|  */ | ||||
| #define NP_NORMAL     1 | ||||
| #define NP_SEEK       2 | ||||
| #define NP_ASFILE     3 | ||||
| #define NP_ASFILEONLY 4 | ||||
|  | ||||
| #define NP_MAXREADY (((unsigned)(~0)<<1)>>1) | ||||
|  | ||||
| /* | ||||
|  * Flags for NPP_ClearSiteData. | ||||
|  */ | ||||
| #define NP_CLEAR_ALL   0 | ||||
| #define NP_CLEAR_CACHE (1 << 0) | ||||
|  | ||||
| #if !defined(__LP64__) | ||||
| #if defined(XP_MACOSX) | ||||
| #pragma options align=reset | ||||
| #endif | ||||
| #endif /* __LP64__ */ | ||||
|  | ||||
| /*----------------------------------------------------------------------*/ | ||||
| /*       Error and Reason Code definitions                              */ | ||||
| /*----------------------------------------------------------------------*/ | ||||
|  | ||||
| /* | ||||
|  * Values of type NPError: | ||||
|  */ | ||||
| #define NPERR_BASE                         0 | ||||
| #define NPERR_NO_ERROR                    (NPERR_BASE + 0) | ||||
| #define NPERR_GENERIC_ERROR               (NPERR_BASE + 1) | ||||
| #define NPERR_INVALID_INSTANCE_ERROR      (NPERR_BASE + 2) | ||||
| #define NPERR_INVALID_FUNCTABLE_ERROR     (NPERR_BASE + 3) | ||||
| #define NPERR_MODULE_LOAD_FAILED_ERROR    (NPERR_BASE + 4) | ||||
| #define NPERR_OUT_OF_MEMORY_ERROR         (NPERR_BASE + 5) | ||||
| #define NPERR_INVALID_PLUGIN_ERROR        (NPERR_BASE + 6) | ||||
| #define NPERR_INVALID_PLUGIN_DIR_ERROR    (NPERR_BASE + 7) | ||||
| #define NPERR_INCOMPATIBLE_VERSION_ERROR  (NPERR_BASE + 8) | ||||
| #define NPERR_INVALID_PARAM               (NPERR_BASE + 9) | ||||
| #define NPERR_INVALID_URL                 (NPERR_BASE + 10) | ||||
| #define NPERR_FILE_NOT_FOUND              (NPERR_BASE + 11) | ||||
| #define NPERR_NO_DATA                     (NPERR_BASE + 12) | ||||
| #define NPERR_STREAM_NOT_SEEKABLE         (NPERR_BASE + 13) | ||||
| #define NPERR_TIME_RANGE_NOT_SUPPORTED    (NPERR_BASE + 14) | ||||
| #define NPERR_MALFORMED_SITE              (NPERR_BASE + 15) | ||||
|  | ||||
| /* | ||||
|  * Values of type NPReason: | ||||
|  */ | ||||
| #define NPRES_BASE          0 | ||||
| #define NPRES_DONE         (NPRES_BASE + 0) | ||||
| #define NPRES_NETWORK_ERR  (NPRES_BASE + 1) | ||||
| #define NPRES_USER_BREAK   (NPRES_BASE + 2) | ||||
|  | ||||
| /* | ||||
|  * Don't use these obsolete error codes any more. | ||||
|  */ | ||||
| #define NP_NOERR  NP_NOERR_is_obsolete_use_NPERR_NO_ERROR | ||||
| #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR | ||||
| #define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK | ||||
|  | ||||
| /* | ||||
|  * Version feature information | ||||
|  */ | ||||
| #define NPVERS_HAS_STREAMOUTPUT             8 | ||||
| #define NPVERS_HAS_NOTIFICATION             9 | ||||
| #define NPVERS_HAS_LIVECONNECT              9 | ||||
| #define NPVERS_68K_HAS_LIVECONNECT          11 | ||||
| #define NPVERS_HAS_WINDOWLESS               11 | ||||
| #define NPVERS_HAS_XPCONNECT_SCRIPTING      13 | ||||
| #define NPVERS_HAS_NPRUNTIME_SCRIPTING      14 | ||||
| #define NPVERS_HAS_FORM_VALUES              15 | ||||
| #define NPVERS_HAS_POPUPS_ENABLED_STATE     16 | ||||
| #define NPVERS_HAS_RESPONSE_HEADERS         17 | ||||
| #define NPVERS_HAS_NPOBJECT_ENUM            18 | ||||
| #define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19 | ||||
| #define NPVERS_HAS_ALL_NETWORK_STREAMS      20 | ||||
| #define NPVERS_HAS_URL_AND_AUTH_INFO        21 | ||||
| #define NPVERS_HAS_PRIVATE_MODE             22 | ||||
| #define NPVERS_MACOSX_HAS_COCOA_EVENTS      23 | ||||
| #define NPVERS_HAS_ADVANCED_KEY_HANDLING    25 | ||||
| #define NPVERS_HAS_URL_REDIRECT_HANDLING    26 | ||||
| #define NPVERS_HAS_CLEAR_SITE_DATA          27 | ||||
|  | ||||
| /*----------------------------------------------------------------------*/ | ||||
| /*                        Function Prototypes                           */ | ||||
| /*----------------------------------------------------------------------*/ | ||||
|  | ||||
| #if defined(__OS2__) | ||||
| #define NP_LOADDS _System | ||||
| #else | ||||
| #define NP_LOADDS | ||||
| #endif | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif | ||||
|  | ||||
| /* NPP_* functions are provided by the plugin and called by the navigator. */ | ||||
|  | ||||
| #if defined(XP_UNIX) | ||||
| const char* NPP_GetMIMEDescription(void); | ||||
| #endif | ||||
|  | ||||
| NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, | ||||
|                           uint16_t mode, int16_t argc, char* argn[], | ||||
|                           char* argv[], NPSavedData* saved); | ||||
| NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); | ||||
| NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); | ||||
| NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, | ||||
|                                 NPStream* stream, NPBool seekable, | ||||
|                                 uint16_t* stype); | ||||
| NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, | ||||
|                                     NPReason reason); | ||||
| int32_t NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); | ||||
| int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset, | ||||
|                             int32_t len, void* buffer); | ||||
| void    NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, | ||||
|                                    const char* fname); | ||||
| void    NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); | ||||
| int16_t NP_LOADDS NPP_HandleEvent(NPP instance, void* event); | ||||
| void    NP_LOADDS NPP_URLNotify(NPP instance, const char* url, | ||||
|                                 NPReason reason, void* notifyData); | ||||
| NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); | ||||
| NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); | ||||
| NPBool  NP_LOADDS NPP_GotFocus(NPP instance, NPFocusDirection direction); | ||||
| void    NP_LOADDS NPP_LostFocus(NPP instance); | ||||
| void    NP_LOADDS NPP_URLRedirectNotify(NPP instance, const char* url, int32_t status, void* notifyData); | ||||
| NPError NP_LOADDS NPP_ClearSiteData(const char* site, uint64_t flags, uint64_t maxAge); | ||||
| char**  NP_LOADDS NPP_GetSitesWithData(void); | ||||
|  | ||||
| /* NPN_* functions are provided by the navigator and called by the plugin. */ | ||||
| void        NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, | ||||
|                                   int* netscape_major, int* netscape_minor); | ||||
| NPError     NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, | ||||
|                                        const char* target, void* notifyData); | ||||
| NPError     NP_LOADDS NPN_GetURL(NPP instance, const char* url, | ||||
|                                  const char* target); | ||||
| NPError     NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, | ||||
|                                         const char* target, uint32_t len, | ||||
|                                         const char* buf, NPBool file, | ||||
|                                         void* notifyData); | ||||
| NPError     NP_LOADDS NPN_PostURL(NPP instance, const char* url, | ||||
|                                   const char* target, uint32_t len, | ||||
|                                   const char* buf, NPBool file); | ||||
| NPError     NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); | ||||
| NPError     NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, | ||||
|                                     const char* target, NPStream** stream); | ||||
| int32_t     NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32_t len, | ||||
|                                 void* buffer); | ||||
| NPError     NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, | ||||
|                                         NPReason reason); | ||||
| void        NP_LOADDS NPN_Status(NPP instance, const char* message); | ||||
| const char* NP_LOADDS NPN_UserAgent(NPP instance); | ||||
| void*       NP_LOADDS NPN_MemAlloc(uint32_t size); | ||||
| void        NP_LOADDS NPN_MemFree(void* ptr); | ||||
| uint32_t    NP_LOADDS NPN_MemFlush(uint32_t size); | ||||
| void        NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); | ||||
| NPError     NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, | ||||
|                                    void *value); | ||||
| NPError     NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, | ||||
|                                    void *value); | ||||
| void        NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); | ||||
| void        NP_LOADDS NPN_InvalidateRegion(NPP instance, | ||||
|                                            NPRegion invalidRegion); | ||||
| void        NP_LOADDS NPN_ForceRedraw(NPP instance); | ||||
| void        NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled); | ||||
| void        NP_LOADDS NPN_PopPopupsEnabledState(NPP instance); | ||||
| void        NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance, | ||||
|                                                 void (*func) (void *), | ||||
|                                                 void *userData); | ||||
| NPError     NP_LOADDS NPN_GetValueForURL(NPP instance, NPNURLVariable variable, | ||||
|                                          const char *url, char **value, | ||||
|                                          uint32_t *len); | ||||
| NPError     NP_LOADDS NPN_SetValueForURL(NPP instance, NPNURLVariable variable, | ||||
|                                          const char *url, const char *value, | ||||
|                                          uint32_t len); | ||||
| NPError     NP_LOADDS NPN_GetAuthenticationInfo(NPP instance, | ||||
|                                                 const char *protocol, | ||||
|                                                 const char *host, int32_t port, | ||||
|                                                 const char *scheme, | ||||
|                                                 const char *realm, | ||||
|                                                 char **username, uint32_t *ulen, | ||||
|                                                 char **password, | ||||
|                                                 uint32_t *plen); | ||||
| uint32_t    NP_LOADDS NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID)); | ||||
| void        NP_LOADDS NPN_UnscheduleTimer(NPP instance, uint32_t timerID); | ||||
| NPError     NP_LOADDS NPN_PopUpContextMenu(NPP instance, NPMenu* menu); | ||||
| NPBool      NP_LOADDS NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace); | ||||
| NPBool      NP_LOADDS NPN_HandleEvent(NPP instance, void *event, NPBool handled); | ||||
| NPBool      NP_LOADDS NPN_UnfocusInstance(NPP instance, NPFocusDirection direction); | ||||
| void        NP_LOADDS NPN_URLRedirectResponse(NPP instance, void* notifyData, NPBool allow); | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| }  /* end extern "C" */ | ||||
| #endif | ||||
|  | ||||
| #endif /* RC_INVOKED */ | ||||
| #if defined(__OS2__) | ||||
| #pragma pack() | ||||
| #endif | ||||
|  | ||||
| #endif /* npapi_h_ */ | ||||
| @@ -1,322 +0,0 @@ | ||||
| /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | ||||
| /* ***** BEGIN LICENSE BLOCK ***** | ||||
|  * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | ||||
|  * | ||||
|  * The contents of this file are subject to the Mozilla Public License Version | ||||
|  * 1.1 (the "License"); you may not use this file except in compliance with | ||||
|  * the License. You may obtain a copy of the License at | ||||
|  * http://www.mozilla.org/MPL/ | ||||
|  * | ||||
|  * Software distributed under the License is distributed on an "AS IS" basis, | ||||
|  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||||
|  * for the specific language governing rights and limitations under the | ||||
|  * License. | ||||
|  * | ||||
|  * The Original Code is mozilla.org code. | ||||
|  * | ||||
|  * The Initial Developer of the Original Code is | ||||
|  * Netscape Communications Corporation. | ||||
|  * Portions created by the Initial Developer are Copyright (C) 1998 | ||||
|  * the Initial Developer. All Rights Reserved. | ||||
|  * | ||||
|  * Contributor(s): | ||||
|  * | ||||
|  * Alternatively, the contents of this file may be used under the terms of | ||||
|  * either the GNU General Public License Version 2 or later (the "GPL"), or | ||||
|  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), | ||||
|  * in which case the provisions of the GPL or the LGPL are applicable instead | ||||
|  * of those above. If you wish to allow use of your version of this file only | ||||
|  * under the terms of either the GPL or the LGPL, and not to allow others to | ||||
|  * use your version of this file under the terms of the MPL, indicate your | ||||
|  * decision by deleting the provisions above and replace them with the notice | ||||
|  * and other provisions required by the GPL or the LGPL. If you do not delete | ||||
|  * the provisions above, a recipient may use your version of this file under | ||||
|  * the terms of any one of the MPL, the GPL or the LGPL. | ||||
|  * | ||||
|  * ***** END LICENSE BLOCK ***** */ | ||||
|  | ||||
| #ifndef npfunctions_h_ | ||||
| #define npfunctions_h_ | ||||
|  | ||||
| #ifdef __OS2__ | ||||
| #pragma pack(1) | ||||
| #define NP_LOADDS _System | ||||
| #else | ||||
| #define NP_LOADDS | ||||
| #endif | ||||
|  | ||||
| #include "npapi.h" | ||||
| #include "npruntime.h" | ||||
|  | ||||
| typedef NPError      (* NP_LOADDS NPP_NewProcPtr)(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved); | ||||
| typedef NPError      (* NP_LOADDS NPP_DestroyProcPtr)(NPP instance, NPSavedData** save); | ||||
| typedef NPError      (* NP_LOADDS NPP_SetWindowProcPtr)(NPP instance, NPWindow* window); | ||||
| typedef NPError      (* NP_LOADDS NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype); | ||||
| typedef NPError      (* NP_LOADDS NPP_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason); | ||||
| typedef int32_t      (* NP_LOADDS NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream); | ||||
| typedef int32_t      (* NP_LOADDS NPP_WriteProcPtr)(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer); | ||||
| typedef void         (* NP_LOADDS NPP_StreamAsFileProcPtr)(NPP instance, NPStream* stream, const char* fname); | ||||
| typedef void         (* NP_LOADDS NPP_PrintProcPtr)(NPP instance, NPPrint* platformPrint); | ||||
| typedef int16_t      (* NP_LOADDS NPP_HandleEventProcPtr)(NPP instance, void* event); | ||||
| typedef void         (* NP_LOADDS NPP_URLNotifyProcPtr)(NPP instance, const char* url, NPReason reason, void* notifyData); | ||||
| /* Any NPObjects returned to the browser via NPP_GetValue should be retained | ||||
|    by the plugin on the way out. The browser is responsible for releasing. */ | ||||
| typedef NPError      (* NP_LOADDS NPP_GetValueProcPtr)(NPP instance, NPPVariable variable, void *ret_value); | ||||
| typedef NPError      (* NP_LOADDS NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *value); | ||||
| typedef NPBool       (* NP_LOADDS NPP_GotFocusPtr)(NPP instance, NPFocusDirection direction); | ||||
| typedef void         (* NP_LOADDS NPP_LostFocusPtr)(NPP instance); | ||||
| typedef void         (* NP_LOADDS NPP_URLRedirectNotifyPtr)(NPP instance, const char* url, int32_t status, void* notifyData); | ||||
| typedef NPError      (* NP_LOADDS NPP_ClearSiteDataPtr)(const char* site, uint64_t flags, uint64_t maxAge); | ||||
| typedef char**       (* NP_LOADDS NPP_GetSitesWithDataPtr)(void); | ||||
|  | ||||
| typedef NPError      (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value); | ||||
| typedef NPError      (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable, void *value); | ||||
| typedef NPError      (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* url, const char* window, void* notifyData); | ||||
| typedef NPError      (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData); | ||||
| typedef NPError      (*NPN_GetURLProcPtr)(NPP instance, const char* url, const char* window); | ||||
| typedef NPError      (*NPN_PostURLProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file); | ||||
| typedef NPError      (*NPN_RequestReadProcPtr)(NPStream* stream, NPByteRange* rangeList); | ||||
| typedef NPError      (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); | ||||
| typedef int32_t      (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t len, void* buffer); | ||||
| typedef NPError      (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason); | ||||
| typedef void         (*NPN_StatusProcPtr)(NPP instance, const char* message); | ||||
| /* Browser manages the lifetime of the buffer returned by NPN_UserAgent, don't | ||||
|    depend on it sticking around and don't free it. */ | ||||
| typedef const char*  (*NPN_UserAgentProcPtr)(NPP instance); | ||||
| typedef void*        (*NPN_MemAllocProcPtr)(uint32_t size); | ||||
| typedef void         (*NPN_MemFreeProcPtr)(void* ptr); | ||||
| typedef uint32_t     (*NPN_MemFlushProcPtr)(uint32_t size); | ||||
| typedef void         (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages); | ||||
| typedef void*        (*NPN_GetJavaEnvProcPtr)(void); | ||||
| typedef void*        (*NPN_GetJavaPeerProcPtr)(NPP instance); | ||||
| typedef void         (*NPN_InvalidateRectProcPtr)(NPP instance, NPRect *rect); | ||||
| typedef void         (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion region); | ||||
| typedef void         (*NPN_ForceRedrawProcPtr)(NPP instance); | ||||
| typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr)(const NPUTF8* name); | ||||
| typedef void         (*NPN_GetStringIdentifiersProcPtr)(const NPUTF8** names, int32_t nameCount, NPIdentifier* identifiers); | ||||
| typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr)(int32_t intid); | ||||
| typedef bool         (*NPN_IdentifierIsStringProcPtr)(NPIdentifier identifier); | ||||
| typedef NPUTF8*      (*NPN_UTF8FromIdentifierProcPtr)(NPIdentifier identifier); | ||||
| typedef int32_t      (*NPN_IntFromIdentifierProcPtr)(NPIdentifier identifier); | ||||
| typedef NPObject*    (*NPN_CreateObjectProcPtr)(NPP npp, NPClass *aClass); | ||||
| typedef NPObject*    (*NPN_RetainObjectProcPtr)(NPObject *obj); | ||||
| typedef void         (*NPN_ReleaseObjectProcPtr)(NPObject *obj); | ||||
| typedef bool         (*NPN_InvokeProcPtr)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); | ||||
| typedef bool         (*NPN_InvokeDefaultProcPtr)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); | ||||
| typedef bool         (*NPN_EvaluateProcPtr)(NPP npp, NPObject *obj, NPString *script, NPVariant *result); | ||||
| typedef bool         (*NPN_GetPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result); | ||||
| typedef bool         (*NPN_SetPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value); | ||||
| typedef bool         (*NPN_RemovePropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName); | ||||
| typedef bool         (*NPN_HasPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName); | ||||
| typedef bool         (*NPN_HasMethodProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName); | ||||
| typedef void         (*NPN_ReleaseVariantValueProcPtr)(NPVariant *variant); | ||||
| typedef void         (*NPN_SetExceptionProcPtr)(NPObject *obj, const NPUTF8 *message); | ||||
| typedef void         (*NPN_PushPopupsEnabledStateProcPtr)(NPP npp, NPBool enabled); | ||||
| typedef void         (*NPN_PopPopupsEnabledStateProcPtr)(NPP npp); | ||||
| typedef bool         (*NPN_EnumerateProcPtr)(NPP npp, NPObject *obj, NPIdentifier **identifier, uint32_t *count); | ||||
| typedef void         (*NPN_PluginThreadAsyncCallProcPtr)(NPP instance, void (*func)(void *), void *userData); | ||||
| typedef bool         (*NPN_ConstructProcPtr)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); | ||||
| typedef NPError      (*NPN_GetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, char **value, uint32_t *len); | ||||
| typedef NPError      (*NPN_SetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, const char *value, uint32_t len); | ||||
| typedef NPError      (*NPN_GetAuthenticationInfoPtr)(NPP npp, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); | ||||
| typedef uint32_t     (*NPN_ScheduleTimerPtr)(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID)); | ||||
| typedef void         (*NPN_UnscheduleTimerPtr)(NPP instance, uint32_t timerID); | ||||
| typedef NPError      (*NPN_PopUpContextMenuPtr)(NPP instance, NPMenu* menu); | ||||
| typedef NPBool       (*NPN_ConvertPointPtr)(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace); | ||||
| typedef NPBool       (*NPN_HandleEventPtr)(NPP instance, void *event, NPBool handled); | ||||
| typedef NPBool       (*NPN_UnfocusInstancePtr)(NPP instance, NPFocusDirection direction); | ||||
| typedef void         (*NPN_URLRedirectResponsePtr)(NPP instance, void* notifyData, NPBool allow); | ||||
|  | ||||
| typedef struct _NPPluginFuncs { | ||||
|   uint16_t size; | ||||
|   uint16_t version; | ||||
|   NPP_NewProcPtr newp; | ||||
|   NPP_DestroyProcPtr destroy; | ||||
|   NPP_SetWindowProcPtr setwindow; | ||||
|   NPP_NewStreamProcPtr newstream; | ||||
|   NPP_DestroyStreamProcPtr destroystream; | ||||
|   NPP_StreamAsFileProcPtr asfile; | ||||
|   NPP_WriteReadyProcPtr writeready; | ||||
|   NPP_WriteProcPtr write; | ||||
|   NPP_PrintProcPtr print; | ||||
|   NPP_HandleEventProcPtr event; | ||||
|   NPP_URLNotifyProcPtr urlnotify; | ||||
|   void* javaClass; | ||||
|   NPP_GetValueProcPtr getvalue; | ||||
|   NPP_SetValueProcPtr setvalue; | ||||
|   NPP_GotFocusPtr gotfocus; | ||||
|   NPP_LostFocusPtr lostfocus; | ||||
|   NPP_URLRedirectNotifyPtr urlredirectnotify; | ||||
|   NPP_ClearSiteDataPtr clearsitedata; | ||||
|   NPP_GetSitesWithDataPtr getsiteswithdata; | ||||
| } NPPluginFuncs; | ||||
|  | ||||
| typedef struct _NPNetscapeFuncs { | ||||
|   uint16_t size; | ||||
|   uint16_t version; | ||||
|   NPN_GetURLProcPtr geturl; | ||||
|   NPN_PostURLProcPtr posturl; | ||||
|   NPN_RequestReadProcPtr requestread; | ||||
|   NPN_NewStreamProcPtr newstream; | ||||
|   NPN_WriteProcPtr write; | ||||
|   NPN_DestroyStreamProcPtr destroystream; | ||||
|   NPN_StatusProcPtr status; | ||||
|   NPN_UserAgentProcPtr uagent; | ||||
|   NPN_MemAllocProcPtr memalloc; | ||||
|   NPN_MemFreeProcPtr memfree; | ||||
|   NPN_MemFlushProcPtr memflush; | ||||
|   NPN_ReloadPluginsProcPtr reloadplugins; | ||||
|   NPN_GetJavaEnvProcPtr getJavaEnv; | ||||
|   NPN_GetJavaPeerProcPtr getJavaPeer; | ||||
|   NPN_GetURLNotifyProcPtr geturlnotify; | ||||
|   NPN_PostURLNotifyProcPtr posturlnotify; | ||||
|   NPN_GetValueProcPtr getvalue; | ||||
|   NPN_SetValueProcPtr setvalue; | ||||
|   NPN_InvalidateRectProcPtr invalidaterect; | ||||
|   NPN_InvalidateRegionProcPtr invalidateregion; | ||||
|   NPN_ForceRedrawProcPtr forceredraw; | ||||
|   NPN_GetStringIdentifierProcPtr getstringidentifier; | ||||
|   NPN_GetStringIdentifiersProcPtr getstringidentifiers; | ||||
|   NPN_GetIntIdentifierProcPtr getintidentifier; | ||||
|   NPN_IdentifierIsStringProcPtr identifierisstring; | ||||
|   NPN_UTF8FromIdentifierProcPtr utf8fromidentifier; | ||||
|   NPN_IntFromIdentifierProcPtr intfromidentifier; | ||||
|   NPN_CreateObjectProcPtr createobject; | ||||
|   NPN_RetainObjectProcPtr retainobject; | ||||
|   NPN_ReleaseObjectProcPtr releaseobject; | ||||
|   NPN_InvokeProcPtr invoke; | ||||
|   NPN_InvokeDefaultProcPtr invokeDefault; | ||||
|   NPN_EvaluateProcPtr evaluate; | ||||
|   NPN_GetPropertyProcPtr getproperty; | ||||
|   NPN_SetPropertyProcPtr setproperty; | ||||
|   NPN_RemovePropertyProcPtr removeproperty; | ||||
|   NPN_HasPropertyProcPtr hasproperty; | ||||
|   NPN_HasMethodProcPtr hasmethod; | ||||
|   NPN_ReleaseVariantValueProcPtr releasevariantvalue; | ||||
|   NPN_SetExceptionProcPtr setexception; | ||||
|   NPN_PushPopupsEnabledStateProcPtr pushpopupsenabledstate; | ||||
|   NPN_PopPopupsEnabledStateProcPtr poppopupsenabledstate; | ||||
|   NPN_EnumerateProcPtr enumerate; | ||||
|   NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall; | ||||
|   NPN_ConstructProcPtr construct; | ||||
|   NPN_GetValueForURLPtr getvalueforurl; | ||||
|   NPN_SetValueForURLPtr setvalueforurl; | ||||
|   NPN_GetAuthenticationInfoPtr getauthenticationinfo; | ||||
|   NPN_ScheduleTimerPtr scheduletimer; | ||||
|   NPN_UnscheduleTimerPtr unscheduletimer; | ||||
|   NPN_PopUpContextMenuPtr popupcontextmenu; | ||||
|   NPN_ConvertPointPtr convertpoint; | ||||
|   NPN_HandleEventPtr handleevent; | ||||
|   NPN_UnfocusInstancePtr unfocusinstance; | ||||
|   NPN_URLRedirectResponsePtr urlredirectresponse; | ||||
| } NPNetscapeFuncs; | ||||
|  | ||||
| #ifdef XP_MACOSX | ||||
| /* | ||||
|  * Mac OS X version(s) of NP_GetMIMEDescription(const char *) | ||||
|  * These can be called to retreive MIME information from the plugin dynamically | ||||
|  * | ||||
|  * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way | ||||
|  *       to get mime info from the plugin only on OSX and may not be supported | ||||
|  *       in furture version -- use NP_GetMIMEDescription instead | ||||
|  */ | ||||
| enum | ||||
| { | ||||
|  kBPSupportedMIMETypesStructVers_1    = 1 | ||||
| }; | ||||
| typedef struct _BPSupportedMIMETypes | ||||
| { | ||||
|  SInt32    structVersion;      /* struct version */ | ||||
|  Handle    typeStrings;        /* STR# formated handle, allocated by plug-in */ | ||||
|  Handle    infoStrings;        /* STR# formated handle, allocated by plug-in */ | ||||
| } BPSupportedMIMETypes; | ||||
| OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); | ||||
| #define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" | ||||
| typedef const char* (*NP_GetMIMEDescriptionProcPtr)(void); | ||||
| typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32); | ||||
| #endif | ||||
|  | ||||
| #if defined(_WIN32) | ||||
| #define OSCALL WINAPI | ||||
| #else | ||||
| #if defined(__OS2__) | ||||
| #define OSCALL _System | ||||
| #else | ||||
| #define OSCALL | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #if defined(XP_UNIX) | ||||
| /* GCC 3.3 and later support the visibility attribute. */ | ||||
| #if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) | ||||
| #define NP_VISIBILITY_DEFAULT __attribute__((visibility("default"))) | ||||
| #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) | ||||
| #define NP_VISIBILITY_DEFAULT __global | ||||
| #else | ||||
| #define NP_VISIBILITY_DEFAULT | ||||
| #endif | ||||
| #define NP_EXPORT(__type) NP_VISIBILITY_DEFAULT __type | ||||
| #endif | ||||
|  | ||||
| #if defined(_WIN32) || defined (__OS2__) | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif | ||||
| /* plugin meta member functions */ | ||||
| #if defined(__OS2__) | ||||
| typedef struct _NPPluginData {   /* Alternate OS2 Plugin interface */ | ||||
|   char *pMimeTypes; | ||||
|   char *pFileExtents; | ||||
|   char *pFileOpenTemplate; | ||||
|   char *pProductName; | ||||
|   char *pProductDescription; | ||||
|   unsigned long dwProductVersionMS; | ||||
|   unsigned long dwProductVersionLS; | ||||
| } NPPluginData; | ||||
| typedef NPError     (*NP_GetPluginDataFunc)(NPPluginData*); | ||||
| NPError OSCALL      NP_GetPluginData(NPPluginData * pPluginData); | ||||
| #endif | ||||
| typedef NPError     (*NP_GetEntryPointsFunc)(NPPluginFuncs*); | ||||
| NPError OSCALL      NP_GetEntryPoints(NPPluginFuncs* pFuncs); | ||||
| typedef NPError     (*NP_InitializeFunc)(NPNetscapeFuncs*); | ||||
| NPError OSCALL      NP_Initialize(NPNetscapeFuncs* bFuncs); | ||||
| typedef NPError     (*NP_ShutdownFunc)(void); | ||||
| NPError OSCALL      NP_Shutdown(void); | ||||
| typedef const char* (*NP_GetMIMEDescriptionFunc)(void); | ||||
| const char*         NP_GetMIMEDescription(void); | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #if defined(__OS2__) | ||||
| #pragma pack() | ||||
| #endif | ||||
|  | ||||
| #ifdef XP_UNIX | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif | ||||
| typedef char*          (*NP_GetPluginVersionFunc)(void); | ||||
| NP_EXPORT(char*)       NP_GetPluginVersion(void); | ||||
| typedef const char*    (*NP_GetMIMEDescriptionFunc)(void); | ||||
| NP_EXPORT(const char*) NP_GetMIMEDescription(void); | ||||
| #ifdef XP_MACOSX | ||||
| typedef NPError        (*NP_InitializeFunc)(NPNetscapeFuncs*); | ||||
| NP_EXPORT(NPError)     NP_Initialize(NPNetscapeFuncs* bFuncs); | ||||
| typedef NPError        (*NP_GetEntryPointsFunc)(NPPluginFuncs*); | ||||
| NP_EXPORT(NPError)     NP_GetEntryPoints(NPPluginFuncs* pFuncs); | ||||
| #else | ||||
| typedef NPError        (*NP_InitializeFunc)(NPNetscapeFuncs*, NPPluginFuncs*); | ||||
| NP_EXPORT(NPError)     NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs); | ||||
| #endif | ||||
| typedef NPError        (*NP_ShutdownFunc)(void); | ||||
| NP_EXPORT(NPError)     NP_Shutdown(void); | ||||
| typedef NPError        (*NP_GetValueFunc)(void *, NPPVariable, void *); | ||||
| NP_EXPORT(NPError)     NP_GetValue(void *future, NPPVariable aVariable, void *aValue); | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #endif /* npfunctions_h_ */ | ||||
| @@ -1,393 +0,0 @@ | ||||
| /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | ||||
| /* | ||||
|  * Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation. | ||||
|  * All rights reserved. | ||||
|  * | ||||
|  * Redistribution and use in source and binary forms, with or without | ||||
|  * modification, are permitted provided that the following conditions are | ||||
|  * met: | ||||
|  * | ||||
|  * 1. Redistributions of source code must retain the above copyright | ||||
|  * notice, this list of conditions and the following disclaimer. | ||||
|  * 2. Redistributions in binary form must reproduce the above copyright | ||||
|  * notice, this list of conditions and the following disclaimer in the | ||||
|  * documentation and/or other materials provided with the distribution. | ||||
|  * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla | ||||
|  * Foundation ("Mozilla") nor the names of their contributors may be used | ||||
|  * to endorse or promote products derived from this software without | ||||
|  * specific prior written permission. | ||||
|  * | ||||
|  * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS | ||||
|  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||||
|  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||||
|  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR | ||||
|  * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||||
|  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||||
|  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||||
|  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||||
|  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||||
|  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||||
|  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
|  * | ||||
|  */ | ||||
| #ifndef _NP_RUNTIME_H_ | ||||
| #define _NP_RUNTIME_H_ | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif | ||||
|  | ||||
| #include "nptypes.h" | ||||
|  | ||||
| /* | ||||
|     This API is used to facilitate binding code written in C to script | ||||
|     objects.  The API in this header does not assume the presence of a | ||||
|     user agent.  That is, it can be used to bind C code to scripting | ||||
|     environments outside of the context of a user agent. | ||||
|  | ||||
|     However, the normal use of the this API is in the context of a | ||||
|     scripting environment running in a browser or other user agent. | ||||
|     In particular it is used to support the extended Netscape | ||||
|     script-ability API for plugins (NP-SAP).  NP-SAP is an extension | ||||
|     of the Netscape plugin API.  As such we have adopted the use of | ||||
|     the "NP" prefix for this API. | ||||
|  | ||||
|     The following NP{N|P}Variables were added to the Netscape plugin | ||||
|     API (in npapi.h): | ||||
|  | ||||
|     NPNVWindowNPObject | ||||
|     NPNVPluginElementNPObject | ||||
|     NPPVpluginScriptableNPObject | ||||
|  | ||||
|     These variables are exposed through NPN_GetValue() and | ||||
|     NPP_GetValue() (respectively) and are used to establish the | ||||
|     initial binding between the user agent and native code.  The DOM | ||||
|     objects in the user agent can be examined and manipulated using | ||||
|     the NPN_ functions that operate on NPObjects described in this | ||||
|     header. | ||||
|  | ||||
|     To the extent possible the assumptions about the scripting | ||||
|     language used by the scripting environment have been minimized. | ||||
| */ | ||||
|  | ||||
| #define NP_BEGIN_MACRO  do { | ||||
| #define NP_END_MACRO    } while (0) | ||||
|  | ||||
| /* | ||||
|     Objects (non-primitive data) passed between 'C' and script is | ||||
|     always wrapped in an NPObject.  The 'interface' of an NPObject is | ||||
|     described by an NPClass. | ||||
| */ | ||||
| typedef struct NPObject NPObject; | ||||
| typedef struct NPClass NPClass; | ||||
|  | ||||
| typedef char NPUTF8; | ||||
| typedef struct _NPString { | ||||
|     const NPUTF8 *UTF8Characters; | ||||
|     uint32_t UTF8Length; | ||||
| } NPString; | ||||
|  | ||||
| typedef enum { | ||||
|     NPVariantType_Void, | ||||
|     NPVariantType_Null, | ||||
|     NPVariantType_Bool, | ||||
|     NPVariantType_Int32, | ||||
|     NPVariantType_Double, | ||||
|     NPVariantType_String, | ||||
|     NPVariantType_Object | ||||
| } NPVariantType; | ||||
|  | ||||
| typedef struct _NPVariant { | ||||
|     NPVariantType type; | ||||
|     union { | ||||
|         bool boolValue; | ||||
|         int32_t intValue; | ||||
|         double doubleValue; | ||||
|         NPString stringValue; | ||||
|         NPObject *objectValue; | ||||
|     } value; | ||||
| } NPVariant; | ||||
|  | ||||
| /* | ||||
|     NPN_ReleaseVariantValue is called on all 'out' parameters | ||||
|     references.  Specifically it is to be called on variants that own | ||||
|     their value, as is the case with all non-const NPVariant* | ||||
|     arguments after a successful call to any methods (except this one) | ||||
|     in this API. | ||||
|  | ||||
|     After calling NPN_ReleaseVariantValue, the type of the variant | ||||
|     will be NPVariantType_Void. | ||||
| */ | ||||
| void NPN_ReleaseVariantValue(NPVariant *variant); | ||||
|  | ||||
| #define NPVARIANT_IS_VOID(_v)    ((_v).type == NPVariantType_Void) | ||||
| #define NPVARIANT_IS_NULL(_v)    ((_v).type == NPVariantType_Null) | ||||
| #define NPVARIANT_IS_BOOLEAN(_v) ((_v).type == NPVariantType_Bool) | ||||
| #define NPVARIANT_IS_INT32(_v)   ((_v).type == NPVariantType_Int32) | ||||
| #define NPVARIANT_IS_DOUBLE(_v)  ((_v).type == NPVariantType_Double) | ||||
| #define NPVARIANT_IS_STRING(_v)  ((_v).type == NPVariantType_String) | ||||
| #define NPVARIANT_IS_OBJECT(_v)  ((_v).type == NPVariantType_Object) | ||||
|  | ||||
| #define NPVARIANT_TO_BOOLEAN(_v) ((_v).value.boolValue) | ||||
| #define NPVARIANT_TO_INT32(_v)   ((_v).value.intValue) | ||||
| #define NPVARIANT_TO_DOUBLE(_v)  ((_v).value.doubleValue) | ||||
| #define NPVARIANT_TO_STRING(_v)  ((_v).value.stringValue) | ||||
| #define NPVARIANT_TO_OBJECT(_v)  ((_v).value.objectValue) | ||||
|  | ||||
| #define VOID_TO_NPVARIANT(_v)                                                 \ | ||||
| NP_BEGIN_MACRO                                                                \ | ||||
|     (_v).type = NPVariantType_Void;                                           \ | ||||
|     (_v).value.objectValue = NULL;                                            \ | ||||
| NP_END_MACRO | ||||
|  | ||||
| #define NULL_TO_NPVARIANT(_v)                                                 \ | ||||
| NP_BEGIN_MACRO                                                                \ | ||||
|     (_v).type = NPVariantType_Null;                                           \ | ||||
|     (_v).value.objectValue = NULL;                                            \ | ||||
| NP_END_MACRO | ||||
|  | ||||
| #define BOOLEAN_TO_NPVARIANT(_val, _v)                                        \ | ||||
| NP_BEGIN_MACRO                                                                \ | ||||
|     (_v).type = NPVariantType_Bool;                                           \ | ||||
|     (_v).value.boolValue = !!(_val);                                          \ | ||||
| NP_END_MACRO | ||||
|  | ||||
| #define INT32_TO_NPVARIANT(_val, _v)                                          \ | ||||
| NP_BEGIN_MACRO                                                                \ | ||||
|     (_v).type = NPVariantType_Int32;                                          \ | ||||
|     (_v).value.intValue = _val;                                               \ | ||||
| NP_END_MACRO | ||||
|  | ||||
| #define DOUBLE_TO_NPVARIANT(_val, _v)                                         \ | ||||
| NP_BEGIN_MACRO                                                                \ | ||||
|     (_v).type = NPVariantType_Double;                                         \ | ||||
|     (_v).value.doubleValue = _val;                                            \ | ||||
| NP_END_MACRO | ||||
|  | ||||
| #define STRINGZ_TO_NPVARIANT(_val, _v)                                        \ | ||||
| NP_BEGIN_MACRO                                                                \ | ||||
|     (_v).type = NPVariantType_String;                                         \ | ||||
|     NPString str = { _val, (uint32_t)(strlen(_val)) };                        \ | ||||
|     (_v).value.stringValue = str;                                             \ | ||||
| NP_END_MACRO | ||||
|  | ||||
| #define STRINGN_TO_NPVARIANT(_val, _len, _v)                                  \ | ||||
| NP_BEGIN_MACRO                                                                \ | ||||
|     (_v).type = NPVariantType_String;                                         \ | ||||
|     NPString str = { _val, (uint32_t)(_len) };                                \ | ||||
|     (_v).value.stringValue = str;                                             \ | ||||
| NP_END_MACRO | ||||
|  | ||||
| #define OBJECT_TO_NPVARIANT(_val, _v)                                         \ | ||||
| NP_BEGIN_MACRO                                                                \ | ||||
|     (_v).type = NPVariantType_Object;                                         \ | ||||
|     (_v).value.objectValue = _val;                                            \ | ||||
| NP_END_MACRO | ||||
|  | ||||
|  | ||||
| /* | ||||
|   Type mappings (JavaScript types have been used for illustration | ||||
|     purposes): | ||||
|  | ||||
|   JavaScript       to             C (NPVariant with type:) | ||||
|   undefined                       NPVariantType_Void | ||||
|   null                            NPVariantType_Null | ||||
|   Boolean                         NPVariantType_Bool | ||||
|   Number                          NPVariantType_Double or NPVariantType_Int32 | ||||
|   String                          NPVariantType_String | ||||
|   Object                          NPVariantType_Object | ||||
|  | ||||
|   C (NPVariant with type:)   to   JavaScript | ||||
|   NPVariantType_Void              undefined | ||||
|   NPVariantType_Null              null | ||||
|   NPVariantType_Bool              Boolean | ||||
|   NPVariantType_Int32             Number | ||||
|   NPVariantType_Double            Number | ||||
|   NPVariantType_String            String | ||||
|   NPVariantType_Object            Object | ||||
| */ | ||||
|  | ||||
| typedef void *NPIdentifier; | ||||
|  | ||||
| /* | ||||
|     NPObjects have methods and properties.  Methods and properties are | ||||
|     identified with NPIdentifiers.  These identifiers may be reflected | ||||
|     in script.  NPIdentifiers can be either strings or integers, IOW, | ||||
|     methods and properties can be identified by either strings or | ||||
|     integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be | ||||
|     compared using ==.  In case of any errors, the requested | ||||
|     NPIdentifier(s) will be NULL. NPIdentifier lifetime is controlled | ||||
|     by the browser. Plugins do not need to worry about memory management | ||||
|     with regards to NPIdentifiers. | ||||
| */ | ||||
| NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name); | ||||
| void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, | ||||
|                               NPIdentifier *identifiers); | ||||
| NPIdentifier NPN_GetIntIdentifier(int32_t intid); | ||||
| bool NPN_IdentifierIsString(NPIdentifier identifier); | ||||
|  | ||||
| /* | ||||
|     The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed. | ||||
| */ | ||||
| NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier); | ||||
|  | ||||
| /* | ||||
|     Get the integer represented by identifier. If identifier is not an | ||||
|     integer identifier, the behaviour is undefined. | ||||
| */ | ||||
| int32_t NPN_IntFromIdentifier(NPIdentifier identifier); | ||||
|  | ||||
| /* | ||||
|     NPObject behavior is implemented using the following set of | ||||
|     callback functions. | ||||
|  | ||||
|     The NPVariant *result argument of these functions (where | ||||
|     applicable) should be released using NPN_ReleaseVariantValue(). | ||||
| */ | ||||
| typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass); | ||||
| typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj); | ||||
| typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj); | ||||
| typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name); | ||||
| typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name, | ||||
|                                     const NPVariant *args, uint32_t argCount, | ||||
|                                     NPVariant *result); | ||||
| typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj, | ||||
|                                            const NPVariant *args, | ||||
|                                            uint32_t argCount, | ||||
|                                            NPVariant *result); | ||||
| typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name); | ||||
| typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, | ||||
|                                          NPVariant *result); | ||||
| typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, | ||||
|                                          const NPVariant *value); | ||||
| typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj, | ||||
|                                             NPIdentifier name); | ||||
| typedef bool (*NPEnumerationFunctionPtr)(NPObject *npobj, NPIdentifier **value, | ||||
|                                          uint32_t *count); | ||||
| typedef bool (*NPConstructFunctionPtr)(NPObject *npobj, | ||||
|                                        const NPVariant *args, | ||||
|                                        uint32_t argCount, | ||||
|                                        NPVariant *result); | ||||
|  | ||||
| /* | ||||
|     NPObjects returned by create, retain, invoke, and getProperty pass | ||||
|     a reference count to the caller.  That is, the callee adds a | ||||
|     reference count which passes to the caller.  It is the caller's | ||||
|     responsibility to release the returned object. | ||||
|  | ||||
|     NPInvokeFunctionPtr function may return 0 to indicate a void | ||||
|     result. | ||||
|  | ||||
|     NPInvalidateFunctionPtr is called by the scripting environment | ||||
|     when the native code is shutdown.  Any attempt to message a | ||||
|     NPObject instance after the invalidate callback has been | ||||
|     called will result in undefined behavior, even if the native code | ||||
|     is still retaining those NPObject instances.  (The runtime | ||||
|     will typically return immediately, with 0 or NULL, from an attempt | ||||
|     to dispatch to a NPObject, but this behavior should not be | ||||
|     depended upon.) | ||||
|  | ||||
|     The NPEnumerationFunctionPtr function may pass an array of | ||||
|     NPIdentifiers back to the caller. The callee allocs the memory of | ||||
|     the array using NPN_MemAlloc(), and it's the caller's responsibility | ||||
|     to release it using NPN_MemFree(). | ||||
| */ | ||||
| struct NPClass | ||||
| { | ||||
|     uint32_t structVersion; | ||||
|     NPAllocateFunctionPtr allocate; | ||||
|     NPDeallocateFunctionPtr deallocate; | ||||
|     NPInvalidateFunctionPtr invalidate; | ||||
|     NPHasMethodFunctionPtr hasMethod; | ||||
|     NPInvokeFunctionPtr invoke; | ||||
|     NPInvokeDefaultFunctionPtr invokeDefault; | ||||
|     NPHasPropertyFunctionPtr hasProperty; | ||||
|     NPGetPropertyFunctionPtr getProperty; | ||||
|     NPSetPropertyFunctionPtr setProperty; | ||||
|     NPRemovePropertyFunctionPtr removeProperty; | ||||
|     NPEnumerationFunctionPtr enumerate; | ||||
|     NPConstructFunctionPtr construct; | ||||
| }; | ||||
|  | ||||
| #define NP_CLASS_STRUCT_VERSION      3 | ||||
|  | ||||
| #define NP_CLASS_STRUCT_VERSION_ENUM 2 | ||||
| #define NP_CLASS_STRUCT_VERSION_CTOR 3 | ||||
|  | ||||
| #define NP_CLASS_STRUCT_VERSION_HAS_ENUM(npclass)   \ | ||||
|         ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_ENUM) | ||||
|  | ||||
| #define NP_CLASS_STRUCT_VERSION_HAS_CTOR(npclass)   \ | ||||
|         ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_CTOR) | ||||
|  | ||||
| struct NPObject { | ||||
|     NPClass *_class; | ||||
|     uint32_t referenceCount; | ||||
|     /* | ||||
|      * Additional space may be allocated here by types of NPObjects | ||||
|      */ | ||||
| }; | ||||
|  | ||||
| /* | ||||
|     If the class has an allocate function, NPN_CreateObject invokes | ||||
|     that function, otherwise a NPObject is allocated and | ||||
|     returned. This method will initialize the referenceCount member of | ||||
|     the NPObject to 1. | ||||
| */ | ||||
| NPObject *NPN_CreateObject(NPP npp, NPClass *aClass); | ||||
|  | ||||
| /* | ||||
|     Increment the NPObject's reference count. | ||||
| */ | ||||
| NPObject *NPN_RetainObject(NPObject *npobj); | ||||
|  | ||||
| /* | ||||
|     Decremented the NPObject's reference count.  If the reference | ||||
|     count goes to zero, the class's destroy function is invoke if | ||||
|     specified, otherwise the object is freed directly. | ||||
| */ | ||||
| void NPN_ReleaseObject(NPObject *npobj); | ||||
|  | ||||
| /* | ||||
|     Functions to access script objects represented by NPObject. | ||||
|  | ||||
|     Calls to script objects are synchronous.  If a function returns a | ||||
|     value, it will be supplied via the result NPVariant | ||||
|     argument. Successful calls will return true, false will be | ||||
|     returned in case of an error. | ||||
|  | ||||
|     Calls made from plugin code to script must be made from the thread | ||||
|     on which the plugin was initialized. | ||||
| */ | ||||
|  | ||||
| bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, | ||||
|                 const NPVariant *args, uint32_t argCount, NPVariant *result); | ||||
| bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, | ||||
|                        uint32_t argCount, NPVariant *result); | ||||
| bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, | ||||
|                   NPVariant *result); | ||||
| bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, | ||||
|                      NPVariant *result); | ||||
| bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, | ||||
|                      const NPVariant *value); | ||||
| bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); | ||||
| bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); | ||||
| bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName); | ||||
| bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier, | ||||
|                    uint32_t *count); | ||||
| bool NPN_Construct(NPP npp, NPObject *npobj, const NPVariant *args, | ||||
|                    uint32_t argCount, NPVariant *result); | ||||
|  | ||||
| /* | ||||
|     NPN_SetException may be called to trigger a script exception upon | ||||
|     return from entry points into NPObjects.  Typical usage: | ||||
|  | ||||
|     NPN_SetException (npobj, message); | ||||
| */ | ||||
| void NPN_SetException(NPObject *npobj, const NPUTF8 *message); | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #endif | ||||
| @@ -1,121 +0,0 @@ | ||||
| /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||||
| /* ***** BEGIN LICENSE BLOCK ***** | ||||
|  * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | ||||
|  * | ||||
|  * The contents of this file are subject to the Mozilla Public License Version | ||||
|  * 1.1 (the "License"); you may not use this file except in compliance with | ||||
|  * the License. You may obtain a copy of the License at | ||||
|  * http://www.mozilla.org/MPL/ | ||||
|  * | ||||
|  * Software distributed under the License is distributed on an "AS IS" basis, | ||||
|  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||||
|  * for the specific language governing rights and limitations under the | ||||
|  * License. | ||||
|  * | ||||
|  * The Original Code is mozilla.org code. | ||||
|  * | ||||
|  * The Initial Developer of the Original Code is | ||||
|  * mozilla.org. | ||||
|  * Portions created by the Initial Developer are Copyright (C) 2004 | ||||
|  * the Initial Developer. All Rights Reserved. | ||||
|  * | ||||
|  * Contributor(s): | ||||
|  *   Johnny Stenback <jst@mozilla.org> (Original author) | ||||
|  * | ||||
|  * Alternatively, the contents of this file may be used under the terms of | ||||
|  * either the GNU General Public License Version 2 or later (the "GPL"), or | ||||
|  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), | ||||
|  * in which case the provisions of the GPL or the LGPL are applicable instead | ||||
|  * of those above. If you wish to allow use of your version of this file only | ||||
|  * under the terms of either the GPL or the LGPL, and not to allow others to | ||||
|  * use your version of this file under the terms of the MPL, indicate your | ||||
|  * decision by deleting the provisions above and replace them with the notice | ||||
|  * and other provisions required by the GPL or the LGPL. If you do not delete | ||||
|  * the provisions above, a recipient may use your version of this file under | ||||
|  * the terms of any one of the MPL, the GPL or the LGPL. | ||||
|  * | ||||
|  * ***** END LICENSE BLOCK ***** */ | ||||
|  | ||||
| #ifndef nptypes_h_ | ||||
| #define nptypes_h_ | ||||
|  | ||||
| /* | ||||
|  * Header file for ensuring that C99 types ([u]int32_t, [u]int64_t and bool) and | ||||
|  * true/false macros are available. | ||||
|  */ | ||||
|  | ||||
| #if defined(WIN32) || defined(OS2) | ||||
|   /* | ||||
|    * Win32 and OS/2 don't know C99, so define [u]int_16/32/64 here. The bool | ||||
|    * is predefined tho, both in C and C++. | ||||
|    */ | ||||
|   typedef short int16_t; | ||||
|   typedef unsigned short uint16_t; | ||||
|   typedef int int32_t; | ||||
|   typedef unsigned int uint32_t; | ||||
|   typedef long long int64_t; | ||||
|   typedef unsigned long long uint64_t; | ||||
| #elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX) | ||||
|   /* | ||||
|    * AIX and SunOS ship a inttypes.h header that defines [u]int32_t, | ||||
|    * but not bool for C. | ||||
|    */ | ||||
|   #include <inttypes.h> | ||||
|  | ||||
|   #ifndef __cplusplus | ||||
|     typedef int bool; | ||||
|     #define true   1 | ||||
|     #define false  0 | ||||
|   #endif | ||||
| #elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD) | ||||
|   /* | ||||
|    * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and | ||||
|    * u_int32_t. | ||||
|    */ | ||||
|   #include <sys/types.h> | ||||
|  | ||||
|   /* | ||||
|    * BSD/OS ships no header that defines uint32_t, nor bool (for C) | ||||
|    */ | ||||
|   #if defined(bsdi) | ||||
|   typedef u_int32_t uint32_t; | ||||
|   typedef u_int64_t uint64_t; | ||||
|  | ||||
|   #if !defined(__cplusplus) | ||||
|     typedef int bool; | ||||
|     #define true   1 | ||||
|     #define false  0 | ||||
|   #endif | ||||
|   #else | ||||
|   /* | ||||
|    * FreeBSD and OpenBSD define uint32_t and bool. | ||||
|    */ | ||||
|     #include <inttypes.h> | ||||
|     #include <stdbool.h> | ||||
|   #endif | ||||
| #elif defined(BEOS) | ||||
|   #include <inttypes.h> | ||||
| #else | ||||
|   /* | ||||
|    * For those that ship a standard C99 stdint.h header file, include | ||||
|    * it. Can't do the same for stdbool.h tho, since some systems ship | ||||
|    * with a stdbool.h file that doesn't compile! | ||||
|    */ | ||||
|   #include <stdint.h> | ||||
|  | ||||
|   #ifndef __cplusplus | ||||
|     #if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95) | ||||
|       #include <stdbool.h> | ||||
|     #else | ||||
|       /* | ||||
|        * GCC 2.91 can't deal with a typedef for bool, but a #define | ||||
|        * works. | ||||
|        */ | ||||
|       #define bool int | ||||
|       #define true   1 | ||||
|       #define false  0 | ||||
|     #endif | ||||
|   #endif | ||||
| #endif | ||||
|  | ||||
| #endif /* nptypes_h_ */ | ||||
							
								
								
									
										213
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						| @@ -1,5 +1,5 @@ | ||||
| AC_PREREQ(2.63) | ||||
| AC_INIT([gnome-shell],[3.4.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell]) | ||||
| AC_INIT([gnome-shell],[2.91.6],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell]) | ||||
|  | ||||
| AC_CONFIG_HEADERS([config.h]) | ||||
| AC_CONFIG_SRCDIR([src/shell-global.c]) | ||||
| @@ -9,8 +9,8 @@ AC_CONFIG_AUX_DIR([config]) | ||||
| AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"]) | ||||
| AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"]) | ||||
|  | ||||
| AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign]) | ||||
| AM_MAINTAINER_MODE([enable]) | ||||
| AM_INIT_AUTOMAKE([1.10 dist-bzip2 no-dist-gzip foreign]) | ||||
| AM_MAINTAINER_MODE | ||||
|  | ||||
| m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | ||||
|  | ||||
| @@ -23,19 +23,19 @@ AM_PROG_CC_C_O | ||||
| LT_PREREQ([2.2.6]) | ||||
| LT_INIT([disable-static]) | ||||
|  | ||||
| # i18n | ||||
| IT_PROG_INTLTOOL([0.40]) | ||||
|  | ||||
| AM_GNU_GETTEXT([external]) | ||||
| AM_GNU_GETTEXT_VERSION([0.17]) | ||||
|  | ||||
| GETTEXT_PACKAGE=gnome-shell | ||||
| AC_SUBST(GETTEXT_PACKAGE) | ||||
| AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", | ||||
|                    [The prefix for our gettext translation domains.]) | ||||
| IT_PROG_INTLTOOL(0.26) | ||||
| AM_GLIB_GNU_GETTEXT | ||||
|  | ||||
| PKG_PROG_PKG_CONFIG([0.22]) | ||||
|  | ||||
| # GConf stuff | ||||
| AC_PATH_PROG(GCONFTOOL, gconftool-2, no) | ||||
| AM_GCONF_SOURCE_2 | ||||
|  | ||||
| GLIB_GSETTINGS | ||||
|  | ||||
| # Get a value to substitute into gnome-shell.in | ||||
| @@ -52,85 +52,64 @@ AC_MSG_CHECKING([for GStreamer (needed for recording functionality)]) | ||||
| if $PKG_CONFIG --exists gstreamer-0.10 '>=' $GSTREAMER_MIN_VERSION ; then | ||||
|    AC_MSG_RESULT(yes) | ||||
|    build_recorder=true | ||||
|    recorder_modules="gstreamer-0.10 gstreamer-base-0.10 x11" | ||||
|    PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl) | ||||
|    recorder_modules="gstreamer-0.10 gstreamer-base-0.10 xfixes" | ||||
|    PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0) | ||||
| else | ||||
|    AC_MSG_RESULT(no) | ||||
| fi | ||||
|  | ||||
| AM_CONDITIONAL(BUILD_RECORDER, $build_recorder) | ||||
|  | ||||
| CLUTTER_MIN_VERSION=1.9.16 | ||||
| CLUTTER_MIN_VERSION=1.5.15 | ||||
| GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1 | ||||
| GJS_MIN_VERSION=1.29.18 | ||||
| MUTTER_MIN_VERSION=3.4.1 | ||||
| FOLKS_MIN_VERSION=0.5.2 | ||||
| GTK_MIN_VERSION=3.3.9 | ||||
| GIO_MIN_VERSION=2.31.6 | ||||
| LIBECAL_MIN_VERSION=2.32.0 | ||||
| LIBEDATASERVER_MIN_VERSION=1.2.0 | ||||
| LIBEDATASERVERUI_MIN_VERSION=2.91.6 | ||||
| TELEPATHY_GLIB_MIN_VERSION=0.17.5 | ||||
| TELEPATHY_LOGGER_MIN_VERSION=0.2.4 | ||||
| POLKIT_MIN_VERSION=0.100 | ||||
| STARTUP_NOTIFICATION_MIN_VERSION=0.11 | ||||
| GCR_MIN_VERSION=3.3.90 | ||||
| GJS_MIN_VERSION=0.7.8 | ||||
| MUTTER_MIN_VERSION=2.91.4 | ||||
| GTK_MIN_VERSION=2.91.7 | ||||
| GIO_MIN_VERSION=2.25.9 | ||||
| LIBECAL_REQUIRED=1.6.0 | ||||
| LIBEDATASERVER_REQUIRED=1.2.0 | ||||
| LIBEDATASERVERUI2_REQUIRED=1.2.0 | ||||
| LIBEDATASERVERUI3_REQUIRED=2.91.6 | ||||
|  | ||||
|  | ||||
| # Collect more than 20 libraries for a prize! | ||||
| PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION | ||||
| 			       libxml-2.0 | ||||
|                                gtk+-3.0 >= $GTK_MIN_VERSION | ||||
|                                folks >= $FOLKS_MIN_VERSION | ||||
|                                libmutter >= $MUTTER_MIN_VERSION | ||||
|                                gjs-internals-1.0 >= $GJS_MIN_VERSION | ||||
| 			       libgnome-menu-3.0 $recorder_modules | ||||
|                                gdk-x11-3.0 libsoup-2.4 | ||||
|                                gl | ||||
| 			       clutter-x11-1.0 >= $CLUTTER_MIN_VERSION | ||||
| 			       clutter-glx-1.0 >= $CLUTTER_MIN_VERSION | ||||
|                                libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION | ||||
|                                gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION | ||||
| 			       libcanberra | ||||
|                                telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION | ||||
|                                telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION | ||||
|                                polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes | ||||
|                                libnm-glib libnm-util gnome-keyring-1 | ||||
|                                gcr-3 >= $GCR_MIN_VERSION) | ||||
|  | ||||
| PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0) | ||||
|  | ||||
| PKG_CHECK_MODULES(SHELL_HOTPLUG_SNIFFER, gio-2.0 gdk-pixbuf-2.0) | ||||
|  | ||||
| PKG_CHECK_MODULES(BROWSER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION json-glib-1.0 >= 0.13.2) | ||||
| PKG_CHECK_MODULES(MUTTER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION | ||||
|                                  gio-unix-2.0 dbus-glib-1 libxml-2.0 | ||||
|                                  gtk+-3.0 >= $GTK_MIN_VERSION | ||||
|                                  mutter-plugins >= $MUTTER_MIN_VERSION | ||||
|                                  gjs-internals-1.0 >= $GJS_MIN_VERSION | ||||
| 				 libgnome-menu $recorder_modules gconf-2.0 | ||||
|                                  gdk-x11-3.0 | ||||
| 				 clutter-x11-1.0 >= $CLUTTER_MIN_VERSION | ||||
| 				 clutter-glx-1.0 >= $CLUTTER_MIN_VERSION | ||||
|                                  libstartup-notification-1.0 | ||||
|                                  gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION | ||||
| 				 libcanberra) | ||||
|  | ||||
| GJS_VERSION=`$PKG_CONFIG --modversion gjs-internals-1.0` | ||||
| AC_DEFINE_UNQUOTED([GJS_VERSION], ["$GJS_VERSION"], [The version of GJS we're linking to]) | ||||
| AC_SUBST([GJS_VERSION], ["$GJS_VERSION"]) | ||||
|  | ||||
| GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION]) | ||||
| JHBUILD_TYPELIBDIR="$INTROSPECTION_TYPELIBDIR" | ||||
| AC_SUBST(JHBUILD_TYPELIBDIR) | ||||
|  | ||||
| saved_CFLAGS=$CFLAGS | ||||
| saved_LIBS=$LIBS | ||||
| CFLAGS=$GNOME_SHELL_CFLAGS | ||||
| LIBS=$GNOME_SHELL_LIBS | ||||
| AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier) | ||||
| CFLAGS=$MUTTER_PLUGIN_CFLAGS | ||||
| LIBS=$MUTTER_PLUGIN_LIBS | ||||
| # sn_startup_sequence_get_application_id, we can replace with a version check later | ||||
| AC_CHECK_FUNCS(JS_NewGlobalObject sn_startup_sequence_get_application_id) | ||||
| CFLAGS=$saved_CFLAGS | ||||
| LIBS=$saved_LIBS | ||||
|  | ||||
| PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-internals-1.0 >= $GJS_MIN_VERSION) | ||||
| PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 x11) | ||||
| PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 gnome-desktop-3.0 >= 2.90.0) | ||||
| PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-3.0) | ||||
| PKG_CHECK_MODULES(TRAY, gtk+-3.0) | ||||
| PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0) | ||||
| PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 0.1.7) | ||||
| PKG_CHECK_MODULES(JS_TEST, clutter-x11-1.0 gjs-1.0 gobject-introspection-1.0 gtk+-3.0) | ||||
|  | ||||
| AC_MSG_CHECKING([for bluetooth support]) | ||||
| PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0], | ||||
|         [BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0` | ||||
| 	 BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0` | ||||
| PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 2.90.0], | ||||
|         [BLUETOOTH_DIR=`$PKG_CONFIG --variable=libdir gnome-bluetooth-1.0`/gnome-bluetooth | ||||
| 	 BLUETOOTH_LIBS="-L'$BLUETOOTH_DIR' -lgnome-bluetooth-applet" | ||||
| 	 AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"]) | ||||
| 	 AC_SUBST([BLUETOOTH_DIR],["$BLUETOOTH_DIR"]) | ||||
| 	 AC_DEFINE_UNQUOTED([BLUETOOTH_DIR],["$BLUETOOTH_DIR"],[Path to installed GnomeBluetooth typelib and library]) | ||||
| 	 AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet]) | ||||
| 	 AC_SUBST([HAVE_BLUETOOTH],[1]) | ||||
| @@ -139,41 +118,23 @@ PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0], | ||||
| 	 AC_SUBST([HAVE_BLUETOOTH],[0]) | ||||
| 	 AC_MSG_RESULT([no])]) | ||||
|  | ||||
| PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION libedataserverui-3.0 >= $LIBEDATASERVERUI_MIN_VERSION gio-2.0) | ||||
| AC_SUBST(CALENDAR_SERVER_CFLAGS) | ||||
| AC_SUBST(CALENDAR_SERVER_LIBS) | ||||
| # Default to libedataserverui-3.0, but allow falling back to 1.2 | ||||
| PKG_CHECK_EXISTS(libedataserverui-3.0, | ||||
|                  [EDS_API=3.0 | ||||
|                   LIBEDATASERVERUI_REQUIRED=$LIBEDATASERVERUI3_REQUIRED], | ||||
|                  [EDS_API=1.2 | ||||
|                   LIBEDATASERVERUI_REQUIRED=$LIBEDATASERVERUI2_REQUIRED]) | ||||
| PKG_CHECK_MODULES(LIBECAL, libecal-1.2 >= $LIBECAL_REQUIRED libedataserver-1.2 >= $LIBEDATASERVER_REQUIRED libedataserverui-$EDS_API >= $LIBEDATASERVERUI_REQUIRED) | ||||
| AC_SUBST(LIBECAL_CFLAGS) | ||||
| AC_SUBST(LIBECAL_LIBS) | ||||
|  | ||||
| AC_ARG_WITH(systemd, | ||||
|             AS_HELP_STRING([--with-systemd], | ||||
|                            [Add systemd support]), | ||||
|             [with_systemd=$withval], [with_systemd=auto]) | ||||
|  | ||||
| PKG_CHECK_MODULES(SYSTEMD, | ||||
|                   [libsystemd-login libsystemd-daemon], | ||||
|                   [have_systemd=yes], [have_systemd=no]) | ||||
|  | ||||
| if test "x$with_systemd" = "xauto" ; then | ||||
|         if test x$have_systemd = xno ; then | ||||
|                 use_systemd=no | ||||
|         else | ||||
|                 use_systemd=yes | ||||
|         fi | ||||
| else | ||||
|         use_systemd=$with_systemd | ||||
| fi | ||||
|  | ||||
| if test "x$use_systemd" = "xyes"; then | ||||
|         if test "x$have_systemd" = "xno"; then | ||||
|                 AC_MSG_ERROR([Systemd support explicitly required, but systemd not found]) | ||||
|         fi | ||||
|  | ||||
|         AC_DEFINE(WITH_SYSTEMD, 1, [systemd support]) | ||||
| fi | ||||
|  | ||||
| MUTTER_GIR_DIR=`$PKG_CONFIG --variable=girdir libmutter` | ||||
| MUTTER_TYPELIB_DIR=`$PKG_CONFIG --variable=typelibdir libmutter` | ||||
| AC_SUBST(MUTTER_GIR_DIR) | ||||
| AC_SUBST(MUTTER_TYPELIB_DIR) | ||||
| MUTTER_BIN_DIR=`$PKG_CONFIG --variable=exec_prefix mutter-plugins`/bin | ||||
| # FIXME: metacity-plugins.pc should point directly to its .gir file | ||||
| MUTTER_LIB_DIR=`$PKG_CONFIG --variable=libdir mutter-plugins` | ||||
| MUTTER_PLUGIN_DIR=`$PKG_CONFIG --variable=plugindir mutter-plugins` | ||||
| AC_SUBST(MUTTER_BIN_DIR) | ||||
| AC_SUBST(MUTTER_LIB_DIR) | ||||
| AC_SUBST(MUTTER_PLUGIN_DIR) | ||||
|  | ||||
| GJS_CONSOLE=`$PKG_CONFIG --variable=gjs_console gjs-1.0` | ||||
| AC_SUBST(GJS_CONSOLE) | ||||
| @@ -182,17 +143,6 @@ AC_CHECK_FUNCS(fdwalk) | ||||
| AC_CHECK_FUNCS(mallinfo) | ||||
| AC_CHECK_HEADERS([sys/resource.h]) | ||||
|  | ||||
| # _NL_TIME_FIRST_WEEKDAY is an enum and not a define | ||||
| AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY]) | ||||
| AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], | ||||
|                                    [[nl_langinfo(_NL_TIME_FIRST_WEEKDAY);]])], | ||||
|                [langinfo_ok=yes], [langinfo_ok=no]) | ||||
| AC_MSG_RESULT($langinfo_ok) | ||||
| if test "$langinfo_ok" = "yes"; then | ||||
|   AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1], | ||||
|             [Define if _NL_TIME_FIRST_WEEKDAY is available]) | ||||
| fi | ||||
|  | ||||
| # Sets GLIB_GENMARSHAL and GLIB_MKENUMS | ||||
| AM_PATH_GLIB_2_0() | ||||
| G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` | ||||
| @@ -206,8 +156,6 @@ AC_SUBST(GIRDIR) | ||||
| TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" | ||||
| AC_SUBST(TYPELIBDIR) | ||||
|  | ||||
| GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) | ||||
|  | ||||
| # Stay command-line compatible with the gnome-common configure option. Here | ||||
| # minimum/yes/maximum are the same, however. | ||||
| AC_ARG_ENABLE(compile_warnings, | ||||
| @@ -228,57 +176,22 @@ if test "$enable_compile_warnings" != no ; then | ||||
|     if test "$enable_compile_warnings" = error ; then | ||||
|       case " $CFLAGS " in | ||||
|       *[\ \	]-Werror[\ \	]*) ;; | ||||
|       *) CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" ;; | ||||
|       *) CFLAGS="$CFLAGS -Werror" ;; | ||||
|       esac | ||||
|     fi | ||||
|   fi | ||||
| fi | ||||
| changequote([,])dnl | ||||
|  | ||||
| AC_ARG_ENABLE(jhbuild-wrapper-script, | ||||
|   AS_HELP_STRING([--enable-jhbuild-wrapper-script],[Make "gnome-shell" script work for jhbuild]),,enable_jhbuild_wrapper_script=no) | ||||
| AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script" = xyes) | ||||
|  | ||||
| AC_MSG_CHECKING([location of system Certificate Authority list]) | ||||
| AC_ARG_WITH(ca-certificates, | ||||
|             [AC_HELP_STRING([--with-ca-certificates=@<:@path@:>@], | ||||
|                             [path to system Certificate Authority list])]) | ||||
|  | ||||
| if test "$with_ca_certificates" = "no"; then | ||||
|     AC_MSG_RESULT([disabled]) | ||||
| else | ||||
|     if test -z "$with_ca_certificates"; then | ||||
|         for f in /etc/pki/tls/certs/ca-bundle.crt \ | ||||
|                  /etc/ssl/certs/ca-certificates.crt; do | ||||
|              if test -f "$f"; then | ||||
|                 with_ca_certificates="$f" | ||||
|              fi | ||||
|         done | ||||
|         if test -z "$with_ca_certificates"; then | ||||
|             AC_MSG_ERROR([could not find. Use --with-ca-certificates=path to set, or --without-ca-certificates to disable]) | ||||
|         fi | ||||
|    fi | ||||
|  | ||||
|    AC_MSG_RESULT($with_ca_certificates) | ||||
|    AC_DEFINE_UNQUOTED(SHELL_SYSTEM_CA_FILE, ["$with_ca_certificates"], [The system TLS CA list]) | ||||
| fi | ||||
| AC_SUBST(SHELL_SYSTEM_CA_FILE,["$with_ca_certificates"]) | ||||
|  | ||||
| BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}" | ||||
| AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to]) | ||||
| AC_PATH_PROG(mutter, [mutter]) | ||||
| AC_SUBST(mutter) | ||||
|  | ||||
| AC_CONFIG_FILES([ | ||||
|   Makefile | ||||
|   data/Makefile | ||||
|   docs/Makefile | ||||
|   docs/reference/Makefile | ||||
|   docs/reference/shell/Makefile | ||||
|   docs/reference/shell/shell-docs.sgml | ||||
|   docs/reference/st/Makefile | ||||
|   docs/reference/st/st-docs.sgml | ||||
|   js/Makefile | ||||
|   js/misc/config.js | ||||
|   src/Makefile | ||||
|   browser-plugin/Makefile | ||||
|   tests/Makefile | ||||
|   po/Makefile.in | ||||
|   man/Makefile | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| desktopdir=$(datadir)/applications | ||||
| desktop_DATA = gnome-shell.desktop gnome-shell-extension-prefs.desktop | ||||
| desktop_DATA = gnome-shell.desktop | ||||
|  | ||||
| # We substitute in bindir so it works as an autostart | ||||
| # file when built in a non-system prefix | ||||
| @@ -12,48 +12,52 @@ desktop_DATA = gnome-shell.desktop gnome-shell-extension-prefs.desktop | ||||
| %.desktop:%.desktop.in | ||||
| 	$(AM_V_GEN) sed s/^_// < $< > $@ || rm $@ | ||||
|  | ||||
| searchprovidersdir = $(pkgdatadir)/open-search-providers | ||||
| searchprovidersdir = $(pkgdatadir)/search_providers | ||||
| dist_searchproviders_DATA =				\ | ||||
| 	open-search-providers/google.xml		\ | ||||
| 	open-search-providers/wikipedia.xml | ||||
| 	search_providers/google.xml				\ | ||||
| 	search_providers/wikipedia.xml | ||||
|  | ||||
| introspectiondir = $(datadir)/dbus-1/interfaces | ||||
| introspection_DATA = org.gnome.ShellSearchProvider.xml | ||||
| imagesdir = $(pkgdatadir)/images | ||||
| dist_images_DATA =				\ | ||||
| 	close-black.svg				\ | ||||
| 	magnifier.svg | ||||
|  | ||||
| themedir = $(pkgdatadir)/theme | ||||
| dist_theme_DATA =				\ | ||||
| 	theme/calendar-arrow-left.svg		\ | ||||
| 	theme/calendar-arrow-right.svg		\ | ||||
| 	theme/calendar-today.svg		\ | ||||
| 	theme/checkbox-focused.svg		\ | ||||
| 	theme/checkbox-off-focused.svg		\ | ||||
| 	theme/checkbox-off.svg			\ | ||||
| 	theme/checkbox.svg			\ | ||||
| 	theme/close-window.svg			\ | ||||
| 	theme/close.svg				\ | ||||
| 	theme/corner-ripple-ltr.png		\ | ||||
| 	theme/corner-ripple-rtl.png		\ | ||||
| 	theme/corner-ripple.png			\ | ||||
| 	theme/dash-placeholder.svg		\ | ||||
| 	theme/filter-selected-ltr.svg		\ | ||||
| 	theme/filter-selected-rtl.svg		\ | ||||
| 	theme/gdm.css				\ | ||||
| 	theme/filter-selected.svg		\ | ||||
| 	theme/gnome-shell.css			\ | ||||
| 	theme/panel-button-border.svg		\ | ||||
| 	theme/panel-button-highlight-narrow.svg	\ | ||||
| 	theme/panel-button-highlight-wide.svg	\ | ||||
| 	theme/process-working.svg		\ | ||||
| 	theme/mosaic-view-active.svg		\ | ||||
| 	theme/mosaic-view.svg			\ | ||||
| 	theme/move-window-on-new.svg		\ | ||||
| 	theme/process-working.png		\ | ||||
| 	theme/running-indicator.svg		\ | ||||
| 	theme/scroll-button-down-hover.png	\ | ||||
| 	theme/scroll-button-down.png		\ | ||||
| 	theme/scroll-button-up-hover.png	\ | ||||
| 	theme/scroll-button-up.png		\ | ||||
| 	theme/scroll-hhandle.svg		\ | ||||
| 	theme/scroll-vhandle.svg		\ | ||||
| 	theme/source-button-border.svg		\ | ||||
| 	theme/section-more.svg			\ | ||||
| 	theme/section-more-open.svg		\ | ||||
| 	theme/separator-white.png		\ | ||||
| 	theme/single-view-active.svg		\ | ||||
| 	theme/single-view.svg			\ | ||||
| 	theme/toggle-off-us.svg			\ | ||||
| 	theme/toggle-off-intl.svg		\ | ||||
| 	theme/toggle-on-us.svg			\ | ||||
| 	theme/toggle-on-intl.svg		\ | ||||
| 	theme/ws-switch-arrow-up.svg		\ | ||||
| 	theme/ws-switch-arrow-down.svg | ||||
| 	theme/ws-switch-arrow-left.svg		\ | ||||
| 	theme/ws-switch-arrow-right.svg | ||||
|  | ||||
| gsettings_SCHEMAS = org.gnome.shell.gschema.xml org.gnome.shell.evolution.calendar.gschema.xml | ||||
| gsettings_SCHEMAS =					\ | ||||
| 	org.gnome.accessibility.magnifier.gschema.xml	\ | ||||
| 	org.gnome.shell.gschema.xml | ||||
|  | ||||
| @INTLTOOL_XML_NOMERGE_RULE@ | ||||
| @GSETTINGS_RULES@ | ||||
| @@ -65,27 +69,35 @@ gschemas.compiled: $(gsettings_SCHEMAS:.xml=.valid) | ||||
|  | ||||
| all-local: gschemas.compiled | ||||
|  | ||||
| convertdir = $(datadir)/GConf/gsettings | ||||
| convert_DATA = gnome-shell-overrides.convert | ||||
|  | ||||
| # GConf schemas: provide defaults for keys from Metacity we are overriding | ||||
| gconfschemadir  = @GCONF_SCHEMA_FILE_DIR@ | ||||
| gconfschema_DATA = gnome-shell.schemas | ||||
|  | ||||
| menudir = $(sysconfdir)/xdg/menus | ||||
|  | ||||
| menu_DATA = \ | ||||
| 	gs-applications.menu | ||||
|  | ||||
| shadersdir = $(pkgdatadir)/shaders | ||||
| shaders_DATA = \ | ||||
| 	shaders/dim-window.glsl | ||||
|  | ||||
| install-data-local: | ||||
| 	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(gconfschema_DATA) | ||||
|  | ||||
|  | ||||
|  | ||||
| EXTRA_DIST =						\ | ||||
| 	gnome-shell.desktop.in.in			\ | ||||
| 	gnome-shell-extension-prefs.desktop.in.in	\ | ||||
| 	$(introspection_DATA)				\ | ||||
| 	$(menu_DATA)					\ | ||||
| 	$(gconfschema_DATA)				\ | ||||
| 	$(shaders_DATA)					\ | ||||
| 	$(convert_DATA)					\ | ||||
| 	org.gnome.shell.evolution.calendar.gschema.xml.in	\ | ||||
| 	org.gnome.accessibility.magnifier.gschema.xml.in \ | ||||
| 	org.gnome.shell.gschema.xml.in | ||||
|  | ||||
| CLEANFILES =						\ | ||||
| 	gnome-shell.desktop.in				\ | ||||
| 	gnome-shell-extension-prefs.in			\ | ||||
| 	$(desktop_DATA)					\ | ||||
| 	$(gsettings_SCHEMAS)				\ | ||||
| 	gschemas.compiled | ||||
|   | ||||
							
								
								
									
										66
									
								
								data/close-black.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,66 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||
| <!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  --> | ||||
|  | ||||
| <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" | ||||
|    version="1.1" | ||||
|    id="Foreground" | ||||
|    x="0px" | ||||
|    y="0px" | ||||
|    width="16px" | ||||
|    height="16px" | ||||
|    viewBox="0 0 16 16" | ||||
|    enable-background="new 0 0 16 16" | ||||
|    xml:space="preserve" | ||||
|    sodipodi:version="0.32" | ||||
|    inkscape:version="0.46+devel" | ||||
|    sodipodi:docname="close-black.svg" | ||||
|    inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata | ||||
|    id="metadata2399"><rdf:RDF><cc:Work | ||||
|        rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type | ||||
|          rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs | ||||
|    id="defs2397"><linearGradient | ||||
|      id="linearGradient3173"><stop | ||||
|        style="stop-color:#c4c4c4;stop-opacity:1;" | ||||
|        offset="0" | ||||
|        id="stop3175" /><stop | ||||
|        style="stop-color:#ffffff;stop-opacity:1;" | ||||
|        offset="1" | ||||
|        id="stop3177" /></linearGradient><inkscape:perspective | ||||
|      sodipodi:type="inkscape:persp3d" | ||||
|      inkscape:vp_x="0 : 8 : 1" | ||||
|      inkscape:vp_y="0 : 1000 : 0" | ||||
|      inkscape:vp_z="16 : 8 : 1" | ||||
|      inkscape:persp3d-origin="8 : 5.3333333 : 1" | ||||
|      id="perspective2401" /></defs><sodipodi:namedview | ||||
|    inkscape:window-height="811" | ||||
|    inkscape:window-width="1272" | ||||
|    inkscape:pageshadow="2" | ||||
|    inkscape:pageopacity="0.0" | ||||
|    guidetolerance="10.0" | ||||
|    gridtolerance="10.0" | ||||
|    objecttolerance="10.0" | ||||
|    borderopacity="1.0" | ||||
|    bordercolor="#666666" | ||||
|    pagecolor="#ffffff" | ||||
|    id="base" | ||||
|    showgrid="false" | ||||
|    inkscape:zoom="32.125" | ||||
|    inkscape:cx="8" | ||||
|    inkscape:cy="10.440056" | ||||
|    inkscape:window-x="40" | ||||
|    inkscape:window-y="40" | ||||
|    inkscape:current-layer="Foreground" /> | ||||
| <path | ||||
|    fill-rule="evenodd" | ||||
|    clip-rule="evenodd" | ||||
|    d="M10.5,3.5l2,2L10,8l2.5,2.5l-2,2L8,10l-2.5,2.5l-2-2L6,8L3.5,5.5l2-2L8,6L10.5,3.5  z M0,8c0-4.418,3.582-8,8-8s8,3.582,8,8s-3.582,8-8,8S0,12.418,0,8z" | ||||
|    id="path2394" | ||||
|    style="fill-opacity:1;fill:#545454" /> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 2.3 KiB | 
| @@ -1,12 +0,0 @@ | ||||
| [Desktop Entry] | ||||
| Type=Application | ||||
| _Name=GNOME Shell Extension Preferences | ||||
| _Comment=Configure GNOME Shell Extensions | ||||
| Exec=@bindir@/gnome-shell-extension-prefs %u | ||||
| X-GNOME-Bugzilla-Bugzilla=GNOME | ||||
| X-GNOME-Bugzilla-Product=gnome-shell | ||||
| X-GNOME-Bugzilla-Component=extensions | ||||
| X-GNOME-Bugzilla-Version=@VERSION@ | ||||
| Categories=GNOME;GTK; | ||||
| OnlyShowIn=GNOME; | ||||
| NoDisplay=true | ||||
| @@ -1,5 +0,0 @@ | ||||
| [org.gnome.shell.overrides] | ||||
| attach-modal-dialogs = /desktop/gnome/shell/windows/attach_modal_dialogs | ||||
| button-layout = /desktop/gnome/shell/windows/button_layout | ||||
| edge-tiling = /desktop/gnome/shell/windows/edge_tiling | ||||
| workspaces-only-on-primary = /desktop/gnome/shell/windows/workspaces_only_on_primary | ||||
| @@ -13,4 +13,3 @@ NoDisplay=true | ||||
| X-GNOME-Autostart-Phase=WindowManager | ||||
| X-GNOME-Provides=panel;windowmanager; | ||||
| X-GNOME-Autostart-Notify=true | ||||
| X-GNOME-AutoRestart=false | ||||
|   | ||||
							
								
								
									
										85
									
								
								data/gnome-shell.schemas
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,85 @@ | ||||
| <gconfschemafile> | ||||
|     <schemalist> | ||||
|  | ||||
|       <!-- Metacity overrides --> | ||||
|       <schema> | ||||
|         <key>/schemas/desktop/gnome/shell/windows/attach_modal_dialogs</key> | ||||
|         <applyto>/desktop/gnome/shell/windows/attach_modal_dialogs</applyto> | ||||
|         <owner>gnome-shell</owner> | ||||
|         <type>bool</type> | ||||
|         <default>true</default> | ||||
|         <locale name="C"> | ||||
|           <short>Attach modal dialog to the parent window</short> | ||||
|           <long> | ||||
|              This key overrides /apps/mutter/general/attach_modal_dialogs when | ||||
|              running GNOME Shell. | ||||
|           </long> | ||||
|         </locale> | ||||
|       </schema> | ||||
|  | ||||
|       <schema> | ||||
|         <key>/schemas/desktop/gnome/shell/windows/button_layout</key> | ||||
|         <applyto>/desktop/gnome/shell/windows/button_layout</applyto> | ||||
|         <owner>gnome-shell</owner> | ||||
|         <type>string</type> | ||||
|         <default>:minimize,maximize,close</default> | ||||
|         <locale name="C"> | ||||
|            <short>Arrangement of buttons on the titlebar</short> | ||||
|            <long> | ||||
|              Arrangement of buttons on the titlebar. The | ||||
|              value should be a string, such as | ||||
|              "menu:minimize,maximize,spacer,close"; the colon separates the | ||||
|              left corner of the window from the right corner, and | ||||
|              the button names are comma-separated. Duplicate buttons | ||||
|              are not allowed. Unknown button names are silently ignored | ||||
|              so that buttons can be added in future gnome-shell versions | ||||
|              without breaking older versions. | ||||
|              A special spacer tag can be used to insert some space between | ||||
|              two adjacent buttons. | ||||
|  | ||||
|              This key overrides /apps/metacity/general/button_layout when | ||||
|              running GNOME Shell. | ||||
|            </long> | ||||
|         </locale> | ||||
|       </schema> | ||||
|  | ||||
|       <schema> | ||||
|         <key>/schemas/desktop/gnome/shell/windows/edge_tiling</key> | ||||
|         <applyto>/desktop/gnome/shell/windows/edge_tiling</applyto> | ||||
|         <owner>gnome-shell</owner> | ||||
|         <type>bool</type> | ||||
|         <default>true</default> | ||||
|         <locale name="C"> | ||||
|           <short>enable edge tiling when dropping windows on screen edges</short> | ||||
|           <long> | ||||
|              If enabled, dropping windows on vertical screen edges maximizes them | ||||
|              vertically and resizes them horizontally to cover half of the | ||||
|              available area. Dropping windows on the top screen edge maximizes them | ||||
|              completely. | ||||
|  | ||||
|              This key overrides /apps/metacity/general/edge_tiling when | ||||
|              running GNOME Shell. | ||||
|           </long> | ||||
|         </locale> | ||||
|       </schema> | ||||
|  | ||||
|       <schema> | ||||
|         <key>/schemas/desktop/gnome/shell/windows/theme</key> | ||||
|         <applyto>/desktop/gnome/shell/windows/theme</applyto> | ||||
|         <owner>gnome-shell</owner> | ||||
|         <type>string</type> | ||||
|         <default>Adwaita</default> | ||||
|         <locale name="C"> | ||||
|           <short>Current theme</short> | ||||
|           <long> | ||||
|             The theme determines the appearance of window borders, | ||||
|             titlebar, and so forth. | ||||
|  | ||||
|             This key overrides /apps/metacity/general/theme when | ||||
|             running GNOME Shell. | ||||
|           </long> | ||||
|         </locale> | ||||
|       </schema> | ||||
|  | ||||
|   </schemalist> | ||||
| </gconfschemafile> | ||||
							
								
								
									
										85
									
								
								data/gs-applications.menu
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,85 @@ | ||||
| <Menu> | ||||
| 	<DefaultLayout> | ||||
| 		<Menuname>Accessories</Menuname> | ||||
| 		<Menuname>Games</Menuname> | ||||
| 		<Menuname>Graphics</Menuname> | ||||
| 		<Menuname>Internet</Menuname> | ||||
| 		<Menuname>Multimedia</Menuname> | ||||
| 		<Menuname>Office</Menuname> | ||||
| 		<Menuname>Other</Menuname> | ||||
| 	</DefaultLayout> | ||||
|  | ||||
| 	<Name>Applications</Name> | ||||
| 	<AppDir>/usr/local/share/applications</AppDir> | ||||
| 	<DefaultAppDirs/> | ||||
|  | ||||
| 	<Menu> | ||||
| 		<Name>Accessories</Name> | ||||
| 		<Include> | ||||
| 			<And> | ||||
| 				<Category>Utility</Category> | ||||
| 				<Not> | ||||
| 					<Category>System</Category> | ||||
| 				</Not> | ||||
| 			</And> | ||||
| 		</Include> | ||||
| 	</Menu> | ||||
|  | ||||
| 	<Menu> | ||||
| 		<Name>Games</Name> | ||||
| 		<Include> | ||||
| 			<And> | ||||
| 				<Category>Game</Category> | ||||
| 			</And> | ||||
| 		</Include> | ||||
| 	</Menu> | ||||
|  | ||||
| 	<Menu> | ||||
| 		<Name>Graphics</Name> | ||||
| 		<Include> | ||||
| 			<And> | ||||
| 				<Category>Graphics</Category> | ||||
| 			</And> | ||||
| 		</Include> | ||||
| 	</Menu> | ||||
|  | ||||
| 	<Menu> | ||||
| 		<Name>Internet</Name> | ||||
| 		<Include> | ||||
| 			<And> | ||||
| 				<Category>Network</Category> | ||||
| 				<Not><Category>Settings</Category></Not> | ||||
| 			</And> | ||||
| 		</Include> | ||||
| 	</Menu> | ||||
|  | ||||
| 	<Menu> | ||||
| 		<Name>Multimedia</Name> | ||||
| 		<Include> | ||||
| 			<And> | ||||
| 				<Category>AudioVideo</Category> | ||||
| 				<Not><Category>Settings</Category></Not> | ||||
| 			</And> | ||||
| 		</Include> | ||||
| 	</Menu> | ||||
|  | ||||
| 	<Menu> | ||||
| 		<Name>Office</Name> | ||||
| 		<Include> | ||||
| 			<And> | ||||
| 				<Category>Office</Category> | ||||
| 			</And> | ||||
| 		</Include> | ||||
| 	</Menu> | ||||
|  | ||||
| 	<Menu> | ||||
| 		<Name>Other</Name> | ||||
| 		<OnlyUnallocated/> | ||||
| 		<Include> | ||||
| 			<And> | ||||
| 				<Not><Category>Settings</Category></Not> | ||||
| 				<Not><Category>Screensaver</Category></Not> | ||||
| 			</And> | ||||
| 		</Include> | ||||
| 	</Menu> | ||||
| </Menu> | ||||
							
								
								
									
										80
									
								
								data/magnifier.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,80 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||
| <!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  --> | ||||
|  | ||||
| <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" | ||||
|    version="1.0" | ||||
|    id="Foreground" | ||||
|    x="0px" | ||||
|    y="0px" | ||||
|    width="18" | ||||
|    height="18" | ||||
|    viewBox="0 0 18 18" | ||||
|    enable-background="new 0 0 29 18" | ||||
|    xml:space="preserve" | ||||
|    sodipodi:version="0.32" | ||||
|    inkscape:version="0.46+devel" | ||||
|    sodipodi:docname="magnifier.svg" | ||||
|    inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata | ||||
|    id="metadata16"><rdf:RDF><cc:Work | ||||
|        rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type | ||||
|          rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs | ||||
|    id="defs14"><inkscape:perspective | ||||
|      sodipodi:type="inkscape:persp3d" | ||||
|      inkscape:vp_x="0 : 9 : 1" | ||||
|      inkscape:vp_y="0 : 1000 : 0" | ||||
|      inkscape:vp_z="29 : 9 : 1" | ||||
|      inkscape:persp3d-origin="14.5 : 6 : 1" | ||||
|      id="perspective18" /></defs><sodipodi:namedview | ||||
|    inkscape:window-height="728" | ||||
|    inkscape:window-width="1103" | ||||
|    inkscape:pageshadow="2" | ||||
|    inkscape:pageopacity="1" | ||||
|    guidetolerance="10.0" | ||||
|    gridtolerance="10.0" | ||||
|    objecttolerance="10.0" | ||||
|    borderopacity="1.0" | ||||
|    bordercolor="#666666" | ||||
|    pagecolor="#000000" | ||||
|    id="base" | ||||
|    showgrid="true" | ||||
|    inkscape:zoom="27.260185" | ||||
|    inkscape:cx="9.5844061" | ||||
|    inkscape:cy="9.4435574" | ||||
|    inkscape:window-x="142" | ||||
|    inkscape:window-y="26" | ||||
|    inkscape:current-layer="Foreground" | ||||
|    inkscape:snap-global="true" | ||||
|    showguides="false"><inkscape:grid | ||||
|      type="xygrid" | ||||
|      id="grid2391" | ||||
|      empspacing="5" | ||||
|      visible="true" | ||||
|      enabled="true" | ||||
|      snapvisiblegridlinesonly="true" /></sodipodi:namedview> | ||||
|  | ||||
| <g | ||||
|    id="g5" | ||||
|    style="fill:#ffffff;fill-opacity:1" | ||||
|    transform="translate(-4,-0.023114)"> | ||||
| 	<path | ||||
|    d="m 6.246,13.98 c -0.319,-0.319 -0.319,-0.837 0,-1.157 L 9.963,9.106 c 0.319,-0.319 0.837,-0.319 1.157,0 l 0.786,0.787 c 0.32,0.319 0.32,0.837 0,1.157 l -3.717,3.717 c -0.32,0.319 -0.838,0.319 -1.157,0 l -0.786,-0.787 0,0 z" | ||||
|    id="path7" | ||||
|    style="fill:#ffffff;fill-opacity:1" /> | ||||
| 	<path | ||||
|    d="M 9.076,11.937" | ||||
|    id="path9" | ||||
|    style="fill:#ffffff;fill-opacity:1" /> | ||||
| </g> | ||||
| <path | ||||
|    clip-rule="evenodd" | ||||
|    d="m 7.25,7.476886 c 0,-1.243 1.007,-2.25 2.2499998,-2.25 1.2430002,0 2.2500002,1.007 2.2500002,2.25 0,1.243 -1.007,2.25 -2.2500002,2.25 C 8.257,9.726886 7.25,8.719886 7.25,7.476886 z m -2.25,0 c 0,-2.485 2.015,-4.5 4.4999998,-4.5 2.4850002,0 4.5000002,2.015 4.5000002,4.5 0,2.4849998 -2.015,4.5 -4.5000002,4.5 C 7.015,11.976886 5,9.9618858 5,7.476886 z" | ||||
|    id="path11" | ||||
|    style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd" /> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 2.9 KiB | 
| @@ -1,147 +0,0 @@ | ||||
| <!DOCTYPE node PUBLIC | ||||
| '-//freedesktop//DTD D-BUS Object Introspection 1.0//EN' | ||||
| 'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'> | ||||
| <node> | ||||
|   <interface name="org.gnome.Shell.SearchProvider"> | ||||
|     <doc:doc> | ||||
|       <doc:description> | ||||
|         <doc:para> | ||||
|           The interface used for integrating into GNOME Shell's search | ||||
|           interface. | ||||
|         </doc:para> | ||||
|       </doc:description> | ||||
|     </doc:doc> | ||||
|  | ||||
|     <method name="GetInitialResultSet"> | ||||
|       <doc:doc> | ||||
|         <doc:description> | ||||
|           <doc:para> | ||||
|             Called when the user first begins a search. | ||||
|           </doc:para> | ||||
|         </doc:description> | ||||
|       </doc:doc> | ||||
|       <arg type="as" direction="in"> | ||||
|         <doc:doc> | ||||
|           <doc:summary> | ||||
|             <doc:para> | ||||
|               Array of search terms, which the provider should treat as | ||||
|               logical AND. | ||||
|             </doc:para> | ||||
|           </doc:summary> | ||||
|         </doc:doc> | ||||
|       </arg> | ||||
|       <arg type="as" direction="out"> | ||||
|         <doc:doc> | ||||
|           <doc:summary> | ||||
|             <doc:para> | ||||
|               An array of result identifier strings representing items which | ||||
|               match the given search terms. Identifiers must be unique within | ||||
|               the provider's domain, but other than that may be chosen freely | ||||
|               by the provider. | ||||
|             </doc:para> | ||||
|           </doc:summary> | ||||
|         </doc:doc> | ||||
|       </arg> | ||||
|     </method> | ||||
|  | ||||
|     <method name="GetSubsearchResultSet"> | ||||
|       <doc:doc> | ||||
|         <doc:description> | ||||
|           <doc:para> | ||||
|             Called when a search is performed which is a "subsearch" of | ||||
|             the previous search, e.g. the method may return less results, but | ||||
|             not more or different results. | ||||
|  | ||||
|             This allows search providers to only search through the previous | ||||
|             result set, rather than possibly performing a full re-query. | ||||
|           </doc:para> | ||||
|         </doc:description> | ||||
|       </doc:doc> | ||||
|       <arg type="as" direction="in"> | ||||
|         <doc:doc> | ||||
|           <doc:summary> | ||||
|             <doc:para> | ||||
|               Array of item identifiers | ||||
|             </doc:para> | ||||
|           </doc:summary> | ||||
|         </doc:doc> | ||||
|       </arg> | ||||
|       <arg type="as" direction="in"> | ||||
|         <doc:doc> | ||||
|           <doc:summary> | ||||
|             <doc:para> | ||||
|               Array of updated search terms, which the provider should treat as | ||||
|               logical AND. | ||||
|             </doc:para> | ||||
|           </doc:summary> | ||||
|         </doc:doc> | ||||
|       </arg> | ||||
|       <arg type="as" direction="out"> | ||||
|         <doc:doc> | ||||
|           <doc:summary> | ||||
|             <doc:para> | ||||
|               An array of result identifier strings representing items which | ||||
|               match the given search terms. Identifiers must be unique within | ||||
|               the provider's domain, but other than that may be chosen freely | ||||
|               by the provider. | ||||
|             </doc:para> | ||||
|           </doc:summary> | ||||
|         </doc:doc> | ||||
|       </arg> | ||||
|     </method> | ||||
|  | ||||
|     <method name="GetResultMetas"> | ||||
|       <doc:doc> | ||||
|         <doc:description> | ||||
|           <doc:para> | ||||
|             Return an array of meta data used to display each given result | ||||
|           </doc:para> | ||||
|         </doc:description> | ||||
|       </doc:doc> | ||||
|       <arg type="as" direction="in"> | ||||
|         <doc:doc> | ||||
|           <doc:summary> | ||||
|             <doc:para> | ||||
|               An array of result identifiers as returned by | ||||
|               GetInitialResultSet() or GetSubsearchResultSet() | ||||
|             </doc:para> | ||||
|           </doc:summary> | ||||
|         </doc:doc> | ||||
|       </arg> | ||||
|       <arg type="a{sv}" direction="out"> | ||||
|         <doc:doc> | ||||
|           <doc:summary> | ||||
|             <doc:para> | ||||
|               A dictionary describing the given search result, containing | ||||
|               'id', 'name' (both strings) and either 'icon' (a serialized | ||||
|               GIcon) or 'icon-data' (raw image data as (iiibiiay) - width, | ||||
|               height, rowstride, has-alpha, bits per sample, channels, data) | ||||
|             </doc:para> | ||||
|           </doc:summary> | ||||
|         </doc:doc> | ||||
|       </arg> | ||||
|     </method> | ||||
|  | ||||
|     <method name="ActivateResult"> | ||||
|       <doc:doc> | ||||
|         <doc:description> | ||||
|           <doc:para> | ||||
|             Called when the users chooses a given result. The result should | ||||
|             be displayed in the application associated with the corresponding | ||||
|             provider. | ||||
|           </doc:para> | ||||
|         </doc:description> | ||||
|       </doc:doc> | ||||
|       <arg type="s" direction="in"> | ||||
|         <doc:doc> | ||||
|           <doc:summary> | ||||
|             <doc:para> | ||||
|               A result identifier as returned by GetInitialResultSet() or | ||||
|               GetSubsearchResultSet() | ||||
|             </doc:para> | ||||
|           </doc:summary> | ||||
|         </doc:doc> | ||||
|       </arg> | ||||
|     </method> | ||||
|   </interface> | ||||
| </node> | ||||
							
								
								
									
										133
									
								
								data/org.gnome.accessibility.magnifier.gschema.xml.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,133 @@ | ||||
| <schemalist> | ||||
|  | ||||
|   <enum id="MouseTrackingMode"> | ||||
|     <value nick="none"         value="0"/> | ||||
|     <value nick="centered"     value="1"/> | ||||
|     <value nick="proportional" value="2"/> | ||||
|     <value nick="push"         value="3"/> | ||||
|   </enum> | ||||
|  | ||||
|   <enum id="ScreenPosition"> | ||||
|     <value nick="none"        value="0"/> | ||||
|     <value nick="full-screen" value="1"/> | ||||
|     <value nick="top-half"    value="2"/> | ||||
|     <value nick="bottom-half" value="3"/> | ||||
|     <value nick="left-half"   value="4"/> | ||||
|     <value nick="right-half"  value="5"/> | ||||
|   </enum> | ||||
|  | ||||
|   <schema id="org.gnome.accessibility.magnifier" | ||||
|           path="/desktop/gnome/accessibility/magnifier/" | ||||
|           gettext-domain="@GETTEXT_PACKAGE@"> | ||||
|     <key name="show-magnifier" type="b"> | ||||
|       <default>false</default> | ||||
|       <_summary>Show or hide the magnifier</_summary> | ||||
|       <_description> | ||||
|         Show or hide the magnifier and all of its zoom regions. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="mouse-tracking" enum="MouseTrackingMode"> | ||||
|       <default>'proportional'</default> | ||||
|       <_summary>Mouse Tracking Mode</_summary> | ||||
|       <_description> | ||||
|         Determines the position of the magnified mouse image within the | ||||
|         magnified view and how it reacts to system mouse movement. The values | ||||
|         are | ||||
|         - none: no mouse tracking; | ||||
|         - centered: the mouse image is | ||||
|         displayed at the center of the zoom region (which also represents | ||||
|         the point under the system mouse) and the magnified contents are | ||||
|         scrolled as the system mouse moves; | ||||
|         - proportional: the position of the magnified mouse in the zoom region | ||||
|         is proportionally the same as the position of the system mouse on screen; | ||||
|         - push: when the magnified mouse intersects a boundary of the zoom | ||||
|         region, the contents are scrolled into view. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="screen-position" enum="ScreenPosition"> | ||||
|       <default>'full-screen'</default> | ||||
|       <_summary>Screen position</_summary> | ||||
|       <_description> | ||||
|         The magnified view either fills the entire screen, or occupies the | ||||
|         top-half, bottom-half, left-half, or right-half of the screen. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="mag-factor" type="d"> | ||||
|       <default>2.0</default> | ||||
|       <_summary>Magnification factor</_summary> | ||||
|       <_description> | ||||
|         The power of the magnification. A value of 1.0 means no magnification. | ||||
|         A value of 2.0 doubles the size. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="lens-mode" type="b"> | ||||
|       <default>false</default> | ||||
|       <_summary>Enable lens mode</_summary> | ||||
|       <_description> | ||||
|         Whether the magnified view should be centered over the location of | ||||
|         the system mouse and move with it. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="scroll-at-edges" type="b"> | ||||
|       <default>false</default> | ||||
|       <_summary> | ||||
|         Scroll magnified contents beyond the edges of the desktop | ||||
|       </_summary> | ||||
|       <_description> | ||||
|         For centered mouse tracking, when the system pointer is at or near the | ||||
|         edge of the screen, the magnified contents continue to scroll such that | ||||
|         the screen edge moves into the magnified view. | ||||
|       </_description> | ||||
|     </key> | ||||
|  | ||||
|     <!-- Cross-hairs --> | ||||
|     <key name="show-cross-hairs" type="b"> | ||||
|       <default>false</default> | ||||
|       <_summary>Show or hide crosshairs</_summary> | ||||
|       <_description> | ||||
|         Enables/disables display of crosshairs centered on the magnified | ||||
|         mouse sprite. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="cross-hairs-thickness" type="i"> | ||||
|       <default>8</default> | ||||
|       <_summary>Thickness of the crosshairs</_summary> | ||||
|       <_description> | ||||
|         Width of the vertical and horizontal lines that make up the crosshairs. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="cross-hairs-color" type="s"> | ||||
|       <default>'#ff0000'</default> | ||||
|       <_summary>Color of the crosshairs</_summary> | ||||
|       <_description> | ||||
|         The color of the the vertical and horizontal lines that make up | ||||
|         the crosshairs. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="cross-hairs-opacity" type="i"> | ||||
|       <default>169</default> | ||||
|       <_summary>Opacity of the crosshairs</_summary> | ||||
|       <_description> | ||||
|         Determines the transparency of the crosshairs, from fully opaque | ||||
|         to fully transparent. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="cross-hairs-length" type="i"> | ||||
|       <default>4096</default> | ||||
|       <_summary>Length of the crosshairs</_summary> | ||||
|       <_description> | ||||
|         Determines the length of the vertical and horizontal lines that | ||||
|         make up the crosshairs. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="cross-hairs-clip" type="b"> | ||||
|       <default>false</default> | ||||
|       <_summary>Clip the crosshairs at the center</_summary> | ||||
|       <_description> | ||||
|         Determines whether the crosshairs intersect the magnified mouse sprite, | ||||
|         or are clipped such that the ends of the horizontal and vertical lines | ||||
|         surround the mouse image. | ||||
|       </_description> | ||||
|     </key> | ||||
|   </schema> | ||||
| </schemalist> | ||||
| @@ -1,21 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!-- NOTE: This schema is a GNOME 3.4 workaround - it uses the same path | ||||
|      as org.gnome.evolution.calendar, but avoids us requiring Evolution | ||||
|      be installed. In GNOME 3.6 the selected state will become a flag | ||||
|      on the calendar. Because the translations are in Evolution, | ||||
|      this is untranslated and in POTFILES.skip. | ||||
|   --> | ||||
| <schemalist> | ||||
|   <schema path="/org/gnome/evolution/calendar/" id="org.gnome.shell.evolution.calendar" gettext-domain="evolution"> | ||||
|     <key type="as" name="selected-calendars"> | ||||
|       <default>[]</default> | ||||
|       <summary>List of selected calendars</summary> | ||||
|       <description>List of calendars to load</description> | ||||
|     </key> | ||||
|     <key type="as" name="selected-tasks"> | ||||
|       <default>[]</default> | ||||
|       <summary>List of selected task lists</summary> | ||||
|       <description>List of task lists to load</description> | ||||
|     </key> | ||||
|   </schema> | ||||
| </schemalist> | ||||
| @@ -1,5 +1,5 @@ | ||||
| <schemalist> | ||||
|   <schema id="org.gnome.shell" path="/org/gnome/shell/" | ||||
|   <schema id="org.gnome.shell" path="/apps/gnome-shell/" | ||||
|           gettext-domain="@GETTEXT_PACKAGE@"> | ||||
|     <key name="development-tools" type="b"> | ||||
|       <default>true</default> | ||||
| @@ -11,14 +11,12 @@ | ||||
|         using the Alt-F2 dialog. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="enabled-extensions" type="as"> | ||||
|     <key name="disabled-extensions" type="as"> | ||||
|       <default>[]</default> | ||||
|       <_summary>Uuids of extensions to enable</_summary> | ||||
|       <_summary>Uuids of extensions to disable</_summary> | ||||
|       <_description> | ||||
|         GNOME Shell extensions have a uuid property; this key lists extensions | ||||
|         which should be loaded. Any extension that wants to be loaded needs | ||||
|         to be in this list. You can also manipulate this list with the | ||||
|         EnableExtension and DisableExtension DBus methods on org.gnome.Shell. | ||||
|         GNOME Shell extensions have a uuid property; | ||||
|         this key lists extensions which should not be loaded. | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="enable-app-monitoring" type="b"> | ||||
| @@ -32,7 +30,7 @@ | ||||
|       </_description> | ||||
|     </key> | ||||
|     <key name="favorite-apps" type="as"> | ||||
|       <default>[ 'epiphany.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop' ]</default> | ||||
|       <default>[ 'mozilla-firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'openoffice.org-writer.desktop', 'nautilus.desktop' ]</default> | ||||
|       <_summary>List of desktop file IDs for favorite applications</_summary> | ||||
|       <_description> | ||||
|         The applications corresponding to these identifiers | ||||
| @@ -47,28 +45,12 @@ | ||||
|       <default>[]</default> | ||||
|       <_summary>History for command (Alt-F2) dialog</_summary> | ||||
|     </key> | ||||
|     <key name="looking-glass-history" type="as"> | ||||
|       <default>[]</default> | ||||
|       <_summary>History for the looking glass dialog</_summary> | ||||
|     </key> | ||||
|     <key name="saved-im-presence" type="i"> | ||||
|       <default>1</default> | ||||
|       <_summary>Internally used to store the last IM presence explicitly set by the user. The | ||||
| value here is from the TpConnectionPresenceType enumeration.</_summary> | ||||
|     </key> | ||||
|     <key name="saved-session-presence" type="i"> | ||||
|       <default>0</default> | ||||
|       <_summary>Internally used to store the last session presence status for the user. The | ||||
| value here is from the GsmPresenceStatus enumeration.</_summary> | ||||
|     </key> | ||||
|     <child name="clock" schema="org.gnome.shell.clock"/> | ||||
|     <child name="calendar" schema="org.gnome.shell.calendar"/> | ||||
|     <child name="recorder" schema="org.gnome.shell.recorder"/> | ||||
|     <child name="keybindings" schema="org.gnome.shell.keybindings"/> | ||||
|     <child name="keyboard" schema="org.gnome.shell.keyboard"/> | ||||
|   </schema> | ||||
|  | ||||
|   <schema id="org.gnome.shell.calendar" path="/org/gnome/shell/calendar/" | ||||
|   <schema id="org.gnome.shell.calendar" path="/apps/gnome-shell/calendar/" | ||||
|           gettext-domain="@GETTEXT_PACKAGE@"> | ||||
|     <key name="show-weekdate" type="b"> | ||||
|       <default>false</default> | ||||
| @@ -79,29 +61,7 @@ value here is from the GsmPresenceStatus enumeration.</_summary> | ||||
|       </key> | ||||
|   </schema> | ||||
|  | ||||
|   <schema id="org.gnome.shell.keybindings" path="/org/gnome/shell/keybindings/" | ||||
|           gettext-domain="@GETTEXT_PACKAGE@"> | ||||
|     <key name="open-application-menu" type="as"> | ||||
|       <default>["<Super>F10"]</default> | ||||
|       <_summary>Keybinding to open the application menu</_summary> | ||||
|       <_description> | ||||
|         Keybinding to open the application menu. | ||||
|       </_description> | ||||
|     </key> | ||||
|   </schema> | ||||
|  | ||||
|   <schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/" | ||||
|           gettext-domain="@GETTEXT_PACKAGE@"> | ||||
|     <key name="keyboard-type" type="s"> | ||||
|       <default>'touch'</default> | ||||
|       <_summary>Which keyboard to use</_summary> | ||||
|       <_description> | ||||
|         The type of keyboard to use. | ||||
|       </_description> | ||||
|     </key> | ||||
|   </schema> | ||||
|  | ||||
|   <schema id="org.gnome.shell.clock" path="/org/gnome/shell/clock/" | ||||
|   <schema id="org.gnome.shell.clock" path="/apps/gnome-shell/clock/" | ||||
|           gettext-domain="@GETTEXT_PACKAGE@"> | ||||
|     <key name="show-seconds" type="b"> | ||||
|       <default>false</default> | ||||
| @@ -119,10 +79,10 @@ value here is from the GsmPresenceStatus enumeration.</_summary> | ||||
|     </key> | ||||
|   </schema> | ||||
|  | ||||
|   <schema id="org.gnome.shell.recorder" path="/org/gnome/shell/recorder/" | ||||
|   <schema id="org.gnome.shell.recorder" path="/apps/gnome-shell/recorder/" | ||||
|           gettext-domain="@GETTEXT_PACKAGE@"> | ||||
|     <key name="framerate" type="i"> | ||||
|       <default>30</default> | ||||
|       <default>15</default> | ||||
|       <_summary>Framerate used for recording screencasts.</_summary> | ||||
|       <_description> | ||||
|         The framerate of the resulting screencast recordered | ||||
| @@ -141,7 +101,7 @@ value here is from the GsmPresenceStatus enumeration.</_summary> | ||||
|         take care of its own output - this might be used to send the output | ||||
|         to an icecast server via shout2send or similar. When unset or set | ||||
|         to an empty value, the default pipeline will be used. This is currently | ||||
|         'vp8enc quality=8 speed=6 threads=%T ! queue ! webmmux' | ||||
|         'videorate ! vp8enc quality=10 speed=2 threads=%T ! queue ! webmmux' | ||||
|         and records to WEBM using the VP8 codec. %T is used as a placeholder | ||||
|         for a guess at the optimal thread count on the system. | ||||
|       </_description> | ||||
| @@ -156,48 +116,4 @@ value here is from the GsmPresenceStatus enumeration.</_summary> | ||||
|       </_description> | ||||
|     </key> | ||||
|   </schema> | ||||
|  | ||||
|   <schema id="org.gnome.shell.overrides" path="/org/gnome/shell/overrides/"> | ||||
|     <key name="attach-modal-dialogs" type="b"> | ||||
|       <default>true</default> | ||||
|       <summary>Attach modal dialog to the parent window</summary> | ||||
|       <description> | ||||
|         This key overrides the key in org.gnome.mutter when running | ||||
|         GNOME Shell. | ||||
|       </description> | ||||
|     </key> | ||||
|  | ||||
|     <key name="button-layout" type="s"> | ||||
|       <default>":close"</default> | ||||
|       <summary>Arrangement of buttons on the titlebar</summary> | ||||
|       <description> | ||||
|         This key overrides the key in org.gnome.desktop.wm.preferences when | ||||
|         running GNOME Shell. | ||||
|       </description> | ||||
|     </key> | ||||
|  | ||||
|     <key name="edge-tiling" type="b"> | ||||
|       <default>true</default> | ||||
|       <summary>Enable edge tiling when dropping windows on screen edges</summary> | ||||
|       <description> | ||||
|         This key overrides the key in org.gnome.mutter when running GNOME Shell. | ||||
|       </description> | ||||
|     </key> | ||||
|  | ||||
|     <key name="dynamic-workspaces" type="b"> | ||||
|       <default>true</default> | ||||
|       <summary>Workspaces are managed dynamically</summary> | ||||
|       <description> | ||||
|         This key overrides the key in org.gnome.mutter when running GNOME Shell. | ||||
|       </description> | ||||
|     </key> | ||||
|  | ||||
|     <key name="workspaces-only-on-primary" type="b"> | ||||
|       <default>true</default> | ||||
|       <summary>Workspaces only on primary monitor</summary> | ||||
|       <description> | ||||
|         This key overrides the key in org.gnome.mutter when running GNOME Shell. | ||||
|       </description> | ||||
|     </key> | ||||
|   </schema> | ||||
| </schemalist> | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| #version 110 | ||||
| uniform sampler2D tex; | ||||
| uniform sampler2D sampler0; | ||||
| uniform float fraction; | ||||
| uniform float height; | ||||
| const float c = -0.2; | ||||
| @@ -12,16 +12,15 @@ mat4 contrast = mat4 (1.0 + c, 0.0, 0.0, 0.0, | ||||
| vec4 off = vec4(0.633, 0.633, 0.633, 0); | ||||
| void main() | ||||
| { | ||||
|   vec4 color = texture2D(tex, cogl_tex_coord_in[0].xy); | ||||
|   float y = height * cogl_tex_coord_in[0].y; | ||||
|   vec4 color = texture2D(sampler0, gl_TexCoord[0].st); | ||||
|   float y = height * gl_TexCoord[0][1]; | ||||
|  | ||||
|   // To reduce contrast, blend with a mid gray | ||||
|   cogl_color_out = color * contrast - off * c * color.a; | ||||
|   gl_FragColor = color * contrast - off * c; | ||||
|  | ||||
|   // We only fully dim at a distance of BORDER_MAX_HEIGHT from the top and | ||||
|   // We only fully dim at a distance of BORDER_MAX_HEIGHT from the edge and | ||||
|   // when the fraction is 1.0. For other locations and fractions we linearly | ||||
|   // interpolate back to the original undimmed color, so the top of the window | ||||
|   // is at full color. | ||||
|   cogl_color_out = color + (cogl_color_out - color) * max(min(y / border_max_height, 1.0), 0.0); | ||||
|   cogl_color_out = color + (cogl_color_out - color) * fraction; | ||||
|   // interpolate back to the original undimmed color. | ||||
|   gl_FragColor = color + (gl_FragColor - color) * min(y / border_max_height, 1.0); | ||||
|   gl_FragColor = color + (gl_FragColor - color) * fraction; | ||||
| } | ||||
|   | ||||
| @@ -1,187 +0,0 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="28" | ||||
|    height="25" | ||||
|    id="svg10621" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="calendar-today.svg"> | ||||
|   <defs | ||||
|      id="defs10623"> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        id="radialGradient99561-1" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        cx="51" | ||||
|        cy="30" | ||||
|        fx="51" | ||||
|        fy="30" | ||||
|        r="42" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient34508-1-3"> | ||||
|       <stop | ||||
|          style="stop-color:#ffffff;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop34510-1-9" /> | ||||
|       <stop | ||||
|          style="stop-color:#ffffff;stop-opacity:0;" | ||||
|          offset="1" | ||||
|          id="stop34512-4-5" /> | ||||
|     </linearGradient> | ||||
|     <radialGradient | ||||
|        r="42" | ||||
|        fy="30" | ||||
|        fx="51" | ||||
|        cy="30" | ||||
|        cx="51" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="radialGradient10592" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        inkscape:collect="always" /> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        id="radialGradient3770" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        cx="51" | ||||
|        cy="30" | ||||
|        fx="51" | ||||
|        fy="30" | ||||
|        r="42" /> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        id="radialGradient3001" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        cx="51" | ||||
|        cy="30" | ||||
|        fx="51" | ||||
|        fy="30" | ||||
|        r="42" /> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        id="radialGradient3007" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        cx="51" | ||||
|        cy="30" | ||||
|        fx="51" | ||||
|        fy="30" | ||||
|        r="42" /> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        id="radialGradient3067" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        cx="51" | ||||
|        cy="30" | ||||
|        fx="51" | ||||
|        fy="30" | ||||
|        r="42" /> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        id="radialGradient3072" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        cx="51" | ||||
|        cy="30" | ||||
|        fx="51" | ||||
|        fy="30" | ||||
|        r="42" /> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        id="radialGradient2997" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        cx="51" | ||||
|        cy="30" | ||||
|        fx="51" | ||||
|        fy="30" | ||||
|        r="42" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#000000" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="15.839192" | ||||
|      inkscape:cx="8.3750933" | ||||
|      inkscape:cy="8.0837211" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      fit-margin-top="0" | ||||
|      fit-margin-left="0" | ||||
|      fit-margin-right="0" | ||||
|      fit-margin-bottom="0" | ||||
|      inkscape:window-width="1440" | ||||
|      inkscape:window-height="843" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata10626"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title /> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-469.08263,-536.99307)"> | ||||
|     <g | ||||
|        id="g3003"> | ||||
|       <path | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/src/cvs/gnome/gnome-shell-design/mockups/motion/textures/panel.png" | ||||
|          transform="matrix(0.43692393,0,0,1.3783114,460.60467,517.48289)" | ||||
|          sodipodi:end="6.2831853" | ||||
|          sodipodi:start="3.1415927" | ||||
|          d="M 9,29.999999 C 9.0000011,21.163443 27.804042,14 51.000002,14 74.195961,14 93,21.163444 93,30 l -42,0 z" | ||||
|          sodipodi:ry="16" | ||||
|          sodipodi:rx="42" | ||||
|          sodipodi:cy="30" | ||||
|          sodipodi:cx="51" | ||||
|          id="path34506-3" | ||||
|          style="opacity:0.4625;color:#000000;fill:url(#radialGradient2997);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          sodipodi:type="arc" /> | ||||
|       <rect | ||||
|          y="558.85046" | ||||
|          x="468.96878" | ||||
|          height="3.1425927" | ||||
|          width="28.149134" | ||||
|          id="rect2996" | ||||
|          style="fill:#ffffff;fill-opacity:0.50196078;stroke-width:0.43599999;stroke-miterlimit:4;stroke-dasharray:none" /> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 5.7 KiB | 
| @@ -1,289 +0,0 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="24" | ||||
|    height="22" | ||||
|    id="svg3199" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="checkbox.svg"> | ||||
|   <defs | ||||
|      id="defs3201"> | ||||
|     <linearGradient | ||||
|        id="linearGradient15404" | ||||
|        inkscape:collect="always"> | ||||
|       <stop | ||||
|          id="stop15406" | ||||
|          offset="0" | ||||
|          style="stop-color:#515151;stop-opacity:1" /> | ||||
|       <stop | ||||
|          id="stop15408" | ||||
|          offset="1" | ||||
|          style="stop-color:#292929;stop-opacity:1" /> | ||||
|     </linearGradient> | ||||
|     <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="perspective3207" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective3187" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient5872-5-1" | ||||
|        id="linearGradient5891-0-4" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        x1="205.84143" | ||||
|        y1="246.7094" | ||||
|        x2="206.74803" | ||||
|        y2="231.24142" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient5872-5-1"> | ||||
|       <stop | ||||
|          style="stop-color:#0b2e52;stop-opacity:1" | ||||
|          offset="0" | ||||
|          id="stop5874-4-4" /> | ||||
|       <stop | ||||
|          style="stop-color:#1862af;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop5876-0-5" /> | ||||
|     </linearGradient> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect5837-4-6" | ||||
|        is_visible="true" /> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect14768" | ||||
|        is_visible="true" /> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect5884-4-7" | ||||
|        is_visible="true" /> | ||||
|     <linearGradient | ||||
|        y2="-388.72955" | ||||
|        x2="-93.031357" | ||||
|        y1="-396.34738" | ||||
|        x1="-93.031357" | ||||
|        gradientTransform="matrix(1.5918367,0,0,0.85714285,-256.56122,59.685418)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient14219" | ||||
|        xlink:href="#linearGradient15404" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient10013-4-63-6"> | ||||
|       <stop | ||||
|          style="stop-color:#333333;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop10015-2-76-1" /> | ||||
|       <stop | ||||
|          style="stop-color:#292929;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop10017-46-15-8" /> | ||||
|     </linearGradient> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient10597-5"> | ||||
|       <stop | ||||
|          style="stop-color:#16191a;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop10599-2" /> | ||||
|       <stop | ||||
|          style="stop-color:#2b3133;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop10601-5" /> | ||||
|     </linearGradient> | ||||
|     <linearGradient | ||||
|        y2="-322.16354" | ||||
|        x2="921.22498" | ||||
|        y1="-330.05121" | ||||
|        x1="921.32812" | ||||
|        gradientTransform="matrix(1.5918367,0,0,0.85714285,-1456.5464,275.45191)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient15374" | ||||
|        xlink:href="#linearGradient10013-4-63-6" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        gradientTransform="translate(-1199.9852,216.38048)" | ||||
|        y2="-227.07961" | ||||
|        x2="1203.9177" | ||||
|        y1="-217.56708" | ||||
|        x1="1203.9177" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient15376" | ||||
|        xlink:href="#linearGradient10597-5" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        y2="-388.72955" | ||||
|        x2="-93.031357" | ||||
|        y1="-396.34738" | ||||
|        x1="-93.031357" | ||||
|        gradientTransform="matrix(1.5918367,0,0,0.85714285,-256.56122,59.685418)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient14219-6" | ||||
|        xlink:href="#linearGradient15404-9" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        id="linearGradient15404-9" | ||||
|        inkscape:collect="always"> | ||||
|       <stop | ||||
|          id="stop15406-6" | ||||
|          offset="0" | ||||
|          style="stop-color:#515151;stop-opacity:1" /> | ||||
|       <stop | ||||
|          id="stop15408-7" | ||||
|          offset="1" | ||||
|          style="stop-color:#292929;stop-opacity:1" /> | ||||
|     </linearGradient> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#000000" | ||||
|      bordercolor="#2d2d2d" | ||||
|      borderopacity="1" | ||||
|      inkscape:pageopacity="1" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="1" | ||||
|      inkscape:cx="71.516955" | ||||
|      inkscape:cy="5.8710559" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      inkscape:window-width="1412" | ||||
|      inkscape:window-height="1067" | ||||
|      inkscape:window-x="2635" | ||||
|      inkscape:window-y="226" | ||||
|      inkscape:window-maximized="0" | ||||
|      borderlayer="true" | ||||
|      inkscape:showpageshadow="false" | ||||
|      inkscape:snap-nodes="false" | ||||
|      inkscape:snap-bbox="true" | ||||
|      showborder="false"> | ||||
|     <inkscape:grid | ||||
|        type="xygrid" | ||||
|        id="grid14843" | ||||
|        empspacing="5" | ||||
|        visible="true" | ||||
|        enabled="true" | ||||
|        snapvisiblegridlinesonly="true" /> | ||||
|   </sodipodi:namedview> | ||||
|   <metadata | ||||
|      id="metadata3204"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-342.5,-521.36218)"> | ||||
|     <g | ||||
|        transform="matrix(0.80230061,0,0,0.80230061,-87.624044,-453.10297)" | ||||
|        id="g14586-0" | ||||
|        style="stroke-width:2.3714385;stroke-miterlimit:4;stroke-dasharray:none"> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="matrix(1.9969286,0,0,1.9969286,-397.05491,877.00482)" | ||||
|          id="g15291-9-6" | ||||
|          style="stroke-width:1.18754292;stroke-miterlimit:4;stroke-dasharray:none;display:inline;enable-background:new"> | ||||
|         <g | ||||
|            transform="translate(877.50354,-102.83507)" | ||||
|            id="g16853-4-9" | ||||
|            style="stroke-width:1.18754292;stroke-miterlimit:4;stroke-dasharray:none;enable-background:new"> | ||||
|           <rect | ||||
|              transform="scale(1,-1)" | ||||
|              style="color:#000000;fill:url(#linearGradient14219-6);fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:1.24833274;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" | ||||
|              id="rect6506-6" | ||||
|              width="11.281681" | ||||
|              height="11.26221" | ||||
|              x="-409.59354" | ||||
|              y="-284.40115" | ||||
|              rx="1.0052766" | ||||
|              ry="1.0052764" /> | ||||
|         </g> | ||||
|       </g> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="translate(343.99999,987.99997)" | ||||
|          id="g5886-5" | ||||
|          style="stroke-width:2.3714385;stroke-miterlimit:4;stroke-dasharray:none;display:inline;enable-background:new" /> | ||||
|     </g> | ||||
|     <g | ||||
|        transform="matrix(0.84337,0,0,0.84337,-110.16632,-503.56182)" | ||||
|        id="g14586"> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="matrix(1.9969286,0,0,1.9969286,-397.05491,877.00482)" | ||||
|          id="g15291-9" | ||||
|          style="display:inline;enable-background:new"> | ||||
|         <g | ||||
|            transform="translate(877.50354,-102.83507)" | ||||
|            id="g16853-4" | ||||
|            style="enable-background:new" /> | ||||
|       </g> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="translate(343.99999,987.99997)" | ||||
|          id="g5886" | ||||
|          style="display:inline;enable-background:new"> | ||||
|         <path | ||||
|            style="fill:none;stroke:url(#linearGradient5891-0-4);stroke-width:7.11431503;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" | ||||
|            d="m 198.5,240 5.25,5.25 13.98616,-14.43081" | ||||
|            id="path5835" | ||||
|            inkscape:path-effect="#path-effect5837-4-6" | ||||
|            inkscape:original-d="m 198.5,240 5.25,5.25 13.98616,-14.43081" | ||||
|            inkscape:connector-curvature="0" | ||||
|            sodipodi:nodetypes="ccc" /> | ||||
|         <path | ||||
|            inkscape:connector-curvature="0" | ||||
|            inkscape:original-d="m 198.5,240 5.25,5.25 13.91205,-14.31964" | ||||
|            inkscape:path-effect="#path-effect5837-4-6" | ||||
|            id="path5880" | ||||
|            d="m 198.5,240 5.25,5.25 13.91205,-14.31964" | ||||
|            style="fill:none;stroke:#4787c8;stroke-width:3.55715752;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" | ||||
|            sodipodi:nodetypes="ccc" /> | ||||
|         <path | ||||
|            style="fill:none;stroke:#7ea7d3;stroke-width:1.18571913px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | ||||
|            d="m 197.45937,240.47455 c -0.17828,-0.29362 -0.20087,-0.67548 -0.0603,-0.98892 0.14055,-0.31344 0.43739,-0.54812 0.77144,-0.62817 0.33405,-0.08 0.69314,-0.01 0.99635,0.15175 0.30321,0.16144 0.55146,0.40727 0.79165,0.65284 l 3.66429,3.74643 12.87946,-12.98973 c 0.20796,-0.20974 0.42306,-0.41969 0.68548,-0.55522 0.26242,-0.13553 0.57293,-0.19052 0.85827,-0.11426 0.14267,0.0381 0.27708,0.10787 0.38874,0.20452 0.11167,0.0966 0.20021,0.22004 0.25479,0.35726 0.0546,0.13722 0.075,0.28793 0.0585,0.43468 -0.0165,0.14674 -0.07,0.28919 -0.15422,0.41052" | ||||
|            id="path5882" | ||||
|            inkscape:path-effect="#path-effect5884-4-7" | ||||
|            inkscape:original-d="m 197.45937,240.47455 c 0.65604,-0.56057 2.02485,-1.34847 2.49911,-0.8125 l 3.66429,3.74643 12.87946,-12.98973 c 0.6875,-0.6875 2.09152,0.7375 2.09152,0.7375" | ||||
|            inkscape:connector-curvature="0" | ||||
|            sodipodi:nodetypes="csccc" /> | ||||
|       </g> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 11 KiB | 
| @@ -1,198 +0,0 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="24" | ||||
|    height="22" | ||||
|    id="svg3199" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="checkbox-off.svg"> | ||||
|   <defs | ||||
|      id="defs3201"> | ||||
|     <linearGradient | ||||
|        id="linearGradient15404" | ||||
|        inkscape:collect="always"> | ||||
|       <stop | ||||
|          id="stop15406" | ||||
|          offset="0" | ||||
|          style="stop-color:#515151;stop-opacity:1" /> | ||||
|       <stop | ||||
|          id="stop15408" | ||||
|          offset="1" | ||||
|          style="stop-color:#292929;stop-opacity:1" /> | ||||
|     </linearGradient> | ||||
|     <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="perspective3207" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective3187" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect5837-4-6" | ||||
|        is_visible="true" /> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect14768" | ||||
|        is_visible="true" /> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect5884-4-7" | ||||
|        is_visible="true" /> | ||||
|     <linearGradient | ||||
|        y2="-388.72955" | ||||
|        x2="-93.031357" | ||||
|        y1="-396.34738" | ||||
|        x1="-93.031357" | ||||
|        gradientTransform="matrix(1.5918367,0,0,0.85714285,-256.56122,59.685418)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient14219" | ||||
|        xlink:href="#linearGradient15404" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient10013-4-63-6"> | ||||
|       <stop | ||||
|          style="stop-color:#333333;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop10015-2-76-1" /> | ||||
|       <stop | ||||
|          style="stop-color:#292929;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop10017-46-15-8" /> | ||||
|     </linearGradient> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient10597-5"> | ||||
|       <stop | ||||
|          style="stop-color:#16191a;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop10599-2" /> | ||||
|       <stop | ||||
|          style="stop-color:#2b3133;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop10601-5" /> | ||||
|     </linearGradient> | ||||
|     <linearGradient | ||||
|        y2="-322.16354" | ||||
|        x2="921.22498" | ||||
|        y1="-330.05121" | ||||
|        x1="921.32812" | ||||
|        gradientTransform="matrix(1.5918367,0,0,0.85714285,-1456.5464,275.45191)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient15374" | ||||
|        xlink:href="#linearGradient10013-4-63-6" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        gradientTransform="translate(-1199.9852,216.38048)" | ||||
|        y2="-227.07961" | ||||
|        x2="1203.9177" | ||||
|        y1="-217.56708" | ||||
|        x1="1203.9177" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient15376" | ||||
|        xlink:href="#linearGradient10597-5" | ||||
|        inkscape:collect="always" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#000000" | ||||
|      bordercolor="#2d2d2d" | ||||
|      borderopacity="1" | ||||
|      inkscape:pageopacity="1" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="1" | ||||
|      inkscape:cx="6.1225392" | ||||
|      inkscape:cy="3.6003241" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      inkscape:window-width="1412" | ||||
|      inkscape:window-height="1067" | ||||
|      inkscape:window-x="2116" | ||||
|      inkscape:window-y="261" | ||||
|      inkscape:window-maximized="0" | ||||
|      borderlayer="true" | ||||
|      inkscape:showpageshadow="false" | ||||
|      inkscape:snap-nodes="false" | ||||
|      inkscape:snap-bbox="true" | ||||
|      showborder="false"> | ||||
|     <inkscape:grid | ||||
|        type="xygrid" | ||||
|        id="grid14843" | ||||
|        empspacing="5" | ||||
|        visible="true" | ||||
|        enabled="true" | ||||
|        snapvisiblegridlinesonly="true" /> | ||||
|   </sodipodi:namedview> | ||||
|   <metadata | ||||
|      id="metadata3204"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-342.5,-521.36218)"> | ||||
|     <g | ||||
|        transform="matrix(0.80230061,0,0,0.80230061,-87.624044,-453.10297)" | ||||
|        id="g14586" | ||||
|        style="stroke-width:2.3714385;stroke-miterlimit:4;stroke-dasharray:none"> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="matrix(1.9969286,0,0,1.9969286,-397.05491,877.00482)" | ||||
|          id="g15291-9" | ||||
|          style="stroke-width:1.18754292;stroke-miterlimit:4;stroke-dasharray:none;display:inline;enable-background:new"> | ||||
|         <g | ||||
|            transform="translate(877.50354,-102.83507)" | ||||
|            id="g16853-4" | ||||
|            style="stroke-width:1.18754292;stroke-miterlimit:4;stroke-dasharray:none;enable-background:new"> | ||||
|           <rect | ||||
|              transform="scale(1,-1)" | ||||
|              style="color:#000000;fill:url(#linearGradient14219);fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:1.24833274;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" | ||||
|              id="rect6506-6" | ||||
|              width="11.281681" | ||||
|              height="11.26221" | ||||
|              x="-409.59354" | ||||
|              y="-284.40115" | ||||
|              rx="1.0052766" | ||||
|              ry="1.0052764" /> | ||||
|         </g> | ||||
|       </g> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="translate(343.99999,987.99997)" | ||||
|          id="g5886" | ||||
|          style="stroke-width:2.3714385;stroke-miterlimit:4;stroke-dasharray:none;display:inline;enable-background:new" /> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 6.5 KiB | 
| @@ -1,218 +0,0 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="24" | ||||
|    height="22" | ||||
|    id="svg3199" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="checkbox.svg"> | ||||
|   <defs | ||||
|      id="defs3201"> | ||||
|     <linearGradient | ||||
|        id="linearGradient15404" | ||||
|        inkscape:collect="always"> | ||||
|       <stop | ||||
|          id="stop15406" | ||||
|          offset="0" | ||||
|          style="stop-color:#515151;stop-opacity:1" /> | ||||
|       <stop | ||||
|          id="stop15408" | ||||
|          offset="1" | ||||
|          style="stop-color:#292929;stop-opacity:1" /> | ||||
|     </linearGradient> | ||||
|     <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="perspective3207" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective3187" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient5872-5-1" | ||||
|        id="linearGradient5891-0-4" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        x1="205.84143" | ||||
|        y1="246.7094" | ||||
|        x2="206.74803" | ||||
|        y2="231.24142" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient5872-5-1"> | ||||
|       <stop | ||||
|          style="stop-color:#0b2e52;stop-opacity:1" | ||||
|          offset="0" | ||||
|          id="stop5874-4-4" /> | ||||
|       <stop | ||||
|          style="stop-color:#1862af;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop5876-0-5" /> | ||||
|     </linearGradient> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect5837-4-6" | ||||
|        is_visible="true" /> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect14768" | ||||
|        is_visible="true" /> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect5884-4-7" | ||||
|        is_visible="true" /> | ||||
|     <linearGradient | ||||
|        y2="-388.72955" | ||||
|        x2="-93.031357" | ||||
|        y1="-396.34738" | ||||
|        x1="-93.031357" | ||||
|        gradientTransform="matrix(1.5918367,0,0,0.85714285,-256.56122,59.685418)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient14219" | ||||
|        xlink:href="#linearGradient15404" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient10013-4-63-6"> | ||||
|       <stop | ||||
|          style="stop-color:#333333;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop10015-2-76-1" /> | ||||
|       <stop | ||||
|          style="stop-color:#292929;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop10017-46-15-8" /> | ||||
|     </linearGradient> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient10597-5"> | ||||
|       <stop | ||||
|          style="stop-color:#16191a;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop10599-2" /> | ||||
|       <stop | ||||
|          style="stop-color:#2b3133;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop10601-5" /> | ||||
|     </linearGradient> | ||||
|     <linearGradient | ||||
|        y2="-322.16354" | ||||
|        x2="921.22498" | ||||
|        y1="-330.05121" | ||||
|        x1="921.32812" | ||||
|        gradientTransform="matrix(1.5918367,0,0,0.85714285,-1456.5464,275.45191)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient15374" | ||||
|        xlink:href="#linearGradient10013-4-63-6" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        gradientTransform="translate(-1199.9852,216.38048)" | ||||
|        y2="-227.07961" | ||||
|        x2="1203.9177" | ||||
|        y1="-217.56708" | ||||
|        x1="1203.9177" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient15376" | ||||
|        xlink:href="#linearGradient10597-5" | ||||
|        inkscape:collect="always" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#000000" | ||||
|      bordercolor="#2d2d2d" | ||||
|      borderopacity="1" | ||||
|      inkscape:pageopacity="1" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="4" | ||||
|      inkscape:cx="71.247925" | ||||
|      inkscape:cy="33.339093" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      inkscape:window-width="1412" | ||||
|      inkscape:window-height="1067" | ||||
|      inkscape:window-x="2116" | ||||
|      inkscape:window-y="261" | ||||
|      inkscape:window-maximized="0" | ||||
|      borderlayer="true" | ||||
|      inkscape:showpageshadow="false" | ||||
|      inkscape:snap-nodes="false" | ||||
|      inkscape:snap-bbox="true" | ||||
|      showborder="false"> | ||||
|     <inkscape:grid | ||||
|        type="xygrid" | ||||
|        id="grid14843" | ||||
|        empspacing="5" | ||||
|        visible="true" | ||||
|        enabled="true" | ||||
|        snapvisiblegridlinesonly="true" /> | ||||
|   </sodipodi:namedview> | ||||
|   <metadata | ||||
|      id="metadata3204"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-342.5,-521.36218)"> | ||||
|     <g | ||||
|        transform="matrix(0.84337,0,0,0.84337,-110.16632,-503.56182)" | ||||
|        id="g14586"> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="matrix(1.9969286,0,0,1.9969286,-397.05491,877.00482)" | ||||
|          id="g15291-9" | ||||
|          style="display:inline;enable-background:new"> | ||||
|         <g | ||||
|            transform="translate(877.50354,-102.83507)" | ||||
|            id="g16853-4" | ||||
|            style="enable-background:new"> | ||||
|           <rect | ||||
|              transform="scale(1,-1)" | ||||
|              style="color:#000000;fill:url(#linearGradient14219);fill-opacity:1;fill-rule:nonzero;stroke:#868686;stroke-width:0.59377144999999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" | ||||
|              id="rect6506-6" | ||||
|              width="11.281681" | ||||
|              height="11.26221" | ||||
|              x="-409.59354" | ||||
|              y="-284.40115" | ||||
|              rx="0.95632279" | ||||
|              ry="0.95632273" /> | ||||
|         </g> | ||||
|       </g> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="translate(343.99999,987.99997)" | ||||
|          id="g5886" | ||||
|          style="display:inline;enable-background:new" /> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 6.8 KiB | 
| @@ -1,243 +0,0 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="24" | ||||
|    height="22" | ||||
|    id="svg3199" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="checkbox-focused.svg"> | ||||
|   <defs | ||||
|      id="defs3201"> | ||||
|     <linearGradient | ||||
|        id="linearGradient15404" | ||||
|        inkscape:collect="always"> | ||||
|       <stop | ||||
|          id="stop15406" | ||||
|          offset="0" | ||||
|          style="stop-color:#515151;stop-opacity:1" /> | ||||
|       <stop | ||||
|          id="stop15408" | ||||
|          offset="1" | ||||
|          style="stop-color:#292929;stop-opacity:1" /> | ||||
|     </linearGradient> | ||||
|     <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="perspective3207" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective3187" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient5872-5-1" | ||||
|        id="linearGradient5891-0-4" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        x1="205.84143" | ||||
|        y1="246.7094" | ||||
|        x2="206.74803" | ||||
|        y2="231.24142" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient5872-5-1"> | ||||
|       <stop | ||||
|          style="stop-color:#0b2e52;stop-opacity:1" | ||||
|          offset="0" | ||||
|          id="stop5874-4-4" /> | ||||
|       <stop | ||||
|          style="stop-color:#1862af;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop5876-0-5" /> | ||||
|     </linearGradient> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect5837-4-6" | ||||
|        is_visible="true" /> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect14768" | ||||
|        is_visible="true" /> | ||||
|     <inkscape:path-effect | ||||
|        effect="spiro" | ||||
|        id="path-effect5884-4-7" | ||||
|        is_visible="true" /> | ||||
|     <linearGradient | ||||
|        y2="-388.72955" | ||||
|        x2="-93.031357" | ||||
|        y1="-396.34738" | ||||
|        x1="-93.031357" | ||||
|        gradientTransform="matrix(1.5918367,0,0,0.85714285,-256.56122,59.685418)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient14219" | ||||
|        xlink:href="#linearGradient15404" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient10013-4-63-6"> | ||||
|       <stop | ||||
|          style="stop-color:#333333;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop10015-2-76-1" /> | ||||
|       <stop | ||||
|          style="stop-color:#292929;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop10017-46-15-8" /> | ||||
|     </linearGradient> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient10597-5"> | ||||
|       <stop | ||||
|          style="stop-color:#16191a;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop10599-2" /> | ||||
|       <stop | ||||
|          style="stop-color:#2b3133;stop-opacity:1" | ||||
|          offset="1" | ||||
|          id="stop10601-5" /> | ||||
|     </linearGradient> | ||||
|     <linearGradient | ||||
|        y2="-322.16354" | ||||
|        x2="921.22498" | ||||
|        y1="-330.05121" | ||||
|        x1="921.32812" | ||||
|        gradientTransform="matrix(1.5918367,0,0,0.85714285,-1456.5464,275.45191)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient15374" | ||||
|        xlink:href="#linearGradient10013-4-63-6" | ||||
|        inkscape:collect="always" /> | ||||
|     <linearGradient | ||||
|        gradientTransform="translate(-1199.9852,216.38048)" | ||||
|        y2="-227.07961" | ||||
|        x2="1203.9177" | ||||
|        y1="-217.56708" | ||||
|        x1="1203.9177" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="linearGradient15376" | ||||
|        xlink:href="#linearGradient10597-5" | ||||
|        inkscape:collect="always" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#000000" | ||||
|      bordercolor="#2d2d2d" | ||||
|      borderopacity="1" | ||||
|      inkscape:pageopacity="1" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="1" | ||||
|      inkscape:cx="64.516955" | ||||
|      inkscape:cy="13.871056" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      inkscape:window-width="1412" | ||||
|      inkscape:window-height="1067" | ||||
|      inkscape:window-x="2635" | ||||
|      inkscape:window-y="226" | ||||
|      inkscape:window-maximized="0" | ||||
|      borderlayer="true" | ||||
|      inkscape:showpageshadow="false" | ||||
|      inkscape:snap-nodes="false" | ||||
|      inkscape:snap-bbox="true" | ||||
|      showborder="false"> | ||||
|     <inkscape:grid | ||||
|        type="xygrid" | ||||
|        id="grid14843" | ||||
|        empspacing="5" | ||||
|        visible="true" | ||||
|        enabled="true" | ||||
|        snapvisiblegridlinesonly="true" /> | ||||
|   </sodipodi:namedview> | ||||
|   <metadata | ||||
|      id="metadata3204"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-342.5,-521.36218)"> | ||||
|     <g | ||||
|        transform="matrix(0.84337,0,0,0.84337,-110.16632,-503.56182)" | ||||
|        id="g14586"> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="matrix(1.9969286,0,0,1.9969286,-397.05491,877.00482)" | ||||
|          id="g15291-9" | ||||
|          style="display:inline;enable-background:new"> | ||||
|         <g | ||||
|            transform="translate(877.50354,-102.83507)" | ||||
|            id="g16853-4" | ||||
|            style="enable-background:new"> | ||||
|           <rect | ||||
|              transform="scale(1,-1)" | ||||
|              style="color:#000000;fill:url(#linearGradient14219);fill-opacity:1;fill-rule:nonzero;stroke:#868686;stroke-width:0.59377144999999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" | ||||
|              id="rect6506-6" | ||||
|              width="11.281681" | ||||
|              height="11.26221" | ||||
|              x="-409.59354" | ||||
|              y="-284.40115" | ||||
|              rx="0.95632279" | ||||
|              ry="0.95632273" /> | ||||
|         </g> | ||||
|       </g> | ||||
|       <g | ||||
|          inkscape:export-ydpi="90" | ||||
|          inkscape:export-xdpi="90" | ||||
|          inkscape:export-filename="/home/jimmac/SparkleShare/gnome-mockups/boxes/interactive/img/checkbox-on.png" | ||||
|          transform="translate(343.99999,987.99997)" | ||||
|          id="g5886" | ||||
|          style="display:inline;enable-background:new"> | ||||
|         <path | ||||
|            style="fill:none;stroke:url(#linearGradient5891-0-4);stroke-width:7.11431503;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" | ||||
|            d="m 198.5,240 5.25,5.25 13.98616,-14.43081" | ||||
|            id="path5835" | ||||
|            inkscape:path-effect="#path-effect5837-4-6" | ||||
|            inkscape:original-d="m 198.5,240 5.25,5.25 13.98616,-14.43081" | ||||
|            inkscape:connector-curvature="0" | ||||
|            sodipodi:nodetypes="ccc" /> | ||||
|         <path | ||||
|            inkscape:connector-curvature="0" | ||||
|            inkscape:original-d="m 198.5,240 5.25,5.25 13.91205,-14.31964" | ||||
|            inkscape:path-effect="#path-effect5837-4-6" | ||||
|            id="path5880" | ||||
|            d="m 198.5,240 5.25,5.25 13.91205,-14.31964" | ||||
|            style="fill:none;stroke:#4787c8;stroke-width:3.55715752;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" | ||||
|            sodipodi:nodetypes="ccc" /> | ||||
|         <path | ||||
|            style="fill:none;stroke:#7ea7d3;stroke-width:1.18571913px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | ||||
|            d="m 197.45937,240.47455 c -0.17828,-0.29362 -0.20087,-0.67548 -0.0603,-0.98892 0.14055,-0.31344 0.43739,-0.54812 0.77144,-0.62817 0.33405,-0.08 0.69314,-0.01 0.99635,0.15175 0.30321,0.16144 0.55146,0.40727 0.79165,0.65284 l 3.66429,3.74643 12.87946,-12.98973 c 0.20796,-0.20974 0.42306,-0.41969 0.68548,-0.55522 0.26242,-0.13553 0.57293,-0.19052 0.85827,-0.11426 0.14267,0.0381 0.27708,0.10787 0.38874,0.20452 0.11167,0.0966 0.20021,0.22004 0.25479,0.35726 0.0546,0.13722 0.075,0.28793 0.0585,0.43468 -0.0165,0.14674 -0.07,0.28919 -0.15422,0.41052" | ||||
|            id="path5882" | ||||
|            inkscape:path-effect="#path-effect5884-4-7" | ||||
|            inkscape:original-d="m 197.45937,240.47455 c 0.65604,-0.56057 2.02485,-1.34847 2.49911,-0.8125 l 3.66429,3.74643 12.87946,-12.98973 c 0.6875,-0.6875 2.09152,0.7375 2.09152,0.7375" | ||||
|            inkscape:connector-curvature="0" | ||||
|            sodipodi:nodetypes="csccc" /> | ||||
|       </g> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 8.8 KiB | 
| @@ -1,26 +1,24 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||||
| <!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  --> | ||||
|  | ||||
| <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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    version="1.0" | ||||
|    id="Foreground" | ||||
|    x="0px" | ||||
|    y="0px" | ||||
|    width="32" | ||||
|    height="32" | ||||
|    viewBox="0 0 23.272727 23.272727" | ||||
|    width="22" | ||||
|    height="22" | ||||
|    viewBox="0 0 16 16" | ||||
|    enable-background="new 0 0 16 16" | ||||
|    xml:space="preserve" | ||||
|    sodipodi:version="0.32" | ||||
|    inkscape:version="0.48+devel r10081 custom" | ||||
|    inkscape:version="0.46" | ||||
|    sodipodi:docname="close-window.svg" | ||||
|    inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata | ||||
|    id="metadata2399"><rdf:RDF><cc:Work | ||||
| @@ -39,49 +37,11 @@ | ||||
|      inkscape:vp_y="0 : 1000 : 0" | ||||
|      inkscape:vp_z="16 : 8 : 1" | ||||
|      inkscape:persp3d-origin="8 : 5.3333333 : 1" | ||||
|      id="perspective2401" /><filter | ||||
|      color-interpolation-filters="sRGB" | ||||
|      inkscape:collect="always" | ||||
|      id="filter16494-4" | ||||
|      x="-0.20989846" | ||||
|      width="1.4197969" | ||||
|      y="-0.20903821" | ||||
|      height="1.4180764"><feGaussianBlur | ||||
|        inkscape:collect="always" | ||||
|        stdDeviation="1.3282637" | ||||
|        id="feGaussianBlur16496-8" /></filter><radialGradient | ||||
|      inkscape:collect="always" | ||||
|      xlink:href="#linearGradient16498-6" | ||||
|      id="radialGradient16504-1" | ||||
|      cx="7.6582627" | ||||
|      cy="5.8191104" | ||||
|      fx="7.6582627" | ||||
|      fy="5.8191104" | ||||
|      r="8.6928644" | ||||
|      gradientTransform="matrix(1.0474339,0,0,1.0517402,-0.3632615,-0.42032492)" | ||||
|      gradientUnits="userSpaceOnUse" /><linearGradient | ||||
|      inkscape:collect="always" | ||||
|      id="linearGradient16498-6"><stop | ||||
|        style="stop-color:#7b7b7b;stop-opacity:1" | ||||
|        offset="0" | ||||
|        id="stop16500-8" /><stop | ||||
|        style="stop-color:#101010;stop-opacity:1" | ||||
|        offset="1" | ||||
|        id="stop16502-0" /></linearGradient><filter | ||||
|      color-interpolation-filters="sRGB" | ||||
|      inkscape:collect="always" | ||||
|      id="filter16524-9" | ||||
|      x="-0.212979" | ||||
|      width="1.425958" | ||||
|      y="-0.21305652" | ||||
|      height="1.426113"><feGaussianBlur | ||||
|        inkscape:collect="always" | ||||
|        stdDeviation="0.71020915" | ||||
|        id="feGaussianBlur16526-0" /></filter></defs><sodipodi:namedview | ||||
|    inkscape:window-height="1114" | ||||
|    inkscape:window-width="1463" | ||||
|      id="perspective2401" /></defs><sodipodi:namedview | ||||
|    inkscape:window-height="999" | ||||
|    inkscape:window-width="1680" | ||||
|    inkscape:pageshadow="2" | ||||
|    inkscape:pageopacity="0" | ||||
|    inkscape:pageopacity="1" | ||||
|    guidetolerance="10.0" | ||||
|    gridtolerance="10.0" | ||||
|    objecttolerance="10.0" | ||||
| @@ -90,63 +50,27 @@ | ||||
|    pagecolor="#000000" | ||||
|    id="base" | ||||
|    showgrid="false" | ||||
|    inkscape:zoom="1" | ||||
|    inkscape:cx="10.720189" | ||||
|    inkscape:cy="13.739577" | ||||
|    inkscape:zoom="25.648691" | ||||
|    inkscape:cx="8.8097603" | ||||
|    inkscape:cy="9.0472789" | ||||
|    inkscape:window-x="0" | ||||
|    inkscape:window-y="26" | ||||
|    inkscape:current-layer="Foreground" | ||||
|    showguides="true" | ||||
|    inkscape:guide-bbox="true" | ||||
|    borderlayer="true" | ||||
|    inkscape:showpageshadow="false" | ||||
|    inkscape:window-maximized="0"><inkscape:grid | ||||
|      type="xygrid" | ||||
|      id="grid11246" | ||||
|      empspacing="5" | ||||
|      visible="true" | ||||
|      enabled="true" | ||||
|      snapvisiblegridlinesonly="true" /></sodipodi:namedview> | ||||
|    inkscape:guide-bbox="true" /> | ||||
|  | ||||
| <g | ||||
|    style="display:inline" | ||||
|    id="g16402-8" | ||||
|    transform="translate(4.7533483,2.8238929)"><g | ||||
|      id="g3175-4"><path | ||||
|        sodipodi:type="inkscape:offset" | ||||
|        inkscape:radius="0" | ||||
|        inkscape:original="M 7.65625 0.125 C 3.2589349 0.125 -0.3125 3.7070002 -0.3125 8.125 C -0.3125 12.543001 3.2589349 16.125 7.65625 16.125 C 12.053566 16.125 15.625 12.543001 15.625 8.125 C 15.625 3.7070002 12.053566 0.125 7.65625 0.125 z " | ||||
|        xlink:href="#path2394-32" | ||||
|        style="opacity:0.52994014;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:2.18181825;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter16494-4);enable-background:accumulate" | ||||
|        id="path16480-5" | ||||
|        inkscape:href="#path2394-32" | ||||
|        d="m 7.65625,0.125 c -4.3973151,0 -7.96875,3.5820002 -7.96875,8 0,4.418001 3.5714349,8 7.96875,8 4.397316,0 7.96875,-3.581999 7.96875,-8 0,-4.4179998 -3.571434,-8 -7.96875,-8 z" | ||||
|        transform="translate(0,1.028519)" /><path | ||||
|        clip-rule="evenodd" | ||||
|        d="m -0.30428257,8.1237596 c 0,-4.4179998 3.56522987,-7.9999996 7.96254497,-7.9999996 4.3973156,0 7.9625456,3.5819998 7.9625456,7.9999996 0,4.4180014 -3.56523,8.0000004 -7.9625456,8.0000004 -4.3973151,0 -7.96254497,-3.581999 -7.96254497,-8.0000004 z" | ||||
|        id="path2394-32" | ||||
|        style="color:#000000;fill:url(#radialGradient16504-1);fill-opacity:1;fill-rule:nonzero;stroke:#eeeeec;stroke-width:1.4545455;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|        sodipodi:nodetypes="csssc" | ||||
|        inkscape:connector-curvature="0" /><g | ||||
|        id="g3172-6" /></g><g | ||||
|      transform="matrix(0.72727273,0,0,0.72727273,2.368236,2.1803254)" | ||||
|      style="fill:#ffffff;fill-opacity:1;display:inline" | ||||
|      id="g27275-6-6" | ||||
|      inkscape:label="window-close"><g | ||||
|        style="fill:#ffffff;fill-opacity:1;display:inline" | ||||
|        id="g27277-1-1" | ||||
|        transform="translate(-41,-760)"><path | ||||
|          sodipodi:type="inkscape:offset" | ||||
|          inkscape:radius="0" | ||||
|          inkscape:original="M 44.21875 764.1875 L 44.21875 765.1875 C 44.19684 765.46825 44.289258 765.74287 44.5 765.9375 L 46.78125 768.21875 L 44.5 770.46875 C 44.31181 770.65692 44.218747 770.92221 44.21875 771.1875 L 44.21875 772.1875 L 45.21875 772.1875 C 45.48404 772.1875 45.749336 772.09444 45.9375 771.90625 L 48.21875 769.625 L 50.5 771.90625 C 50.688164 772.0944 50.953449 772.18749 51.21875 772.1875 L 52.21875 772.1875 L 52.21875 771.1875 C 52.218742 770.9222 52.125688 770.65692 51.9375 770.46875 L 49.6875 768.21875 L 51.96875 765.9375 C 52.18441 765.73815 52.21875 765.47397 52.21875 765.1875 L 52.21875 764.1875 L 51.21875 764.1875 C 50.977922 764.1945 50.796875 764.2695 50.53125 764.5 L 48.21875 766.78125 L 45.9375 764.5 C 45.75987 764.31608 45.504951 764.1987 45.25 764.1875 C 45.23954 764.18704 45.22912 764.18738 45.21875 764.1875 L 44.21875 764.1875 z " | ||||
|          xlink:href="#path27279-0-5" | ||||
|          style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter16524-9);enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono" | ||||
|          id="path16506-5" | ||||
|          inkscape:href="#path27279-0-5" | ||||
|          d="m 44.21875,764.1875 0,1 c -0.02191,0.28075 0.07051,0.55537 0.28125,0.75 l 2.28125,2.28125 -2.28125,2.25 c -0.18819,0.18817 -0.281253,0.45346 -0.28125,0.71875 l 0,1 1,0 c 0.26529,0 0.530586,-0.0931 0.71875,-0.28125 L 48.21875,769.625 50.5,771.90625 c 0.188164,0.18815 0.453449,0.28124 0.71875,0.28125 l 1,0 0,-1 c -8e-6,-0.2653 -0.09306,-0.53058 -0.28125,-0.71875 l -2.25,-2.25 2.28125,-2.28125 c 0.21566,-0.19935 0.25,-0.46353 0.25,-0.75 l 0,-1 -1,0 c -0.240828,0.007 -0.421875,0.082 -0.6875,0.3125 l -2.3125,2.28125 L 45.9375,764.5 c -0.17763,-0.18392 -0.432549,-0.3013 -0.6875,-0.3125 -0.01046,-4.6e-4 -0.02088,-1.2e-4 -0.03125,0 l -1,0 z" | ||||
|          transform="translate(0,1.3535534)" /><path | ||||
|          sodipodi:nodetypes="ccsccccccccccccccccccccccc" | ||||
|          style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono" | ||||
|          id="path27279-0-5" | ||||
|          inkscape:connector-curvature="0" | ||||
|          d="m 44.226475,764.17222 1,0 c 0.01037,-1.2e-4 0.02079,-4.6e-4 0.03125,0 0.254951,0.0112 0.50987,0.12858 0.6875,0.3125 l 2.28125,2.28125 2.3125,-2.28125 c 0.265625,-0.2305 0.446672,-0.3055 0.6875,-0.3125 l 1,0 0,1 c 0,0.28647 -0.03434,0.55065 -0.25,0.75 l -2.28125,2.28125 2.25,2.25 c 0.188188,0.18817 0.281242,0.45345 0.28125,0.71875 l 0,1 -1,0 c -0.265301,-1e-5 -0.530586,-0.0931 -0.71875,-0.28125 l -2.28125,-2.28125 -2.28125,2.28125 c -0.188164,0.18819 -0.45346,0.28125 -0.71875,0.28125 l -1,0 0,-1 c -3e-6,-0.26529 0.09306,-0.53058 0.28125,-0.71875 l 2.28125,-2.25 -2.28125,-2.28125 c -0.210742,-0.19463 -0.30316,-0.46925 -0.28125,-0.75 l 0,-1 z" /></g></g></g></svg> | ||||
|    id="g3175"><path | ||||
|      sodipodi:nodetypes="csssc" | ||||
|      style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.59217799;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | ||||
|      id="path2394" | ||||
|      d="M 0.83987936,8.0425327 C 0.83987936,4.0805265 4.0712155,0.86823453 8.0567103,0.86823453 C 12.042205,0.86823453 15.273542,4.0805265 15.273542,8.0425327 C 15.273542,12.004539 12.042205,15.216831 8.0567103,15.216831 C 4.0712155,15.216831 0.83987936,12.004539 0.83987936,8.0425327 z" | ||||
|      clip-rule="evenodd" /><g | ||||
|      id="g3172"><path | ||||
|        style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.67127273;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | ||||
|        d="M 5.4242673,5.3313047 L 10.515414,10.421272 L 10.714004,10.646491" | ||||
|        id="path3152" /></g></g><path | ||||
|    style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.67127273;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | ||||
|    d="M 5.4402527,10.650392 L 10.688082,5.3573033" | ||||
|    id="path3154" | ||||
|    sodipodi:nodetypes="cc" /></svg> | ||||
| Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 3.2 KiB | 
| Before Width: | Height: | Size: 2.3 KiB | 
| Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB | 
| Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB | 
| @@ -1,180 +0,0 @@ | ||||
| /* Copyright 2011, Red Hat, Inc. | ||||
|  * | ||||
|  * This program is free software; you can redistribute it and/or modify it | ||||
|  * under the terms and conditions of the GNU Lesser General Public License, | ||||
|  * version 2.1, as published by the Free Software Foundation. | ||||
|  * | ||||
|  * This program is distributed in the hope it will be useful, but WITHOUT ANY | ||||
|  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||||
|  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for | ||||
|  * more details. | ||||
|  * | ||||
|  * You should have received a copy of the GNU Lesser General Public License | ||||
|  * along with this program; if not, write to the Free Software Foundation, | ||||
|  * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||||
|  */ | ||||
|  | ||||
| /* Login Dialog */ | ||||
|  | ||||
| .login-dialog-title { | ||||
|     font-size: 14pt; | ||||
|     font-weight: bold; | ||||
|     color: #666666; | ||||
|     padding-bottom: 2em; | ||||
| } | ||||
|  | ||||
| .login-dialog { | ||||
|     border-radius: 16px; | ||||
|     min-height: 150px; | ||||
|     max-height: 700px; | ||||
|     min-width: 350px; | ||||
| } | ||||
|  | ||||
| .login-dialog-prompt-fingerprint-message { | ||||
|     font-size: 10.5pt; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-view { | ||||
|     -st-vfade-offset: 1em; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list { | ||||
|     spacing: 12px; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item { | ||||
|     color: #666666; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item:ltr { | ||||
|     padding-right: 1em; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item:rtl { | ||||
|     padding-left: 1em; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item .login-dialog-user-list-item-name { | ||||
|     font-size: 20pt; | ||||
|     padding-left: 1em; | ||||
|     color: #666666; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item:hover .login-dialog-user-list-item-name { | ||||
|     color: white; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item:focus .login-dialog-user-list-item-name { | ||||
|     color: white; | ||||
|     text-shadow: black 0px 2px 2px; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item-vertical-layout { | ||||
|     spacing: 2px; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item .login-dialog-user-list-item-focus-bin { | ||||
|     background-color: rgba(0,0,0,0.0); | ||||
|     height: 2px; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item:focus .login-dialog-user-list-item-focus-bin { | ||||
|     background-color: #666666; | ||||
| } | ||||
|  | ||||
| .login-dialog-user-list-item-icon { | ||||
|     border: 2px solid #8b8b8b; | ||||
|     border-radius: 8px; | ||||
|     width: 64px; | ||||
|     height: 64px; | ||||
| } | ||||
|  | ||||
| .login-dialog-not-listed-button { | ||||
|     padding-top: 2em; | ||||
| } | ||||
| .login-dialog-not-listed-label { | ||||
|     font-size: 14pt; | ||||
|     font-weight: bold; | ||||
|     color: #666666; | ||||
| } | ||||
|  | ||||
| .login-dialog-not-listed-button:hover .login-dialog-not-listed-label { | ||||
|     color: white; | ||||
| } | ||||
|  | ||||
| .login-dialog-prompt-layout { | ||||
|     padding-bottom: 32px; | ||||
| } | ||||
| .login-dialog-prompt-label { | ||||
|     color: white; | ||||
|     font-size: 20pt; | ||||
| } | ||||
|  | ||||
| .login-dialog-prompt-entry { | ||||
|     padding: 4px; | ||||
|     border-radius: 4px; | ||||
|     border: 2px solid #5656cc; | ||||
|     color: black; | ||||
|     background-color: white; | ||||
|     caret-color: black; | ||||
|     caret-size: 1px; | ||||
|     width: 15em; | ||||
| } | ||||
|  | ||||
| .login-dialog-prompt-entry .capslock-warning { | ||||
|     icon-size: 16px; | ||||
|     warning-color: #999; | ||||
| } | ||||
|  | ||||
| .login-dialog-prompt-entry:insensitive { | ||||
|     color: rgba(0,0,0,0.7); | ||||
|     border: 2px solid #565656; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list { | ||||
|     color: #ffffff; | ||||
|     font-size: 10.5pt; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list-button { | ||||
|     padding: 4px; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list-button:focus { | ||||
|     background-color: #4c4c4c; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list-button:active { | ||||
|     background-color: #4c4c4c; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list-button:hover { | ||||
|     font-weight: bold; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list-scroll-view { | ||||
|     background-gradient-start: rgba(80,80,80,0.3); | ||||
|     background-gradient-end: rgba(80,80,80,0.7); | ||||
|     background-gradient-direction: vertical; | ||||
|     box-shadow: inset 0px 2px 4px rgba(0,0,0,0.9); | ||||
|     border-radius: 8px; | ||||
|     border: 1px solid rgba(80,80,80,1.0); | ||||
|     padding: .5em; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list-item:focus { | ||||
|     background-color: #666666; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list-triangle { | ||||
|     padding-right: .5em; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list-item-box { | ||||
|     spacing: .25em; | ||||
| } | ||||
|  | ||||
| .login-dialog-session-list-item-dot { | ||||
|     width: .75em; | ||||
|     height: .75em; | ||||
| } | ||||
							
								
								
									
										113
									
								
								data/theme/mosaic-view-active.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,113 @@ | ||||
| <?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="24" | ||||
|    height="16" | ||||
|    id="svg6503" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.47pre4 r22446" | ||||
|    sodipodi:docname="mosaic-view-active.svg"> | ||||
|   <defs | ||||
|      id="defs6505"> | ||||
|     <inkscape:perspective | ||||
|        sodipodi:type="inkscape:persp3d" | ||||
|        inkscape:vp_x="0 : 16 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_z="32 : 16 : 1" | ||||
|        inkscape:persp3d-origin="16 : 10.666667 : 1" | ||||
|        id="perspective6511" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective6494" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="11.197802" | ||||
|      inkscape:cx="-15.97056" | ||||
|      inkscape:cy="16" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="true" | ||||
|      inkscape:grid-bbox="true" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:window-width="1680" | ||||
|      inkscape:window-height="997" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata6508"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title /> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      id="layer1" | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      transform="translate(0,-16)"> | ||||
|     <g | ||||
|        style="display:inline;fill:#cbcbcb;fill-opacity:1" | ||||
|        transform="translate(-449.85476,-685.85869)" | ||||
|        id="g5306"> | ||||
|       <rect | ||||
|          style="fill:#cbcbcb;fill-opacity:1;stroke:#000000;stroke-width:0.99999970000000005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.44262299999999999;stroke-dasharray:none" | ||||
|          id="rect5308" | ||||
|          width="11" | ||||
|          height="7" | ||||
|          x="450.5" | ||||
|          y="710.5" | ||||
|          rx="0.99999958" | ||||
|          ry="1" /> | ||||
|       <rect | ||||
|          style="fill:#cbcbcb;fill-opacity:1;stroke:#000000;stroke-width:0.99999970000000005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.44262299999999999;stroke-dasharray:none;display:inline" | ||||
|          id="rect5310" | ||||
|          width="11" | ||||
|          height="7" | ||||
|          x="462.5" | ||||
|          y="702.5" | ||||
|          rx="0.99999958" | ||||
|          ry="1" /> | ||||
|       <rect | ||||
|          style="fill:#cbcbcb;fill-opacity:1;stroke:#000000;stroke-width:0.99999976000000002;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.44262299999999999;stroke-dasharray:none;display:inline" | ||||
|          id="rect5312" | ||||
|          width="11" | ||||
|          height="7" | ||||
|          x="450.5" | ||||
|          y="702.5" | ||||
|          rx="0.99999958" | ||||
|          ry="1" /> | ||||
|       <rect | ||||
|          style="fill:#cbcbcb;fill-opacity:1;stroke:#000000;stroke-width:0.99999970000000005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.44262299999999999;stroke-dasharray:none;display:inline" | ||||
|          id="rect5314" | ||||
|          width="11" | ||||
|          height="7" | ||||
|          x="462.5" | ||||
|          y="710.5" | ||||
|          rx="0.99999958" | ||||
|          ry="1" /> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 3.7 KiB | 
							
								
								
									
										113
									
								
								data/theme/mosaic-view.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,113 @@ | ||||
| <?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="24" | ||||
|    height="16" | ||||
|    id="svg6503" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.47pre4 r22446" | ||||
|    sodipodi:docname="New document 19"> | ||||
|   <defs | ||||
|      id="defs6505"> | ||||
|     <inkscape:perspective | ||||
|        sodipodi:type="inkscape:persp3d" | ||||
|        inkscape:vp_x="0 : 16 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_z="32 : 16 : 1" | ||||
|        inkscape:persp3d-origin="16 : 10.666667 : 1" | ||||
|        id="perspective6511" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective6494" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="11.197802" | ||||
|      inkscape:cx="16" | ||||
|      inkscape:cy="16" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="true" | ||||
|      inkscape:grid-bbox="true" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:window-width="1680" | ||||
|      inkscape:window-height="997" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata6508"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      id="layer1" | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      transform="translate(0,-16)"> | ||||
|     <g | ||||
|        style="display:inline" | ||||
|        transform="translate(-449.85476,-685.85869)" | ||||
|        id="g5306"> | ||||
|       <rect | ||||
|          style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.442623;stroke-dasharray:none" | ||||
|          id="rect5308" | ||||
|          width="11" | ||||
|          height="7" | ||||
|          x="450.5" | ||||
|          y="710.5" | ||||
|          rx="0.99999958" | ||||
|          ry="1" /> | ||||
|       <rect | ||||
|          style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.442623;stroke-dasharray:none;display:inline" | ||||
|          id="rect5310" | ||||
|          width="11" | ||||
|          height="7" | ||||
|          x="462.5" | ||||
|          y="702.5" | ||||
|          rx="0.99999958" | ||||
|          ry="1" /> | ||||
|       <rect | ||||
|          style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:0.99999976;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.442623;stroke-dasharray:none;display:inline" | ||||
|          id="rect5312" | ||||
|          width="11" | ||||
|          height="7" | ||||
|          x="450.5" | ||||
|          y="702.5" | ||||
|          rx="0.99999958" | ||||
|          ry="1" /> | ||||
|       <rect | ||||
|          style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.442623;stroke-dasharray:none;display:inline" | ||||
|          id="rect5314" | ||||
|          width="11" | ||||
|          height="7" | ||||
|          x="462.5" | ||||
|          y="710.5" | ||||
|          rx="0.99999958" | ||||
|          ry="1" /> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 3.6 KiB | 
							
								
								
									
										89
									
								
								data/theme/move-window-on-new.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,89 @@ | ||||
| <?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="98" | ||||
|    height="98" | ||||
|    id="svg6375" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.47 r22583" | ||||
|    sodipodi:docname="add-workspace.svg"> | ||||
|   <defs | ||||
|      id="defs6377"> | ||||
|     <inkscape:perspective | ||||
|        sodipodi:type="inkscape:persp3d" | ||||
|        inkscape:vp_x="0 : 16 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_z="32 : 16 : 1" | ||||
|        inkscape:persp3d-origin="16 : 10.666667 : 1" | ||||
|        id="perspective6383" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective6366" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="3.9590209" | ||||
|      inkscape:cx="56.650687" | ||||
|      inkscape:cy="20.635343" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="true" | ||||
|      inkscape:grid-bbox="true" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:window-width="1680" | ||||
|      inkscape:window-height="997" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata6380"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      id="layer1" | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      transform="translate(0,66)"> | ||||
|     <g | ||||
|        id="g2824" | ||||
|        transform="matrix(11.568551,0,0,11.698271,-78.828159,-304.81518)"> | ||||
|       <path | ||||
|          style="fill:none;stroke:#666666;stroke-width:1.99999952;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" | ||||
|          d="m 11.07363,21.36834 0,6.43903" | ||||
|          id="path5322" /> | ||||
|       <path | ||||
|          style="fill:none;stroke:#666666;stroke-width:1.99999952;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" | ||||
|          d="m 14.29314,24.58786 -6.43902,0" | ||||
|          id="path5324" /> | ||||
|     </g> | ||||
|     <path | ||||
|        style="fill:#000000;fill-opacity:0.98823529" | ||||
|        d="m 48.239516,97.908047 c -0.41677,-0.05102 -1.269253,-0.222408 -1.894408,-0.380859 -4.088493,-1.036262 -7.520781,-4.753234 -8.330163,-9.021094 -0.154947,-0.817026 -0.257819,-6.68112 -0.257819,-14.696556 l 0,-13.337088 -13.829177,-0.08909 C 10.802042,60.298796 10.026884,60.268266 8.6851548,59.783022 3.6288503,57.954375 0.62673331,53.828648 0.62673331,48.708554 c 0,-5.625522 4.25936019,-10.425065 9.97721469,-11.242548 0.987903,-0.141242 7.368912,-0.254994 14.460646,-0.257791 l 12.692532,-0.005 0,-13.586668 c 0,-14.6441583 0.03287,-15.0698926 1.364686,-17.6753047 2.185477,-4.2754229 6.938193,-6.75739913 11.687647,-6.10355607 3.382776,0.46569661 6.737962,2.72496967 8.414081,5.66577137 1.480816,2.5981315 1.519067,3.0522448 1.519067,18.0333334 l 0,13.666424 12.692533,0.005 c 7.091733,0.0028 13.472742,0.116549 14.460646,0.257791 6.395303,0.914337 10.804785,6.623716 9.941157,12.871766 -0.698243,5.051565 -4.792685,9.104635 -9.941157,9.840713 -0.987904,0.141242 -7.368913,0.254995 -14.460646,0.257791 l -12.692533,0.005 0,13.801945 c 0,13.031417 -0.02798,13.895893 -0.501177,15.484801 -1.526902,5.127058 -6.919246,8.802262 -12.001914,8.18002 z" | ||||
|        id="path2828" | ||||
|        transform="translate(0,-66)" /> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 4.0 KiB | 
| @@ -1,74 +0,0 @@ | ||||
| <?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="21" | ||||
|    height="10" | ||||
|    id="svg2" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="panel-button-border.svg"> | ||||
|   <defs | ||||
|      id="defs4" /> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#000000" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="44.8" | ||||
|      inkscape:cx="8.6594891" | ||||
|      inkscape:cy="5.7029946" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="true" | ||||
|      showguides="true" | ||||
|      inkscape:guide-bbox="true" | ||||
|      inkscape:window-width="1440" | ||||
|      inkscape:window-height="843" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" | ||||
|      guidetolerance="10000" | ||||
|      objecttolerance="10000"> | ||||
|     <inkscape:grid | ||||
|        type="xygrid" | ||||
|        id="grid3792" | ||||
|        empspacing="10" | ||||
|        visible="true" | ||||
|        enabled="true" | ||||
|        snapvisiblegridlinesonly="true" /> | ||||
|   </sodipodi:namedview> | ||||
|   <metadata | ||||
|      id="metadata7"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title /> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1"> | ||||
|     <rect | ||||
|        style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke-width:0.43599999;stroke-miterlimit:4;stroke-dasharray:none" | ||||
|        id="rect3796" | ||||
|        width="3" | ||||
|        height="2" | ||||
|        x="9" | ||||
|        y="8" /> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 2.0 KiB | 
| @@ -1,111 +0,0 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="30" | ||||
|    height="25" | ||||
|    id="svg10621" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="panel-button-highlight-narrow.svg"> | ||||
|   <defs | ||||
|      id="defs10623"> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        id="radialGradient99561-1" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        cx="51" | ||||
|        cy="30" | ||||
|        fx="51" | ||||
|        fy="30" | ||||
|        r="42" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient34508-1-3"> | ||||
|       <stop | ||||
|          style="stop-color:#ffffff;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop34510-1-9" /> | ||||
|       <stop | ||||
|          style="stop-color:#ffffff;stop-opacity:0;" | ||||
|          offset="1" | ||||
|          id="stop34512-4-5" /> | ||||
|     </linearGradient> | ||||
|     <radialGradient | ||||
|        r="42" | ||||
|        fy="30" | ||||
|        fx="51" | ||||
|        cy="30" | ||||
|        cx="51" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="radialGradient10592" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        inkscape:collect="always" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#000000" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="1.979899" | ||||
|      inkscape:cx="-171.36384" | ||||
|      inkscape:cy="-53.255157" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      fit-margin-top="0" | ||||
|      fit-margin-left="0" | ||||
|      fit-margin-right="0" | ||||
|      fit-margin-bottom="0" | ||||
|      inkscape:window-width="1440" | ||||
|      inkscape:window-height="843" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata10626"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title /> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-468.08632,-537.03477)"> | ||||
|     <path | ||||
|        sodipodi:type="arc" | ||||
|        style="opacity:0.4625;color:#000000;fill:url(#radialGradient10592);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|        id="path34506-3" | ||||
|        sodipodi:cx="51" | ||||
|        sodipodi:cy="30" | ||||
|        sodipodi:rx="42" | ||||
|        sodipodi:ry="16" | ||||
|        d="M 9,29.999999 C 9.0000011,21.163443 27.804042,14 51.000002,14 74.195961,14 93,21.163444 93,30 l -42,0 z" | ||||
|        sodipodi:start="3.1415927" | ||||
|        sodipodi:end="6.2831853" | ||||
|        transform="matrix(0.35714286,0,0,1.5625,464.87203,515.15977)" | ||||
|        inkscape:export-filename="/home/jimmac/src/cvs/gnome/gnome-shell-design/mockups/motion/textures/panel.png" | ||||
|        inkscape:export-xdpi="90" | ||||
|        inkscape:export-ydpi="90" /> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 3.5 KiB | 
| @@ -1,111 +0,0 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="84" | ||||
|    height="25" | ||||
|    id="svg10621" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.0 r9654" | ||||
|    sodipodi:docname="panel-button-highlight-wide.svg"> | ||||
|   <defs | ||||
|      id="defs10623"> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        id="radialGradient99561-1" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        cx="51" | ||||
|        cy="30" | ||||
|        fx="51" | ||||
|        fy="30" | ||||
|        r="42" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient34508-1-3"> | ||||
|       <stop | ||||
|          style="stop-color:#ffffff;stop-opacity:1;" | ||||
|          offset="0" | ||||
|          id="stop34510-1-9" /> | ||||
|       <stop | ||||
|          style="stop-color:#ffffff;stop-opacity:0;" | ||||
|          offset="1" | ||||
|          id="stop34512-4-5" /> | ||||
|     </linearGradient> | ||||
|     <radialGradient | ||||
|        r="42" | ||||
|        fy="30" | ||||
|        fx="51" | ||||
|        cy="30" | ||||
|        cx="51" | ||||
|        gradientTransform="matrix(0.72146227,0,0,0.27484277,14.205424,21.754717)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="radialGradient10592" | ||||
|        xlink:href="#linearGradient34508-1-3" | ||||
|        inkscape:collect="always" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#000000" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="1.979899" | ||||
|      inkscape:cx="-118.50071" | ||||
|      inkscape:cy="27.304508" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      fit-margin-top="0" | ||||
|      fit-margin-left="0" | ||||
|      fit-margin-right="0" | ||||
|      fit-margin-bottom="0" | ||||
|      inkscape:window-width="1440" | ||||
|      inkscape:window-height="843" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata10626"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title /> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-441.08632,-537.03477)"> | ||||
|     <path | ||||
|        sodipodi:type="arc" | ||||
|        style="opacity:0.4625;color:#000000;fill:url(#radialGradient10592);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|        id="path34506-3" | ||||
|        sodipodi:cx="51" | ||||
|        sodipodi:cy="30" | ||||
|        sodipodi:rx="42" | ||||
|        sodipodi:ry="16" | ||||
|        d="M 9,29.999999 C 9.0000011,21.163443 27.804042,14 51.000002,14 74.195961,14 93,21.163444 93,30 l -42,0 z" | ||||
|        sodipodi:start="3.1415927" | ||||
|        sodipodi:end="6.2831853" | ||||
|        transform="matrix(1,0,0,1.5625,432.08632,515.15977)" | ||||
|        inkscape:export-filename="/home/jimmac/src/cvs/gnome/gnome-shell-design/mockups/motion/textures/panel.png" | ||||
|        inkscape:export-xdpi="90" | ||||
|        inkscape:export-ydpi="90" /> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 3.5 KiB | 
							
								
								
									
										
											BIN
										
									
								
								data/theme/process-working.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 4.0 KiB | 
| @@ -1,261 +0,0 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    id="svg5369" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48+devel r10053 custom" | ||||
|    width="96" | ||||
|    height="48" | ||||
|    sodipodi:docname="process-working.svg" | ||||
|    style="display:inline"> | ||||
|   <metadata | ||||
|      id="metadata5375"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <defs | ||||
|      id="defs5373" /> | ||||
|   <sodipodi:namedview | ||||
|      pagecolor="#808080" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1" | ||||
|      objecttolerance="10" | ||||
|      gridtolerance="10" | ||||
|      guidetolerance="10" | ||||
|      inkscape:pageopacity="0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:window-width="1975" | ||||
|      inkscape:window-height="1098" | ||||
|      id="namedview5371" | ||||
|      showgrid="true" | ||||
|      borderlayer="true" | ||||
|      inkscape:showpageshadow="false" | ||||
|      inkscape:zoom="16" | ||||
|      inkscape:cx="53.997662" | ||||
|      inkscape:cy="22.367695" | ||||
|      inkscape:window-x="1600" | ||||
|      inkscape:window-y="33" | ||||
|      inkscape:window-maximized="0" | ||||
|      inkscape:current-layer="layer2"> | ||||
|     <inkscape:grid | ||||
|        type="xygrid" | ||||
|        id="grid11933" | ||||
|        empspacing="5" | ||||
|        visible="true" | ||||
|        enabled="true" | ||||
|        snapvisiblegridlinesonly="true" /> | ||||
|   </sodipodi:namedview> | ||||
|   <g | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      inkscape:label="tiles" | ||||
|      style="display:none"> | ||||
|     <rect | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|        id="rect12451" | ||||
|        width="24" | ||||
|        height="24" | ||||
|        x="0" | ||||
|        y="0" /> | ||||
|     <rect | ||||
|        y="24" | ||||
|        x="0" | ||||
|        height="24" | ||||
|        width="24" | ||||
|        id="rect12453" | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||||
|     <rect | ||||
|        y="0" | ||||
|        x="24" | ||||
|        height="24" | ||||
|        width="24" | ||||
|        id="rect12455" | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||||
|     <rect | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|        id="rect12457" | ||||
|        width="24" | ||||
|        height="24" | ||||
|        x="24" | ||||
|        y="24" /> | ||||
|     <rect | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|        id="rect12459" | ||||
|        width="24" | ||||
|        height="24" | ||||
|        x="48" | ||||
|        y="0" /> | ||||
|     <rect | ||||
|        y="24" | ||||
|        x="48" | ||||
|        height="24" | ||||
|        width="24" | ||||
|        id="rect12461" | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||||
|     <rect | ||||
|        y="0" | ||||
|        x="72" | ||||
|        height="24" | ||||
|        width="24" | ||||
|        id="rect12463" | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||||
|     <rect | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|        id="rect12465" | ||||
|        width="24" | ||||
|        height="24" | ||||
|        x="72" | ||||
|        y="24" /> | ||||
|   </g> | ||||
|   <g | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer2" | ||||
|      inkscape:label="spinner"> | ||||
|     <g | ||||
|        transform="matrix(0.28240106,0,0,0.28240106,146.92015,-382.52444)" | ||||
|        id="g10450-5" | ||||
|        style="display:inline"> | ||||
|       <path | ||||
|          inkscape:connector-curvature="0" | ||||
|          style="opacity:0.6;color:#000000;fill:none;stroke:#ffffff;stroke-width:7.08212566;stroke-linecap:round;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          d="m -477.76072,1373.3569 0,9.4717" | ||||
|          id="path18768" | ||||
|          sodipodi:nodetypes="cc" | ||||
|          inkscape:transform-center-y="-4.6808838" /> | ||||
|       <path | ||||
|          inkscape:connector-curvature="0" | ||||
|          inkscape:transform-center-y="-3.3099227" | ||||
|          sodipodi:nodetypes="cc" | ||||
|          id="path18770" | ||||
|          d="m -461.0171,1380.2922 -7.23427,7.3824" | ||||
|          style="opacity:0.7;color:#000000;fill:none;stroke:#ffffff;stroke-width:7.08212566;stroke-linecap:round;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          inkscape:transform-center-x="-3.3098966" /> | ||||
|       <path | ||||
|          inkscape:connector-curvature="0" | ||||
|          inkscape:transform-center-x="-4.6808962" | ||||
|          style="opacity:0.8;color:#000000;fill:none;stroke:#ffffff;stroke-width:7.08212566;stroke-linecap:round;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          d="m -454.08163,1397.0359 -9.47165,0" | ||||
|          id="path18772" | ||||
|          sodipodi:nodetypes="cc" | ||||
|          inkscape:transform-center-y="-2.6596956e-05" /> | ||||
|       <path | ||||
|          inkscape:connector-curvature="0" | ||||
|          sodipodi:nodetypes="cc" | ||||
|          id="path18774" | ||||
|          d="m -461.01709,1413.7796 -6.93831,-7.0864" | ||||
|          style="opacity:0.9;color:#000000;fill:none;stroke:#ffffff;stroke-width:7.08212566;stroke-linecap:round;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          inkscape:transform-center-x="-3.3098966" | ||||
|          inkscape:transform-center-y="3.3098652" /> | ||||
|       <path | ||||
|          inkscape:connector-curvature="0" | ||||
|          inkscape:transform-center-y="4.6808757" | ||||
|          style="color:#000000;fill:none;stroke:#ffffff;stroke-width:7.08212566;stroke-linecap:round;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          d="m -477.76074,1420.715 9e-5,-9.4716" | ||||
|          id="path18776" | ||||
|          sodipodi:nodetypes="cc" /> | ||||
|       <path | ||||
|          inkscape:connector-curvature="0" | ||||
|          sodipodi:nodetypes="cc" | ||||
|          id="path18778" | ||||
|          d="m -494.50442,1413.7796 6.79048,-6.9384" | ||||
|          style="opacity:0.3;color:#000000;fill:none;stroke:#ffffff;stroke-width:7.08212566;stroke-linecap:round;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          inkscape:transform-center-y="3.3098769" | ||||
|          inkscape:transform-center-x="3.3098883" /> | ||||
|       <path | ||||
|          inkscape:connector-curvature="0" | ||||
|          inkscape:transform-center-x="4.6808941" | ||||
|          style="opacity:0.4;color:#000000;fill:none;stroke:#ffffff;stroke-width:7.08212566;stroke-linecap:round;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          d="m -501.43987,1397.0359 9.47174,0" | ||||
|          id="path18780" | ||||
|          sodipodi:nodetypes="cc" | ||||
|          inkscape:transform-center-y="-2.6596956e-05" /> | ||||
|       <path | ||||
|          inkscape:connector-curvature="0" | ||||
|          sodipodi:nodetypes="cc" | ||||
|          id="path18782" | ||||
|          d="m -494.5044,1380.2922 6.64243,6.9384" | ||||
|          style="opacity:0.5;color:#000000;fill:none;stroke:#ffffff;stroke-width:7.08212566;stroke-linecap:round;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          inkscape:transform-center-x="3.3098902" | ||||
|          inkscape:transform-center-y="-3.3099302" /> | ||||
|     </g> | ||||
|     <use | ||||
|        style="display:inline" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        xlink:href="#g10450-5" | ||||
|        id="use4981" | ||||
|        transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,36,-4.9705636)" | ||||
|        width="400" | ||||
|        height="400" /> | ||||
|     <use | ||||
|        style="display:inline" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        xlink:href="#use4981" | ||||
|        id="use4983" | ||||
|        transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,43.032478,-21.909695)" | ||||
|        width="400" | ||||
|        height="400" /> | ||||
|     <use | ||||
|        style="display:inline" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        xlink:href="#use4983" | ||||
|        id="use4985" | ||||
|        transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,50.081986,-38.904617)" | ||||
|        width="400" | ||||
|        height="400" /> | ||||
|     <use | ||||
|        style="display:inline" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        xlink:href="#use4985" | ||||
|        id="use4987" | ||||
|        transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,-38.919996,-31.872139)" | ||||
|        width="400" | ||||
|        height="400" /> | ||||
|     <use | ||||
|        style="display:inline" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        xlink:href="#use4987" | ||||
|        id="use4989" | ||||
|        transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,52.986628,2.0890543)" | ||||
|        width="400" | ||||
|        height="400" /> | ||||
|     <use | ||||
|        style="display:inline" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        xlink:href="#use4989" | ||||
|        id="use4991" | ||||
|        transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,60.013026,-14.912936)" | ||||
|        width="400" | ||||
|        height="400" /> | ||||
|     <use | ||||
|        style="display:inline" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        xlink:href="#use4991" | ||||
|        id="use4993" | ||||
|        transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,67.022396,-31.859127)" | ||||
|        width="400" | ||||
|        height="400" /> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 9.8 KiB | 
| @@ -2,62 +2,24 @@ | ||||
| <!-- 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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="119.97824" | ||||
|    height="119.97824" | ||||
|    width="74.01342" | ||||
|    height="74.006706" | ||||
|    id="svg7355" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="running-indicator.svg"> | ||||
|   <metadata | ||||
|      id="metadata4175"> | ||||
|     <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> | ||||
|   <sodipodi:namedview | ||||
|      pagecolor="#2c1cff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1" | ||||
|      objecttolerance="10" | ||||
|      gridtolerance="10" | ||||
|      guidetolerance="10" | ||||
|      inkscape:pageopacity="1" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:window-width="1920" | ||||
|      inkscape:window-height="1141" | ||||
|      id="namedview4173" | ||||
|      showgrid="false" | ||||
|      inkscape:zoom="8.1348081" | ||||
|      inkscape:cx="81.120662" | ||||
|      inkscape:cy="58.117986" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" | ||||
|      inkscape:current-layer="g30864" /> | ||||
|    version="1.1"> | ||||
|   <defs | ||||
|      id="defs7357"> | ||||
|     <radialGradient | ||||
|        xlink:href="#linearGradient36429" | ||||
|        id="radialGradient7461" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(1.011539,0,0,0.57582113,-0.39262194,71.83807)" | ||||
|        cx="47.428951" | ||||
|        cy="167.16817" | ||||
|        fx="47.428951" | ||||
|        fy="167.16817" | ||||
|        gradientTransform="matrix(1.0525552,0,0,1.0525552,-2.5162753,-9.0000838)" | ||||
|        cx="47.878681" | ||||
|        cy="171.25" | ||||
|        fx="47.878681" | ||||
|        fy="171.25" | ||||
|        r="37" /> | ||||
|     <linearGradient | ||||
|        id="linearGradient36429"> | ||||
| @@ -97,34 +59,31 @@ | ||||
|        fx="49.067139" | ||||
|        cy="242.50381" | ||||
|        cx="49.067139" | ||||
|        gradientTransform="matrix(1.1891549,0,0,0.15252127,-9.281289,132.52772)" | ||||
|        gradientTransform="matrix(1.1891549,0,0,0.55513246,-9.281289,36.12653)" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        id="radialGradient7488" | ||||
|        xlink:href="#linearGradient36471" /> | ||||
|   </defs> | ||||
|   <g | ||||
|      id="layer1" | ||||
|      transform="matrix(1.6213276,0,0,1.6213276,-431.6347,-272.5745)"> | ||||
|      transform="translate(-266.21629,-168.11809)"> | ||||
|     <g | ||||
|        style="display:inline" | ||||
|        id="g30864" | ||||
|        transform="translate(255.223,70.118091)"> | ||||
|       <rect | ||||
|          ry="3.4593496" | ||||
|          rx="3.4593496" | ||||
|          y="99.596962" | ||||
|          x="12.596948" | ||||
|          height="71.116341" | ||||
|          width="71.116341" | ||||
|          ry="3.5996203" | ||||
|          rx="3.5996203" | ||||
|          y="98" | ||||
|          x="11" | ||||
|          height="74" | ||||
|          width="74" | ||||
|          id="rect14000" | ||||
|          style="opacity:0.37187500000000001;fill:url(#radialGradient7461);fill-opacity:1;stroke:none" /> | ||||
|          style="opacity:0.371875;fill:url(#radialGradient7461);fill-opacity:1;stroke:none" /> | ||||
|       <path | ||||
|          id="rect34520" | ||||
|          d="m 83.273151,166.72152 c 0,1.96759 -1.584022,3.55163 -3.551629,3.55163 l -63.443032,0 c -1.967608,0 -3.551648,-1.58402 -3.551643,-3.55164 0,-5.85318 0,-5.85318 0,0" | ||||
|          style="opacity:0.35;fill:none;stroke:url(#radialGradient7488);stroke-width:1;stroke-opacity:1" | ||||
|          connector-curvature="0" | ||||
|          inkscape:connector-curvature="0" | ||||
|          sodipodi:nodetypes="ccscc" /> | ||||
|          d="m 84.506708,167.95508 c 6e-6,1.96759 -1.584022,3.55162 -3.551629,3.55163 l -65.910146,0 c -1.967608,-1e-5 -3.551648,-1.58402 -3.551643,-3.55164" | ||||
|          style="opacity:0.2;fill:none;stroke:url(#radialGradient7488);stroke-width:1;stroke-opacity:1" /> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
|   | ||||
| Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 2.6 KiB | 
							
								
								
									
										
											BIN
										
									
								
								data/theme/scroll-button-down-hover.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 225 B | 
							
								
								
									
										
											BIN
										
									
								
								data/theme/scroll-button-down.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 225 B | 
							
								
								
									
										
											BIN
										
									
								
								data/theme/scroll-button-up-hover.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 211 B | 
							
								
								
									
										
											BIN
										
									
								
								data/theme/scroll-button-up.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 211 B | 
							
								
								
									
										87
									
								
								data/theme/section-more-open.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,87 @@ | ||||
| <?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="5.8600588" | ||||
|    height="9" | ||||
|    id="svg3647" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.47 r22583" | ||||
|    sodipodi:docname="section-more.svg"> | ||||
|   <defs | ||||
|      id="defs3649"> | ||||
|     <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="perspective3655" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective3603" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="82.777778" | ||||
|      inkscape:cx="2.9300294" | ||||
|      inkscape:cy="5.466443" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      inkscape:window-width="1680" | ||||
|      inkscape:window-height="997" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata3652"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-262.78425,-490.71933)"> | ||||
|     <path | ||||
|        transform="matrix(0,-0.98149546,0.71467449,0,25.404986,578.15569)" | ||||
|        d="M 88.830127,340 80.169873,340 84.5,332.5 88.830127,340 z" | ||||
|        inkscape:randomized="0" | ||||
|        inkscape:rounded="0" | ||||
|        inkscape:flatsided="true" | ||||
|        sodipodi:arg2="1.5707963" | ||||
|        sodipodi:arg1="0.52359878" | ||||
|        sodipodi:r2="2.5" | ||||
|        sodipodi:r1="5" | ||||
|        sodipodi:cy="337.5" | ||||
|        sodipodi:cx="84.5" | ||||
|        sodipodi:sides="3" | ||||
|        id="path5497-5" | ||||
|        style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.59699643;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" | ||||
|        sodipodi:type="star" /> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 2.8 KiB | 
							
								
								
									
										87
									
								
								data/theme/section-more.svg
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1,87 @@ | ||||
| <?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="5.8600588" | ||||
|    height="9" | ||||
|    id="svg3647" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.46+devel" | ||||
|    sodipodi:docname="New document 6"> | ||||
|   <defs | ||||
|      id="defs3649"> | ||||
|     <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="perspective3655" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective3603" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="0.35" | ||||
|      inkscape:cx="112.21575" | ||||
|      inkscape:cy="-32.642856" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      inkscape:window-width="609" | ||||
|      inkscape:window-height="501" | ||||
|      inkscape:window-x="164" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="0" /> | ||||
|   <metadata | ||||
|      id="metadata3652"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1" | ||||
|      transform="translate(-262.78425,-490.71933)"> | ||||
|     <path | ||||
|        transform="matrix(0,0.98149546,-0.71467449,0,506.02358,412.28296)" | ||||
|        d="M 88.830127,340 80.169873,340 84.5,332.5 88.830127,340 z" | ||||
|        inkscape:randomized="0" | ||||
|        inkscape:rounded="0" | ||||
|        inkscape:flatsided="true" | ||||
|        sodipodi:arg2="1.5707963" | ||||
|        sodipodi:arg1="0.52359878" | ||||
|        sodipodi:r2="2.5" | ||||
|        sodipodi:r1="5" | ||||
|        sodipodi:cy="337.5" | ||||
|        sodipodi:cx="84.5" | ||||
|        sodipodi:sides="3" | ||||
|        id="path5497-5" | ||||
|        style="fill:#5f5f5f;fill-opacity:1;stroke:#5f5f5f;stroke-width:0.59699643;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" | ||||
|        sodipodi:type="star" /> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 2.8 KiB | 
							
								
								
									
										
											BIN
										
									
								
								data/theme/separator-white.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 531 B | 
| @@ -9,23 +9,23 @@ | ||||
|    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="10" | ||||
|    height="20" | ||||
|    id="svg10003" | ||||
|    width="24" | ||||
|    height="16" | ||||
|    id="svg6446" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="filter-selected-ltr.svg"> | ||||
|    inkscape:version="0.47pre4 r22446" | ||||
|    sodipodi:docname="single-view-active.svg"> | ||||
|   <defs | ||||
|      id="defs10005"> | ||||
|      id="defs6448"> | ||||
|     <inkscape:perspective | ||||
|        sodipodi:type="inkscape:persp3d" | ||||
|        inkscape:vp_x="0 : 32 : 1" | ||||
|        inkscape:vp_x="0 : 16 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_z="64 : 32 : 1" | ||||
|        inkscape:persp3d-origin="32 : 21.333333 : 1" | ||||
|        id="perspective10011" /> | ||||
|        inkscape:vp_z="32 : 16 : 1" | ||||
|        inkscape:persp3d-origin="16 : 10.666667 : 1" | ||||
|        id="perspective6454" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective9998" | ||||
|        id="perspective6441" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
| @@ -37,29 +37,29 @@ | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="5.5" | ||||
|      inkscape:cx="32.363636" | ||||
|      inkscape:cy="10.181818" | ||||
|      inkscape:zoom="11.197802" | ||||
|      inkscape:cx="0.014720032" | ||||
|      inkscape:cy="16" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="true" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:grid-bbox="true" | ||||
|      inkscape:window-width="1440" | ||||
|      inkscape:window-height="839" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:window-width="1680" | ||||
|      inkscape:window-height="997" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata10008"> | ||||
|      id="metadata6451"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|         <dc:title /> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
| @@ -67,15 +67,15 @@ | ||||
|      id="layer1" | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      transform="translate(0,-44)"> | ||||
|     <path | ||||
|        inkscape:export-ydpi="90" | ||||
|        inkscape:export-xdpi="90" | ||||
|        inkscape:export-filename="/home/jimmac/src/cvs/gnome/gnome-shell-design/mockups/app-picker.png" | ||||
|        sodipodi:nodetypes="cccc" | ||||
|        inkscape:connector-curvature="0" | ||||
|        id="rect34320" | ||||
|        d="m 10.369085,54.181804 -10.55634072,10.55636 -1e-5,-21.11269 z" | ||||
|        style="opacity:0.21000001;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> | ||||
|      transform="translate(0,-17)"> | ||||
|     <rect | ||||
|        ry="0.5" | ||||
|        rx="0.49999979" | ||||
|        y="17.483809" | ||||
|        x="0.53483802" | ||||
|        height="15" | ||||
|        width="23" | ||||
|        id="rect5304" | ||||
|        style="fill:#cccccc;fill-opacity:1;stroke:#cccccc;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.4 KiB | 
							
								
								
									
										81
									
								
								data/theme/single-view.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,81 @@ | ||||
| <?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="24" | ||||
|    height="16" | ||||
|    id="svg6446" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.47pre4 r22446" | ||||
|    sodipodi:docname="single-view.svg"> | ||||
|   <defs | ||||
|      id="defs6448"> | ||||
|     <inkscape:perspective | ||||
|        sodipodi:type="inkscape:persp3d" | ||||
|        inkscape:vp_x="0 : 16 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_z="32 : 16 : 1" | ||||
|        inkscape:persp3d-origin="16 : 10.666667 : 1" | ||||
|        id="perspective6454" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective6441" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="11.197802" | ||||
|      inkscape:cx="0.014720032" | ||||
|      inkscape:cy="16" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="true" | ||||
|      inkscape:grid-bbox="true" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:window-width="1680" | ||||
|      inkscape:window-height="997" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" /> | ||||
|   <metadata | ||||
|      id="metadata6451"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title /> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      id="layer1" | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      transform="translate(0,-17)"> | ||||
|     <rect | ||||
|        ry="0.5" | ||||
|        rx="0.49999979" | ||||
|        y="17.483809" | ||||
|        x="0.53483802" | ||||
|        height="15" | ||||
|        width="23" | ||||
|        id="rect5304" | ||||
|        style="fill:#626262;fill-opacity:1;stroke:#cccccc;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 2.4 KiB | 
| @@ -1,74 +0,0 @@ | ||||
| <?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="21" | ||||
|    height="10" | ||||
|    id="svg2" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.0 r9654" | ||||
|    sodipodi:docname="source-button-border.svg"> | ||||
|   <defs | ||||
|      id="defs4" /> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#000000" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="44.8" | ||||
|      inkscape:cx="8.704132" | ||||
|      inkscape:cy="5.7029946" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="true" | ||||
|      showguides="true" | ||||
|      inkscape:guide-bbox="true" | ||||
|      inkscape:window-width="1600" | ||||
|      inkscape:window-height="1145" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="1" | ||||
|      guidetolerance="10000" | ||||
|      objecttolerance="10000"> | ||||
|     <inkscape:grid | ||||
|        type="xygrid" | ||||
|        id="grid3792" | ||||
|        empspacing="10" | ||||
|        visible="true" | ||||
|        enabled="true" | ||||
|        snapvisiblegridlinesonly="true" /> | ||||
|   </sodipodi:namedview> | ||||
|   <metadata | ||||
|      id="metadata7"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      id="layer1"> | ||||
|     <rect | ||||
|        style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke-width:0.43599999;stroke-miterlimit:4;stroke-dasharray:none" | ||||
|        id="rect3796" | ||||
|        width="19" | ||||
|        height="2" | ||||
|        x="1" | ||||
|        y="8" /> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 2.0 KiB | 
| @@ -9,7 +9,7 @@ | ||||
|    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="65" | ||||
|    width="64" | ||||
|    height="22" | ||||
|    id="svg3273" | ||||
|    version="1.1" | ||||
|   | ||||
| Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB | 
| @@ -9,7 +9,7 @@ | ||||
|    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="65" | ||||
|    width="64" | ||||
|    height="22" | ||||
|    id="svg3012" | ||||
|    version="1.1" | ||||
|   | ||||
| Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB | 
| @@ -13,8 +13,8 @@ | ||||
|    height="22" | ||||
|    id="svg3199" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="toggle-on-intl.svg"> | ||||
|    inkscape:version="0.47 r22583" | ||||
|    sodipodi:docname="New document 11"> | ||||
|   <defs | ||||
|      id="defs3201"> | ||||
|     <inkscape:perspective | ||||
| @@ -39,14 +39,14 @@ | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="1" | ||||
|      inkscape:cx="49.147112" | ||||
|      inkscape:cy="17.532036" | ||||
|      inkscape:zoom="0.35" | ||||
|      inkscape:cx="32.500004" | ||||
|      inkscape:cy="10.999997" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      inkscape:window-width="1412" | ||||
|      inkscape:window-height="1067" | ||||
|      inkscape:window-width="609" | ||||
|      inkscape:window-height="501" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="0" /> | ||||
| @@ -58,7 +58,7 @@ | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
| @@ -72,7 +72,7 @@ | ||||
|        transform="translate(-453.5,448.36218)" | ||||
|        id="g16453"> | ||||
|       <rect | ||||
|          style="color:#000000;fill:#4a90d9;fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999994000000003;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          style="color:#000000;fill:#204a87;fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          id="rect16256-9-4" | ||||
|          width="63.000004" | ||||
|          height="19" | ||||
|   | ||||
| Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB | 
| @@ -13,8 +13,8 @@ | ||||
|    height="22" | ||||
|    id="svg2857" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.1 r9760" | ||||
|    sodipodi:docname="toggle-on-us.svg"> | ||||
|    inkscape:version="0.47 r22583" | ||||
|    sodipodi:docname="New document 2"> | ||||
|   <defs | ||||
|      id="defs2859"> | ||||
|     <inkscape:perspective | ||||
| @@ -40,18 +40,16 @@ | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="1" | ||||
|      inkscape:cx="19.689855" | ||||
|      inkscape:cy="2.0517979" | ||||
|      inkscape:cx="-69.642856" | ||||
|      inkscape:cy="42.428569" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="false" | ||||
|      inkscape:window-width="941" | ||||
|      inkscape:window-height="751" | ||||
|      inkscape:window-x="2577" | ||||
|      inkscape:window-y="206" | ||||
|      inkscape:window-maximized="0" | ||||
|      borderlayer="true" | ||||
|      inkscape:showpageshadow="false" /> | ||||
|      inkscape:window-width="609" | ||||
|      inkscape:window-height="501" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="0" /> | ||||
|   <metadata | ||||
|      id="metadata2862"> | ||||
|     <rdf:RDF> | ||||
| @@ -60,7 +58,7 @@ | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title /> | ||||
|         <dc:title></dc:title> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
| @@ -74,7 +72,7 @@ | ||||
|        transform="translate(-351.35714,708.36218)" | ||||
|        id="g16453"> | ||||
|       <rect | ||||
|          style="color:#000000;fill:#4a90d9;fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999994000000003;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          style="color:#000000;fill:#204a87;fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||||
|          id="rect16256-9-4" | ||||
|          width="63.000004" | ||||
|          height="19" | ||||
|   | ||||
| Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.7 KiB | 
							
								
								
									
										96
									
								
								data/theme/ws-switch-arrow-left.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,96 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="96" height="96" id="svg25070" version="1.1" inkscape:version="0.47 r22583" sodipodi:docname="dark-arrow-larger.svg"> | ||||
|   <defs id="defs25072"> | ||||
|     <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 24 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="48 : 24 : 1" inkscape:persp3d-origin="24 : 16 : 1" id="perspective25078"/> | ||||
|     <inkscape:perspective id="perspective24985" inkscape:persp3d-origin="0.5 : 0.33333333 : 1" inkscape:vp_z="1 : 0.5 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 0.5 : 1" sodipodi:type="inkscape:persp3d"/> | ||||
|     <linearGradient inkscape:collect="always" xlink:href="#linearGradient4034-0-4" id="linearGradient24957" gradientUnits="userSpaceOnUse" gradientTransform="translate(6)" x1="-86.552246" y1="185.439" x2="-83.37072" y2="197.31261"/> | ||||
|     <linearGradient inkscape:collect="always" id="linearGradient4034-0-4"> | ||||
|       <stop style="stop-color: rgb(238, 238, 236); stop-opacity: 1;" offset="0" id="stop4036-5-7"/> | ||||
|       <stop style="stop-color: rgb(186, 189, 182); stop-opacity: 1;" offset="1" id="stop4038-9-6"/> | ||||
|     </linearGradient> | ||||
|     <filter id="filter24765" inkscape:label="Invert" x="0" y="0" width="1" height="1" inkscape:menu="Color" inkscape:menu-tooltip="Invert colors" color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix id="feColorMatrix24767" type="saturate" values="1" result="fbSourceGraphic"/> | ||||
|       <feColorMatrix id="feColorMatrix24769" in="fbSourceGraphic" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"/> | ||||
|     </filter> | ||||
|     <linearGradient inkscape:collect="always" xlink:href="#linearGradient4632-1-3-9-3-2" id="linearGradient24955" gradientUnits="userSpaceOnUse" gradientTransform="translate(-5)" x1="-74.520325" y1="169.06032" x2="-74.520325" y2="205.94189"/> | ||||
|     <linearGradient id="linearGradient4632-1-3-9-3-2"> | ||||
|       <stop style="stop-color: rgb(238, 238, 236); stop-opacity: 1;" offset="0" id="stop4634-1-8-3-9-0"/> | ||||
|       <stop id="stop4636-1-9-9-8-8" offset="0.0274937" style="stop-color: rgb(255, 255, 255); stop-opacity: 1;"/> | ||||
|       <stop id="stop4638-8-3-9-6-6" offset="0.274937" style="stop-color: rgb(242, 242, 242); stop-opacity: 1;"/> | ||||
|       <stop id="stop4640-8-5-7-8-9" offset="0.38707438" style="stop-color: rgb(238, 238, 236); stop-opacity: 1;"/> | ||||
|       <stop id="stop4642-5-41-9-6-9" offset="0.66528589" style="stop-color: rgb(217, 218, 216); stop-opacity: 1;"/> | ||||
|       <stop id="stop4644-5-2-7-9-2" offset="0.76745707" style="stop-color: rgb(223, 224, 221); stop-opacity: 1;"/> | ||||
|       <stop style="stop-color: rgb(240, 240, 240); stop-opacity: 1;" offset="1" id="stop4646-3-2-3-7-3"/> | ||||
|     </linearGradient> | ||||
|     <radialGradient inkscape:collect="always" xlink:href="#linearGradient4869-4-1" id="radialGradient24959" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.0075, 0, 0, 1.0075, -5.4544, -1.25141)" cx="-33.412369" cy="185.74171" fx="-33.412369" fy="185.74171" r="2.3554697"/> | ||||
|     <linearGradient id="linearGradient4869-4-1"> | ||||
|       <stop style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" offset="0" id="stop4871-6-2"/> | ||||
|       <stop id="stop4879-7-4" offset="0.31807542" style="stop-color: rgb(238, 238, 236); stop-opacity: 1;"/> | ||||
|       <stop id="stop4877-6-1" offset="0.74691135" style="stop-color: rgb(200, 201, 198); stop-opacity: 1;"/> | ||||
|       <stop style="stop-color: rgb(211, 215, 207); stop-opacity: 1;" offset="1" id="stop4873-1-0"/> | ||||
|     </linearGradient> | ||||
|     <filter id="filter25011" inkscape:label="Invert" x="0" y="0" width="1" height="1" inkscape:menu="Color" inkscape:menu-tooltip="Invert colors" color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix id="feColorMatrix25013" type="saturate" values="1" result="fbSourceGraphic"/> | ||||
|       <feColorMatrix id="feColorMatrix25015" in="fbSourceGraphic" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"/> | ||||
|     </filter> | ||||
|     <radialGradient inkscape:collect="always" xlink:href="#linearGradient4869-4-0" id="radialGradient24961" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.0075, 0, 0, 1.0075, -5.4544, -1.25141)" cx="-33.412369" cy="185.74171" fx="-33.412369" fy="185.74171" r="2.3554697"/> | ||||
|     <linearGradient id="linearGradient4869-4-0"> | ||||
|       <stop style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" offset="0" id="stop4871-6-8"/> | ||||
|       <stop id="stop4879-7-5" offset="0.31807542" style="stop-color: rgb(238, 238, 236); stop-opacity: 1;"/> | ||||
|       <stop id="stop4877-6-5" offset="0.74691135" style="stop-color: rgb(200, 201, 198); stop-opacity: 1;"/> | ||||
|       <stop style="stop-color: rgb(211, 215, 207); stop-opacity: 1;" offset="1" id="stop4873-1-4"/> | ||||
|     </linearGradient> | ||||
|     <filter id="filter25023" inkscape:label="Invert" x="0" y="0" width="1" height="1" inkscape:menu="Color" inkscape:menu-tooltip="Invert colors" color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix id="feColorMatrix25025" type="saturate" values="1" result="fbSourceGraphic"/> | ||||
|       <feColorMatrix id="feColorMatrix25027" in="fbSourceGraphic" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"/> | ||||
|     </filter> | ||||
|     <linearGradient inkscape:collect="always" xlink:href="#linearGradient4941" id="linearGradient24963" gradientUnits="userSpaceOnUse" x1="-39.858727" y1="184.61784" x2="-38.244785" y2="188.84898"/> | ||||
|     <linearGradient inkscape:collect="always" id="linearGradient4941"> | ||||
|       <stop style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" offset="0" id="stop4943"/> | ||||
|       <stop style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" offset="1" id="stop4945"/> | ||||
|     </linearGradient> | ||||
|     <filter id="filter25033" inkscape:label="Invert" x="0" y="0" width="1" height="1" inkscape:menu="Color" inkscape:menu-tooltip="Invert colors" color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix id="feColorMatrix25035" type="saturate" values="1" result="fbSourceGraphic"/> | ||||
|       <feColorMatrix id="feColorMatrix25037" in="fbSourceGraphic" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"/> | ||||
|     </filter> | ||||
|     <linearGradient inkscape:collect="always" xlink:href="#linearGradient4941-7" id="linearGradient24965" gradientUnits="userSpaceOnUse" x1="-39.858727" y1="184.61784" x2="-38.244785" y2="188.84898"/> | ||||
|     <linearGradient inkscape:collect="always" id="linearGradient4941-7"> | ||||
|       <stop style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" offset="0" id="stop4943-2"/> | ||||
|       <stop style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" offset="1" id="stop4945-5"/> | ||||
|     </linearGradient> | ||||
|     <filter id="filter25043" inkscape:label="Invert" x="0" y="0" width="1" height="1" inkscape:menu="Color" inkscape:menu-tooltip="Invert colors" color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix id="feColorMatrix25045" type="saturate" values="1" result="fbSourceGraphic"/> | ||||
|       <feColorMatrix id="feColorMatrix25047" in="fbSourceGraphic" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"/> | ||||
|     </filter> | ||||
|     <filter id="filter25049" inkscape:label="Invert" x="0" y="0" width="1" height="1" inkscape:menu="Color" inkscape:menu-tooltip="Invert colors" color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix id="feColorMatrix25051" type="saturate" values="1" result="fbSourceGraphic"/> | ||||
|       <feColorMatrix id="feColorMatrix25053" in="fbSourceGraphic" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"/> | ||||
|     </filter> | ||||
|     <filter id="filter25055" inkscape:label="Invert" x="0" y="0" width="1" height="1" inkscape:menu="Color" inkscape:menu-tooltip="Invert colors" color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix id="feColorMatrix25057" type="saturate" values="1" result="fbSourceGraphic"/> | ||||
|       <feColorMatrix id="feColorMatrix25059" in="fbSourceGraphic" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"/> | ||||
|     </filter> | ||||
|   </defs> | ||||
|   <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="2.8284271" inkscape:cx="48.631638" inkscape:cy="57.536221" inkscape:current-layer="layer1" showgrid="true" inkscape:grid-bbox="true" inkscape:document-units="px" inkscape:window-width="1200" inkscape:window-height="851" inkscape:window-x="0" inkscape:window-y="52" inkscape:window-maximized="0"/> | ||||
|   <metadata id="metadata25075"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> | ||||
|         <dc:title/> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g id="layer1" inkscape:label="Layer 1" inkscape:groupmode="layer" transform="translate(0, 48)"> | ||||
|     <g id="g4030-1-8" transform="matrix(2, 0, 0, 2, 193.25, -374.967)" style="stroke: rgb(0, 0, 0); display: inline; stroke-opacity: 1;"> | ||||
|       <path sodipodi:nodetypes="ccc" id="path3165-7-3" d="m -72.5,173.5 -14,14 14,14" style="overflow: visible; marker: none; color: rgb(0, 0, 0); fill: none; stroke: rgb(0, 0, 0); stroke-width: 7; stroke-linecap: round; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-dasharray: none; stroke-dashoffset: 0pt; visibility: visible; display: inline;"/> | ||||
|     </g> | ||||
|     <path sodipodi:type="arc" style="overflow: visible; marker: none; color: rgb(0, 0, 0); fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: none; stroke-width: 0.523439; visibility: visible; display: inline;" id="path4050-2-7-9-4" sodipodi:cx="-38.59375" sodipodi:cy="186.40625" sodipodi:rx="2.09375" sodipodi:ry="2.09375" d="m -36.5,186.40625 a 2.09375,2.09375 0 1 1 -4.1875,0 2.09375,2.09375 0 1 1 4.1875,0 z" transform="matrix(3.34328, 0, 0, 3.34328, 185.28, -623.176)"/> | ||||
|     <path sodipodi:type="arc" style="overflow: visible; marker: none; color: rgb(0, 0, 0); fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; stroke: none; stroke-width: 0.523439; visibility: visible; display: inline;" id="path4050-2-7-9-4-8" sodipodi:cx="-38.59375" sodipodi:cy="186.40625" sodipodi:rx="2.09375" sodipodi:ry="2.09375" d="m -36.5,186.40625 a 2.09375,2.09375 0 1 1 -4.1875,0 2.09375,2.09375 0 1 1 4.1875,0 z" transform="matrix(3.34328, 0, 0, 3.34328, 207.28, -623.176)"/> | ||||
|     <path sodipodi:type="arc" style="overflow: visible; marker: none; color: rgb(0, 0, 0); fill: none; stroke: rgb(0, 0, 0); stroke-width: 0.697921; stroke-linecap: round; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-dasharray: none; stroke-dashoffset: 0pt; visibility: visible; display: inline;" id="path4050-2-7-9-4-0" sodipodi:cx="-38.59375" sodipodi:cy="186.40625" sodipodi:rx="2.09375" sodipodi:ry="2.09375" d="m -36.5,186.40625 a 2.09375,2.09375 0 1 1 -4.1875,0 2.09375,2.09375 0 1 1 4.1875,0 z" transform="matrix(2.86565, 0, 0, 2.86565, 166.846, -534.143)"/> | ||||
|     <path sodipodi:type="arc" style="overflow: visible; marker: none; color: rgb(0, 0, 0); fill: none; stroke: rgb(0, 0, 0); stroke-width: 0.697921; stroke-linecap: round; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-dasharray: none; stroke-dashoffset: 0pt; visibility: visible; display: inline;" id="path4050-2-7-9-4-0-9" sodipodi:cx="-38.59375" sodipodi:cy="186.40625" sodipodi:rx="2.09375" sodipodi:ry="2.09375" d="m -36.5,186.40625 a 2.09375,2.09375 0 1 1 -4.1875,0 2.09375,2.09375 0 1 1 4.1875,0 z" transform="matrix(2.86565, 0, 0, 2.86565, 188.846, -534.143)"/> | ||||
|     <path style="overflow: visible; marker: none; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; text-indent: 0pt; text-align: start; text-decoration: none; line-height: normal; letter-spacing: normal; word-spacing: normal; text-transform: none; direction: ltr; text-anchor: start; opacity: 0.35; color: rgb(0, 0, 0); fill: none; stroke: rgb(0, 0, 0); stroke-width: 1; stroke-miterlimit: 4; stroke-dasharray: none; visibility: visible; display: inline; font-family: Bitstream Vera Sans; stroke-opacity: 1;" d="m 317.06251,365.96875 c -0.76948,0.0224 -1.52555,0.35464 -2.0625,0.90625 l -16.125,16.125 16.125,16.125 c 1.11265,1.11265 3.13735,1.11265 4.25,0 1.11265,-1.11264 1.11265,-3.13735 0,-4.25 l -11.875,-11.875 11.875,-11.875 c 0.86584,-0.83655 1.1475,-2.22114 0.6773,-3.32947 -0.47021,-1.10834 -1.66156,-1.86802 -2.8648,-1.82678 z" id="path3165-7-3-1" sodipodi:nodetypes="ccccscccsc" transform="matrix(2, 0, 0, 2, -586, -765.967)"/> | ||||
|     <path style="overflow: visible; marker: none; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; text-indent: 0pt; text-align: start; text-decoration: none; line-height: normal; letter-spacing: normal; word-spacing: normal; text-transform: none; direction: ltr; text-anchor: start; color: rgb(0, 0, 0); fill: none; stroke: rgb(0, 0, 0); stroke-width: 1; stroke-linecap: round; stroke-miterlimit: 4; stroke-dasharray: none; visibility: visible; display: inline; font-family: Bitstream Vera Sans; stroke-opacity: 1;" d="m 320.08435,397.03059 c 0.007,-0.79449 -0.27079,-1.59203 -0.83434,-2.15559 L 307.37501,383 m 12.5523,-15.20447 c -0.47021,-1.10834 -1.66156,-1.86802 -2.8648,-1.82678 -0.76948,0.0224 -1.52555,0.35464 -2.0625,0.90625 L 298.87501,383" id="path3165-7-3-1-9" sodipodi:nodetypes="ccccccc" transform="matrix(2, 0, 0, 2, -586, -765.967)"/> | ||||
|   </g> | ||||
| </svg> | ||||
| After Width: | Height: | Size: 13 KiB | 
| @@ -2,51 +2,13 @@ | ||||
| <!-- 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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    version="1.1" | ||||
|    width="96" | ||||
|    height="96" | ||||
|    id="svg25070" | ||||
|    inkscape:version="0.48.0 r9654" | ||||
|    sodipodi:docname="ws-switch-arrow-down.svg"> | ||||
|   <metadata | ||||
|      id="metadata3353"> | ||||
|     <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> | ||||
|   <sodipodi:namedview | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1" | ||||
|      objecttolerance="10" | ||||
|      gridtolerance="10" | ||||
|      guidetolerance="10" | ||||
|      inkscape:pageopacity="0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:window-width="718" | ||||
|      inkscape:window-height="480" | ||||
|      id="namedview3351" | ||||
|      showgrid="false" | ||||
|      inkscape:zoom="2.6979167" | ||||
|      inkscape:cx="48" | ||||
|      inkscape:cy="48" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="0" | ||||
|      inkscape:current-layer="svg25070" /> | ||||
|    id="svg25070"> | ||||
|   <defs | ||||
|      id="defs25072"> | ||||
|     <linearGradient | ||||
| @@ -326,7 +288,7 @@ | ||||
|     </filter> | ||||
|   </defs> | ||||
|   <g | ||||
|      transform="matrix(0,1,-1,0,48.0003,4.1307112e-7)" | ||||
|      transform="translate(0,48)" | ||||
|      id="layer1"> | ||||
|     <g | ||||
|        transform="matrix(-2,0,0,2,-97.2497,-374.967)" | ||||
| @@ -335,42 +297,35 @@ | ||||
|       <path | ||||
|          d="m -72.5,173.5 -14,14 14,14" | ||||
|          id="path3165-7-3" | ||||
|          style="color:#000000;fill:none;stroke:#000000;stroke-width:7;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|          inkscape:connector-curvature="0" /> | ||||
|          style="color:#000000;fill:none;stroke:#000000;stroke-width:7;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" /> | ||||
|     </g> | ||||
|     <path | ||||
|        d="m -36.5,186.40625 a 2.09375,2.09375 0 1 1 -4.1875,0 2.09375,2.09375 0 1 1 4.1875,0 z" | ||||
|        transform="matrix(-3.34328,0,0,3.34328,-89.2797,-623.176)" | ||||
|        id="path4050-2-7-9-4" | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.52343899;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|        inkscape:connector-curvature="0" /> | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.52343899;marker:none;visibility:visible;display:inline;overflow:visible" /> | ||||
|     <path | ||||
|        d="m -36.5,186.40625 a 2.09375,2.09375 0 1 1 -4.1875,0 2.09375,2.09375 0 1 1 4.1875,0 z" | ||||
|        transform="matrix(-3.34328,0,0,3.34328,-111.2797,-623.176)" | ||||
|        id="path4050-2-7-9-4-8" | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.52343899;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|        inkscape:connector-curvature="0" /> | ||||
|        style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.52343899;marker:none;visibility:visible;display:inline;overflow:visible" /> | ||||
|     <path | ||||
|        d="m -36.5,186.40625 a 2.09375,2.09375 0 1 1 -4.1875,0 2.09375,2.09375 0 1 1 4.1875,0 z" | ||||
|        transform="matrix(-2.86565,0,0,2.86565,-70.8457,-534.143)" | ||||
|        id="path4050-2-7-9-4-0" | ||||
|        style="color:#000000;fill:none;stroke:#000000;stroke-width:0.69792098;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|        inkscape:connector-curvature="0" /> | ||||
|        style="color:#000000;fill:none;stroke:#000000;stroke-width:0.69792098;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" /> | ||||
|     <path | ||||
|        d="m -36.5,186.40625 a 2.09375,2.09375 0 1 1 -4.1875,0 2.09375,2.09375 0 1 1 4.1875,0 z" | ||||
|        transform="matrix(-2.86565,0,0,2.86565,-92.8457,-534.143)" | ||||
|        id="path4050-2-7-9-4-0-9" | ||||
|        style="color:#000000;fill:none;stroke:#000000;stroke-width:0.69792098;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|        inkscape:connector-curvature="0" /> | ||||
|        style="color:#000000;fill:none;stroke:#000000;stroke-width:0.69792098;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" /> | ||||
|     <path | ||||
|        d="m 47.87528,-34.0295 c 1.53896,0.0448 3.0511,0.70928 4.125,1.8125 l 32.25,32.25 -32.25,32.25 c -2.2253,2.2253 -6.2747,2.2253 -8.5,0 -2.2253,-2.22528 -2.2253,-6.2747 0,-8.5 l 23.75,-23.75 -23.75,-23.75 c -1.73168,-1.6731 -2.295,-4.44228 -1.3546,-6.65894 0.94042,-2.21668 3.32312,-3.73604 5.7296,-3.65356 z" | ||||
|        id="path3165-7-3-1" | ||||
|        style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0pt;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;text-anchor:start;opacity:0.35;color:#000000;fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;font-family:Bitstream Vera Sans" | ||||
|        inkscape:connector-curvature="0" /> | ||||
|        style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0pt;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;text-anchor:start;opacity:0.35;color:#000000;fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;font-family:Bitstream Vera Sans" /> | ||||
|     <path | ||||
|        d="m 41.8316,28.09418 c -0.014,-1.58898 0.54158,-3.18406 1.66868,-4.31118 l 23.75,-23.75 m -25.1046,-30.40894 c 0.94042,-2.21668 3.32312,-3.73604 5.7296,-3.65356 1.53896,0.0448 3.0511,0.70928 4.125,1.8125 l 32.25,32.25" | ||||
|        id="path3165-7-3-1-9" | ||||
|        style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0pt;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;text-anchor:start;color:#000000;fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;font-family:Bitstream Vera Sans" | ||||
|        inkscape:connector-curvature="0" /> | ||||
|        style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0pt;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;text-anchor:start;color:#000000;fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;font-family:Bitstream Vera Sans" /> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB | 
| @@ -1,447 +0,0 @@ | ||||
| <?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:xlink="http://www.w3.org/1999/xlink" | ||||
|    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||||
|    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||||
|    width="96" | ||||
|    height="96" | ||||
|    id="svg25070" | ||||
|    version="1.1" | ||||
|    inkscape:version="0.48.0 r9654" | ||||
|    sodipodi:docname="ws-switch-arrow-up.svg"> | ||||
|   <defs | ||||
|      id="defs25072"> | ||||
|     <inkscape:perspective | ||||
|        sodipodi:type="inkscape:persp3d" | ||||
|        inkscape:vp_x="0 : 24 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_z="48 : 24 : 1" | ||||
|        inkscape:persp3d-origin="24 : 16 : 1" | ||||
|        id="perspective25078" /> | ||||
|     <inkscape:perspective | ||||
|        id="perspective24985" | ||||
|        inkscape:persp3d-origin="0.5 : 0.33333333 : 1" | ||||
|        inkscape:vp_z="1 : 0.5 : 1" | ||||
|        inkscape:vp_y="0 : 1000 : 0" | ||||
|        inkscape:vp_x="0 : 0.5 : 1" | ||||
|        sodipodi:type="inkscape:persp3d" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient4034-0-4" | ||||
|        id="linearGradient24957" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="translate(6)" | ||||
|        x1="-86.552246" | ||||
|        y1="185.439" | ||||
|        x2="-83.37072" | ||||
|        y2="197.31261" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient4034-0-4"> | ||||
|       <stop | ||||
|          style="stop-color: rgb(238, 238, 236); stop-opacity: 1;" | ||||
|          offset="0" | ||||
|          id="stop4036-5-7" /> | ||||
|       <stop | ||||
|          style="stop-color: rgb(186, 189, 182); stop-opacity: 1;" | ||||
|          offset="1" | ||||
|          id="stop4038-9-6" /> | ||||
|     </linearGradient> | ||||
|     <filter | ||||
|        id="filter24765" | ||||
|        inkscape:label="Invert" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        width="1" | ||||
|        height="1" | ||||
|        inkscape:menu="Color" | ||||
|        inkscape:menu-tooltip="Invert colors" | ||||
|        color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix24767" | ||||
|          type="saturate" | ||||
|          values="1" | ||||
|          result="fbSourceGraphic" /> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix24769" | ||||
|          in="fbSourceGraphic" | ||||
|          values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /> | ||||
|     </filter> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient4632-1-3-9-3-2" | ||||
|        id="linearGradient24955" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="translate(-5)" | ||||
|        x1="-74.520325" | ||||
|        y1="169.06032" | ||||
|        x2="-74.520325" | ||||
|        y2="205.94189" /> | ||||
|     <linearGradient | ||||
|        id="linearGradient4632-1-3-9-3-2"> | ||||
|       <stop | ||||
|          style="stop-color: rgb(238, 238, 236); stop-opacity: 1;" | ||||
|          offset="0" | ||||
|          id="stop4634-1-8-3-9-0" /> | ||||
|       <stop | ||||
|          id="stop4636-1-9-9-8-8" | ||||
|          offset="0.0274937" | ||||
|          style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" /> | ||||
|       <stop | ||||
|          id="stop4638-8-3-9-6-6" | ||||
|          offset="0.274937" | ||||
|          style="stop-color: rgb(242, 242, 242); stop-opacity: 1;" /> | ||||
|       <stop | ||||
|          id="stop4640-8-5-7-8-9" | ||||
|          offset="0.38707438" | ||||
|          style="stop-color: rgb(238, 238, 236); stop-opacity: 1;" /> | ||||
|       <stop | ||||
|          id="stop4642-5-41-9-6-9" | ||||
|          offset="0.66528589" | ||||
|          style="stop-color: rgb(217, 218, 216); stop-opacity: 1;" /> | ||||
|       <stop | ||||
|          id="stop4644-5-2-7-9-2" | ||||
|          offset="0.76745707" | ||||
|          style="stop-color: rgb(223, 224, 221); stop-opacity: 1;" /> | ||||
|       <stop | ||||
|          style="stop-color: rgb(240, 240, 240); stop-opacity: 1;" | ||||
|          offset="1" | ||||
|          id="stop4646-3-2-3-7-3" /> | ||||
|     </linearGradient> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient4869-4-1" | ||||
|        id="radialGradient24959" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(1.0075, 0, 0, 1.0075, -5.4544, -1.25141)" | ||||
|        cx="-33.412369" | ||||
|        cy="185.74171" | ||||
|        fx="-33.412369" | ||||
|        fy="185.74171" | ||||
|        r="2.3554697" /> | ||||
|     <linearGradient | ||||
|        id="linearGradient4869-4-1"> | ||||
|       <stop | ||||
|          style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" | ||||
|          offset="0" | ||||
|          id="stop4871-6-2" /> | ||||
|       <stop | ||||
|          id="stop4879-7-4" | ||||
|          offset="0.31807542" | ||||
|          style="stop-color: rgb(238, 238, 236); stop-opacity: 1;" /> | ||||
|       <stop | ||||
|          id="stop4877-6-1" | ||||
|          offset="0.74691135" | ||||
|          style="stop-color: rgb(200, 201, 198); stop-opacity: 1;" /> | ||||
|       <stop | ||||
|          style="stop-color: rgb(211, 215, 207); stop-opacity: 1;" | ||||
|          offset="1" | ||||
|          id="stop4873-1-0" /> | ||||
|     </linearGradient> | ||||
|     <filter | ||||
|        id="filter25011" | ||||
|        inkscape:label="Invert" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        width="1" | ||||
|        height="1" | ||||
|        inkscape:menu="Color" | ||||
|        inkscape:menu-tooltip="Invert colors" | ||||
|        color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25013" | ||||
|          type="saturate" | ||||
|          values="1" | ||||
|          result="fbSourceGraphic" /> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25015" | ||||
|          in="fbSourceGraphic" | ||||
|          values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /> | ||||
|     </filter> | ||||
|     <radialGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient4869-4-0" | ||||
|        id="radialGradient24961" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        gradientTransform="matrix(1.0075, 0, 0, 1.0075, -5.4544, -1.25141)" | ||||
|        cx="-33.412369" | ||||
|        cy="185.74171" | ||||
|        fx="-33.412369" | ||||
|        fy="185.74171" | ||||
|        r="2.3554697" /> | ||||
|     <linearGradient | ||||
|        id="linearGradient4869-4-0"> | ||||
|       <stop | ||||
|          style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" | ||||
|          offset="0" | ||||
|          id="stop4871-6-8" /> | ||||
|       <stop | ||||
|          id="stop4879-7-5" | ||||
|          offset="0.31807542" | ||||
|          style="stop-color: rgb(238, 238, 236); stop-opacity: 1;" /> | ||||
|       <stop | ||||
|          id="stop4877-6-5" | ||||
|          offset="0.74691135" | ||||
|          style="stop-color: rgb(200, 201, 198); stop-opacity: 1;" /> | ||||
|       <stop | ||||
|          style="stop-color: rgb(211, 215, 207); stop-opacity: 1;" | ||||
|          offset="1" | ||||
|          id="stop4873-1-4" /> | ||||
|     </linearGradient> | ||||
|     <filter | ||||
|        id="filter25023" | ||||
|        inkscape:label="Invert" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        width="1" | ||||
|        height="1" | ||||
|        inkscape:menu="Color" | ||||
|        inkscape:menu-tooltip="Invert colors" | ||||
|        color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25025" | ||||
|          type="saturate" | ||||
|          values="1" | ||||
|          result="fbSourceGraphic" /> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25027" | ||||
|          in="fbSourceGraphic" | ||||
|          values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /> | ||||
|     </filter> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient4941" | ||||
|        id="linearGradient24963" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        x1="-39.858727" | ||||
|        y1="184.61784" | ||||
|        x2="-38.244785" | ||||
|        y2="188.84898" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient4941"> | ||||
|       <stop | ||||
|          style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" | ||||
|          offset="0" | ||||
|          id="stop4943" /> | ||||
|       <stop | ||||
|          style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" | ||||
|          offset="1" | ||||
|          id="stop4945" /> | ||||
|     </linearGradient> | ||||
|     <filter | ||||
|        id="filter25033" | ||||
|        inkscape:label="Invert" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        width="1" | ||||
|        height="1" | ||||
|        inkscape:menu="Color" | ||||
|        inkscape:menu-tooltip="Invert colors" | ||||
|        color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25035" | ||||
|          type="saturate" | ||||
|          values="1" | ||||
|          result="fbSourceGraphic" /> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25037" | ||||
|          in="fbSourceGraphic" | ||||
|          values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /> | ||||
|     </filter> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        xlink:href="#linearGradient4941-7" | ||||
|        id="linearGradient24965" | ||||
|        gradientUnits="userSpaceOnUse" | ||||
|        x1="-39.858727" | ||||
|        y1="184.61784" | ||||
|        x2="-38.244785" | ||||
|        y2="188.84898" /> | ||||
|     <linearGradient | ||||
|        inkscape:collect="always" | ||||
|        id="linearGradient4941-7"> | ||||
|       <stop | ||||
|          style="stop-color: rgb(255, 255, 255); stop-opacity: 1;" | ||||
|          offset="0" | ||||
|          id="stop4943-2" /> | ||||
|       <stop | ||||
|          style="stop-color: rgb(255, 255, 255); stop-opacity: 0;" | ||||
|          offset="1" | ||||
|          id="stop4945-5" /> | ||||
|     </linearGradient> | ||||
|     <filter | ||||
|        id="filter25043" | ||||
|        inkscape:label="Invert" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        width="1" | ||||
|        height="1" | ||||
|        inkscape:menu="Color" | ||||
|        inkscape:menu-tooltip="Invert colors" | ||||
|        color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25045" | ||||
|          type="saturate" | ||||
|          values="1" | ||||
|          result="fbSourceGraphic" /> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25047" | ||||
|          in="fbSourceGraphic" | ||||
|          values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /> | ||||
|     </filter> | ||||
|     <filter | ||||
|        id="filter25049" | ||||
|        inkscape:label="Invert" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        width="1" | ||||
|        height="1" | ||||
|        inkscape:menu="Color" | ||||
|        inkscape:menu-tooltip="Invert colors" | ||||
|        color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25051" | ||||
|          type="saturate" | ||||
|          values="1" | ||||
|          result="fbSourceGraphic" /> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25053" | ||||
|          in="fbSourceGraphic" | ||||
|          values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /> | ||||
|     </filter> | ||||
|     <filter | ||||
|        id="filter25055" | ||||
|        inkscape:label="Invert" | ||||
|        x="0" | ||||
|        y="0" | ||||
|        width="1" | ||||
|        height="1" | ||||
|        inkscape:menu="Color" | ||||
|        inkscape:menu-tooltip="Invert colors" | ||||
|        color-interpolation-filters="sRGB"> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25057" | ||||
|          type="saturate" | ||||
|          values="1" | ||||
|          result="fbSourceGraphic" /> | ||||
|       <feColorMatrix | ||||
|          id="feColorMatrix25059" | ||||
|          in="fbSourceGraphic" | ||||
|          values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /> | ||||
|     </filter> | ||||
|   </defs> | ||||
|   <sodipodi:namedview | ||||
|      id="base" | ||||
|      pagecolor="#ffffff" | ||||
|      bordercolor="#666666" | ||||
|      borderopacity="1.0" | ||||
|      inkscape:pageopacity="0.0" | ||||
|      inkscape:pageshadow="2" | ||||
|      inkscape:zoom="2.8284271" | ||||
|      inkscape:cx="-12.356322" | ||||
|      inkscape:cy="57.536221" | ||||
|      inkscape:current-layer="layer1" | ||||
|      showgrid="true" | ||||
|      inkscape:grid-bbox="true" | ||||
|      inkscape:document-units="px" | ||||
|      inkscape:window-width="1200" | ||||
|      inkscape:window-height="840" | ||||
|      inkscape:window-x="0" | ||||
|      inkscape:window-y="26" | ||||
|      inkscape:window-maximized="0" /> | ||||
|   <metadata | ||||
|      id="metadata25075"> | ||||
|     <rdf:RDF> | ||||
|       <cc:Work | ||||
|          rdf:about=""> | ||||
|         <dc:format>image/svg+xml</dc:format> | ||||
|         <dc:type | ||||
|            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||||
|         <dc:title /> | ||||
|       </cc:Work> | ||||
|     </rdf:RDF> | ||||
|   </metadata> | ||||
|   <g | ||||
|      id="layer1" | ||||
|      inkscape:label="Layer 1" | ||||
|      inkscape:groupmode="layer" | ||||
|      transform="translate(0, 48)"> | ||||
|     <g | ||||
|        id="g3181" | ||||
|        transform="matrix(0,1,-1,0,48.0003,-48)"> | ||||
|       <g | ||||
|          style="stroke:#000000;stroke-opacity:1;display:inline" | ||||
|          transform="matrix(2,0,0,2,193.25,-374.967)" | ||||
|          id="g4030-1-8"> | ||||
|         <path | ||||
|            style="color:#000000;fill:none;stroke:#000000;stroke-width:7;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|            d="m -72.5,173.5 -14,14 14,14" | ||||
|            id="path3165-7-3" | ||||
|            sodipodi:nodetypes="ccc" | ||||
|            inkscape:connector-curvature="0" /> | ||||
|       </g> | ||||
|       <path | ||||
|          transform="matrix(3.34328,0,0,3.34328,185.28,-623.176)" | ||||
|          d="m -36.5,186.40625 c 0,1.15635 -0.937404,2.09375 -2.09375,2.09375 -1.156346,0 -2.09375,-0.9374 -2.09375,-2.09375 0,-1.15635 0.937404,-2.09375 2.09375,-2.09375 1.156346,0 2.09375,0.9374 2.09375,2.09375 z" | ||||
|          sodipodi:ry="2.09375" | ||||
|          sodipodi:rx="2.09375" | ||||
|          sodipodi:cy="186.40625" | ||||
|          sodipodi:cx="-38.59375" | ||||
|          id="path4050-2-7-9-4" | ||||
|          style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.52343899;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|          sodipodi:type="arc" /> | ||||
|       <path | ||||
|          transform="matrix(3.34328,0,0,3.34328,207.28,-623.176)" | ||||
|          d="m -36.5,186.40625 c 0,1.15635 -0.937404,2.09375 -2.09375,2.09375 -1.156346,0 -2.09375,-0.9374 -2.09375,-2.09375 0,-1.15635 0.937404,-2.09375 2.09375,-2.09375 1.156346,0 2.09375,0.9374 2.09375,2.09375 z" | ||||
|          sodipodi:ry="2.09375" | ||||
|          sodipodi:rx="2.09375" | ||||
|          sodipodi:cy="186.40625" | ||||
|          sodipodi:cx="-38.59375" | ||||
|          id="path4050-2-7-9-4-8" | ||||
|          style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.52343899;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|          sodipodi:type="arc" /> | ||||
|       <path | ||||
|          transform="matrix(2.86565,0,0,2.86565,166.846,-534.143)" | ||||
|          d="m -36.5,186.40625 c 0,1.15635 -0.937404,2.09375 -2.09375,2.09375 -1.156346,0 -2.09375,-0.9374 -2.09375,-2.09375 0,-1.15635 0.937404,-2.09375 2.09375,-2.09375 1.156346,0 2.09375,0.9374 2.09375,2.09375 z" | ||||
|          sodipodi:ry="2.09375" | ||||
|          sodipodi:rx="2.09375" | ||||
|          sodipodi:cy="186.40625" | ||||
|          sodipodi:cx="-38.59375" | ||||
|          id="path4050-2-7-9-4-0" | ||||
|          style="color:#000000;fill:none;stroke:#000000;stroke-width:0.69792098;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|          sodipodi:type="arc" /> | ||||
|       <path | ||||
|          transform="matrix(2.86565,0,0,2.86565,188.846,-534.143)" | ||||
|          d="m -36.5,186.40625 c 0,1.15635 -0.937404,2.09375 -2.09375,2.09375 -1.156346,0 -2.09375,-0.9374 -2.09375,-2.09375 0,-1.15635 0.937404,-2.09375 2.09375,-2.09375 1.156346,0 2.09375,0.9374 2.09375,2.09375 z" | ||||
|          sodipodi:ry="2.09375" | ||||
|          sodipodi:rx="2.09375" | ||||
|          sodipodi:cy="186.40625" | ||||
|          sodipodi:cx="-38.59375" | ||||
|          id="path4050-2-7-9-4-0-9" | ||||
|          style="color:#000000;fill:none;stroke:#000000;stroke-width:0.69792098;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" | ||||
|          sodipodi:type="arc" /> | ||||
|       <path | ||||
|          transform="matrix(2,0,0,2,-586,-765.967)" | ||||
|          sodipodi:nodetypes="ccccscccsc" | ||||
|          id="path3165-7-3-1" | ||||
|          d="m 317.06251,365.96875 c -0.76948,0.0224 -1.52555,0.35464 -2.0625,0.90625 l -16.125,16.125 16.125,16.125 c 1.11265,1.11265 3.13735,1.11265 4.25,0 1.11265,-1.11264 1.11265,-3.13735 0,-4.25 l -11.875,-11.875 11.875,-11.875 c 0.86584,-0.83655 1.1475,-2.22114 0.6773,-3.32947 -0.47021,-1.10834 -1.66156,-1.86802 -2.8648,-1.82678 z" | ||||
|          style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0pt;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;text-anchor:start;opacity:0.35;color:#000000;fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;font-family:Bitstream Vera Sans" | ||||
|          inkscape:connector-curvature="0" /> | ||||
|       <path | ||||
|          transform="matrix(2,0,0,2,-586,-765.967)" | ||||
|          sodipodi:nodetypes="ccccccc" | ||||
|          id="path3165-7-3-1-9" | ||||
|          d="m 320.08435,397.03059 c 0.007,-0.79449 -0.27079,-1.59203 -0.83434,-2.15559 L 307.37501,383 m 12.5523,-15.20447 c -0.47021,-1.10834 -1.66156,-1.86802 -2.8648,-1.82678 -0.76948,0.0224 -1.52555,0.35464 -2.0625,0.90625 L 298.87501,383" | ||||
|          style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0pt;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;text-anchor:start;color:#000000;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;font-family:Bitstream Vera Sans" | ||||
|          inkscape:connector-curvature="0" /> | ||||
|     </g> | ||||
|   </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 16 KiB | 
| @@ -1 +0,0 @@ | ||||
| SUBDIRS = reference | ||||
| @@ -1 +0,0 @@ | ||||
| SUBDIRS = shell st | ||||
| @@ -1,113 +0,0 @@ | ||||
| ## Process this file with automake to produce Makefile.in | ||||
|  | ||||
| # We require automake 1.6 at least. | ||||
| AUTOMAKE_OPTIONS = 1.6 | ||||
|  | ||||
| # This is a blank Makefile.am for using gtk-doc. | ||||
| # Copy this to your project's API docs directory and modify the variables to | ||||
| # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples | ||||
| # of using the various options. | ||||
|  | ||||
| # The name of the module, e.g. 'glib'. | ||||
| DOC_MODULE=shell | ||||
|  | ||||
| # Uncomment for versioned docs and specify the version of the module, e.g. '2'. | ||||
| #DOC_MODULE_VERSION=2 | ||||
|  | ||||
|  | ||||
| # The top-level SGML file. You can change this if you want to. | ||||
| DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml | ||||
|  | ||||
| # Directories containing the source code | ||||
| # gtk-doc will search all .c and .h files beneath these paths | ||||
| # for inline comments documenting functions and macros. | ||||
| DOC_SOURCE_DIR=$(top_srcdir)/src | ||||
|  | ||||
| # Extra options to pass to gtkdoc-scangobj. Not normally needed. | ||||
| SCANGOBJ_OPTIONS= | ||||
|  | ||||
| # Extra options to supply to gtkdoc-scan. | ||||
| # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" | ||||
| SCAN_OPTIONS=--rebuild-types | ||||
|  | ||||
| # Extra options to supply to gtkdoc-mkdb. | ||||
| # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml | ||||
| MKDB_OPTIONS=--xml-mode --output-format=xml | ||||
|  | ||||
| # Extra options to supply to gtkdoc-mktmpl | ||||
| # e.g. MKTMPL_OPTIONS=--only-section-tmpl | ||||
| MKTMPL_OPTIONS= | ||||
|  | ||||
| # Extra options to supply to gtkdoc-mkhtml | ||||
| MKHTML_OPTIONS= | ||||
|  | ||||
| # Extra options to supply to gtkdoc-fixref. Not normally needed. | ||||
| # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html | ||||
| FIXXREF_OPTIONS= | ||||
|  | ||||
| # Used for dependencies. The docs will be rebuilt if any of these change. | ||||
| # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h | ||||
| # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c | ||||
| HFILE_GLOB=$(top_srcdir)/src/*.h | ||||
| CFILE_GLOB=$(top_srcdir)/src/*.c | ||||
|  | ||||
| # Extra header to include when scanning, which are not under DOC_SOURCE_DIR | ||||
| # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h | ||||
| EXTRA_HFILES= | ||||
|  | ||||
| # Header files or dirs to ignore when scanning. Use base file/dir names | ||||
| # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code | ||||
| IGNORE_HFILES=					\ | ||||
| 	calendar-server				\ | ||||
| 	gvc					\ | ||||
| 	hotplug-sniffer				\ | ||||
| 	st					\ | ||||
| 	tray					\ | ||||
| 	gactionmuxer.h				\ | ||||
| 	gactionobservable.h			\ | ||||
| 	gactionobserver.h			\ | ||||
| 	shell-recorder-src.h | ||||
|  | ||||
| # Images to copy into HTML directory. | ||||
| # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png | ||||
| HTML_IMAGES= | ||||
|  | ||||
| # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). | ||||
| # e.g. content_files=running.sgml building.sgml changes-2.0.sgml | ||||
| content_files= | ||||
|  | ||||
| # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded | ||||
| # These files must be listed here *and* in content_files | ||||
| # e.g. expand_content_files=running.sgml | ||||
| expand_content_files= | ||||
|  | ||||
| # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. | ||||
| # Only needed if you are using gtkdoc-scangobj to dynamically query widget | ||||
| # signals and properties. | ||||
| # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) | ||||
| # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) | ||||
| GTKDOC_CFLAGS=$(GNOME_SHELL_CFLAGS) | ||||
| GTKDOC_LIBS=$(GNOME_SHELL_LIBS) $(BLUETOOTH_LIBS) $(top_builddir)/src/libgnome-shell.la | ||||
|  | ||||
| # This includes the standard gtk-doc make rules, copied by gtkdocize. | ||||
| include $(top_srcdir)/gtk-doc.make | ||||
|  | ||||
| # Other files to distribute | ||||
| # e.g. EXTRA_DIST += version.xml.in | ||||
| EXTRA_DIST += | ||||
|  | ||||
| # Files not to distribute | ||||
| # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types | ||||
| # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt | ||||
| DISTCLEANFILES = $(DOC_MODULES).types | ||||
|  | ||||
| # Comment this out if you want 'make check' to test you doc status | ||||
| # and run some sanity checks | ||||
| if ENABLE_GTK_DOC | ||||
| TESTS_ENVIRONMENT = cd $(srcdir) && \ | ||||
|   DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ | ||||
|   SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) | ||||
| #TESTS = $(GTKDOC_CHECK) | ||||
| endif | ||||
|  | ||||
| -include $(top_srcdir)/git.mk | ||||
| @@ -1,73 +0,0 @@ | ||||
| <?xml version="1.0"?> | ||||
| <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" | ||||
|                "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" | ||||
| [ | ||||
|   <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'"> | ||||
| ]> | ||||
| <book id="index"> | ||||
|   <bookinfo> | ||||
|     <title>Shell Reference Manual</title> | ||||
|     <releaseinfo> | ||||
|       for Shell @VERSION@. | ||||
|       <!--The latest version of this documentation can be found on-line at | ||||
|       <ulink role="online-location" url="http://[SERVER]/shell/index.html">http://[SERVER]/shell/</ulink>.--> | ||||
|     </releaseinfo> | ||||
|   </bookinfo> | ||||
|  | ||||
|   <chapter> | ||||
|     <title>Actors</title> | ||||
|     <xi:include href="xml/shell-generic-container.xml"/> | ||||
|     <xi:include href="xml/shell-slicer.xml"/> | ||||
|     <xi:include href="xml/shell-stack.xml"/> | ||||
|   </chapter> | ||||
|   <chapter> | ||||
|     <title>Application tracking</title> | ||||
|     <xi:include href="xml/shell-app.xml"/> | ||||
|     <xi:include href="xml/shell-app-usage.xml"/> | ||||
|     <xi:include href="xml/shell-window-tracker.xml"/> | ||||
|   </chapter> | ||||
|   <chapter> | ||||
|     <title>Search</title> | ||||
|     <xi:include href="xml/shell-app-system.xml"/> | ||||
|     <xi:include href="xml/shell-contact-system.xml"/> | ||||
|     <xi:include href="xml/shell-doc-system.xml"/> | ||||
|   </chapter> | ||||
|   <chapter> | ||||
|     <title>Tray Icons</title> | ||||
|     <xi:include href="xml/shell-embedded-window.xml"/> | ||||
|     <xi:include href="xml/shell-gtk-embed.xml"/> | ||||
|     <xi:include href="xml/shell-tray-icon.xml"/> | ||||
|     <xi:include href="xml/shell-tray-manager.xml"/> | ||||
|   </chapter> | ||||
|   <chapter> | ||||
|     <title>Recorder</title> | ||||
|     <xi:include href="xml/shell-recorder.xml"/> | ||||
|     <xi:include href="xml/shell-recorder-src.xml"/> | ||||
|   </chapter> | ||||
|   <chapter> | ||||
|     <title>Integration helpers and utilities</title> | ||||
|     <xi:include href="xml/shell-global.xml"/> | ||||
|     <xi:include href="xml/shell-wm.xml"/> | ||||
|     <xi:include href="xml/shell-xfixes-cursor.xml"/> | ||||
|     <xi:include href="xml/shell-util.xml"/> | ||||
|     <xi:include href="xml/shell-mount-operation.xml"/> | ||||
|     <xi:include href="xml/shell-mobile-providers.xml"/> | ||||
|     <xi:include href="xml/shell-network-agent.xml"/> | ||||
|     <xi:include href="xml/shell-polkit-authentication-agent.xml"/> | ||||
|     <xi:include href="xml/shell-tp-client.xml"/> | ||||
|   </chapter> | ||||
|   <chapter id="object-tree"> | ||||
|     <title>Object Hierarchy</title> | ||||
|      <xi:include href="xml/tree_index.sgml"/> | ||||
|   </chapter> | ||||
|   <index id="api-index-full"> | ||||
|     <title>API Index</title> | ||||
|     <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include> | ||||
|   </index> | ||||
|   <index id="deprecated-api-index" role="deprecated"> | ||||
|     <title>Index of deprecated API</title> | ||||
|     <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include> | ||||
|   </index> | ||||
|  | ||||
|   <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include> | ||||
| </book> | ||||
| @@ -1,104 +0,0 @@ | ||||
| ## Process this file with automake to produce Makefile.in | ||||
|  | ||||
| # We require automake 1.6 at least. | ||||
| AUTOMAKE_OPTIONS = 1.6 | ||||
|  | ||||
| # This is a blank Makefile.am for using gtk-doc. | ||||
| # Copy this to your project's API docs directory and modify the variables to | ||||
| # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples | ||||
| # of using the various options. | ||||
|  | ||||
| # The name of the module, e.g. 'glib'. | ||||
| DOC_MODULE=st | ||||
|  | ||||
| # Uncomment for versioned docs and specify the version of the module, e.g. '2'. | ||||
| #DOC_MODULE_VERSION=2 | ||||
|  | ||||
|  | ||||
| # The top-level SGML file. You can change this if you want to. | ||||
| DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml | ||||
|  | ||||
| # Directories containing the source code | ||||
| # gtk-doc will search all .c and .h files beneath these paths | ||||
| # for inline comments documenting functions and macros. | ||||
| DOC_SOURCE_DIR=$(top_srcdir)/src/st | ||||
|  | ||||
| # Extra options to pass to gtkdoc-scangobj. Not normally needed. | ||||
| SCANGOBJ_OPTIONS= | ||||
|  | ||||
| # Extra options to supply to gtkdoc-scan. | ||||
| # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" | ||||
| SCAN_OPTIONS=--rebuild-types --rebuild-sections | ||||
|  | ||||
| # Extra options to supply to gtkdoc-mkdb. | ||||
| # e.g. MKDB_OPTIONS=--xml-mode --output-format=xml | ||||
| MKDB_OPTIONS=--xml-mode --output-format=xml | ||||
|  | ||||
| # Extra options to supply to gtkdoc-mktmpl | ||||
| # e.g. MKTMPL_OPTIONS=--only-section-tmpl | ||||
| MKTMPL_OPTIONS= | ||||
|  | ||||
| # Extra options to supply to gtkdoc-mkhtml | ||||
| MKHTML_OPTIONS= | ||||
|  | ||||
| # Extra options to supply to gtkdoc-fixref. Not normally needed. | ||||
| # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html | ||||
| FIXXREF_OPTIONS= | ||||
|  | ||||
| # Used for dependencies. The docs will be rebuilt if any of these change. | ||||
| # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h | ||||
| # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c | ||||
| HFILE_GLOB=$(top_srcdir)/src/st/*.h | ||||
| CFILE_GLOB=$(top_srcdir)/src/st/*.c | ||||
|  | ||||
| # Extra header to include when scanning, which are not under DOC_SOURCE_DIR | ||||
| # e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h | ||||
| EXTRA_HFILES= | ||||
|  | ||||
| # Header files or dirs to ignore when scanning. Use base file/dir names | ||||
| # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code | ||||
| IGNORE_HFILES=st-private.h st-theme-node-private.h | ||||
|  | ||||
| # Images to copy into HTML directory. | ||||
| # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png | ||||
| HTML_IMAGES= | ||||
|  | ||||
| # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). | ||||
| # e.g. content_files=running.sgml building.sgml changes-2.0.sgml | ||||
| content_files= | ||||
|  | ||||
| # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded | ||||
| # These files must be listed here *and* in content_files | ||||
| # e.g. expand_content_files=running.sgml | ||||
| expand_content_files= | ||||
|  | ||||
| # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. | ||||
| # Only needed if you are using gtkdoc-scangobj to dynamically query widget | ||||
| # signals and properties. | ||||
| # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) | ||||
| # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) | ||||
| GTKDOC_CFLAGS= | ||||
| GTKDOC_LIBS=$(top_builddir)/src/libst-1.0.la | ||||
|  | ||||
| # This includes the standard gtk-doc make rules, copied by gtkdocize. | ||||
| include $(top_srcdir)/gtk-doc.make | ||||
|  | ||||
| # Other files to distribute | ||||
| # e.g. EXTRA_DIST += version.xml.in | ||||
| EXTRA_DIST += | ||||
|  | ||||
| # Files not to distribute | ||||
| # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types | ||||
| # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt | ||||
| DISTCLEANFILES = $(DOC_MODULE).types $(DOC_MODULE)-sections.txt | ||||
|  | ||||
| # Comment this out if you want 'make check' to test you doc status | ||||
| # and run some sanity checks | ||||
| if ENABLE_GTK_DOC | ||||
| TESTS_ENVIRONMENT = cd $(srcdir) && \ | ||||
|   DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ | ||||
|   SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) | ||||
| #TESTS = $(GTKDOC_CHECK) | ||||
| endif | ||||
|  | ||||
| -include $(top_srcdir)/git.mk | ||||
| @@ -1,64 +0,0 @@ | ||||
| <?xml version="1.0"?> | ||||
| <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" | ||||
|                "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" | ||||
| [ | ||||
|   <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'"> | ||||
| ]> | ||||
| <book id="index"> | ||||
|   <bookinfo> | ||||
|     <title>St Reference Manual</title> | ||||
|     <releaseinfo> | ||||
|       for St @VERSION@. | ||||
|       <!--The latest version of this documentation can be found on-line at | ||||
|       <ulink role="online-location" url="http://[SERVER]/st/index.html">http://[SERVER]/st/</ulink>.--> | ||||
|     </releaseinfo> | ||||
|   </bookinfo> | ||||
|  | ||||
|   <part> | ||||
|     <title>API reference</title> | ||||
|     <chapter id="base"> | ||||
|       <title>Abstract classes and Interfaces</title> | ||||
|       <xi:include href="xml/st-widget.xml"/> | ||||
|       <xi:include href="xml/st-widget-accessible.xml"/> | ||||
|       <xi:include href="xml/st-scrollable.xml"/> | ||||
|     </chapter> | ||||
|     <chapter id="widgets"> | ||||
|       <title>Widgets</title> | ||||
|       <xi:include href="xml/st-button.xml"/> | ||||
|       <xi:include href="xml/st-drawing-area.xml"/> | ||||
|       <xi:include href="xml/st-entry.xml"/> | ||||
|       <xi:include href="xml/st-icon.xml"/> | ||||
|       <xi:include href="xml/st-label.xml"/> | ||||
|     </chapter> | ||||
|     <chapter id="containers"> | ||||
|       <title>Containers</title> | ||||
|       <xi:include href="xml/st-bin.xml"/> | ||||
|       <xi:include href="xml/st-box-layout.xml"/> | ||||
|       <xi:include href="xml/st-scroll-view.xml"/> | ||||
|       <xi:include href="xml/st-table.xml"/> | ||||
|     </chapter> | ||||
|  | ||||
|     <chapter id="styling"> | ||||
|       <title>Styling</title> | ||||
|       <xi:include href="xml/st-theme.xml"/> | ||||
|       <xi:include href="xml/st-theme-context.xml"/> | ||||
|       <xi:include href="xml/st-theme-node.xml"/> | ||||
|       <xi:include href="xml/st-theme-node-transition.xml"/> | ||||
|       <xi:include href="xml/st-texture-cache.xml"/> | ||||
|     </chapter> | ||||
|   </part> | ||||
|   <chapter id="object-tree"> | ||||
|     <title>Object Hierarchy</title> | ||||
|      <xi:include href="xml/tree_index.sgml"/> | ||||
|   </chapter> | ||||
|   <index id="api-index-full"> | ||||
|     <title>API Index</title> | ||||
|     <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include> | ||||
|   </index> | ||||
|   <index id="deprecated-api-index" role="deprecated"> | ||||
|     <title>Index of deprecated API</title> | ||||
|     <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include> | ||||
|   </index> | ||||
|  | ||||
|   <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include> | ||||
| </book> | ||||
| @@ -6,22 +6,6 @@ | ||||
|  | ||||
|   <name xml:lang="en">GNOME Shell</name> | ||||
|   <shortdesc xml:lang="en">Next generation GNOME desktop shell</shortdesc> | ||||
|   <description>GNOME Shell provides core user interface functions for the GNOME 3 | ||||
| desktop, like switching to windows and launching applications. | ||||
| GNOME Shell takes advantage of the capabilities of modern graphics | ||||
| hardware and introduces innovative user interface concepts to | ||||
| provide a visually attractive and easy to use experience. | ||||
|  | ||||
| Tarball releases are provided largely for distributions to build | ||||
| packages. If you are interested in building GNOME Shell from source, | ||||
| we would recommend building from version control using the build | ||||
| script described at: | ||||
|  | ||||
|  http://live.gnome.org/GnomeShell | ||||
|  | ||||
| Not only will that give you the very latest version of this rapidly | ||||
| changing project, it will be much easier than get GNOME Shell and | ||||
| its dependencies to build from tarballs.</description> | ||||
|   <!-- | ||||
|   <homepage rdf:resource="http://live.gnome.org/GnomeShell" /> | ||||
|   --> | ||||
| @@ -66,11 +50,4 @@ its dependencies to build from tarballs.</description> | ||||
|       <gnome:userid>marinaz</gnome:userid> | ||||
|     </foaf:Person> | ||||
|   </maintainer> | ||||
|   <maintainer> | ||||
|     <foaf:Person> | ||||
|       <foaf:name>Florian Müllner</foaf:name> | ||||
|       <foaf:mbox rdf:resource="mailto:fmuellner@gnome.org" /> | ||||
|       <gnome:userid>fmuellner</gnome:userid> | ||||
|     </foaf:Person> | ||||
|   </maintainer> | ||||
| </Project> | ||||
|   | ||||
| @@ -1,63 +1,31 @@ | ||||
|  | ||||
| EXTRA_DIST = misc/config.js.in | ||||
| CLEANFILES = misc/config.js | ||||
|  | ||||
| misc/config.js: misc/config.js.in Makefile | ||||
| 	[ -d $(@D) ] || $(mkdir_p) $(@D) ; \ | ||||
| 	sed -e "s|[@]PACKAGE_NAME@|$(PACKAGE_NAME)|g" \ | ||||
| 	    -e "s|[@]PACKAGE_VERSION@|$(PACKAGE_VERSION)|g" \ | ||||
| 	    -e "s|[@]GJS_VERSION@|$(GJS_VERSION)|g" \ | ||||
| 	    -e "s|[@]HAVE_BLUETOOTH@|$(HAVE_BLUETOOTH)|g" \ | ||||
| 	    -e "s|[@]SHELL_SYSTEM_CA_FILE@|$(SHELL_SYSTEM_CA_FILE)|g" \ | ||||
| 	    -e "s|[@]GETTEXT_PACKAGE@|$(GETTEXT_PACKAGE)|g" \ | ||||
| 	    -e "s|[@]datadir@|$(datadir)|g" \ | ||||
| 	    -e "s|[@]libexecdir@|$(libexecdir)|g" \ | ||||
| 	    -e "s|[@]sysconfdir@|$(sysconfdir)|g" \ | ||||
|                $< > $@ | ||||
|  | ||||
| jsdir = $(pkgdatadir)/js | ||||
|  | ||||
| nobase_dist_js_DATA = 	\ | ||||
| 	gdm/batch.js		\ | ||||
| 	gdm/consoleKit.js	\ | ||||
| 	gdm/fingerprint.js	\ | ||||
| 	gdm/loginDialog.js	\ | ||||
| 	gdm/powerMenu.js	\ | ||||
| 	gdm/systemd.js	 	\ | ||||
| 	extensionPrefs/main.js	\ | ||||
| 	misc/config.js		\ | ||||
| 	misc/extensionUtils.js	\ | ||||
| 	misc/docInfo.js		\ | ||||
| 	misc/fileUtils.js	\ | ||||
| 	misc/format.js		\ | ||||
| 	misc/gnomeSession.js	\ | ||||
| 	misc/history.js		\ | ||||
| 	misc/jsParse.js		\ | ||||
| 	misc/modemManager.js	\ | ||||
| 	misc/params.js		\ | ||||
| 	misc/screenSaver.js     \ | ||||
| 	misc/telepathy.js	\ | ||||
| 	misc/util.js		\ | ||||
| 	perf/core.js		\ | ||||
| 	ui/altTab.js		\ | ||||
| 	ui/appDisplay.js	\ | ||||
| 	ui/appFavorites.js	\ | ||||
| 	ui/automountManager.js  \ | ||||
| 	ui/autorunManager.js    \ | ||||
| 	ui/boxpointer.js	\ | ||||
| 	ui/calendar.js		\ | ||||
| 	ui/checkBox.js		\ | ||||
| 	ui/contactDisplay.js \ | ||||
| 	ui/chrome.js		\ | ||||
| 	ui/ctrlAltTab.js	\ | ||||
| 	ui/dash.js		\ | ||||
| 	ui/dateMenu.js		\ | ||||
| 	ui/dnd.js		\ | ||||
| 	ui/docDisplay.js	\ | ||||
| 	ui/endSessionDialog.js	\ | ||||
| 	ui/environment.js	\ | ||||
| 	ui/extensionSystem.js	\ | ||||
| 	ui/flashspot.js		\ | ||||
| 	ui/iconGrid.js		\ | ||||
| 	ui/keyboard.js		\ | ||||
| 	ui/keyringPrompt.js	\ | ||||
| 	ui/layout.js		\ | ||||
| 	ui/lightbox.js		\ | ||||
| 	ui/link.js		\ | ||||
| 	ui/lookingGlass.js	\ | ||||
| @@ -66,34 +34,27 @@ nobase_dist_js_DATA = 	\ | ||||
| 	ui/main.js		\ | ||||
| 	ui/messageTray.js	\ | ||||
| 	ui/modalDialog.js	\ | ||||
| 	ui/networkAgent.js	\ | ||||
| 	ui/shellEntry.js	\ | ||||
| 	ui/shellMountOperation.js \ | ||||
| 	ui/notificationDaemon.js \ | ||||
| 	ui/overview.js		\ | ||||
| 	ui/panel.js		\ | ||||
| 	ui/panelMenu.js		\ | ||||
| 	ui/placeDisplay.js	\ | ||||
| 	ui/polkitAuthenticationAgent.js \ | ||||
| 	ui/popupMenu.js		\ | ||||
| 	ui/remoteSearch.js	\ | ||||
| 	ui/runDialog.js		\ | ||||
| 	ui/scripting.js		\ | ||||
| 	ui/search.js		\ | ||||
| 	ui/searchDisplay.js	\ | ||||
| 	ui/shellDBus.js		\ | ||||
| 	ui/statusIconDispatcher.js	\ | ||||
| 	ui/statusMenu.js	\ | ||||
| 	ui/status/accessibility.js	\ | ||||
| 	ui/status/keyboard.js	\ | ||||
| 	ui/status/network.js	\ | ||||
| 	ui/status/power.js	\ | ||||
| 	ui/status/volume.js	\ | ||||
| 	ui/status/bluetooth.js	\ | ||||
| 	ui/telepathyClient.js	\ | ||||
| 	ui/tweener.js		\ | ||||
| 	ui/userMenu.js		\ | ||||
| 	ui/viewSelector.js	\ | ||||
| 	ui/wanda.js		\ | ||||
| 	ui/windowAttentionHandler.js	\ | ||||
| 	ui/windowManager.js	\ | ||||
| 	ui/workspace.js		\ | ||||
|   | ||||
| @@ -1,278 +0,0 @@ | ||||
|  | ||||
| const Lang = imports.lang; | ||||
| const Gettext = imports.gettext; | ||||
| const GLib = imports.gi.GLib; | ||||
| const GObject = imports.gi.GObject; | ||||
| const Gio = imports.gi.Gio; | ||||
| const Gtk = imports.gi.Gtk; | ||||
| const Pango = imports.gi.Pango; | ||||
|  | ||||
| const _ = Gettext.gettext; | ||||
|  | ||||
| const Config = imports.misc.config; | ||||
| const Format = imports.misc.format; | ||||
| const ExtensionUtils = imports.misc.extensionUtils; | ||||
|  | ||||
|  | ||||
| const GnomeShellIface = <interface name="org.gnome.Shell"> | ||||
| <signal name="ExtensionStatusChanged"> | ||||
|     <arg type="s" name="uuid"/> | ||||
|     <arg type="i" name="state"/> | ||||
|     <arg type="s" name="error"/> | ||||
| </signal> | ||||
| </interface>; | ||||
|  | ||||
| const GnomeShellProxy = Gio.DBusProxy.makeProxyWrapper(GnomeShellIface); | ||||
|  | ||||
| function stripPrefix(string, prefix) { | ||||
|     if (string.slice(0, prefix.length) == prefix) | ||||
|         return string.slice(prefix.length); | ||||
|     return string; | ||||
| } | ||||
|  | ||||
| const Application = new Lang.Class({ | ||||
|     Name: 'Application', | ||||
|     _init: function() { | ||||
|         GLib.set_prgname('gnome-shell-extension-prefs'); | ||||
|         this.application = new Gtk.Application({ | ||||
|             application_id: 'org.gnome.shell.ExtensionPrefs', | ||||
|             flags: Gio.ApplicationFlags.HANDLES_COMMAND_LINE | ||||
|         }); | ||||
|  | ||||
|         this.application.connect('activate', Lang.bind(this, this._onActivate)); | ||||
|         this.application.connect('command-line', Lang.bind(this, this._onCommandLine)); | ||||
|         this.application.connect('startup', Lang.bind(this, this._onStartup)); | ||||
|  | ||||
|         this._extensionPrefsModules = {}; | ||||
|  | ||||
|         this._extensionIters = {}; | ||||
|     }, | ||||
|  | ||||
|     _buildModel: function() { | ||||
|         this._model = new Gtk.ListStore(); | ||||
|         this._model.set_column_types([GObject.TYPE_STRING, GObject.TYPE_STRING]); | ||||
|     }, | ||||
|  | ||||
|     _extensionAvailable: function(uuid) { | ||||
|         let extension = ExtensionUtils.extensions[uuid]; | ||||
|  | ||||
|         if (!extension) | ||||
|             return false; | ||||
|  | ||||
|         if (ExtensionUtils.isOutOfDate(extension)) | ||||
|             return false; | ||||
|  | ||||
|         if (!extension.dir.get_child('prefs.js').query_exists(null)) | ||||
|             return false; | ||||
|  | ||||
|         return true; | ||||
|     }, | ||||
|  | ||||
|     _setExtensionInsensitive: function(layout, cell, model, iter, data) { | ||||
|         let uuid = model.get_value(iter, 0); | ||||
|         cell.set_sensitive(this._extensionAvailable(uuid)); | ||||
|     }, | ||||
|  | ||||
|     _getExtensionPrefsModule: function(extension) { | ||||
|         let uuid = extension.metadata.uuid; | ||||
|  | ||||
|         if (this._extensionPrefsModules.hasOwnProperty(uuid)) | ||||
|             return this._extensionPrefsModules[uuid]; | ||||
|  | ||||
|         ExtensionUtils.installImporter(extension); | ||||
|  | ||||
|         let prefsModule = extension.imports.prefs; | ||||
|         prefsModule.init(extension.metadata); | ||||
|  | ||||
|         this._extensionPrefsModules[uuid] = prefsModule; | ||||
|         return prefsModule; | ||||
|     }, | ||||
|  | ||||
|     _selectExtension: function(uuid) { | ||||
|         if (!this._extensionAvailable(uuid)) | ||||
|             return; | ||||
|  | ||||
|         let extension = ExtensionUtils.extensions[uuid]; | ||||
|         let widget; | ||||
|  | ||||
|         try { | ||||
|             let prefsModule = this._getExtensionPrefsModule(extension); | ||||
|             widget = prefsModule.buildPrefsWidget(); | ||||
|         } catch (e) { | ||||
|             widget = this._buildErrorUI(extension, e); | ||||
|         } | ||||
|  | ||||
|         // Destroy the current prefs widget, if it exists | ||||
|         if (this._extensionPrefsBin.get_child()) | ||||
|             this._extensionPrefsBin.get_child().destroy(); | ||||
|  | ||||
|         this._extensionPrefsBin.add(widget); | ||||
|         this._extensionSelector.set_active_iter(this._extensionIters[uuid]); | ||||
|     }, | ||||
|  | ||||
|     _extensionSelected: function() { | ||||
|         let [success, iter] = this._extensionSelector.get_active_iter(); | ||||
|         if (!success) | ||||
|             return; | ||||
|  | ||||
|         let uuid = this._model.get_value(iter, 0); | ||||
|         this._selectExtension(uuid); | ||||
|     }, | ||||
|  | ||||
|     _buildErrorUI: function(extension, exc) { | ||||
|         let box = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL }); | ||||
|         let label = new Gtk.Label({ | ||||
|             label: _("There was an error loading the preferences dialog for %s:").format(extension.metadata.name) | ||||
|         }); | ||||
|         box.add(label); | ||||
|  | ||||
|         let errortext = ''; | ||||
|         errortext += exc; | ||||
|         errortext += '\n\n'; | ||||
|         errortext += 'Stack trace:\n'; | ||||
|  | ||||
|         // Indent stack trace. | ||||
|         errortext += exc.stack.split('\n').map(function(line) { | ||||
|             return '  ' + line; | ||||
|         }).join('\n'); | ||||
|  | ||||
|         let scroll = new Gtk.ScrolledWindow({ vexpand: true }); | ||||
|         let buffer = new Gtk.TextBuffer({ text: errortext }); | ||||
|         let textview = new Gtk.TextView({ buffer: buffer }); | ||||
|         textview.override_font(Pango.font_description_from_string('monospace')); | ||||
|         scroll.add(textview); | ||||
|         box.add(scroll); | ||||
|  | ||||
|         box.show_all(); | ||||
|         return box; | ||||
|     }, | ||||
|  | ||||
|     _buildUI: function(app) { | ||||
|         this._window = new Gtk.ApplicationWindow({ application: app, | ||||
|                                                    window_position: Gtk.WindowPosition.CENTER, | ||||
|                                                    title: _("GNOME Shell Extension Preferences") }); | ||||
|  | ||||
|         this._window.set_size_request(600, 400); | ||||
|  | ||||
|         let vbox = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL }); | ||||
|         this._window.add(vbox); | ||||
|  | ||||
|         let toolbar = new Gtk.Toolbar(); | ||||
|         toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR); | ||||
|         vbox.add(toolbar); | ||||
|         let toolitem; | ||||
|  | ||||
|         let label = new Gtk.Label({ label: _("<b>Extension</b>"), | ||||
|                                     use_markup: true }); | ||||
|         toolitem = new Gtk.ToolItem({ child: label }); | ||||
|         toolbar.add(toolitem); | ||||
|  | ||||
|         this._extensionSelector = new Gtk.ComboBox({ model: this._model, | ||||
|                                                      margin_left: 8, | ||||
|                                                      hexpand: true }); | ||||
|         this._extensionSelector.get_style_context().add_class(Gtk.STYLE_CLASS_RAISED); | ||||
|  | ||||
|         let renderer = new Gtk.CellRendererText(); | ||||
|         this._extensionSelector.pack_start(renderer, true); | ||||
|         this._extensionSelector.add_attribute(renderer, 'text', 1); | ||||
|         this._extensionSelector.set_cell_data_func(renderer, Lang.bind(this, this._setExtensionInsensitive), null); | ||||
|         this._extensionSelector.connect('changed', Lang.bind(this, this._extensionSelected)); | ||||
|  | ||||
|         toolitem = new Gtk.ToolItem({ child: this._extensionSelector }); | ||||
|         toolitem.set_expand(true); | ||||
|         toolbar.add(toolitem); | ||||
|  | ||||
|         this._extensionPrefsBin = new Gtk.Frame(); | ||||
|         vbox.add(this._extensionPrefsBin); | ||||
|  | ||||
|         let label = new Gtk.Label({ | ||||
|             label: _("Select an extension to configure using the combobox above."), | ||||
|             vexpand: true | ||||
|         }); | ||||
|  | ||||
|         this._extensionPrefsBin.add(label); | ||||
|  | ||||
|         this._shellProxy = new GnomeShellProxy(Gio.DBus.session, 'org.gnome.Shell', '/org/gnome/Shell'); | ||||
|         this._shellProxy.connectSignal('ExtensionStatusChanged', Lang.bind(this, function(proxy, senderName, [uuid, state, error]) { | ||||
|             if (ExtensionUtils.extensions[uuid] !== undefined) | ||||
|                 this._scanExtensions(); | ||||
|         })); | ||||
|  | ||||
|         this._window.show_all(); | ||||
|     }, | ||||
|  | ||||
|     _scanExtensions: function() { | ||||
|         ExtensionUtils.scanExtensions(Lang.bind(this, function(uuid, dir, type) { | ||||
|             if (ExtensionUtils.extensions[uuid] !== undefined) | ||||
|                 return; | ||||
|  | ||||
|             let extension; | ||||
|             try { | ||||
|                 extension = ExtensionUtils.createExtensionObject(uuid, dir, type); | ||||
|             } catch(e) { | ||||
|                 global.logError('' + e); | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|             let iter = this._model.append(); | ||||
|             this._model.set(iter, [0, 1], [uuid, extension.metadata.name]); | ||||
|             this._extensionIters[uuid] = iter; | ||||
|         })); | ||||
|     }, | ||||
|  | ||||
|     _onActivate: function() { | ||||
|         this._window.present(); | ||||
|     }, | ||||
|  | ||||
|     _onStartup: function(app) { | ||||
|         this._buildModel(); | ||||
|         this._buildUI(app); | ||||
|         this._scanExtensions(); | ||||
|     }, | ||||
|  | ||||
|     _onCommandLine: function(app, commandLine) { | ||||
|         app.activate(); | ||||
|         let args = commandLine.get_arguments(); | ||||
|         if (args.length) { | ||||
|             let uuid = args[0]; | ||||
|  | ||||
|             // Strip off "extension:///" prefix which fakes a URI, if it exists | ||||
|             uuid = stripPrefix(uuid, "extension:///"); | ||||
|  | ||||
|             if (!this._extensionAvailable(uuid)) | ||||
|                 return 1; | ||||
|  | ||||
|             this._selectExtension(uuid); | ||||
|         } | ||||
|         return 0; | ||||
|     } | ||||
| }); | ||||
|  | ||||
| function initEnvironment() { | ||||
|     // Monkey-patch in a "global" object that fakes some Shell utilities | ||||
|     // that ExtensionUtils depends on. | ||||
|     window.global = { | ||||
|         log: function() { | ||||
|             print([].join.call(arguments, ', ')); | ||||
|         }, | ||||
|  | ||||
|         logError: function(s) { | ||||
|             global.log('ERROR: ' + s); | ||||
|         }, | ||||
|  | ||||
|         userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell']) | ||||
|     }; | ||||
|  | ||||
|     String.prototype.format = Format.format; | ||||
| } | ||||
|  | ||||
| function main(argv) { | ||||
|     initEnvironment(); | ||||
|     ExtensionUtils.init(); | ||||
|  | ||||
|     Gettext.bindtextdomain(Config.GETTEXT_PACKAGE, Config.LOCALEDIR); | ||||
|     Gettext.textdomain(Config.GETTEXT_PACKAGE); | ||||
|  | ||||
|     let app = new Application(); | ||||
|     app.application.run(argv); | ||||
| } | ||||
							
								
								
									
										203
									
								
								js/gdm/batch.js
									
									
									
									
									
								
							
							
						
						| @@ -1,203 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* | ||||
|  * Copyright 2011 Red Hat, Inc | ||||
|  * | ||||
|  * This program is free software; you can redistribute it and/or modify | ||||
|  * it under the terms of the GNU General Public License as published by | ||||
|  * the Free Software Foundation; either version 2, or (at your option) | ||||
|  * any later version. | ||||
|  * | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program; if not, write to the Free Software | ||||
|  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||||
|  * 02111-1307, USA. | ||||
|  */ | ||||
|  | ||||
| const Lang = imports.lang; | ||||
| const Signals = imports.signals; | ||||
|  | ||||
| const Task = new Lang.Class({ | ||||
|     Name: 'Task', | ||||
|  | ||||
|     _init: function(scope, handler) { | ||||
|         if (scope) | ||||
|             this.scope = scope; | ||||
|         else | ||||
|             this.scope = this; | ||||
|  | ||||
|         this.handler = handler; | ||||
|     }, | ||||
|  | ||||
|     run: function() { | ||||
|         if (this.handler) | ||||
|             return this.handler.call(this.scope); | ||||
|  | ||||
|         return null; | ||||
|     }, | ||||
| }); | ||||
| Signals.addSignalMethods(Task.prototype); | ||||
|  | ||||
| const Hold = new Lang.Class({ | ||||
|     Name: 'Hold', | ||||
|     Extends: Task, | ||||
|  | ||||
|     _init: function() { | ||||
|         this.parent(this, function () { | ||||
|             return this; | ||||
|         }); | ||||
|  | ||||
|         this._acquisitions = 1; | ||||
|     }, | ||||
|  | ||||
|     acquire: function() { | ||||
|         if (this._acquisitions <= 0) | ||||
|             throw new Error("Cannot acquire hold after it's been released"); | ||||
|         this._acquisitions++; | ||||
|     }, | ||||
|  | ||||
|     acquireUntilAfter: function(hold) { | ||||
|         if (!hold.isAcquired()) | ||||
|             return; | ||||
|  | ||||
|         this.acquire(); | ||||
|         let signalId = hold.connect('release', Lang.bind(this, function() { | ||||
|                                         hold.disconnect(signalId); | ||||
|                                         this.release(); | ||||
|                                     })); | ||||
|     }, | ||||
|  | ||||
|     release: function() { | ||||
|         this._acquisitions--; | ||||
|  | ||||
|         if (this._acquisitions == 0) | ||||
|             this.emit('release'); | ||||
|     }, | ||||
|  | ||||
|     isAcquired: function() { | ||||
|         return this._acquisitions > 0; | ||||
|     } | ||||
| }); | ||||
| Signals.addSignalMethods(Hold.prototype); | ||||
|  | ||||
| const Batch = new Lang.Class({ | ||||
|     Name: 'Batch', | ||||
|     Extends: Task, | ||||
|  | ||||
|     _init: function(scope, tasks) { | ||||
|         this.parent(); | ||||
|  | ||||
|         this.tasks = []; | ||||
|  | ||||
|         for (let i = 0; i < tasks.length; i++) { | ||||
|             let task; | ||||
|  | ||||
|             if (tasks[i] instanceof Task) { | ||||
|                 task = tasks[i]; | ||||
|             } else if (typeof tasks[i] == 'function') { | ||||
|                 task = new Task(scope, tasks[i]); | ||||
|             } else { | ||||
|                 throw new Error('Batch tasks must be functions or Task, Hold or Batch objects'); | ||||
|             } | ||||
|  | ||||
|             this.tasks.push(task); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     process: function() { | ||||
|         throw new Error('Not implemented'); | ||||
|     }, | ||||
|  | ||||
|     runTask: function() { | ||||
|         if (!(this._currentTaskIndex in this.tasks)) { | ||||
|             return null; | ||||
|         } | ||||
|  | ||||
|         return this.tasks[this._currentTaskIndex].run(); | ||||
|     }, | ||||
|  | ||||
|     _finish: function() { | ||||
|         this.hold.release(); | ||||
|     }, | ||||
|  | ||||
|     nextTask: function() { | ||||
|         this._currentTaskIndex++; | ||||
|  | ||||
|         // if the entire batch of tasks is finished, release | ||||
|         // the hold and notify anyone waiting on the batch | ||||
|         if (this._currentTaskIndex >= this.tasks.length) { | ||||
|             this._finish(); | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         this.process(); | ||||
|     }, | ||||
|  | ||||
|     _start: function() { | ||||
|         // acquire a hold to get released when the entire | ||||
|         // batch of tasks is finished | ||||
|         this.hold = new Hold(); | ||||
|         this._currentTaskIndex = 0; | ||||
|         this.process(); | ||||
|     }, | ||||
|  | ||||
|     run: function() { | ||||
|         this._start(); | ||||
|  | ||||
|         // hold may be destroyed at this point | ||||
|         // if we're already done running | ||||
|         return this.hold; | ||||
|     }, | ||||
|  | ||||
|     cancel: function() { | ||||
|         this.tasks = this.tasks.splice(0, this._currentTaskIndex + 1); | ||||
|     } | ||||
| }); | ||||
| Signals.addSignalMethods(Batch.prototype); | ||||
|  | ||||
| const ConcurrentBatch = new Lang.Class({ | ||||
|     Name: 'ConcurrentBatch', | ||||
|     Extends: Batch, | ||||
|  | ||||
|     process: function() { | ||||
|        let hold = this.runTask(); | ||||
|  | ||||
|        if (hold) { | ||||
|            this.hold.acquireUntilAfter(hold); | ||||
|        } | ||||
|  | ||||
|        // Regardless of the state of the just run task, | ||||
|        // fire off the next one, so all the tasks can run | ||||
|        // concurrently. | ||||
|        this.nextTask(); | ||||
|     } | ||||
| }); | ||||
| Signals.addSignalMethods(ConcurrentBatch.prototype); | ||||
|  | ||||
| const ConsecutiveBatch = new Lang.Class({ | ||||
|     Name: 'ConsecutiveBatch', | ||||
|     Extends: Batch, | ||||
|  | ||||
|     process: function() { | ||||
|        let hold = this.runTask(); | ||||
|  | ||||
|        if (hold && hold.isAcquired()) { | ||||
|            // This task is inhibiting the batch. Wait on it | ||||
|            // before processing the next one. | ||||
|            let signalId = hold.connect('release', | ||||
|                                        Lang.bind(this, function() { | ||||
|                                            hold.disconnect(signalId); | ||||
|                                            this.nextTask(); | ||||
|                                        })); | ||||
|            return; | ||||
|        } else { | ||||
|            // This task finished, process the next one | ||||
|            this.nextTask(); | ||||
|        } | ||||
|     } | ||||
| }); | ||||
| Signals.addSignalMethods(ConsecutiveBatch.prototype); | ||||
| @@ -1,22 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const Gio = imports.gi.Gio; | ||||
|  | ||||
| const ConsoleKitManagerIface = <interface name='org.freedesktop.ConsoleKit.Manager'> | ||||
| <method name='CanRestart'> | ||||
|     <arg type='b' direction='out'/> | ||||
| </method> | ||||
| <method name='CanStop'> | ||||
|     <arg type='b' direction='out'/> | ||||
| </method> | ||||
| <method name='Restart' /> | ||||
| <method name='Stop' /> | ||||
| </interface>; | ||||
|  | ||||
| const ConsoleKitProxy = Gio.DBusProxy.makeProxyWrapper(ConsoleKitManagerIface); | ||||
|  | ||||
| function ConsoleKitManager() { | ||||
|     return new ConsoleKitProxy(Gio.DBus.system, | ||||
|                                'org.freedesktop.ConsoleKit', | ||||
|                                '/org/freedesktop/ConsoleKit/Manager'); | ||||
| }; | ||||
| @@ -1,27 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const Gio = imports.gi.Gio; | ||||
| const Lang = imports.lang; | ||||
| const Shell = imports.gi.Shell; | ||||
| const Signals = imports.signals; | ||||
|  | ||||
| const FprintManagerIface = <interface name='net.reactivated.Fprint.Manager'> | ||||
| <method name='GetDefaultDevice'> | ||||
|     <arg type='o' direction='out' /> | ||||
| </method> | ||||
| </interface>; | ||||
|  | ||||
| const FprintManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(FprintManagerIface); | ||||
|  | ||||
| function FprintManager() { | ||||
|     var self = new Gio.DBusProxy({ g_connection: Gio.DBus.system, | ||||
|                                    g_interface_name: FprintManagerInfo.name, | ||||
|                                    g_interface_info: FprintManagerInfo, | ||||
|                                    g_name: 'net.reactivated.Fprint', | ||||
|                                    g_object_path: '/net/reactivated/Fprint/Manager', | ||||
|                                    g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START | | ||||
|                                              Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) }); | ||||
|  | ||||
|     self.init(null); | ||||
|     return self; | ||||
| } | ||||
| @@ -1,195 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* | ||||
|  * Copyright 2011 Red Hat, Inc | ||||
|  * | ||||
|  * This program is free software; you can redistribute it and/or modify | ||||
|  * it under the terms of the GNU General Public License as published by | ||||
|  * the Free Software Foundation; either version 2, or (at your option) | ||||
|  * any later version. | ||||
|  * | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program; if not, write to the Free Software | ||||
|  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||||
|  * 02111-1307, USA. | ||||
|  */ | ||||
|  | ||||
| const Lang = imports.lang; | ||||
| const UPowerGlib = imports.gi.UPowerGlib; | ||||
|  | ||||
| const ConsoleKit = imports.gdm.consoleKit; | ||||
| const Systemd = imports.gdm.systemd; | ||||
|  | ||||
| const PanelMenu = imports.ui.panelMenu; | ||||
| const PopupMenu = imports.ui.popupMenu; | ||||
|  | ||||
| const PowerMenuButton = new Lang.Class({ | ||||
|     Name: 'PowerMenuButton', | ||||
|     Extends: PanelMenu.SystemStatusButton, | ||||
|  | ||||
|     _init: function() { | ||||
|         this.parent('system-shutdown', null); | ||||
|         this._upClient = new UPowerGlib.Client(); | ||||
|  | ||||
|         if (Systemd.haveSystemd()) | ||||
|             this._systemdLoginManager = new Systemd.SystemdLoginManager(); | ||||
|         else | ||||
|             this._consoleKitManager = new ConsoleKit.ConsoleKitManager(); | ||||
|  | ||||
|         this._createSubMenu(); | ||||
|  | ||||
|         this._upClient.connect('notify::can-suspend', | ||||
|                                Lang.bind(this, this._updateHaveSuspend)); | ||||
|         this._updateHaveSuspend(); | ||||
|  | ||||
|         // ConsoleKit doesn't send notifications when shutdown/reboot | ||||
|         // are disabled, so we update the menu item each time the menu opens | ||||
|         this.menu.connect('open-state-changed', Lang.bind(this, | ||||
|             function(menu, open) { | ||||
|                 if (open) { | ||||
|                     this._updateHaveShutdown(); | ||||
|                     this._updateHaveRestart(); | ||||
|                 } | ||||
|             })); | ||||
|         this._updateHaveShutdown(); | ||||
|         this._updateHaveRestart(); | ||||
|     }, | ||||
|  | ||||
|     _updateVisibility: function() { | ||||
|         if (!this._haveSuspend && !this._haveShutdown && !this._haveRestart) | ||||
|             this.actor.hide(); | ||||
|         else | ||||
|             this.actor.show(); | ||||
|     }, | ||||
|  | ||||
|     _updateHaveShutdown: function() { | ||||
|  | ||||
|         if (Systemd.haveSystemd()) { | ||||
|             this._systemdLoginManager.CanPowerOffRemote(Lang.bind(this, | ||||
|                 function(result, error) { | ||||
|                     if (!error) | ||||
|                         this._haveShutdown = result != 'no'; | ||||
|                     else | ||||
|                         this._haveShutdown = false; | ||||
|  | ||||
|                     if (this._haveShutdown) | ||||
|                         this._powerOffItem.actor.show(); | ||||
|                     else | ||||
|                         this._powerOffItem.actor.hide(); | ||||
|  | ||||
|                     this._updateVisibility(); | ||||
|                 })); | ||||
|         } else { | ||||
|             this._consoleKitManager.CanStopRemote(Lang.bind(this, | ||||
|                 function(result, error) { | ||||
|                     if (!error) | ||||
|                         this._haveShutdown = result; | ||||
|                     else | ||||
|                         this._haveShutdown = false; | ||||
|  | ||||
|                     if (this._haveShutdown) { | ||||
|                         this._powerOffItem.actor.show(); | ||||
|                     } else { | ||||
|                         this._powerOffItem.actor.hide(); | ||||
|                     } | ||||
|  | ||||
|                     this._updateVisibility(); | ||||
|                 })); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _updateHaveRestart: function() { | ||||
|  | ||||
|         if (Systemd.haveSystemd()) { | ||||
|             this._systemdLoginManager.CanRebootRemote(Lang.bind(this, | ||||
|                 function(result, error) { | ||||
|                     if (!error) | ||||
|                         this._haveRestart = result != 'no'; | ||||
|                     else | ||||
|                         this._haveRestart = false; | ||||
|  | ||||
|                     if (this._haveRestart) | ||||
|                         this._restartItem.actor.show(); | ||||
|                     else | ||||
|                         this._restartItem.actor.hide(); | ||||
|  | ||||
|                     this._updateVisibility(); | ||||
|                 })); | ||||
|         } else { | ||||
|             this._consoleKitManager.CanRestartRemote(Lang.bind(this, | ||||
|                 function(result, error) { | ||||
|                     if (!error) | ||||
|                         this._haveRestart = result; | ||||
|                     else | ||||
|                         this._haveRestart = false; | ||||
|  | ||||
|                     if (this._haveRestart) { | ||||
|                         this._restartItem.actor.show(); | ||||
|                     } else { | ||||
|                         this._restartItem.actor.hide(); | ||||
|                     } | ||||
|  | ||||
|                     this._updateVisibility(); | ||||
|                 })); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _updateHaveSuspend: function() { | ||||
|         this._haveSuspend = this._upClient.get_can_suspend(); | ||||
|  | ||||
|         if (this._haveSuspend) | ||||
|             this._suspendItem.actor.show(); | ||||
|         else | ||||
|             this._suspendItem.actor.hide(); | ||||
|  | ||||
|         this._updateVisibility(); | ||||
|     }, | ||||
|  | ||||
|     _createSubMenu: function() { | ||||
|         let item; | ||||
|  | ||||
|         item = new PopupMenu.PopupMenuItem(_("Suspend")); | ||||
|         item.connect('activate', Lang.bind(this, this._onActivateSuspend)); | ||||
|         this.menu.addMenuItem(item); | ||||
|         this._suspendItem = item; | ||||
|  | ||||
|         item = new PopupMenu.PopupMenuItem(_("Restart")); | ||||
|         item.connect('activate', Lang.bind(this, this._onActivateRestart)); | ||||
|         this.menu.addMenuItem(item); | ||||
|         this._restartItem = item; | ||||
|  | ||||
|         item = new PopupMenu.PopupMenuItem(_("Power Off")); | ||||
|         item.connect('activate', Lang.bind(this, this._onActivatePowerOff)); | ||||
|         this.menu.addMenuItem(item); | ||||
|         this._powerOffItem = item; | ||||
|     }, | ||||
|  | ||||
|     _onActivateSuspend: function() { | ||||
|         if (this._haveSuspend) | ||||
|             this._upClient.suspend_sync(null); | ||||
|     }, | ||||
|  | ||||
|     _onActivateRestart: function() { | ||||
|         if (!this._haveRestart) | ||||
|             return; | ||||
|  | ||||
|         if (Systemd.haveSystemd()) | ||||
|             this._systemdLoginManager.RebootRemote(true); | ||||
|         else | ||||
|             this._consoleKitManager.RestartRemote(); | ||||
|     }, | ||||
|  | ||||
|     _onActivatePowerOff: function() { | ||||
|         if (!this._haveShutdown) | ||||
|             return; | ||||
|  | ||||
|         if (Systemd.haveSystemd()) | ||||
|             this._systemdLoginManager.PowerOffRemote(true); | ||||
|         else | ||||
|             this._consoleKitManager.StopRemote(); | ||||
|     } | ||||
| }); | ||||
| @@ -1,31 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const GLib = imports.gi.GLib; | ||||
| const Gio = imports.gi.Gio; | ||||
|  | ||||
| const SystemdLoginManagerIface = <interface name='org.freedesktop.login1.Manager'> | ||||
| <method name='PowerOff'> | ||||
|     <arg type='b' direction='in'/> | ||||
| </method> | ||||
| <method name='Reboot'> | ||||
|     <arg type='b' direction='in'/> | ||||
| </method> | ||||
| <method name='CanPowerOff'> | ||||
|     <arg type='s' direction='out'/> | ||||
| </method> | ||||
| <method name='CanReboot'> | ||||
|     <arg type='s' direction='out'/> | ||||
| </method> | ||||
| </interface>; | ||||
|  | ||||
| const SystemdLoginManagerProxy = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface); | ||||
|  | ||||
| function SystemdLoginManager() { | ||||
|     return new SystemdLoginManagerProxy(Gio.DBus.system, | ||||
|                                         'org.freedesktop.login1', | ||||
|                                         '/org/freedesktop/login1'); | ||||
| }; | ||||
|  | ||||
| function haveSystemd() { | ||||
|     return GLib.access("/sys/fs/cgroup/systemd", 0) >= 0; | ||||
| } | ||||
| @@ -1,5 +1,4 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| /* mode: js2; indent-tabs-mode: nil; tab-size: 4 */ | ||||
| /* The name of this package (not localized) */ | ||||
| const PACKAGE_NAME = '@PACKAGE_NAME@'; | ||||
| /* The version of this package */ | ||||
| @@ -8,12 +7,4 @@ const PACKAGE_VERSION = '@PACKAGE_VERSION@'; | ||||
| const GJS_VERSION = '@GJS_VERSION@'; | ||||
| /* 1 if gnome-bluetooth is available, 0 otherwise */ | ||||
| const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@; | ||||
| /* The system TLS CA list */ | ||||
| const SHELL_SYSTEM_CA_FILE = '@SHELL_SYSTEM_CA_FILE@'; | ||||
| /* gettext package */ | ||||
| const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@'; | ||||
| /* locale dir */ | ||||
| const LOCALEDIR = '@datadir@/locale'; | ||||
| /* other standard directories */ | ||||
| const LIBEXECDIR = '@libexecdir@'; | ||||
| const SYSCONFDIR = '@sysconfdir@'; | ||||
|  | ||||
|   | ||||
							
								
								
									
										140
									
								
								js/misc/docInfo.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,140 @@ | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const St = imports.gi.St; | ||||
| const Shell = imports.gi.Shell; | ||||
| const Lang = imports.lang; | ||||
| const Signals = imports.signals; | ||||
| const Search = imports.ui.search; | ||||
|  | ||||
| const THUMBNAIL_ICON_MARGIN = 2; | ||||
|  | ||||
| function DocInfo(recentInfo) { | ||||
|     this._init(recentInfo); | ||||
| } | ||||
|  | ||||
| DocInfo.prototype = { | ||||
|     _init : function(recentInfo) { | ||||
|         this.recentInfo = recentInfo; | ||||
|         // We actually used get_modified() instead of get_visited() | ||||
|         // here, as GtkRecentInfo doesn't updated get_visited() | ||||
|         // correctly. See http://bugzilla.gnome.org/show_bug.cgi?id=567094 | ||||
|         this.timestamp = recentInfo.get_modified(); | ||||
|         this.name = recentInfo.get_display_name(); | ||||
|         this._lowerName = this.name.toLowerCase(); | ||||
|         this.uri = recentInfo.get_uri(); | ||||
|         this.mimeType = recentInfo.get_mime_type(); | ||||
|     }, | ||||
|  | ||||
|     createIcon : function(size) { | ||||
|         return St.TextureCache.get_default().load_recent_thumbnail(size, this.recentInfo); | ||||
|     }, | ||||
|  | ||||
|     launch : function(workspaceIndex) { | ||||
|         Shell.DocSystem.get_default().open(this.recentInfo, workspaceIndex); | ||||
|     }, | ||||
|  | ||||
|     matchTerms: function(terms) { | ||||
|         let mtype = Search.MatchType.NONE; | ||||
|         for (let i = 0; i < terms.length; i++) { | ||||
|             let term = terms[i]; | ||||
|             let idx = this._lowerName.indexOf(term); | ||||
|             if (idx == 0) { | ||||
|                 mtype = Search.MatchType.PREFIX; | ||||
|             } else if (idx > 0) { | ||||
|                 if (mtype == Search.MatchType.NONE) | ||||
|                     mtype = Search.MatchType.SUBSTRING; | ||||
|             } else { | ||||
|                 return Search.MatchType.NONE; | ||||
|             } | ||||
|         } | ||||
|         return mtype; | ||||
|     } | ||||
| }; | ||||
|  | ||||
| var docManagerInstance = null; | ||||
|  | ||||
| function getDocManager() { | ||||
|     if (docManagerInstance == null) | ||||
|         docManagerInstance = new DocManager(); | ||||
|     return docManagerInstance; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * DocManager wraps the DocSystem, primarily to expose DocInfo objects. | ||||
|  */ | ||||
| function DocManager() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| DocManager.prototype = { | ||||
|     _init: function() { | ||||
|         this._docSystem = Shell.DocSystem.get_default(); | ||||
|         this._infosByTimestamp = []; | ||||
|         this._infosByUri = {}; | ||||
|         this._docSystem.connect('changed', Lang.bind(this, this._reload)); | ||||
|         this._reload(); | ||||
|     }, | ||||
|  | ||||
|     _reload: function() { | ||||
|         let docs = this._docSystem.get_all(); | ||||
|         this._infosByTimestamp = []; | ||||
|         this._infosByUri = {}; | ||||
|         for (let i = 0; i < docs.length; i++) { | ||||
|             let recentInfo = docs[i]; | ||||
|  | ||||
|             let docInfo = new DocInfo(recentInfo); | ||||
|             this._infosByTimestamp.push(docInfo); | ||||
|             this._infosByUri[docInfo.uri] = docInfo; | ||||
|         } | ||||
|         this.emit('changed'); | ||||
|     }, | ||||
|  | ||||
|     getTimestampOrderedInfos: function() { | ||||
|         return this._infosByTimestamp; | ||||
|     }, | ||||
|  | ||||
|     getInfosByUri: function() { | ||||
|         return this._infosByUri; | ||||
|     }, | ||||
|  | ||||
|     lookupByUri: function(uri) { | ||||
|         return this._infosByUri[uri]; | ||||
|     }, | ||||
|  | ||||
|     queueExistenceCheck: function(count) { | ||||
|         return this._docSystem.queue_existence_check(count); | ||||
|     }, | ||||
|  | ||||
|     _searchDocs: function(items, terms) { | ||||
|         let multiplePrefixMatches = []; | ||||
|         let prefixMatches = []; | ||||
|         let multipleSubtringMatches = []; | ||||
|         let substringMatches = []; | ||||
|         for (let i = 0; i < items.length; i++) { | ||||
|             let item = items[i]; | ||||
|             let mtype = item.matchTerms(terms); | ||||
|             if (mtype == Search.MatchType.MULTIPLE_PREFIX) | ||||
|                 multiplePrefixMatches.push(item.uri); | ||||
|             else if (mtype == Search.MatchType.PREFIX) | ||||
|                 prefixMatches.push(item.uri); | ||||
|             else if (mtype == Search.MatchType.MULTIPLE_SUBSTRING) | ||||
|                 multipleSubtringMatches.push(item.uri); | ||||
|             else if (mtype == Search.MatchType.SUBSTRING) | ||||
|                 substringMatches.push(item.uri); | ||||
|          } | ||||
|         return multiplePrefixMatches.concat(prefixMatches.concat(multipleSubtringMatches.concat(substringMatches))); | ||||
|     }, | ||||
|  | ||||
|     initialSearch: function(terms) { | ||||
|         return this._searchDocs(this._infosByTimestamp, terms); | ||||
|     }, | ||||
|  | ||||
|     subsearch: function(previousResults, terms) { | ||||
|         return this._searchDocs(previousResults.map(Lang.bind(this, | ||||
|             function(url) { | ||||
|                 return this._infosByUri[url]; | ||||
|             })), terms); | ||||
|     } | ||||
| }; | ||||
|  | ||||
| Signals.addSignalMethods(DocManager.prototype); | ||||
| @@ -1,194 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| // Common utils for the extension system and the extension | ||||
| // preferences tool | ||||
|  | ||||
| const GLib = imports.gi.GLib; | ||||
| const Gio = imports.gi.Gio; | ||||
| const ShellJS = imports.gi.ShellJS; | ||||
|  | ||||
| const Config = imports.misc.config; | ||||
|  | ||||
| const ExtensionType = { | ||||
|     SYSTEM: 1, | ||||
|     PER_USER: 2 | ||||
| }; | ||||
|  | ||||
| // GFile for user extensions | ||||
| var userExtensionsDir = null; | ||||
|  | ||||
| // Maps uuid -> metadata object | ||||
| const extensions = {}; | ||||
|  | ||||
| function getCurrentExtension() { | ||||
|     let stack = (new Error()).stack; | ||||
|  | ||||
|     // Assuming we're importing this directly from an extension (and we shouldn't | ||||
|     // ever not be), its UUID should be directly in the path here. | ||||
|     let extensionStackLine = stack.split('\n')[1]; | ||||
|     if (!extensionStackLine) | ||||
|         throw new Error('Could not find current extension'); | ||||
|  | ||||
|     // The stack line is like: | ||||
|     //   init([object Object])@/home/user/data/gnome-shell/extensions/u@u.id/prefs.js:8 | ||||
|     // | ||||
|     // In the case that we're importing from | ||||
|     // module scope, the first field is blank: | ||||
|     //   @/home/user/data/gnome-shell/extensions/u@u.id/prefs.js:8 | ||||
|     let match = new RegExp('@(.+):\\d+').exec(extensionStackLine); | ||||
|     if (!match) | ||||
|         throw new Error('Could not find current extension'); | ||||
|  | ||||
|     let path = match[1]; | ||||
|     let uuid = GLib.path_get_basename(GLib.path_get_dirname(path)); | ||||
|  | ||||
|     let extension = extensions[uuid]; | ||||
|     if (extension === undefined) | ||||
|         throw new Error('Could not find current extension'); | ||||
|  | ||||
|     return extension; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * versionCheck: | ||||
|  * @required: an array of versions we're compatible with | ||||
|  * @current: the version we have | ||||
|  * | ||||
|  * Check if a component is compatible for an extension. | ||||
|  * @required is an array, and at least one version must match. | ||||
|  * @current must be in the format <major>.<minor>.<point>.<micro> | ||||
|  * <micro> is always ignored | ||||
|  * <point> is ignored if <minor> is even (so you can target the | ||||
|  * whole stable release) | ||||
|  * <minor> and <major> must match | ||||
|  * Each target version must be at least <major> and <minor> | ||||
|  */ | ||||
| function versionCheck(required, current) { | ||||
|     let currentArray = current.split('.'); | ||||
|     let major = currentArray[0]; | ||||
|     let minor = currentArray[1]; | ||||
|     let point = currentArray[2]; | ||||
|     for (let i = 0; i < required.length; i++) { | ||||
|         let requiredArray = required[i].split('.'); | ||||
|         if (requiredArray[0] == major && | ||||
|             requiredArray[1] == minor && | ||||
|             (requiredArray[2] == point || | ||||
|              (requiredArray[2] == undefined && parseInt(minor) % 2 == 0))) | ||||
|             return true; | ||||
|     } | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| function isOutOfDate(extension) { | ||||
|     if (!versionCheck(extension.metadata['shell-version'], Config.PACKAGE_VERSION)) | ||||
|         return true; | ||||
|  | ||||
|     if (extension.metadata['js-version'] && !versionCheck(extension.metadata['js-version'], Config.GJS_VERSION)) | ||||
|         return true; | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| function createExtensionObject(uuid, dir, type) { | ||||
|     let info; | ||||
|  | ||||
|     let metadataFile = dir.get_child('metadata.json'); | ||||
|     if (!metadataFile.query_exists(null)) { | ||||
|         throw new Error('Missing metadata.json'); | ||||
|     } | ||||
|  | ||||
|     let metadataContents, success, tag; | ||||
|     try { | ||||
|         [success, metadataContents, tag] = metadataFile.load_contents(null); | ||||
|     } catch (e) { | ||||
|         throw new Error('Failed to load metadata.json: ' + e); | ||||
|     } | ||||
|     let meta; | ||||
|     try { | ||||
|         meta = JSON.parse(metadataContents); | ||||
|     } catch (e) { | ||||
|         throw new Error('Failed to parse metadata.json: ' + e); | ||||
|     } | ||||
|  | ||||
|     let requiredProperties = ['uuid', 'name', 'description', 'shell-version']; | ||||
|     for (let i = 0; i < requiredProperties.length; i++) { | ||||
|         let prop = requiredProperties[i]; | ||||
|         if (!meta[prop]) { | ||||
|             throw new Error('missing "' + prop + '" property in metadata.json'); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // Encourage people to add this | ||||
|     if (!meta.url) { | ||||
|         global.log('Warning: Missing "url" property in metadata.json'); | ||||
|     } | ||||
|  | ||||
|     if (uuid != meta.uuid) { | ||||
|         throw new Error('uuid "' + meta.uuid + '" from metadata.json does not match directory name "' + uuid + '"'); | ||||
|     } | ||||
|  | ||||
|     let extension = {}; | ||||
|  | ||||
|     extension.metadata = meta; | ||||
|     extension.uuid = meta.uuid; | ||||
|     extension.type = type; | ||||
|     extension.dir = dir; | ||||
|     extension.path = dir.get_path(); | ||||
|     extension.error = ''; | ||||
|     extension.hasPrefs = dir.get_child('prefs.js').query_exists(null); | ||||
|  | ||||
|     extensions[uuid] = extension; | ||||
|  | ||||
|     return extension; | ||||
| } | ||||
|  | ||||
| var _extension = null; | ||||
|  | ||||
| function installImporter(extension) { | ||||
|     _extension = extension; | ||||
|     ShellJS.add_extension_importer('imports.misc.extensionUtils._extension', 'imports', extension.path); | ||||
|     _extension = null; | ||||
| } | ||||
|  | ||||
| function init() { | ||||
|     let userExtensionsPath = GLib.build_filenamev([global.userdatadir, 'extensions']); | ||||
|     userExtensionsDir = Gio.file_new_for_path(userExtensionsPath); | ||||
|     try { | ||||
|         if (!userExtensionsDir.query_exists(null)) | ||||
|             userExtensionsDir.make_directory_with_parents(null); | ||||
|     } catch (e) { | ||||
|         global.logError('' + e); | ||||
|     } | ||||
| } | ||||
|  | ||||
| function scanExtensionsInDirectory(callback, dir, type) { | ||||
|     let fileEnum; | ||||
|     let file, info; | ||||
|     try { | ||||
|         fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null); | ||||
|     } catch(e) { | ||||
|         global.logError('' + e); | ||||
|         return; | ||||
|     } | ||||
|  | ||||
|     while ((info = fileEnum.next_file(null)) != null) { | ||||
|         let fileType = info.get_file_type(); | ||||
|         if (fileType != Gio.FileType.DIRECTORY) | ||||
|             continue; | ||||
|         let uuid = info.get_name(); | ||||
|         let extensionDir = dir.get_child(uuid); | ||||
|         callback(uuid, extensionDir, type); | ||||
|     } | ||||
|     fileEnum.close(null); | ||||
| } | ||||
|  | ||||
| function scanExtensions(callback) { | ||||
|     let systemDataDirs = GLib.get_system_data_dirs(); | ||||
|     scanExtensionsInDirectory(callback, userExtensionsDir, ExtensionType.PER_USER); | ||||
|     for (let i = 0; i < systemDataDirs.length; i++) { | ||||
|         let dirPath = GLib.build_filenamev([systemDataDirs[i], 'gnome-shell', 'extensions']); | ||||
|         let dir = Gio.file_new_for_path(dirPath); | ||||
|         if (dir.query_exists(null)) | ||||
|             scanExtensionsInDirectory(callback, dir, ExtensionType.SYSTEM); | ||||
|     } | ||||
| } | ||||
| @@ -1,5 +1,3 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const Gio = imports.gi.Gio; | ||||
| const GLib = imports.gi.GLib; | ||||
|  | ||||
| @@ -22,25 +20,3 @@ function listDirAsync(file, callback) { | ||||
|         enumerator.next_files_async(100, GLib.PRIORITY_LOW, null, onNextFileComplete); | ||||
|     }); | ||||
| } | ||||
|  | ||||
| function deleteGFile(file) { | ||||
|     // Work around 'delete' being a keyword in JS. | ||||
|     return file['delete'](null); | ||||
| } | ||||
|  | ||||
| function recursivelyDeleteDir(dir) { | ||||
|     let children = dir.enumerate_children('standard::name,standard::type', | ||||
|                                           Gio.FileQueryInfoFlags.NONE, null); | ||||
|  | ||||
|     let info, child; | ||||
|     while ((info = children.next_file(null)) != null) { | ||||
|         let type = info.get_file_type(); | ||||
|         let child = dir.get_child(info.get_name()); | ||||
|         if (type == Gio.FileType.REGULAR) | ||||
|             deleteGFile(child); | ||||
|         else if (type == Gio.FileType.DIRECTORY) | ||||
|             recursivelyDeleteDir(child); | ||||
|     } | ||||
|  | ||||
|     deleteGFile(dir); | ||||
| } | ||||
|   | ||||
| @@ -1,6 +1,4 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const ShellJS = imports.gi.ShellJS; | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| /* | ||||
|  * This function is intended to extend the String object and provide | ||||
| @@ -19,16 +17,11 @@ function format() { | ||||
|     let i = 0; | ||||
|     let args = arguments; | ||||
|  | ||||
|     return str.replace(/%(I+)?([0-9]+)?(?:\.([0-9]+))?(.)/g, function (str, flagsGroup, widthGroup, precisionGroup, genericGroup) { | ||||
|     return str.replace(/%([0-9]+)?(?:\.([0-9]+))?(.)/g, function (str, widthGroup, precisionGroup, genericGroup) { | ||||
|  | ||||
|                     if (precisionGroup != '' && genericGroup != 'f') | ||||
|                         throw new Error("Precision can only be specified for 'f'"); | ||||
|  | ||||
|                     let hasAlternativeIntFlag = (flagsGroup.indexOf('I') != -1); | ||||
|  | ||||
|                     if (hasAlternativeIntFlag && genericGroup != 'd') | ||||
|                         throw new Error("Alternative output digits can only be specfied for 'd'"); | ||||
|  | ||||
|                     let fillChar = (widthGroup[0] == '0') ? '0' : ' '; | ||||
|                     let width = parseInt(widthGroup, 10) || 0; | ||||
|  | ||||
| @@ -48,11 +41,7 @@ function format() { | ||||
|                             s = args[i++].toString(); | ||||
|                             break; | ||||
|                         case 'd': | ||||
|                             let intV = parseInt(args[i++]); | ||||
|                             if (hasAlternativeIntFlag) | ||||
|                                 s = ShellJS.format_int_alternative_output(intV); | ||||
|                             else | ||||
|                                 s = intV.toString(); | ||||
|                             s = parseInt(args[i++]).toString(); | ||||
|                             break; | ||||
|                         case 'x': | ||||
|                             s = parseInt(args[i++]).toString(16); | ||||
|   | ||||
| @@ -1,18 +1,19 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const Gio = imports.gi.Gio; | ||||
| const DBus = imports.dbus; | ||||
| const Lang = imports.lang; | ||||
| const Signals = imports.signals; | ||||
|  | ||||
| const PresenceIface = <interface name="org.gnome.SessionManager.Presence"> | ||||
| <method name="SetStatus"> | ||||
|     <arg type="u" direction="in"/> | ||||
| </method> | ||||
| <property name="status" type="u" access="readwrite"/> | ||||
| <signal name="StatusChanged"> | ||||
|     <arg type="u" direction="out"/> | ||||
| </signal> | ||||
| </interface>; | ||||
| const PresenceIface = { | ||||
|     name: 'org.gnome.SessionManager.Presence', | ||||
|     methods: [{ name: 'SetStatus', | ||||
|                 inSignature: 'u' }], | ||||
|     properties: [{ name: 'status', | ||||
|                    signature: 'u', | ||||
|                    access: 'readwrite' }], | ||||
|     signals: [{ name: 'StatusChanged', | ||||
|                 inSignature: 'u' }] | ||||
| }; | ||||
|  | ||||
| const PresenceStatus = { | ||||
|     AVAILABLE: 0, | ||||
| @@ -21,41 +22,82 @@ const PresenceStatus = { | ||||
|     IDLE: 3 | ||||
| }; | ||||
|  | ||||
| var PresenceProxy = Gio.DBusProxy.makeProxyWrapper(PresenceIface); | ||||
| function Presence(initCallback, cancellable) { | ||||
|     return new PresenceProxy(Gio.DBus.session, 'org.gnome.SessionManager', | ||||
|                              '/org/gnome/SessionManager/Presence', initCallback, cancellable); | ||||
| function Presence() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| Presence.prototype = { | ||||
|     _init: function() { | ||||
|         DBus.session.proxifyObject(this, 'org.gnome.SessionManager', '/org/gnome/SessionManager/Presence', this); | ||||
|     }, | ||||
|  | ||||
|     getStatus: function(callback) { | ||||
|         this.GetRemote('status', Lang.bind(this, | ||||
|             function(status, ex) { | ||||
|                 if (!ex) | ||||
|                     callback(this, status); | ||||
|             })); | ||||
|     }, | ||||
|  | ||||
|     setStatus: function(status) { | ||||
|         this.SetStatusRemote(status); | ||||
|     } | ||||
| }; | ||||
| DBus.proxifyPrototype(Presence.prototype, PresenceIface); | ||||
|  | ||||
| // Note inhibitors are immutable objects, so they don't | ||||
| // change at runtime (changes always come in the form | ||||
| // of new inhibitors) | ||||
| const InhibitorIface = <interface name="org.gnome.SessionManager.Inhibitor"> | ||||
| <method name="GetAppId"> | ||||
|     <arg type="s" direction="out" /> | ||||
| </method> | ||||
| <method name="GetReason"> | ||||
|     <arg type="s" direction="out" /> | ||||
| </method> | ||||
| </interface>; | ||||
| const InhibitorIface = { | ||||
|     name: 'org.gnome.SessionManager.Inhibitor', | ||||
|     properties: [{ name: 'app_id', | ||||
|                    signature: 's', | ||||
|                    access: 'readonly' }, | ||||
|                  { name: 'client_id', | ||||
|                    signature: 's', | ||||
|                    access: 'readonly' }, | ||||
|                  { name: 'reason', | ||||
|                    signature: 's', | ||||
|                    access: 'readonly' }, | ||||
|                  { name: 'flags', | ||||
|                    signature: 'u', | ||||
|                    access: 'readonly' }, | ||||
|                  { name: 'toplevel_xid', | ||||
|                    signature: 'u', | ||||
|                    access: 'readonly' }, | ||||
|                  { name: 'cookie', | ||||
|                    signature: 'u', | ||||
|                    access: 'readonly' }], | ||||
| }; | ||||
|  | ||||
| var InhibitorProxy = Gio.DBusProxy.makeProxyWrapper(InhibitorIface); | ||||
| function Inhibitor(objectPath, initCallback, cancellable) { | ||||
|     return new InhibitorProxy(Gio.DBus.session, 'org.gnome.SessionManager', objectPath, initCallback, cancellable); | ||||
| function Inhibitor(objectPath) { | ||||
|     this._init(objectPath); | ||||
| } | ||||
|  | ||||
| // Not the full interface, only the methods we use | ||||
| const SessionManagerIface = <interface name="org.gnome.SessionManager"> | ||||
| <method name="Logout"> | ||||
|     <arg type="u" direction="in" /> | ||||
| </method> | ||||
| <method name="Shutdown" /> | ||||
| <method name="CanShutdown"> | ||||
|     <arg type="b" direction="out" /> | ||||
| </method> | ||||
| </interface>; | ||||
| Inhibitor.prototype = { | ||||
|     _init: function(objectPath) { | ||||
|         DBus.session.proxifyObject(this, | ||||
|                                    "org.gnome.SessionManager", | ||||
|                                    objectPath); | ||||
|         this.isLoaded = false; | ||||
|         this._loadingPropertiesCount = InhibitorIface.properties.length; | ||||
|         for (let i = 0; i < InhibitorIface.properties.length; i++) { | ||||
|             let propertyName = InhibitorIface.properties[i].name; | ||||
|             this.GetRemote(propertyName, Lang.bind(this, | ||||
|                 function(value, exception) { | ||||
|                     if (exception) | ||||
|                         return; | ||||
|  | ||||
| var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface); | ||||
| function SessionManager(initCallback, cancellable) { | ||||
|     return new SessionManagerProxy(Gio.DBus.session, 'org.gnome.SessionManager', '/org/gnome/SessionManager', initCallback, cancellable); | ||||
| } | ||||
|                     this[propertyName] = value; | ||||
|                     this._loadingPropertiesCount--; | ||||
|  | ||||
|                     if (this._loadingPropertiesCount == 0) { | ||||
|                         this.isLoaded = true; | ||||
|                         this.emit("is-loaded"); | ||||
|                     } | ||||
|                 })); | ||||
|         } | ||||
|     }, | ||||
| }; | ||||
| DBus.proxifyPrototype(Inhibitor.prototype, InhibitorIface); | ||||
| Signals.addSignalMethods(Inhibitor.prototype); | ||||
|   | ||||
| @@ -1,113 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const Lang = imports.lang; | ||||
| const Signals = imports.signals; | ||||
| const Clutter = imports.gi.Clutter; | ||||
| const Params = imports.misc.params; | ||||
|  | ||||
| const DEFAULT_LIMIT = 512; | ||||
|  | ||||
| const HistoryManager = new Lang.Class({ | ||||
|     Name: 'HistoryManager', | ||||
|  | ||||
|     _init: function(params) { | ||||
|         params = Params.parse(params, { gsettingsKey: null, | ||||
|                                         limit: DEFAULT_LIMIT, | ||||
|                                         entry: null }); | ||||
|  | ||||
|         this._key = params.gsettingsKey; | ||||
|         this._limit = params.limit; | ||||
|  | ||||
|         this._historyIndex = 0; | ||||
|         if (this._key) { | ||||
|             this._history = global.settings.get_strv(this._key); | ||||
|             global.settings.connect('changed::' + this._key, | ||||
|                                     Lang.bind(this, this._historyChanged)); | ||||
|  | ||||
|         } else { | ||||
|             this._history = []; | ||||
|         } | ||||
|  | ||||
|         this._entry = params.entry; | ||||
|  | ||||
|         if (this._entry) { | ||||
|             this._entry.connect('key-press-event',  | ||||
|                                 Lang.bind(this, this._onEntryKeyPress)); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _historyChanged: function() { | ||||
|         this._history = global.settings.get_strv(this._key); | ||||
|         this._historyIndex = this._history.length; | ||||
|     }, | ||||
|  | ||||
|     prevItem: function(text) { | ||||
|         if (this._historyIndex <= 0) | ||||
|             return text; | ||||
|  | ||||
|         if (text) | ||||
|             this._history[this._historyIndex] = text; | ||||
|         this._historyIndex--; | ||||
|         return this._indexChanged(); | ||||
|     }, | ||||
|  | ||||
|     nextItem: function(text) { | ||||
|         if (this._historyIndex >= this._history.length) | ||||
|             return text; | ||||
|  | ||||
|         if (text) | ||||
|             this._history[this._historyIndex] = text; | ||||
|         this._historyIndex++; | ||||
|         return this._indexChanged(); | ||||
|     }, | ||||
|  | ||||
|     lastItem: function() { | ||||
|         if (this._historyIndex != this._history.length) { | ||||
|             this._historyIndex = this._history.length; | ||||
|             this._indexChanged(); | ||||
|         } | ||||
|  | ||||
|         return this._historyIndex[this._history.length]; | ||||
|     }, | ||||
|  | ||||
|     addItem: function(input) { | ||||
|         if (this._history.length == 0 || | ||||
|             this._history[this._history.length - 1] != input) { | ||||
|  | ||||
|             this._history.push(input); | ||||
|             this._save(); | ||||
|         } | ||||
|         this._historyIndex = this._history.length; | ||||
|     }, | ||||
|  | ||||
|     _onEntryKeyPress: function(entry, event) { | ||||
|         let symbol = event.get_key_symbol(); | ||||
|         if (symbol == Clutter.KEY_Up) { | ||||
|             this.prevItem(entry.get_text()); | ||||
|             return true; | ||||
|         } else if (symbol == Clutter.KEY_Down) { | ||||
|             this.nextItem(entry.get_text()); | ||||
|             return true; | ||||
|         } | ||||
|         return false; | ||||
|     }, | ||||
|  | ||||
|     _indexChanged: function() { | ||||
|         let current = this._history[this._historyIndex] || ''; | ||||
|         this.emit('changed', current); | ||||
|  | ||||
|         if (this._entry) | ||||
|             this._entry.set_text(current); | ||||
|  | ||||
|         return current; | ||||
|     }, | ||||
|  | ||||
|     _save: function() { | ||||
|         if (this._history.length > this._limit) | ||||
|             this._history.splice(0, this._history.length - this._limit); | ||||
|  | ||||
|         if (this._key) | ||||
|             global.settings.set_strv(this._key, this._history); | ||||
|     } | ||||
| }); | ||||
| Signals.addSignalMethods(HistoryManager.prototype); | ||||
| @@ -1,246 +0,0 @@ | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| // Returns a list of potential completions for text. Completions either | ||||
| // follow a dot (e.g. foo.ba -> bar) or they are picked from globalCompletionList (e.g. fo -> foo) | ||||
| // commandHeader is prefixed on any expression before it is eval'ed.  It will most likely | ||||
| // consist of global constants that might not carry over from the calling environment. | ||||
| // | ||||
| // This function is likely the one you want to call from external modules | ||||
| function getCompletions(text, commandHeader, globalCompletionList) { | ||||
|     let methods = []; | ||||
|     let expr, base; | ||||
|     let attrHead = ''; | ||||
|     if (globalCompletionList == null) { | ||||
|         globalCompletionList = []; | ||||
|     } | ||||
|  | ||||
|     let offset = getExpressionOffset(text, text.length - 1); | ||||
|     if (offset >= 0) { | ||||
|         text = text.slice(offset); | ||||
|  | ||||
|         // Look for expressions like "Main.panel.foo" and match Main.panel and foo | ||||
|         let matches = text.match(/(.*)\.(.*)/); | ||||
|         if (matches) { | ||||
|             [expr, base, attrHead] = matches; | ||||
|  | ||||
|             methods = getPropertyNamesFromExpression(base, commandHeader).filter(function(attr) { | ||||
|                 return attr.slice(0, attrHead.length) == attrHead; | ||||
|             }); | ||||
|         } | ||||
|  | ||||
|         // Look for the empty expression or partially entered words | ||||
|         // not proceeded by a dot and match them against global constants | ||||
|         matches = text.match(/^(\w*)$/); | ||||
|         if (text == '' || matches) { | ||||
|             [expr, attrHead] = matches; | ||||
|             methods = globalCompletionList.filter(function(attr) { | ||||
|                 return attr.slice(0, attrHead.length) == attrHead; | ||||
|             }); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     return [methods, attrHead]; | ||||
| } | ||||
|  | ||||
|  | ||||
| // | ||||
| // A few functions for parsing strings of javascript code. | ||||
| // | ||||
|  | ||||
| // Identify characters that delimit an expression.  That is, | ||||
| // if we encounter anything that isn't a letter, '.', ')', or ']', | ||||
| // we should stop parsing. | ||||
| function isStopChar(c) { | ||||
|     return !c.match(/[\w\.\)\]]/); | ||||
| } | ||||
|  | ||||
| // Given the ending position of a quoted string, find where it starts | ||||
| function findMatchingQuote(expr, offset) { | ||||
|     let quoteChar = expr.charAt(offset); | ||||
|     for (let i = offset - 1; i >= 0; --i) { | ||||
|         if (expr.charAt(i) == quoteChar && expr.charAt(i-1) != '\\'){ | ||||
|             return i; | ||||
|         } | ||||
|     } | ||||
|     return -1; | ||||
| } | ||||
|  | ||||
| // Given the ending position of a regex, find where it starts | ||||
| function findMatchingSlash(expr, offset) { | ||||
|     for (let i = offset - 1; i >= 0; --i) { | ||||
|         if (expr.charAt(i) == '/' && expr.charAt(i-1) != '\\'){ | ||||
|             return i; | ||||
|         } | ||||
|     } | ||||
|     return -1; | ||||
| } | ||||
|  | ||||
| // If expr.charAt(offset) is ')' or ']', | ||||
| // return the position of the corresponding '(' or '[' bracket. | ||||
| // This function does not check for syntactic correctness.  e.g., | ||||
| // findMatchingBrace("[(])", 3) returns 1. | ||||
| function findMatchingBrace(expr, offset) { | ||||
|     let closeBrace = expr.charAt(offset); | ||||
|     let openBrace = ({')': '(', ']': '['})[closeBrace]; | ||||
|  | ||||
|     function findTheBrace(expr, offset) { | ||||
|         if (offset < 0) { | ||||
|             return -1; | ||||
|         } | ||||
|  | ||||
|         if (expr.charAt(offset) == openBrace) { | ||||
|             return offset; | ||||
|         } | ||||
|         if (expr.charAt(offset).match(/['"]/)) { | ||||
|             return findTheBrace(expr, findMatchingQuote(expr, offset) - 1); | ||||
|         } | ||||
|         if (expr.charAt(offset) == '/') { | ||||
|             return findTheBrace(expr, findMatchingSlash(expr, offset) - 1); | ||||
|         } | ||||
|         if (expr.charAt(offset) == closeBrace) { | ||||
|             return findTheBrace(expr, findTheBrace(expr, offset - 1) - 1); | ||||
|         } | ||||
|  | ||||
|         return findTheBrace(expr, offset - 1); | ||||
|  | ||||
|     } | ||||
|  | ||||
|     return findTheBrace(expr, offset - 1); | ||||
| } | ||||
|  | ||||
| // Walk expr backwards from offset looking for the beginning of an | ||||
| // expression suitable for passing to eval. | ||||
| // There is no guarantee of correct javascript syntax between the return | ||||
| // value and offset.  This function is meant to take a string like | ||||
| // "foo(Obj.We.Are.Completing" and allow you to extract "Obj.We.Are.Completing" | ||||
| function getExpressionOffset(expr, offset) { | ||||
|     while (offset >= 0) { | ||||
|         let currChar = expr.charAt(offset); | ||||
|  | ||||
|         if (isStopChar(currChar)){ | ||||
|             return offset + 1; | ||||
|         } | ||||
|  | ||||
|         if (currChar.match(/[\)\]]/)) { | ||||
|             offset = findMatchingBrace(expr, offset); | ||||
|         } | ||||
|  | ||||
|         --offset; | ||||
|     } | ||||
|  | ||||
|     return offset + 1; | ||||
| } | ||||
|  | ||||
| // Things with non-word characters or that start with a number | ||||
| // are not accessible via .foo notation and so aren't returned | ||||
| function isValidPropertyName(w) { | ||||
|     return !(w.match(/\W/) || w.match(/^\d/)); | ||||
| } | ||||
|  | ||||
| // To get all properties (enumerable and not), we need to walk | ||||
| // the prototype chain ourselves | ||||
| function getAllProps(obj) { | ||||
|     if (obj === null || obj === undefined) { | ||||
|         return []; | ||||
|     } | ||||
|     return Object.getOwnPropertyNames(obj).concat( getAllProps(Object.getPrototypeOf(obj)) ); | ||||
| } | ||||
|  | ||||
| // Given a string _expr_, returns all methods | ||||
| // that can be accessed via '.' notation. | ||||
| // e.g., expr="({ foo: null, bar: null, 4: null })" will | ||||
| // return ["foo", "bar", ...] but the list will not include "4", | ||||
| // since methods accessed with '.' notation must star with a letter or _. | ||||
| function getPropertyNamesFromExpression(expr, commandHeader) { | ||||
|     if (commandHeader == null) { | ||||
|         commandHeader = ''; | ||||
|     } | ||||
|  | ||||
|     let obj = {}; | ||||
|     if (!isUnsafeExpression(expr)) { | ||||
|         try { | ||||
|                 obj = eval(commandHeader + expr); | ||||
|         } catch (e) { | ||||
|             return []; | ||||
|         } | ||||
|     } else { | ||||
|         return []; | ||||
|     } | ||||
|  | ||||
|     let propsUnique = {}; | ||||
|     if (typeof obj === 'object'){ | ||||
|         let allProps = getAllProps(obj); | ||||
|         // Get only things we are allowed to complete following a '.' | ||||
|         allProps = allProps.filter( isValidPropertyName ); | ||||
|  | ||||
|         // Make sure propsUnique contains one key for every | ||||
|         // property so we end up with a unique list of properties | ||||
|         allProps.map(function(p){ propsUnique[p] = null; }); | ||||
|     } | ||||
|     return Object.keys(propsUnique).sort(); | ||||
| } | ||||
|  | ||||
| // Given a list of words, returns the longest prefix they all have in common | ||||
| function getCommonPrefix(words) { | ||||
|     let word = words[0]; | ||||
|     for (let i = 0; i < word.length; i++) { | ||||
|         for (let w = 1; w < words.length; w++) { | ||||
|             if (words[w].charAt(i) != word.charAt(i)) | ||||
|                 return word.slice(0, i); | ||||
|         } | ||||
|     } | ||||
|     return word; | ||||
| } | ||||
|  | ||||
| // Returns true if there is reason to think that eval(str) | ||||
| // will modify the global scope | ||||
| function isUnsafeExpression(str) { | ||||
|     // Remove any blocks that are quoted or are in a regex | ||||
|     function removeLiterals(str) { | ||||
|         if (str.length == 0) { | ||||
|             return ''; | ||||
|         } | ||||
|  | ||||
|         let currChar = str.charAt(str.length - 1); | ||||
|         if (currChar == '"' || currChar == '\'') { | ||||
|             return removeLiterals(str.slice(0, findMatchingQuote(str, str.length - 1))); | ||||
|         } else if (currChar == '/') { | ||||
|             return removeLiterals(str.slice(0, findMatchingSlash(str, str.length - 1))); | ||||
|         } | ||||
|  | ||||
|         return removeLiterals(str.slice(0, str.length - 1)) + currChar; | ||||
|     } | ||||
|  | ||||
|     // Check for any sort of assignment | ||||
|     // The strategy used is dumb: remove any quotes | ||||
|     // or regexs and comparison operators and see if there is an '=' character. | ||||
|     // If there is, it might be an unsafe assignment. | ||||
|  | ||||
|     let prunedStr = removeLiterals(str); | ||||
|     prunedStr = prunedStr.replace(/[=!]==/g, '');    //replace === and !== with nothing | ||||
|     prunedStr = prunedStr.replace(/[=<>!]=/g, '');    //replace ==, <=, >=, != with nothing | ||||
|  | ||||
|     if (prunedStr.match(/=/)) { | ||||
|         return true; | ||||
|     } else if (prunedStr.match(/;/)) { | ||||
|         // If we contain a semicolon not inside of a quote/regex, assume we're unsafe as well | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     return false; | ||||
| } | ||||
|  | ||||
| // Returns a list of global keywords derived from str | ||||
| function getDeclaredConstants(str) { | ||||
|     let ret = []; | ||||
|     str.split(';').forEach(function(s) { | ||||
|         let base, keyword; | ||||
|         let match = s.match(/const\s+(\w+)\s*=/); | ||||
|         if (match) { | ||||
|             [base, keyword] = match; | ||||
|             ret.push(keyword); | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     return ret; | ||||
| } | ||||
| @@ -1,227 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const Gio = imports.gi.Gio; | ||||
| const Lang = imports.lang; | ||||
| const Shell = imports.gi.Shell; | ||||
| const Signals = imports.signals; | ||||
|  | ||||
| // The following are not the complete interfaces, just the methods we need | ||||
| // (or may need in the future) | ||||
|  | ||||
| const ModemGsmNetworkInterface = <interface name="org.freedesktop.ModemManager.Modem.Gsm.Network"> | ||||
| <method name="GetRegistrationInfo"> | ||||
|     <arg type="(uss)" direction="out" /> | ||||
| </method> | ||||
| <method name="GetSignalQuality"> | ||||
|     <arg type="u" direction="out" /> | ||||
| </method> | ||||
| <property name="AccessTechnology" type="u" access="read" /> | ||||
| <signal name="SignalQuality"> | ||||
|     <arg type="u" direction="out" /> | ||||
| </signal> | ||||
| <signal name="RegistrationInfo"> | ||||
|     <arg type="u" direction="out" /> | ||||
|     <arg type="s" direction="out" /> | ||||
|     <arg type="s" direction="out" /> | ||||
| </signal> | ||||
| </interface>; | ||||
|  | ||||
| const ModemGsmNetworkProxy = Gio.DBusProxy.makeProxyWrapper(ModemGsmNetworkInterface); | ||||
|  | ||||
| const ModemCdmaInterface = <interface name="org.freedesktop.ModemManager.Modem.Cdma"> | ||||
| <method name="GetSignalQuality"> | ||||
|     <arg type="u" direction="out" /> | ||||
| </method> | ||||
| <method name="GetServingSystem"> | ||||
|     <arg type="(usu)" direction="out" /> | ||||
| </method> | ||||
| <signal name="SignalQuality"> | ||||
|     <arg type="u" direction="out" /> | ||||
| </signal> | ||||
| </interface>; | ||||
|  | ||||
| const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface); | ||||
|  | ||||
| let _providersTable; | ||||
| function _getProvidersTable() { | ||||
|     if (_providersTable) | ||||
|         return _providersTable; | ||||
|     let [providers, countryCodes] = Shell.mobile_providers_parse(); | ||||
|     return _providersTable = providers; | ||||
| } | ||||
|  | ||||
| const ModemGsm = new Lang.Class({ | ||||
|     Name: 'ModemGsm', | ||||
|  | ||||
|     _init: function(path) { | ||||
|         this._proxy = new ModemGsmNetworkProxy(Gio.DBus.system, 'org.freedesktop.ModemManager', path); | ||||
|  | ||||
|         this.signal_quality = 0; | ||||
|         this.operator_name = null; | ||||
|  | ||||
|         // Code is duplicated because the function have different signatures | ||||
|         this._proxy.connectSignal('SignalQuality', Lang.bind(this, function(proxy, sender, [quality]) { | ||||
|             this.signal_quality = quality; | ||||
|             this.emit('notify::signal-quality'); | ||||
|         })); | ||||
|         this._proxy.connectSignal('RegistrationInfo', Lang.bind(this, function(proxy, sender, [status, code, name]) { | ||||
|             this.operator_name = this._findOperatorName(name, code); | ||||
|             this.emit('notify::operator-name'); | ||||
|         })); | ||||
|         this._proxy.GetRegistrationInfoRemote(Lang.bind(this, function([result], err) { | ||||
|             if (err) { | ||||
|                 log(err); | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|             let [status, code, name] = result; | ||||
|             this.operator_name = this._findOperatorName(name, code); | ||||
|             this.emit('notify::operator-name'); | ||||
|         })); | ||||
|         this._proxy.GetSignalQualityRemote(Lang.bind(this, function(result, err) { | ||||
|             if (err) { | ||||
|                 // it will return an error if the device is not connected | ||||
|                 this.signal_quality = 0; | ||||
|             } else { | ||||
|                 let [quality] = result; | ||||
|                 this.signal_quality = quality; | ||||
|             } | ||||
|             this.emit('notify::signal-quality'); | ||||
|         })); | ||||
|     }, | ||||
|  | ||||
|     _findOperatorName: function(name, opCode) { | ||||
|         if (name.length != 0 && (name.length > 6 || name.length < 5)) { | ||||
|             // this looks like a valid name, i.e. not an MCCMNC (that some | ||||
|             // devices return when not yet connected | ||||
|             return name; | ||||
|         } | ||||
|         if (isNaN(parseInt(name))) { | ||||
|             // name is definitely not a MCCMNC, so it may be a name | ||||
|             // after all; return that | ||||
|             return name; | ||||
|         } | ||||
|  | ||||
|         let needle; | ||||
|         if (name.length == 0 && opCode) | ||||
|             needle = opCode; | ||||
|         else if (name.length == 6 || name.length == 5) | ||||
|             needle = name; | ||||
|         else // nothing to search | ||||
|             return null; | ||||
|  | ||||
|         return this._findProviderForMCCMNC(needle); | ||||
|     }, | ||||
|  | ||||
|     _findProviderForMCCMNC: function(needle) { | ||||
|         let table = _getProvidersTable(); | ||||
|         let needlemcc = needle.substring(0, 3); | ||||
|         let needlemnc = needle.substring(3, needle.length); | ||||
|  | ||||
|         let name2, name3; | ||||
|         for (let iter in table) { | ||||
|             let providers = table[iter]; | ||||
|  | ||||
|             // Search through each country's providers | ||||
|             for (let i = 0; i < providers.length; i++) { | ||||
|                 let provider = providers[i]; | ||||
|  | ||||
|                 // Search through MCC/MNC list | ||||
|                 let list = provider.get_gsm_mcc_mnc(); | ||||
|                 for (let j = 0; j < list.length; j++) { | ||||
|                     let mccmnc = list[j]; | ||||
|  | ||||
|                     // Match both 2-digit and 3-digit MNC; prefer a | ||||
|                     // 3-digit match if found, otherwise a 2-digit one. | ||||
|                     if (mccmnc.mcc != needlemcc) | ||||
|                         continue;  // MCC was wrong | ||||
|  | ||||
|                     if (!name3 && needle.length == 6 && needlemnc == mccmnc.mnc) | ||||
|                         name3 = provider.name; | ||||
|  | ||||
|                     if (!name2 && needlemnc.substring(0, 2) == mccmnc.mnc.substring(0, 2)) | ||||
|                         name2 = provider.name; | ||||
|  | ||||
|                     if (name2 && name3) | ||||
|                         break; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         return name3 || name2 || null; | ||||
|     } | ||||
| }); | ||||
| Signals.addSignalMethods(ModemGsm.prototype); | ||||
|  | ||||
| const ModemCdma = new Lang.Class({ | ||||
|     Name: 'ModemCdma', | ||||
|  | ||||
|     _init: function(path) { | ||||
|         this._proxy = new ModemCdmaProxy(Gio.DBus.system, 'org.freedesktop.ModemManager', path); | ||||
|  | ||||
|         this.signal_quality = 0; | ||||
|         this.operator_name = null; | ||||
|         this._proxy.connectSignal('SignalQuality', Lang.bind(this, function(proxy, sender, params) { | ||||
|             this.signal_quality = params[0]; | ||||
|             this.emit('notify::signal-quality'); | ||||
|  | ||||
|             // receiving this signal means the device got activated | ||||
|             // and we can finally call GetServingSystem | ||||
|             if (this.operator_name == null) | ||||
|                 this._refreshServingSystem(); | ||||
|         })); | ||||
|         this._proxy.GetSignalQualityRemote(Lang.bind(this, function(result, err) { | ||||
|             if (err) { | ||||
|                 // it will return an error if the device is not connected | ||||
|                 this.signal_quality = 0; | ||||
|             } else { | ||||
|                 let [quality] = result; | ||||
|                 this.signal_quality = quality; | ||||
|             } | ||||
|             this.emit('notify::signal-quality'); | ||||
|         })); | ||||
|     }, | ||||
|  | ||||
|     _refreshServingSystem: function() { | ||||
|         this._proxy.GetServingSystemRemote(Lang.bind(this, function([result], err) { | ||||
|             if (err) { | ||||
|                 // it will return an error if the device is not connected | ||||
|                 this.operator_name = null; | ||||
|             } else { | ||||
|                 let [bandClass, band, id] = result; | ||||
|                 if (name.length > 0) | ||||
|                     this.operator_name = this._findProviderForSid(id); | ||||
|                 else | ||||
|                     this.operator_name = null; | ||||
|             } | ||||
|             this.emit('notify::operator-name'); | ||||
|         })); | ||||
|     }, | ||||
|  | ||||
|     _findProviderForSid: function(sid) { | ||||
|         if (sid == 0) | ||||
|             return null; | ||||
|  | ||||
|         let table = _getProvidersTable(); | ||||
|  | ||||
|         // Search through each country | ||||
|         for (let iter in table) { | ||||
|             let providers = table[iter]; | ||||
|  | ||||
|             // Search through each country's providers | ||||
|             for (let i = 0; i < providers.length; i++) { | ||||
|                 let provider = providers[i]; | ||||
|                 let cdma_sid = provider.get_cdma_sid(); | ||||
|  | ||||
|                 // Search through CDMA SID list | ||||
|                 for (let j = 0; j < cdma_sid.length; j++) { | ||||
|                     if (cdma_sid[j] == sid) | ||||
|                         return provider.name; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         return null; | ||||
|     } | ||||
| }); | ||||
| Signals.addSignalMethods(ModemCdma.prototype); | ||||
| @@ -1,4 +1,4 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| // parse: | ||||
| // @params: caller-provided parameter object, or %null | ||||
|   | ||||
| @@ -1,48 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const Gio = imports.gi.Gio; | ||||
| const Lang = imports.lang; | ||||
|  | ||||
| const ScreenSaverIface = <interface name="org.gnome.ScreenSaver"> | ||||
| <method name="GetActive"> | ||||
|     <arg type="b" direction="out" /> | ||||
| </method> | ||||
| <method name="Lock" /> | ||||
| <method name="SetActive"> | ||||
|     <arg type="b" direction="in" /> | ||||
| </method> | ||||
| <signal name="ActiveChanged"> | ||||
|     <arg type="b" direction="out" /> | ||||
| </signal> | ||||
| </interface>; | ||||
|  | ||||
| const ScreenSaverInfo = Gio.DBusInterfaceInfo.new_for_xml(ScreenSaverIface); | ||||
|  | ||||
| function ScreenSaverProxy() { | ||||
|     var self = new Gio.DBusProxy({ g_connection: Gio.DBus.session, | ||||
| 				   g_interface_name: ScreenSaverInfo.name, | ||||
| 				   g_interface_info: ScreenSaverInfo, | ||||
| 				   g_name: 'org.gnome.ScreenSaver', | ||||
| 				   g_object_path: '/org/gnome/ScreenSaver', | ||||
|                                    g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START | | ||||
|                                              Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) }); | ||||
|     self.init(null); | ||||
|     self.screenSaverActive = false; | ||||
|  | ||||
|     self.connectSignal('ActiveChanged', function(proxy, senderName, [isActive]) { | ||||
|         self.screenSaverActive = isActive; | ||||
|     }); | ||||
|     self.connect('notify::g-name-owner', function() { | ||||
|         if (self.g_name_owner) { | ||||
|             self.GetActiveRemote(function(result, excp) { | ||||
|                 if (result) { | ||||
|                     let [isActive] = result; | ||||
|                     self.screenSaverActive = isActive; | ||||
|                 } | ||||
|             }); | ||||
|         } else | ||||
|             self.screenSaverActive = false; | ||||
|     }); | ||||
|  | ||||
|     return self; | ||||
| } | ||||
							
								
								
									
										361
									
								
								js/misc/telepathy.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,361 @@ | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const DBus = imports.dbus; | ||||
|  | ||||
| // D-Bus utils | ||||
| function nameToPath(name) { | ||||
|     return '/' + name.replace(/\./g, '/'); | ||||
| }; | ||||
|  | ||||
| function pathToName(path) { | ||||
|     if (path[0] != '/') | ||||
|         throw new Error('not a D-Bus path: ' + path); | ||||
|     return path.substr(1).replace(/\//g, '.'); | ||||
| }; | ||||
|  | ||||
| // This is tp_escape_as_identifier() from telepathy-glib | ||||
| function escapeAsIdentifier(name) { | ||||
|     if (!name) | ||||
|         return '_'; | ||||
|  | ||||
|     // first char is replaced with _XX if it's non-alpha, | ||||
|     // later chars are replaced with _XX if they're non-alphanumeric | ||||
|     if (name.length == 1) { | ||||
|         return name.replace(/[^a-zA-Z]/, _hexEscape); | ||||
|     } else { | ||||
|         return (name[0].replace(/[^a-zA-Z]/, _hexEscape) + | ||||
|                 name.substring(1).replace(/[^a-zA-Z0-9]/g, _hexEscape)); | ||||
|     } | ||||
| } | ||||
|  | ||||
| function _hexEscape(ch) { | ||||
|     return '_' + ch.charCodeAt(0).toString(16); | ||||
| } | ||||
|  | ||||
| // Telepathy D-Bus interface definitions. Note that most of these are | ||||
| // incomplete, and only cover the methods/properties/signals that | ||||
| // we're currently using. | ||||
|  | ||||
| const TELEPATHY = 'org.freedesktop.Telepathy'; | ||||
|  | ||||
| const CLIENT_NAME = TELEPATHY + '.Client'; | ||||
| const ClientIface = { | ||||
|     name: CLIENT_NAME, | ||||
|     properties: [ | ||||
|         { name: 'Interfaces', | ||||
|           signature: 'as', | ||||
|           access: 'read' } | ||||
|     ] | ||||
| }; | ||||
|  | ||||
| const CLIENT_APPROVER_NAME = TELEPATHY + '.Client.Approver'; | ||||
| const ClientApproverIface = { | ||||
|     name: CLIENT_APPROVER_NAME, | ||||
|     methods: [ | ||||
|         { name: 'AddDispatchOperation', | ||||
|           inSignature: 'a(oa{sv})oa{sv}', | ||||
|           outSignature: '' } | ||||
|     ], | ||||
|     properties: [ | ||||
|         { name: 'ApproverChannelFilter', | ||||
|           signature: 'aa{sv}', | ||||
|           access: 'read' } | ||||
|     ] | ||||
| }; | ||||
|  | ||||
| const CLIENT_HANDLER_NAME = TELEPATHY + '.Client.Handler'; | ||||
| const ClientHandlerIface = { | ||||
|     name: CLIENT_HANDLER_NAME, | ||||
|     methods: [ | ||||
|         { name: 'HandleChannels', | ||||
|           inSignature: 'ooa(oa{sv})aota{sv}', | ||||
|           outSignature: '' } | ||||
|     ], | ||||
|     properties: [ | ||||
|         { name: 'HandlerChannelFilter', | ||||
|           signature: 'aa{sv}', | ||||
|           access: 'read' } | ||||
|     ] | ||||
| }; | ||||
|  | ||||
| const CLIENT_OBSERVER_NAME = TELEPATHY + '.Client.Observer'; | ||||
| const ClientObserverIface = { | ||||
|     name: CLIENT_OBSERVER_NAME, | ||||
|     methods: [ | ||||
|         { name: 'ObserveChannels', | ||||
|           inSignature: 'ooa(oa{sv})oaoa{sv}', | ||||
|           outSignature: '' } | ||||
|     ], | ||||
|     properties: [ | ||||
|         { name: 'ObserverChannelFilter', | ||||
|           signature: 'aa{sv}', | ||||
|           access: 'read' } | ||||
|     ] | ||||
| }; | ||||
|  | ||||
| const CHANNEL_DISPATCH_OPERATION_NAME = TELEPATHY + '.ChannelDispatchOperation'; | ||||
| const ChannelDispatchOperationIface = { | ||||
|     name: CHANNEL_DISPATCH_OPERATION_NAME, | ||||
|     methods: [ | ||||
|         { name: 'HandleWith', | ||||
|           inSignature: 's', | ||||
|           outSignature: '' }, | ||||
|         { name: 'Claim', | ||||
|           inSignature: '', | ||||
|           outSignature: '' } | ||||
|     ] | ||||
| }; | ||||
| let ChannelDispatchOperation = DBus.makeProxyClass(ChannelDispatchOperationIface); | ||||
|  | ||||
| const CONNECTION_NAME = TELEPATHY + '.Connection'; | ||||
| const ConnectionIface = { | ||||
|     name: CONNECTION_NAME, | ||||
|     signals: [ | ||||
|         { name: 'StatusChanged', | ||||
|           inSignature: 'uu' } | ||||
|     ] | ||||
| }; | ||||
| let Connection = DBus.makeProxyClass(ConnectionIface); | ||||
|  | ||||
| const ConnectionStatus = { | ||||
|     CONNECTED:    0, | ||||
|     CONNECTING:   1, | ||||
|     DISCONNECTED: 2 | ||||
| }; | ||||
|  | ||||
| const CONNECTION_ALIASING_NAME = CONNECTION_NAME + '.Interface.Aliasing'; | ||||
| const ConnectionAliasingIface = { | ||||
|     name: CONNECTION_ALIASING_NAME, | ||||
|     methods: [ | ||||
|         { name: 'RequestAliases', | ||||
|           inSignature: 'au', | ||||
|           outSignature: 'as' | ||||
|         } | ||||
|     ], | ||||
|     signals: [ | ||||
|         { name: 'AliasesChanged', | ||||
|           inSignature: 'a(us)' } | ||||
|     ] | ||||
| }; | ||||
| let ConnectionAliasing = DBus.makeProxyClass(ConnectionAliasingIface); | ||||
|  | ||||
| const CONNECTION_AVATARS_NAME = CONNECTION_NAME + '.Interface.Avatars'; | ||||
| const ConnectionAvatarsIface = { | ||||
|     name: CONNECTION_AVATARS_NAME, | ||||
|     methods: [ | ||||
|         { name: 'GetKnownAvatarTokens', | ||||
|           inSignature: 'au', | ||||
|           outSignature: 'a{us}' | ||||
|         }, | ||||
|         { name: 'RequestAvatars', | ||||
|           inSignature: 'au', | ||||
|           outSignature: '' | ||||
|         } | ||||
|     ], | ||||
|     signals: [ | ||||
|         { name: 'AvatarRetrieved', | ||||
|           inSignature: 'usays' | ||||
|         }, | ||||
|         { name: 'AvatarUpdated', | ||||
|           inSignature: 'us' | ||||
|         } | ||||
|     ] | ||||
| }; | ||||
| let ConnectionAvatars = DBus.makeProxyClass(ConnectionAvatarsIface); | ||||
|  | ||||
| const CONNECTION_CONTACTS_NAME = CONNECTION_NAME + '.Interface.Contacts'; | ||||
| const ConnectionContactsIface = { | ||||
|     name: CONNECTION_CONTACTS_NAME, | ||||
|     methods: [ | ||||
|         { name: 'GetContactAttributes', | ||||
|           inSignature: 'auasb', | ||||
|           outSignature: 'a{ua{sv}}' | ||||
|         } | ||||
|     ] | ||||
| }; | ||||
| let ConnectionContacts = DBus.makeProxyClass(ConnectionContactsIface); | ||||
|  | ||||
| const CONNECTION_REQUESTS_NAME = CONNECTION_NAME + '.Interface.Requests'; | ||||
| const ConnectionRequestsIface = { | ||||
|     name: CONNECTION_REQUESTS_NAME, | ||||
|     methods: [ | ||||
|         { name: 'CreateChannel', | ||||
|           inSignature: 'a{sv}', | ||||
|           outSignature: 'oa{sv}' | ||||
|         }, | ||||
|         { name: 'EnsureChannel', | ||||
|           inSignature: 'a{sv}', | ||||
|           outSignature: 'boa{sv}' | ||||
|         } | ||||
|     ], | ||||
|     properties: [ | ||||
|         { name: 'Channels', | ||||
|           signature: 'a(oa{sv})', | ||||
|           access: 'read' } | ||||
|     ], | ||||
|     signals: [ | ||||
|         { name: 'NewChannels', | ||||
|           inSignature: 'a(oa{sv})' | ||||
|         }, | ||||
|         { name: 'ChannelClosed', | ||||
|           inSignature: 'o' | ||||
|         } | ||||
|     ] | ||||
| }; | ||||
| let ConnectionRequests = DBus.makeProxyClass(ConnectionRequestsIface); | ||||
|  | ||||
| const CONNECTION_SIMPLE_PRESENCE_NAME = CONNECTION_NAME + '.Interface.SimplePresence'; | ||||
| const ConnectionSimplePresenceIface = { | ||||
|     name: CONNECTION_SIMPLE_PRESENCE_NAME, | ||||
|     methods: [ | ||||
|         { name: 'SetPresence', | ||||
|           inSignature: 'ss' | ||||
|         }, | ||||
|         { name: 'GetPresences', | ||||
|           inSignature: 'au', | ||||
|           outSignature: 'a{u(uss)}' | ||||
|         } | ||||
|     ], | ||||
|     signals: [ | ||||
|         { name: 'PresencesChanged', | ||||
|           inSignature: 'a{u(uss)}' } | ||||
|     ] | ||||
| }; | ||||
| let ConnectionSimplePresence = DBus.makeProxyClass(ConnectionSimplePresenceIface); | ||||
|  | ||||
| const ConnectionPresenceType = { | ||||
|     UNSET:         0, | ||||
|     OFFLINE:       1, | ||||
|     AVAILABLE:     2, | ||||
|     AWAY:          3, | ||||
|     EXTENDED_AWAY: 4, | ||||
|     HIDDEN:        5, | ||||
|     BUSY:          6, | ||||
|     UNKNOWN:       7, | ||||
|     ERROR:         8 | ||||
| }; | ||||
|  | ||||
| const HandleType = { | ||||
|     NONE:    0, | ||||
|     CONTACT: 1, | ||||
|     ROOM:    2, | ||||
|     LIST:    3, | ||||
|     GROUP:   4 | ||||
| }; | ||||
|  | ||||
| const CHANNEL_NAME = TELEPATHY + '.Channel'; | ||||
| const ChannelIface = { | ||||
|     name: CHANNEL_NAME, | ||||
|     signals: [ | ||||
|         { name: 'Closed', | ||||
|           inSignature: '' } | ||||
|     ] | ||||
| }; | ||||
| let Channel = DBus.makeProxyClass(ChannelIface); | ||||
|  | ||||
| const CHANNEL_TEXT_NAME = CHANNEL_NAME + '.Type.Text'; | ||||
| const ChannelTextIface = { | ||||
|     name: CHANNEL_TEXT_NAME, | ||||
|     methods: [ | ||||
|         { name: 'ListPendingMessages', | ||||
|           inSignature: 'b', | ||||
|           outSignature: 'a(uuuuus)' | ||||
|         }, | ||||
|         { name: 'AcknowledgePendingMessages', | ||||
|           inSignature: 'au', | ||||
|           outSignature: '' | ||||
|         }, | ||||
|         { name: 'Send', | ||||
|           inSignature: 'us', | ||||
|           outSignature: '' | ||||
|         } | ||||
|     ], | ||||
|     signals: [ | ||||
|         { name: 'Received', | ||||
|           inSignature: 'uuuuus' }, | ||||
|         { name: 'Sent', | ||||
|           inSignature: 'uus' } | ||||
|     ] | ||||
| }; | ||||
| let ChannelText = DBus.makeProxyClass(ChannelTextIface); | ||||
|  | ||||
| const ChannelTextMessageType = { | ||||
|     NORMAL: 0, | ||||
|     ACTION: 1, | ||||
|     NOTICE: 2, | ||||
|     AUTO_REPLY: 3, | ||||
|     DELIVERY_REPORT: 4 | ||||
| }; | ||||
|  | ||||
| const CHANNEL_CONTACT_LIST_NAME = CHANNEL_NAME + '.Type.ContactList'; | ||||
| // There is no interface associated with ContactList; it's just a | ||||
| // special kind of Channel.Interface.Group | ||||
|  | ||||
| const CHANNEL_GROUP_NAME = CHANNEL_NAME + '.Interface.Group'; | ||||
| const ChannelGroupIface = { | ||||
|     name: CHANNEL_GROUP_NAME, | ||||
|     properties: [ | ||||
|         { name: 'Members', | ||||
|           signature: 'au', | ||||
|           access: 'read' } | ||||
|     ], | ||||
|     signals: [ | ||||
|         { name: 'MembersChanged', | ||||
|           inSignature: 'sauauauauuu' } | ||||
|     ] | ||||
| }; | ||||
| let ChannelGroup = DBus.makeProxyClass(ChannelGroupIface); | ||||
|  | ||||
| const ACCOUNT_MANAGER_NAME = TELEPATHY + '.AccountManager'; | ||||
| const AccountManagerIface = { | ||||
|     name: ACCOUNT_MANAGER_NAME, | ||||
|     properties: [ | ||||
|         { name: 'ValidAccounts', | ||||
|           signature: 'ao', | ||||
|           access: 'read' } | ||||
|     ], | ||||
|     signals: [ | ||||
|         { name: 'AccountValidityChanged', | ||||
|           inSignature: 'ob' } | ||||
|     ] | ||||
| }; | ||||
| let AccountManager = DBus.makeProxyClass(AccountManagerIface); | ||||
|  | ||||
| const ACCOUNT_NAME = TELEPATHY + '.Account'; | ||||
| const AccountIface = { | ||||
|     name: ACCOUNT_NAME, | ||||
|     properties: [ | ||||
|         { name: 'Connection', | ||||
|           signature: 'o', | ||||
|           access: 'read' } | ||||
|     ] | ||||
| }; | ||||
| let Account = DBus.makeProxyClass(AccountIface); | ||||
|  | ||||
| const CHANNEL_DISPATCHER_NAME = TELEPATHY + '.ChannelDispatcher'; | ||||
| const ChannelDispatcherIface = { | ||||
|     name: CHANNEL_DISPATCHER_NAME, | ||||
|     methods: [ | ||||
|         { name: 'EnsureChannel', | ||||
|           inSignature: 'oa{sv}xs', | ||||
|           outSignature: 'o' } | ||||
|     ] | ||||
| }; | ||||
| let ChannelDispatcher = DBus.makeProxyClass(ChannelDispatcherIface); | ||||
|  | ||||
| const CHANNEL_REQUEST_NAME = TELEPATHY + '.ChannelRequest'; | ||||
| const ChannelRequestIface = { | ||||
|     name: CHANNEL_REQUEST_NAME, | ||||
|     methods: [ | ||||
|         { name: 'Proceed', | ||||
|           inSignature: '', | ||||
|           outSignature: '' } | ||||
|     ], | ||||
|     signals: [ | ||||
|         { name: 'Failed', | ||||
|           signature: 'ss' }, | ||||
|         { name: 'Succeeded', | ||||
|           signature: '' } | ||||
|     ] | ||||
| }; | ||||
| let ChannelRequest = DBus.makeProxyClass(ChannelRequestIface); | ||||
							
								
								
									
										218
									
								
								js/misc/util.js
									
									
									
									
									
								
							
							
						
						| @@ -1,4 +1,4 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const Gdk = imports.gi.Gdk; | ||||
| const Gio = imports.gi.Gio; | ||||
| @@ -6,33 +6,13 @@ const GLib = imports.gi.GLib; | ||||
| const Shell = imports.gi.Shell; | ||||
|  | ||||
| const Main = imports.ui.main; | ||||
| const MessageTray = imports.ui.messageTray; | ||||
|  | ||||
| // http://daringfireball.net/2010/07/improved_regex_for_matching_urls | ||||
| const _balancedParens = '\\((?:[^\\s()<>]+|(?:\\(?:[^\\s()<>]+\\)))*\\)'; | ||||
| const _leadingJunk = '[\\s`(\\[{\'\\"<\u00AB\u201C\u2018]'; | ||||
| const _notTrailingJunk = '[^\\s`!()\\[\\]{};:\'\\".,<>?\u00AB\u00BB\u201C\u201D\u2018\u2019]'; | ||||
| const Gettext = imports.gettext.domain('gnome-shell'); | ||||
| const _ = Gettext.gettext; | ||||
|  | ||||
| const _urlRegexp = new RegExp( | ||||
|     '(^|' + _leadingJunk + ')' + | ||||
|     '(' + | ||||
|         '(?:' + | ||||
|             '[a-z][\\w-]+://' +                   // scheme:// | ||||
|             '|' + | ||||
|             'www\\d{0,3}[.]' +                    // www. | ||||
|             '|' + | ||||
|             '[a-z0-9.\\-]+[.][a-z]{2,4}/' +       // foo.xx/ | ||||
|         ')' + | ||||
|         '(?:' +                                   // one or more: | ||||
|             '[^\\s()<>]+' +                       // run of non-space non-() | ||||
|             '|' +                                 // or | ||||
|             _balancedParens +                     // balanced parens | ||||
|         ')+' + | ||||
|         '(?:' +                                   // end with: | ||||
|             _balancedParens +                     // balanced parens | ||||
|             '|' +                                 // or | ||||
|             _notTrailingJunk +                    // last non-junk char | ||||
|         ')' + | ||||
|     ')', 'gi'); | ||||
| /* http://daringfireball.net/2010/07/improved_regex_for_matching_urls */ | ||||
| const _urlRegexp = new RegExp('\\b(([a-z][\\w-]+:(/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)([^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'\\".,<>?«»“”‘’]))', 'gi'); | ||||
|  | ||||
| // findUrls: | ||||
| // @str: string to find URLs in | ||||
| @@ -45,7 +25,7 @@ const _urlRegexp = new RegExp( | ||||
| function findUrls(str) { | ||||
|     let res = [], match; | ||||
|     while ((match = _urlRegexp.exec(str))) | ||||
|         res.push({ url: match[2], pos: match.index + match[1].length }); | ||||
|         res.push({ url: match[0], pos: match.index }); | ||||
|     return res; | ||||
| } | ||||
|  | ||||
| @@ -69,13 +49,27 @@ function spawn(argv) { | ||||
| // occur when trying to parse or start the program. | ||||
| function spawnCommandLine(command_line) { | ||||
|     try { | ||||
|         let [success, argv] = GLib.shell_parse_argv(command_line); | ||||
|         let [success, argc, argv] = GLib.shell_parse_argv(command_line); | ||||
|         trySpawn(argv); | ||||
|     } catch (err) { | ||||
|         _handleSpawnError(command_line, err); | ||||
|     } | ||||
| } | ||||
|  | ||||
| // spawnDesktop: | ||||
| // @id: a desktop file ID | ||||
| // | ||||
| // Spawns the desktop file identified by @id using startup notification, | ||||
| // etc, handling any errors that occur when trying to find or start | ||||
| // the program. | ||||
| function spawnDesktop(id) { | ||||
|     try { | ||||
|         trySpawnDesktop(id); | ||||
|     } catch (err) { | ||||
|         _handleSpawnError(id, err); | ||||
|     } | ||||
| } | ||||
|  | ||||
| // trySpawn: | ||||
| // @argv: an argv array | ||||
| // | ||||
| @@ -109,10 +103,10 @@ function trySpawn(argv) | ||||
| // Runs @command_line in the background. If launching @command_line | ||||
| // fails, this will throw an error. | ||||
| function trySpawnCommandLine(command_line) { | ||||
|     let success, argv; | ||||
|     let success, argc, argv; | ||||
|  | ||||
|     try { | ||||
|         [success, argv] = GLib.shell_parse_argv(command_line); | ||||
|         [success, argc, argv] = GLib.shell_parse_argv(command_line); | ||||
|     } catch (err) { | ||||
|         // Replace "Error invoking GLib.shell_parse_argv: " with | ||||
|         // something nicer | ||||
| @@ -123,9 +117,41 @@ function trySpawnCommandLine(command_line) { | ||||
|     trySpawn(argv); | ||||
| } | ||||
|  | ||||
| // trySpawnDesktop: | ||||
| // @id: a desktop file ID | ||||
| // | ||||
| // Spawns the desktop file identified by @id using startup notification. | ||||
| // On error, throws an exception. | ||||
| function trySpawnDesktop(id) { | ||||
|     let app; | ||||
|  | ||||
|     // shell_app_system_load_from_desktop_file() will end up returning | ||||
|     // a stupid error message if the desktop file doesn't exist, but | ||||
|     // that's the only case it returns an error for, so we just | ||||
|     // substitute our own error in instead | ||||
|     try { | ||||
|         app = Shell.AppSystem.get_default().load_from_desktop_file(id + '.desktop'); | ||||
|     } catch (err) { | ||||
|         throw new Error(_("No such application")); | ||||
|     } | ||||
|  | ||||
|     try { | ||||
|         app.launch(); | ||||
|     } catch(err) { | ||||
|         // see trySpawn | ||||
|         err.message = err.message.replace(/.*\((.+)\)/, '$1'); | ||||
|         throw err; | ||||
|     } | ||||
| } | ||||
|  | ||||
| function _handleSpawnError(command, err) { | ||||
|     let title = _("Execution of '%s' failed:").format(command); | ||||
|     Main.notifyError(title, err.message); | ||||
|  | ||||
|     let source = new MessageTray.SystemNotificationSource(); | ||||
|     Main.messageTray.add(source); | ||||
|     let notification = new MessageTray.Notification(source, title, err.message); | ||||
|     notification.setTransient(true); | ||||
|     source.notify(notification); | ||||
| } | ||||
|  | ||||
| // killall: | ||||
| @@ -152,133 +178,3 @@ function killall(processName) { | ||||
|         logError(e, 'Failed to kill ' + processName); | ||||
|     } | ||||
| } | ||||
|  | ||||
| // This was ported from network-manager-applet | ||||
| // Copyright 2007 - 2011 Red Hat, Inc. | ||||
| // Author: Dan Williams <dcbw@redhat.com> | ||||
|  | ||||
| const _IGNORED_WORDS = [ | ||||
|         'Semiconductor', | ||||
|         'Components', | ||||
|         'Corporation', | ||||
|         'Communications', | ||||
|         'Company', | ||||
|         'Corp.', | ||||
|         'Corp', | ||||
|         'Co.', | ||||
|         'Inc.', | ||||
|         'Inc', | ||||
|         'Incorporated', | ||||
|         'Ltd.', | ||||
|         'Limited.', | ||||
|         'Intel', | ||||
|         'chipset', | ||||
|         'adapter', | ||||
|         '[hex]', | ||||
|         'NDIS', | ||||
|         'Module' | ||||
| ]; | ||||
|  | ||||
| const _IGNORED_PHRASES = [ | ||||
|         'Multiprotocol MAC/baseband processor', | ||||
|         'Wireless LAN Controller', | ||||
|         'Wireless LAN Adapter', | ||||
|         'Wireless Adapter', | ||||
|         'Network Connection', | ||||
|         'Wireless Cardbus Adapter', | ||||
|         'Wireless CardBus Adapter', | ||||
|         '54 Mbps Wireless PC Card', | ||||
|         'Wireless PC Card', | ||||
|         'Wireless PC', | ||||
|         'PC Card with XJACK(r) Antenna', | ||||
|         'Wireless cardbus', | ||||
|         'Wireless LAN PC Card', | ||||
|         'Technology Group Ltd.', | ||||
|         'Communication S.p.A.', | ||||
|         'Business Mobile Networks BV', | ||||
|         'Mobile Broadband Minicard Composite Device', | ||||
|         'Mobile Communications AB', | ||||
|         '(PC-Suite Mode)' | ||||
| ]; | ||||
|  | ||||
| function fixupPCIDescription(desc) { | ||||
|     desc = desc.replace(/[_,]/, ' '); | ||||
|  | ||||
|     /* Attempt to shorten ID by ignoring certain phrases */ | ||||
|     for (let i = 0; i < _IGNORED_PHRASES.length; i++) { | ||||
|         let item = _IGNORED_PHRASES[i]; | ||||
|         let pos = desc.indexOf(item); | ||||
|         if (pos != -1) { | ||||
|             let before = desc.substring(0, pos); | ||||
|             let after = desc.substring(pos + item.length, desc.length); | ||||
|             desc = before + after; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     /* Attmept to shorten ID by ignoring certain individual words */ | ||||
|     let words = desc.split(' '); | ||||
|     let out = [ ]; | ||||
|     for (let i = 0; i < words.length; i++) { | ||||
|         let item = words[i]; | ||||
|  | ||||
|         // skip empty items (that come out from consecutive spaces) | ||||
|         if (item.length == 0) | ||||
|             continue; | ||||
|  | ||||
|         if (_IGNORED_WORDS.indexOf(item) == -1) { | ||||
|             out.push(item); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     return out.join(' '); | ||||
| } | ||||
|  | ||||
| // lowerBound: | ||||
| // @array: an array or array-like object, already sorted | ||||
| //         according to @cmp | ||||
| // @val: the value to add | ||||
| // @cmp: a comparator (or undefined to compare as numbers) | ||||
| // | ||||
| // Returns the position of the first element that is not | ||||
| // lower than @val, according to @cmp. | ||||
| // That is, returns the first position at which it | ||||
| // is possible to insert @val without violating the | ||||
| // order. | ||||
| // This is quite like an ordinary binary search, except | ||||
| // that it doesn't stop at first element comparing equal. | ||||
|  | ||||
| function lowerBound(array, val, cmp) { | ||||
|     let min, max, mid, v; | ||||
|     cmp = cmp || function(a, b) { return a - b; }; | ||||
|  | ||||
|     if (array.length == 0) | ||||
|         return 0; | ||||
|  | ||||
|     min = 0; max = array.length; | ||||
|     while (min < (max - 1)) { | ||||
|         mid = Math.floor((min + max) / 2); | ||||
|         v = cmp(array[mid], val); | ||||
|  | ||||
|         if (v < 0) | ||||
|             min = mid + 1; | ||||
|         else | ||||
|             max = mid; | ||||
|     } | ||||
|  | ||||
|     return (min == max || cmp(array[min], val) < 0) ? max : min; | ||||
| } | ||||
|  | ||||
| // insertSorted: | ||||
| // @array: an array sorted according to @cmp | ||||
| // @val: a value to insert | ||||
| // @cmp: the sorting function | ||||
| // | ||||
| // Inserts @val into @array, preserving the | ||||
| // sorting invariants. | ||||
| // Returns the position at which it was inserted | ||||
| function insertSorted(array, val, cmp) { | ||||
|     let pos = lowerBound(array, val, cmp); | ||||
|     array.splice(pos, 0, val); | ||||
|  | ||||
|     return pos; | ||||
| } | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const Main = imports.ui.main; | ||||
| const Scripting = imports.ui.scripting; | ||||
| @@ -21,77 +21,26 @@ let METRICS = { | ||||
|     overviewFpsSubsequent: | ||||
|     { description: "Frames rate when going to the overview, second time", | ||||
|       units: "frames / s" }, | ||||
|     overviewFps5Windows: | ||||
|     { description: "Frames rate when going to the overview, 5 windows open", | ||||
|       units: "frames / s" }, | ||||
|     overviewFps10Windows: | ||||
|     { description: "Frames rate when going to the overview, 10 windows open", | ||||
|       units: "frames / s" }, | ||||
|     overviewFps5Maximized: | ||||
|     { description: "Frames rate when going to the overview, 5 maximized windows open", | ||||
|       units: "frames / s" }, | ||||
|     overviewFps10Maximized: | ||||
|     { description: "Frames rate when going to the overview, 10 maximized windows open", | ||||
|       units: "frames / s" }, | ||||
|     overviewFps5Alpha: | ||||
|     { description: "Frames rate when going to the overview, 5 alpha-transparent windows open", | ||||
|       units: "frames / s" }, | ||||
|     overviewFps10Alpha: | ||||
|     { description: "Frames rate when going to the overview, 10 alpha-transparent windows open", | ||||
|       units: "frames / s" }, | ||||
|     usedAfterOverview: | ||||
|     { description: "Malloc'ed bytes after the overview is shown once", | ||||
|       units: "B" }, | ||||
|     leakedAfterOverview: | ||||
|     { description: "Additional malloc'ed bytes the second time the overview is shown", | ||||
|       units: "B" }, | ||||
|     applicationsShowTimeFirst: | ||||
|     { description: "Time to switch to applications view, first time", | ||||
|       units: "us" }, | ||||
|     applicationsShowTimeSubsequent: | ||||
|     { description: "Time to switch to applications view, second time", | ||||
|       units: "us"} | ||||
|       units: "B" } | ||||
| }; | ||||
|  | ||||
| let WINDOW_CONFIGS = [ | ||||
|     { width: 640, height: 480, alpha: false, maximized: false, count: 1,  metric: 'overviewFpsSubsequent' }, | ||||
|     { width: 640, height: 480, alpha: false, maximized: false, count: 5,  metric: 'overviewFps5Windows'  }, | ||||
|     { width: 640, height: 480, alpha: false, maximized: false, count: 10, metric: 'overviewFps10Windows'  }, | ||||
|     { width: 640, height: 480, alpha: false, maximized: true,  count: 5,  metric: 'overviewFps5Maximized' }, | ||||
|     { width: 640, height: 480, alpha: false, maximized: true,  count: 10, metric: 'overviewFps10Maximized' }, | ||||
|     { width: 640, height: 480, alpha: true,  maximized: false, count: 5,  metric: 'overviewFps5Alpha' }, | ||||
|     { width: 640, height: 480, alpha: true,  maximized: false, count: 10, metric: 'overviewFps10Alpha' } | ||||
| ]; | ||||
|  | ||||
| function run() { | ||||
|     Scripting.defineScriptEvent("overviewShowStart", "Starting to show the overview"); | ||||
|     Scripting.defineScriptEvent("overviewShowDone", "Overview finished showing"); | ||||
|     Scripting.defineScriptEvent("afterShowHide", "After a show/hide cycle for the overview"); | ||||
|     Scripting.defineScriptEvent("applicationsShowStart", "Starting to switch to applications view"); | ||||
|     Scripting.defineScriptEvent("applicationsShowDone", "Done switching to applications view"); | ||||
|  | ||||
|     Main.overview.connect('shown', function() { | ||||
|                               Scripting.scriptEvent('overviewShowDone'); | ||||
|                           }); | ||||
|  | ||||
|     yield Scripting.sleep(1000); | ||||
|  | ||||
|     for (let i = 0; i < 2 * WINDOW_CONFIGS.length; i++) { | ||||
|         // We go to the overview twice for each configuration; the first time | ||||
|         // to calculate the mipmaps for the windows, the second time to get | ||||
|         // a clean set of numbers. | ||||
|         if ((i % 2) == 0) { | ||||
|             let config = WINDOW_CONFIGS[i / 2]; | ||||
|             yield Scripting.destroyTestWindows(); | ||||
|  | ||||
|             for (let k = 0; k < config.count; k++) | ||||
|                 yield Scripting.createTestWindow(config.width, config.height, config.alpha, config.maximized); | ||||
|  | ||||
|             yield Scripting.waitTestWindows(); | ||||
|             yield Scripting.sleep(1000); | ||||
|             yield Scripting.waitLeisure(); | ||||
|         } | ||||
|  | ||||
|     yield Scripting.waitLeisure(); | ||||
|     for (let i = 0; i < 2; i++) { | ||||
|         Scripting.scriptEvent('overviewShowStart'); | ||||
|         Main.overview.show(); | ||||
|  | ||||
| @@ -104,21 +53,6 @@ function run() { | ||||
|         Scripting.collectStatistics(); | ||||
|         Scripting.scriptEvent('afterShowHide'); | ||||
|     } | ||||
|  | ||||
|     yield Scripting.destroyTestWindows(); | ||||
|     yield Scripting.sleep(1000); | ||||
|  | ||||
|     Main.overview.show(); | ||||
|     yield Scripting.waitLeisure(); | ||||
|  | ||||
|     for (let i = 0; i < 2; i++) { | ||||
|         Scripting.scriptEvent('applicationsShowStart'); | ||||
|         Main.overview._viewSelector.switchTab('applications'); | ||||
|         yield Scripting.waitLeisure(); | ||||
|         Scripting.scriptEvent('applicationsShowDone'); | ||||
|         Main.overview._viewSelector.switchTab('windows'); | ||||
|         yield Scripting.waitLeisure(); | ||||
|     } | ||||
| } | ||||
|  | ||||
| let showingOverview = false; | ||||
| @@ -130,8 +64,6 @@ let mallocUsedSize = 0; | ||||
| let overviewShowCount = 0; | ||||
| let firstOverviewUsedSize; | ||||
| let haveSwapComplete = false; | ||||
| let applicationsShowStart; | ||||
| let applicationsShowCount = 0; | ||||
|  | ||||
| function script_overviewShowStart(time) { | ||||
|     showingOverview = true; | ||||
| @@ -147,18 +79,6 @@ function script_overviewShowDone(time) { | ||||
|     finishedShowingOverview = true; | ||||
| } | ||||
|  | ||||
| function script_applicationsShowStart(time) { | ||||
|     applicationsShowStart = time; | ||||
| } | ||||
|  | ||||
| function script_applicationsShowDone(time) { | ||||
|     applicationsShowCount++; | ||||
|     if (applicationsShowCount == 1) | ||||
|         METRICS.applicationsShowTimeFirst.value = time - applicationsShowStart; | ||||
|     else | ||||
|         METRICS.applicationsShowTimeSubsequent.value = time - applicationsShowStart; | ||||
| } | ||||
|  | ||||
| function script_afterShowHide(time) { | ||||
|     if (overviewShowCount == 1) { | ||||
|         METRICS.usedAfterOverview.value = mallocUsedSize; | ||||
| @@ -193,15 +113,9 @@ function _frameDone(time) { | ||||
|         if (overviewShowCount == 1) { | ||||
|             METRICS.overviewLatencyFirst.value = overviewLatency; | ||||
|             METRICS.overviewFpsFirst.value = fps; | ||||
|         } else if (overviewShowCount == 2) { | ||||
|         } else { | ||||
|             METRICS.overviewLatencySubsequent.value = overviewLatency; | ||||
|         } | ||||
|  | ||||
|         // Other than overviewFpsFirst, we collect FPS metrics the second | ||||
|         // we show each window configuration. overviewShowCount is 1,2,3... | ||||
|         if (overviewShowCount % 2 == 0) { | ||||
|             let config = WINDOW_CONFIGS[(overviewShowCount / 2) - 1]; | ||||
|             METRICS[config.metric].value = fps; | ||||
|             METRICS.overviewFpsSubsequent.value = fps; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
							
								
								
									
										505
									
								
								js/ui/altTab.js
									
									
									
									
									
								
							
							
						
						| @@ -1,23 +1,19 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const Clutter = imports.gi.Clutter; | ||||
| const Gdk = imports.gi.Gdk; | ||||
| const Gtk = imports.gi.Gtk; | ||||
| const Lang = imports.lang; | ||||
| const Mainloop = imports.mainloop; | ||||
| const Meta = imports.gi.Meta; | ||||
| const Shell = imports.gi.Shell; | ||||
| const Signals = imports.signals; | ||||
| const St = imports.gi.St; | ||||
| const Atk = imports.gi.Atk; | ||||
|  | ||||
| const Main = imports.ui.main; | ||||
| const Tweener = imports.ui.tweener; | ||||
|  | ||||
| const POPUP_APPICON_SIZE = 96; | ||||
| const POPUP_SCROLL_TIME = 0.10; // seconds | ||||
| const POPUP_DELAY_TIMEOUT = 150; // milliseconds | ||||
| const POPUP_FADE_OUT_TIME = 0.1; // seconds | ||||
| const POPUP_FADE_TIME = 0.1; // seconds | ||||
|  | ||||
| const APP_ICON_HOVER_TIMEOUT = 200; // milliseconds | ||||
|  | ||||
| @@ -33,21 +29,11 @@ function mod(a, b) { | ||||
|     return (a + b) % b; | ||||
| } | ||||
|  | ||||
| function primaryModifier(mask) { | ||||
|     if (mask == 0) | ||||
|         return 0; | ||||
|  | ||||
|     let primary = 1; | ||||
|     while (mask > 1) { | ||||
|         mask >>= 1; | ||||
|         primary <<= 1; | ||||
|     } | ||||
|     return primary; | ||||
| function AltTabPopup() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| const AltTabPopup = new Lang.Class({ | ||||
|     Name: 'AltTabPopup', | ||||
|  | ||||
| AltTabPopup.prototype = { | ||||
|     _init : function() { | ||||
|         this.actor = new Shell.GenericContainer({ name: 'altTabPopup', | ||||
|                                                   reactive: true, | ||||
| @@ -60,13 +46,11 @@ const AltTabPopup = new Lang.Class({ | ||||
|         this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); | ||||
|  | ||||
|         this._haveModal = false; | ||||
|         this._modifierMask = 0; | ||||
|  | ||||
|         this._currentApp = 0; | ||||
|         this._currentWindow = -1; | ||||
|         this._thumbnailTimeoutId = 0; | ||||
|         this._motionTimeoutId = 0; | ||||
|         this._initialDelayTimeoutId = 0; | ||||
|  | ||||
|         this.thumbnailsVisible = false; | ||||
|  | ||||
| @@ -89,7 +73,7 @@ const AltTabPopup = new Lang.Class({ | ||||
|  | ||||
|     _allocate: function (actor, box, flags) { | ||||
|         let childBox = new Clutter.ActorBox(); | ||||
|         let primary = Main.layoutManager.primaryMonitor; | ||||
|         let primary = global.get_primary_monitor(); | ||||
|  | ||||
|         let leftPadding = this.actor.get_theme_node().get_padding(St.Side.LEFT); | ||||
|         let rightPadding = this.actor.get_theme_node().get_padding(St.Side.RIGHT); | ||||
| @@ -102,7 +86,7 @@ const AltTabPopup = new Lang.Class({ | ||||
|         let [childMinHeight, childNaturalHeight] = this._appSwitcher.actor.get_preferred_height(primary.width - hPadding); | ||||
|         let [childMinWidth, childNaturalWidth] = this._appSwitcher.actor.get_preferred_width(childNaturalHeight); | ||||
|         childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2)); | ||||
|         childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth); | ||||
|         childBox.x2 = Math.min(childBox.x1 + primary.width - hPadding, childBox.x1 + childNaturalWidth); | ||||
|         childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2); | ||||
|         childBox.y2 = childBox.y1 + childNaturalHeight; | ||||
|         this._appSwitcher.actor.allocate(childBox, flags); | ||||
| @@ -112,6 +96,8 @@ const AltTabPopup = new Lang.Class({ | ||||
|         // those calculations | ||||
|         if (this._thumbnails) { | ||||
|             let icon = this._appIcons[this._currentApp].actor; | ||||
|             // Force a stage relayout to make sure we get the correct position | ||||
|             global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, 0, 0); | ||||
|             let [posX, posY] = icon.get_transformed_position(); | ||||
|             let thumbnailCenter = posX + icon.width / 2; | ||||
|             let [childMinWidth, childNaturalWidth] = this._thumbnails.actor.get_preferred_width(-1); | ||||
| @@ -127,57 +113,23 @@ const AltTabPopup = new Lang.Class({ | ||||
|             if (childBox.x2 > primary.x + primary.width - rightPadding) | ||||
|                 childBox.x2 = primary.x + primary.width - rightPadding; | ||||
|             childBox.y1 = this._appSwitcher.actor.allocation.y2 + spacing; | ||||
|             this._thumbnails.addClones(primary.y + primary.height - bottomPadding - childBox.y1); | ||||
|             this._thumbnails.addClones(primary.height - bottomPadding - childBox.y1); | ||||
|             let [childMinHeight, childNaturalHeight] = this._thumbnails.actor.get_preferred_height(-1); | ||||
|             childBox.y2 = childBox.y1 + childNaturalHeight; | ||||
|             this._thumbnails.actor.allocate(childBox, flags); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _getAppLists: function() { | ||||
|     show : function(backward) { | ||||
|         let tracker = Shell.WindowTracker.get_default(); | ||||
|         let appSys = Shell.AppSystem.get_default(); | ||||
|         let allApps = appSys.get_running (); | ||||
|         let apps = tracker.get_running_apps (''); | ||||
|  | ||||
|         let screen = global.screen; | ||||
|         let display = screen.get_display(); | ||||
|         let windows = display.get_tab_list(Meta.TabList.NORMAL_ALL, screen, | ||||
|                                            screen.get_active_workspace()); | ||||
|  | ||||
|         // windows is only the windows on the current workspace. For | ||||
|         // each one, if it corresponds to an app we know, move that | ||||
|         // app from allApps to apps. | ||||
|         let apps = []; | ||||
|         for (let i = 0; i < windows.length && allApps.length != 0; i++) { | ||||
|             let app = tracker.get_window_app(windows[i]); | ||||
|             let index = allApps.indexOf(app); | ||||
|             if (index != -1) { | ||||
|                 apps.push(app); | ||||
|                 allApps.splice(index, 1); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         // Now @apps is a list of apps on the current workspace, in | ||||
|         // standard Alt+Tab order (MRU except for minimized windows), | ||||
|         // and allApps is a list of apps that only appear on other | ||||
|         // workspaces, sorted by user_time, which is good enough. | ||||
|         return [apps, allApps]; | ||||
|     }, | ||||
|  | ||||
|     show : function(backward, binding, mask) { | ||||
|         let [localApps, otherApps] = this._getAppLists(); | ||||
|  | ||||
|         if (localApps.length == 0 && otherApps.length == 0) | ||||
|         if (!apps.length) | ||||
|             return false; | ||||
|  | ||||
|         if (!Main.pushModal(this.actor)) { | ||||
|             // Probably someone else has a pointer grab, try again with keyboard only | ||||
|             if (!Main.pushModal(this.actor, global.get_current_time(), Meta.ModalOptions.POINTER_ALREADY_GRABBED)) { | ||||
|                 return false; | ||||
|             } | ||||
|         } | ||||
|         if (!Main.pushModal(this.actor)) | ||||
|             return false; | ||||
|         this._haveModal = true; | ||||
|         this._modifierMask = primaryModifier(mask); | ||||
|  | ||||
|         this.actor.connect('key-press-event', Lang.bind(this, this._keyPressEvent)); | ||||
|         this.actor.connect('key-release-event', Lang.bind(this, this._keyReleaseEvent)); | ||||
| @@ -185,39 +137,38 @@ const AltTabPopup = new Lang.Class({ | ||||
|         this.actor.connect('button-press-event', Lang.bind(this, this._clickedOutside)); | ||||
|         this.actor.connect('scroll-event', Lang.bind(this, this._onScroll)); | ||||
|  | ||||
|         this._appSwitcher = new AppSwitcher(localApps, otherApps, this); | ||||
|         this._appSwitcher = new AppSwitcher(apps, this); | ||||
|         this.actor.add_actor(this._appSwitcher.actor); | ||||
|         this._appSwitcher.connect('item-activated', Lang.bind(this, this._appActivated)); | ||||
|         this._appSwitcher.connect('item-entered', Lang.bind(this, this._appEntered)); | ||||
|  | ||||
|         this._appIcons = this._appSwitcher.icons; | ||||
|  | ||||
|         // Need to force an allocation so we can figure out whether we | ||||
|         // need to scroll when selecting | ||||
|         this.actor.opacity = 0; | ||||
|         this.actor.show(); | ||||
|         this.actor.get_allocation_box(); | ||||
|  | ||||
|         // Make the initial selection | ||||
|         if (binding == 'switch-group') { | ||||
|             if (backward) { | ||||
|                 this._select(0, this._appIcons[0].cachedWindows.length - 1); | ||||
|             } else { | ||||
|                 if (this._appIcons[0].cachedWindows.length > 1) | ||||
|                     this._select(0, 1); | ||||
|                 else | ||||
|                     this._select(0, 0); | ||||
|             } | ||||
|         } else if (binding == 'switch-group-backward') { | ||||
|             this._select(0, this._appIcons[0].cachedWindows.length - 1); | ||||
|         } else if (binding == 'switch-windows-backward') { | ||||
|             this._select(this._appIcons.length - 1); | ||||
|         } else if (this._appIcons.length == 1) { | ||||
|             this._select(0); | ||||
|         if (this._appIcons.length == 1) { | ||||
|             if (!backward && this._appIcons[0].cachedWindows.length > 1) { | ||||
|                 // For compatibility with the multi-app case below | ||||
|                 this._select(0, 1, true); | ||||
|             } else | ||||
|                 this._select(0); | ||||
|         } else if (backward) { | ||||
|             this._select(this._appIcons.length - 1); | ||||
|         } else { | ||||
|             this._select(1); | ||||
|             let firstWindows = this._appIcons[0].cachedWindows; | ||||
|             if (firstWindows.length > 1) { | ||||
|                 let curAppNextWindow = firstWindows[1]; | ||||
|                 let nextAppWindow = this._appIcons[1].cachedWindows[0]; | ||||
|  | ||||
|                 // If the next window of the current app is more-recently-used | ||||
|                 // than the first window of the next app, then select it. | ||||
|                 if (curAppNextWindow.get_workspace() == global.screen.get_active_workspace() && | ||||
|                     curAppNextWindow.get_user_time() > nextAppWindow.get_user_time()) | ||||
|                     this._select(0, 1, true); | ||||
|                 else | ||||
|                     this._select(1); | ||||
|             } else { | ||||
|                 this._select(1); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         // There's a race condition; if the user released Alt before | ||||
| @@ -226,18 +177,18 @@ const AltTabPopup = new Lang.Class({ | ||||
|         // details.) So we check now. (Have to do this after updating | ||||
|         // selection.) | ||||
|         let [x, y, mods] = global.get_pointer(); | ||||
|         if (!(mods & this._modifierMask)) { | ||||
|         if (!(mods & Gdk.ModifierType.MOD1_MASK)) { | ||||
|             this._finish(); | ||||
|             return false; | ||||
|         } | ||||
|  | ||||
|         // We delay showing the popup so that fast Alt+Tab users aren't | ||||
|         // disturbed by the popup briefly flashing. | ||||
|         this._initialDelayTimeoutId = Mainloop.timeout_add(POPUP_DELAY_TIMEOUT, | ||||
|                                                            Lang.bind(this, function () { | ||||
|                                                                this.actor.opacity = 255; | ||||
|                                                                this._initialDelayTimeoutId = 0; | ||||
|                                                            })); | ||||
|         this.actor.opacity = 0; | ||||
|         this.actor.show(); | ||||
|         Tweener.addTween(this.actor, | ||||
|                          { opacity: 255, | ||||
|                            time: POPUP_FADE_TIME, | ||||
|                            transition: 'easeOutQuad' | ||||
|                          }); | ||||
|  | ||||
|         return true; | ||||
|     }, | ||||
| @@ -266,31 +217,42 @@ const AltTabPopup = new Lang.Class({ | ||||
|  | ||||
|     _keyPressEvent : function(actor, event) { | ||||
|         let keysym = event.get_key_symbol(); | ||||
|         let event_state = event.get_state(); | ||||
|         let backwards = event_state & Clutter.ModifierType.SHIFT_MASK; | ||||
|         let action = global.display.get_keybinding_action(event.get_key_code(), event_state); | ||||
|         let shift = (Shell.get_event_state(event) & Clutter.ModifierType.SHIFT_MASK); | ||||
|         // X allows servers to represent Shift+Tab in two different ways | ||||
|         if (shift && keysym == Clutter.Tab) | ||||
|             keysym = Clutter.ISO_Left_Tab; | ||||
|  | ||||
|         this._disableHover(); | ||||
|  | ||||
|         if (keysym == Clutter.Escape) { | ||||
|             this.destroy(); | ||||
|         } else if (action == Meta.KeyBindingAction.SWITCH_GROUP) { | ||||
|             this._select(this._currentApp, backwards ? this._previousWindow() : this._nextWindow()); | ||||
|         } else if (action == Meta.KeyBindingAction.SWITCH_GROUP_BACKWARD) { | ||||
|         if (keysym == Clutter.grave) | ||||
|             this._select(this._currentApp, this._nextWindow()); | ||||
|         else if (keysym == Clutter.asciitilde) | ||||
|             this._select(this._currentApp, this._previousWindow()); | ||||
|         } else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS) { | ||||
|             this._select(backwards ? this._previousApp() : this._nextApp()); | ||||
|         } else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS_BACKWARD) { | ||||
|             this._select(this._previousApp()); | ||||
|         } else if (this._thumbnailsFocused) { | ||||
|             if (keysym == Clutter.Left) | ||||
|         else if (keysym == Clutter.Escape) | ||||
|             this.destroy(); | ||||
|         else if (this._thumbnailsFocused) { | ||||
|             if (keysym == Clutter.Tab) { | ||||
|                 if (this._currentWindow == this._appIcons[this._currentApp].cachedWindows.length - 1) | ||||
|                     this._select(this._nextApp()); | ||||
|                 else | ||||
|                     this._select(this._currentApp, this._nextWindow()); | ||||
|             } else if (keysym == Clutter.ISO_Left_Tab) { | ||||
|                 if (this._currentWindow == 0 || this._currentWindow == -1) | ||||
|                     this._select(this._previousApp()); | ||||
|                 else | ||||
|                     this._select(this._currentApp, this._previousWindow()); | ||||
|             } else if (keysym == Clutter.Left) | ||||
|                 this._select(this._currentApp, this._previousWindow()); | ||||
|             else if (keysym == Clutter.Right) | ||||
|                 this._select(this._currentApp, this._nextWindow()); | ||||
|             else if (keysym == Clutter.Up) | ||||
|                 this._select(this._currentApp, null, true); | ||||
|         } else { | ||||
|             if (keysym == Clutter.Left) | ||||
|             if (keysym == Clutter.Tab) | ||||
|                 this._select(this._nextApp()); | ||||
|             else if (keysym == Clutter.ISO_Left_Tab) | ||||
|                 this._select(this._previousApp()); | ||||
|             else if (keysym == Clutter.Left) | ||||
|                 this._select(this._previousApp()); | ||||
|             else if (keysym == Clutter.Right) | ||||
|                 this._select(this._nextApp()); | ||||
| @@ -303,7 +265,7 @@ const AltTabPopup = new Lang.Class({ | ||||
|  | ||||
|     _keyReleaseEvent : function(actor, event) { | ||||
|         let [x, y, mods] = global.get_pointer(); | ||||
|         let state = mods & this._modifierMask; | ||||
|         let state = mods & Clutter.ModifierType.MOD1_MASK; | ||||
|  | ||||
|         if (state == 0) | ||||
|             this._finish(); | ||||
| @@ -407,19 +369,11 @@ const AltTabPopup = new Lang.Class({ | ||||
|         this.destroy(); | ||||
|     }, | ||||
|  | ||||
|     _popModal: function() { | ||||
|         if (this._haveModal) { | ||||
|             Main.popModal(this.actor); | ||||
|             this._haveModal = false; | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     destroy : function() { | ||||
|         this._popModal(); | ||||
|         if (this.actor.visible) { | ||||
|             Tweener.addTween(this.actor, | ||||
|                              { opacity: 0, | ||||
|                                time: POPUP_FADE_OUT_TIME, | ||||
|                                time: POPUP_FADE_TIME, | ||||
|                                transition: 'easeOutQuad', | ||||
|                                onComplete: Lang.bind(this, | ||||
|                                    function() { | ||||
| @@ -431,7 +385,8 @@ const AltTabPopup = new Lang.Class({ | ||||
|     }, | ||||
|  | ||||
|     _onDestroy : function() { | ||||
|         this._popModal(); | ||||
|         if (this._haveModal) | ||||
|             Main.popModal(this.actor); | ||||
|  | ||||
|         if (this._thumbnails) | ||||
|             this._destroyThumbnails(); | ||||
| @@ -440,8 +395,6 @@ const AltTabPopup = new Lang.Class({ | ||||
|             Mainloop.source_remove(this._motionTimeoutId); | ||||
|         if (this._thumbnailTimeoutId != 0) | ||||
|             Mainloop.source_remove(this._thumbnailTimeoutId); | ||||
|         if (this._initialDelayTimeoutId != 0) | ||||
|             Mainloop.source_remove(this._initialDelayTimeoutId); | ||||
|     }, | ||||
|  | ||||
|     /** | ||||
| @@ -519,7 +472,6 @@ const AltTabPopup = new Lang.Class({ | ||||
|                                                         }) | ||||
|                          }); | ||||
|         this._thumbnails = null; | ||||
|         this._appSwitcher._items[this._currentApp].remove_accessible_state (Atk.StateType.EXPANDED); | ||||
|     }, | ||||
|  | ||||
|     _createThumbnails : function() { | ||||
| @@ -529,10 +481,6 @@ const AltTabPopup = new Lang.Class({ | ||||
|  | ||||
|         this.actor.add_actor(this._thumbnails.actor); | ||||
|  | ||||
|         // Need to force an allocation so we can figure out whether we | ||||
|         // need to scroll when selecting | ||||
|         this._thumbnails.actor.get_allocation_box(); | ||||
|  | ||||
|         this._thumbnails.actor.opacity = 0; | ||||
|         Tweener.addTween(this._thumbnails.actor, | ||||
|                          { opacity: 255, | ||||
| @@ -540,14 +488,14 @@ const AltTabPopup = new Lang.Class({ | ||||
|                            transition: 'easeOutQuad', | ||||
|                            onComplete: Lang.bind(this, function () { this.thumbnailsVisible = true; }) | ||||
|                          }); | ||||
|  | ||||
|         this._appSwitcher._items[this._currentApp].add_accessible_state (Atk.StateType.EXPANDED); | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| const SwitcherList = new Lang.Class({ | ||||
|     Name: 'SwitcherList', | ||||
| function SwitcherList(squareItems) { | ||||
|     this._init(squareItems); | ||||
| } | ||||
|  | ||||
| SwitcherList.prototype = { | ||||
|     _init : function(squareItems) { | ||||
|         this.actor = new Shell.GenericContainer({ style_class: 'switcher-list' }); | ||||
|         this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth)); | ||||
| @@ -566,24 +514,29 @@ const SwitcherList = new Lang.Class({ | ||||
|         this._list.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight)); | ||||
|         this._list.connect('allocate', Lang.bind(this, this._allocate)); | ||||
|  | ||||
|         this._scrollView = new St.ScrollView({ style_class: 'hfade', | ||||
|                                                enable_mouse_scrolling: false }); | ||||
|         this._scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.NEVER); | ||||
|         this._clipBin = new St.Bin({style_class: 'cbin'}); | ||||
|         this._clipBin.child = this._list; | ||||
|         this.actor.add_actor(this._clipBin); | ||||
|  | ||||
|         let scrollBox = new St.BoxLayout(); | ||||
|         scrollBox.add_actor(this._list); | ||||
|         this._scrollView.add_actor(scrollBox); | ||||
|         this.actor.add_actor(this._scrollView); | ||||
|         this._leftGradient = new St.BoxLayout({style_class: 'thumbnail-scroll-gradient-left', vertical: true}); | ||||
|         this._rightGradient = new St.BoxLayout({style_class: 'thumbnail-scroll-gradient-right', vertical: true}); | ||||
|         this.actor.add_actor(this._leftGradient); | ||||
|         this.actor.add_actor(this._rightGradient); | ||||
|  | ||||
|         // Those arrows indicate whether scrolling in one direction is possible | ||||
|         this._leftArrow = new St.DrawingArea({ style_class: 'switcher-arrow', | ||||
|                                                pseudo_class: 'highlighted' }); | ||||
|         this._leftArrow.connect('repaint', Lang.bind(this, | ||||
|             function() { _drawArrow(this._leftArrow, St.Side.LEFT); })); | ||||
|                                             function (area) { | ||||
|                                                 Shell.draw_box_pointer(area, Shell.PointerDirection.LEFT); | ||||
|                                             })); | ||||
|  | ||||
|         this._rightArrow = new St.DrawingArea({ style_class: 'switcher-arrow', | ||||
|                                                 pseudo_class: 'highlighted' }); | ||||
|         this._rightArrow.connect('repaint', Lang.bind(this, | ||||
|             function() { _drawArrow(this._rightArrow, St.Side.RIGHT); })); | ||||
|                                             function (area) { | ||||
|                                                 Shell.draw_box_pointer(area, Shell.PointerDirection.RIGHT); | ||||
|                                             })); | ||||
|  | ||||
|         this.actor.add_actor(this._leftArrow); | ||||
|         this.actor.add_actor(this._rightArrow); | ||||
| @@ -604,9 +557,21 @@ const SwitcherList = new Lang.Class({ | ||||
|         let childBox = new Clutter.ActorBox(); | ||||
|         let scrollable = this._minSize > box.x2 - box.x1; | ||||
|  | ||||
|         box.y1 -= this.actor.get_theme_node().get_padding(St.Side.TOP); | ||||
|         box.y2 += this.actor.get_theme_node().get_padding(St.Side.BOTTOM); | ||||
|         this._scrollView.allocate(box, flags); | ||||
|         this._clipBin.allocate(box, flags); | ||||
|  | ||||
|         childBox.x1 = 0; | ||||
|         childBox.y1 = 0; | ||||
|         childBox.x2 = this._leftGradient.width; | ||||
|         childBox.y2 = this.actor.height; | ||||
|         this._leftGradient.allocate(childBox, flags); | ||||
|         this._leftGradient.opacity = (this._scrollableLeft && scrollable) ? 255 : 0; | ||||
|  | ||||
|         childBox.x1 = (this.actor.allocation.x2 - this.actor.allocation.x1) - this._rightGradient.width; | ||||
|         childBox.y1 = 0; | ||||
|         childBox.x2 = childBox.x1 + this._rightGradient.width; | ||||
|         childBox.y2 = this.actor.height; | ||||
|         this._rightGradient.allocate(childBox, flags); | ||||
|         this._rightGradient.opacity = (this._scrollableRight && scrollable) ? 255 : 0; | ||||
|  | ||||
|         let arrowWidth = Math.floor(leftPadding / 3); | ||||
|         let arrowHeight = arrowWidth * 2; | ||||
| @@ -615,7 +580,7 @@ const SwitcherList = new Lang.Class({ | ||||
|         childBox.x2 = childBox.x1 + arrowWidth; | ||||
|         childBox.y2 = childBox.y1 + arrowHeight; | ||||
|         this._leftArrow.allocate(childBox, flags); | ||||
|         this._leftArrow.opacity = (this._scrollableLeft && scrollable) ? 255 : 0; | ||||
|         this._leftArrow.opacity = this._leftGradient.opacity; | ||||
|  | ||||
|         arrowWidth = Math.floor(rightPadding / 3); | ||||
|         arrowHeight = arrowWidth * 2; | ||||
| @@ -624,12 +589,12 @@ const SwitcherList = new Lang.Class({ | ||||
|         childBox.x2 = childBox.x1 + arrowWidth; | ||||
|         childBox.y2 = childBox.y1 + arrowHeight; | ||||
|         this._rightArrow.allocate(childBox, flags); | ||||
|         this._rightArrow.opacity = (this._scrollableRight && scrollable) ? 255 : 0; | ||||
|         this._rightArrow.opacity = this._rightGradient.opacity; | ||||
|     }, | ||||
|  | ||||
|     addItem : function(item, label) { | ||||
|         let bbox = new St.Button({ style_class: 'item-box', | ||||
|                                    reactive: true }); | ||||
|     addItem : function(item) { | ||||
|         let bbox = new St.Clickable({ style_class: 'item-box', | ||||
|                                       reactive: true }); | ||||
|  | ||||
|         bbox.set_child(item); | ||||
|         this._list.add_actor(bbox); | ||||
| @@ -638,11 +603,7 @@ const SwitcherList = new Lang.Class({ | ||||
|         bbox.connect('clicked', Lang.bind(this, function() { this._onItemClicked(n); })); | ||||
|         bbox.connect('enter-event', Lang.bind(this, function() { this._onItemEnter(n); })); | ||||
|  | ||||
|         bbox.label_actor = label; | ||||
|  | ||||
|         this._items.push(bbox); | ||||
|  | ||||
|         return bbox; | ||||
|     }, | ||||
|  | ||||
|     _onItemClicked: function (index) { | ||||
| @@ -674,66 +635,48 @@ const SwitcherList = new Lang.Class({ | ||||
|                 this._items[this._highlighted].add_style_pseudo_class('selected'); | ||||
|         } | ||||
|  | ||||
|         let adjustment = this._scrollView.hscroll.adjustment; | ||||
|         let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values(); | ||||
|         let [absItemX, absItemY] = this._items[index].get_transformed_position(); | ||||
|         let [result, posX, posY] = this.actor.transform_stage_point(absItemX, 0); | ||||
|         let [containerWidth, containerHeight] = this.actor.get_transformed_size(); | ||||
|         if (posX + this._items[index].get_width() > containerWidth) | ||||
|         let monitor = global.get_primary_monitor(); | ||||
|         let itemSize = this._items[index].allocation.x2 - this._items[index].allocation.x1; | ||||
|         let [posX, posY] = this._items[index].get_transformed_position(); | ||||
|         posX += this.actor.x; | ||||
|         if (posX + itemSize > monitor.width + monitor.x) | ||||
|             this._scrollToRight(); | ||||
|         else if (this._items[index].allocation.x1 - value < 0) | ||||
|         else if (posX < 0) | ||||
|             this._scrollToLeft(); | ||||
|  | ||||
|     }, | ||||
|  | ||||
|     _scrollToLeft : function() { | ||||
|         let adjustment = this._scrollView.hscroll.adjustment; | ||||
|         let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values(); | ||||
|  | ||||
|         let item = this._items[this._highlighted]; | ||||
|  | ||||
|         if (item.allocation.x1 < value) | ||||
|             value = Math.min(0, item.allocation.x1); | ||||
|         else if (item.allocation.x2 > value + pageSize) | ||||
|             value = Math.max(upper, item.allocation.x2 - pageSize); | ||||
|  | ||||
|         let x = this._items[this._highlighted].allocation.x1; | ||||
|         this._scrollableRight = true; | ||||
|         Tweener.addTween(adjustment, | ||||
|                          { value: value, | ||||
|                            time: POPUP_SCROLL_TIME, | ||||
|                            transition: 'easeOutQuad', | ||||
|                            onComplete: Lang.bind(this, function () { | ||||
|                                 if (this._highlighted == 0) { | ||||
|                                     this._scrollableLeft = false; | ||||
|                                     this.actor.queue_relayout(); | ||||
|                                 } | ||||
|                            }) | ||||
|                           }); | ||||
|         Tweener.addTween(this._list, { anchor_x: x, | ||||
|                                         time: POPUP_SCROLL_TIME, | ||||
|                                         transition: 'easeOutQuad', | ||||
|                                         onComplete: Lang.bind(this, function () { | ||||
|                                                                         if (this._highlighted == 0) { | ||||
|                                                                             this._scrollableLeft = false; | ||||
|                                                                             this.actor.queue_relayout(); | ||||
|                                                                         } | ||||
|                                                              }) | ||||
|                         }); | ||||
|     }, | ||||
|  | ||||
|     _scrollToRight : function() { | ||||
|         let adjustment = this._scrollView.hscroll.adjustment; | ||||
|         let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values(); | ||||
|  | ||||
|         let item = this._items[this._highlighted]; | ||||
|  | ||||
|         if (item.allocation.x1 < value) | ||||
|             value = Math.max(0, item.allocation.x1); | ||||
|         else if (item.allocation.x2 > value + pageSize) | ||||
|             value = Math.min(upper, item.allocation.x2 - pageSize); | ||||
|  | ||||
|         this._scrollableLeft = true; | ||||
|         Tweener.addTween(adjustment, | ||||
|                          { value: value, | ||||
|                            time: POPUP_SCROLL_TIME, | ||||
|                            transition: 'easeOutQuad', | ||||
|                            onComplete: Lang.bind(this, function () { | ||||
|                                 if (this._highlighted == this._items.length - 1) { | ||||
|                                     this._scrollableRight = false; | ||||
|                                     this.actor.queue_relayout(); | ||||
|                                 } | ||||
|                             }) | ||||
|                           }); | ||||
|         let monitor = global.get_primary_monitor(); | ||||
|         let padding = this.actor.get_theme_node().get_horizontal_padding(); | ||||
|         let parentPadding = this.actor.get_parent().get_theme_node().get_horizontal_padding(); | ||||
|         let x = this._items[this._highlighted].allocation.x2 - monitor.width + padding + parentPadding; | ||||
|         Tweener.addTween(this._list, { anchor_x: x, | ||||
|                                         time: POPUP_SCROLL_TIME, | ||||
|                                         transition: 'easeOutQuad', | ||||
|                                         onComplete: Lang.bind(this, function () { | ||||
|                                                                         if (this._highlighted == this._items.length - 1) { | ||||
|                                                                             this._scrollableRight = false; | ||||
|                                                                             this.actor.queue_relayout(); | ||||
|                                                                         } | ||||
|                                                              }) | ||||
|                         }); | ||||
|     }, | ||||
|  | ||||
|     _itemActivated: function(n) { | ||||
| @@ -817,8 +760,16 @@ const SwitcherList = new Lang.Class({ | ||||
|         let children = this._list.get_children(); | ||||
|         let childBox = new Clutter.ActorBox(); | ||||
|  | ||||
|         let primary = Main.layoutManager.primaryMonitor; | ||||
|         let primary = global.get_primary_monitor(); | ||||
|         let parentRightPadding = this.actor.get_parent().get_theme_node().get_padding(St.Side.RIGHT); | ||||
|         if (this.actor.allocation.x2 == primary.x + primary.width - parentRightPadding) { | ||||
|             if (this._squareItems) | ||||
|                 childWidth = childHeight; | ||||
|             else { | ||||
|                 let [childMin, childNat] = children[0].get_preferred_width(childHeight); | ||||
|                 childWidth = childMin; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         for (let i = 0; i < children.length; i++) { | ||||
|             if (this._items.indexOf(children[i]) != -1) { | ||||
| @@ -844,20 +795,30 @@ const SwitcherList = new Lang.Class({ | ||||
|                 // we don't allocate it. | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         let leftPadding = this.actor.get_theme_node().get_padding(St.Side.LEFT); | ||||
|         let rightPadding = this.actor.get_theme_node().get_padding(St.Side.RIGHT); | ||||
|         let topPadding = this.actor.get_theme_node().get_padding(St.Side.TOP); | ||||
|         let bottomPadding = this.actor.get_theme_node().get_padding(St.Side.BOTTOM); | ||||
|  | ||||
|         // Clip the area for scrolling | ||||
|         this._clipBin.set_clip(0, -topPadding, (this.actor.allocation.x2 - this.actor.allocation.x1) - leftPadding - rightPadding, this.actor.height + bottomPadding); | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| Signals.addSignalMethods(SwitcherList.prototype); | ||||
|  | ||||
| const AppIcon = new Lang.Class({ | ||||
|     Name: 'AppIcon', | ||||
| function AppIcon(app) { | ||||
|     this._init(app); | ||||
| } | ||||
|  | ||||
| AppIcon.prototype = { | ||||
|     _init: function(app) { | ||||
|         this.app = app; | ||||
|         this.actor = new St.BoxLayout({ style_class: 'alt-tab-app', | ||||
|                                          vertical: true }); | ||||
|         this.icon = null; | ||||
|         this._iconBin = new St.Bin({ x_fill: true, y_fill: true }); | ||||
|         this._iconBin = new St.Bin(); | ||||
|  | ||||
|         this.actor.add(this._iconBin, { x_fill: false, y_fill: false } ); | ||||
|         this.label = new St.Label({ text: this.app.get_name() }); | ||||
| @@ -869,32 +830,36 @@ const AppIcon = new Lang.Class({ | ||||
|         this._iconBin.set_size(size, size); | ||||
|         this._iconBin.child = this.icon; | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| const AppSwitcher = new Lang.Class({ | ||||
|     Name: 'AppSwitcher', | ||||
|     Extends: SwitcherList, | ||||
| function AppSwitcher(apps, altTabPopup) { | ||||
|     this._init(apps, altTabPopup); | ||||
| } | ||||
|  | ||||
|     _init : function(localApps, otherApps, altTabPopup) { | ||||
|         this.parent(true); | ||||
| AppSwitcher.prototype = { | ||||
|     __proto__ : SwitcherList.prototype, | ||||
|  | ||||
|         // Construct the AppIcons, add to the popup | ||||
|     _init : function(apps, altTabPopup) { | ||||
|         SwitcherList.prototype._init.call(this, true); | ||||
|  | ||||
|         // Construct the AppIcons, sort by time, add to the popup | ||||
|         let activeWorkspace = global.screen.get_active_workspace(); | ||||
|         let workspaceIcons = []; | ||||
|         let otherIcons = []; | ||||
|         for (let i = 0; i < localApps.length; i++) { | ||||
|             let appIcon = new AppIcon(localApps[i]); | ||||
|         for (let i = 0; i < apps.length; i++) { | ||||
|             let appIcon = new AppIcon(apps[i]); | ||||
|             // Cache the window list now; we don't handle dynamic changes here, | ||||
|             // and we don't want to be continually retrieving it | ||||
|             appIcon.cachedWindows = appIcon.app.get_windows(); | ||||
|             workspaceIcons.push(appIcon); | ||||
|         } | ||||
|         for (let i = 0; i < otherApps.length; i++) { | ||||
|             let appIcon = new AppIcon(otherApps[i]); | ||||
|             appIcon.cachedWindows = appIcon.app.get_windows(); | ||||
|             otherIcons.push(appIcon); | ||||
|             if (this._hasWindowsOnWorkspace(appIcon, activeWorkspace)) | ||||
|               workspaceIcons.push(appIcon); | ||||
|             else | ||||
|               otherIcons.push(appIcon); | ||||
|         } | ||||
|  | ||||
|         workspaceIcons.sort(Lang.bind(this, this._sortAppIcon)); | ||||
|         otherIcons.sort(Lang.bind(this, this._sortAppIcon)); | ||||
|  | ||||
|         this.icons = []; | ||||
|         this._arrows = []; | ||||
|         for (let i = 0; i < workspaceIcons.length; i++) | ||||
| @@ -925,7 +890,7 @@ const AppSwitcher = new Lang.Class({ | ||||
|            totalSpacing += this._separator.width + this._list.spacing; | ||||
|  | ||||
|         // We just assume the whole screen here due to weirdness happing with the passed width | ||||
|         let primary = Main.layoutManager.primaryMonitor; | ||||
|         let primary = global.get_primary_monitor(); | ||||
|         let parentPadding = this.actor.get_parent().get_theme_node().get_horizontal_padding(); | ||||
|         let availWidth = primary.width - parentPadding - this.actor.get_theme_node().get_horizontal_padding(); | ||||
|         let height = 0; | ||||
| @@ -955,7 +920,7 @@ const AppSwitcher = new Lang.Class({ | ||||
|  | ||||
|     _allocate: function (actor, box, flags) { | ||||
|         // Allocate the main list items | ||||
|         this.parent(actor, box, flags); | ||||
|         SwitcherList.prototype._allocate.call(this, actor, box, flags); | ||||
|  | ||||
|         let arrowHeight = Math.floor(this.actor.get_theme_node().get_padding(St.Side.BOTTOM) / 3); | ||||
|         let arrowWidth = arrowHeight * 2; | ||||
| @@ -1010,7 +975,7 @@ const AppSwitcher = new Lang.Class({ | ||||
|                 this._arrows[this._curApp].remove_style_pseudo_class('highlighted'); | ||||
|         } | ||||
|  | ||||
|         this.parent(n, justOutline); | ||||
|         SwitcherList.prototype.highlight.call(this, n, justOutline); | ||||
|         this._curApp = n; | ||||
|  | ||||
|         if (this._curApp != -1) { | ||||
| @@ -1023,27 +988,44 @@ const AppSwitcher = new Lang.Class({ | ||||
|  | ||||
|     _addIcon : function(appIcon) { | ||||
|         this.icons.push(appIcon); | ||||
|         let item = this.addItem(appIcon.actor, appIcon.label); | ||||
|         this.addItem(appIcon.actor); | ||||
|  | ||||
|         let n = this._arrows.length; | ||||
|         let arrow = new St.DrawingArea({ style_class: 'switcher-arrow' }); | ||||
|         arrow.connect('repaint', function() { _drawArrow(arrow, St.Side.BOTTOM); }); | ||||
|         arrow.connect('repaint', Lang.bind(this, | ||||
|             function (area) { | ||||
|                 Shell.draw_box_pointer(area, Shell.PointerDirection.DOWN); | ||||
|             })); | ||||
|         this._list.add_actor(arrow); | ||||
|         this._arrows.push(arrow); | ||||
|  | ||||
|         if (appIcon.cachedWindows.length == 1) | ||||
|             arrow.hide(); | ||||
|         else | ||||
|             item.add_accessible_state (Atk.StateType.EXPANDABLE); | ||||
|     } | ||||
| }); | ||||
|     }, | ||||
|  | ||||
| const ThumbnailList = new Lang.Class({ | ||||
|     Name: 'ThumbnailList', | ||||
|     Extends: SwitcherList, | ||||
|     _hasWindowsOnWorkspace: function(appIcon, workspace) { | ||||
|         let windows = appIcon.cachedWindows; | ||||
|         for (let i = 0; i < windows.length; i++) { | ||||
|             if (windows[i].get_workspace() == workspace) | ||||
|                 return true; | ||||
|         } | ||||
|         return false; | ||||
|     }, | ||||
|  | ||||
|     _sortAppIcon : function(appIcon1, appIcon2) { | ||||
|         return appIcon1.app.compare(appIcon2.app); | ||||
|     } | ||||
| }; | ||||
|  | ||||
| function ThumbnailList(windows) { | ||||
|     this._init(windows); | ||||
| } | ||||
|  | ||||
| ThumbnailList.prototype = { | ||||
|     __proto__ : SwitcherList.prototype, | ||||
|  | ||||
|     _init : function(windows) { | ||||
|         this.parent(false); | ||||
|         SwitcherList.prototype._init.call(this); | ||||
|  | ||||
|         let activeWorkspace = global.screen.get_active_workspace(); | ||||
|  | ||||
| @@ -1079,12 +1061,9 @@ const ThumbnailList = new Lang.Class({ | ||||
|                 this._labels.push(bin); | ||||
|                 bin.add_actor(name); | ||||
|                 box.add_actor(bin); | ||||
|  | ||||
|                 this.addItem(box, name); | ||||
|             } else { | ||||
|                 this.addItem(box, null); | ||||
|             } | ||||
|  | ||||
|             this.addItem(box); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
| @@ -1102,9 +1081,6 @@ const ThumbnailList = new Lang.Class({ | ||||
|  | ||||
|         for (let i = 0; i < this._thumbnailBins.length; i++) { | ||||
|             let mutterWindow = this._windows[i].get_compositor_private(); | ||||
|             if (!mutterWindow) | ||||
|                 continue; | ||||
|  | ||||
|             let windowTexture = mutterWindow.get_texture (); | ||||
|             let [width, height] = windowTexture.get_size(); | ||||
|             let scale = Math.min(1.0, THUMBNAIL_DEFAULT_SIZE / width, availHeight / height); | ||||
| @@ -1121,47 +1097,4 @@ const ThumbnailList = new Lang.Class({ | ||||
|         // Make sure we only do this once | ||||
|         this._thumbnailBins = new Array(); | ||||
|     } | ||||
| }); | ||||
|  | ||||
| function _drawArrow(area, side) { | ||||
|     let themeNode = area.get_theme_node(); | ||||
|     let borderColor = themeNode.get_border_color(side); | ||||
|     let bodyColor = themeNode.get_foreground_color(); | ||||
|  | ||||
|     let [width, height] = area.get_surface_size (); | ||||
|     let cr = area.get_context(); | ||||
|  | ||||
|     cr.setLineWidth(1.0); | ||||
|     Clutter.cairo_set_source_color(cr, borderColor); | ||||
|  | ||||
|     switch (side) { | ||||
|     case St.Side.TOP: | ||||
|         cr.moveTo(0, height); | ||||
|         cr.lineTo(Math.floor(width * 0.5), 0); | ||||
|         cr.lineTo(width, height); | ||||
|         break; | ||||
|  | ||||
|     case St.Side.BOTTOM: | ||||
|         cr.moveTo(width, 0); | ||||
|         cr.lineTo(Math.floor(width * 0.5), height); | ||||
|         cr.lineTo(0, 0); | ||||
|         break; | ||||
|  | ||||
|     case St.Side.LEFT: | ||||
|         cr.moveTo(width, height); | ||||
|         cr.lineTo(0, Math.floor(height * 0.5)); | ||||
|         cr.lineTo(width, 0); | ||||
|         break; | ||||
|  | ||||
|     case St.Side.RIGHT: | ||||
|         cr.moveTo(0, 0); | ||||
|         cr.lineTo(width, Math.floor(height * 0.5)); | ||||
|         cr.lineTo(0, height); | ||||
|         break; | ||||
|     } | ||||
|  | ||||
|     cr.strokePreserve(); | ||||
|  | ||||
|     Clutter.cairo_set_source_color(cr, bodyColor); | ||||
|     cr.fill(); | ||||
| } | ||||
| }; | ||||
|   | ||||
| @@ -1,16 +1,14 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const Clutter = imports.gi.Clutter; | ||||
| const GLib = imports.gi.GLib; | ||||
| const Gtk = imports.gi.Gtk; | ||||
| const GMenu = imports.gi.GMenu; | ||||
| const Shell = imports.gi.Shell; | ||||
| const Lang = imports.lang; | ||||
| const Signals = imports.signals; | ||||
| const Meta = imports.gi.Meta; | ||||
| const St = imports.gi.St; | ||||
| const Mainloop = imports.mainloop; | ||||
| const Atk = imports.gi.Atk; | ||||
| const Gettext = imports.gettext.domain('gnome-shell'); | ||||
| const _ = Gettext.gettext; | ||||
|  | ||||
| const AppFavorites = imports.ui.appFavorites; | ||||
| const DND = imports.ui.dnd; | ||||
| @@ -23,19 +21,18 @@ const Tweener = imports.ui.tweener; | ||||
| const Workspace = imports.ui.workspace; | ||||
| const Params = imports.misc.params; | ||||
|  | ||||
| const MAX_APPLICATION_WORK_MILLIS = 75; | ||||
| const MENU_POPUP_TIMEOUT = 600; | ||||
| const SCROLL_TIME = 0.1; | ||||
|  | ||||
| const AlphabeticalView = new Lang.Class({ | ||||
|     Name: 'AlphabeticalView', | ||||
| function AlphabeticalView() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| AlphabeticalView.prototype = { | ||||
|     _init: function() { | ||||
|         this._grid = new IconGrid.IconGrid({ xAlign: St.Align.START }); | ||||
|         this._appSystem = Shell.AppSystem.get_default(); | ||||
|  | ||||
|         this._pendingAppLaterId = 0; | ||||
|         this._appIcons = {}; // desktop file id | ||||
|         this._filterApp = null; | ||||
|  | ||||
|         let box = new St.BoxLayout({ vertical: true }); | ||||
|         box.add(this._grid.actor, { y_align: St.Align.START, expand: true }); | ||||
| @@ -43,7 +40,7 @@ const AlphabeticalView = new Lang.Class({ | ||||
|         this.actor = new St.ScrollView({ x_fill: true, | ||||
|                                          y_fill: false, | ||||
|                                          y_align: St.Align.START, | ||||
|                                          style_class: 'vfade' }); | ||||
|                                          vfade: true }); | ||||
|         this.actor.add_actor(box); | ||||
|         this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC); | ||||
|         this.actor.connect('notify::mapped', Lang.bind(this, | ||||
| @@ -54,86 +51,53 @@ const AlphabeticalView = new Lang.Class({ | ||||
|                 let adjustment = this.actor.vscroll.adjustment; | ||||
|                 let direction = Overview.SwipeScrollDirection.VERTICAL; | ||||
|                 Main.overview.setScrollAdjustment(adjustment, direction); | ||||
|  | ||||
|                 // Reset scroll on mapping | ||||
|                 adjustment.value = 0; | ||||
|             })); | ||||
|     }, | ||||
|  | ||||
|     _removeAll: function() { | ||||
|         this._grid.removeAll(); | ||||
|         this._appIcons = {}; | ||||
|         this._apps = []; | ||||
|     }, | ||||
|  | ||||
|     _addApp: function(app) { | ||||
|         var id = app.get_id(); | ||||
|         let appIcon = new AppWellIcon(app); | ||||
|     _addApp: function(appInfo) { | ||||
|         let appIcon = new AppWellIcon(this._appSystem.get_app(appInfo.get_id())); | ||||
|  | ||||
|         this._grid.addItem(appIcon.actor); | ||||
|         appIcon.actor.connect('key-focus-in', Lang.bind(this, this._ensureIconVisible)); | ||||
|  | ||||
|         this._appIcons[id] = appIcon; | ||||
|         appIcon._appInfo = appInfo; | ||||
|         if (this._filterApp && !this._filterApp(appInfo)) | ||||
|             appIcon.actor.hide(); | ||||
|  | ||||
|         this._apps.push(appIcon); | ||||
|     }, | ||||
|  | ||||
|     _ensureIconVisible: function(icon) { | ||||
|         let adjustment = this.actor.vscroll.adjustment; | ||||
|         let [value, lower, upper, stepIncrement, pageIncrement, pageSize] = adjustment.get_values(); | ||||
|  | ||||
|         let offset = 0; | ||||
|         let vfade = this.actor.get_effect("vfade"); | ||||
|         if (vfade) | ||||
|             offset = vfade.fade_offset; | ||||
|  | ||||
|         // If this gets called as part of a right-click, the actor | ||||
|         // will be needs_allocation, and so "icon.y" would return 0 | ||||
|         let box = icon.get_allocation_box(); | ||||
|  | ||||
|         if (box.y1 < value + offset) | ||||
|             value = Math.max(0, box.y1 - offset); | ||||
|         else if (box.y2 > value + pageSize - offset) | ||||
|             value = Math.min(upper, box.y2 + offset - pageSize); | ||||
|         else | ||||
|             return; | ||||
|  | ||||
|         Tweener.addTween(adjustment, | ||||
|                          { value: value, | ||||
|                            time: SCROLL_TIME, | ||||
|                            transition: 'easeOutQuad' }); | ||||
|     setFilter: function(filter) { | ||||
|         this._filterApp = filter; | ||||
|         for (let i = 0; i < this._apps.length; i++) | ||||
|             this._apps[i].actor.visible = filter(this._apps[i]._appInfo); | ||||
|     }, | ||||
|  | ||||
|     setVisibleApps: function(apps) { | ||||
|         if (apps == null) { // null implies "all" | ||||
|             for (var id in this._appIcons) { | ||||
|                 var icon = this._appIcons[id]; | ||||
|                 icon.actor.visible = true; | ||||
|             } | ||||
|         } else { | ||||
|             // Set everything to not-visible, then set to visible what we should see | ||||
|             for (var id in this._appIcons) { | ||||
|                 var icon = this._appIcons[id]; | ||||
|                 icon.actor.visible = false; | ||||
|             } | ||||
|             for (var i = 0; i < apps.length; i++) { | ||||
|                 var app = apps[i]; | ||||
|                 var id = app.get_id(); | ||||
|                 var icon = this._appIcons[id]; | ||||
|                 icon.actor.visible = true; | ||||
|             } | ||||
|         } | ||||
|     }, | ||||
|     refresh: function(apps) { | ||||
|         let ids = []; | ||||
|         for (let i in apps) | ||||
|             ids.push(i); | ||||
|         ids.sort(function(a, b) { | ||||
|             return apps[a].get_name().localeCompare(apps[b].get_name()); | ||||
|         }); | ||||
|  | ||||
|     setAppList: function(apps) { | ||||
|         this._removeAll(); | ||||
|         for (var i = 0; i < apps.length; i++) { | ||||
|             var app = apps[i]; | ||||
|             this._addApp(app); | ||||
|          } | ||||
|  | ||||
|         for (let i = 0; i < ids.length; i++) { | ||||
|             this._addApp(apps[ids[i]]); | ||||
|         } | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| const ViewByCategories = new Lang.Class({ | ||||
|     Name: 'ViewByCategories', | ||||
| function ViewByCategories() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| ViewByCategories.prototype = { | ||||
|     _init: function() { | ||||
|         this._appSystem = Shell.AppSystem.get_default(); | ||||
|         this.actor = new St.BoxLayout({ style_class: 'all-app' }); | ||||
| @@ -141,154 +105,82 @@ const ViewByCategories = new Lang.Class({ | ||||
|  | ||||
|         this._view = new AlphabeticalView(); | ||||
|  | ||||
|         // categories can be -1 (the All view) or 0...n-1, where n | ||||
|         // is the number of sections | ||||
|         // -2 is a flag to indicate that nothing is selected | ||||
|         // (used only before the actor is mapped the first time) | ||||
|         this._currentCategory = -2; | ||||
|         this._categories = []; | ||||
|         this._apps = null; | ||||
|  | ||||
|         this._categoryBox = new St.BoxLayout({ vertical: true, | ||||
|                                                reactive: true, | ||||
|                                                accessible_role: Atk.Role.LIST }); | ||||
|         this._categoryScroll = new St.ScrollView({ x_fill: false, | ||||
|                                                    y_fill: false, | ||||
|                                                    style_class: 'vfade' }); | ||||
|         this._categoryScroll.add_actor(this._categoryBox); | ||||
|         this._filters = new St.BoxLayout({ vertical: true }); | ||||
|         this.actor.add(this._view.actor, { expand: true, x_fill: true, y_fill: true }); | ||||
|         this.actor.add(this._categoryScroll, { expand: false, y_fill: false, y_align: St.Align.START }); | ||||
|         this.actor.add(this._filters, { expand: false, y_fill: false, y_align: St.Align.START }); | ||||
|  | ||||
|         // Always select the "All" filter when switching to the app view | ||||
|         this.actor.connect('notify::mapped', Lang.bind(this, | ||||
|             function() { | ||||
|                 if (this.actor.mapped && this._allCategoryButton) | ||||
|                     this._selectCategory(-1); | ||||
|             })); | ||||
|  | ||||
|         // We need a dummy actor to catch the keyboard focus if the | ||||
|         // user Ctrl-Alt-Tabs here before the deferred work creates | ||||
|         // our real contents | ||||
|         this._focusDummy = new St.Bin({ can_focus: true }); | ||||
|         this.actor.add(this._focusDummy); | ||||
|         this._sections = []; | ||||
|     }, | ||||
|  | ||||
|     _selectCategory: function(num) { | ||||
|         if (this._currentCategory == num) // nothing to do | ||||
|             return; | ||||
|         if (num != -1) | ||||
|             this._allFilter.remove_style_pseudo_class('selected'); | ||||
|         else | ||||
|             this._allFilter.add_style_pseudo_class('selected'); | ||||
|  | ||||
|         this._currentCategory = num; | ||||
|  | ||||
|         if (num != -1) { | ||||
|             var category = this._categories[num]; | ||||
|             this._allCategoryButton.remove_style_pseudo_class('selected'); | ||||
|             this._view.setVisibleApps(category.apps); | ||||
|         } else { | ||||
|             this._allCategoryButton.add_style_pseudo_class('selected'); | ||||
|             this._view.setVisibleApps(null); | ||||
|         } | ||||
|  | ||||
|         for (var i = 0; i < this._categories.length; i++) { | ||||
|             if (i == num) | ||||
|                 this._categories[i].button.add_style_pseudo_class('selected'); | ||||
|             else | ||||
|                 this._categories[i].button.remove_style_pseudo_class('selected'); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     // Recursively load a GMenuTreeDirectory; we could put this in ShellAppSystem too | ||||
|     _loadCategory: function(dir, appList) { | ||||
|         var iter = dir.iter(); | ||||
|         var nextType; | ||||
|         while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) { | ||||
|             if (nextType == GMenu.TreeItemType.ENTRY) { | ||||
|                 var entry = iter.get_entry(); | ||||
|                 var app = this._appSystem.lookup_app_by_tree_entry(entry); | ||||
|                 if (!entry.get_app_info().get_nodisplay()) | ||||
|                     appList.push(app); | ||||
|             } else if (nextType == GMenu.TreeItemType.DIRECTORY) { | ||||
|                 if (!dir.get_is_nodisplay()) | ||||
|                     this._loadCategory(iter.get_directory(), appList); | ||||
|             } | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _addCategory: function(name, index, dir, allApps) { | ||||
|         let button = new St.Button({ label: GLib.markup_escape_text (name, -1), | ||||
|                                      style_class: 'app-filter', | ||||
|                                      x_align: St.Align.START, | ||||
|                                      can_focus: true , | ||||
|                                      accessible_role: Atk.Role.LIST_ITEM }); | ||||
|         button.connect('clicked', Lang.bind(this, function() { | ||||
|             this._selectCategory(index); | ||||
|         this._view.setFilter(Lang.bind(this, function(app) { | ||||
|             if (num == -1) | ||||
|                 return true; | ||||
|             return this._sections[num].name == app.get_section(); | ||||
|         })); | ||||
|  | ||||
|         var apps; | ||||
|         if (dir == null) { | ||||
|             apps = allApps; | ||||
|             this._allCategoryButton = button; | ||||
|         } else { | ||||
|             apps = []; | ||||
|             this._loadCategory(dir, apps); | ||||
|             this._categories.push({ apps: apps, | ||||
|                                     name: name, | ||||
|                                     button: button }); | ||||
|         for (let i = 0; i < this._sections.length; i++) { | ||||
|             if (i == num) | ||||
|                 this._sections[i].filterActor.add_style_pseudo_class('selected'); | ||||
|             else | ||||
|                 this._sections[i].filterActor.remove_style_pseudo_class('selected'); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|         this._categoryBox.add(button, { expand: true, x_fill: true, y_fill: false }); | ||||
|     _addFilter: function(name, num) { | ||||
|         let button = new St.Button({ label: name, | ||||
|                                      style_class: 'app-filter', | ||||
|                                      x_align: St.Align.START }); | ||||
|         this._filters.add(button, { expand: true, x_fill: true, y_fill: false }); | ||||
|         button.connect('clicked', Lang.bind(this, function() { | ||||
|             this._selectCategory(num); | ||||
|         })); | ||||
|  | ||||
|         if (num != -1) | ||||
|             this._sections[num] = { filterActor: button, | ||||
|                                     name: name }; | ||||
|         else | ||||
|             this._allFilter = button; | ||||
|     }, | ||||
|  | ||||
|     _removeAll: function() { | ||||
|         this._categories = []; | ||||
|         this._categoryBox.destroy_all_children(); | ||||
|         this._sections = []; | ||||
|         this._filters.destroy_children(); | ||||
|     }, | ||||
|  | ||||
|     refresh: function() { | ||||
|     refresh: function(apps) { | ||||
|         this._removeAll(); | ||||
|  | ||||
|         var allApps = Shell.AppSystem.get_default().get_all(); | ||||
|         allApps.sort(function(a, b) { | ||||
|             return a.compare_by_name(b); | ||||
|         }); | ||||
|         let sections = this._appSystem.get_sections(); | ||||
|         this._apps = apps; | ||||
|         this._view.refresh(apps); | ||||
|  | ||||
|         /* Translators: Filter to display all applications */ | ||||
|         this._addCategory(_("All"), -1, null, allApps); | ||||
|         this._addFilter(_("All"), -1); | ||||
|  | ||||
|         var tree = this._appSystem.get_tree(); | ||||
|         var root = tree.get_root_directory(); | ||||
|         if (!sections) | ||||
|             return; | ||||
|  | ||||
|         var iter = root.iter(); | ||||
|         var nextType; | ||||
|         var i = 0; | ||||
|         while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) { | ||||
|             if (nextType == GMenu.TreeItemType.DIRECTORY) { | ||||
|                 var dir = iter.get_directory(); | ||||
|                 if (dir.get_is_nodisplay()) | ||||
|                     continue; | ||||
|                 this._addCategory(dir.get_name(), i, dir); | ||||
|                 i++; | ||||
|             } | ||||
|         } | ||||
|         for (let i = 0; i < sections.length; i++) | ||||
|             this._addFilter(sections[i], i); | ||||
|  | ||||
|         this._view.setAppList(allApps); | ||||
|         this._selectCategory(-1); | ||||
|  | ||||
|         if (this._focusDummy) { | ||||
|             let focused = this._focusDummy.has_key_focus(); | ||||
|             this._focusDummy.destroy(); | ||||
|             this._focusDummy = null; | ||||
|             if (focused) | ||||
|                 this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false); | ||||
|         } | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| /* This class represents a display containing a collection of application items. | ||||
|  * The applications are sorted based on their name. | ||||
|  */ | ||||
| const AllAppDisplay = new Lang.Class({ | ||||
|     Name: 'AllAppDisplay', | ||||
| function AllAppDisplay() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| AllAppDisplay.prototype = { | ||||
|     _init: function() { | ||||
|         this._appSystem = Shell.AppSystem.get_default(); | ||||
|         this._appSystem.connect('installed-changed', Lang.bind(this, function() { | ||||
| @@ -302,162 +194,147 @@ const AllAppDisplay = new Lang.Class({ | ||||
|     }, | ||||
|  | ||||
|     _redisplay: function() { | ||||
|         this._appView.refresh(); | ||||
|         let apps = this._appSystem.get_flattened_apps().filter(function(app) { | ||||
|             return !app.get_is_nodisplay(); | ||||
|         }); | ||||
|  | ||||
|         this._appView.refresh(apps); | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| const AppSearchProvider = new Lang.Class({ | ||||
|     Name: 'AppSearchProvider', | ||||
|     Extends: Search.SearchProvider, | ||||
| function BaseAppSearchProvider() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
|     _init: function() { | ||||
|         this.parent(_("APPLICATIONS")); | ||||
| BaseAppSearchProvider.prototype = { | ||||
|     __proto__: Search.SearchProvider.prototype, | ||||
|  | ||||
|     _init: function(name) { | ||||
|         Search.SearchProvider.prototype._init.call(this, name); | ||||
|         this._appSys = Shell.AppSystem.get_default(); | ||||
|     }, | ||||
|  | ||||
|     getResultMetas: function(apps) { | ||||
|         let metas = []; | ||||
|         for (let i = 0; i < apps.length; i++) { | ||||
|             let app = apps[i]; | ||||
|             metas.push({ 'id': app, | ||||
|                          'name': app.get_name(), | ||||
|                          'createIcon': function(size) { | ||||
|                              return app.create_icon_texture(size); | ||||
|                          } | ||||
|                        }); | ||||
|         } | ||||
|         return metas; | ||||
|     getResultMeta: function(resultId) { | ||||
|         let app = this._appSys.get_app(resultId); | ||||
|         if (!app) | ||||
|             return null; | ||||
|         return { 'id': resultId, | ||||
|                  'name': app.get_name(), | ||||
|                  'icon': app.create_icon_texture(Search.RESULT_ICON_SIZE)}; | ||||
|     }, | ||||
|  | ||||
|     getInitialResultSet: function(terms) { | ||||
|         return this._appSys.initial_search(terms); | ||||
|     }, | ||||
|     activateResult: function(id, params) { | ||||
|         params = Params.parse(params, { workspace: null, | ||||
|                                         timestamp: null }); | ||||
|  | ||||
|     getSubsearchResultSet: function(previousResults, terms) { | ||||
|         return this._appSys.subsearch(previousResults, terms); | ||||
|     }, | ||||
|  | ||||
|     activateResult: function(app, params) { | ||||
|         params = Params.parse(params, { workspace: -1, | ||||
|                                         timestamp: 0 }); | ||||
|  | ||||
|         let event = Clutter.get_current_event(); | ||||
|         let modifiers = event ? event.get_state() : 0; | ||||
|         let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK; | ||||
|  | ||||
|         if (openNewWindow) | ||||
|             app.open_new_window(params.workspace); | ||||
|         else | ||||
|             app.activate_full(params.workspace, params.timestamp); | ||||
|         let app = this._appSys.get_app(id); | ||||
|         app.activate(params.workspace ? params.workspace.index() : -1); | ||||
|     }, | ||||
|  | ||||
|     dragActivateResult: function(id, params) { | ||||
|         params = Params.parse(params, { workspace: -1, | ||||
|                                         timestamp: 0 }); | ||||
|         params = Params.parse(params, { workspace: null, | ||||
|                                         timestamp: null }); | ||||
|  | ||||
|         let app = this._appSys.lookup_app(id); | ||||
|         app.open_new_window(workspace); | ||||
|     }, | ||||
|  | ||||
|     createResultActor: function (resultMeta, terms) { | ||||
|         let app = resultMeta['id']; | ||||
|         let icon = new AppWellIcon(app); | ||||
|         return icon.actor; | ||||
|         let app = this._appSys.get_app(id); | ||||
|         app.open_new_window(params.workspace ? params.workspace.get_index() : -1); | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| const SettingsSearchProvider = new Lang.Class({ | ||||
|     Name: 'SettingsSearchProvider', | ||||
|     Extends: Search.SearchProvider, | ||||
| function AppSearchProvider() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| AppSearchProvider.prototype = { | ||||
|     __proto__: BaseAppSearchProvider.prototype, | ||||
|  | ||||
|     _init: function() { | ||||
|         this.parent(_("SETTINGS")); | ||||
|  | ||||
|         this._appSys = Shell.AppSystem.get_default(); | ||||
|         this._gnomecc = this._appSys.lookup_app('gnome-control-center.desktop'); | ||||
|     }, | ||||
|  | ||||
|     getResultMetas: function(prefs) { | ||||
|         let metas = []; | ||||
|         for (let i = 0; i < prefs.length; i++) { | ||||
|             let pref = prefs[i]; | ||||
|             metas.push({ 'id': pref, | ||||
|                          'name': pref.get_name(), | ||||
|                          'createIcon': function(size) { | ||||
|                              return pref.create_icon_texture(size); | ||||
|                          } | ||||
|                        }); | ||||
|         } | ||||
|         return metas; | ||||
|          BaseAppSearchProvider.prototype._init.call(this, _("APPLICATIONS")); | ||||
|     }, | ||||
|  | ||||
|     getInitialResultSet: function(terms) { | ||||
|         return this._appSys.search_settings(terms); | ||||
|         return this._appSys.initial_search(false, terms); | ||||
|     }, | ||||
|  | ||||
|     getSubsearchResultSet: function(previousResults, terms) { | ||||
|         return this._appSys.search_settings(terms); | ||||
|     }, | ||||
|  | ||||
|     activateResult: function(pref, params) { | ||||
|         params = Params.parse(params, { workspace: -1, | ||||
|                                         timestamp: 0 }); | ||||
|  | ||||
|         pref.activate_full(params.workspace, params.timestamp); | ||||
|     }, | ||||
|  | ||||
|     dragActivateResult: function(pref, params) { | ||||
|         this.activateResult(pref, params); | ||||
|         return this._appSys.subsearch(false, previousResults, terms); | ||||
|     }, | ||||
|  | ||||
|     createResultActor: function (resultMeta, terms) { | ||||
|         let app = resultMeta['id']; | ||||
|         let app = this._appSys.get_app(resultMeta['id']); | ||||
|         let icon = new AppWellIcon(app); | ||||
|         return icon.actor; | ||||
|     } | ||||
| }); | ||||
|     }, | ||||
|  | ||||
| const AppIcon = new Lang.Class({ | ||||
|     Name: 'AppIcon', | ||||
|     Extends: IconGrid.BaseIcon, | ||||
|     expandSearch: function(terms) { | ||||
|         log('TODO expand search'); | ||||
|     } | ||||
| }; | ||||
|  | ||||
| function PrefsSearchProvider() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| PrefsSearchProvider.prototype = { | ||||
|     __proto__: BaseAppSearchProvider.prototype, | ||||
|  | ||||
|     _init: function() { | ||||
|         BaseAppSearchProvider.prototype._init.call(this, _("PREFERENCES")); | ||||
|     }, | ||||
|  | ||||
|     getInitialResultSet: function(terms) { | ||||
|         return this._appSys.initial_search(true, terms); | ||||
|     }, | ||||
|  | ||||
|     getSubsearchResultSet: function(previousResults, terms) { | ||||
|         return this._appSys.subsearch(true, previousResults, terms); | ||||
|     }, | ||||
|  | ||||
|     expandSearch: function(terms) { | ||||
|         let controlCenter = this._appSys.load_from_desktop_file('gnomecc.desktop'); | ||||
|         controlCenter.launch(); | ||||
|         Main.overview.hide(); | ||||
|     } | ||||
| }; | ||||
|  | ||||
| function AppIcon(app, params) { | ||||
|     this._init(app, params); | ||||
| } | ||||
|  | ||||
| AppIcon.prototype = { | ||||
|     __proto__:  IconGrid.BaseIcon.prototype, | ||||
|  | ||||
|     _init : function(app, params) { | ||||
|         this.app = app; | ||||
|  | ||||
|         let label = this.app.get_name(); | ||||
|  | ||||
|         this.parent(label, params); | ||||
|         IconGrid.BaseIcon.prototype._init.call(this, | ||||
|                                                label, | ||||
|                                                params); | ||||
|     }, | ||||
|  | ||||
|     createIcon: function(iconSize) { | ||||
|         return this.app.create_icon_texture(iconSize); | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| const AppWellIcon = new Lang.Class({ | ||||
|     Name: 'AppWellIcon', | ||||
| function AppWellIcon(app, iconParams) { | ||||
|     this._init(app, iconParams); | ||||
| } | ||||
|  | ||||
|     _init : function(app, iconParams, onActivateOverride) { | ||||
| AppWellIcon.prototype = { | ||||
|     _init : function(app, iconParams) { | ||||
|         this.app = app; | ||||
|         this.actor = new St.Button({ style_class: 'app-well-app', | ||||
|                                      reactive: true, | ||||
|                                      button_mask: St.ButtonMask.ONE | St.ButtonMask.TWO, | ||||
|                                      can_focus: true, | ||||
|                                      x_fill: true, | ||||
|                                      y_fill: true }); | ||||
|         this.actor = new St.Clickable({ style_class: 'app-well-app', | ||||
|                                          reactive: true, | ||||
|                                          x_fill: true, | ||||
|                                          y_fill: true }); | ||||
|         this.actor._delegate = this; | ||||
|  | ||||
|         this.icon = new AppIcon(app, iconParams); | ||||
|         this.actor.set_child(this.icon.actor); | ||||
|  | ||||
|         this.actor.label_actor = this.icon.label; | ||||
|  | ||||
|         // A function callback to override the default "app.activate()"; used by preferences | ||||
|         this._onActivateOverride = onActivateOverride; | ||||
|         this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress)); | ||||
|         this.actor.connect('clicked', Lang.bind(this, this._onClicked)); | ||||
|         this.actor.connect('popup-menu', Lang.bind(this, this._onKeyboardPopupMenu)); | ||||
|  | ||||
|         this._menu = null; | ||||
|         this._menuManager = new PopupMenu.PopupMenuManager(this); | ||||
| @@ -468,15 +345,12 @@ const AppWellIcon = new Lang.Class({ | ||||
|                 this._removeMenuTimeout(); | ||||
|                 Main.overview.beginItemDrag(this); | ||||
|             })); | ||||
|         this._draggable.connect('drag-cancelled', Lang.bind(this, | ||||
|             function () { | ||||
|                 Main.overview.cancelledItemDrag(this); | ||||
|             })); | ||||
|         this._draggable.connect('drag-end', Lang.bind(this, | ||||
|             function () { | ||||
|                Main.overview.endItemDrag(this); | ||||
|             })); | ||||
|  | ||||
|         this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress)); | ||||
|         this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); | ||||
|  | ||||
|         this._menuTimeoutId = 0; | ||||
| @@ -484,7 +358,6 @@ const AppWellIcon = new Lang.Class({ | ||||
|                                                 Lang.bind(this, | ||||
|                                                           this._onStateChanged)); | ||||
|         this._onStateChanged(); | ||||
|         this.isMenuUp = false; | ||||
|     }, | ||||
|  | ||||
|     _onDestroy: function() { | ||||
| @@ -516,34 +389,29 @@ const AppWellIcon = new Lang.Class({ | ||||
|                 Lang.bind(this, function() { | ||||
|                     this.popupMenu(); | ||||
|                 })); | ||||
|         } else if (button == 3) { | ||||
|             this.popupMenu(); | ||||
|             return true; | ||||
|         } | ||||
|         return false; | ||||
|     }, | ||||
|  | ||||
|     _onClicked: function(actor, button) { | ||||
|     _onClicked: function(actor, event) { | ||||
|         this._removeMenuTimeout(); | ||||
|  | ||||
|         let button = event.get_button(); | ||||
|         if (button == 1) { | ||||
|             this._onActivate(Clutter.get_current_event()); | ||||
|             this._onActivate(event); | ||||
|         } else if (button == 2) { | ||||
|             // Last workspace is always empty | ||||
|             let launchWorkspace = global.screen.get_workspace_by_index(global.screen.n_workspaces - 1); | ||||
|             launchWorkspace.activate(global.get_current_time()); | ||||
|             this.emit('launching'); | ||||
|             this.app.open_new_window(-1); | ||||
|             Main.overview.hide(); | ||||
|             let newWorkspace = Main.overview.workspaces.addWorkspace(); | ||||
|             if (newWorkspace != null) { | ||||
|                 newWorkspace.activate(global.get_current_time()); | ||||
|                 this.emit('launching'); | ||||
|                 this.app.open_new_window(-1); | ||||
|                 Main.overview.hide(); | ||||
|             } | ||||
|         } else if (button == 3) { | ||||
|             this.popupMenu(); | ||||
|         } | ||||
|         return false; | ||||
|     }, | ||||
|  | ||||
|     _onKeyboardPopupMenu: function() { | ||||
|         this.popupMenu(); | ||||
|         this._menu.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false); | ||||
|     }, | ||||
|  | ||||
|     getId: function() { | ||||
|         return this.app.get_id(); | ||||
|     }, | ||||
| @@ -554,64 +422,96 @@ const AppWellIcon = new Lang.Class({ | ||||
|  | ||||
|         if (!this._menu) { | ||||
|             this._menu = new AppIconMenu(this); | ||||
|             this._menu.connect('highlight-window', Lang.bind(this, function (menu, window) { | ||||
|                 this.highlightWindow(window); | ||||
|             })); | ||||
|             this._menu.connect('activate-window', Lang.bind(this, function (menu, window) { | ||||
|                 this.activateWindow(window); | ||||
|             })); | ||||
|             this._menu.connect('open-state-changed', Lang.bind(this, function (menu, isPoppedUp) { | ||||
|                 if (!isPoppedUp) | ||||
|             this._menu.connect('popup', Lang.bind(this, function (menu, isPoppedUp) { | ||||
|                 if (isPoppedUp) { | ||||
|                     this._onMenuPoppedUp(); | ||||
|                 } else { | ||||
|                     this._onMenuPoppedDown(); | ||||
|                 } | ||||
|             })); | ||||
|             Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); })); | ||||
|  | ||||
|             this._menuManager.addMenu(this._menu); | ||||
|         } | ||||
|  | ||||
|         this.isMenuUp = true; | ||||
|         this.actor.set_hover(true); | ||||
|         this._menu.popup(); | ||||
|  | ||||
|         return false; | ||||
|     }, | ||||
|  | ||||
|     highlightWindow: function(metaWindow) { | ||||
|         if (this._didActivateWindow) | ||||
|             return; | ||||
|         if (!this._getRunning()) | ||||
|             return; | ||||
|         Main.overview.getWorkspacesForWindow(metaWindow).setHighlightWindow(metaWindow); | ||||
|     }, | ||||
|  | ||||
|     activateWindow: function(metaWindow) { | ||||
|         if (metaWindow) { | ||||
|             this._didActivateWindow = true; | ||||
|             Main.activateWindow(metaWindow); | ||||
|         } else { | ||||
|             Main.overview.hide(); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _onMenuPoppedUp: function() { | ||||
|         if (this._getRunning()) { | ||||
|             Main.overview.getWorkspacesForWindow(null).setApplicationWindowSelection(this.app.get_id()); | ||||
|             this._setWindowSelection = true; | ||||
|             this._didActivateWindow = false; | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _onMenuPoppedDown: function() { | ||||
|         this.actor.sync_hover(); | ||||
|         this.isMenuUp = false; | ||||
|  | ||||
|         if (this._didActivateWindow) | ||||
|             return; | ||||
|         if (!this._setWindowSelection) | ||||
|             return; | ||||
|  | ||||
|         Main.overview.getWorkspacesForWindow(null).setApplicationWindowSelection(null); | ||||
|         this._setWindowSelection = false; | ||||
|     }, | ||||
|  | ||||
|     _getRunning: function() { | ||||
|         return this.app.state != Shell.AppState.STOPPED; | ||||
|     }, | ||||
|  | ||||
|     _onActivate: function (event) { | ||||
|         this.emit('launching'); | ||||
|         let modifiers = event.get_state(); | ||||
|         let modifiers = Shell.get_event_state(event); | ||||
|  | ||||
|         if (this._onActivateOverride) { | ||||
|             this._onActivateOverride(event); | ||||
|         if (modifiers & Clutter.ModifierType.CONTROL_MASK | ||||
|             && this.app.state == Shell.AppState.RUNNING) { | ||||
|             this.app.open_new_window(-1); | ||||
|         } else { | ||||
|             if (modifiers & Clutter.ModifierType.CONTROL_MASK | ||||
|                 && this.app.state == Shell.AppState.RUNNING) { | ||||
|                 this.app.open_new_window(-1); | ||||
|             } else { | ||||
|                 this.app.activate(); | ||||
|             } | ||||
|             this.app.activate(-1); | ||||
|         } | ||||
|         Main.overview.hide(); | ||||
|     }, | ||||
|  | ||||
|     shellWorkspaceLaunch : function(params) { | ||||
|         params = Params.parse(params, { workspace: -1, | ||||
|                                         timestamp: 0 }); | ||||
|     // called by this._menuManager when it has the grab | ||||
|     menuEventFilter: function(event) { | ||||
|         return this._menu.menuEventFilter(event); | ||||
|     }, | ||||
|  | ||||
|         this.app.open_new_window(params.workspace); | ||||
|     shellWorkspaceLaunch : function(params) { | ||||
|         params = Params.parse(params, { workspace: null, | ||||
|                                         timestamp: null }); | ||||
|  | ||||
|         this.app.open_new_window(params.workspace ? params.workspace.index() : -1); | ||||
|     }, | ||||
|  | ||||
|     getDragActor: function() { | ||||
|         return this.app.create_icon_texture(Main.overview.dashIconSize); | ||||
|         return this.app.create_icon_texture(this.icon.iconSize); | ||||
|     }, | ||||
|  | ||||
|     // Returns the original actor that should align with the actor | ||||
| @@ -619,26 +519,28 @@ const AppWellIcon = new Lang.Class({ | ||||
|     getDragActorSource: function() { | ||||
|         return this.icon.icon; | ||||
|     } | ||||
| }); | ||||
| }; | ||||
| Signals.addSignalMethods(AppWellIcon.prototype); | ||||
|  | ||||
| const AppIconMenu = new Lang.Class({ | ||||
|     Name: 'AppIconMenu', | ||||
|     Extends: PopupMenu.PopupMenu, | ||||
| function AppIconMenu(source) { | ||||
|     this._init(source); | ||||
| } | ||||
|  | ||||
| AppIconMenu.prototype = { | ||||
|     __proto__: PopupMenu.PopupMenu.prototype, | ||||
|  | ||||
|     _init: function(source) { | ||||
|         let side = St.Side.LEFT; | ||||
|         if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) | ||||
|         if (St.Widget.get_default_direction() == St.TextDirection.RTL) | ||||
|             side = St.Side.RIGHT; | ||||
|  | ||||
|         this.parent(source.actor, 0.5, side); | ||||
|  | ||||
|         // We want to keep the item hovered while the menu is up | ||||
|         this.blockSourceEvents = true; | ||||
|         PopupMenu.PopupMenu.prototype._init.call(this, source.actor, St.Align.MIDDLE, side, 0); | ||||
|  | ||||
|         this._source = source; | ||||
|  | ||||
|         this.connect('active-changed', Lang.bind(this, this._onActiveChanged)); | ||||
|         this.connect('activate', Lang.bind(this, this._onActivate)); | ||||
|         this.connect('open-state-changed', Lang.bind(this, this._onOpenStateChanged)); | ||||
|  | ||||
|         this.actor.add_style_class_name('app-well-menu'); | ||||
|  | ||||
| @@ -671,18 +573,19 @@ const AppIconMenu = new Lang.Class({ | ||||
|             item._window = windows[i]; | ||||
|         } | ||||
|  | ||||
|         if (!this._source.app.is_window_backed()) { | ||||
|             if (windows.length > 0) | ||||
|                 this._appendSeparator(); | ||||
|  | ||||
|             let isFavorite = AppFavorites.getAppFavorites().isFavorite(this._source.app.get_id()); | ||||
|  | ||||
|             this._newWindowMenuItem = this._appendMenuItem(_("New Window")); | ||||
|         if (windows.length > 0) | ||||
|             this._appendSeparator(); | ||||
|  | ||||
|             this._toggleFavoriteMenuItem = this._appendMenuItem(isFavorite ? _("Remove from Favorites") | ||||
|                                                                 : _("Add to Favorites")); | ||||
|         } | ||||
|         let isFavorite = AppFavorites.getAppFavorites().isFavorite(this._source.app.get_id()); | ||||
|  | ||||
|         this._newWindowMenuItem = windows.length > 0 ? this._appendMenuItem(_("New Window")) : null; | ||||
|  | ||||
|         if (windows.length > 0) | ||||
|             this._appendSeparator(); | ||||
|         this._toggleFavoriteMenuItem = this._appendMenuItem(isFavorite ? _("Remove from Favorites") | ||||
|                                                                     : _("Add to Favorites")); | ||||
|  | ||||
|         this._highlightedItem = null; | ||||
|     }, | ||||
|  | ||||
|     _appendSeparator: function () { | ||||
| @@ -702,6 +605,72 @@ const AppIconMenu = new Lang.Class({ | ||||
|         this.open(); | ||||
|     }, | ||||
|  | ||||
|     _onOpenStateChanged: function (menu, open) { | ||||
|         if (open) { | ||||
|             this.emit('popup', true); | ||||
|         } else { | ||||
|             this._updateHighlight(null); | ||||
|             this.emit('popup', false); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     // called by this._menuManager when it has the grab | ||||
|     menuEventFilter: function(event) { | ||||
|         let eventType = event.type(); | ||||
|  | ||||
|         // Check if the user is interacting with a window representation | ||||
|         // rather than interacting with the menu | ||||
|  | ||||
|         if (eventType == Clutter.EventType.BUTTON_RELEASE) { | ||||
|             let metaWindow = this._findMetaWindowForActor(event.get_source()); | ||||
|             if (metaWindow) | ||||
|                 this.emit('activate-window', metaWindow); | ||||
|         } else if (eventType == Clutter.EventType.ENTER) { | ||||
|             let metaWindow = this._findMetaWindowForActor(event.get_source()); | ||||
|             if (metaWindow) | ||||
|                 this._selectMenuItemForWindow(metaWindow, true); | ||||
|         } else if (eventType == Clutter.EventType.LEAVE) { | ||||
|             let metaWindow = this._findMetaWindowForActor(event.get_source()); | ||||
|             if (metaWindow) | ||||
|                 this._selectMenuItemForWindow(metaWindow, false); | ||||
|         } | ||||
|  | ||||
|         return false; | ||||
|     }, | ||||
|  | ||||
|     _findMetaWindowForActor: function (actor) { | ||||
|         if (actor._delegate.metaWindow) | ||||
|             return actor._delegate.metaWindow; | ||||
|         else if (actor.get_meta_window) | ||||
|             return actor.get_meta_window(); | ||||
|         return null; | ||||
|     }, | ||||
|  | ||||
|     _updateHighlight: function (item) { | ||||
|         if (this._highlightedItem) | ||||
|             this.emit('highlight-window', null); | ||||
|         this._highlightedItem = item; | ||||
|         if (this._highlightedItem) { | ||||
|             let window = this._highlightedItem._window; | ||||
|             if (window) | ||||
|                 this.emit('highlight-window', window); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _selectMenuItemForWindow: function (metaWindow, selected) { | ||||
|         let items = this.getMenuItems(); | ||||
|         for (let i = 0; i < items.length; i++) { | ||||
|             let item = items[i]; | ||||
|             let menuMetaWindow = item._window; | ||||
|             if (menuMetaWindow == metaWindow) | ||||
|                 item.setActive(selected); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _onActiveChanged: function (menu, child) { | ||||
|         this._updateHighlight(child); | ||||
|     }, | ||||
|  | ||||
|     _onActivate: function (actor, child) { | ||||
|         if (child._window) { | ||||
|             let metaWindow = child._window; | ||||
| @@ -719,5 +688,5 @@ const AppIconMenu = new Lang.Class({ | ||||
|         } | ||||
|         this.close(); | ||||
|     } | ||||
| }); | ||||
| }; | ||||
| Signals.addSignalMethods(AppIconMenu.prototype); | ||||
|   | ||||
| @@ -1,14 +1,18 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const Shell = imports.gi.Shell; | ||||
| const Lang = imports.lang; | ||||
| const Signals = imports.signals; | ||||
| const Gettext = imports.gettext.domain('gnome-shell'); | ||||
| const _ = Gettext.gettext; | ||||
|  | ||||
| const Main = imports.ui.main; | ||||
|  | ||||
| const AppFavorites = new Lang.Class({ | ||||
|     Name: 'AppFavorites', | ||||
| function AppFavorites() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| AppFavorites.prototype = { | ||||
|     FAVORITE_APPS_KEY: 'favorite-apps', | ||||
|  | ||||
|     _init: function() { | ||||
| @@ -26,7 +30,7 @@ const AppFavorites = new Lang.Class({ | ||||
|         let ids = global.settings.get_strv(this.FAVORITE_APPS_KEY); | ||||
|         let appSys = Shell.AppSystem.get_default(); | ||||
|         let apps = ids.map(function (id) { | ||||
|                 return appSys.lookup_app(id); | ||||
|                 return appSys.get_app(id); | ||||
|             }).filter(function (app) { | ||||
|                 return app != null; | ||||
|             }); | ||||
| @@ -63,7 +67,7 @@ const AppFavorites = new Lang.Class({ | ||||
|         if (appId in this._favorites) | ||||
|             return false; | ||||
|  | ||||
|         let app = Shell.AppSystem.get_default().lookup_app(appId); | ||||
|         let app = Shell.AppSystem.get_default().get_app(appId); | ||||
|  | ||||
|         if (!app) | ||||
|             return false; | ||||
| @@ -82,9 +86,9 @@ const AppFavorites = new Lang.Class({ | ||||
|         if (!this._addFavorite(appId, pos)) | ||||
|             return; | ||||
|  | ||||
|         let app = Shell.AppSystem.get_default().lookup_app(appId); | ||||
|         let app = Shell.AppSystem.get_default().get_app(appId); | ||||
|  | ||||
|         Main.overview.setMessage(_("%s has been added to your favorites.").format(app.get_name()), Lang.bind(this, function () { | ||||
|         Main.overview.shellInfo.setMessage(_("%s has been added to your favorites.").format(app.get_name()), Lang.bind(this, function () { | ||||
|             this._removeFavorite(appId); | ||||
|         })); | ||||
|     }, | ||||
| @@ -115,12 +119,12 @@ const AppFavorites = new Lang.Class({ | ||||
|         if (!this._removeFavorite(appId)) | ||||
|             return; | ||||
|  | ||||
|         Main.overview.setMessage(_("%s has been removed from your favorites.").format(app.get_name()), | ||||
|                                  Lang.bind(this, function () { | ||||
|         Main.overview.shellInfo.setMessage(_("%s has been removed from your favorites.").format(app.get_name()), | ||||
|                                          Lang.bind(this, function () { | ||||
|             this._addFavorite(appId, pos); | ||||
|         })); | ||||
|     } | ||||
| }); | ||||
| }; | ||||
| Signals.addSignalMethods(AppFavorites.prototype); | ||||
|  | ||||
| var appFavoritesInstance = null; | ||||
|   | ||||
| @@ -1,290 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const Lang = imports.lang; | ||||
| const Mainloop = imports.mainloop; | ||||
| const GLib = imports.gi.GLib; | ||||
| const Gio = imports.gi.Gio; | ||||
| const Params = imports.misc.params; | ||||
|  | ||||
| const Shell = imports.gi.Shell; | ||||
| const Main = imports.ui.main; | ||||
| const ShellMountOperation = imports.ui.shellMountOperation; | ||||
| const ScreenSaver = imports.misc.screenSaver; | ||||
|  | ||||
| // GSettings keys | ||||
| const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling'; | ||||
| const SETTING_ENABLE_AUTOMOUNT = 'automount'; | ||||
|  | ||||
| const AUTORUN_EXPIRE_TIMEOUT_SECS = 10; | ||||
|  | ||||
| const ConsoleKitSessionIface = <interface name="org.freedesktop.ConsoleKit.Session"> | ||||
| <method name="IsActive"> | ||||
|     <arg type="b" direction="out" /> | ||||
| </method> | ||||
| <signal name="ActiveChanged"> | ||||
|     <arg type="b" direction="out" /> | ||||
| </signal> | ||||
| </interface>; | ||||
|  | ||||
| const ConsoleKitSessionProxy = Gio.DBusProxy.makeProxyWrapper(ConsoleKitSessionIface); | ||||
|  | ||||
| const ConsoleKitManagerIface = <interface name="org.freedesktop.ConsoleKit.Manager"> | ||||
| <method name="GetCurrentSession"> | ||||
|     <arg type="o" direction="out" /> | ||||
| </method> | ||||
| </interface>; | ||||
|  | ||||
| const ConsoleKitManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(ConsoleKitManagerIface); | ||||
|  | ||||
| function ConsoleKitManager() { | ||||
|     var self = new Gio.DBusProxy({ g_connection: Gio.DBus.system, | ||||
| 				   g_interface_name: ConsoleKitManagerInfo.name, | ||||
| 				   g_interface_info: ConsoleKitManagerInfo, | ||||
| 				   g_name: 'org.freedesktop.ConsoleKit', | ||||
| 				   g_object_path: '/org/freedesktop/ConsoleKit/Manager', | ||||
|                                    g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START | | ||||
|                                              Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) }); | ||||
|  | ||||
|     self._updateSessionActive = function() { | ||||
|         if (self.g_name_owner) { | ||||
|             self.GetCurrentSessionRemote(function([session]) { | ||||
|                 self._ckSession = new ConsoleKitSessionProxy(Gio.DBus.system, 'org.freedesktop.ConsoleKit', session); | ||||
|  | ||||
|                 self._ckSession.connectSignal('ActiveChanged', function(object, senderName, [isActive]) { | ||||
|                     self.sessionActive = isActive; | ||||
|                 }); | ||||
|                 self._ckSession.IsActiveRemote(function([isActive]) { | ||||
|                     self.sessionActive = isActive; | ||||
|                 }); | ||||
|             }); | ||||
|         } else { | ||||
|             self.sessionActive = true; | ||||
|         } | ||||
|     }; | ||||
|     self.connect('notify::g-name-owner', | ||||
|                  Lang.bind(self, self._updateSessionActive)); | ||||
|  | ||||
|     self._updateSessionActive(); | ||||
|     self.init(null); | ||||
|     return self; | ||||
| } | ||||
|  | ||||
| function haveSystemd() { | ||||
|     return GLib.access("/sys/fs/cgroup/systemd", 0) >= 0; | ||||
| } | ||||
|  | ||||
| const AutomountManager = new Lang.Class({ | ||||
|     Name: 'AutomountManager', | ||||
|  | ||||
|     _init: function() { | ||||
|         this._settings = new Gio.Settings({ schema: SETTINGS_SCHEMA }); | ||||
|         this._volumeQueue = []; | ||||
|  | ||||
|         if (!haveSystemd()) | ||||
|             this.ckListener = new ConsoleKitManager(); | ||||
|  | ||||
|         this._ssProxy = new ScreenSaver.ScreenSaverProxy(); | ||||
|         this._ssProxy.connectSignal('ActiveChanged', | ||||
|                                     Lang.bind(this, this._screenSaverActiveChanged)); | ||||
|  | ||||
|         this._volumeMonitor = Gio.VolumeMonitor.get(); | ||||
|  | ||||
|         this._volumeMonitor.connect('volume-added', | ||||
|                                     Lang.bind(this, | ||||
|                                               this._onVolumeAdded)); | ||||
|         this._volumeMonitor.connect('volume-removed', | ||||
|                                     Lang.bind(this, | ||||
|                                               this._onVolumeRemoved)); | ||||
|         this._volumeMonitor.connect('drive-connected', | ||||
|                                     Lang.bind(this, | ||||
|                                               this._onDriveConnected)); | ||||
|         this._volumeMonitor.connect('drive-disconnected', | ||||
|                                     Lang.bind(this, | ||||
|                                               this._onDriveDisconnected)); | ||||
|         this._volumeMonitor.connect('drive-eject-button', | ||||
|                                     Lang.bind(this, | ||||
|                                               this._onDriveEjectButton)); | ||||
|  | ||||
|         Mainloop.idle_add(Lang.bind(this, this._startupMountAll)); | ||||
|     }, | ||||
|  | ||||
|     _screenSaverActiveChanged: function(object, senderName, [isActive]) { | ||||
|         if (!isActive) { | ||||
|             this._volumeQueue.forEach(Lang.bind(this, function(volume) { | ||||
|                 this._checkAndMountVolume(volume); | ||||
|             })); | ||||
|         } | ||||
|  | ||||
|         // clear the queue anyway | ||||
|         this._volumeQueue = []; | ||||
|     }, | ||||
|  | ||||
|     _startupMountAll: function() { | ||||
|         let volumes = this._volumeMonitor.get_volumes(); | ||||
|         volumes.forEach(Lang.bind(this, function(volume) { | ||||
|             this._checkAndMountVolume(volume, { checkSession: false, | ||||
|                                                 useMountOp: false }); | ||||
|         })); | ||||
|  | ||||
|         return false; | ||||
|     }, | ||||
|  | ||||
|     isSessionActive: function() { | ||||
|         // Return whether the current session is active, using the | ||||
|         // right mechanism: either systemd if available or ConsoleKit | ||||
|         // as fallback. | ||||
|  | ||||
|         if (haveSystemd()) | ||||
|             return Shell.session_is_active_for_systemd(); | ||||
|  | ||||
|         return this.ckListener.sessionActive; | ||||
|     }, | ||||
|  | ||||
|     _onDriveConnected: function() { | ||||
|         // if we're not in the current ConsoleKit session, | ||||
|         // or screensaver is active, don't play sounds | ||||
|         if (!this.isSessionActive()) | ||||
|             return; | ||||
|  | ||||
|         if (this._ssProxy.screenSaverActive) | ||||
|             return; | ||||
|  | ||||
|         global.play_theme_sound(0, 'device-added-media'); | ||||
|     }, | ||||
|  | ||||
|     _onDriveDisconnected: function() { | ||||
|         // if we're not in the current ConsoleKit session, | ||||
|         // or screensaver is active, don't play sounds | ||||
|         if (!this.isSessionActive()) | ||||
|             return; | ||||
|  | ||||
|         if (this._ssProxy.screenSaverActive) | ||||
|             return; | ||||
|  | ||||
|         global.play_theme_sound(0, 'device-removed-media');         | ||||
|     }, | ||||
|  | ||||
|     _onDriveEjectButton: function(monitor, drive) { | ||||
|         // TODO: this code path is not tested, as the GVfs volume monitor | ||||
|         // doesn't emit this signal just yet. | ||||
|         if (!this.isSessionActive()) | ||||
|             return; | ||||
|  | ||||
|         // we force stop/eject in this case, so we don't have to pass a | ||||
|         // mount operation object | ||||
|         if (drive.can_stop()) { | ||||
|             drive.stop | ||||
|                 (Gio.MountUnmountFlags.FORCE, null, null, | ||||
|                  Lang.bind(this, function(drive, res) { | ||||
|                      try { | ||||
|                          drive.stop_finish(res); | ||||
|                      } catch (e) { | ||||
|                          log("Unable to stop the drive after drive-eject-button " + e.toString()); | ||||
|                      } | ||||
|                  })); | ||||
|         } else if (drive.can_eject()) { | ||||
|             drive.eject_with_operation  | ||||
|                 (Gio.MountUnmountFlags.FORCE, null, null, | ||||
|                  Lang.bind(this, function(drive, res) { | ||||
|                      try { | ||||
|                          drive.eject_with_operation_finish(res); | ||||
|                      } catch (e) { | ||||
|                          log("Unable to eject the drive after drive-eject-button " + e.toString()); | ||||
|                      } | ||||
|                  })); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _onVolumeAdded: function(monitor, volume) { | ||||
|         this._checkAndMountVolume(volume); | ||||
|     }, | ||||
|  | ||||
|     _checkAndMountVolume: function(volume, params) { | ||||
|         params = Params.parse(params, { checkSession: true, | ||||
|                                         useMountOp: true }); | ||||
|  | ||||
|         if (params.checkSession) { | ||||
|             // if we're not in the current ConsoleKit session, | ||||
|             // don't attempt automount | ||||
|             if (!this.isSessionActive()) | ||||
|                 return; | ||||
|  | ||||
|             if (this._ssProxy.screenSaverActive) { | ||||
|                 if (this._volumeQueue.indexOf(volume) == -1) | ||||
|                     this._volumeQueue.push(volume); | ||||
|  | ||||
|                 return; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         // Volume is already mounted, don't bother. | ||||
|         if (volume.get_mount()) | ||||
|             return; | ||||
|  | ||||
|         if (!this._settings.get_boolean(SETTING_ENABLE_AUTOMOUNT) || | ||||
|             !volume.should_automount() || | ||||
|             !volume.can_mount()) { | ||||
|             // allow the autorun to run anyway; this can happen if the | ||||
|             // mount gets added programmatically later, even if  | ||||
|             // should_automount() or can_mount() are false, like for | ||||
|             // blank optical media. | ||||
|             this._allowAutorun(volume); | ||||
|             this._allowAutorunExpire(volume); | ||||
|  | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         if (params.useMountOp) { | ||||
|             let operation = new ShellMountOperation.ShellMountOperation(volume); | ||||
|             this._mountVolume(volume, operation.mountOp); | ||||
|         } else { | ||||
|             this._mountVolume(volume, null); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _mountVolume: function(volume, operation) { | ||||
|         this._allowAutorun(volume); | ||||
|         volume.mount(0, operation, null, | ||||
|                      Lang.bind(this, this._onVolumeMounted)); | ||||
|     }, | ||||
|  | ||||
|     _onVolumeMounted: function(volume, res) { | ||||
|         this._allowAutorunExpire(volume); | ||||
|  | ||||
|         try { | ||||
|             volume.mount_finish(res); | ||||
|         } catch (e) { | ||||
|             let string = e.toString(); | ||||
|  | ||||
|             // FIXME: needs proper error code handling instead of this | ||||
|             // See https://bugzilla.gnome.org/show_bug.cgi?id=591480 | ||||
|             if (string.indexOf('No key available with this passphrase') != -1) | ||||
|                 this._reaskPassword(volume); | ||||
|             else | ||||
|                 log('Unable to mount volume ' + volume.get_name() + ': ' + string); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _onVolumeRemoved: function(monitor, volume) { | ||||
|         this._volumeQueue =  | ||||
|             this._volumeQueue.filter(function(element) { | ||||
|                 return (element != volume); | ||||
|             }); | ||||
|     }, | ||||
|  | ||||
|     _reaskPassword: function(volume) { | ||||
|         let operation = new ShellMountOperation.ShellMountOperation(volume, { reaskPassword: true }); | ||||
|         this._mountVolume(volume, operation.mountOp);         | ||||
|     }, | ||||
|  | ||||
|     _allowAutorun: function(volume) { | ||||
|         volume.allowAutorun = true; | ||||
|     }, | ||||
|  | ||||
|     _allowAutorunExpire: function(volume) { | ||||
|         Mainloop.timeout_add_seconds(AUTORUN_EXPIRE_TIMEOUT_SECS, function() { | ||||
|             volume.allowAutorun = false; | ||||
|             return false; | ||||
|         }); | ||||
|     } | ||||
| }); | ||||
| @@ -1,603 +0,0 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
|  | ||||
| const Lang = imports.lang; | ||||
| const Gio = imports.gi.Gio; | ||||
| const St = imports.gi.St; | ||||
|  | ||||
| const Main = imports.ui.main; | ||||
| const MessageTray = imports.ui.messageTray; | ||||
| const ShellMountOperation = imports.ui.shellMountOperation; | ||||
|  | ||||
| // GSettings keys | ||||
| const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling'; | ||||
| const SETTING_DISABLE_AUTORUN = 'autorun-never'; | ||||
| const SETTING_START_APP = 'autorun-x-content-start-app'; | ||||
| const SETTING_IGNORE = 'autorun-x-content-ignore'; | ||||
| const SETTING_OPEN_FOLDER = 'autorun-x-content-open-folder'; | ||||
|  | ||||
| const AutorunSetting = { | ||||
|     RUN: 0, | ||||
|     IGNORE: 1, | ||||
|     FILES: 2, | ||||
|     ASK: 3 | ||||
| }; | ||||
|  | ||||
| // misc utils | ||||
| function ignoreAutorunForMount(mount) { | ||||
|     let root = mount.get_root(); | ||||
|     let volume = mount.get_volume(); | ||||
|  | ||||
|     if ((root.is_native() && !isMountRootHidden(root)) || | ||||
|         (volume && volume.allowAutorun && volume.should_automount())) | ||||
|         return false; | ||||
|  | ||||
|     return true; | ||||
| } | ||||
|  | ||||
| function isMountRootHidden(root) { | ||||
|     let path = root.get_path(); | ||||
|  | ||||
|     // skip any mounts in hidden directory hierarchies | ||||
|     return (path.indexOf('/.') != -1); | ||||
| } | ||||
|  | ||||
| function startAppForMount(app, mount) { | ||||
|     let files = []; | ||||
|     let root = mount.get_root(); | ||||
|     let retval = false; | ||||
|  | ||||
|     files.push(root); | ||||
|  | ||||
|     try { | ||||
|         retval = app.launch(files,  | ||||
|                             global.create_app_launch_context()) | ||||
|     } catch (e) { | ||||
|         log('Unable to launch the application ' + app.get_name() | ||||
|             + ': ' + e.toString()); | ||||
|     } | ||||
|  | ||||
|     return retval; | ||||
| } | ||||
|  | ||||
| /******************************************/ | ||||
|  | ||||
| const HotplugSnifferIface = <interface name="org.gnome.Shell.HotplugSniffer"> | ||||
| <method name="SniffURI"> | ||||
|     <arg type="s" direction="in" /> | ||||
|     <arg type="as" direction="out" /> | ||||
| </method> | ||||
| </interface>; | ||||
|  | ||||
| const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface); | ||||
| function HotplugSniffer() { | ||||
|     return new HotplugSnifferProxy(Gio.DBus.session, | ||||
|                                    'org.gnome.Shell.HotplugSniffer', | ||||
|                                    '/org/gnome/Shell/HotplugSniffer'); | ||||
| } | ||||
|  | ||||
| const ContentTypeDiscoverer = new Lang.Class({ | ||||
|     Name: 'ContentTypeDiscoverer', | ||||
|  | ||||
|     _init: function(callback) { | ||||
|         this._callback = callback; | ||||
|     }, | ||||
|  | ||||
|     guessContentTypes: function(mount) { | ||||
|         // guess mount's content types using GIO | ||||
|         mount.guess_content_type(false, null, | ||||
|                                  Lang.bind(this, | ||||
|                                            this._onContentTypeGuessed)); | ||||
|     }, | ||||
|  | ||||
|     _onContentTypeGuessed: function(mount, res) { | ||||
|         let contentTypes = []; | ||||
|  | ||||
|         try { | ||||
|             contentTypes = mount.guess_content_type_finish(res); | ||||
|         } catch (e) { | ||||
|             log('Unable to guess content types on added mount ' + mount.get_name() | ||||
|                 + ': ' + e.toString()); | ||||
|         } | ||||
|  | ||||
|         if (contentTypes.length) { | ||||
|             this._emitCallback(mount, contentTypes); | ||||
|         } else { | ||||
|             let root = mount.get_root(); | ||||
|  | ||||
|             let hotplugSniffer = new HotplugSniffer(); | ||||
|             hotplugSniffer.SniffURIRemote(root.get_uri(), | ||||
|                  Lang.bind(this, function([contentTypes]) { | ||||
|                      this._emitCallback(mount, contentTypes); | ||||
|                  })); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _emitCallback: function(mount, contentTypes) { | ||||
|         if (!contentTypes) | ||||
|             contentTypes = []; | ||||
|  | ||||
|         // we're not interested in win32 software content types here | ||||
|         contentTypes = contentTypes.filter(function(type) { | ||||
|             return (type != 'x-content/win32-software'); | ||||
|         }); | ||||
|  | ||||
|         let apps = []; | ||||
|         contentTypes.forEach(function(type) { | ||||
|             let app = Gio.app_info_get_default_for_type(type, false); | ||||
|  | ||||
|             if (app) | ||||
|                 apps.push(app); | ||||
|         }); | ||||
|  | ||||
|         if (apps.length == 0) | ||||
|             apps.push(Gio.app_info_get_default_for_type('inode/directory', false)); | ||||
|  | ||||
|         this._callback(mount, apps, contentTypes); | ||||
|     } | ||||
| }); | ||||
|  | ||||
| const AutorunManager = new Lang.Class({ | ||||
|     Name: 'AutorunManager', | ||||
|  | ||||
|     _init: function() { | ||||
|         this._volumeMonitor = Gio.VolumeMonitor.get(); | ||||
|  | ||||
|         this._volumeMonitor.connect('mount-added', | ||||
|                                     Lang.bind(this, | ||||
|                                               this._onMountAdded)); | ||||
|         this._volumeMonitor.connect('mount-removed', | ||||
|                                     Lang.bind(this, | ||||
|                                               this._onMountRemoved)); | ||||
|  | ||||
|         this._transDispatcher = new AutorunTransientDispatcher(); | ||||
|         this._createResidentSource(); | ||||
|  | ||||
|         let mounts = this._volumeMonitor.get_mounts(); | ||||
|  | ||||
|         mounts.forEach(Lang.bind(this, function (mount) { | ||||
|             let discoverer = new ContentTypeDiscoverer(Lang.bind (this,  | ||||
|                 function (mount, apps) { | ||||
|                     this._residentSource.addMount(mount, apps); | ||||
|                 })); | ||||
|  | ||||
|             discoverer.guessContentTypes(mount); | ||||
|         })); | ||||
|     }, | ||||
|  | ||||
|     _createResidentSource: function() { | ||||
|         this._residentSource = new AutorunResidentSource(); | ||||
|         this._residentSource.connect('destroy', | ||||
|                                      Lang.bind(this, | ||||
|                                                this._createResidentSource)); | ||||
|     }, | ||||
|  | ||||
|     _onMountAdded: function(monitor, mount) { | ||||
|         // don't do anything if our session is not the currently | ||||
|         // active one | ||||
|         if (!Main.automountManager.isSessionActive()) | ||||
|             return; | ||||
|  | ||||
|         let discoverer = new ContentTypeDiscoverer(Lang.bind (this, | ||||
|             function (mount, apps, contentTypes) { | ||||
|                 this._transDispatcher.addMount(mount, apps, contentTypes); | ||||
|                 this._residentSource.addMount(mount, apps); | ||||
|             })); | ||||
|  | ||||
|         discoverer.guessContentTypes(mount); | ||||
|     }, | ||||
|  | ||||
|     _onMountRemoved: function(monitor, mount) { | ||||
|         this._transDispatcher.removeMount(mount); | ||||
|         this._residentSource.removeMount(mount); | ||||
|     }, | ||||
|  | ||||
|     ejectMount: function(mount) { | ||||
|         let mountOp = new ShellMountOperation.ShellMountOperation(mount); | ||||
|  | ||||
|         // first, see if we have a drive | ||||
|         let drive = mount.get_drive(); | ||||
|         let volume = mount.get_volume(); | ||||
|  | ||||
|         if (drive && | ||||
|             drive.get_start_stop_type() == Gio.DriveStartStopType.SHUTDOWN && | ||||
|             drive.can_stop()) { | ||||
|             drive.stop(0, mountOp.mountOp, null, | ||||
|                        Lang.bind(this, this._onStop)); | ||||
|         } else { | ||||
|             if (mount.can_eject()) { | ||||
|                 mount.eject_with_operation(0, mountOp.mountOp, null, | ||||
|                                            Lang.bind(this, this._onEject)); | ||||
|             } else if (volume && volume.can_eject()) { | ||||
|                 volume.eject_with_operation(0, mountOp.mountOp, null, | ||||
|                                             Lang.bind(this, this._onEject)); | ||||
|             } else if (drive && drive.can_eject()) { | ||||
|                 drive.eject_with_operation(0, mountOp.mountOp, null, | ||||
|                                            Lang.bind(this, this._onEject)); | ||||
|             } else if (mount.can_unmount()) { | ||||
|                 mount.unmount_with_operation(0, mountOp.mountOp, null, | ||||
|                                              Lang.bind(this, this._onUnmount)); | ||||
|             } | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _onUnmount: function(mount, res) { | ||||
|         try { | ||||
|             mount.unmount_with_operation_finish(res); | ||||
|         } catch (e) { | ||||
|             // FIXME: we need to ignore G_IO_ERROR_FAILED_HANDLED errors here | ||||
|             // but we can't access the error code from JS. | ||||
|             // See https://bugzilla.gnome.org/show_bug.cgi?id=591480 | ||||
|             log('Unable to eject the mount ' + mount.get_name()  | ||||
|                 + ': ' + e.toString()); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _onEject: function(source, res) { | ||||
|         try { | ||||
|             source.eject_with_operation_finish(res); | ||||
|         } catch (e) { | ||||
|             // FIXME: we need to ignore G_IO_ERROR_FAILED_HANDLED errors here | ||||
|             // but we can't access the error code from JS. | ||||
|             // See https://bugzilla.gnome.org/show_bug.cgi?id=591480 | ||||
|             log('Unable to eject the drive ' + source.get_name()  | ||||
|                 + ': ' + e.toString()); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _onStop: function(drive, res) { | ||||
|         try { | ||||
|             drive.stop_finish(res); | ||||
|         } catch (e) { | ||||
|             // FIXME: we need to ignore G_IO_ERROR_FAILED_HANDLED errors here | ||||
|             // but we can't access the error code from JS. | ||||
|             // See https://bugzilla.gnome.org/show_bug.cgi?id=591480 | ||||
|             log('Unable to stop the drive ' + drive.get_name()  | ||||
|                 + ': ' + e.toString()); | ||||
|         } | ||||
|     }, | ||||
| }); | ||||
|  | ||||
| const AutorunResidentSource = new Lang.Class({ | ||||
|     Name: 'AutorunResidentSource', | ||||
|     Extends: MessageTray.Source, | ||||
|  | ||||
|     _init: function() { | ||||
|         this.parent(_("Removable Devices")); | ||||
|  | ||||
|         this._mounts = []; | ||||
|  | ||||
|         this._notification = new AutorunResidentNotification(this); | ||||
|         this._setSummaryIcon(this.createNotificationIcon()); | ||||
|     }, | ||||
|  | ||||
|     addMount: function(mount, apps) { | ||||
|         if (ignoreAutorunForMount(mount)) | ||||
|             return; | ||||
|  | ||||
|         let filtered = this._mounts.filter(function (element) { | ||||
|             return (element.mount == mount); | ||||
|         }); | ||||
|  | ||||
|         if (filtered.length != 0) | ||||
|             return; | ||||
|  | ||||
|         let element = { mount: mount, apps: apps }; | ||||
|         this._mounts.push(element); | ||||
|         this._redisplay(); | ||||
|     }, | ||||
|  | ||||
|     removeMount: function(mount) { | ||||
|         this._mounts = | ||||
|             this._mounts.filter(function (element) { | ||||
|                 return (element.mount != mount); | ||||
|             }); | ||||
|  | ||||
|         this._redisplay(); | ||||
|     }, | ||||
|  | ||||
|     _redisplay: function() { | ||||
|         if (this._mounts.length == 0) { | ||||
|             this._notification.destroy(); | ||||
|             this.destroy(); | ||||
|  | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         this._notification.updateForMounts(this._mounts); | ||||
|  | ||||
|         // add ourselves as a source, and push the notification | ||||
|         if (!Main.messageTray.contains(this)) { | ||||
|             Main.messageTray.add(this); | ||||
|             this.pushNotification(this._notification); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     createNotificationIcon: function() { | ||||
|         return new St.Icon ({ icon_name: 'media-removable', | ||||
|                               icon_type: St.IconType.FULLCOLOR, | ||||
|                               icon_size: this.ICON_SIZE }); | ||||
|     } | ||||
| }); | ||||
|  | ||||
| const AutorunResidentNotification = new Lang.Class({ | ||||
|     Name: 'AutorunResidentNotification', | ||||
|     Extends: MessageTray.Notification, | ||||
|  | ||||
|     _init: function(source) { | ||||
|         this.parent(source, source.title, null, { customContent: true }); | ||||
|  | ||||
|         // set the notification as resident | ||||
|         this.setResident(true); | ||||
|  | ||||
|         this._layout = new St.BoxLayout ({ style_class: 'hotplug-resident-box', | ||||
|                                            vertical: true }); | ||||
|  | ||||
|         this.addActor(this._layout, | ||||
|                       { x_expand: true, | ||||
|                         x_fill: true }); | ||||
|     }, | ||||
|  | ||||
|     updateForMounts: function(mounts) { | ||||
|         // remove all the layout content | ||||
|         this._layout.destroy_all_children(); | ||||
|  | ||||
|         for (let idx = 0; idx < mounts.length; idx++) { | ||||
|             let element = mounts[idx]; | ||||
|  | ||||
|             let actor = this._itemForMount(element.mount, element.apps); | ||||
|             this._layout.add(actor, { x_fill: true, | ||||
|                                       expand: true }); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _itemForMount: function(mount, apps) { | ||||
|         let item = new St.BoxLayout(); | ||||
|  | ||||
|         // prepare the mount button content | ||||
|         let mountLayout = new St.BoxLayout(); | ||||
|  | ||||
|         let mountIcon = new St.Icon({ gicon: mount.get_icon(), | ||||
|                                       style_class: 'hotplug-resident-mount-icon' }); | ||||
|         mountLayout.add_actor(mountIcon); | ||||
|  | ||||
|         let labelBin = new St.Bin({ y_align: St.Align.MIDDLE }); | ||||
|         let mountLabel = | ||||
|             new St.Label({ text: mount.get_name(), | ||||
|                            style_class: 'hotplug-resident-mount-label', | ||||
|                            track_hover: true, | ||||
|                            reactive: true }); | ||||
|         labelBin.add_actor(mountLabel); | ||||
|         mountLayout.add_actor(labelBin); | ||||
|  | ||||
|         let mountButton = new St.Button({ child: mountLayout, | ||||
|                                           x_align: St.Align.START, | ||||
|                                           x_fill: true, | ||||
|                                           style_class: 'hotplug-resident-mount', | ||||
|                                           button_mask: St.ButtonMask.ONE }); | ||||
|         item.add(mountButton, { x_align: St.Align.START, | ||||
|                                 expand: true }); | ||||
|  | ||||
|         let ejectIcon =  | ||||
|             new St.Icon({ icon_name: 'media-eject', | ||||
|                           style_class: 'hotplug-resident-eject-icon' }); | ||||
|  | ||||
|         let ejectButton = | ||||
|             new St.Button({ style_class: 'hotplug-resident-eject-button', | ||||
|                             button_mask: St.ButtonMask.ONE, | ||||
|                             child: ejectIcon }); | ||||
|         item.add(ejectButton, { x_align: St.Align.END }); | ||||
|  | ||||
|         // now connect signals | ||||
|         mountButton.connect('clicked', Lang.bind(this, function(actor, event) { | ||||
|             startAppForMount(apps[0], mount); | ||||
|         })); | ||||
|  | ||||
|         ejectButton.connect('clicked', Lang.bind(this, function() { | ||||
|             Main.autorunManager.ejectMount(mount); | ||||
|         })); | ||||
|  | ||||
|         return item; | ||||
|     }, | ||||
| }); | ||||
|  | ||||
| const AutorunTransientDispatcher = new Lang.Class({ | ||||
|     Name: 'AutorunTransientDispatcher', | ||||
|  | ||||
|     _init: function() { | ||||
|         this._sources = []; | ||||
|         this._settings = new Gio.Settings({ schema: SETTINGS_SCHEMA }); | ||||
|     }, | ||||
|  | ||||
|     _getAutorunSettingForType: function(contentType) { | ||||
|         let runApp = this._settings.get_strv(SETTING_START_APP); | ||||
|         if (runApp.indexOf(contentType) != -1) | ||||
|             return AutorunSetting.RUN; | ||||
|  | ||||
|         let ignore = this._settings.get_strv(SETTING_IGNORE); | ||||
|         if (ignore.indexOf(contentType) != -1) | ||||
|             return AutorunSetting.IGNORE; | ||||
|  | ||||
|         let openFiles = this._settings.get_strv(SETTING_OPEN_FOLDER); | ||||
|         if (openFiles.indexOf(contentType) != -1) | ||||
|             return AutorunSetting.FILES; | ||||
|  | ||||
|         return AutorunSetting.ASK; | ||||
|     }, | ||||
|  | ||||
|     _getSourceForMount: function(mount) { | ||||
|         let filtered = | ||||
|             this._sources.filter(function (source) { | ||||
|                 return (source.mount == mount); | ||||
|             }); | ||||
|  | ||||
|         // we always make sure not to add two sources for the same | ||||
|         // mount in addMount(), so it's safe to assume filtered.length | ||||
|         // is always either 1 or 0. | ||||
|         if (filtered.length == 1) | ||||
|             return filtered[0]; | ||||
|  | ||||
|         return null; | ||||
|     }, | ||||
|  | ||||
|     _addSource: function(mount, apps) { | ||||
|         // if we already have a source showing for this  | ||||
|         // mount, return | ||||
|         if (this._getSourceForMount(mount)) | ||||
|             return; | ||||
|       | ||||
|         // add a new source | ||||
|         this._sources.push(new AutorunTransientSource(mount, apps)); | ||||
|     }, | ||||
|  | ||||
|     addMount: function(mount, apps, contentTypes) { | ||||
|         // if autorun is disabled globally, return | ||||
|         if (this._settings.get_boolean(SETTING_DISABLE_AUTORUN)) | ||||
|             return; | ||||
|  | ||||
|         // if the mount doesn't want to be autorun, return | ||||
|         if (ignoreAutorunForMount(mount)) | ||||
|             return; | ||||
|  | ||||
|         let setting = this._getAutorunSettingForType(contentTypes[0]); | ||||
|  | ||||
|         // check at the settings for the first content type | ||||
|         // to see whether we should ask | ||||
|         if (setting == AutorunSetting.IGNORE) | ||||
|             return; // return right away | ||||
|  | ||||
|         let success = false; | ||||
|         let app = null; | ||||
|  | ||||
|         if (setting == AutorunSetting.RUN) { | ||||
|             app = Gio.app_info_get_default_for_type(contentTypes[0], false); | ||||
|         } else if (setting == AutorunSetting.FILES) { | ||||
|             app = Gio.app_info_get_default_for_type('inode/directory', false); | ||||
|         } | ||||
|  | ||||
|         if (app) | ||||
|             success = startAppForMount(app, mount); | ||||
|  | ||||
|         // we fallback here also in case the settings did not specify 'ask', | ||||
|         // but we failed launching the default app or the default file manager | ||||
|         if (!success) | ||||
|             this._addSource(mount, apps); | ||||
|     }, | ||||
|  | ||||
|     removeMount: function(mount) { | ||||
|         let source = this._getSourceForMount(mount); | ||||
|          | ||||
|         // if we aren't tracking this mount, don't do anything | ||||
|         if (!source) | ||||
|             return; | ||||
|  | ||||
|         // destroy the notification source | ||||
|         source.destroy(); | ||||
|     } | ||||
| }); | ||||
|  | ||||
| const AutorunTransientSource = new Lang.Class({ | ||||
|     Name: 'AutorunTransientSource', | ||||
|     Extends: MessageTray.Source, | ||||
|  | ||||
|     _init: function(mount, apps) { | ||||
|         this.parent(mount.get_name()); | ||||
|  | ||||
|         this.mount = mount; | ||||
|         this.apps = apps; | ||||
|  | ||||
|         this._notification = new AutorunTransientNotification(this); | ||||
|         this._setSummaryIcon(this.createNotificationIcon()); | ||||
|  | ||||
|         // add ourselves as a source, and popup the notification | ||||
|         Main.messageTray.add(this); | ||||
|         this.notify(this._notification); | ||||
|     }, | ||||
|  | ||||
|     createNotificationIcon: function() { | ||||
|         return new St.Icon({ gicon: this.mount.get_icon(), | ||||
|                              icon_size: this.ICON_SIZE }); | ||||
|     } | ||||
| }); | ||||
|  | ||||
| const AutorunTransientNotification = new Lang.Class({ | ||||
|     Name: 'AutorunTransientNotification', | ||||
|     Extends: MessageTray.Notification, | ||||
|  | ||||
|     _init: function(source) { | ||||
|         this.parent(source, source.title, null, { customContent: true }); | ||||
|  | ||||
|         this._box = new St.BoxLayout({ style_class: 'hotplug-transient-box', | ||||
|                                        vertical: true }); | ||||
|         this.addActor(this._box); | ||||
|  | ||||
|         this._mount = source.mount; | ||||
|  | ||||
|         source.apps.forEach(Lang.bind(this, function (app) { | ||||
|             let actor = this._buttonForApp(app); | ||||
|  | ||||
|             if (actor) | ||||
|                 this._box.add(actor, { x_fill: true, | ||||
|                                        x_align: St.Align.START }); | ||||
|         })); | ||||
|  | ||||
|         this._box.add(this._buttonForEject(), { x_fill: true, | ||||
|                                                 x_align: St.Align.START }); | ||||
|  | ||||
|         // set the notification to transient and urgent, so that it | ||||
|         // expands out | ||||
|         this.setTransient(true); | ||||
|         this.setUrgency(MessageTray.Urgency.CRITICAL); | ||||
|     }, | ||||
|  | ||||
|     _buttonForApp: function(app) { | ||||
|         let box = new St.BoxLayout(); | ||||
|         let icon = new St.Icon({ gicon: app.get_icon(), | ||||
|                                  style_class: 'hotplug-notification-item-icon' }); | ||||
|         box.add(icon); | ||||
|  | ||||
|         let label = new St.Bin({ y_align: St.Align.MIDDLE, | ||||
|                                  child: new St.Label | ||||
|                                  ({ text: _("Open with %s").format(app.get_name()) }) | ||||
|                                }); | ||||
|         box.add(label); | ||||
|  | ||||
|         let button = new St.Button({ child: box, | ||||
|                                      x_fill: true, | ||||
|                                      x_align: St.Align.START, | ||||
|                                      button_mask: St.ButtonMask.ONE, | ||||
|                                      style_class: 'hotplug-notification-item' }); | ||||
|  | ||||
|         button.connect('clicked', Lang.bind(this, function() { | ||||
|             startAppForMount(app, this._mount); | ||||
|             this.destroy(); | ||||
|         })); | ||||
|  | ||||
|         return button; | ||||
|     }, | ||||
|  | ||||
|     _buttonForEject: function() { | ||||
|         let box = new St.BoxLayout(); | ||||
|         let icon = new St.Icon({ icon_name: 'media-eject', | ||||
|                                  style_class: 'hotplug-notification-item-icon' }); | ||||
|         box.add(icon); | ||||
|  | ||||
|         let label = new St.Bin({ y_align: St.Align.MIDDLE, | ||||
|                                  child: new St.Label | ||||
|                                  ({ text: _("Eject") }) | ||||
|                                }); | ||||
|         box.add(label); | ||||
|  | ||||
|         let button = new St.Button({ child: box, | ||||
|                                      x_fill: true, | ||||
|                                      x_align: St.Align.START, | ||||
|                                      button_mask: St.ButtonMask.ONE, | ||||
|                                      style_class: 'hotplug-notification-item' }); | ||||
|  | ||||
|         button.connect('clicked', Lang.bind(this, function() { | ||||
|             Main.autorunManager.ejectMount(this._mount); | ||||
|         })); | ||||
|  | ||||
|         return button; | ||||
|     } | ||||
| }); | ||||
|  | ||||
| @@ -1,12 +1,10 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const Clutter = imports.gi.Clutter; | ||||
| const Lang = imports.lang; | ||||
| const Meta = imports.gi.Meta; | ||||
| const St = imports.gi.St; | ||||
| const Shell = imports.gi.Shell; | ||||
|  | ||||
| const Main = imports.ui.main; | ||||
| const Tweener = imports.ui.tweener; | ||||
|  | ||||
| const POPUP_ANIMATION_TIME = 0.15; | ||||
| @@ -21,12 +19,15 @@ const POPUP_ANIMATION_TIME = 0.15; | ||||
|  * placed.  The arrow position may be controlled via setArrowOrigin(). | ||||
|  * | ||||
|  */ | ||||
| const BoxPointer = new Lang.Class({ | ||||
|     Name: 'BoxPointer', | ||||
| function BoxPointer(side, binProperties) { | ||||
|     this._init(side, binProperties); | ||||
| } | ||||
|  | ||||
| BoxPointer.prototype = { | ||||
|     _init: function(arrowSide, binProperties) { | ||||
|         this._arrowSide = arrowSide; | ||||
|         this._arrowOrigin = 0; | ||||
|         this._arrowCorner = null; | ||||
|         this.actor = new St.Bin({ x_fill: true, | ||||
|                                   y_fill: true }); | ||||
|         this._container = new Shell.GenericContainer(); | ||||
| @@ -40,102 +41,80 @@ const BoxPointer = new Lang.Class({ | ||||
|         this._border.connect('repaint', Lang.bind(this, this._drawBorder)); | ||||
|         this._container.add_actor(this._border); | ||||
|         this.bin.raise(this._border); | ||||
|         this._xOffset = 0; | ||||
|         this._yOffset = 0; | ||||
|         this._xPosition = 0; | ||||
|         this._yPosition = 0; | ||||
|         this._sourceAlignment = 0.5; | ||||
|         this._capturedEventId = 0; | ||||
|         this._muteInput(); | ||||
|     }, | ||||
|  | ||||
|     _muteInput: function() { | ||||
|         if (this._capturedEventId == 0) | ||||
|             this._capturedEventId = this.actor.connect('captured-event', | ||||
|                                                        function() { return true; }); | ||||
|     }, | ||||
|  | ||||
|     _unmuteInput: function() { | ||||
|         if (this._capturedEventId != 0) { | ||||
|             this.actor.disconnect(this._capturedEventId); | ||||
|             this._capturedEventId = 0; | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     show: function(animate, onComplete) { | ||||
|         let x = this.actor.x; | ||||
|         let y = this.actor.y; | ||||
|         let themeNode = this.actor.get_theme_node(); | ||||
|         let rise = themeNode.get_length('-arrow-rise'); | ||||
|  | ||||
|         this.opacity = 0; | ||||
|         this.actor.opacity = 0; | ||||
|         this.actor.show(); | ||||
|  | ||||
|         if (animate) { | ||||
|             switch (this._arrowSide) { | ||||
|                 case St.Side.TOP: | ||||
|                     this.yOffset = -rise; | ||||
|                     this.actor.y -= rise; | ||||
|                     break; | ||||
|                 case St.Side.BOTTOM: | ||||
|                     this.yOffset = rise; | ||||
|                     this.actor.y += rise; | ||||
|                     break; | ||||
|                 case St.Side.LEFT: | ||||
|                     this.xOffset = -rise; | ||||
|                     this.actor.x -= rise; | ||||
|                     break; | ||||
|                 case St.Side.RIGHT: | ||||
|                     this.xOffset = rise; | ||||
|                     this.actor.x += rise; | ||||
|                     break; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         Tweener.addTween(this, { opacity: 255, | ||||
|                                  xOffset: 0, | ||||
|                                  yOffset: 0, | ||||
|                                  transition: 'linear', | ||||
|                                  onComplete: Lang.bind(this, function() { | ||||
|                                      this._unmuteInput(); | ||||
|                                      if (onComplete) | ||||
|                                          onComplete(); | ||||
|                                  }), | ||||
|                                  time: POPUP_ANIMATION_TIME }); | ||||
|         Tweener.addTween(this.actor, { opacity: 255, | ||||
|                                        x: x, | ||||
|                                        y: y, | ||||
|                                        transition: "linear", | ||||
|                                        onComplete: onComplete, | ||||
|                                        time: POPUP_ANIMATION_TIME }); | ||||
|     }, | ||||
|  | ||||
|     hide: function(animate, onComplete) { | ||||
|         let xOffset = 0; | ||||
|         let yOffset = 0; | ||||
|         let x = this.actor.x; | ||||
|         let y = this.actor.y; | ||||
|         let originalX = this.actor.x; | ||||
|         let originalY = this.actor.y; | ||||
|         let themeNode = this.actor.get_theme_node(); | ||||
|         let rise = themeNode.get_length('-arrow-rise'); | ||||
|  | ||||
|         if (animate) { | ||||
|             switch (this._arrowSide) { | ||||
|                 case St.Side.TOP: | ||||
|                     yOffset = rise; | ||||
|                     y += rise; | ||||
|                     break; | ||||
|                 case St.Side.BOTTOM: | ||||
|                     yOffset = -rise; | ||||
|                     y -= rise; | ||||
|                     break; | ||||
|                 case St.Side.LEFT: | ||||
|                     xOffset = rise; | ||||
|                     x += rise; | ||||
|                     break; | ||||
|                 case St.Side.RIGHT: | ||||
|                     xOffset = -rise; | ||||
|                     x -= rise; | ||||
|                     break; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         this._muteInput(); | ||||
|  | ||||
|         Tweener.addTween(this, { opacity: 0, | ||||
|                                  xOffset: xOffset, | ||||
|                                  yOffset: yOffset, | ||||
|                                  transition: 'linear', | ||||
|                                  time: POPUP_ANIMATION_TIME, | ||||
|                                  onComplete: Lang.bind(this, function () { | ||||
|                                      this.actor.hide(); | ||||
|                                      this.xOffset = 0; | ||||
|                                      this.yOffset = 0; | ||||
|                                      if (onComplete) | ||||
|                                          onComplete(); | ||||
|                                  }) | ||||
|                                }); | ||||
|         Tweener.addTween(this.actor, { opacity: 0, | ||||
|                                        x: x, | ||||
|                                        y: y, | ||||
|                                        transition: "linear", | ||||
|                                        time: POPUP_ANIMATION_TIME, | ||||
|                                        onComplete: Lang.bind(this, function () { | ||||
|                                            this.actor.hide(); | ||||
|                                            this.actor.x = originalX; | ||||
|                                            this.actor.y = originalY; | ||||
|                                            if (onComplete) | ||||
|                                                onComplete(); | ||||
|                                        }) | ||||
|                                      }); | ||||
|     }, | ||||
|  | ||||
|     _adjustAllocationForArrow: function(isWidth, alloc) { | ||||
| @@ -198,9 +177,6 @@ const BoxPointer = new Lang.Class({ | ||||
|                 break; | ||||
|         } | ||||
|         this.bin.allocate(childBox, flags); | ||||
|  | ||||
|         if (this._sourceActor && this._sourceActor.mapped) | ||||
|             this._reposition(this._sourceActor, this._arrowAlignment); | ||||
|     }, | ||||
|  | ||||
|     _drawBorder: function(area) { | ||||
| @@ -214,8 +190,10 @@ const BoxPointer = new Lang.Class({ | ||||
|         let halfBorder = borderWidth / 2; | ||||
|         let halfBase = Math.floor(base/2); | ||||
|  | ||||
|         let borderColor = themeNode.get_color('-arrow-border-color'); | ||||
|         let backgroundColor = themeNode.get_color('-arrow-background-color'); | ||||
|         let borderColor = new Clutter.Color(); | ||||
|         themeNode.get_color('-arrow-border-color', borderColor); | ||||
|         let backgroundColor = new Clutter.Color(); | ||||
|         themeNode.get_color('-arrow-background-color', backgroundColor); | ||||
|  | ||||
|         let [width, height] = area.get_surface_size(); | ||||
|         let [boxWidth, boxHeight] = [width, height]; | ||||
| @@ -240,84 +218,135 @@ const BoxPointer = new Lang.Class({ | ||||
|  | ||||
|         cr.moveTo(x1 + borderRadius, y1); | ||||
|         if (this._arrowSide == St.Side.TOP) { | ||||
|             if (this._arrowOrigin < (x1 + (borderRadius + halfBase))) { | ||||
|             if (this._arrowCorner == St.Corner.TOPLEFT) { | ||||
|                 cr.moveTo(x1, y1); | ||||
|                 cr.lineTo(x1, y1 - rise); | ||||
|                 cr.lineTo(x1 + halfBase, y1); | ||||
|                 cr.lineTo(x2 - borderRadius, y1); | ||||
|             } else if (this._arrowCorner == St.Corner.TOPRIGHT) { | ||||
|                 cr.lineTo(x2 - halfBase, y1); | ||||
|                 cr.lineTo(x2, y1 - rise); | ||||
|             } else if (this._arrowOrigin < (x1 + (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(this._arrowOrigin, y1); | ||||
|                 cr.lineTo(this._arrowOrigin, y1 - rise); | ||||
|                 cr.lineTo(Math.max(x1 + borderRadius, this._arrowOrigin) + halfBase, y1); | ||||
|                 cr.lineTo(this._arrowOrigin + halfBase, y1); | ||||
|                 cr.lineTo(x2 - borderRadius, y1); | ||||
|             } else if (this._arrowOrigin > (x2 - (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(Math.min(x2 - borderRadius, this._arrowOrigin) - halfBase, y1); | ||||
|                 cr.lineTo(this._arrowOrigin - halfBase, y1); | ||||
|                 cr.lineTo(this._arrowOrigin, y1 - rise); | ||||
|                 cr.lineTo(this._arrowOrigin, y1); | ||||
|                 cr.lineTo(x2 - borderRadius, y1); | ||||
|             } else { | ||||
|                 cr.lineTo(this._arrowOrigin - halfBase, y1); | ||||
|                 cr.lineTo(this._arrowOrigin, y1 - rise); | ||||
|                 cr.lineTo(this._arrowOrigin + halfBase, y1); | ||||
|                 cr.lineTo(x2 - borderRadius, y1); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         cr.lineTo(x2 - borderRadius, y1); | ||||
|         } else | ||||
|             cr.lineTo(x2 - borderRadius, y1); | ||||
|  | ||||
|         // top-right corner | ||||
|         cr.arc(x2 - borderRadius, y1 + borderRadius, borderRadius, | ||||
|                3*Math.PI/2, Math.PI*2); | ||||
|         if (this._arrowCorner != St.Corner.TOPRIGHT) | ||||
|             cr.arc(x2 - borderRadius, y1 + borderRadius, borderRadius, | ||||
|                    3*Math.PI/2, Math.PI*2); | ||||
|  | ||||
|         if (this._arrowSide == St.Side.RIGHT) { | ||||
|             if (this._arrowOrigin < (y1 + (borderRadius + halfBase))) { | ||||
|             if (this._arrowCorner == St.Corner.TOPRIGHT) { | ||||
|                 cr.lineTo(x2, y1); | ||||
|                 cr.lineTo(x2 + rise, y1); | ||||
|                 cr.lineTo(x2, y1 + halfBase); | ||||
|                 cr.lineTo(x2, y2 - borderRadius); | ||||
|             } else if (this._arrowCorner == St.Corner.BOTTOMRIGHT) { | ||||
|                 cr.moveTo(x2, y2 - halfBase); | ||||
|                 cr.lineTo(x2 + rise, y2); | ||||
|             } else if (this._arrowOrigin < (y1 + (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(x2, this._arrowOrigin); | ||||
|                 cr.lineTo(x2 + rise, this._arrowOrigin); | ||||
|                 cr.lineTo(x2, Math.max(y1 + borderRadius, this._arrowOrigin) + halfBase); | ||||
|                 cr.lineTo(x2, this._arrowOrigin + halfBase); | ||||
|                 cr.lineTo(x2, y2 - borderRadius); | ||||
|             } else if (this._arrowOrigin > (y2 - (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(x2, Math.min(y2 - borderRadius, this._arrowOrigin) - halfBase); | ||||
|                 cr.lineTo(x2, this._arrowOrigin - halfBase); | ||||
|                 cr.lineTo(x2 + rise, this._arrowOrigin); | ||||
|                 cr.lineTo(x2, this._arrowOrigin); | ||||
|                 cr.lineTo(x2, y2 - borderRadius); | ||||
|             } else { | ||||
|                 cr.lineTo(x2, this._arrowOrigin - halfBase); | ||||
|                 cr.lineTo(x2 + rise, this._arrowOrigin); | ||||
|                 cr.lineTo(x2, this._arrowOrigin + halfBase); | ||||
|                 cr.lineTo(x2, y2 - borderRadius); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         cr.lineTo(x2, y2 - borderRadius); | ||||
|         } else | ||||
|             cr.lineTo(x2, y2 - borderRadius); | ||||
|  | ||||
|         // bottom-right corner | ||||
|         cr.arc(x2 - borderRadius, y2 - borderRadius, borderRadius, | ||||
|                0, Math.PI/2); | ||||
|         if (this._arrowCorner != St.Corner.BOTTOMRIGHT) | ||||
|             cr.arc(x2 - borderRadius, y2 - borderRadius, borderRadius, | ||||
|                    0, Math.PI/2); | ||||
|  | ||||
|         if (this._arrowSide == St.Side.BOTTOM) { | ||||
|             if (this._arrowOrigin < (x1 + (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(Math.max(x1 + borderRadius, this._arrowOrigin) + halfBase, y2); | ||||
|             if (this._arrowCorner == St.Corner.BOTTOMLEFT) { | ||||
|                 cr.lineTo(x1 + halfBase, y2); | ||||
|                 cr.lineTo(x1, y2 + rise); | ||||
|             } else if (this._arrowCorner == St.Corner.BOTTOMRIGHT) { | ||||
|                 cr.lineTo(x2, y2 + rise); | ||||
|                 cr.lineTo(x2 - halfBase, y2); | ||||
|                 cr.lineTo(x1 + borderRadius, y2); | ||||
|             } else if (this._arrowOrigin < (x1 + (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(this._arrowOrigin + halfBase, y2); | ||||
|                 cr.lineTo(this._arrowOrigin, y2 + rise); | ||||
|                 cr.lineTo(this._arrowOrigin, y2); | ||||
|                 cr.lineTo(x1 + borderRadius, y2); | ||||
|             } else if (this._arrowOrigin > (x2 - (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(this._arrowOrigin, y2); | ||||
|                 cr.lineTo(this._arrowOrigin, y2 + rise); | ||||
|                 cr.lineTo(Math.min(x2 - borderRadius, this._arrowOrigin) - halfBase, y2); | ||||
|                 cr.lineTo(this._arrowOrigin - halfBase, y2); | ||||
|                 cr.lineTo(x1 + borderRadius, y2); | ||||
|             } else { | ||||
|                 cr.lineTo(this._arrowOrigin + halfBase, y2); | ||||
|                 cr.lineTo(this._arrowOrigin, y2 + rise); | ||||
|                 cr.lineTo(this._arrowOrigin - halfBase, y2); | ||||
|                 cr.lineTo(x1 + borderRadius, y2); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         cr.lineTo(x1 + borderRadius, y2); | ||||
|         } else | ||||
|             cr.lineTo(x1 + borderRadius, y2); | ||||
|  | ||||
|         // bottom-left corner | ||||
|         cr.arc(x1 + borderRadius, y2 - borderRadius, borderRadius, | ||||
|                Math.PI/2, Math.PI); | ||||
|         if (this._arrowCorner != St.Corner.BOTTOMLEFT) | ||||
|             cr.arc(x1 + borderRadius, y2 - borderRadius, borderRadius, | ||||
|                    Math.PI/2, Math.PI); | ||||
|  | ||||
|         if (this._arrowSide == St.Side.LEFT) { | ||||
|             if (this._arrowOrigin < (y1 + (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(x1, Math.max(y1 + borderRadius, this._arrowOrigin) + halfBase); | ||||
|             if (this._arrowCorner == St.Corner.TOPLEFT) { | ||||
|                 cr.lineTo(x2, y1 + halfBase); | ||||
|                 cr.lineTo(x1 - rise, y1); | ||||
|             } else if (this._arrowCorner == St.Corner.BOTTOMLEFT) { | ||||
|                 cr.lineTo(x1 + rise, y2); | ||||
|                 cr.moveTo(x1, y2 - halfBase); | ||||
|             } else if (this._arrowOrigin < (y1 + (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(x1, this._arrowOrigin + halfBase); | ||||
|                 cr.lineTo(x1 - rise, this._arrowOrigin); | ||||
|                 cr.lineTo(x1, this._arrowOrigin); | ||||
|                 cr.lineTo(x1, y1 + borderRadius); | ||||
|             } else if (this._arrowOrigin > (y2 - (borderRadius + halfBase))) { | ||||
|                 cr.lineTo(x1, this._arrowOrigin); | ||||
|                 cr.lineTo(x1 - rise, this._arrowOrigin); | ||||
|                 cr.lineTo(x1, Math.min(y2 - borderRadius, this._arrowOrigin) - halfBase); | ||||
|                 cr.lineTo(x1, this._arrowOrigin - halfBase); | ||||
|                 cr.lineTo(x1, y1 + borderRadius); | ||||
|             } else { | ||||
|                 cr.lineTo(x1, this._arrowOrigin + halfBase); | ||||
|                 cr.lineTo(x1 - rise, this._arrowOrigin); | ||||
|                 cr.lineTo(x1, this._arrowOrigin - halfBase); | ||||
|                 cr.lineTo(x1, y1 + borderRadius); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         cr.lineTo(x1, y1 + borderRadius); | ||||
|         } else | ||||
|             cr.lineTo(x1, y1 + borderRadius); | ||||
|  | ||||
|         // top-left corner | ||||
|         cr.arc(x1 + borderRadius, y1 + borderRadius, borderRadius, | ||||
|                Math.PI, 3*Math.PI/2); | ||||
|         if (this._arrowCorner != St.Corner.TOPLEFT) | ||||
|             cr.arc(x1 + borderRadius, y1 + borderRadius, borderRadius, | ||||
|                    Math.PI, 3*Math.PI/2); | ||||
|         else | ||||
|             cr.lineTo(x1, y1); | ||||
|  | ||||
|         Clutter.cairo_set_source_color(cr, backgroundColor); | ||||
|         cr.fillPreserve(); | ||||
| @@ -326,67 +355,43 @@ const BoxPointer = new Lang.Class({ | ||||
|         cr.stroke(); | ||||
|     }, | ||||
|  | ||||
|     setPosition: function(sourceActor, alignment) { | ||||
|     setPosition: function(sourceActor, gap, alignment) { | ||||
|         // We need to show it now to force an allocation, | ||||
|         // so that we can query the correct size. | ||||
|         this.actor.show(); | ||||
|  | ||||
|         this._sourceActor = sourceActor; | ||||
|         this._arrowAlignment = alignment; | ||||
|  | ||||
|         this._reposition(sourceActor, alignment); | ||||
|     }, | ||||
|  | ||||
|     setSourceAlignment: function(alignment) { | ||||
|         this._sourceAlignment = alignment; | ||||
|  | ||||
|         if (!this._sourceActor) | ||||
|             return; | ||||
|  | ||||
|         // We need to show it now to force an allocation, | ||||
|         // so that we can query the correct size. | ||||
|         this.actor.show(); | ||||
|  | ||||
|         this._reposition(this._sourceActor, this._arrowAlignment); | ||||
|     }, | ||||
|  | ||||
|     _reposition: function(sourceActor, alignment) { | ||||
|         // Position correctly relative to the sourceActor | ||||
|         let sourceNode = sourceActor.get_theme_node(); | ||||
|         let sourceContentBox = sourceNode.get_content_box(sourceActor.get_allocation_box()); | ||||
|         let sourceAllocation = Shell.util_get_transformed_allocation(sourceActor); | ||||
|         let sourceCenterX = sourceAllocation.x1 + sourceContentBox.x1 + (sourceContentBox.x2 - sourceContentBox.x1) * this._sourceAlignment; | ||||
|         let sourceCenterY = sourceAllocation.y1 + sourceContentBox.y1 + (sourceContentBox.y2 - sourceContentBox.y1) * this._sourceAlignment; | ||||
|         let [sourceX, sourceY] = sourceActor.get_transformed_position(); | ||||
|         let [sourceWidth, sourceHeight] = sourceActor.get_transformed_size(); | ||||
|         let [sourceCenterX, sourceCenterY] = [sourceX + (sourceWidth / 2), sourceY + (sourceHeight / 2)]; | ||||
|         let [minWidth, minHeight, natWidth, natHeight] = this.actor.get_preferred_size(); | ||||
|  | ||||
|         // We also want to keep it onscreen, and separated from the | ||||
|         // edge by the same distance as the main part of the box is | ||||
|         // separated from its sourceActor | ||||
|         let monitor = Main.layoutManager.findMonitorForActor(sourceActor); | ||||
|         let primary = global.get_primary_monitor(); | ||||
|         let themeNode = this.actor.get_theme_node(); | ||||
|         let borderWidth = themeNode.get_length('-arrow-border-width'); | ||||
|         let arrowBase = themeNode.get_length('-arrow-base'); | ||||
|         let halfBorder = themeNode.get_length('-arrow-border-width') / 2; | ||||
|         let halfBase = themeNode.get_length('-arrow-base') / 2; | ||||
|         let borderRadius = themeNode.get_length('-arrow-border-radius'); | ||||
|         let margin = (4 * borderRadius + borderWidth + arrowBase); | ||||
|         let halfMargin = margin / 2; | ||||
|  | ||||
|         let themeNode = this.actor.get_theme_node(); | ||||
|         let gap = themeNode.get_length('-boxpointer-gap'); | ||||
|         let margin = 2 * borderRadius + halfBorder; | ||||
|  | ||||
|         let resX, resY; | ||||
|         this._arrowCorner = null; | ||||
|  | ||||
|         switch (this._arrowSide) { | ||||
|         case St.Side.TOP: | ||||
|             resY = sourceAllocation.y2 + gap; | ||||
|             resY = sourceY + sourceHeight + gap; | ||||
|             break; | ||||
|         case St.Side.BOTTOM: | ||||
|             resY = sourceAllocation.y1 - natHeight - gap; | ||||
|             resY = sourceY - natHeight - gap; | ||||
|             break; | ||||
|         case St.Side.LEFT: | ||||
|             resX = sourceAllocation.x2 + gap; | ||||
|             resX = sourceX + sourceWidth + gap; | ||||
|             break; | ||||
|         case St.Side.RIGHT: | ||||
|             resX = sourceAllocation.x1 - natWidth - gap; | ||||
|             resX = sourceX - natWidth - gap; | ||||
|             break; | ||||
|         } | ||||
|  | ||||
| @@ -395,19 +400,58 @@ const BoxPointer = new Lang.Class({ | ||||
|         switch (this._arrowSide) { | ||||
|         case St.Side.TOP: | ||||
|         case St.Side.BOTTOM: | ||||
|             resX = sourceCenterX - (halfMargin + (natWidth - margin) * alignment); | ||||
|             switch (alignment) { | ||||
|             case St.Align.START: | ||||
|                 resX = sourceCenterX - (halfBase + borderRadius + halfBorder); | ||||
|                 break; | ||||
|             case St.Align.MIDDLE: | ||||
|                 resX = sourceCenterX - (natWidth / 2); | ||||
|                 break; | ||||
|             case St.Align.END: | ||||
|                 resX = sourceCenterX - natWidth + (halfBase + borderRadius + halfBorder); | ||||
|                 break; | ||||
|             } | ||||
|             if (sourceCenterX < margin) { | ||||
|                 // Not enough space to the top | ||||
|                 this._arrowCorner = (this._arrowSide == St.Side.TOP) ? St.Corner.TOPLEFT : St.Corner.BOTTOMLEFT; | ||||
|                 resX = primary.x + 10; | ||||
|             } else if (sourceCenterX > (primary.x + primary.width - margin)) { | ||||
|                 // Not enough space to the botom | ||||
|                 this._arrowCorner = (this._arrowSide == St.Side.TOP) ? St.Corner.TOPRIGHT : St.Corner.BOTTOMRIGHT; | ||||
|                 resX = primary.x + primary.width - (10 + natWidth); | ||||
|             } | ||||
|  | ||||
|             resX = Math.max(resX, monitor.x + 10); | ||||
|             resX = Math.min(resX, monitor.x + monitor.width - (10 + natWidth)); | ||||
|             resX = Math.max(resX, primary.x + 10); | ||||
|             resX = Math.min(resX, primary.x + primary.width - (10 + natWidth)); | ||||
|             this.setArrowOrigin(sourceCenterX - resX); | ||||
|             break; | ||||
|  | ||||
|         case St.Side.LEFT: | ||||
|         case St.Side.RIGHT: | ||||
|             resY = sourceCenterY - (halfMargin + (natHeight - margin) * alignment); | ||||
|             switch (alignment) { | ||||
|             case St.Align.START: | ||||
|                 resY = sourceCenterY - (halfBase + borderRadius + halfBorder); | ||||
|                 break; | ||||
|             case St.Align.MIDDLE: | ||||
|                 resY = sourceCenterY - (natHeight / 2); | ||||
|                 break; | ||||
|             case St.Align.END: | ||||
|                 resY = sourceCenterY - natHeight + (halfBase + borderRadius + halfBorder); | ||||
|                 break; | ||||
|             } | ||||
|             if (sourceCenterY < margin) { | ||||
|                 // Not enough space to the left | ||||
|                 this._arrowCorner = (this._arrowSide == St.Side.LEFT) ? St.Corner.TOPLEFT : St.Corner.TORIGHT; | ||||
|                 resY = 10; | ||||
|             } | ||||
|             else if (sourceCenterY > (primary.y + primary.height - margin)) { | ||||
|                 // Not enough space to the right | ||||
|                 this._arrowCorner = (this._arrowSide == St.Side.LEFT) ? St.Corner.BOTTOMLEFT : St.Corner.BOTTOMRIGHT; | ||||
|                 resY = primary.y + primary.height - (10 + natHeight); | ||||
|             } | ||||
|  | ||||
|             resY = Math.max(resY, monitor.y + 10); | ||||
|             resY = Math.min(resY, monitor.y + monitor.height - (10 + natHeight)); | ||||
|             resY = Math.max(resY, primary.y + 10); | ||||
|             resY = Math.min(resY, primary.y + primary.height - (10 + natHeight)); | ||||
|  | ||||
|             this.setArrowOrigin(sourceCenterY - resY); | ||||
|             break; | ||||
| @@ -420,9 +464,9 @@ const BoxPointer = new Lang.Class({ | ||||
|             parent = parent.get_parent(); | ||||
|         } | ||||
|  | ||||
|         this._xPosition = Math.floor(x); | ||||
|         this._yPosition = Math.floor(y); | ||||
|         this._shiftActor(); | ||||
|         // Actually set the position | ||||
|         this.actor.x = Math.floor(x); | ||||
|         this.actor.y = Math.floor(y); | ||||
|     }, | ||||
|  | ||||
|     // @origin: Coordinate specifying middle of the arrow, along | ||||
| @@ -433,42 +477,5 @@ const BoxPointer = new Lang.Class({ | ||||
|             this._arrowOrigin = origin; | ||||
|             this._border.queue_repaint(); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _shiftActor : function() { | ||||
|         // Since the position of the BoxPointer depends on the allocated size | ||||
|         // of the BoxPointer and the position of the source actor, trying | ||||
|         // to position the BoxPoiner via the x/y properties will result in | ||||
|         // allocation loops and warnings. Instead we do the positioning via | ||||
|         // the anchor point, which is independent of allocation, and leave | ||||
|         // x == y == 0. | ||||
|         this.actor.set_anchor_point(-(this._xPosition + this._xOffset), | ||||
|                                     -(this._yPosition + this._yOffset)); | ||||
|     }, | ||||
|  | ||||
|     set xOffset(offset) { | ||||
|         this._xOffset = offset; | ||||
|         this._shiftActor(); | ||||
|     }, | ||||
|  | ||||
|     get xOffset() { | ||||
|         return this._xOffset; | ||||
|     }, | ||||
|  | ||||
|     set yOffset(offset) { | ||||
|         this._yOffset = offset; | ||||
|         this._shiftActor(); | ||||
|     }, | ||||
|  | ||||
|     get yOffset() { | ||||
|         return this._yOffset; | ||||
|     }, | ||||
|  | ||||
|     set opacity(opacity) { | ||||
|         this.actor.opacity = opacity; | ||||
|     }, | ||||
|  | ||||
|     get opacity() { | ||||
|         return this.actor.opacity; | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- | ||||
| /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ | ||||
|  | ||||
| const Clutter = imports.gi.Clutter; | ||||
| const Gio = imports.gi.Gio; | ||||
| @@ -7,6 +7,8 @@ const St = imports.gi.St; | ||||
| const Signals = imports.signals; | ||||
| const Pango = imports.gi.Pango; | ||||
| const Gettext_gtk30 = imports.gettext.domain('gtk30'); | ||||
| const Gettext = imports.gettext.domain('gnome-shell'); | ||||
| const _ = Gettext.gettext; | ||||
| const Mainloop = imports.mainloop; | ||||
| const Shell = imports.gi.Shell; | ||||
|  | ||||
| @@ -56,22 +58,18 @@ function _getEndOfDay(date) { | ||||
| function _formatEventTime(event, clockFormat) { | ||||
|     let ret; | ||||
|     if (event.allDay) { | ||||
|         /* Translators: Shown in calendar event list for all day events | ||||
|          * Keep it short, best if you can use less then 10 characters | ||||
|          */ | ||||
|         ret = C_("event list time", "All Day"); | ||||
|         /* Translators: Shown in calendar event list for all day events */ | ||||
|         ret = _("All Day"); | ||||
|     } else { | ||||
|         switch (clockFormat) { | ||||
|         case '24h': | ||||
|             /* Translators: Shown in calendar event list, if 24h format */ | ||||
|             ret = event.date.toLocaleFormat(C_("event list time", "%H:%M")); | ||||
|             ret = event.date.toLocaleFormat('%H:%M'); | ||||
|             break; | ||||
|  | ||||
|         default: | ||||
|             /* explicit fall-through */ | ||||
|         case '12h': | ||||
|             /* Transators: Shown in calendar event list, if 12h format */ | ||||
|             ret = event.date.toLocaleFormat(C_("event list time", "%l:%M %p")); | ||||
|             ret = event.date.toLocaleFormat('%l:%M %p'); | ||||
|             break; | ||||
|         } | ||||
|     } | ||||
| @@ -108,22 +106,22 @@ function _getCalendarDayAbbreviation(dayNumber) { | ||||
|     let abbreviations = [ | ||||
|         /* Translators: Calendar grid abbreviation for Sunday. | ||||
|          * | ||||
|          * NOTE: These grid abbreviations are always shown together | ||||
|          * and in order, e.g. "S M T W T F S". | ||||
|          * NOTE: These abbreviations are always shown together and in | ||||
|          * order, e.g. "S M T W T F S". | ||||
|          */ | ||||
|         C_("grid sunday", "S"), | ||||
|         _("S"), | ||||
|         /* Translators: Calendar grid abbreviation for Monday */ | ||||
|         C_("grid monday", "M"), | ||||
|         _("M"), | ||||
|         /* Translators: Calendar grid abbreviation for Tuesday */ | ||||
|         C_("grid tuesday", "T"), | ||||
|         _("T"), | ||||
|         /* Translators: Calendar grid abbreviation for Wednesday */ | ||||
|         C_("grid wednesday", "W"), | ||||
|         _("W"), | ||||
|         /* Translators: Calendar grid abbreviation for Thursday */ | ||||
|         C_("grid thursday", "T"), | ||||
|         _("T"), | ||||
|         /* Translators: Calendar grid abbreviation for Friday */ | ||||
|         C_("grid friday", "F"), | ||||
|         _("F"), | ||||
|         /* Translators: Calendar grid abbreviation for Saturday */ | ||||
|         C_("grid saturday", "S") | ||||
|         _("S") | ||||
|     ]; | ||||
|     return abbreviations[dayNumber]; | ||||
| } | ||||
| @@ -132,47 +130,50 @@ function _getEventDayAbbreviation(dayNumber) { | ||||
|     let abbreviations = [ | ||||
|         /* Translators: Event list abbreviation for Sunday. | ||||
|          * | ||||
|          * NOTE: These list abbreviations are normally not shown together | ||||
|          * NOTE: These abbreviations are normally not shown together | ||||
|          * so they need to be unique (e.g. Tuesday and Thursday cannot | ||||
|          * both be 'T'). | ||||
|          */ | ||||
|         C_("list sunday", "Su"), | ||||
|         _("Su"), | ||||
|         /* Translators: Event list abbreviation for Monday */ | ||||
|         C_("list monday", "M"), | ||||
|         _("M"), | ||||
|         /* Translators: Event list abbreviation for Tuesday */ | ||||
|         C_("list tuesday", "T"), | ||||
|         _("T"), | ||||
|         /* Translators: Event list abbreviation for Wednesday */ | ||||
|         C_("list wednesday", "W"), | ||||
|         _("W"), | ||||
|         /* Translators: Event list abbreviation for Thursday */ | ||||
|         C_("list thursday", "Th"), | ||||
|         _("Th"), | ||||
|         /* Translators: Event list abbreviation for Friday */ | ||||
|         C_("list friday", "F"), | ||||
|         _("F"), | ||||
|         /* Translators: Event list abbreviation for Saturday */ | ||||
|         C_("list saturday", "S") | ||||
|         _("S") | ||||
|     ]; | ||||
|     return abbreviations[dayNumber]; | ||||
| } | ||||
|  | ||||
| // Abstraction for an appointment/event in a calendar | ||||
|  | ||||
| const CalendarEvent = new Lang.Class({ | ||||
|     Name: 'CalendarEvent', | ||||
| function CalendarEvent(date, summary, allDay) { | ||||
|     this._init(date, summary, allDay); | ||||
| } | ||||
|  | ||||
|     _init: function(date, end, summary, allDay) { | ||||
| CalendarEvent.prototype = { | ||||
|     _init: function(date, summary, allDay) { | ||||
|         this.date = date; | ||||
|         this.end = end; | ||||
|         this.summary = summary; | ||||
|         this.allDay = allDay; | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| // Interface for appointments/events - e.g. the contents of a calendar | ||||
| // | ||||
|  | ||||
| // First, an implementation with no events | ||||
| const EmptyEventSource = new Lang.Class({ | ||||
|     Name: 'EmptyEventSource', | ||||
| function EmptyEventSource() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| EmptyEventSource.prototype = { | ||||
|     _init: function() { | ||||
|     }, | ||||
|  | ||||
| @@ -187,141 +188,32 @@ const EmptyEventSource = new Lang.Class({ | ||||
|     hasEvents: function(day) { | ||||
|         return false; | ||||
|     } | ||||
| }); | ||||
| }; | ||||
| Signals.addSignalMethods(EmptyEventSource.prototype); | ||||
|  | ||||
| const CalendarServerIface = <interface name="org.gnome.Shell.CalendarServer"> | ||||
| <method name="GetEvents"> | ||||
|     <arg type="x" direction="in" /> | ||||
|     <arg type="x" direction="in" /> | ||||
|     <arg type="b" direction="in" /> | ||||
|     <arg type="a(sssbxxa{sv})" direction="out" /> | ||||
| </method> | ||||
| <signal name="Changed" /> | ||||
| </interface>; | ||||
|  | ||||
| const CalendarServerInfo  = Gio.DBusInterfaceInfo.new_for_xml(CalendarServerIface); | ||||
|  | ||||
| function CalendarServer() { | ||||
|     var self = new Gio.DBusProxy({ g_connection: Gio.DBus.session, | ||||
| 				   g_interface_name: CalendarServerInfo.name, | ||||
| 				   g_interface_info: CalendarServerInfo, | ||||
| 				   g_name: 'org.gnome.Shell.CalendarServer', | ||||
| 				   g_object_path: '/org/gnome/Shell/CalendarServer', | ||||
|                                    g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START | | ||||
|                                              Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) }); | ||||
|  | ||||
|     self.init(null); | ||||
|     return self; | ||||
| // Second, wrap native Evolution event source | ||||
| function EvolutionEventSource() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| function _datesEqual(a, b) { | ||||
|     if (a < b) | ||||
|         return false; | ||||
|     else if (a > b) | ||||
|         return false; | ||||
|     return true; | ||||
| } | ||||
|  | ||||
| function _dateIntervalsOverlap(a0, a1, b0, b1) | ||||
| { | ||||
|     if (a1 <= b0) | ||||
|         return false; | ||||
|     else if (b1 <= a0) | ||||
|         return false; | ||||
|     else | ||||
|         return true; | ||||
| } | ||||
|  | ||||
| // an implementation that reads data from a session bus service | ||||
| const DBusEventSource = new Lang.Class({ | ||||
|     Name: 'DBusEventSource', | ||||
|  | ||||
| EvolutionEventSource.prototype = { | ||||
|     _init: function() { | ||||
|         this._resetCache(); | ||||
|  | ||||
|         this._dbusProxy = new CalendarServer(); | ||||
|         this._dbusProxy.connectSignal('Changed', Lang.bind(this, this._onChanged)); | ||||
|  | ||||
|         this._dbusProxy.connect('notify::g-name-owner', Lang.bind(this, function() { | ||||
|             if (this._dbusProxy.g_name_owner) | ||||
|                 this._onNameAppeared(); | ||||
|             else | ||||
|                 this._onNameVanished(); | ||||
|         this._native = new Shell.EvolutionEventSource(); | ||||
|         this._native.connect('changed', Lang.bind(this, function() { | ||||
|             this.emit('changed'); | ||||
|         })); | ||||
|     }, | ||||
|  | ||||
|     _resetCache: function() { | ||||
|         this._events = []; | ||||
|         this._lastRequestBegin = null; | ||||
|         this._lastRequestEnd = null; | ||||
|     }, | ||||
|  | ||||
|     _onNameAppeared: function(owner) { | ||||
|         this._resetCache(); | ||||
|         this._loadEvents(true); | ||||
|     }, | ||||
|  | ||||
|     _onNameVanished: function(oldOwner) { | ||||
|         this._resetCache(); | ||||
|         this.emit('changed'); | ||||
|     }, | ||||
|  | ||||
|     _onChanged: function() { | ||||
|         this._loadEvents(false); | ||||
|     }, | ||||
|  | ||||
|     _onEventsReceived: function([appointments]) { | ||||
|         let newEvents = []; | ||||
|         if (appointments != null) { | ||||
|             for (let n = 0; n < appointments.length; n++) { | ||||
|                 let a = appointments[n]; | ||||
|                 let date = new Date(a[4] * 1000); | ||||
|                 let end = new Date(a[5] * 1000); | ||||
|                 let summary = a[1]; | ||||
|                 let allDay = a[3]; | ||||
|                 let event = new CalendarEvent(date, end, summary, allDay); | ||||
|                 newEvents.push(event); | ||||
|             } | ||||
|             newEvents.sort(function(event1, event2) { | ||||
|                 return event1.date.getTime() - event2.date.getTime(); | ||||
|             }); | ||||
|         } | ||||
|  | ||||
|         this._events = newEvents; | ||||
|         this.emit('changed'); | ||||
|     }, | ||||
|  | ||||
|     _loadEvents: function(forceReload) { | ||||
|         if (this._curRequestBegin && this._curRequestEnd){ | ||||
|             let callFlags = Gio.DBusCallFlags.NO_AUTO_START; | ||||
|             if (forceReload) | ||||
|                 callFlags = Gio.DBusCallFlags.NONE; | ||||
|             this._dbusProxy.GetEventsRemote(this._curRequestBegin.getTime() / 1000, | ||||
|                                             this._curRequestEnd.getTime() / 1000, | ||||
|                                             forceReload, | ||||
|                                             Lang.bind(this, this._onEventsReceived), | ||||
|                                             callFlags); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     requestRange: function(begin, end, forceReload) { | ||||
|         if (forceReload || !(_datesEqual(begin, this._lastRequestBegin) && _datesEqual(end, this._lastRequestEnd))) { | ||||
|             this._lastRequestBegin = begin; | ||||
|             this._lastRequestEnd = end; | ||||
|             this._curRequestBegin = begin; | ||||
|             this._curRequestEnd = end; | ||||
|             this._loadEvents(forceReload); | ||||
|         } | ||||
|     requestRange: function(begin, end) { | ||||
|         this._native.request_range(begin.getTime(), end.getTime()); | ||||
|     }, | ||||
|  | ||||
|     getEvents: function(begin, end) { | ||||
|         let result = []; | ||||
|         for(let n = 0; n < this._events.length; n++) { | ||||
|             let event = this._events[n]; | ||||
|             if (_dateIntervalsOverlap (event.date, event.end, begin, end)) { | ||||
|                 result.push(event); | ||||
|             } | ||||
|         let nativeEvents = this._native.get_events(begin.getTime(), end.getTime()); | ||||
|         for (let n = 0; n < nativeEvents.length; n++) { | ||||
|             let nativeEvent = nativeEvents[n]; | ||||
|             result.push(new CalendarEvent(new Date(nativeEvent.msec_begin), nativeEvent.summary, nativeEvent.all_day)); | ||||
|         } | ||||
|         return result; | ||||
|     }, | ||||
| @@ -337,26 +229,136 @@ const DBusEventSource = new Lang.Class({ | ||||
|  | ||||
|         return true; | ||||
|     } | ||||
| }); | ||||
| Signals.addSignalMethods(DBusEventSource.prototype); | ||||
| }; | ||||
| Signals.addSignalMethods(EvolutionEventSource.prototype); | ||||
|  | ||||
| // Finally, an implementation with fake events | ||||
| function FakeEventSource() { | ||||
|     this._init(); | ||||
| } | ||||
|  | ||||
| FakeEventSource.prototype = { | ||||
|     _init: function() { | ||||
|  | ||||
|         this._fakeEvents = []; | ||||
|  | ||||
|         // Generate fake events | ||||
|         // | ||||
|         let midnightToday = _getBeginningOfDay(new Date()); | ||||
|         let summary = ''; | ||||
|  | ||||
|         // '10-oclock pow-wow' is an event occuring IN THE PAST every four days at 10am | ||||
|         for (let n = 0; n < 10; n++) { | ||||
|             let t = new Date(midnightToday.getTime() - n * 4 * 86400 * 1000); | ||||
|             t.setHours(10); | ||||
|             summary = '10-oclock pow-wow (n=' + n + ')'; | ||||
|             this._fakeEvents.push(new CalendarEvent(t, summary, false)); | ||||
|         } | ||||
|  | ||||
|         // '11-oclock thing' is an event occuring every three days at 11am | ||||
|         for (let n = 0; n < 10; n++) { | ||||
|             let t = new Date(midnightToday.getTime() + n * 3 * 86400 * 1000); | ||||
|             t.setHours(11); | ||||
|             summary = '11-oclock thing (n=' + n + ')'; | ||||
|             this._fakeEvents.push(new CalendarEvent(t, summary, false)); | ||||
|         } | ||||
|  | ||||
|         // 'Weekly Meeting' is an event occuring every seven days at 1:45pm (two days displaced) | ||||
|         for (let n = 0; n < 5; n++) { | ||||
|             let t = new Date(midnightToday.getTime() + (n * 7 + 2) * 86400 * 1000); | ||||
|             t.setHours(13); | ||||
|             t.setMinutes(45); | ||||
|             summary = 'Weekly Meeting (n=' + n + ')'; | ||||
|             this._fakeEvents.push(new CalendarEvent(t, summary, false)); | ||||
|         } | ||||
|  | ||||
|         // 'Fun All Day' is an all-day event occuring every fortnight (three days displayed) | ||||
|         for (let n = 0; n < 10; n++) { | ||||
|             let t = new Date(midnightToday.getTime() + (n * 14 + 3) * 86400 * 1000); | ||||
|             summary = 'Fun All Day (n=' + n + ')'; | ||||
|             this._fakeEvents.push(new CalendarEvent(t, summary, true)); | ||||
|         } | ||||
|  | ||||
|         // 'Get Married' is an event that actually reflects reality (Dec 4, 2010) :-) | ||||
|         this._fakeEvents.push(new CalendarEvent(new Date(2010, 11, 4, 16, 0), 'Get Married', false)); | ||||
|  | ||||
|         // ditto for 'NE Patriots vs NY Jets' | ||||
|         this._fakeEvents.push(new CalendarEvent(new Date(2010, 11, 6, 20, 30), 'NE Patriots vs NY Jets', false)); | ||||
|  | ||||
|         // An event for tomorrow @6:30pm that is added/removed every five | ||||
|         // seconds (to check that the ::changed signal works) | ||||
|         let transientEventDate = new Date(midnightToday.getTime() + 86400 * 1000); | ||||
|         transientEventDate.setHours(18); | ||||
|         transientEventDate.setMinutes(30); | ||||
|         transientEventDate.setSeconds(0); | ||||
|         Mainloop.timeout_add(5000, Lang.bind(this, this._updateTransientEvent)); | ||||
|         this._includeTransientEvent = false; | ||||
|         this._transientEvent = new CalendarEvent(transientEventDate, 'A Transient Event', false); | ||||
|         this._transientEventCounter = 1; | ||||
|     }, | ||||
|  | ||||
|     _updateTransientEvent: function() { | ||||
|         this._includeTransientEvent = !this._includeTransientEvent; | ||||
|         this._transientEventCounter = this._transientEventCounter + 1; | ||||
|         this._transientEvent.summary = 'A Transient Event (' + this._transientEventCounter + ')'; | ||||
|         this.emit('changed'); | ||||
|         Mainloop.timeout_add(5000, Lang.bind(this, this._updateTransientEvent)); | ||||
|     }, | ||||
|  | ||||
|     requestRange: function(begin, end) { | ||||
|     }, | ||||
|  | ||||
|     getEvents: function(begin, end) { | ||||
|         let result = []; | ||||
|         //log('begin:' + begin); | ||||
|         //log('end:  ' + end); | ||||
|         for(let n = 0; n < this._fakeEvents.length; n++) { | ||||
|             let event = this._fakeEvents[n]; | ||||
|             if (event.date >= begin && event.date <= end) { | ||||
|                 result.push(event); | ||||
|             } | ||||
|             //log('when:' + event.date + ' summary:' + event.summary); | ||||
|         } | ||||
|         if (this._includeTransientEvent && this._transientEvent.date >= begin && this._transientEvent.date <= end) | ||||
|             result.push(this._transientEvent); | ||||
|         result.sort(function(event1, event2) { | ||||
|             return event1.date.getTime() - event2.date.getTime(); | ||||
|         }); | ||||
|         return result; | ||||
|     }, | ||||
|  | ||||
|     hasEvents: function(day) { | ||||
|         let dayBegin = _getBeginningOfDay(day); | ||||
|         let dayEnd = _getEndOfDay(day); | ||||
|  | ||||
|         let events = this.getEvents(dayBegin, dayEnd); | ||||
|  | ||||
|         if (events.length == 0) | ||||
|             return false; | ||||
|  | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
| }; | ||||
| Signals.addSignalMethods(FakeEventSource.prototype); | ||||
|  | ||||
| // Calendar: | ||||
| // @eventSource: is an object implementing the EventSource API, e.g. the | ||||
| // requestRange(), getEvents(), hasEvents() methods and the ::changed signal. | ||||
| const Calendar = new Lang.Class({ | ||||
|     Name: 'Calendar', | ||||
| function Calendar(eventSource) { | ||||
|     this._init(eventSource); | ||||
| } | ||||
|  | ||||
| Calendar.prototype = { | ||||
|     _init: function(eventSource) { | ||||
|         if (eventSource) { | ||||
|             this._eventSource = eventSource; | ||||
|         this._eventSource = eventSource; | ||||
|  | ||||
|             this._eventSource.connect('changed', Lang.bind(this, | ||||
|                                                            function() { | ||||
|                                                                this._update(false); | ||||
|                                                            })); | ||||
|         } | ||||
|         this._eventSource.connect('changed', Lang.bind(this, this._update)); | ||||
|  | ||||
|         this._weekStart = Shell.util_get_week_start(); | ||||
|         // FIXME: This is actually the fallback method for GTK+ for the week start; | ||||
|         // GTK+ by preference uses nl_langinfo (NL_TIME_FIRST_WEEKDAY). We probably | ||||
|         // should add a C function so we can do the full handling. | ||||
|         this._weekStart = NaN; | ||||
|         this._weekdate = NaN; | ||||
|         this._digitWidth = NaN; | ||||
|         this._settings = new Gio.Settings({ schema: 'org.gnome.shell.calendar' }); | ||||
| @@ -364,6 +366,16 @@ const Calendar = new Lang.Class({ | ||||
|         this._settings.connect('changed::' + SHOW_WEEKDATE_KEY, Lang.bind(this, this._onSettingsChange)); | ||||
|         this._useWeekdate = this._settings.get_boolean(SHOW_WEEKDATE_KEY); | ||||
|  | ||||
|         let weekStartString = Gettext_gtk30.gettext('calendar:week_start:0'); | ||||
|         if (weekStartString.indexOf('calendar:week_start:') == 0) { | ||||
|             this._weekStart = parseInt(weekStartString.substring(20)); | ||||
|         } | ||||
|  | ||||
|         if (isNaN(this._weekStart) || this._weekStart < 0 || this._weekStart > 6) { | ||||
|             log('Translation of "calendar:week_start:0" in GTK+ is not correct'); | ||||
|             this._weekStart = 0; | ||||
|         } | ||||
|  | ||||
|         // Find the ordering for month/year in the calendar heading | ||||
|         this._headerFormatWithoutYear = '%B'; | ||||
|         switch (Gettext_gtk30.gettext('calendar:MY')) { | ||||
| @@ -390,23 +402,21 @@ const Calendar = new Lang.Class({ | ||||
|                            Lang.bind(this, this._onScroll)); | ||||
|  | ||||
|         this._buildHeader (); | ||||
|         this._update(); | ||||
|     }, | ||||
|  | ||||
|     // Sets the calendar to show a specific date | ||||
|     setDate: function(date, forceReload) { | ||||
|     setDate: function(date) { | ||||
|         if (!_sameDay(date, this._selectedDate)) { | ||||
|             this._selectedDate = date; | ||||
|             this._update(forceReload); | ||||
|             this._update(); | ||||
|             this.emit('selected-date-changed', new Date(this._selectedDate)); | ||||
|         } else { | ||||
|             if (forceReload) | ||||
|                 this._update(forceReload); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _buildHeader: function() { | ||||
|         let offsetCols = this._useWeekdate ? 1 : 0; | ||||
|         this.actor.destroy_all_children(); | ||||
|         this.actor.destroy_children(); | ||||
|  | ||||
|         // Top line of the calendar '<| September 2009 |>' | ||||
|         this._topBox = new St.BoxLayout(); | ||||
| @@ -495,7 +505,7 @@ const Calendar = new Lang.Class({ | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         this.setDate(newDate, false); | ||||
|         this.setDate(newDate); | ||||
|    }, | ||||
|  | ||||
|    _onNextMonthButtonClicked: function() { | ||||
| @@ -517,16 +527,16 @@ const Calendar = new Lang.Class({ | ||||
|             } | ||||
|         } | ||||
|  | ||||
|        this.setDate(newDate, false); | ||||
|         this.setDate(newDate); | ||||
|     }, | ||||
|  | ||||
|     _onSettingsChange: function() { | ||||
|         this._useWeekdate = this._settings.get_boolean(SHOW_WEEKDATE_KEY); | ||||
|         this._buildHeader(); | ||||
|         this._update(false); | ||||
|         this._update(); | ||||
|     }, | ||||
|  | ||||
|     _update: function(forceReload) { | ||||
|     _update: function() { | ||||
|         let now = new Date(); | ||||
|  | ||||
|         if (_sameYear(this._selectedDate, now)) | ||||
| @@ -552,16 +562,13 @@ const Calendar = new Lang.Class({ | ||||
|         while (true) { | ||||
|             let button = new St.Button({ label: iter.getDate().toString() }); | ||||
|  | ||||
|             if (!this._eventSource) | ||||
|                 button.reactive = false; | ||||
|  | ||||
|             let iterStr = iter.toUTCString(); | ||||
|             button.connect('clicked', Lang.bind(this, function() { | ||||
|                 let newlySelectedDate = new Date(iterStr); | ||||
|                 this.setDate(newlySelectedDate, false); | ||||
|                 this.setDate(newlySelectedDate); | ||||
|             })); | ||||
|  | ||||
|             let hasEvents = this._eventSource && this._eventSource.hasEvents(iter); | ||||
|             let hasEvents = this._eventSource.hasEvents(iter); | ||||
|             let styleClass = 'calendar-day-base calendar-day'; | ||||
|             if (_isWorkDay(iter)) | ||||
|                 styleClass += ' calendar-work-day' | ||||
| @@ -608,16 +615,17 @@ const Calendar = new Lang.Class({ | ||||
|         } | ||||
|         // Signal to the event source that we are interested in events | ||||
|         // only from this date range | ||||
|         if (this._eventSource) | ||||
|             this._eventSource.requestRange(beginDate, iter, forceReload); | ||||
|         this._eventSource.requestRange(beginDate, iter); | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|  | ||||
| Signals.addSignalMethods(Calendar.prototype); | ||||
|  | ||||
| const EventsList = new Lang.Class({ | ||||
|     Name: 'EventsList', | ||||
| function EventsList(eventSource) { | ||||
|     this._init(eventSource); | ||||
| } | ||||
|  | ||||
| EventsList.prototype = { | ||||
|     _init: function(eventSource) { | ||||
|         this.actor = new St.BoxLayout({ vertical: true, style_class: 'events-header-vbox'}); | ||||
|         this._date = new Date(); | ||||
| @@ -625,7 +633,17 @@ const EventsList = new Lang.Class({ | ||||
|         this._eventSource.connect('changed', Lang.bind(this, this._update)); | ||||
|         this._desktopSettings = new Gio.Settings({ schema: 'org.gnome.desktop.interface' }); | ||||
|         this._desktopSettings.connect('changed', Lang.bind(this, this._update)); | ||||
|         this._weekStart = Shell.util_get_week_start(); | ||||
|         let weekStartString = Gettext_gtk30.gettext('calendar:week_start:0'); | ||||
|         if (weekStartString.indexOf('calendar:week_start:') == 0) { | ||||
|             this._weekStart = parseInt(weekStartString.substring(20)); | ||||
|         } | ||||
|  | ||||
|         if (isNaN(this._weekStart) || | ||||
|                   this._weekStart < 0 || | ||||
|                   this._weekStart > 6) { | ||||
|             log('Translation of "calendar:week_start:0" in GTK+ is not correct'); | ||||
|             this._weekStart = 0; | ||||
|         } | ||||
|  | ||||
|         this._update(); | ||||
|     }, | ||||
| @@ -644,9 +662,6 @@ const EventsList = new Lang.Class({ | ||||
|     }, | ||||
|  | ||||
|     _addPeriod: function(header, begin, end, includeDayName, showNothingScheduled) { | ||||
|         if (!this._eventSource) | ||||
|             return; | ||||
|  | ||||
|         let events = this._eventSource.getEvents(begin, end); | ||||
|  | ||||
|         let clockFormat = this._desktopSettings.get_string(CLOCK_FORMAT_KEY);; | ||||
| @@ -678,14 +693,14 @@ const EventsList = new Lang.Class({ | ||||
|         if (events.length == 0 && showNothingScheduled) { | ||||
|             let now = new Date(); | ||||
|             /* Translators: Text to show if there are no events */ | ||||
|             let nothingEvent = new CalendarEvent(now, now, _("Nothing Scheduled"), true); | ||||
|             let nothingEvent = new CalendarEvent(now, _("Nothing Scheduled"), true); | ||||
|             let timeString = _formatEventTime(nothingEvent, clockFormat); | ||||
|             this._addEvent(dayNameBox, timeBox, eventTitleBox, false, "", timeString, nothingEvent.summary); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     _showOtherDay: function(day) { | ||||
|         this.actor.destroy_all_children(); | ||||
|         this.actor.destroy_children(); | ||||
|  | ||||
|         let dayBegin = _getBeginningOfDay(day); | ||||
|         let dayEnd = _getEndOfDay(day); | ||||
| @@ -693,16 +708,14 @@ const EventsList = new Lang.Class({ | ||||
|         let dayString; | ||||
|         let now = new Date(); | ||||
|         if (_sameYear(day, now)) | ||||
|             /* Translators: Shown on calendar heading when selected day occurs on current year */ | ||||
|             dayString = day.toLocaleFormat(C_("calendar heading", "%A, %B %d")); | ||||
|             dayString = day.toLocaleFormat('%A, %B %d'); | ||||
|         else | ||||
|             /* Translators: Shown on calendar heading when selected day occurs on different year */ | ||||
|             dayString = day.toLocaleFormat(C_("calendar heading", "%A, %B %d, %Y")); | ||||
|             dayString = day.toLocaleFormat('%A, %B %d, %Y'); | ||||
|         this._addPeriod(dayString, dayBegin, dayEnd, false, true); | ||||
|     }, | ||||
|  | ||||
|     _showToday: function() { | ||||
|         this.actor.destroy_all_children(); | ||||
|         this.actor.destroy_children(); | ||||
|  | ||||
|         let now = new Date(); | ||||
|         let dayBegin = _getBeginningOfDay(now); | ||||
| @@ -748,4 +761,4 @@ const EventsList = new Lang.Class({ | ||||
|             this._showOtherDay(this._date); | ||||
|         } | ||||
|     } | ||||
| }); | ||||
| }; | ||||
|   | ||||