Compare commits

..

34 Commits

Author SHA1 Message Date
4e4414a84d Bump version to 3.18.3
Update NEWS.
2015-11-17 22:25:33 +01:00
934a08f28f browser-plugin: Do not create a new object every time NPPVpluginScriptableNPObject is requested
Merge PluginData and PluginObject structs into a single one and create
the scriptable object associated to the plugin instance in NPP_New. Then,
when NPPVpluginScriptableNPObject is requested we just return the
scriptable object associated to the given instance. This caused the
crashes in NPN_InvokeDefault with WebKit, since we had multiple
scriptable objects for the same instance, but only one of those objects
had the onchange listener installed. Firefox seems to cache the
scriptable object for the instance and therefore NPPVpluginScriptableNPObject
is requested only once.

https://bugzilla.gnome.org/show_bug.cgi?id=737932
2015-11-17 13:18:05 -06:00
732ea2a91e browser-plugin: Set windowless mode and don't claim to need XEmbed
NPAPI plugins are windowed by default, so we need to set
NPPVpluginWindowBool value to FALSE on startup. This way the browser
will not create a GtkSocket for a GtkPlug that we are not going to
create. It doesn't make sense to claim that we need XEmbed either.

https://bugzilla.gnome.org/show_bug.cgi?id=757940
2015-11-17 11:35:53 -06:00
aae6a3cbbd Revert "browser-plugin: Set windowless mode and don't claim to need XEmbed"
This reverts commit a52c91e9e5.

https://bugzilla.gnome.org/show_bug.cgi?id=758035
2015-11-16 10:57:56 -06:00
f67a6589bd Bump version to 3.18.2
Update NEWS.
2015-11-12 13:08:29 +01:00
88c1fa8a3e browser-plugin: Set windowless mode and don't claim to need XEmbed
NPAPI plugins are windowed by default, so we need to set
NPPVpluginWindowBool value to FALSE on startup. This way the browser
will not create a GtkSocket for a GtkPlug that we are not going to
create. It doesn't make sense to claim that we need XEmbed either.

https://bugzilla.gnome.org/show_bug.cgi?id=757940
2015-11-12 12:12:29 +01:00
012443bffa st: Fix Gaussian kernel calculation
The result of subtracting unsigned operands is unsigned, which throws
off our calculation in case it should be negative.

This partly reverts 18b6f13395.

https://bugzilla.gnome.org/show_bug.cgi?id=757779
2015-11-12 01:03:01 +01:00
61b14c7f04 Updated Chinese (Taiwan) translation 2015-11-11 00:36:06 +00:00
13dff7d5eb Stable backport for zh_CN translation from master 2015-11-11 00:21:32 +08:00
55087d03e4 browser-plugin: link with -Wl,-z,nodelete
This ensures that the module will not be unloaded, since GObject types
registered statically can't be reloaded. This should fix crashes with
browsers that correctly unload the plugins.

https://bugzilla.gnome.org/show_bug.cgi?id=737932
2015-11-10 15:25:40 +01:00
e7528bf2fa st_theme_node_prerender_shadow: guard against failure to allocate a texture
If we are trying to render a shadow at a size that is very large in one
direction, but small in the other direction (so that we don't 9-slice
the texture), then allocating the backing texture for the offscreen
buffer may fail due to texture-size limits. Don't crash in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=757150
2015-10-27 15:54:00 -04:00
9e64a1e3d6 Updated Romanian translation 2015-10-24 17:02:18 +00:00
007ac93cd6 ActivitiesButton: fix overview being toggled while still animating
Adds the missing checks for whether we should toggle the overview, on
button and key release.

https://bugzilla.gnome.org/show_bug.cgi?id=756925
2015-10-23 13:44:49 +02:00
d8336efddc Defend against failure of cairo_pattern_get_surface()
There are quite a few crashes in retrace.fedoraproject.org that are a result of
of cairo_pattern_get_surface() failing, then a subsequent call to
cairo_image_surface_get_width() crashing because no surface was returned to the
out parameter. Knowing what causes these is hard - my best guess is widgets getting
allocated at ridiculous sizes - but avoiding the crash makes sense in any case.

See https://bugzilla.redhat.com/show_bug.cgi?id=1206754

https://bugzilla.gnome.org/show_bug.cgi?id=756983
2015-10-22 15:15:54 -04:00
a83f822512 animation: do spinner animation with low priority
It's very unexpected that a spinner animation would
preempt idles from running.

This commit runs the spinner animation with a low
priority to ensure it doesn't take over the main
loop.

https://bugzilla.gnome.org/show_bug.cgi?id=754814
2015-10-21 08:54:55 -04:00
f64d64035a animation: Run every 16ms not ever 14ms
Right now the spinner animation updates every 14ms.
60 frames per second would be one frame per 16.667ms,
so we're waking up more frequently than we need to.

This commit changes the wakeup to happen after 16ms.

https://bugzilla.gnome.org/show_bug.cgi?id=754814
2015-10-21 08:54:31 -04:00
5583f881df gdm: don't emit start-session-when-ready from idle function
There's no point in delaying the emission.  We should do it
right away.

https://bugzilla.gnome.org/show_bug.cgi?id=754814
2015-10-21 08:54:24 -04:00
10e4382a7d Updated Hungarian translation 2015-10-21 06:08:43 +00:00
9f0ee0dc9f Updated Icelandic translation 2015-10-20 14:25:09 +00:00
2f82f783f2 Fix text-scaling-factor under wayland.
The text-scaling-factor GSetting was not being properly propagated
to clutter and the Pango font map; under X this is done by Clutter,
which listens to XSETTINGS directly.

