Compare commits

..

2 Commits

Author SHA1 Message Date
969db82f5a shell-app: Finish startup sequence for process that exit too early
If a process associated to an application declaring StartupNotify=true
in its desktop file exits before having ever mapped a top level window,
the "remove" X message expected as per the Startup Notification Spec [1]
won't ever be issued, and the shell will keep waiting for a while until
the sequence is finished on time out.

This provides a confusing and bad experience since things like a confusing
icon + a spinner, or the mouse pointer switching to a spinning cursor, will
be showing up in the meantime, so we need to detect those situations and
make sure the sequence gets completed, and the app moved to STOPPED.

[1] https://www.freedesktop.org/wiki/Specifications/startup-notification-spec

Closes: #267
2018-05-17 17:10:05 +01:00
6ee13ff685 window-tracker: Add new public method shell_startup_sequence_complete()
We need to provide a wrapper for sn_startup_sequence_complete() from libsn,
so that's there's a way to make sure that the startup sequence gets always
finished, even if the launched process exits early without an error code
before ever having mapped a top level window (i.e. gnome-control-center).

Closes: #267
2018-05-17 17:09:57 +01:00
24 changed files with 607 additions and 574 deletions

0
AUTHORS Normal file
View File

View File

@ -1,16 +1,19 @@
# Coding guide
Coding guide
============
Our goal is to have all JavaScript code in GNOME follow a consistent style. In
a dynamic language like JavaScript, it is essential to be rigorous about style
(and unit tests), or you rapidly end up with a spaghetti-code mess.
## A quick note
A quick note
------------
Life isn't fun if you can't break the rules. If a rule seems unnecessarily
restrictive while you're coding, ignore it, and let the patch reviewer decide
what to do.
## Indentation and whitespace
Indentation and whitespace
--------------------------
Use four-space indents. Braces are on the same line as their associated
statements. You should only omit braces if *both* sides of the statement are
@ -19,7 +22,7 @@ on one line.
* One space after the `function` keyword. No space between the function name
* in a declaration or a call. One space before the parens in the `if`
* statements, or `while`, or `for` loops.
```javascript
function foo(a, b) {
let bar;
@ -36,20 +39,22 @@ on one line.
print(20);
}
}
```
## Semicolons
Semicolons
----------
JavaScript allows omitting semicolons at the end of lines, but don't. Always
end statements with a semicolon.
## js2-mode
js2-mode
--------
If using Emacs, do not use js2-mode. It is outdated and hasn't worked for a
while. emacs now has a built-in JavaScript mode, js-mode, based on
espresso-mode. It is the de facto emacs mode for JavaScript.
## File naming and creation
File naming and creation
------------------------
For JavaScript files, use lowerCamelCase-style names, with a `.js` extension.
@ -62,13 +67,14 @@ library name followed by a dash, e.g. `shell-app-system.c`. Create a
`-private.h` header when you want to share code internally in the
library. These headers are not installed, distributed or introspected.
## Imports
Imports
-------
Use UpperCamelCase when importing modules to distinguish them from ordinary
variables, e.g.
```javascript
const GLib = imports.gi.GLib;
```
Imports should be categorized into one of two places. The top-most import block
should contain only "environment imports". These are either modules from
gobject-introspection or modules added by gjs itself.
@ -79,7 +85,7 @@ e.g. `imports.ui.popupMenu`.
Each import block should be sorted alphabetically. Don't import modules you
don't use.
```javascript
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const Lang = imports.lang;
@ -89,22 +95,23 @@ don't use.
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const Util = imports.misc.util;
```
The alphabetical ordering should be done independently of the location of the
location. Never reference `imports` in actual code.
## Constants
Constants
---------
We use CONSTANTS_CASE to define constants. All constants should be directly
under the imports:
```javascript
const MY_DBUS_INTERFACE = 'org.my.Interface';
```
## Variable declaration
const MY_DBUS_INTERFACE = 'org.my.Interface';
Variable declaration
--------------------
Always use either `const` or `let` when defining a variable.
```javascript
// Iterating over an array
for (let i = 0; i < arr.length; ++i) {
let item = arr[i];
@ -114,17 +121,17 @@ Always use either `const` or `let` when defining a variable.
for (let prop in someobj) {
...
}
```
If you use "var" then the variable is added to function scope, not block scope.
See [What's new in JavaScript 1.7](https://developer.mozilla.org/en/JavaScript/New_in_JavaScript/1.7#Block_scope_with_let_%28Merge_into_let_Statement%29)
## Classes
Classes
-------
There are many approaches to classes in JavaScript. We use our own class framework
(sigh), which is built in gjs. The advantage is that it supports inheriting from
GObjects, although this feature isn't used very often in the Shell itself.
```javascript
var IconLabelMenuItem = new Lang.Class({
Name: 'IconLabelMenuItem',
Extends: PopupMenu.PopupMenuBaseItem,
@ -139,7 +146,6 @@ GObjects, although this feature isn't used very often in the Shell itself.
log("menu opened!");
}
});
```
* 'Name' is required. 'Extends' is optional. If you leave it out, you will
automatically inherit from Object.
@ -156,12 +162,13 @@ GObjects, although this feature isn't used very often in the Shell itself.
still a giant function call, even though it may resemble a more
conventional syntax.
## GObject Introspection
GObject Introspection
---------------------
GObject Introspection is a powerful feature that allows us to have native
bindings for almost any library built around GObject. If a library requires
you to inherit from a type to use it, you can do so:
```javascript
var MyClutterActor = new Lang.Class({
Name: 'MyClutterActor',
Extends: Clutter.Actor,
@ -181,9 +188,9 @@ you to inherit from a type to use it, you can do so:
alloc.x2, alloc.y2);
}
});
```
## Translatable strings, `environment.js`
Translatable strings, `environment.js`
--------------------------------------
We use gettext to translate the GNOME Shell into all the languages that GNOME
supports. The `gettext` function is aliased globally as `_`, you do not need to
@ -197,7 +204,8 @@ and "double quotes" for strings that the user may see. This allows us to
quickly find untranslated or mistranslated strings by grepping through the
sources for double quotes without a gettext call around them.
## `actor` and `_delegate`
`actor` and `_delegate`
-----------------------
gjs allows us to set so-called "expando properties" on introspected objects,
allowing us to treat them like any other. Because the Shell was built before
@ -206,7 +214,7 @@ that has a property called `actor`. We call this wrapper class the "delegate".
We sometimes use expando properties to set a property called `_delegate` on
the actor itself:
```javascript
var MyClass = new Lang.Class({
Name: 'MyClass',
@ -221,7 +229,6 @@ the actor itself:
actor.set_label("You clicked the button!");
}
});
```
The 'delegate' property is important for anything which trying to get the
delegate object from an associated actor. For instance, the drag and drop
@ -229,14 +236,16 @@ system calls the `handleDragOver` function on the delegate of a "drop target"
when the user drags an item over it. If you do not set the `_delegate`
property, your actor will not be able to be dropped onto.
## Functional style
Functional style
----------------
JavaScript Array objects offer a lot of common functional programming
capabilities such as forEach, map, filter and so on. You can use these when
they make sense, but please don't have a spaghetti mess of function programming
messed in a procedural style. Use your best judgment.
## Closures
Closures
--------
`this` will not be captured in a closure, it is relative to how the closure is
invoked, not to the value of this where the closure is created, because "this"
@ -245,16 +254,15 @@ variable that can be captured in closures.
All closures should be wrapped with Function.prototype.bind or use arrow
notation.
```javascript
const Lang = imports.lang;
let closure1 = () => { this._fnorbate(); };
let closure2 = this._fnorbate.bind(this);
```
A more realistic example would be connecting to a signal on a method of a
prototype:
```javascript
const Lang = imports.lang;
const FnorbLib = imports.fborbLib;
@ -268,21 +276,19 @@ prototype:
this._updateFnorb();
}
});
```
## Object literal syntax
Object literal syntax
---------------------
In JavaScript, these are equivalent:
```javascript
foo = { 'bar': 42 };
foo = { bar: 42 };
```
and so are these:
```javascript
var b = foo['bar'];
var b = foo.bar;
```
If your usage of an object is like an object, then you're defining "member
variables." For member variables, use the no-quotes no-brackets syntax: `{ bar:
@ -292,13 +298,14 @@ If your usage of an object is like a hash table (and thus conceptually the keys
can have special chars in them), don't use quotes, but use brackets: `{ bar: 42
}`, `foo['bar']`.
## Getters, setters, and Tweener
Getters, setters, and Tweener
-----------------------------
Getters and setters should be used when you are dealing with an API that is
designed around setting properties, like Tweener. If you want to animate an
arbitrary property, create a getter and setter, and use Tweener to animate the
property.
```javascript
var ANIMATION_TIME = 2000;
var MyClass = new Lang.Class({
@ -324,4 +331,3 @@ property.
{ position: 100,
time: ANIMATION_TIME,
transition: 'easeOutQuad' });
```

7
MAINTAINERS Normal file
View File

@ -0,0 +1,7 @@
Owen Taylor
E-mail: otaylor@redhat.com
Userid: otaylor
Colin Walters
E-mail: walters@verbum.org
Userid: walters

18
NEWS
View File

@ -1,21 +1,3 @@
3.29.2
======
* Guard against untimely keyboard map changes [Carlos; #240]
* Fix icons in search provider results [Florian; #249]
* Fix blurriness of OSD under some resolutions [Silvère; #782011]
* Fix lagging pointer when zoomed [Daniel; #682013]
* Misc. bug fixes [Milan, Xiaoguang, Florian, Mario, Ole; #244, #787871,
#781471, #136, #214, #294]
Contributors:
Ole Jørgen Brønner, Milan Crha, Carlos Garnacho, Yussuf Khalil,
Silvère Latchurié, Florian Müllner, Mario Sanchez Prada, Ray Strode,
Daniel van Vugt, Xiaoguang Wang
Translators:
Rafael Fontenelle [pt_BR], Kukuh Syafaat [id], Marcos Lans [gl],
Anders Jonsson [sv], Mingcong Bai [zh_CN]
3.29.1
======
* Support icons in app-menu [Florian; #760985]

View File

@ -1,4 +1,3 @@
# GNOME Shell
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
@ -7,14 +6,15 @@ easy to use experience.
For more information about GNOME Shell, including instructions on how
to build GNOME Shell from source and how to get involved with the project,
see the [project wiki][wiki]
see:
Bugs should be reported to the GNOME [bug tracking system][bug-tracker].
https://wiki.gnome.org/Projects/GnomeShell
## License
Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell'
product.
License
=======
GNOME Shell is distributed under the terms of the GNU General Public License,
version 2 or later. See the [COPYING][license] file for details.
version 2 or later. See the COPYING file for details.
[project-wiki]: https://wiki.gnome.org/Projects/GnomeShell
[bug-tracker]: https://gitlab.gnome.org/GNOME/gnome-shell/issues
[license]: COPYING

View File

@ -4,14 +4,14 @@ 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 to the GNOME [bug tracking system][bug-tracker].
Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell'
product.
## License
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/
[bug-tracker]: https://gitlab.gnome.org/GNOME/gnome-shell/issues

3
data/theme/HACKING Normal file
View File

@ -0,0 +1,3 @@
To generate the css files, from the project directory:
sass --sourcemap=none --update .

31
data/theme/README Normal file
View File

@ -0,0 +1,31 @@
Summary
-------
* Do not edit the CSS directly, edit the source SCSS files and the CSS files will be generated
automatically when building with meson + ninja and left inside the build directory to be
incorporated into the gresource XML (you'll need to have sassc installed).
How to tweak the theme
----------------------
Adwaita is a complex theme, so to keep it maintainable it's written and processed in SASS, the
generated CSS is then transformed into a gresource file during gtk build and used at runtime in a
non-legible or editable form.
It is very likely your change will happen in the _common.scss file. That's where all the widget
selectors are defined. Here's a rundown of the "supporting" stylesheets, that are unlikely to be the
right place for a drive by stylesheet fix:
_colors.scss - global color definitions. We keep the number of defined colors to a necessary minimum,
most colors are derived from a handful of basics. It is an exact copy of the gtk+
counterpart. Light theme is used for the classic theme and dark is for GNOME3 shell
default.
_drawing.scss - drawing helper mixings/functions to allow easier definition of widget drawing under
specific context. This is why Adwaita isn't 15000 LOC.
_common.scss - actual definitions of style for each widget. This is where you are likely to add/remove
your changes.
You can read about SASS at http://sass-lang.com/documentation/. Once you make your changes to the
_common.scss file, you can run ninja to generate the final CSS files.

View File

@ -1,32 +0,0 @@
## Summary
Do not edit the CSS directly, edit the source SCSS files and the CSS files
will be generated automatically when building with meson + ninja and left
inside the build directory to be incorporated into the gresource XML (you'll
need to have sassc installed).
## How to tweak the theme
Adwaita is a complex theme, so to keep it maintainable it's written and
processed in SASS, the generated CSS is then transformed into a gresource
file during gtk build and used at runtime in a non-legible or editable form.
It is very likely your change will happen in the [_common.scss][common] file.
That's where all the widget selectors are defined. Here's a rundown of
the "supporting" stylesheets, that are unlikely to be the right place
for a drive by stylesheet fix:
| File | Description |
| ------------------------ | ----------------- |
| [_colors.scss][colors] | global color definitions. We keep the number of defined colors to a necessary minimum, most colors are derived from a handful of basics. It is an exact copy of the gtk+ counterpart. Light theme is used for the classic theme and dark is for GNOME3 shell default. |
| [_drawing.scss][drawing] | drawing helper mixings/functions to allow easier definition of widget drawing under specific context. This is why Adwaita isn't 15000 LOC. |
| [_common.scss][common] | actual definitions of style for each widget. This is where you are likely to add/remove your changes. |
You can read about SASS on its [web page][sass-web]. Once you make your
changes to the [_common.scss][common] file, you can run ninja to generate the
final CSS files.
[common]: data/theme/gnome-shell-sass/_common.scss
[colors]: data/theme/gnome-shell-sass/_colors.scss
[drawing]: data/theme/gnome-shell-sass/_drawing.scss
[sass-web]: http://sass-lang.com/documentation/

View File

@ -0,0 +1,6 @@
--- Generating the css file ---
You need sass to generate the css file.
To generate them run from a command line in the project directory:
sass --sourcemap=none --update ./

View File

@ -0,0 +1,7 @@
GNOME Shell Sass is a project intended to allow the sharing of the theme sources in sass between gnome-shell and other projects like gnome-shell-extensions.
License
=======
GNOME Shell Sass is distributed under the terms of the GNU General Public License,
version 2 or later. See the COPYING file for details.

View File

@ -1,16 +0,0 @@
# GNOME Shell Sass
GNOME Shell Sass is a project intended to allow the sharing of the
theme sources in sass between gnome-shell and other projects like
gnome-shell-extensions.
Any changes should be done in the [GNOME Shell subtree][shell-subtree]
and not the stand-alone [gnome-shell-sass repository][sass-repo]. They
will then be synchronized periodically before releases.
## License
GNOME Shell Sass is distributed under the terms of the GNU General Public
License, version 2 or later. See the [COPYING][license] file for details.
[shell-subtree]: https://gitlab.gnome.org/GNOME/gnome-shell/tree/master/data/theme/gnome-shell-sass
[sass-repo]: https://gitlab.gnome.org/GNOME/gnome-shell-sass
[license]: COPYING

View File

@ -19,6 +19,7 @@ const MagnifierDBus = imports.ui.magnifierDBus;
const Params = imports.misc.params;
const PointerWatcher = imports.ui.pointerWatcher;
var MOUSE_POLL_FREQUENCY = 50;
var CROSSHAIRS_CLIP_SIZE = [100, 100];
var NO_CHANGE = 0.0;
@ -151,10 +152,8 @@ var Magnifier = new Lang.Class({
* Turn on mouse tracking, if not already doing so.
*/
startTrackingMouse() {
if (!this._pointerWatch) {
let interval = 1000 / Clutter.get_default_frame_rate();
this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(interval, this.scrollToMousePos.bind(this));
}
if (!this._pointerWatch)
this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(MOUSE_POLL_FREQUENCY, this.scrollToMousePos.bind(this));
},
/**

View File

@ -27,7 +27,6 @@ function _fixMarkup(text, allowMarkup) {
// Support <b>, <i>, and <u>, escape anything else
// so it displays as raw markup.
// Ref: https://developer.gnome.org/notification-spec/#markup
_text = _text.replace(/<(?!\/?[biu]>)/g, '&lt;');
try {

View File

@ -315,10 +315,10 @@ var NotificationApplicationPolicy = new Lang.Class({
// You can add a secondary icon to the banner with 'secondaryGIcon'. There
// is no fallback for this icon.
//
// If @params contains 'bannerMarkup', with the value %true, a subset (<b>,
// <i> and <u>) of the markup in [1] will be interpreted within @banner. If
// the parameter is not present, then anything that looks like markup
// in @banner will appear literally in the output.
// If @params contains 'bannerMarkup', with the value %true, then
// the corresponding element is assumed to use pango markup. If the
// parameter is not present for an element, then anything that looks
// like markup in that element will appear literally in the output.
//
// If @params contains a 'clear' parameter with the value %true, then
// the content and the action area of the notification will be cleared.
@ -328,8 +328,6 @@ var NotificationApplicationPolicy = new Lang.Class({
// If @params contains 'soundName' or 'soundFile', the corresponding
// event sound is played when the notification is shown (if the policy for
// @source allows playing sounds).
//
// [1] https://developer.gnome.org/notification-spec/#markup
var Notification = new Lang.Class({
Name: 'Notification',

View File

@ -1944,7 +1944,6 @@ var NMApplet = new Lang.Class({
this.indicators.visible = this._client.nm_running;
this.menu.actor.visible = this._client.networking_enabled;
this._updateIcon();
this._syncConnectivity();
},

View File

@ -1,5 +1,5 @@
project('gnome-shell', 'c',
version: '3.29.2',
version: '3.29.1',
meson_version: '>= 0.42.0',
license: 'GPLv2+'
)
@ -23,7 +23,7 @@ gi_req = '>= 1.49.1'
gjs_req = '>= 1.47.0'
gtk_req = '>= 3.15.0'
json_glib_req = '>= 0.13.2'
mutter_req = '>= 3.29.2'
mutter_req = '>= 3.29.1'
polkit_req = '>= 0.100'
schemas_req = '>= 3.21.3'
startup_req = '>= 0.11'

418
po/gl.po

File diff suppressed because it is too large Load Diff

368
po/id.po

File diff suppressed because it is too large Load Diff

View File

@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
"PO-Revision-Date: 2018-05-20 19:24+0200\n"
"POT-Creation-Date: 2018-02-21 14:13+0000\n"
"PO-Revision-Date: 2018-02-22 15:56+0100\n"
"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
@ -20,7 +20,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.0.7\n"
"X-Generator: Poedit 2.0.6\n"
#: data/50-gnome-shell-system.xml:6
msgid "System"
@ -332,7 +332,7 @@ msgid "There was an error loading the preferences dialog for %s:"
msgstr "Det uppstod ett fel vid inläsning av inställningsdialogen för %s:"
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
msgid "Cancel"
@ -652,12 +652,12 @@ msgstr "Lägg till som favorit"
msgid "Show Details"
msgstr "Visa detaljer"
#: js/ui/appFavorites.js:140
#: js/ui/appFavorites.js:138
#, javascript-format
msgid "%s has been added to your favorites."
msgstr "%s har lagts till i dina favoriter."
#: js/ui/appFavorites.js:174
#: js/ui/appFavorites.js:172
#, javascript-format
msgid "%s has been removed from your favorites."
msgstr "%s har tagits bort från dina favoriter."
@ -852,7 +852,7 @@ msgstr "Extern disk frånkopplad"
msgid "Open with %s"
msgstr "Öppna med %s"
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
msgid "Password:"
msgstr "Lösenord:"
@ -940,15 +940,15 @@ msgstr "Ett lösenord krävs för att ansluta till ”%s”."
msgid "Network Manager"
msgstr "Nätverkshanterare"
#: js/ui/components/polkitAgent.js:48
#: js/ui/components/polkitAgent.js:43
msgid "Authentication Required"
msgstr "Autentisering krävs"
#: js/ui/components/polkitAgent.js:76
#: js/ui/components/polkitAgent.js:71
msgid "Administrator"
msgstr "Administratör"
#: js/ui/components/polkitAgent.js:156
#: js/ui/components/polkitAgent.js:151
msgid "Authenticate"
msgstr "Autentisera"
@ -956,7 +956,7 @@ msgstr "Autentisera"
#. * requested authentication was not gained; this can happen
#. * because of an authentication error (like invalid password),
#. * for instance.
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
msgid "Sorry, that didnt work. Please try again."
msgstr "Tyvärr, det fungerade inte. Försök igen."
@ -1004,7 +1004,7 @@ msgstr "Lägg till världsklockor…"
msgid "World Clocks"
msgstr "Världsklockor"
#: js/ui/dateMenu.js:227
#: js/ui/dateMenu.js:225
msgid "Weather"
msgstr "Väder"
@ -1012,7 +1012,7 @@ msgstr "Väder"
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:291
#: js/ui/dateMenu.js:289
#, javascript-format
msgid "%s all day."
msgstr "%s hela dagen."
@ -1021,7 +1021,7 @@ msgstr "%s hela dagen."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:297
#: js/ui/dateMenu.js:295
#, javascript-format
msgid "%s, then %s later."
msgstr "%s, sedan %s senare."
@ -1030,30 +1030,30 @@ msgstr "%s, sedan %s senare."
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:303
#: js/ui/dateMenu.js:301
#, javascript-format
msgid "%s, then %s, followed by %s later."
msgstr "%s, sedan %s, följt av %s senare."
#: js/ui/dateMenu.js:314
#: js/ui/dateMenu.js:312
msgid "Select a location…"
msgstr "Välj en plats…"
#: js/ui/dateMenu.js:317
#: js/ui/dateMenu.js:315
msgid "Loading…"
msgstr "Läser in…"
#. Translators: %s is a temperature with unit, e.g. "23℃"
#: js/ui/dateMenu.js:323
#: js/ui/dateMenu.js:321
#, javascript-format
msgid "Feels like %s."
msgstr "Känns som %s."
#: js/ui/dateMenu.js:326
#: js/ui/dateMenu.js:324
msgid "Go online for weather information"
msgstr "Anslut till nätet för väderinformation"
#: js/ui/dateMenu.js:328
#: js/ui/dateMenu.js:326
msgid "Weather information is currently unavailable"
msgstr "Väderinformation är för närvarande inte tillgänglig"
@ -1953,16 +1953,16 @@ msgstr "Vänteläge"
msgid "Power Off"
msgstr "Stäng av"
#: js/ui/status/thunderbolt.js:294
#: js/ui/status/thunderbolt.js:272
msgid "Thunderbolt"
msgstr "Thunderbolt"
#. we are done
#: js/ui/status/thunderbolt.js:350
#: js/ui/status/thunderbolt.js:328
msgid "Unknown Thunderbolt device"
msgstr "Okänd Thunderbolt-enhet"
#: js/ui/status/thunderbolt.js:351
#: js/ui/status/thunderbolt.js:329
msgid ""
"New device has been detected while you were away. Please disconnect and "
"reconnect the device to start using it."
@ -1970,13 +1970,13 @@ msgstr ""
"En ny enhet har upptäckts medan du var borta. Koppla från och anslut enheten "
"igen för att börja använda den."
#: js/ui/status/thunderbolt.js:356
#: js/ui/status/thunderbolt.js:334
msgid "Thunderbolt authorization error"
msgstr "Thunderbolt-auktoriseringsfel"
#: js/ui/status/thunderbolt.js:357
#: js/ui/status/thunderbolt.js:335
#, javascript-format
msgid "Could not authorize the Thunderbolt device: %s"
msgid "Could not authorize the thunderbolt device: %s"
msgstr "Kunde inte auktorisera Thunderbolt-enheten: %s"
#: js/ui/status/volume.js:128

View File

@ -23,16 +23,16 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
"PO-Revision-Date: 2018-05-10 12:11-0500\n"
"Last-Translator: Mingcong Bai <jeffbai@aosc.xyz>\n"
"POT-Creation-Date: 2018-03-05 21:11+0000\n"
"PO-Revision-Date: 2018-02-15 01:42+0800\n"
"Last-Translator: Dingzhong Chen <wsxy162@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.0.6\n"
"X-Generator: Gtranslator 2.91.7\n"
#: data/50-gnome-shell-system.xml:6
msgid "System"
@ -320,7 +320,7 @@ msgid "There was an error loading the preferences dialog for %s:"
msgstr "载入 %s 的首选项对话框时出错:"
#: js/gdm/authPrompt.js:147 js/ui/audioDeviceSelection.js:71
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:153
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:148
#: js/ui/endSessionDialog.js:482 js/ui/extensionDownloader.js:197
#: js/ui/shellMountOperation.js:343 js/ui/status/network.js:919
msgid "Cancel"
@ -631,12 +631,12 @@ msgstr "添加到收藏夹"
msgid "Show Details"
msgstr "显示细节"
#: js/ui/appFavorites.js:140
#: js/ui/appFavorites.js:138
#, javascript-format
msgid "%s has been added to your favorites."
msgstr "%s 已经添加到了您的收藏夹。"
#: js/ui/appFavorites.js:174
#: js/ui/appFavorites.js:172
#, javascript-format
msgid "%s has been removed from your favorites."
msgstr "%s 已经从您的收藏夹移除。"
@ -829,7 +829,7 @@ msgstr "外部驱动器已断开"
msgid "Open with %s"
msgstr "使用 %s 打开"
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:284
msgid "Password:"
msgstr "密码:"
@ -915,15 +915,15 @@ msgstr "连接到“%s”需要密码。"
msgid "Network Manager"
msgstr "网络管理器"
#: js/ui/components/polkitAgent.js:48
#: js/ui/components/polkitAgent.js:43
msgid "Authentication Required"
msgstr "需要认证"
#: js/ui/components/polkitAgent.js:76
#: js/ui/components/polkitAgent.js:71
msgid "Administrator"
msgstr "管理员"
#: js/ui/components/polkitAgent.js:156
#: js/ui/components/polkitAgent.js:151
msgid "Authenticate"
msgstr "认证"
@ -932,7 +932,7 @@ msgstr "认证"
#. * requested authentication was not gained; this can happen
#. * because of an authentication error (like invalid password),
#. * for instance.
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
#: js/ui/components/polkitAgent.js:270 js/ui/shellMountOperation.js:327
msgid "Sorry, that didnt work. Please try again."
msgstr "抱歉,认证失败。请重试。"
@ -980,7 +980,7 @@ msgstr "添加世界时钟…"
msgid "World Clocks"
msgstr "世界时钟"
#: js/ui/dateMenu.js:227
#: js/ui/dateMenu.js:225
msgid "Weather"
msgstr "天气"
@ -988,7 +988,7 @@ msgstr "天气"
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:291
#: js/ui/dateMenu.js:289
#, javascript-format
msgid "%s all day."
msgstr "全天%s。"
@ -997,7 +997,7 @@ msgstr "全天%s。"
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:297
#: js/ui/dateMenu.js:295
#, javascript-format
msgid "%s, then %s later."
msgstr "%s转%s。"
@ -1006,30 +1006,30 @@ msgstr "%s转%s。"
#. libgweather for the possible condition strings. If at all
#. possible, the sentence should match the grammatical case etc. of
#. the inserted conditions.
#: js/ui/dateMenu.js:303
#: js/ui/dateMenu.js:301
#, javascript-format
msgid "%s, then %s, followed by %s later."
msgstr "%s转%s随后转%s。"
#: js/ui/dateMenu.js:314
#: js/ui/dateMenu.js:312
msgid "Select a location…"
msgstr "选择地点…"
#: js/ui/dateMenu.js:317
#: js/ui/dateMenu.js:315
msgid "Loading…"
msgstr "正在载入…"
#. Translators: %s is a temperature with unit, e.g. "23℃"
#: js/ui/dateMenu.js:323
#: js/ui/dateMenu.js:321
#, javascript-format
msgid "Feels like %s."
msgstr "体感温度 %s。"
#: js/ui/dateMenu.js:326
#: js/ui/dateMenu.js:324
msgid "Go online for weather information"
msgstr "通过互联网查看天气信息"
#: js/ui/dateMenu.js:328
#: js/ui/dateMenu.js:326
msgid "Weather information is currently unavailable"
msgstr "天气信息目前不可用"
@ -1930,7 +1930,7 @@ msgstr "Thunderbolt 授权错误"
#: js/ui/status/thunderbolt.js:357
#, javascript-format
msgid "Could not authorize the Thunderbolt device: %s"
msgid "Could not authorize the thunderbolt device: %s"
msgstr "无法授权 Thunderbolt 设备:%s"
#: js/ui/status/volume.js:128

View File

@ -1190,12 +1190,37 @@ app_child_setup (gpointer user_data)
}
#endif
static void
_shell_app_watch_callback (GPid pid,
gint status,
ShellApp *app)
{
if (app->state == SHELL_APP_STATE_STARTING)
{
ShellWindowTracker *tracker = shell_window_tracker_get_default ();
GSList *startup_sequences = shell_window_tracker_get_startup_sequences (tracker);
GSList *iter = NULL;
for (iter = startup_sequences; iter; iter = g_slist_next (iter))
{
ShellStartupSequence *sequence = (ShellStartupSequence*) iter->data;
ShellApp *startup_app = shell_startup_sequence_get_app (sequence);
if (startup_app == app)
shell_startup_sequence_complete (sequence);
}
shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
}
g_spawn_close_pid (pid);
}
static void
wait_pid (GDesktopAppInfo *appinfo,
GPid pid,
gpointer user_data)
ShellApp *app)
{
g_child_watch_add (pid, (GChildWatchFunc) g_spawn_close_pid, NULL);
g_child_watch_add (pid, (GChildWatchFunc) _shell_app_watch_callback, app);
}
/**
@ -1242,7 +1267,8 @@ shell_app_launch (ShellApp *app,
#else
NULL, NULL,
#endif
wait_pid, NULL,
(GDesktopAppLaunchCallback) wait_pid,
app,
error);
g_object_unref (context);

View File

@ -906,6 +906,11 @@ shell_startup_sequence_create_icon (ShellStartupSequence *sequence, guint size)
return texture;
}
void
shell_startup_sequence_complete (ShellStartupSequence *sequence)
{
sn_startup_sequence_complete ((SnStartupSequence*)sequence);
}
/**
* shell_window_tracker_get_default:

View File

@ -36,6 +36,7 @@ const char *shell_startup_sequence_get_name (ShellStartupSequence *sequence);
gboolean shell_startup_sequence_get_completed (ShellStartupSequence *sequence);
int shell_startup_sequence_get_workspace (ShellStartupSequence *sequence);
ClutterActor *shell_startup_sequence_create_icon (ShellStartupSequence *sequence, guint size);
void shell_startup_sequence_complete (ShellStartupSequence *sequence);
G_END_DECLS