https://bugzilla.gnome.org/show_bug.cgi?id=756447
2015-10-20 09:37:57 -04:00
4d066e3916 windowMenu: Ensure the source actor isn't sized 0x0
If the source actor is sized 0x0, the grabHelper will close the menu
on button release if the menu ends up flipped because in that case the
release event happens when the pointer is neither over the source
actor (since it's 0x0) or over the menu actor. A zero sized source
actor works for the non-flipped menu case because the menu's actor
itself ends up underneath the pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=756605
2015-10-20 15:11:31 +02:00
342fbd16d3 Add RLM as appropriate 2015-10-18 17:23:22 +04:00
8ae0c69ccf windowManager: fix fullscreen clone being left around
If we get another effect on the same actor, we should make sure to
remove the clone through the "overwrite" methods provided by Tweener, or
there will be a race that might end up with a stray clone being left
around.

https://bugzilla.gnome.org/show_bug.cgi?id=756714
2015-10-16 14:11:10 -07:00
bed660bdf4 Fix some issues reported by Bjørn Lie in bug 740906. 2015-10-16 18:12:28 +02:00
ab2ca17b76 windowManager: Fix fullscreen animations on dualscreen
The translation should describe the difference between the fullscreened
and unfullscreened position of the window - however we are currently
assuming a fullscreen position of (0, 0) instead of the monitor's origin,
which causes glitches on dualscreen setups.

https://bugzilla.gnome.org/show_bug.cgi?id=756697
2015-10-16 15:52:07 +02:00
90b7710834 Bump version to 3.18.1
Update NEWS.
2015-10-15 19:56:47 +02:00
f8cc8f1dc1 theme: Use font-relative sizes for menu widths
For menus, it makes more sense to pick a width that fits a reasonable amount
of content rather than a fixed amount of screen estate, so use font-relative
sizes instead of pixel values.

https://bugzilla.gnome.org/show_bug.cgi?id=754581
2015-10-15 19:56:44 +02:00
f8e5e3e435 aggregateMenu: Ignore ellipsizable items in width-request
Some labels in the system status menu - namely network names - are out
of our control, and may thus grow the width "infinitively" unless we
restrict the menu width. So far we have been doing this by setting a
fixed width or max-width, but any value we put there might end up
being too restrictive in some locales. Instead, request a width that
fits all the labels we want to show unellipsized and use that instead
of an arbitrary limit.

https://bugzilla.gnome.org/show_bug.cgi?id=708472
2015-10-15 19:56:03 +02:00
508e751ffd box-layout: Support replacing layout manager
There is nothing preventing callers from replacing the internal
layout manager, and as long as the replacement is a (or derives
from) ClutterBoxLayout, everything should work fine except for
losing a bit of automatic property mapping - and the latter is
easily fixable by moving the setup out of the constructor.

https://bugzilla.gnome.org/show_bug.cgi?id=708472
2015-10-15 19:21:15 +02:00
207c847762 windowManager: add animations for fullscreen and unfullscreen
We use the newly introduced feature from Mutter to hook up our own
fullscreen and unfullscreen animations.
To give the illusion of a transition as smooth as possible, we create a
snapshot of the current contents of the actor before its state is
changed, and crossfade between the two states while the size changes.

https://bugzilla.gnome.org/show_bug.cgi?id=707248
2015-10-14 12:10:58 -04:00
3c980566d3 Updated Basque language 2015-10-14 12:26:29 +02:00
50b59e0ca6 batch: Add old commit message as comment at top of file
This is a lightly-edited version of Ray's commit message in
4902a600d5.
2015-10-13 14:43:39 -05:00
14c52bb00a dash: Ensure style for icon size computation
StIcon will skip loading the texture when its theme node is unset (which
may happen on style changes while the widget is hidden). While our size
request to compute the dash icon size will create the icon's theme node
if necessary (and of all its parents), a missing texture can still throw
off our computation.
Make sure this doesn't happen by ensuring the icon's style first, so the
texture is updated in response to StWidget::style-changed if necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=745649
2015-10-13 20:21:44 +02:00
9720b32987 dash: Revert mislead cleanup
When adjusting dash icon sizes, we compute the icon padding by subtracting
the configured icon size from the first icon actor's preferred size. To
make sure that the preferred size correctly corresponds to the current
dash icon size even while the icon is animating, we enforce the size
before the size request. For that we used to temporarily manipulate
the icon texture size directly, but commit e92d204d42 cleaned this
up to use the setIconSize() method instead.
This does not work however, as the icon actor's iconSize property will
always match the dash iconSize property, making the method a noop. So
go back to the original approach of enforcing the texture size to make
sure we always base our computations on correct values.

https://bugzilla.gnome.org/show_bug.cgi?id=745649
2015-10-13 20:21:44 +02:00
26 changed files with 3046 additions and 2355 deletions

52
NEWS
View File

@ -1,3 +1,55 @@
3.18.3
======
* Fix browser plugin crash in Firefox [Carlos; #737932, #757940]
Contributors:
Carlos Garcia Campos
3.18.2
======
* Fix fullscreen animation glitches [Florian, Cosimo; #756697, #756714]
* Fix window menu being closed immediately in top orientation [Rui; #756605]
* Respect text-scaling factor under wayland [Owen; #756447]
* Fix login screen getting stuck after authentification [Ray; #754814]
* Fix overview being toggled while still animating [Rui; #756925]
* Improve robustness of browser plugin [Carlos; #737932, #757940]
* Misc. bug fixes [Owen, Florian; #756983, #757150, #757779]
Contributors:
Cosimo Cecchi, Carlos Garcia Campos, Rui Matos, Florian Müllner, Ray Strode,
Owen W. Taylor
Translations:
Kjartan Maraas [nb], Khaled Hosny [ar], Sveinn í Felli [is],
Balázs Meskó [hu], Daniel Șerbănescu [ro], Aron Xu [zh_CN],
Anthony Fok [zh_TW]
3.18.1
======
* Fix screen freezes when a notification is pushed [Carlos; #755425]
* Fix overzealous ellipsization in system status menu [Adel, Florian; #708472]
* Hide app menu when disabled by setting [Florian; #745919]
* Fix lightbox effect when animations are disabled [Rui; #755827]
* Do not mark hotplug notifications as critical [Florian; #657923]
* Fix icons getting cut off in dash [Florian; #745649]
* Animate fullscreen/unfullscreen operations [Cosimo; #707248]
* Misc. bug fixes [Florian, Owen; #748919, #674799, #754581]
Contributors:
Emmanuele Bassi, Michael Catanzaro, Cosimo Cecchi, Matthias Clasen,
Adel Gadllah, Carlos Garnacho, Ekaterina Gerasimova, Rui Matos,
Florian Müllner, Owen W. Taylor
Translations:
Марко Костић [sr], Милош Поповић [sr@latin], Khaled Hosny [ar],
Trần Ngọc Quân [vi], Petr Kovar [cs], Alexandre Franke [fr],
Fran Dieguez [gl], Anders Jonsson [sv], Piotr Drąg [pl], Dušan Kazik [sk],
Milo Casagrande [it], Changwoo Ryu [ko], Stas Solovey [ru],
Rafael Fontenelle [pt_BR], Tom Tryfonidis [el], Aurimas Černius [lt],
Seán de Búrca [ga], Christian Kirbach [de], Jiri Grönroos [fi],
Pedro Albuquerque [pt], Baurzhan Muftakhidinov [kk], Daniel Mustieles [es],
Marek Černocký [cs], Ask Hjorth Larsen [da], Inaki Larranaga Murgoitio [eu]
3.18.0
======

View File

@ -3,7 +3,10 @@ mozillalibdir = $(BROWSER_PLUGIN_DIR)
mozillalib_LTLIBRARIES = libgnome-shell-browser-plugin.la
libgnome_shell_browser_plugin_la_LDFLAGS = -module -avoid-version -no-undefined
# Browsers can unload and reload the module while browsing, which is not supported by GObject.
# We pass -Wl,-z,nodelete to the linker to ensure the module is never unloaded.
# https://bugzilla.gnome.org/show_bug.cgi?id=737932
libgnome_shell_browser_plugin_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,-z,nodelete
libgnome_shell_browser_plugin_la_LIBADD = \
$(BROWSER_PLUGIN_LIBS)

View File

@ -43,10 +43,6 @@
#define EXTENSION_DISABLE_VERSION_CHECK_KEY "disable-extension-version-validation"
typedef struct {
GDBusProxy *proxy;
} PluginData;
static NPNetscapeFuncs funcs;
static inline gchar *
@ -145,121 +141,6 @@ check_origin_and_protocol (NPP instance)
return ret;
}
/* =============== public entry points =================== */
NPError
NP_Initialize(NPNetscapeFuncs *pfuncs, NPPluginFuncs *plugin)
{
/* global initialization routine, called once when plugin
is loaded */
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;
plugin->setwindow = NPP_SetWindow;
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.Extensions",
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 {
@ -344,45 +225,18 @@ static NPObject *
plugin_object_allocate (NPP instance,
NPClass *klass)
{
PluginData *data = instance->pdata;
PluginObject *obj = g_slice_new0 (PluginObject);
PluginObject *obj = (PluginObject *) funcs.memalloc (sizeof (PluginObject));
memset (obj, 0, sizeof (PluginObject));
obj->instance = instance;
obj->proxy = g_object_ref (data->proxy);
obj->settings = g_settings_new (SHELL_SCHEMA);
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;
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);
funcs.memfree (npobj);
}
static inline gboolean
@ -1033,6 +887,149 @@ init_methods_and_properties (void)
onextension_changed_id = funcs.getstringidentifier ("onchange");
}
/* =============== public entry points =================== */
NPError
NP_Initialize(NPNetscapeFuncs *pfuncs, NPPluginFuncs *plugin)
{
/* global initialization routine, called once when plugin
is loaded */
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;
plugin->setwindow = NPP_SetWindow;
plugin->event = NPP_HandleEvent;
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 */
PluginObject *obj;
GError *error = NULL;
g_debug ("plugin created");
if (!check_origin_and_protocol (instance))
return NPERR_GENERIC_ERROR;
/* set windowless mode */
funcs.setvalue(instance, NPPVpluginWindowBool, NULL);
g_debug ("creating scriptable object");
init_methods_and_properties ();
obj = (PluginObject *) funcs.createobject (instance, &plugin_class);
instance->pdata = obj;
obj->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.Extensions",
NULL, /* GCancellable */
&error);
if (!obj->proxy)
{
/* ignore error if the shell is not running, otherwise warn */
if (!g_error_matches (error, G_DBUS_ERROR, 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;
}
obj->settings = g_settings_new (SHELL_SCHEMA);
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 created successfully");
return NPERR_NO_ERROR;
}
NPError
NPP_Destroy(NPP instance,
NPSavedData **saved)
{
/* instance finalization function */
PluginObject *obj = (PluginObject *) instance->pdata;
if (!obj)
return NPERR_INVALID_INSTANCE_ERROR;
g_debug ("plugin destroyed");
g_signal_handler_disconnect (obj->proxy, obj->signal_id);
g_object_unref (obj->proxy);
if (obj->listener)
funcs.releaseobject (obj->listener);
if (obj->restart_listener)
funcs.releaseobject (obj->restart_listener);
if (obj->watch_name_id)
g_bus_unwatch_name (obj->watch_name_id);
funcs.releaseobject((NPObject *)obj);
return NPERR_NO_ERROR;
}
NPError
NPP_GetValue(NPP instance,
NPPVariable variable,
@ -1043,13 +1040,10 @@ NPP_GetValue(NPP instance,
switch (variable) {
case NPPVpluginScriptableNPObject:
g_debug ("creating scriptable object");
init_methods_and_properties ();
if (!instance->pdata)
return NPERR_INVALID_INSTANCE_ERROR;
*(NPObject**)value = funcs.createobject (instance, &plugin_class);
break;
case NPPVpluginNeedsXEmbed:
*(bool *)value = TRUE;
*(NPObject**)value = instance->pdata;
break;
default:
@ -1067,3 +1061,11 @@ NPP_SetWindow(NPP instance,
{
return NPERR_NO_ERROR;
}
int16_t
NPP_HandleEvent(NPP instance,
void *event)
{
/* Ignore the event */
return FALSE;
}

View File

@ -1,5 +1,5 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell],[3.18.0],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_INIT([gnome-shell],[3.18.3],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AX_IS_RELEASE([git-directory])
AC_CONFIG_HEADERS([config.h])
@ -77,7 +77,7 @@ AC_MSG_RESULT($enable_systemd)
CLUTTER_MIN_VERSION=1.21.5
GOBJECT_INTROSPECTION_MIN_VERSION=1.45.4
GJS_MIN_VERSION=1.39.0
MUTTER_MIN_VERSION=3.18.0
MUTTER_MIN_VERSION=3.18.1
GTK_MIN_VERSION=3.15.0
GIO_MIN_VERSION=2.45.3
LIBECAL_MIN_VERSION=3.5.3

View File

@ -408,9 +408,9 @@ StScrollBar {
spacing-rows: 15px;
spacing-columns: 1em; }
/* Popvers/Menus */
/* Popovers/Menus */
.popup-menu {
min-width: 200px; }
min-width: 15em; }
.popup-menu .popup-sub-menu {
background-color: black;
box-shadow: inset 0 -1px 0px #0d0d0d; }
@ -752,7 +752,7 @@ StScrollBar {
/* Message list */
.message-list {
width: 420px; }
width: 31.5em; }
.message-list-sections {
spacing: 1.5em; }
@ -823,8 +823,7 @@ StScrollBar {
color: transparent; }
.aggregate-menu {
min-width: 280px;
max-width: 400px; }
min-width: 21em; }
.aggregate-menu .popup-menu-icon {
padding: 0 4px; }

View File

@ -408,9 +408,9 @@ StScrollBar {
spacing-rows: 15px;
spacing-columns: 1em; }
/* Popvers/Menus */
/* Popovers/Menus */
.popup-menu {
min-width: 200px; }
min-width: 15em; }
.popup-menu .popup-sub-menu {
background-color: #343a3a;
box-shadow: inset 0 -1px 0px #282c2c; }
@ -752,7 +752,7 @@ StScrollBar {
/* Message list */
.message-list {
width: 420px; }
width: 31.5em; }
.message-list-sections {
spacing: 1.5em; }
@ -823,8 +823,7 @@ StScrollBar {
color: transparent; }
.aggregate-menu {
min-width: 280px;
max-width: 400px; }
min-width: 21em; }
.aggregate-menu .popup-menu-icon {
padding: 0 4px; }

View File

@ -16,6 +16,34 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
/*
* In order for transformation animations to look good, they need to be
* incremental and have some order to them (e.g., fade out hidden items,
* then shrink to close the void left over). Chaining animations in this way can
* be error-prone and wordy using just Tweener callbacks.
*
* The classes in this file help with this:
*
* - Task. encapsulates schedulable work to be run in a specific scope.
*
* - ConsecutiveBatch. runs a series of tasks in order and completes
* when the last in the series finishes.
*
* - ConcurrentBatch. runs a set of tasks at the same time and completes
* when the last to finish completes.
*
* - Hold. prevents a batch from completing the pending task until
* the hold is released.
*
* The tasks associated with a batch are specified in a list at batch
* construction time as either task objects or plain functions.
* Batches are task objects, themselves, so they can be nested.
*
* These classes aren't specific to GDM, but were found to be unintuitive and so
* are not used elsewhere. These APIs may ultimately get dropped entirely and
* replaced by something else.
*/
const Lang = imports.lang;
const Signals = imports.signals;

View File

@ -924,11 +924,7 @@ const LoginDialog = new Lang.Class({
},
onUpdateScope: this,
onComplete: function() {
let id = Mainloop.idle_add(Lang.bind(this, function() {
this._greeter.call_start_session_when_ready_sync(serviceName, true, null);
return GLib.SOURCE_REMOVE;
}));
GLib.Source.set_name_by_id(id, '[gnome-shell] this._greeter.call_start_session_when_ready_sync');
},
onCompleteScope: this });
},

View File

@ -7,7 +7,7 @@ const St = imports.gi.St;
const Signals = imports.signals;
const Atk = imports.gi.Atk;
const ANIMATED_ICON_UPDATE_TIMEOUT = 14;
const ANIMATED_ICON_UPDATE_TIMEOUT = 16;
const Animation = new Lang.Class({
Name: 'Animation',
@ -33,7 +33,7 @@ const Animation = new Lang.Class({
if (this._frame == 0)
this._showFrame(0);
this._timeoutId = Mainloop.timeout_add(this._speed, Lang.bind(this, this._update));
this._timeoutId = GLib.timeout_add(GLib.PRIORITY_LOW, this._speed, Lang.bind(this, this._update));
GLib.Source.set_name_by_id(this._timeoutId, '[gnome-shell] this._update');
}

View File

@ -644,15 +644,14 @@ const Dash = new Lang.Class({
let firstIcon = firstButton._delegate.icon;
let minHeight, natHeight;
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
// Enforce the current icon size during the size request
firstIcon.setIconSize(this.iconSize);
firstIcon.icon.ensure_style();
let [currentWidth, currentHeight] = firstIcon.icon.get_size();
firstIcon.icon.set_size(this.iconSize * scaleFactor, this.iconSize * scaleFactor);
[minHeight, natHeight] = firstButton.get_preferred_height(-1);
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let iconSizes = baseIconSizes.map(function(s) {
return s * scaleFactor;
});
firstIcon.icon.set_size(currentWidth, currentHeight);
// Subtract icon padding and box spacing from the available height
availHeight -= iconChildren.length * (natHeight - this.iconSize * scaleFactor) +
@ -660,6 +659,10 @@ const Dash = new Lang.Class({
let availSize = availHeight / iconChildren.length;
let iconSizes = baseIconSizes.map(function(s) {
return s * scaleFactor;
});
let newIconSize = baseIconSizes[0];
for (let i = 0; i < iconSizes.length; i++) {
if (iconSizes[i] < availSize)

View File

@ -459,6 +459,7 @@ const ActivitiesButton = new Lang.Class({
if (event.type() == Clutter.EventType.TOUCH_END ||
event.type() == Clutter.EventType.BUTTON_RELEASE)
if (Main.overview.shouldToggleByCornerOrButton())
Main.overview.toggle();
return Clutter.EVENT_PROPAGATE;
@ -467,6 +468,7 @@ const ActivitiesButton = new Lang.Class({
_onKeyRelease: function(actor, event) {
let symbol = event.get_key_symbol();
if (symbol == Clutter.KEY_Return || symbol == Clutter.KEY_space) {
if (Main.overview.shouldToggleByCornerOrButton())
Main.overview.toggle();
}
return Clutter.EVENT_PROPAGATE;
@ -652,6 +654,39 @@ const PanelCorner = new Lang.Class({
}
});
const AggregateLayout = new Lang.Class({
Name: 'AggregateLayout',
Extends: Clutter.BoxLayout,
_init: function(params) {
if (!params)
params = {};
params['orientation'] = Clutter.Orientation.VERTICAL;
this.parent(params);
this._sizeChildren = [];
},
addSizeChild: function(actor) {
this._sizeChildren.push(actor);
this.layout_changed();
},
vfunc_get_preferred_width: function(container, forHeight) {
let themeNode = container.get_theme_node();
let minWidth = themeNode.get_min_width();
let natWidth = minWidth;
for (let i = 0; i < this._sizeChildren.length; i++) {
let child = this._sizeChildren[i];
let [childMin, childNat] = child.get_preferred_width(forHeight);
minWidth = Math.max(minWidth, childMin);
natWidth = Math.max(minWidth, childNat);
}
return [minWidth, natWidth];
}
});
const AggregateMenu = new Lang.Class({
Name: 'AggregateMenu',
Extends: PanelMenu.Button,
@ -660,6 +695,9 @@ const AggregateMenu = new Lang.Class({
this.parent(0.0, C_("System menu in the top bar", "System"), false);
this.menu.actor.add_style_class_name('aggregate-menu');
let menuLayout = new AggregateLayout();
this.menu.box.set_layout_manager(menuLayout);
this._indicators = new St.BoxLayout({ style_class: 'panel-status-indicators-box' });
this.actor.add_child(this._indicators);
@ -708,6 +746,11 @@ const AggregateMenu = new Lang.Class({
this.menu.addMenuItem(this._rfkill.menu);
this.menu.addMenuItem(this._power.menu);
this.menu.addMenuItem(this._system.menu);
menuLayout.addSizeChild(this._location.menu.actor);
menuLayout.addSizeChild(this._rfkill.menu.actor);
menuLayout.addSizeChild(this._power.menu.actor);
menuLayout.addSizeChild(this._system.menu.actor);
},
});

View File

@ -677,6 +677,7 @@ const WindowManager = new Lang.Class({
this._minimizing = [];
this._unminimizing = [];
this._mapping = [];
this._resizing = [];
this._destroying = [];
this._movingWindow = null;
@ -1234,6 +1235,27 @@ const WindowManager = new Lang.Class({
},
_fullscreenWindow: function(shellwm, actor, oldFrameRect, oldBufferRect) {
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
actor.translation_x = oldFrameRect.x - monitor.x;
actor.translation_y = oldFrameRect.y - monitor.y;
this._fullscreenAnimation(shellwm, actor, oldFrameRect);
},
_unfullscreenWindow: function(shellwm, actor, oldFrameRect, oldBufferRect) {
let targetRect = actor.meta_window.get_frame_rect();
let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()];
actor.translation_x = -(targetRect.x - monitor.x);
actor.translation_y = -(targetRect.y - monitor.y);
this._fullscreenAnimation(shellwm, actor, oldFrameRect);
},
_fullscreenAnimation: function(shellwm, actor, oldFrameRect) {
this._resizing.push(actor);
// Position a clone of the window on top of the old position,
// while actor updates are frozen.
// Note that the MetaWindow has up to date sizing information for
// the new geometry already.
let targetRect = actor.meta_window.get_frame_rect();
let actorContent = Shell.util_get_content_for_window_actor(actor, oldFrameRect);
let actorClone = new St.Widget({ content: actorContent });
@ -1247,93 +1269,68 @@ const WindowManager = new Lang.Class({
let scaleX = targetRect.width / oldFrameRect.width;
let scaleY = targetRect.height / oldFrameRect.height;
// Now scale and fade out the clone
Tweener.addTween(actorClone,
{ x: targetRect.x,
y: targetRect.y,
scaleX: scaleX,
scaleY: scaleY,
scale_x: scaleX,
scale_y: scaleY,
opacity: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._sizeChangeWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor]
});
actor.translation_x = actor.x;
actor.translation_y = actor.y;
actor.scaleX = 1 / scaleX;
actor.scaleY = 1 / scaleY;
Tweener.addTween(actor,
{ scaleX: 1.0,
scaleY: 1.0,
translation_x: 0,
translation_y: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad'
});
shellwm.completed_size_change(actor);
},
// Now set scale the actor to size it as the clone.
// Note that the caller of this function already set a translation
// on the actor.
actor.scale_x = 1 / scaleX;
actor.scale_y = 1 / scaleY;
_unfullscreenWindow: function(shellwm, actor, oldFrameRect, oldBufferRect) {
let targetRect = actor.meta_window.get_frame_rect();
let actorContent = Shell.util_get_content_for_window_actor(actor, oldFrameRect);
let actorClone = new St.Widget({ content: actorContent });
actorClone.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
actorClone.set_position(oldFrameRect.x, oldFrameRect.y);
actorClone.set_size(oldFrameRect.width, oldFrameRect.height);
Main.uiGroup.add_actor(actorClone);
actor.__unfullscreenClone = actorClone;
let scaleX = targetRect.width / oldFrameRect.width;
let scaleY = targetRect.height / oldFrameRect.height;
Tweener.addTween(actorClone,
{ x: targetRect.x,
y: targetRect.y,
scaleX: scaleX,
scaleY: scaleY,
opacity: 0,
// Scale it to its actual new size
Tweener.addTween(actor,
{ scale_x: 1.0,
scale_y: 1.0,
translation_x: 0,
translation_y: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._sizeChangeWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor]
});
actor.translation_x = -actor.x;
actor.translation_y = -actor.y;
actor.scaleX = 1 / scaleX;
actor.scaleY = 1 / scaleY;
Tweener.addTween(actor,
{ scaleX: 1.0,
scaleY: 1.0,
translation_x: 0,
translation_y: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad'
onCompleteParams: [shellwm, actor],
onOverwrite: this._sizeChangeWindowOverwritten,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
// Now unfreeze actor updates, to get it to the new size.
// It's important that we don't wait until the animation is completed to
// do this, otherwise our scale will be applied to the old texture size.
shellwm.completed_size_change(actor);
},
_sizeChangeWindowDone: function(shellwm, actor) {
if (this._removeEffect(this._resizing, actor)) {
Tweener.removeTweens(actor);
actor.scale_x = 1.0;
actor.scale_y = 1.0;
actor.translation_x = 0;
actor.translation_y = 0;
let actorClone = actor.__fullscreenClone;
if (actorClone) {
actorClone.destroy();
delete actor.__fullscreenClone;
}
}
},
actorClone = actor.__unfullscreenClone;
_sizeChangeWindowOverwritten: function(shellwm, actor) {
if (this._removeEffect(this._resizing, actor)) {
let actorClone = actor.__fullscreenClone;
if (actorClone) {
actorClone.destroy();
delete actor.__unfullscreenClone;
delete actor.__fullscreenClone;
}
}
},

View File

@ -214,7 +214,7 @@ const WindowMenuManager = new Lang.Class({
menu.close();
});
this._sourceActor.set_size(rect.width, rect.height);
this._sourceActor.set_size(Math.max(1, rect.width), Math.max(1, rect.height));
this._sourceActor.set_position(rect.x, rect.y);
this._sourceActor.show();

View File

@ -1223,13 +1223,13 @@ msgstr "<غير معروفة>"
#: ../js/ui/status/network.js:451 ../js/ui/status/network.js:1308
#, javascript-format
msgid "%s Off"
msgstr "%s مغلق"
msgstr "%s مغلق"
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:454
#, javascript-format
msgid "%s Connected"
msgstr "%s مُتصل"
msgstr "%s مُتصل"
#. Translators: this is for network devices that are physically present but are not
#. under NetworkManager's control (and thus cannot be used in the menu);
@ -1237,19 +1237,19 @@ msgstr "%s مُتصل"
#: ../js/ui/status/network.js:459
#, javascript-format
msgid "%s Unmanaged"
msgstr "%s غير مُدار"
msgstr "%s غير مُدار"
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:462
#, javascript-format
msgid "%s Disconnecting"
msgstr "%s يقطع الاتّصال"
msgstr "%s يقطع الاتّصال"
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:469 ../js/ui/status/network.js:1300
#, javascript-format
msgid "%s Connecting"
msgstr "%s يتّصل"
msgstr "%s يتّصل"
#. Translators: this is for network connections that require some kind of key or password; %s is a network identifier
#: ../js/ui/status/network.js:472
@ -1269,7 +1269,7 @@ msgstr "برمجيات %s المغروسة (Firmware) غير متاحة"
#: ../js/ui/status/network.js:484
#, javascript-format
msgid "%s Unavailable"
msgstr "%s غير متاح"
msgstr "%s غير متاح"
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:487
@ -1296,7 +1296,7 @@ msgstr "عتاد %s مُعَطَّل"
#: ../js/ui/status/network.js:592
#, javascript-format
msgid "%s Disabled"
msgstr "%s معطّل"
msgstr "%s معطّل"
#: ../js/ui/status/network.js:632
msgid "Use as Internet connection"
@ -1364,7 +1364,7 @@ msgstr "نقطة اتصال %s نشطة"
#: ../js/ui/status/network.js:1311
#, javascript-format
msgid "%s Not Connected"
msgstr "%s غير متّصل"
msgstr "%s غير متّصل"
#: ../js/ui/status/network.js:1411
msgid "connecting..."

664
po/eu.po

File diff suppressed because it is too large Load Diff

529
po/hu.po

File diff suppressed because it is too large Load Diff

631
po/is.po

File diff suppressed because it is too large Load Diff

View File

@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell 3.17.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-07 19:22+0200\n"
"PO-Revision-Date: 2015-09-07 19:31+0200\n"
"POT-Creation-Date: 2015-10-16 18:11+0200\n"
"PO-Revision-Date: 2015-10-16 18:11+0200\n"
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
"Language-Team: Norwegian bokmål <i18n-nb@lister.ping.uio.no>\n"
"Language: Norwegian bokmål\n"
@ -508,8 +508,7 @@ msgstr "Bytt bakgrunn …"
msgid "Display Settings"
msgstr "Innstillinger for skjerm"
#: ../js/ui/backgroundMenu.js:22 ../js/ui/panel.js:650
#: ../js/ui/status/system.js:366
#: ../js/ui/backgroundMenu.js:22 ../js/ui/status/system.js:366
msgid "Settings"
msgstr "Innstillinger"
@ -585,33 +584,33 @@ msgctxt "event list time"
msgid "All Day"
msgstr "Hele dagen"
#: ../js/ui/calendar.js:1291
#: ../js/ui/calendar.js:1295
msgid "Clear section"
msgstr "Tøm seksjon"
#: ../js/ui/calendar.js:1518
#: ../js/ui/calendar.js:1522
msgid "Events"
msgstr "Hendelser"
#: ../js/ui/calendar.js:1527
#: ../js/ui/calendar.js:1531
msgctxt "calendar heading"
msgid "%A, %B %d"
msgstr "%A %B %d"
#: ../js/ui/calendar.js:1531
#: ../js/ui/calendar.js:1535
msgctxt "calendar heading"
msgid "%A, %B %d, %Y"
msgstr "%A %B %d, %Y"
#: ../js/ui/calendar.js:1616
#: ../js/ui/calendar.js:1620
msgid "Notifications"
msgstr "Varslinger"
#: ../js/ui/calendar.js:1767
#: ../js/ui/calendar.js:1771
msgid "No Notifications"
msgstr "Ingen varslinger"
#: ../js/ui/calendar.js:1770
#: ../js/ui/calendar.js:1774
msgid "No Events"
msgstr "Ingen hendelser"
@ -623,7 +622,7 @@ msgstr "Ekstern stasjon koblet til"
msgid "External drive disconnected"
msgstr "Ekstern stasjon koblet fra"
#: ../js/ui/components/autorunManager.js:354
#: ../js/ui/components/autorunManager.js:351
#, javascript-format
msgid "Open with %s"
msgstr "Åpne med %s"
@ -1012,17 +1011,22 @@ msgstr "Oversikt"
msgid "Type to search…"
msgstr "Skriv for å søke …"
#: ../js/ui/panel.js:352
#: ../js/ui/panel.js:358
msgid "Quit"
msgstr "Avslutt"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview".
#: ../js/ui/panel.js:404
#: ../js/ui/panel.js:414
msgid "Activities"
msgstr "Aktiviteter"
#: ../js/ui/panel.js:754
#: ../js/ui/panel.js:693
msgctxt "System menu in the top bar"
msgid "System"
msgstr "System"
#: ../js/ui/panel.js:805
msgid "Top Bar"
msgstr "Topp-panel"
@ -1562,19 +1566,19 @@ msgstr "Alltid på synlig arbeidsområde"
#: ../js/ui/windowMenu.js:105
msgid "Move to Workspace Left"
msgstr " til arbeidsområdet til venstre"
msgstr "Flytt til arbeidsområdet til venstre"
#: ../js/ui/windowMenu.js:110
msgid "Move to Workspace Right"
msgstr " til arbeidsområdet til høyre"
msgstr "Flytt til arbeidsområdet til høyre"
#: ../js/ui/windowMenu.js:115
msgid "Move to Workspace Up"
msgstr " til arbeidsområdet over"
msgstr "Flytt til arbeidsområdet over"
#: ../js/ui/windowMenu.js:120
msgid "Move to Workspace Down"
msgstr " til arbeidsområdet under"
msgstr "Flytt til arbeidsområdet under"
#: ../js/ui/windowMenu.js:136
msgid "Move to Monitor Up"
@ -1618,28 +1622,28 @@ msgstr[1] "%u innganger"
msgid "System Sounds"
msgstr "Systemlyder"
#: ../src/main.c:373
#: ../src/main.c:381
msgid "Print version"
msgstr "Vis versjon"
#: ../src/main.c:379
#: ../src/main.c:387
msgid "Mode used by GDM for login screen"
msgstr "Modus som brukes av GDM for innloggingsskjermen"
#: ../src/main.c:385
#: ../src/main.c:393
msgid "Use a specific mode, e.g. \"gdm\" for login screen"
msgstr "Bruk spesifikt modus, f.eks «gdm» for innloggingsskjerm"
#: ../src/main.c:391
#: ../src/main.c:399
msgid "List possible modes"
msgstr "Vis mulige modi"
#: ../src/shell-app.c:239
#: ../src/shell-app.c:246
msgctxt "program"
msgid "Unknown"
msgstr "Ukjent"
#: ../src/shell-app.c:480
#: ../src/shell-app.c:487
#, c-format
msgid "Failed to launch “%s”"
msgstr "Klarte ikke å starte «%s»"

1970
po/ro.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,18 @@
# Chinese (Taiwan) translation for gnome-shell.
# Copyright (C) 2010 gnome-shell's COPYRIGHT HOLDER
# This file is distributed under the same license as the gnome-shell package.
# Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>, 2010.
# Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>, 2010, 2014.
# Wei-Lun Chao <chaoweilun@gmail.com>, 2010.
# Anthony Fok <foka@debian.org>, 2015.
#
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell 3.3.90\n"
"Project-Id-Version: gnome-shell 3.18\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-08-25 13:32+0800\n"
"PO-Revision-Date: 2015-08-25 13:37+0800\n"
"Last-Translator: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>\n"
"POT-Creation-Date: 2015-10-16 21:11+0000\n"
"PO-Revision-Date: 2015-10-17 09:30+0800\n"
"Last-Translator: Anthony Fok <foka@debian.org>\n"
"Language-Team: Chinese (Taiwan) <zh-l10n@lists.linux.org.tw>\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
@ -297,7 +298,7 @@ msgid "Cancel"
msgstr "取消"
#: ../js/gdm/authPrompt.js:169 ../js/gdm/authPrompt.js:215
#: ../js/gdm/authPrompt.js:435
#: ../js/gdm/authPrompt.js:447
msgid "Next"
msgstr "下一個"
@ -315,21 +316,29 @@ msgstr "登入"
msgid "Choose Session"
msgstr "選擇作業階段"
#. translators: this message is shown below the user list on the
#. login screen. It can be activated to reveal an entry for
#. manually entering the username.
#: ../js/gdm/loginDialog.js:431
msgid "Not listed?"
msgstr "沒有列出來?"
#: ../js/gdm/loginDialog.js:847
#. Translators: this message is shown below the username entry field
#. to clue the user in on how to login to the local network realm
#: ../js/gdm/loginDialog.js:850
#, javascript-format
msgid "(e.g., user or %s)"
msgstr "(例如: user 或 %s)"
#: ../js/gdm/loginDialog.js:852 ../js/ui/components/networkAgent.js:271
#. TTLS and PEAP are actually much more complicated, but this complication
#. is not visible here since we only care about phase2 authentication
#. (and don't even care of which one)
#: ../js/gdm/loginDialog.js:855 ../js/ui/components/networkAgent.js:271
#: ../js/ui/components/networkAgent.js:289
msgid "Username: "
msgstr "使用者名稱:"
#: ../js/gdm/loginDialog.js:1181
#: ../js/gdm/loginDialog.js:1184
msgid "Login Window"
msgstr "登入視窗"
@ -337,6 +346,11 @@ msgstr "登入視窗"
msgid "Authentication error"
msgstr "核對錯誤"
#. We don't show fingerprint messages directly since it's
#. not the main auth service. Instead we use the messages
#. as a cue to display our own message.
#. Translators: this message is shown below the password entry field
#. to indicate the user can swipe their finger instead
#: ../js/gdm/util.js:473
msgid "(or swipe finger)"
msgstr "(或是滑過手指)"
@ -345,6 +359,8 @@ msgstr "(或是滑過手指)"
msgid "Command not found"
msgstr "找不到指令"
#. Replace "Error invoking GLib.shell_parse_argv: " with
#. something nicer
#: ../js/misc/util.js:152
msgid "Could not parse command:"
msgstr "無法分析指令:"
@ -354,70 +370,78 @@ msgstr "無法分析指令:"
msgid "Execution of “%s” failed:"
msgstr "執行「%s」失敗"
#. Translators: Time in 24h format */
#. Translators: Time in 24h format
#: ../js/misc/util.js:191
msgid "%H%M"
msgstr "%H%M"
#. Translators: this is the word "Yesterday" followed by a
#. time string in 24h format. i.e. "Yesterday, 14:30" */
#. time string in 24h format. i.e. "Yesterday, 14:30"
#: ../js/misc/util.js:197
#, no-c-format
msgid "Yesterday, %H%M"
msgstr "昨天 %H:%M"
#. Translators: this is the week day name followed by a time
#. string in 24h format. i.e. "Monday, 14:30" */
#. string in 24h format. i.e. "Monday, 14:30"
#: ../js/misc/util.js:203
#, no-c-format
msgid "%A, %H%M"
msgstr "%A %H%M"
#. Translators: this is the month name and day number
#. followed by a time string in 24h format.
#. i.e. "May 25, 14:30" */
#. i.e. "May 25, 14:30"
#: ../js/misc/util.js:209
#, no-c-format
msgid "%B %d, %H%M"
msgstr "%m月%d日 %H%M"
#. Translators: this is the month name, day number, year
#. number followed by a time string in 24h format.
#. i.e. "May 25 2012, 14:30" */
#. i.e. "May 25 2012, 14:30"
#: ../js/misc/util.js:215
#, no-c-format
msgid "%B %d %Y, %H%M"
msgstr "%Y年%m月%d日 %H:%M"
#. Translators: Time in 12h format */
#. Translators: Time in 12h format
#: ../js/misc/util.js:220
msgid "%l%M %p"
msgstr "%p %l%M"
#. Translators: this is the word "Yesterday" followed by a
#. time string in 12h format. i.e. "Yesterday, 2:30 pm" */
#. time string in 12h format. i.e. "Yesterday, 2:30 pm"
#: ../js/misc/util.js:226
#, no-c-format
msgid "Yesterday, %l%M %p"
msgstr "昨天 %p %l%M"
#. Translators: this is the week day name followed by a time
#. string in 12h format. i.e. "Monday, 2:30 pm" */
#. string in 12h format. i.e. "Monday, 2:30 pm"
#: ../js/misc/util.js:232
#, no-c-format
msgid "%A, %l%M %p"
msgstr "%A%p %l%M"
#. Translators: this is the month name and day number
#. followed by a time string in 12h format.
#. i.e. "May 25, 2:30 pm" */
#. i.e. "May 25, 2:30 pm"
#: ../js/misc/util.js:238
#, no-c-format
msgid "%B %d, %l%M %p"
msgstr "%m月%d日%p %l%M"
#. Translators: this is the month name, day number, year
#. number followed by a time string in 12h format.
#. i.e. "May 25 2012, 2:30 pm"*/
#. i.e. "May 25 2012, 2:30 pm"
#: ../js/misc/util.js:244
#, no-c-format
msgid "%B %d %Y, %l%M %p"
msgstr "%Y年%m月%d日%p %l%M"
#. TRANSLATORS: this is the title of the wifi captive portal login
#. * window, until we know the title of the actual login page */
#. * window, until we know the title of the actual login page
#: ../js/portalHelper/main.js:85
msgid "Web Authentication Redirect"
msgstr "網頁核對重新導向"
@ -468,12 +492,11 @@ msgstr "改變背景…"
msgid "Display Settings"
msgstr "顯示設定值"
#: ../js/ui/backgroundMenu.js:22 ../js/ui/panel.js:650
#: ../js/ui/status/system.js:366
#: ../js/ui/backgroundMenu.js:22 ../js/ui/status/system.js:366
msgid "Settings"
msgstr "設定值"
#. Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday). */
#. Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday).
#: ../js/ui/calendar.js:55
msgctxt "calendar-no-work"
msgid "06"
@ -483,43 +506,43 @@ msgstr "06"
#. *
#. * NOTE: These grid abbreviations are always shown together
#. * and in order, e.g. "S M T W T F S".
#. */
#.
#: ../js/ui/calendar.js:84
msgctxt "grid sunday"
msgid "S"
msgstr "日"
#. Translators: Calendar grid abbreviation for Monday */
#. Translators: Calendar grid abbreviation for Monday
#: ../js/ui/calendar.js:86
msgctxt "grid monday"
msgid "M"
msgstr "一"
#. Translators: Calendar grid abbreviation for Tuesday */
#. Translators: Calendar grid abbreviation for Tuesday
#: ../js/ui/calendar.js:88
msgctxt "grid tuesday"
msgid "T"
msgstr "二"
#. Translators: Calendar grid abbreviation for Wednesday */
#. Translators: Calendar grid abbreviation for Wednesday
#: ../js/ui/calendar.js:90
msgctxt "grid wednesday"
msgid "W"
msgstr "三"
#. Translators: Calendar grid abbreviation for Thursday */
#. Translators: Calendar grid abbreviation for Thursday
#: ../js/ui/calendar.js:92
msgctxt "grid thursday"
msgid "T"
msgstr "四"
#. Translators: Calendar grid abbreviation for Friday */
#. Translators: Calendar grid abbreviation for Friday
#: ../js/ui/calendar.js:94
msgctxt "grid friday"
msgid "F"
msgstr "五"
#. Translators: Calendar grid abbreviation for Saturday */
#. Translators: Calendar grid abbreviation for Saturday
#: ../js/ui/calendar.js:96
msgctxt "grid saturday"
msgid "S"
@ -539,39 +562,39 @@ msgstr "%V 週"
#. Translators: Shown in calendar event list for all day events
#. * Keep it short, best if you can use less then 10 characters
#. */
#.
#: ../js/ui/calendar.js:1188
msgctxt "event list time"
msgid "All Day"
msgstr "整天"
#: ../js/ui/calendar.js:1291
#: ../js/ui/calendar.js:1295
msgid "Clear section"
msgstr "清除區段"
#: ../js/ui/calendar.js:1518
#: ../js/ui/calendar.js:1522
msgid "Events"
msgstr "行程"
#: ../js/ui/calendar.js:1527
#: ../js/ui/calendar.js:1531
msgctxt "calendar heading"
msgid "%A, %B %d"
msgstr "%m月%d日%A"
#: ../js/ui/calendar.js:1531
#: ../js/ui/calendar.js:1535
msgctxt "calendar heading"
msgid "%A, %B %d, %Y"
msgstr "%Y年%m月%d日%A"
#: ../js/ui/calendar.js:1616
#: ../js/ui/calendar.js:1620
msgid "Notifications"
msgstr "通知"
#: ../js/ui/calendar.js:1767
#: ../js/ui/calendar.js:1771
msgid "No Notifications"
msgstr "沒有通知"
#: ../js/ui/calendar.js:1770
#: ../js/ui/calendar.js:1774
msgid "No Events"
msgstr "沒有行程"
@ -583,7 +606,7 @@ msgstr "外部裝置已連接"
msgid "External drive disconnected"
msgstr "外部裝置已拔除"
#: ../js/ui/components/autorunManager.js:354
#: ../js/ui/components/autorunManager.js:351
#, javascript-format
msgid "Open with %s"
msgstr "用 %s 開啟"
@ -601,6 +624,7 @@ msgstr "再輸入一次:"
msgid "Connect"
msgstr "連線"
#. Cisco LEAP
#: ../js/ui/components/networkAgent.js:233
#: ../js/ui/components/networkAgent.js:245
#: ../js/ui/components/networkAgent.js:273
@ -609,6 +633,7 @@ msgstr "連線"
msgid "Password: "
msgstr "密碼: "
#. static WEP
#: ../js/ui/components/networkAgent.js:238
msgid "Key: "
msgstr "金鑰:"
@ -698,13 +723,13 @@ msgstr "核對"
#. Translators: "that didn't work" refers to the fact that the
#. * requested authentication was not gained; this can happen
#. * because of an authentication error (like invalid password),
#. * for instance. */
#. * for instance.
#: ../js/ui/components/polkitAgent.js:301 ../js/ui/shellMountOperation.js:383
msgid "Sorry, that didn't work. Please try again."
msgstr "抱歉,那樣沒有作用。請再試一次。"
#. Translators: this is the other person changing their old IM name to their new
#. IM name. */
#. IM name.
#: ../js/ui/components/telepathyClient.js:759
#, javascript-format
msgid "%s is now known as %s"
@ -718,13 +743,15 @@ msgstr "視窗"
msgid "Show Applications"
msgstr "顯示應用程式"
#. Translators: this is the name of the dock/favorites area on
#. the left of the overview
#: ../js/ui/dash.js:449
msgid "Dash"
msgstr "Dash"
#. Translators: This is the date format to use when the calendar popup is
#. * shown - it is shown just below the time in the shell (e.g. "Tue 9:29 AM").
#. */
#.
#: ../js/ui/dateMenu.js:73
msgid "%B %e %Y"
msgstr "%Y年%m月%e日"
@ -732,7 +759,7 @@ msgstr "%Y年%m月%e日"
#. Translators: This is the accessible name of the date button shown
#. * below the time in the shell; it should combine the weekday and the
#. * date, e.g. "Tuesday February 17 2015".
#. */
#.
#: ../js/ui/dateMenu.js:80
msgid "%A %B %e %Y"
msgstr "%Y年%m月%e日%A"
@ -854,13 +881,13 @@ msgstr "部分應用程式忙碌中或有未儲存的工作。"
msgid "Other users are logged in."
msgstr "其他使用者已登入。"
#. Translators: Remote here refers to a remote session, like a ssh login */
#. Translators: Remote here refers to a remote session, like a ssh login
#: ../js/ui/endSessionDialog.js:640
#, javascript-format
msgid "%s (remote)"
msgstr "%s (遠端)"
#. Translators: Console here refers to a tty like a VT console */
#. Translators: Console here refers to a tty like a VT console
#: ../js/ui/endSessionDialog.js:643
#, javascript-format
msgid "%s (console)"
@ -879,7 +906,7 @@ msgstr "是否從 extensions.gnome.org 下載並安裝「%s」"
msgid "Keyboard"
msgstr "鍵盤"
#. translators: 'Hide' is a verb */
#. translators: 'Hide' is a verb
#: ../js/ui/legacyTray.js:66
msgid "Hide tray"
msgstr "隱藏系統匣"
@ -892,7 +919,7 @@ msgstr "狀態圖示"
msgid "No extensions installed"
msgstr "沒有安裝擴充功能"
#. Translators: argument is an extension UUID. */
#. Translators: argument is an extension UUID.
#: ../js/ui/lookingGlass.js:697
#, javascript-format
msgid "%s has not emitted any errors."
@ -912,7 +939,7 @@ msgstr "已啟用"
#. translators:
#. * The device has been disabled
#: ../js/ui/lookingGlass.js:719 ../src/gvc/gvc-mixer-control.c:1830
#: ../js/ui/lookingGlass.js:719 ../src/gvc/gvc-mixer-control.c:1828
msgid "Disabled"
msgstr "已停用"
@ -951,25 +978,37 @@ msgstr "概覽"
#. Translators: this is the text displayed
#. in the search entry when no search is
#. active; it should not exceed ~30
#. characters. */
#. characters.
#: ../js/ui/overview.js:244
msgid "Type to search…"
msgstr "輸入以搜尋…"
#: ../js/ui/panel.js:352
#: ../js/ui/panel.js:358
msgid "Quit"
msgstr "結束"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview". */
#: ../js/ui/panel.js:404
#. in your language, you can use the word for "Overview".
#: ../js/ui/panel.js:414
msgid "Activities"
msgstr "概覽 "
#: ../js/ui/panel.js:754
#: ../js/ui/panel.js:693
#, fuzzy
#| msgid "System"
msgctxt "System menu in the top bar"
msgid "System"
msgstr "系統"
#: ../js/ui/panel.js:805
msgid "Top Bar"
msgstr "頂端列"
#. Translators: this MUST be either "toggle-switch-us"
#. (for toggle switches containing the English words
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
#. switches containing "◯" and "|"). Other values will
#. simply result in invisible toggle switches.
#: ../js/ui/popupMenu.js:289
msgid "toggle-switch-us"
msgstr "toggle-switch-us"
@ -987,7 +1026,7 @@ msgid "Restarting…"
msgstr "重新啟動…"
#. Translators: This is a time format for a date in
#. long format */
#. long format
#: ../js/ui/screenShield.js:85
msgid "%A, %B %d"
msgstr "%m月%d日%A"
@ -1012,6 +1051,13 @@ msgstr "鎖定"
msgid "GNOME needs to lock the screen"
msgstr "GNOME 需要鎖定螢幕"
#. We could not become modal, so we can't activate the
#. screenshield. The user is probably very upset at this
#. point, but any application using global grabs is broken
#. Just tell him to stop using this app
#.
#. XXX: another option is to kick the user into the gdm login
#. screen, where we're not affected by grabs
#: ../js/ui/screenShield.js:805 ../js/ui/screenShield.js:1271
msgid "Unable to lock"
msgstr "無法鎖定"
@ -1107,7 +1153,7 @@ msgstr "關閉"
msgid "Bluetooth Settings"
msgstr "藍牙設定值"
#. Translators: this is the number of connected bluetooth devices */
#. Translators: this is the number of connected bluetooth devices
#: ../js/ui/status/bluetooth.js:105
#, javascript-format
msgid "%d Connected"
@ -1154,13 +1200,13 @@ msgstr "啟用"
msgid "<unknown>"
msgstr "<不明>"
#. Translators: %s is a network identifier */
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:451 ../js/ui/status/network.js:1308
#, javascript-format
msgid "%s Off"
msgstr "%s 關閉"
#. Translators: %s is a network identifier */
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:454
#, javascript-format
msgid "%s Connected"
@ -1168,45 +1214,45 @@ msgstr "%s 已連線"
#. Translators: this is for network devices that are physically present but are not
#. under NetworkManager's control (and thus cannot be used in the menu);
#. %s is a network identifier */
#. %s is a network identifier
#: ../js/ui/status/network.js:459
#, javascript-format
msgid "%s Unmanaged"
msgstr "%s 未受管理"
#. Translators: %s is a network identifier */
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:462
#, javascript-format
msgid "%s Disconnecting"
msgstr "%s 正在斷線"
#. Translators: %s is a network identifier */
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:469 ../js/ui/status/network.js:1300
#, javascript-format
msgid "%s Connecting"
msgstr "正連線到 %s"
#. Translators: this is for network connections that require some kind of key or password; %s is a network identifier */
#. Translators: this is for network connections that require some kind of key or password; %s is a network identifier
#: ../js/ui/status/network.js:472
#, javascript-format
msgid "%s Requires Authentication"
msgstr "%s 需要核對"
#. Translators: this is for devices that require some kind of firmware or kernel
#. module, which is missing; %s is a network identifier */
#. module, which is missing; %s is a network identifier
#: ../js/ui/status/network.js:480
#, javascript-format
msgid "Firmware Missing For %s"
msgstr "缺少 %s 韌體"
#. Translators: this is for a network device that cannot be activated (for example it
#. is disabled by rfkill, or it has no coverage; %s is a network identifier */
#. is disabled by rfkill, or it has no coverage; %s is a network identifier
#: ../js/ui/status/network.js:484
#, javascript-format
msgid "%s Unavailable"
msgstr "%s 無法使用"
#. Translators: %s is a network identifier */
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:487
#, javascript-format
msgid "%s Connection Failed"
@ -1220,14 +1266,14 @@ msgstr "有線設定值"
msgid "Mobile Broadband Settings"
msgstr "行動寬頻設定值"
#. Translators: %s is a network identifier */
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:588 ../js/ui/status/network.js:1305
#, javascript-format
msgid "%s Hardware Disabled"
msgstr "%s 硬體已停用"
#. Translators: this is for a network device that cannot be activated
#. because it's disabled by rfkill (airplane mode); %s is a network identifier */
#. because it's disabled by rfkill (airplane mode); %s is a network identifier
#: ../js/ui/status/network.js:592
#, javascript-format
msgid "%s Disabled"
@ -1289,13 +1335,13 @@ msgstr "Wi-Fi 設定值"
msgid "Turn On"
msgstr "開啟"
#. Translators: %s is a network identifier */
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:1296
#, javascript-format
msgid "%s Hotspot Active"
msgstr "%s 熱點有效"
#. Translators: %s is a network identifier */
#. Translators: %s is a network identifier
#: ../js/ui/status/network.js:1311
#, javascript-format
msgid "%s Not Connected"
@ -1305,7 +1351,7 @@ msgstr "%s 未連線"
msgid "connecting..."
msgstr "連線中…"
#. Translators: this is for network connections that require some kind of key or password */
#. Translators: this is for network connections that require some kind of key or password
#: ../js/ui/status/network.js:1414
msgid "authentication required"
msgstr "要求核對"
@ -1346,20 +1392,27 @@ msgstr "電源設定值"
msgid "Fully Charged"
msgstr "已完全充飽"
#. 0 is reported when UPower does not have enough data
#. to estimate battery life
#: ../js/ui/status/power.js:72 ../js/ui/status/power.js:78
msgid "Estimating…"
msgstr "評估中…"
#. Translators: this is <hours>:<minutes> Remaining (<percentage>)
#: ../js/ui/status/power.js:86
#, javascript-format
msgid "%d%02d Remaining (%d%%)"
msgstr "剩餘時間 %d%02d (%d%%)"
#. Translators: this is <hours>:<minutes> Until Full (<percentage>)
#: ../js/ui/status/power.js:91
#, javascript-format
msgid "%d%02d Until Full (%d%%)"
msgstr "直到充滿還需 %d%02d (%d%%)"
#. The menu only appears when airplane mode is on, so just
#. statically build it as if it was on, rather than dynamically
#. changing the menu contents.
#: ../js/ui/status/rfkill.js:88
msgid "Airplane Mode On"
msgstr "飛安模式已開啟"
@ -1427,7 +1480,7 @@ msgstr "您想要保留這些顯示器設定值嗎?"
#. Translators: this and the following message should be limited in lenght,
#. to avoid ellipsizing the labels.
#. */
#.
#: ../js/ui/windowManager.js:82
msgid "Revert Settings"
msgstr "還原設定值"
@ -1443,7 +1496,7 @@ msgid_plural "Settings changes will revert in %d seconds"
msgstr[0] "設定值的變更會在 %d 秒內還原"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height. */
#. * the width of the window and the second is the height.
#: ../js/ui/windowManager.js:658
#, javascript-format
msgid "%d x %d"
@ -1499,11 +1552,11 @@ msgstr "將工作區下移"
#: ../js/ui/windowMenu.js:136
msgid "Move to Monitor Up"
msgstr "將工作區上移"
msgstr "移至螢幕上端"
#: ../js/ui/windowMenu.js:142
msgid "Move to Monitor Down"
msgstr "將工作區下移"
msgstr "移至螢幕下端"
#: ../js/ui/windowMenu.js:148
msgid "Move to Monitor Left"
@ -1519,7 +1572,7 @@ msgstr "Evolution 行事曆"
#. translators:
#. * The number of sound outputs on a particular device
#: ../src/gvc/gvc-mixer-control.c:1837
#: ../src/gvc/gvc-mixer-control.c:1835
#, c-format
msgid "%u Output"
msgid_plural "%u Outputs"
@ -1527,38 +1580,38 @@ msgstr[0] "%u 輸出"
#. translators:
#. * The number of sound inputs on a particular device
#: ../src/gvc/gvc-mixer-control.c:1847
#: ../src/gvc/gvc-mixer-control.c:1845
#, c-format
msgid "%u Input"
msgid_plural "%u Inputs"
msgstr[0] "%u 輸入"
#: ../src/gvc/gvc-mixer-control.c:2373
#: ../src/gvc/gvc-mixer-control.c:2371
msgid "System Sounds"
msgstr "系統音效"
#: ../src/main.c:373
#: ../src/main.c:381
msgid "Print version"
msgstr "顯示版本"
#: ../src/main.c:379
#: ../src/main.c:387
msgid "Mode used by GDM for login screen"
msgstr "GDM 在登入畫面使用的模式"
#: ../src/main.c:385
#: ../src/main.c:393
msgid "Use a specific mode, e.g. \"gdm\" for login screen"
msgstr "使用指定的模式例如「gdm」為登入畫面"
#: ../src/main.c:391
#: ../src/main.c:399
msgid "List possible modes"
msgstr "列出可能的模式"
#: ../src/shell-app.c:239
#: ../src/shell-app.c:246
msgctxt "program"
msgid "Unknown"
msgstr "不明"
#: ../src/shell-app.c:480
#: ../src/shell-app.c:487
#, c-format
msgid "Failed to launch “%s”"
msgstr "無法啟動「%s」"

View File

@ -867,7 +867,12 @@ update_scale_factor (GtkSettings *settings,
{
g_object_set (context, "scale-factor", g_value_get_int (&value), NULL);
if (meta_is_wayland_compositor ())
g_object_set (clutter_settings_get_default (), "font-dpi", 96 * 1024 * g_value_get_int (&value), NULL);
{
int xft_dpi;
g_object_get (settings, "gtk-xft-dpi", &xft_dpi, NULL);
g_object_set (clutter_settings_get_default (), "font-dpi", xft_dpi, NULL);
}
}
/* Make sure clutter and gdk scaling stays disabled */

View File

@ -562,6 +562,24 @@ layout_notify (GObject *object,
g_object_notify (self, prop_name);
}
static void
on_layout_manager_notify (GObject *object,
GParamSpec *pspec,
gpointer user_data)
{
ClutterActor *actor = CLUTTER_ACTOR (object);
ClutterLayoutManager *layout = clutter_actor_get_layout_manager (actor);
g_warn_if_fail (CLUTTER_IS_BOX_LAYOUT (layout));
if (layout == NULL)
return;
g_signal_connect_swapped (layout, "layout-changed",
G_CALLBACK (clutter_actor_queue_relayout), actor);
g_signal_connect (layout, "notify", G_CALLBACK (layout_notify), object);
}
static void
st_box_layout_class_init (StBoxLayoutClass *klass)
{
@ -614,14 +632,11 @@ st_box_layout_class_init (StBoxLayoutClass *klass)
static void
st_box_layout_init (StBoxLayout *self)
{
ClutterLayoutManager *layout;
self->priv = BOX_LAYOUT_PRIVATE (self);
layout = clutter_box_layout_new ();
g_signal_connect_swapped (layout, "layout-changed",
G_CALLBACK (clutter_actor_queue_relayout), self);
g_signal_connect (layout, "notify", G_CALLBACK (layout_notify), self);
clutter_actor_set_layout_manager (CLUTTER_ACTOR (self), layout);
g_signal_connect (self, "notify::layout-manager",
G_CALLBACK (on_layout_manager_notify), NULL);
clutter_actor_set_layout_manager (CLUTTER_ACTOR (self), clutter_box_layout_new ());
}
/**

View File

@ -211,7 +211,7 @@ calculate_gaussian_kernel (gdouble sigma,
{
gdouble *ret, sum;
gdouble exp_divisor;
guint half, i;
int half, i;
g_return_val_if_fail (sigma > 0, NULL);
@ -223,14 +223,14 @@ calculate_gaussian_kernel (gdouble sigma,
exp_divisor = 2 * sigma * sigma;
/* n_values of 1D Gauss function */
for (i = 0; i < n_values; i++)
for (i = 0; i < (int)n_values; i++)
{
ret[i] = exp (-(i - half) * (i - half) / exp_divisor);
sum += ret[i];
}
/* normalize */
for (i = 0; i < n_values; i++)
for (i = 0; i < (int)n_values; i++)
ret[i] /= sum;
return ret;
@ -512,7 +512,12 @@ _st_create_shadow_cairo_pattern (StShadow *shadow_spec,
g_return_val_if_fail (shadow_spec != NULL, NULL);
g_return_val_if_fail (src_pattern != NULL, NULL);
cairo_pattern_get_surface (src_pattern, &src_surface);
if (cairo_pattern_get_surface (src_pattern, &src_surface) != CAIRO_STATUS_SUCCESS)
/* The most likely reason we can't get the pattern is that sizing went hairwire
* and the caller tried to create a surface too big for memory, leaving us with
* a pattern in an error state; we return a transparent pattern for the shadow.
*/
return cairo_pattern_create_rgba(1.0, 1.0, 1.0, 0.0);
width_in = cairo_image_surface_get_width (src_surface);
height_in = cairo_image_surface_get_height (src_surface);

View File

@ -741,7 +741,11 @@ paint_shadow_pattern_to_cairo_context (StShadow *shadow_spec,
/* Then subtract out the bounds of the surface in the surface
* pattern; we transform the context by the inverse of the
* pattern matrix to get to surface coordinates */
cairo_pattern_get_surface (pattern, &surface);
if (cairo_pattern_get_surface (pattern, &surface) != CAIRO_STATUS_SUCCESS)
/* Something went wrong previously */
goto no_surface;
width = cairo_image_surface_get_width (surface);
height = cairo_image_surface_get_height (surface);
@ -752,6 +756,7 @@ paint_shadow_pattern_to_cairo_context (StShadow *shadow_spec,
cairo_rectangle (cr, 0, height, width, - height);
cairo_fill (cr);
no_surface:
cairo_restore (cr);
}
@ -2145,7 +2150,7 @@ st_theme_node_prerender_shadow (StThemeNodePaintState *state)
guint border_radius[4];
int max_borders[4];
int center_radius, corner_id;
CoglHandle buffer, offscreen;
CoglHandle buffer, offscreen = COGL_INVALID_HANDLE;
/* Get infos from the node */
if (state->alloc_width < node->box_shadow_min_width ||
@ -2186,6 +2191,7 @@ st_theme_node_prerender_shadow (StThemeNodePaintState *state)
state->box_shadow_height,
COGL_TEXTURE_NO_SLICING,
COGL_PIXEL_FORMAT_ANY);
if (buffer != COGL_INVALID_HANDLE)
offscreen = cogl_offscreen_new_to_texture (buffer);
if (offscreen != COGL_INVALID_HANDLE)
@ -2206,6 +2212,8 @@ st_theme_node_prerender_shadow (StThemeNodePaintState *state)
state->box_shadow_material = _st_create_shadow_pipeline (st_theme_node_get_box_shadow (node),
buffer);
}
if (buffer != COGL_INVALID_HANDLE)
cogl_handle_unref (buffer);
}