Compare commits

..

1 Commits

Author SHA1 Message Date
Ray Strode
82c72f377a dnd: don't try to access destroyed dragActor
The dragComplete handler incorrectly checks
this._actorDestroyed to see if the drag actor
is destroyed.  The drag actor may not be the same
as the main actor.

The end result is an exception in drop handling,
leading to a shell lockup.

This commit changes the code to always set
this._dragActor to undefined when it's destroyed,
and check for that condition instead of
this._actorDestroyed in the dragComplete handler.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/issues/577
2018-09-19 12:52:39 -04:00
185 changed files with 9893 additions and 11712 deletions

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "subprojects/gvc"] [submodule "subprojects/gvc"]
path = subprojects/gvc path = subprojects/gvc
url = https://gitlab.gnome.org/GNOME/libgnome-volume-control.git url = https://git.gnome.org/browse/libgnome-volume-control

View File

@@ -10,15 +10,15 @@ 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 restrictive while you're coding, ignore it, and let the patch reviewer decide
what to do. what to do.
## Indentation, braces and whitespace ## Indentation and whitespace
* Use four-space indents. Use four-space indents. Braces are on the same line as their associated
* Braces are on the same line as their associated statements. statements. You should only omit braces if *both* sides of the statement are
* You should only omit braces if *both* sides of the statement are on one line. 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.
* 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 ```javascript
function foo(a, b) { function foo(a, b) {
let bar; let bar;

51
NEWS
View File

@@ -1,54 +1,3 @@
3.31.2
======
* Port away from and remove ShellGenericContainer [Georges; !153]
* popupMenu: Fix keyboard activation when numlock is active [Andrea; #550]
* Do not block all shortcuts while app folders are expanded [Florian; #648]
* Fix regression in handling new input sources [Carlos; #691]
* Reask password after udisk errors for no/wrong passwords [Sebastian; #640]
* Improve performance of app icon animations [Daniel; !253, !261]
* Avoid focus changes when updating keyboard options [Takao; #391]
* notifications: Support icon theme names in 'image-path' hint [Marco; !285]
* Respect natural-scroll setting for workspace swipe gesture [Erik; #516]
* Confine window preview titles to workspace area [Florian; !214]
* Misc. bug fixes [Florian, Carmen, Georges, Cosimo, Carlos; #602, #693,
#666, #647, !66, #768, #430, !286, !258, !287, gtk#1447]
Contributors:
Andrea Azzarone, Carmen Bianca Bakker, Cosimo Cecchi, Sergio Costas,
Erik Duxstad, Takao Fujiwara, Carlos Garnacho, Florian Müllner,
Georges Basile Stavracas Neto, Sebastian Pinnau, Didier Roche, Jakub Steiner,
Marco Trevisan (Treviño), verdre, Daniel van Vugt
Translators:
Kristjan SCHMIDT [eo], Dušan Kazik [sk], Matej Urbančič [sl],
Anish Sheela [ml], Rafael Fontenelle [pt_BR], Daniel Mustieles [es]
3.30.1
======
* Cancel search on overview hiding [Marco; !205]
* Fix disappearing network icon [Iain; #140]
* Improve switch-monitor shortcut handling [Daniel; !208]
* Fix missing key information in keyring dialog [Florian; #574]
* De-duplicate all entries in run command history [Pascal; #524]
* Fix frozen disk unlock dialogs [Florian; #565]
* Fix unresponsive-app dialog blocking input in other windows [Florian; #273]
* Fix handling of forward-key-event input method signal [Carlos; #531]
* Misc. bug fixes [Florian, Marco, Carlos, Pascal, Andrea; #520, #791233,
!188, #539, !217, #536, #537, #578, !236, #579, !228, #618, #471, !255]
Contributors:
Andrea Azzarone, Jürg Billeter, Daniel Drake, Carlos Garnacho, Andre Klapper,
Iain Lane, Florian Müllner, Bastien Nocera, Pascal Nowack, Jakub Steiner,
Ray Strode, Will Thompson, Marco Trevisan (Treviño), Adam Williamson,
Andrew Zaborowski
Translators:
Yuras Shumovich [be], Stas Solovey [ru], Justin van Steijn [nl],
Dušan Kazik [sk], Khaled Hosny [ar], Madis O [et], Mart Raudsepp [et],
Марко Костић [sr], Piotr Drąg [pl], Marek Černocký [cs], Fran Dieguez [gl],
Ask Hjorth Larsen [da], Balázs Meskó [hu], Jiri Grönroos [fi],
Cheng-Chia Tseng [zh_TW]
3.30.0 3.30.0
====== ======

View File

@@ -1,9 +0,0 @@
dbus_interfaces = [
'org.gnome.Shell.Extensions.xml',
'org.gnome.Shell.PadOsd.xml',
'org.gnome.Shell.Screencast.xml',
'org.gnome.Shell.Screenshot.xml',
'org.gnome.ShellSearchProvider.xml',
'org.gnome.ShellSearchProvider2.xml'
]
install_data(dbus_interfaces, install_dir: ifacedir)

View File

@@ -1,5 +0,0 @@
<node>
<interface name="net.hadess.SensorProxy">
<property name="HasAccelerometer" type="b" access="read"/>
</interface>
</node>

View File

@@ -1,5 +0,0 @@
<node>
<interface name="net.hadess.SwitcherooControl">
<property name="HasDualGpu" type="b" access="read"/>
</interface>
</node>

View File

@@ -1,32 +0,0 @@
<node>
<interface name="org.Gtk.MountOperationHandler">
<method name="AskPassword">
<arg type="s" direction="in" name="object_id"/>
<arg type="s" direction="in" name="message"/>
<arg type="s" direction="in" name="icon_name"/>
<arg type="s" direction="in" name="default_user"/>
<arg type="s" direction="in" name="default_domain"/>
<arg type="u" direction="in" name="flags"/>
<arg type="u" direction="out" name="response"/>
<arg type="a{sv}" direction="out" name="response_details"/>
</method>
<method name="AskQuestion">
<arg type="s" direction="in" name="object_id"/>
<arg type="s" direction="in" name="message"/>
<arg type="s" direction="in" name="icon_name"/>
<arg type="as" direction="in" name="choices"/>
<arg type="u" direction="out" name="response"/>
<arg type="a{sv}" direction="out" name="response_details"/>
</method>
<method name="ShowProcesses">
<arg type="s" direction="in" name="object_id"/>
<arg type="s" direction="in" name="message"/>
<arg type="s" direction="in" name="icon_name"/>
<arg type="ai" direction="in" name="application_pids"/>
<arg type="as" direction="in" name="choices"/>
<arg type="u" direction="out" name="response"/>
<arg type="a{sv}" direction="out" name="response_details"/>
</method>
<method name="Close"/>
</interface>
</node>

View File

@@ -1,12 +0,0 @@
<node>
<interface name="org.freedesktop.Application">
<method name="ActivateAction">
<arg type="s" direction="in"/>
<arg type="av" direction="in"/>
<arg type="a{sv}" direction="in"/>
</method>
<method name="Activate">
<arg type="a{sv}" direction="in"/>
</method>
</interface>
</node>

View File

@@ -1,16 +0,0 @@
<node>
<interface name="org.freedesktop.DBus">
<method name="ListNames">
<arg type="as" direction="out" name="names"/>
</method>
<method name="GetConnectionUnixProcessID">
<arg type="s" direction="in"/>
<arg type="u" direction="out"/>
</method>
<signal name="NameOwnerChanged">
<arg type="s" direction="out" name="name"/>
<arg type="s" direction="out" name="oldOwner"/>
<arg type="s" direction="out" name="newOwner"/>
</signal>
</interface>
</node>

View File

@@ -1,11 +0,0 @@
<node>
<interface name="org.freedesktop.GeoClue2.Agent">
<property name="MaxAccuracyLevel" type="u" access="read"/>
<method name="AuthorizeApp">
<arg name="desktop_id" type="s" direction="in"/>
<arg name="req_accuracy_level" type="u" direction="in"/>
<arg name="authorized" type="b" direction="out"/>
<arg name="allowed_accuracy_level" type="u" direction="out"/>
</method>
</interface>
</node>

View File

@@ -1,9 +0,0 @@
<node>
<interface name="org.freedesktop.GeoClue2.Manager">
<property name="InUse" type="b" access="read"/>
<property name="AvailableAccuracyLevel" type="u" access="read"/>
<method name="AddAgent">
<arg name="id" type="s" direction="in"/>
</method>
</interface>
</node>

View File

@@ -1,13 +0,0 @@
<node>
<interface name="org.freedesktop.ModemManager.Modem.Cdma">
<method name="GetSignalQuality">
<arg type="u" direction="out"/>
</method>
<method name="GetServingSystem">
<arg type="(usu)" direction="out"/>
</method>
<signal name="SignalQuality">
<arg type="u" direction="out"/>
</signal>
</interface>
</node>

View File

@@ -1,19 +0,0 @@
<node>
<interface name="org.freedesktop.ModemManager.Modem.Gsm.Network">
<method name="GetRegistrationInfo">
<arg type="(uss)" direction="out"/>
</method>
<method name="GetSignalQuality">
<arg type="u" direction="out"/>
</method>
<property name="AccessTechnology" type="u" access="read"/>
<signal name="SignalQuality">
<arg type="u" direction="out"/>
</signal>
<signal name="RegistrationInfo">
<arg type="u" direction="out"/>
<arg type="s" direction="out"/>
<arg type="s" direction="out"/>
</signal>
</interface>
</node>

View File

@@ -1,6 +0,0 @@
<node>
<interface name="org.freedesktop.ModemManager1.Modem.Modem3gpp">
<property name="OperatorCode" type="s" access="read"/>
<property name="OperatorName" type="s" access="read"/>
</interface>
</node>

View File

@@ -1,5 +0,0 @@
<node>
<interface name="org.freedesktop.ModemManager1.Modem.ModemCdma">
<property name="Sid" type="u" access="read"/>
</interface>
</node>

View File

@@ -1,5 +0,0 @@
<node>
<interface name="org.freedesktop.ModemManager1.Modem">
<property name="SignalQuality" type="(ub)" access="read"/>
</interface>
</node>

View File

@@ -1,35 +0,0 @@
<node>
<interface name="org.freedesktop.Notifications">
<method name="Notify">
<arg type="s" direction="in"/>
<arg type="u" direction="in"/>
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="as" direction="in"/>
<arg type="a{sv}" direction="in"/>
<arg type="i" direction="in"/>
<arg type="u" direction="out"/>
</method>
<method name="CloseNotification">
<arg type="u" direction="in"/>
</method>
<method name="GetCapabilities">
<arg type="as" direction="out"/>
</method>
<method name="GetServerInformation">
<arg type="s" direction="out"/>
<arg type="s" direction="out"/>
<arg type="s" direction="out"/>
<arg type="s" direction="out"/>
</method>
<signal name="NotificationClosed">
<arg type="u"/>
<arg type="u"/>
</signal>
<signal name="ActionInvoked">
<arg type="u"/>
<arg type="s"/>
</signal>
</interface>
</node>

View File

@@ -1,13 +0,0 @@
<node>
<interface name="org.freedesktop.PackageKit.Offline">
<property name="UpdatePrepared" type="b" access="read"/>
<property name="UpdateTriggered" type="b" access="read"/>
<property name="UpgradePrepared" type="b" access="read"/>
<property name="UpgradeTriggered" type="b" access="read"/>
<property name="PreparedUpgrade" type="a{sv}" access="read"/>
<method name="Trigger">
<arg type="s" name="action" direction="in"/>
</method>
<method name="Cancel"/>
</interface>
</node>

View File

@@ -1,11 +0,0 @@
<node>
<interface name="org.freedesktop.UPower.Device">
<property name="Type" type="u" access="read"/>
<property name="State" type="u" access="read"/>
<property name="Percentage" type="d" access="read"/>
<property name="TimeToEmpty" type="x" access="read"/>
<property name="TimeToFull" type="x" access="read"/>
<property name="IsPresent" type="b" access="read"/>
<property name="IconName" type="s" access="read"/>
</interface>
</node>

View File

@@ -1,5 +0,0 @@
<node>
<interface name="org.freedesktop.UPower">
<property name="OnBattery" type="b" access="read"/>
</interface>
</node>

View File

@@ -1,18 +0,0 @@
<node>
<interface name="org.freedesktop.bolt1.Device">
<property name="Uid" type="s" access="read"></property>
<property name="Name" type="s" access="read"></property>
<property name="Vendor" type="s" access="read"></property>
<property name="Type" type="s" access="read"></property>
<property name="Status" type="s" access="read"></property>
<property name="Parent" type="s" access="read"></property>
<property name="SysfsPath" type="s" access="read"></property>
<property name="Stored" type="b" access="read"></property>
<property name="Policy" type="s" access="read"></property>
<property name="Key" type="s" access="read"></property>
<property name="Label" type="s" access="read"></property>
<property name="ConnectTime" type="t" access="read"></property>
<property name="AuthorizeTime" type="t" access="read"></property>
<property name="StoreTime" type="t" access="read"></property>
</interface>
</node>

View File

@@ -1,15 +0,0 @@
<node>
<interface name="org.freedesktop.bolt1.Manager">
<property name="Probing" type="b" access="read"></property>
<property name="AuthMode" type="s" access="readwrite"></property>
<method name="EnrollDevice">
<arg type="s" name="uid" direction="in"/>
<arg type="s" name="policy" direction="in"/>
<arg type="s" name="flags" direction="in"/>
<arg name="device" direction="out" type="o"/>
</method>
<signal name="DeviceAdded">
<arg name="device" type="o"/>
</signal>
</interface>
</node>

View File

@@ -1,15 +0,0 @@
<node>
<interface name="org.freedesktop.impl.portal.Access">
<method name="AccessDialog">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<arg type="s" name="subtitle" direction="in"/>
<arg type="s" name="body" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
</interface>
</node>

View File

@@ -1,24 +0,0 @@
<node>
<interface name="org.freedesktop.impl.portal.PermissionStore">
<method name="Lookup">
<arg name="table" type="s" direction="in"/>
<arg name="id" type="s" direction="in"/>
<arg name="permissions" type="a{sas}" direction="out"/>
<arg name="data" type="v" direction="out"/>
</method>
<method name="Set">
<arg name="table" type="s" direction="in"/>
<arg name="create" type="b" direction="in"/>
<arg name="id" type="s" direction="in"/>
<arg name="app_permissions" type="a{sas}" direction="in"/>
<arg name="data" type="v" direction="in"/>
</method>
<signal name="Changed">
<arg name="table" type="s" direction="out"/>
<arg name="id" type="s" direction="out"/>
<arg name="deleted" type="b" direction="out"/>
<arg name="data" type="v" direction="out"/>
<arg name="permissions" type="a{sas}" direction="out"/>
</signal>
</interface>
</node>

View File

@@ -1,5 +0,0 @@
<node>
<interface name="org.freedesktop.impl.portal.Request">
<method name="Close"/>
</interface>
</node>

View File

@@ -1,27 +0,0 @@
<node>
<interface name="org.freedesktop.login1.Manager">
<method name="Suspend">
<arg type="b" direction="in"/>
</method>
<method name="CanSuspend">
<arg type="s" direction="out"/>
</method>
<method name="Inhibit">
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="h" direction="out"/>
</method>
<method name="GetSession">
<arg type="s" direction="in"/>
<arg type="o" direction="out"/>
</method>
<method name="ListSessions">
<arg name="sessions" type="a(susso)" direction="out"/>
</method>
<signal name="PrepareForSleep">
<arg type="b" direction="out"/>
</signal>
</interface>
</node>

View File

@@ -1,15 +0,0 @@
<node>
<interface name="org.freedesktop.login1.Session">
<signal name="Lock"/>
<signal name="Unlock"/>
<property name="Active" type="b" access="read"/>
<property name="Class" type="s" access="read"/>
<property name="Id" type="s" access="read"/>
<property name="Remote" type="b" access="read"/>
<property name="Type" type="s" access="read"/>
<property name="State" type="s" access="read"/>
<method name="SetLockedHint">
<arg type="b" direction="in"/>
</method>
</interface>
</node>

View File

@@ -1,6 +0,0 @@
<node>
<interface name="org.freedesktop.login1.User">
<property name="Display" type="(so)" access="read"/>
<property name="Sessions" type="a(so)" access="read"/>
</interface>
</node>

View File

@@ -1,13 +0,0 @@
<node>
<interface name="org.freedesktop.realmd.Provider">
<property name="Name" type="s" access="read"/>
<property name="Version" type="s" access="read"/>
<property name="Realms" type="ao" access="read"/>
<method name="Discover">
<arg name="string" type="s" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/>
<arg name="relevance" type="i" direction="out"/>
<arg name="realm" type="ao" direction="out"/>
</method>
</interface>
</node>

View File

@@ -1,20 +0,0 @@
<node>
<interface name="org.freedesktop.realmd.Realm">
<property name="Name" type="s" access="read"/>
<property name="Configured" type="s" access="read"/>
<property name="Details" type="a(ss)" access="read"/>
<property name="LoginFormats" type="as" access="read"/>
<property name="LoginPolicy" type="s" access="read"/>
<property name="PermittedLogins" type="as" access="read"/>
<property name="SupportedInterfaces" type="as" access="read"/>
<method name="ChangeLoginPolicy">
<arg name="login_policy" type="s" direction="in"/>
<arg name="permitted_add" type="as" direction="in"/>
<arg name="permitted_remove" type="as" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/>
</method>
<method name="Deconfigure">
<arg name="options" type="a{sv}" direction="in"/>
</method>
</interface>
</node>

View File

@@ -1,15 +0,0 @@
<node>
<interface name="org.freedesktop.realmd.Service">
<method name="Cancel">
<arg name="operation" type="s" direction="in"/>
</method>
<method name="Release"/>
<method name="SetLocale">
<arg name="locale" type="s" direction="in"/>
</method>
<signal name="Diagnostics">
<arg name="data" type="s"/>
<arg name="operation" type="s"/>
</signal>
</interface>
</node>

View File

@@ -1,26 +0,0 @@
<node>
<interface name="org.gnome.Magnifier.ZoomRegion">
<method name="setMagFactor">
<arg type="d" direction="in"/>
<arg type="d" direction="in"/>
</method>
<method name="getMagFactor">
<arg type="d" direction="out"/>
<arg type="d" direction="out"/>
</method>
<method name="setRoi">
<arg type="ai" direction="in"/>
</method>
<method name="getRoi">
<arg type="ai" direction="out"/>
</method>
<method name="shiftContentsTo">
<arg type="i" direction="in"/>
<arg type="i" direction="in"/>
<arg type="b" direction="out"/>
</method>
<method name="moveResize">
<arg type="ai" direction="in"/>
</method>
</interface>
</node>

View File

@@ -1,54 +0,0 @@
<node>
<interface name="org.gnome.Magnifier">
<method name="setActive">
<arg type="b" direction="in"/>
</method>
<method name="isActive">
<arg type="b" direction="out"/>
</method>
<method name="showCursor"/>
<method name="hideCursor"/>
<method name="createZoomRegion">
<arg type="d" direction="in"/>
<arg type="d" direction="in"/>
<arg type="ai" direction="in"/>
<arg type="ai" direction="in"/>
<arg type="o" direction="out"/>
</method>
<method name="addZoomRegion">
<arg type="o" direction="in"/>
<arg type="b" direction="out"/>
</method>
<method name="getZoomRegions">
<arg type="ao" direction="out"/>
</method>
<method name="clearAllZoomRegions"/>
<method name="fullScreenCapable">
<arg type="b" direction="out"/>
</method>
<method name="setCrosswireSize">
<arg type="i" direction="in"/>
</method>
<method name="getCrosswireSize">
<arg type="i" direction="out"/>
</method>
<method name="setCrosswireLength">
<arg type="i" direction="in"/>
</method>
<method name="getCrosswireLength">
<arg type="i" direction="out"/>
</method>
<method name="setCrosswireClip">
<arg type="b" direction="in"/>
</method>
<method name="getCrosswireClip">
<arg type="b" direction="out"/>
</method>
<method name="setCrosswireColor">
<arg type="u" direction="in"/>
</method>
<method name="getCrosswireColor">
<arg type="u" direction="out"/>
</method>
</interface>
</node>

View File

@@ -1,18 +0,0 @@
<node>
<interface name="org.gnome.ScreenSaver">
<method name="Lock"/>
<method name="GetActive">
<arg type="b" direction="out" name="active"/>
</method>
<method name="SetActive">
<arg type="b" direction="in" name="value"/>
</method>
<method name="GetActiveTime">
<arg type="u" direction="out" name="value"/>
</method>
<signal name="ActiveChanged">
<arg name="new_value" type="b"/>
</signal>
<signal name="WakeUpScreen"/>
</interface>
</node>

View File

@@ -1,16 +0,0 @@
<node>
<interface name="org.gnome.SessionManager.EndSessionDialog">
<method name="Open">
<arg type="u" direction="in"/>
<arg type="u" direction="in"/>
<arg type="u" direction="in"/>
<arg type="ao" direction="in"/>
</method>
<method name="Close"/>
<signal name="ConfirmedLogout"/>
<signal name="ConfirmedReboot"/>
<signal name="ConfirmedShutdown"/>
<signal name="Canceled"/>
<signal name="Closed"/>
</interface>
</node>

View File

@@ -1,10 +0,0 @@
<node>
<interface name="org.gnome.SessionManager.Inhibitor">
<method name="GetAppId">
<arg type="s" direction="out"/>
</method>
<method name="GetReason">
<arg type="s" direction="out"/>
</method>
</interface>
</node>

View File

@@ -1,11 +0,0 @@
<node>
<interface name="org.gnome.SessionManager.Presence">
<method name="SetStatus">
<arg type="u" direction="in"/>
</method>
<property name="status" type="u" access="readwrite"/>
<signal name="StatusChanged">
<arg type="u" direction="out"/>
</signal>
</interface>
</node>

View File

@@ -1,23 +0,0 @@
<node>
<interface name="org.gnome.SessionManager">
<method name="Logout">
<arg type="u" direction="in"/>
</method>
<method name="Shutdown"/>
<method name="Reboot"/>
<method name="CanShutdown">
<arg type="b" direction="out"/>
</method>
<method name="IsInhibited">
<arg type="u" direction="in"/>
<arg type="b" direction="out"/>
</method>
<property name="SessionIsActive" type="b" access="read"/>
<signal name="InhibitorAdded">
<arg type="o" direction="out"/>
</signal>
<signal name="InhibitorRemoved">
<arg type="o" direction="out"/>
</signal>
</interface>
</node>

View File

@@ -1,6 +0,0 @@
<node>
<interface name="org.gnome.SettingsDaemon.Color">
<property name="DisabledUntilTomorrow" type="b" access="readwrite"/>
<property name="NightLightActive" type="b" access="read"/>
</interface>
</node>

View File

@@ -1,5 +0,0 @@
<node>
<interface name="org.gnome.SettingsDaemon.Power.Screen">
<property name="Brightness" type="i" access="readwrite"/>
</interface>
</node>

View File

@@ -1,10 +0,0 @@
<node>
<interface name="org.gnome.SettingsDaemon.Rfkill">
<property name="AirplaneMode" type="b" access="readwrite"/>
<property name="HardwareAirplaneMode" type="b" access="read"/>
<property name="BluetoothAirplaneMode" type="b" access="readwrite"/>
<property name="BluetoothHasAirplaneMode" type="b" access="read"/>
<property name="BluetoothHardwareAirplaneMode" type="b" access="readwrite"/>
<property name="ShouldShowAirplaneMode" type="b" access="read"/>
</interface>
</node>

View File

@@ -1,13 +0,0 @@
<node>
<interface name="org.gnome.SettingsDaemon.Wacom">
<method name="SetGroupModeLED">
<arg name="device_path" direction="in" type="s"/>
<arg name="group" direction="in" type="u"/>
<arg name="mode" direction="in" type="u"/>
</method>
<method name="SetOLEDLabels">
<arg name="device_path" direction="in" type="s"/>
<arg name="labels" direction="in" type="as"/>
</method>
</interface>
</node>

View File

@@ -1,12 +0,0 @@
<node>
<interface name="org.gnome.Shell.AudioDeviceSelection">
<method name="Open">
<arg name="devices" direction="in" type="as"/>
</method>
<method name="Close">
</method>
<signal name="DeviceSelected">
<arg name="device" type="s"/>
</signal>
</interface>
</node>

View File

@@ -1,205 +0,0 @@
<!DOCTYPE node PUBLIC
'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'
'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>
<node>
<!--
org.gnome.Shell.Extensions:
@short_description: Extensions interface
The interface used to query and manage extensions.
-->
<interface name="org.gnome.Shell.Extensions">
<!--
ListExtensions:
@extensions: A dictionary of extension infos
Get a list of installed extensions. The returned @extensions
dictionary maps extension UUIDs to info vardicts. See
GetExtensionInfo() for documentation on possible keys.
-->
<method name="ListExtensions">
<arg type="a{sa{sv}}" direction="out" name="extensions"/>
</method>
<!--
GetExtensionInfo:
@uuid: The UUID of the extension
@info: The returned extension info
The information returned in the @info vardict depends on the
metadata the extension provides, however it is guaranteed to
contain the following keys:
<variablelist>
<varlistentry>
<term>uuid s</term>
<listitem><para>The UUID of the extension</para></listitem>
</varlistentry>
<varlistentry>
<term>name s</term>
<listitem><para>The name of the extension</para></listitem>
</varlistentry>
<varlistentry>
<term>description s</term>
<listitem><para>
A short summary that describes what the extension does
</para></listitem>
</varlistentry>
<varlistentry>
<term>shell-version as</term>
<listitem><para>An array of support shell versions</para></listitem>
</varlistentry>
<varlistentry>
<term>type d</term>
<listitem><para>
The type of extension:
<simplelist>
<member>1: SYSTEM</member>
<member>2: PER_USER</member>
</simplelist>
</para></listitem>
</varlistentry>
<varlistentry>
<term>state d</term>
<listitem><para>
The state the extension is in:
<simplelist>
<member>1: ENABLED</member>
<member>2: DISABLED</member>
<member>3: ERROR</member>
<member>4: OUT_OF_DATE</member>
<member>5: DOWNLOADING</member>
<member>6: INITIALIZED</member>
<member>99: UNINSTALLED</member>
</simplelist>
</para></listitem>
</varlistentry>
<varlistentry>
<term>path s</term>
<listitem><para>The extension directory</para></listitem>
</varlistentry>
<varlistentry>
<term>error s</term>
<listitem><para>The most recent error caught in init(), enable() or disable()</para></listitem>
</varlistentry>
<varlistentry>
<term>hasPrefs b</term>
<listitem><para>Whether the extension includes preference UI</para></listitem>
</varlistentry>
</variablelist>
By convention, many extensions will also include the following keys:
<variablelist>
<varlistentry>
<term>version d</term>
<listitem><para>The extension version</para></listitem>
</varlistentry>
<varlistentry>
<term>url s</term>
<listitem><para>The URL to the extension homepage or repository</para></listitem>
</varlistentry>
<varlistentry>
<term>settings-schema s</term>
<listitem><para>The ID of a bundled GSettings schema</para></listitem>
</varlistentry>
<varlistentry>
<term>gettext-domain s</term>
<listitem><para>The domain used for translations</para></listitem>
</varlistentry>
</variablelist>
-->
<method name="GetExtensionInfo">
<arg type="s" direction="in" name="uuid"/>
<arg type="a{sv}" direction="out" name="info"/>
</method>
<!--
GetExtensionErrors:
@uuid: The UUID of the extension
@errors: The returned errors
Get the list of errors that caused the extension
to be in ERROR state.
-->
<method name="GetExtensionErrors">
<arg type="s" direction="in" name="uuid"/>
<arg type="as" direction="out" name="errors"/>
</method>
<!--
InstallRemoteExtension:
@uuid: The UUID of the extension
@result: The result of the operation
Download and install an extension.
-->
<method name="InstallRemoteExtension">
<arg type="s" direction="in" name="uuid"/>
<arg type="s" direction="out" name="result"/>
</method>
<!--
UninstallExtension:
@uuid: The UUID of the extension
@success: Whether the operation was successful
Uninstall an extension.
-->
<method name="UninstallExtension">
<arg type="s" direction="in" name="uuid"/>
<arg type="b" direction="out" name="success"/>
</method>
<!--
ReloadExtension:
@uuid: The UUID of the extension
Reload an extension.
-->
<method name="ReloadExtension">
<arg type="s" direction="in" name="uuid"/>
</method>
<!--
LaunchExtensionPrefs:
@uuid: The UUID of the extension
Launch preferences of an extension.
-->
<method name="LaunchExtensionPrefs">
<arg type="s" direction="in" name="uuid"/>
</method>
<!--
CheckForUpdates:
Update all extensions for which updates are available
-->
<method name="CheckForUpdates"/>
<signal name="ExtensionStatusChanged">
<arg type="s" name="uuid"/>
<arg type="i" name="state"/>
<arg type="s" name="error"/>
</signal>
<!--
ShellVersion:
The GNOME Shell version
-->
<property name="ShellVersion" type="s" access="read"/>
</interface>
</node>

View File

@@ -1,8 +0,0 @@
<node>
<interface name="org.gnome.Shell.HotplugSniffer">
<method name="SniffURI">
<arg type="s" direction="in"/>
<arg type="as" direction="out"/>
</method>
</interface>
</node>

View File

@@ -1,13 +0,0 @@
<node>
<interface name="org.gnome.Shell.PerfHelper">
<method name="CreateWindow">
<arg type="i" direction="in"/>
<arg type="i" direction="in"/>
<arg type="b" direction="in"/>
<arg type="b" direction="in"/>
<arg type="b" direction="in"/>
</method>
<method name="WaitWindows"/>
<method name="DestroyWindows"/>
</interface>
</node>

View File

@@ -1,19 +0,0 @@
<node>
<interface name="org.gnome.Shell.PortalHelper">
<method name="Authenticate">
<arg name="connection" type="o" direction="in"/>
<arg name="url" type="s" direction="in"/>
<arg name="timestamp" type="u" direction="in"/>
</method>
<method name="Close">
<arg name="connection" type="o" direction="in"/>
</method>
<method name="Refresh">
<arg name="connection" type="o" direction="in"/>
</method>
<signal name="Done">
<arg type="o" name="connection"/>
<arg type="u" name="result"/>
</signal>
</interface>
</node>

View File

@@ -1,8 +0,0 @@
<node>
<interface name="org.gnome.Shell.Wacom.PadOsd">
<method name="Show">
<arg name="device_node" direction="in" type="o"/>
<arg name="edition_mode" direction="in" type="b"/>
</method>
</interface>
</node>

View File

@@ -1,44 +0,0 @@
<node>
<interface name="org.gnome.Shell">
<method name="Eval">
<arg type="s" direction="in" name="script"/>
<arg type="b" direction="out" name="success"/>
<arg type="s" direction="out" name="result"/>
</method>
<method name="FocusSearch"/>
<method name="ShowOSD">
<arg type="a{sv}" direction="in" name="params"/>
</method>
<method name="ShowMonitorLabels">
<arg type="a{uv}" direction="in" name="params"/>
</method>
<method name="ShowMonitorLabels2">
<arg type="a{sv}" direction="in" name="params"/>
</method>
<method name="HideMonitorLabels"/>
<method name="FocusApp">
<arg type="s" direction="in" name="id"/>
</method>
<method name="ShowApplications"/>
<method name="GrabAccelerator">
<arg type="s" direction="in" name="accelerator"/>
<arg type="u" direction="in" name="flags"/>
<arg type="u" direction="out" name="action"/>
</method>
<method name="GrabAccelerators">
<arg type="a(su)" direction="in" name="accelerators"/>
<arg type="au" direction="out" name="actions"/>
</method>
<method name="UngrabAccelerator">
<arg type="u" direction="in" name="action"/>
<arg type="b" direction="out" name="success"/>
</method>
<signal name="AcceleratorActivated">
<arg name="action" type="u"/>
<arg name="parameters" type="a{sv}"/>
</signal>
<property name="Mode" type="s" access="read"/>
<property name="OverviewActive" type="b" access="readwrite"/>
<property name="ShellVersion" type="s" access="read"/>
</interface>
</node>

View File

@@ -1,13 +0,0 @@
<node>
<interface name="org.gtk.Notifications">
<method name="AddNotification">
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="a{sv}" direction="in"/>
</method>
<method name="RemoveNotification">
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
</method>
</interface>
</node>

View File

@@ -1,12 +0,0 @@
<node>
<interface name="org.mpris.MediaPlayer2.Player">
<method name="PlayPause"/>
<method name="Next"/>
<method name="Previous"/>
<property name="CanGoNext" type="b" access="read"/>
<property name="CanGoPrevious" type="b" access="read"/>
<property name="CanPlay" type="b" access="read"/>
<property name="Metadata" type="a{sv}" access="read"/>
<property name="PlaybackStatus" type="s" access="read"/>
</interface>
</node>

View File

@@ -1,7 +0,0 @@
<node>
<interface name="org.mpris.MediaPlayer2">
<method name="Raise"/>
<property name="CanRaise" type="b" access="read"/>
<property name="DesktopEntry" type="s" access="read"/>
</interface>
</node>

View File

@@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/shell/dbus-interfaces">
<file preprocess="xml-stripblanks">net.hadess.SensorProxy.xml</file>
<file preprocess="xml-stripblanks">net.hadess.SwitcherooControl.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.Application.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.bolt1.Device.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.bolt1.Manager.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.DBus.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.GeoClue2.Agent.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.GeoClue2.Manager.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.impl.portal.Access.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.impl.portal.PermissionStore.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.impl.portal.Request.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.login1.Manager.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.login1.Session.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.login1.User.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.ModemManager1.Modem.Modem3gpp.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.ModemManager1.Modem.ModemCdma.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.ModemManager1.Modem.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.ModemManager.Modem.Cdma.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.ModemManager.Modem.Gsm.Network.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.Notifications.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.PackageKit.Offline.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.realmd.Provider.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.realmd.Realm.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.realmd.Service.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.UPower.Device.xml</file>
<file preprocess="xml-stripblanks">org.freedesktop.UPower.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Magnifier.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Magnifier.ZoomRegion.xml</file>
<file preprocess="xml-stripblanks">org.gnome.ScreenSaver.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SessionManager.EndSessionDialog.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SessionManager.Inhibitor.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SessionManager.Presence.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SessionManager.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SettingsDaemon.Color.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SettingsDaemon.Power.Screen.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SettingsDaemon.Rfkill.xml</file>
<file preprocess="xml-stripblanks">org.gnome.SettingsDaemon.Wacom.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Shell.AudioDeviceSelection.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Shell.Extensions.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Shell.HotplugSniffer.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Shell.PerfHelper.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Shell.PortalHelper.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Shell.Screencast.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Shell.Screenshot.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Shell.Wacom.PadOsd.xml</file>
<file preprocess="xml-stripblanks">org.gnome.Shell.xml</file>
<file preprocess="xml-stripblanks">org.Gtk.MountOperationHandler.xml</file>
<file preprocess="xml-stripblanks">org.gtk.Notifications.xml</file>
<file preprocess="xml-stripblanks">org.mpris.MediaPlayer2.Player.xml</file>
<file preprocess="xml-stripblanks">org.mpris.MediaPlayer2.xml</file>
</gresource>
</gresources>

View File

@@ -11,9 +11,12 @@
<file>close-window.svg</file> <file>close-window.svg</file>
<file>close-window-active.svg</file> <file>close-window-active.svg</file>
<file>close-window-hover.svg</file> <file>close-window-hover.svg</file>
<file>close.svg</file>
<file>corner-ripple-ltr.png</file> <file>corner-ripple-ltr.png</file>
<file>corner-ripple-rtl.png</file> <file>corner-ripple-rtl.png</file>
<file>dash-placeholder.svg</file> <file>dash-placeholder.svg</file>
<file>filter-selected-ltr.svg</file>
<file>filter-selected-rtl.svg</file>
<file>gnome-shell.css</file> <file>gnome-shell.css</file>
<file>gnome-shell-high-contrast.css</file> <file>gnome-shell-high-contrast.css</file>
<file>key-enter.svg</file> <file>key-enter.svg</file>
@@ -22,6 +25,7 @@
<file>key-shift.svg</file> <file>key-shift.svg</file>
<file>key-shift-uppercase.svg</file> <file>key-shift-uppercase.svg</file>
<file>key-shift-latched-uppercase.svg</file> <file>key-shift-latched-uppercase.svg</file>
<file>logged-in-indicator.svg</file>
<file alias="icons/message-indicator-symbolic.svg">message-indicator-symbolic.svg</file> <file alias="icons/message-indicator-symbolic.svg">message-indicator-symbolic.svg</file>
<file>no-events.svg</file> <file>no-events.svg</file>
<file>no-notifications.svg</file> <file>no-notifications.svg</file>
@@ -32,11 +36,16 @@
<file>page-indicator-checked.svg</file> <file>page-indicator-checked.svg</file>
<file>page-indicator-hover.svg</file> <file>page-indicator-hover.svg</file>
<file>process-working.svg</file> <file>process-working.svg</file>
<file>running-indicator.svg</file>
<file>source-button-border.svg</file>
<file>summary-counter.svg</file>
<file>toggle-off-us.svg</file> <file>toggle-off-us.svg</file>
<file>toggle-off-intl.svg</file> <file>toggle-off-intl.svg</file>
<file>toggle-off-hc.svg</file> <file>toggle-off-hc.svg</file>
<file>toggle-on-us.svg</file> <file>toggle-on-us.svg</file>
<file>toggle-on-intl.svg</file> <file>toggle-on-intl.svg</file>
<file>toggle-on-hc.svg</file> <file>toggle-on-hc.svg</file>
<file>ws-switch-arrow-up.png</file>
<file>ws-switch-arrow-down.png</file>
</gresource> </gresource>
</gresources> </gresources>

View File

@@ -41,25 +41,34 @@ foreach service_file : service_files
endforeach endforeach
subdir('dbus-interfaces') dbus_interfaces = [
'org.gnome.Shell.PadOsd.xml',
'org.gnome.Shell.Screencast.xml',
'org.gnome.Shell.Screenshot.xml',
'org.gnome.ShellSearchProvider.xml',
'org.gnome.ShellSearchProvider2.xml'
]
install_data(dbus_interfaces, install_dir: ifacedir)
subdir('theme') subdir('theme')
data_resources = [ theme_resources = gnome.compile_resources(
['dbus-interfaces', []], 'gnome-shell-theme', 'gnome-shell-theme.gresource.xml',
['osk-layouts', []], source_dir: 'theme',
['theme', theme_deps] dependencies: theme_deps,
] gresource_bundle: true,
foreach resource : data_resources install: true,
gnome.compile_resources( install_dir: pkgdatadir
'gnome-shell-' + resource[0], )
'gnome-shell-@0@.gresource.xml'.format(resource[0]),
source_dir: resource[0], osk_layout_resources = gnome.compile_resources(
dependencies: resource[1], 'gnome-shell-osk-layouts', 'gnome-shell-osk-layouts.gresource.xml',
gresource_bundle: true, source_dir: 'osk-layouts',
install: true, gresource_bundle: true,
install_dir: pkgdatadir install: true,
) install_dir: pkgdatadir
endforeach )
perfconf = configuration_data() perfconf = configuration_data()
perfconf.set('datadir', datadir) perfconf.set('datadir', datadir)

74
data/theme/close.svg Normal file
View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Foreground"
x="0px"
y="0px"
width="16px"
height="16px"
viewBox="0 0 16 16"
enable-background="new 0 0 16 16"
xml:space="preserve"
sodipodi:version="0.32"
inkscape:version="0.46"
sodipodi:docname="x_circle_16.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
id="metadata2399"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs2397"><linearGradient
id="linearGradient3173"><stop
style="stop-color:#c4c4c4;stop-opacity:1;"
offset="0"
id="stop3175" /><stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
id="stop3177" /></linearGradient><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 8 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="16 : 8 : 1"
inkscape:persp3d-origin="8 : 5.3333333 : 1"
id="perspective2401" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3173"
id="linearGradient3179"
x1="7.844358"
y1="16"
x2="7.7198443"
y2="-0.062256809"
gradientUnits="userSpaceOnUse" /></defs><sodipodi:namedview
inkscape:window-height="713"
inkscape:window-width="1197"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
showgrid="false"
inkscape:zoom="32.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="40"
inkscape:window-y="40"
inkscape:current-layer="Foreground" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M10.5,3.5l2,2L10,8l2.5,2.5l-2,2L8,10l-2.5,2.5l-2-2L6,8L3.5,5.5l2-2L8,6L10.5,3.5 z M0,8c0-4.418,3.582-8,8-8s8,3.582,8,8s-3.582,8-8,8S0,12.418,0,8z"
id="path2394"
style="fill-opacity:1;fill:url(#linearGradient3179)" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="10"
height="20"
id="svg10003"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="filter-selected.svg">
<defs
id="defs10005">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective10011" />
<inkscape:perspective
id="perspective9998"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="32"
inkscape:cy="10.181818"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1680"
inkscape:window-height="994"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1" />
<metadata
id="metadata10008">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-44)">
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/jimmac/src/cvs/gnome/gnome-shell-design/mockups/app-picker.png"
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="rect34320"
d="m -0.18726572,54.181804 10.55634072,10.55636 10e-6,-21.11269 z"
style="opacity:0.21000001;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="10"
height="20"
id="svg10003"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="filter-selected-ltr.svg">
<defs
id="defs10005">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective10011" />
<inkscape:perspective
id="perspective9998"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="32.363636"
inkscape:cy="10.181818"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1440"
inkscape:window-height="839"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1" />
<metadata
id="metadata10008">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-44)">
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/jimmac/src/cvs/gnome/gnome-shell-design/mockups/app-picker.png"
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="rect34320"
d="m 10.369085,54.181804 -10.55634072,10.55636 -1e-5,-21.11269 z"
style="opacity:0.21000001;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -48,18 +48,17 @@ stage {
padding: 4px 32px; padding: 4px 32px;
@include button(normal); @include button(normal);
&:focus { @include button(focus); } &:focus { @include button(focus); }
&:hover { @include button(hover); }
&:insensitive { @include button(insensitive); } &:insensitive { @include button(insensitive); }
&:active { @include button(active); } &:active { @include button(active); }
} }
.modal-dialog-linked-button { .modal-dialog-linked-button {
border-right-width: 1px; border-right-width: 1px;
@include button(normal); @include button(normal);
&:insensitive { @include button(insensitive); } &:insensitive { @include button(insensitive); }
&:hover { @include button(hover); }
&:focus { @include button(focus); }
&:active { @include button(active); } &:active { @include button(active); }
&:focus { @include button(focus); }
padding: 12px; padding: 12px;
&:first-child { &:first-child {
@@ -689,6 +688,7 @@ StScrollBar {
height: 50px; height: 50px;
background-color: $selected_bg_color; background-color: $selected_bg_color;
color: $selected_fg_color; color: $selected_fg_color;
//background-image: url("resource:///org/gnome/shell/theme/ws-switch-arrow-up.png");
background-size: 32px; background-size: 32px;
border-radius: 8px; border-radius: 8px;
} }

View File

@@ -150,8 +150,8 @@
// //
// focused button // focused button
// //
$_bg: if($c!=$osd_bg_color, transparentize($c, 0.3), $_bg: if($c!=$osd_bg_color, transparentize($c, 0.5),
lighten($osd_bg_color,3%)); $osd_bg_color);
color: $osd_fg_color; color: $osd_fg_color;
text-shadow: 0 1px black; text-shadow: 0 1px black;
@@ -164,7 +164,7 @@
// active osd button // active osd button
// //
$_bg: if($c!=$osd_bg_color, transparentize($c, 0.3), $_bg: if($c!=$osd_bg_color, transparentize($c, 0.3),
lighten($osd_bg_color,3%)); lighten($osd_bg_color,10%));
color: white; color: white;
border-color: $osd_borders_color; border-color: $osd_borders_color;
@@ -182,7 +182,7 @@
color: white; color: white;
border-color: $osd_borders_color; border-color: $osd_borders_color;
background-color: $selected_bg_color; background-color: darken($_bg,5%);
// This should be none, but it's creating some issues with borders, so to // This should be none, but it's creating some issues with borders, so to
// workaround it for now, use inset wich goes through a different code path. // workaround it for now, use inset wich goes through a different code path.
// see https://bugzilla.gnome.org/show_bug.cgi?id=752934 // see https://bugzilla.gnome.org/show_bug.cgi?id=752934

View File

@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="300"
height="80"
id="svg7355"
version="1.1"
inkscape:version="0.48.2 r9819"
sodipodi:docname="logged-in-indicator.svg">
<metadata
id="metadata4175">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#2c1cff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1440"
inkscape:window-height="843"
id="namedview4173"
showgrid="false"
inkscape:zoom="2.8760889"
inkscape:cx="106.00403"
inkscape:cy="80.68078"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="g30864" />
<defs
id="defs7357">
<radialGradient
xlink:href="#linearGradient36429"
id="radialGradient7461"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.5919312,0,0,0.57582113,-20.687059,48.400487)"
cx="47.428951"
cy="167.16817"
fx="47.428951"
fy="167.16817"
r="37" />
<linearGradient
id="linearGradient36429">
<stop
id="stop36431"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop36433"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<radialGradient
xlink:href="#linearGradient36471"
id="radialGradient7463"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1891549,0,0,0.55513246,-9.281289,36.12653)"
cx="49.067139"
cy="242.50381"
fx="49.067139"
fy="242.50381"
r="37.00671" />
<linearGradient
id="linearGradient36471">
<stop
id="stop36473"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop36475"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<radialGradient
r="37.00671"
fy="242.50381"
fx="49.067139"
cy="242.50381"
cx="49.067139"
gradientTransform="matrix(3.4218418,0,0,0.03365337,-61.309005,138.5071)"
gradientUnits="userSpaceOnUse"
id="radialGradient7488"
xlink:href="#linearGradient36471" />
</defs>
<g
id="layer1"
transform="matrix(1.6213276,0,0,1.6213276,-431.6347,-272.5745)">
<g
style="display:inline"
id="g30864"
transform="translate(255.223,70.118091)">
<rect
ry="3.4593496"
rx="8.8641119"
y="76.159348"
x="12.596948"
height="71.116341"
width="182.22595"
id="rect14000"
style="opacity:0.371875;fill:url(#radialGradient7461);fill-opacity:1;stroke:none" />
<path
id="rect34520"
d="m 194.80022,146.83551 -182.559919,0"
style="opacity:0.35;fill:none;stroke:url(#radialGradient7488);stroke-width:0.61184424;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
connector-curvature="0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="21"
height="10"
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
sodipodi:docname="source-button-border.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="44.8"
inkscape:cx="8.704132"
inkscape:cy="5.7029946"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1600"
inkscape:window-height="1145"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1"
guidetolerance="10000"
objecttolerance="10000">
<inkscape:grid
type="xygrid"
id="grid3792"
empspacing="10"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke-width:0.43599999;stroke-miterlimit:4;stroke-dasharray:none"
id="rect3796"
width="19"
height="2"
x="1"
y="8" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
id="Foreground"
x="0px"
y="0px"
width="32"
height="32"
viewBox="0 0 23.272727 23.272727"
enable-background="new 0 0 16 16"
xml:space="preserve"
sodipodi:version="0.32"
inkscape:version="0.48.2 r9819"
sodipodi:docname="summary-counter.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
id="metadata2399"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs2397"><linearGradient
id="linearGradient3173"><stop
style="stop-color:#c4c4c4;stop-opacity:1;"
offset="0"
id="stop3175" /><stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
id="stop3177" /></linearGradient><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 8 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="16 : 8 : 1"
inkscape:persp3d-origin="8 : 5.3333333 : 1"
id="perspective2401" /><filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter16494-4"
x="-0.20989846"
width="1.4197969"
y="-0.20903821"
height="1.4180764"><feGaussianBlur
inkscape:collect="always"
stdDeviation="1.3282637"
id="feGaussianBlur16496-8" /></filter><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient16498-6"
id="radialGradient16504-1"
cx="7.6582627"
cy="5.8191104"
fx="7.6582627"
fy="5.8191104"
r="8.6928644"
gradientTransform="matrix(1.0474339,0,0,1.0517402,-0.3632615,-0.42032492)"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
id="linearGradient16498-6"><stop
style="stop-color:#9FD0FF;stop-opacity:1"
offset="0"
id="stop16500-8" /><stop
style="stop-color:#3465A4;stop-opacity:1"
offset="1"
id="stop16502-0" /></linearGradient></defs><sodipodi:namedview
inkscape:window-height="709"
inkscape:window-width="1366"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#000000"
id="base"
showgrid="false"
inkscape:zoom="11.313708"
inkscape:cx="15.386407"
inkscape:cy="13.739577"
inkscape:window-x="0"
inkscape:window-y="1179"
inkscape:current-layer="g16402-8"
showguides="true"
inkscape:guide-bbox="true"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:window-maximized="1"><inkscape:grid
type="xygrid"
id="grid11246"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" /></sodipodi:namedview><g
style="display:inline"
id="g16402-8"
transform="translate(4.7533483,2.8238929)"><g
id="g3175-4"
transform="translate(-0.89995416,0.94028614)"><path
sodipodi:type="inkscape:offset"
inkscape:radius="0"
inkscape:original="M 7.65625 0.125 C 3.2589349 0.125 -0.3125 3.7070002 -0.3125 8.125 C -0.3125 12.543001 3.2589349 16.125 7.65625 16.125 C 12.053566 16.125 15.625 12.543001 15.625 8.125 C 15.625 3.7070002 12.053566 0.125 7.65625 0.125 z "
xlink:href="#path2394-32"
style="opacity:0.52994014;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:2.18181825;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter16494-4);enable-background:accumulate"
id="path16480-5"
inkscape:href="#path2394-32"
d="m 7.65625,0.125 c -4.3973151,0 -7.96875,3.5820002 -7.96875,8 0,4.418001 3.5714349,8 7.96875,8 4.397316,0 7.96875,-3.581999 7.96875,-8 0,-4.4179998 -3.571434,-8 -7.96875,-8 z"
transform="translate(0,1.028519)" /><path
clip-rule="evenodd"
d="m -0.30428257,8.1237596 c 0,-4.4179998 3.56522987,-7.9999996 7.96254497,-7.9999996 4.3973156,0 7.9625456,3.5819998 7.9625456,7.9999996 0,4.4180014 -3.56523,8.0000004 -7.9625456,8.0000004 -4.3973151,0 -7.96254497,-3.581999 -7.96254497,-8.0000004 z"
id="path2394-32"
style="color:#000000;fill:url(#radialGradient16504-1);fill-opacity:1;fill-rule:nonzero;stroke:#eeeeec;stroke-width:1.4545455;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:nodetypes="csssc"
inkscape:connector-curvature="0" /><g
id="g3172-6" /></g></g></svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

View File

@@ -24,7 +24,7 @@ ifaces = [
] ]
foreach iface : ifaces foreach iface : ifaces
custom_target(iface[0] + ' docs', custom_target(iface[0] + ' docs',
input: '../../../data/dbus-interfaces/@0@.xml'.format(iface[0]), input: '../../../data/@0@.xml'.format(iface[0]),
output: 'doc-gen-' + iface[1], output: 'doc-gen-' + iface[1],
command: [ command: [
'gdbus-codegen', 'gdbus-codegen',

View File

@@ -17,6 +17,7 @@
<chapter> <chapter>
<title>Actors</title> <title>Actors</title>
<xi:include href="xml/shell-generic-container.xml"/>
<xi:include href="xml/shell-stack.xml"/> <xi:include href="xml/shell-stack.xml"/>
</chapter> </chapter>
<chapter> <chapter>

View File

@@ -13,9 +13,18 @@ const _ = Gettext.gettext;
const Config = imports.misc.config; const Config = imports.misc.config;
const ExtensionUtils = imports.misc.extensionUtils; const ExtensionUtils = imports.misc.extensionUtils;
const { loadInterfaceXML } = imports.misc.fileUtils;
const GnomeShellIface = loadInterfaceXML('org.gnome.Shell.Extensions'); const GnomeShellIface = `
<node>
<interface name="org.gnome.Shell.Extensions">
<signal name="ExtensionStatusChanged">
<arg type="s" name="uuid"/>
<arg type="i" name="state"/>
<arg type="s" name="error"/>
</signal>
</interface>
</node>`;
const GnomeShellProxy = Gio.DBusProxy.makeProxyWrapper(GnomeShellIface); const GnomeShellProxy = Gio.DBusProxy.makeProxyWrapper(GnomeShellIface);
function stripPrefix(string, prefix) { function stripPrefix(string, prefix) {

View File

@@ -408,18 +408,16 @@ Signals.addSignalMethods(SessionMenuButton.prototype);
var LoginDialog = new Lang.Class({ var LoginDialog = new Lang.Class({
Name: 'LoginDialog', Name: 'LoginDialog',
Extends: St.Widget,
Signals: { 'failed': {} },
_init(parentActor) { _init(parentActor) {
this.parent({ style_class: 'login-dialog', this.actor = new Shell.GenericContainer({ style_class: 'login-dialog',
visible: false }); visible: false });
this.actor.get_accessible().set_role(Atk.Role.WINDOW);
this.get_accessible().set_role(Atk.Role.WINDOW); this.actor.add_constraint(new Layout.MonitorConstraint({ primary: true }));
this.actor.connect('allocate', this._onAllocate.bind(this));
this.add_constraint(new Layout.MonitorConstraint({ primary: true })); this.actor.connect('destroy', this._onDestroy.bind(this));
this.connect('destroy', this._onDestroy.bind(this)); parentActor.add_child(this.actor);
parentActor.add_child(this);
this._userManager = AccountsService.UserManager.get_default() this._userManager = AccountsService.UserManager.get_default()
this._gdmClient = new Gdm.Client(); this._gdmClient = new Gdm.Client();
@@ -444,7 +442,7 @@ var LoginDialog = new Lang.Class({
y_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.CENTER,
vertical: true, vertical: true,
visible: false }); visible: false });
this.add_child(this._userSelectionBox); this.actor.add_child(this._userSelectionBox);
this._userList = new UserList(); this._userList = new UserList();
this._userSelectionBox.add(this._userList.actor, this._userSelectionBox.add(this._userList.actor,
@@ -456,7 +454,7 @@ var LoginDialog = new Lang.Class({
this._authPrompt.connect('prompted', this._onPrompted.bind(this)); this._authPrompt.connect('prompted', this._onPrompted.bind(this));
this._authPrompt.connect('reset', this._onReset.bind(this)); this._authPrompt.connect('reset', this._onReset.bind(this));
this._authPrompt.hide(); this._authPrompt.hide();
this.add_child(this._authPrompt.actor); this.actor.add_child(this._authPrompt.actor);
// translators: this message is shown below the user list on the // translators: this message is shown below the user list on the
// login screen. It can be activated to reveal an entry for // login screen. It can be activated to reveal an entry for
@@ -484,7 +482,7 @@ var LoginDialog = new Lang.Class({
opacity: 0, opacity: 0,
vscrollbar_policy: Gtk.PolicyType.AUTOMATIC, vscrollbar_policy: Gtk.PolicyType.AUTOMATIC,
hscrollbar_policy: Gtk.PolicyType.NEVER }); hscrollbar_policy: Gtk.PolicyType.NEVER });
this.add_child(this._bannerView); this.actor.add_child(this._bannerView);
let bannerBox = new St.BoxLayout({ vertical: true }); let bannerBox = new St.BoxLayout({ vertical: true });
@@ -499,7 +497,7 @@ var LoginDialog = new Lang.Class({
this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin', this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin',
x_align: Clutter.ActorAlign.CENTER, x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.END }); y_align: Clutter.ActorAlign.END });
this.add_child(this._logoBin); this.actor.add_child(this._logoBin);
this._updateLogo(); this._updateLogo();
this._userList.connect('activate', (userList, item) => { this._userList.connect('activate', (userList, item) => {
@@ -578,12 +576,7 @@ var LoginDialog = new Lang.Class({
return actorBox; return actorBox;
}, },
vfunc_allocate(dialogBox, flags) { _onAllocate(actor, dialogBox, flags) {
this.set_allocation(dialogBox, flags);
let themeNode = this.get_theme_node();
dialogBox = themeNode.get_content_box(dialogBox);
let dialogWidth = dialogBox.x2 - dialogBox.x1; let dialogWidth = dialogBox.x2 - dialogBox.x1;
let dialogHeight = dialogBox.y2 - dialogBox.y1; let dialogHeight = dialogBox.y2 - dialogBox.y1;
@@ -926,10 +919,10 @@ var LoginDialog = new Lang.Class({
}, },
_loginScreenSessionActivated() { _loginScreenSessionActivated() {
if (this.opacity == 255 && this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING) if (this.actor.opacity == 255 && this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
return; return;
Tweener.addTween(this, Tweener.addTween(this.actor,
{ opacity: 255, { opacity: 255,
time: _FADE_ANIMATION_TIME, time: _FADE_ANIMATION_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
@@ -938,7 +931,7 @@ var LoginDialog = new Lang.Class({
for (let i = 0; i < children.length; i++) { for (let i = 0; i < children.length; i++) {
if (children[i] != Main.layoutManager.screenShieldGroup) if (children[i] != Main.layoutManager.screenShieldGroup)
children[i].opacity = this.opacity; children[i].opacity = this.actor.opacity;
} }
}, },
onUpdateScope: this, onUpdateScope: this,
@@ -959,7 +952,7 @@ var LoginDialog = new Lang.Class({
}, },
_startSession(serviceName) { _startSession(serviceName) {
Tweener.addTween(this, Tweener.addTween(this.actor,
{ opacity: 0, { opacity: 0,
time: _FADE_ANIMATION_TIME, time: _FADE_ANIMATION_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
@@ -968,7 +961,7 @@ var LoginDialog = new Lang.Class({
for (let i = 0; i < children.length; i++) { for (let i = 0; i < children.length; i++) {
if (children[i] != Main.layoutManager.screenShieldGroup) if (children[i] != Main.layoutManager.screenShieldGroup)
children[i].opacity = this.opacity; children[i].opacity = this.actor.opacity;
} }
}, },
onUpdateScope: this, onUpdateScope: this,
@@ -1237,17 +1230,17 @@ var LoginDialog = new Lang.Class({
}, },
open() { open() {
Main.ctrlAltTabManager.addGroup(this, Main.ctrlAltTabManager.addGroup(this.actor,
_("Login Window"), _("Login Window"),
'dialog-password-symbolic', 'dialog-password-symbolic',
{ sortGroup: CtrlAltTab.SortGroup.MIDDLE }); { sortGroup: CtrlAltTab.SortGroup.MIDDLE });
this._userList.actor.grab_key_focus(); this._userList.actor.grab_key_focus();
this.show(); this.actor.show();
this.opacity = 0; this.actor.opacity = 0;
Main.pushModal(this, { actionMode: Shell.ActionMode.LOGIN_SCREEN }); Main.pushModal(this.actor, { actionMode: Shell.ActionMode.LOGIN_SCREEN });
Tweener.addTween(this, Tweener.addTween(this.actor,
{ opacity: 255, { opacity: 255,
time: 1, time: 1,
transition: 'easeInQuad' }); transition: 'easeInQuad' });
@@ -1256,8 +1249,8 @@ var LoginDialog = new Lang.Class({
}, },
close() { close() {
Main.popModal(this); Main.popModal(this.actor);
Main.ctrlAltTabManager.removeGroup(this); Main.ctrlAltTabManager.removeGroup(this.actor);
}, },
cancel() { cancel() {
@@ -1272,3 +1265,4 @@ var LoginDialog = new Lang.Class({
this._authPrompt.finish(onComplete); this._authPrompt.finish(onComplete);
}, },
}); });
Signals.addSignalMethods(LoginDialog.prototype);

View File

@@ -5,15 +5,61 @@ const Lang = imports.lang;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const Signals = imports.signals; const Signals = imports.signals;
const { loadInterfaceXML } = imports.misc.fileUtils; const ProviderIface = `
<node>
const ProviderIface = loadInterfaceXML("org.freedesktop.realmd.Provider"); <interface name="org.freedesktop.realmd.Provider">
<property name="Name" type="s" access="read"/>
<property name="Version" type="s" access="read"/>
<property name="Realms" type="ao" access="read"/>
<method name="Discover">
<arg name="string" type="s" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/>
<arg name="relevance" type="i" direction="out"/>
<arg name="realm" type="ao" direction="out"/>
</method>
</interface>
</node>`;
const Provider = Gio.DBusProxy.makeProxyWrapper(ProviderIface); const Provider = Gio.DBusProxy.makeProxyWrapper(ProviderIface);
const ServiceIface = loadInterfaceXML("org.freedesktop.realmd.Service"); const ServiceIface = `
<node>
<interface name="org.freedesktop.realmd.Service">
<method name="Cancel">
<arg name="operation" type="s" direction="in"/>
</method>
<method name="Release" />
<method name="SetLocale">
<arg name="locale" type="s" direction="in"/>
</method>
<signal name="Diagnostics">
<arg name="data" type="s"/>
<arg name="operation" type="s"/>
</signal>
</interface>
</node>`;
const Service = Gio.DBusProxy.makeProxyWrapper(ServiceIface); const Service = Gio.DBusProxy.makeProxyWrapper(ServiceIface);
const RealmIface = loadInterfaceXML("org.freedesktop.realmd.Realm"); const RealmIface = `
<node>
<interface name="org.freedesktop.realmd.Realm">
<property name="Name" type="s" access="read"/>
<property name="Configured" type="s" access="read"/>
<property name="Details" type="a(ss)" access="read"/>
<property name="LoginFormats" type="as" access="read"/>
<property name="LoginPolicy" type="s" access="read"/>
<property name="PermittedLogins" type="as" access="read"/>
<property name="SupportedInterfaces" type="as" access="read"/>
<method name="ChangeLoginPolicy">
<arg name="login_policy" type="s" direction="in"/>
<arg name="permitted_add" type="as" direction="in"/>
<arg name="permitted_remove" type="as" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/>
</method>
<method name="Deconfigure">
<arg name="options" type="a{sv}" direction="in"/>
</method>
</interface>
</node>`;
const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface); const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface);
var Manager = new Lang.Class({ var Manager = new Lang.Class({

View File

@@ -14,7 +14,6 @@ var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
var LOCALEDIR = '@datadir@/locale'; var LOCALEDIR = '@datadir@/locale';
/* other standard directories */ /* other standard directories */
var LIBEXECDIR = '@libexecdir@'; var LIBEXECDIR = '@libexecdir@';
var PKGDATADIR = '@datadir@/@PACKAGE_NAME@';
var VPNDIR = '@vpndir@'; var VPNDIR = '@vpndir@';
/* g-i package versions */ /* g-i package versions */
var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@' var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'

View File

@@ -3,7 +3,6 @@
const Gio = imports.gi.Gio; const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib; const GLib = imports.gi.GLib;
const Lang = imports.lang; const Lang = imports.lang;
const Config = imports.misc.config;
const Params = imports.misc.params; const Params = imports.misc.params;
function collectFromDatadirs(subdir, includeUserDir, processFile) { function collectFromDatadirs(subdir, includeUserDir, processFile) {
@@ -71,30 +70,3 @@ function recursivelyMoveDir(srcDir, destDir) {
recursivelyMoveDir(srcChild, destChild); recursivelyMoveDir(srcChild, destChild);
} }
} }
let _ifaceResource = null;
function loadInterfaceXML(iface) {
if (!_ifaceResource) {
// don't use global.datadir so the method is usable from tests/tools
let dir = GLib.getenv ('GNOME_SHELL_DATADIR') || Config.PKGDATADIR;
let path = dir + '/gnome-shell-dbus-interfaces.gresource';
_ifaceResource = Gio.Resource.load(path);
_ifaceResource._register();
}
let xml = null;
let uri = 'resource:///org/gnome/shell/dbus-interfaces/' + iface + '.xml';
let f = Gio.File.new_for_uri(uri);
try {
let [ok, bytes] = f.load_contents(null);
if (bytes instanceof Uint8Array)
xml = imports.byteArray.toString(bytes)
else
xml = bytes.toString();
} catch (e) {
log('Failed to load D-Bus interface ' + iface);
}
return xml;
}

View File

@@ -4,9 +4,18 @@ const Gio = imports.gi.Gio;
const Lang = imports.lang; const Lang = imports.lang;
const Signals = imports.signals; const Signals = imports.signals;
const { loadInterfaceXML } = imports.misc.fileUtils; const PresenceIface = `
<node>
const PresenceIface = loadInterfaceXML('org.gnome.SessionManager.Presence'); <interface name="org.gnome.SessionManager.Presence">
<method name="SetStatus">
<arg type="u" direction="in"/>
</method>
<property name="status" type="u" access="readwrite"/>
<signal name="StatusChanged">
<arg type="u" direction="out"/>
</signal>
</interface>
</node>`;
var PresenceStatus = { var PresenceStatus = {
AVAILABLE: 0, AVAILABLE: 0,
@@ -24,14 +33,49 @@ function Presence(initCallback, cancellable) {
// Note inhibitors are immutable objects, so they don't // Note inhibitors are immutable objects, so they don't
// change at runtime (changes always come in the form // change at runtime (changes always come in the form
// of new inhibitors) // of new inhibitors)
const InhibitorIface = loadInterfaceXML('org.gnome.SessionManager.Inhibitor'); const InhibitorIface = `
<node>
<interface name="org.gnome.SessionManager.Inhibitor">
<method name="GetAppId">
<arg type="s" direction="out" />
</method>
<method name="GetReason">
<arg type="s" direction="out" />
</method>
</interface>
</node>`;
var InhibitorProxy = Gio.DBusProxy.makeProxyWrapper(InhibitorIface); var InhibitorProxy = Gio.DBusProxy.makeProxyWrapper(InhibitorIface);
function Inhibitor(objectPath, initCallback, cancellable) { function Inhibitor(objectPath, initCallback, cancellable) {
return new InhibitorProxy(Gio.DBus.session, 'org.gnome.SessionManager', objectPath, initCallback, cancellable); return new InhibitorProxy(Gio.DBus.session, 'org.gnome.SessionManager', objectPath, initCallback, cancellable);
} }
// Not the full interface, only the methods we use // Not the full interface, only the methods we use
const SessionManagerIface = loadInterfaceXML('org.gnome.SessionManager'); const SessionManagerIface = `
<node>
<interface name="org.gnome.SessionManager">
<method name="Logout">
<arg type="u" direction="in" />
</method>
<method name="Shutdown" />
<method name="Reboot" />
<method name="CanShutdown">
<arg type="b" direction="out" />
</method>
<method name="IsInhibited">
<arg type="u" direction="in" />
<arg type="b" direction="out" />
</method>
<property name="SessionIsActive" type="b" access="read"/>
<signal name="InhibitorAdded">
<arg type="o" direction="out"/>
</signal>
<signal name="InhibitorRemoved">
<arg type="o" direction="out"/>
</signal>
</interface>
</node>`;
var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface); var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface);
function SessionManager(initCallback, cancellable) { function SessionManager(initCallback, cancellable) {
return new SessionManagerProxy(Gio.DBus.session, 'org.gnome.SessionManager', '/org/gnome/SessionManager', initCallback, cancellable); return new SessionManagerProxy(Gio.DBus.session, 'org.gnome.SessionManager', '/org/gnome/SessionManager', initCallback, cancellable);

View File

@@ -76,7 +76,6 @@ var HistoryManager = new Lang.Class({
if (this._history.length == 0 || if (this._history.length == 0 ||
this._history[this._history.length - 1] != input) { this._history[this._history.length - 1] != input) {
this._history = this._history.filter(entry => entry != input);
this._history.push(input); this._history.push(input);
this._save(); this._save();
} }

View File

@@ -119,11 +119,6 @@ var IBusManager = new Lang.Class({
let cursorLocation = { x, y, width: w, height: h }; let cursorLocation = { x, y, width: w, height: h };
this.emit('set-cursor-location', cursorLocation); this.emit('set-cursor-location', cursorLocation);
}); });
this._panelService.connect('focus-in', (panel, path) => {
if (!GLib.str_has_suffix(path, '/InputContext_1'))
this.emit ('focus-in');
});
this._panelService.connect('focus-out', () => { this.emit('focus-out'); });
try { try {
// IBus versions older than 1.5.10 have a bug which // IBus versions older than 1.5.10 have a bug which

View File

@@ -15,9 +15,10 @@ var InputMethod = new Lang.Class({
this._purpose = 0; this._purpose = 0;
this._enabled = true; this._enabled = true;
this._currentFocus = null; this._currentFocus = null;
this._currentEvent = null;
this._doForwardEvent = false;
this._preeditStr = ''; this._preeditStr = '';
this._preeditPos = 0; this._preeditPos = 0;
this._preeditVisible = false;
this._ibus = IBus.Bus.new_async(); this._ibus = IBus.Bus.new_async();
this._ibus.connect('connected', this._onConnected.bind(this)); this._ibus.connect('connected', this._onConnected.bind(this));
this._ibus.connect('disconnected', this._clear.bind(this)); this._ibus.connect('disconnected', this._clear.bind(this));
@@ -28,6 +29,9 @@ var InputMethod = new Lang.Class({
this._onSourceChanged.bind(this)); this._onSourceChanged.bind(this));
this._currentSource = this._inputSourceManager.currentSource; this._currentSource = this._inputSourceManager.currentSource;
let deviceManager = Clutter.DeviceManager.get_default();
this._virtualDevice = deviceManager.create_virtual_device(Clutter.InputDeviceType.KEYBOARD_DEVICE);
if (this._ibus.is_connected()) if (this._ibus.is_connected())
this._onConnected(); this._onConnected();
}, },
@@ -81,7 +85,6 @@ var InputMethod = new Lang.Class({
this._enabled = false; this._enabled = false;
this._preeditStr = '' this._preeditStr = ''
this._preeditPos = 0; this._preeditPos = 0;
this._preeditVisible = false;
}, },
_emitRequestSurrounding() { _emitRequestSurrounding() {
@@ -100,41 +103,38 @@ var InputMethod = new Lang.Class({
_onUpdatePreeditText(context, text, pos, visible) { _onUpdatePreeditText(context, text, pos, visible) {
if (text == null) if (text == null)
return; return;
this._preeditStr = text.get_text();
let preedit = text.get_text();
if (visible)
this.set_preedit_text(preedit, pos);
else if (this._preeditVisible)
this.set_preedit_text(null, pos);
this._preeditStr = preedit;
this._preeditPos = pos; this._preeditPos = pos;
this._preeditVisible = visible; if (visible)
this.set_preedit_text(this._preeditStr, pos);
else
this.set_preedit_text(null, pos);
}, },
_onShowPreeditText(context) { _onShowPreeditText(context) {
this._preeditVisible = true;
this.set_preedit_text(this._preeditStr, this._preeditPos); this.set_preedit_text(this._preeditStr, this._preeditPos);
}, },
_onHidePreeditText(context) { _onHidePreeditText(context) {
this.set_preedit_text(null, this._preeditPos); this.set_preedit_text(null, this._preeditPos);
this._preeditVisible = false;
}, },
_onForwardKeyEvent(context, keyval, keycode, state) { _onForwardKeyEvent(context, keyval, keycode, state) {
let press = (state & IBus.ModifierType.RELEASE_MASK) == 0; let press = (state & IBus.ModifierType.RELEASE_MASK) == 0;
state &= ~(IBus.ModifierType.RELEASE_MASK);
let curEvent = Clutter.get_current_event(); if (this._currentEvent) {
let time; // If we are handling this same event in filter_key_press(),
if (curEvent) // just let it go through, sending the same event again will
time = curEvent.get_time(); // be silenced away because the key counts as pressed.
else if (this._currentEvent.get_key_symbol() == keyval &&
time = global.display.get_current_time_roundtrip(); (this._currentEvent.type() == Clutter.EventType.KEY_PRESS) == press) {
this._doForwardEvent = true;
return;
}
}
this.forward_key(keyval, keycode + 8, state & Clutter.ModifierType.MODIFIER_MASK, time, press); this._virtualDevice.notify_key(Clutter.get_current_event_time(), keycode,
press ? Clutter.KeyState.PRESSED : Clutter.KeyState.RELEASED);
}, },
vfunc_focus_in(focus) { vfunc_focus_in(focus) {
@@ -153,11 +153,8 @@ var InputMethod = new Lang.Class({
this._updateCapabilities(); this._updateCapabilities();
} }
if (this._preeditStr) { // Unset any preedit text
// Unset any preedit text this.set_preedit_text(null, 0);
this.set_preedit_text(null, 0);
this._preeditStr = null;
}
}, },
vfunc_reset() { vfunc_reset() {
@@ -166,11 +163,8 @@ var InputMethod = new Lang.Class({
this._emitRequestSurrounding(); this._emitRequestSurrounding();
} }
if (this._preeditStr) { // Unset any preedit text
// Unset any preedit text this.set_preedit_text(null, 0);
this.set_preedit_text(null, 0);
this._preeditStr = null;
}
}, },
vfunc_set_cursor_location(rect) { vfunc_set_cursor_location(rect) {
@@ -182,11 +176,8 @@ var InputMethod = new Lang.Class({
}, },
vfunc_set_surrounding(text, cursor, anchor) { vfunc_set_surrounding(text, cursor, anchor) {
if (!this._context || !text) if (this._context)
return; this._context.set_surrounding_text(text, cursor, anchor);
let ibusText = IBus.Text.new_from_string(text);
this._context.set_surrounding_text(ibusText, cursor, anchor);
}, },
vfunc_update_content_hints(hints) { vfunc_update_content_hints(hints) {
@@ -248,13 +239,22 @@ var InputMethod = new Lang.Class({
if (event.type() == Clutter.EventType.KEY_RELEASE) if (event.type() == Clutter.EventType.KEY_RELEASE)
state |= IBus.ModifierType.RELEASE_MASK; state |= IBus.ModifierType.RELEASE_MASK;
this._currentEvent = event;
this._doForwardEvent = false;
this._context.process_key_event_async(event.get_key_symbol(), this._context.process_key_event_async(event.get_key_symbol(),
event.get_key_code() - 8, // Convert XKB keycodes to evcodes event.get_key_code() - 8, // Convert XKB keycodes to evcodes
state, -1, null, state, -1, null,
(context, res) => { (context, res) => {
try { try {
let retval = context.process_key_event_async_finish(res); let retval = context.process_key_event_async_finish(res);
if (this._doForwardEvent)
retval = false;
this.notify_key_event(event, retval); this.notify_key_event(event, retval);
this._doForwardEvent = false;
this._currentEvent = null;
} catch (e) { } catch (e) {
log('Error processing key on IM: ' + e.message); log('Error processing key on IM: ' + e.message);
} }

View File

@@ -52,20 +52,11 @@ var KeyboardManager = new Lang.Class({
this._current = null; this._current = null;
this._localeLayoutInfo = this._getLocaleLayout(); this._localeLayoutInfo = this._getLocaleLayout();
this._layoutInfos = {}; this._layoutInfos = {};
this._currentKeymap = null;
}, },
_applyLayoutGroup(group) { _applyLayoutGroup(group) {
let options = this._buildOptionsString(); let options = this._buildOptionsString();
let [layouts, variants] = this._buildGroupStrings(group); let [layouts, variants] = this._buildGroupStrings(group);
if (this._currentKeymap &&
this._currentKeymap.layouts == layouts &&
this._currentKeymap.variants == variants &&
this._currentKeymap.options == options)
return;
this._currentKeymap = {layouts, variants, options};
Meta.get_backend().set_keymap(layouts, variants, options); Meta.get_backend().set_keymap(layouts, variants, options);
}, },
@@ -98,6 +89,8 @@ var KeyboardManager = new Lang.Class({
}, },
setUserLayouts(ids) { setUserLayouts(ids) {
let currentId = this._current ? this._current.id : null;
let currentGroupIndex = this._current ? this._current.groupIndex : null;
this._current = null; this._current = null;
this._layoutInfos = {}; this._layoutInfos = {};
@@ -124,6 +117,9 @@ var KeyboardManager = new Lang.Class({
info.group = group; info.group = group;
info.groupIndex = groupIndex; info.groupIndex = groupIndex;
if (currentId == id && currentGroupIndex == groupIndex)
this._current = info;
i += 1; i += 1;
} }
}, },

View File

@@ -7,11 +7,56 @@ const Mainloop = imports.mainloop;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const Signals = imports.signals; const Signals = imports.signals;
const { loadInterfaceXML } = imports.misc.fileUtils; const SystemdLoginManagerIface = `
<node>
<interface name="org.freedesktop.login1.Manager">
<method name="Suspend">
<arg type="b" direction="in"/>
</method>
<method name="CanSuspend">
<arg type="s" direction="out"/>
</method>
<method name="Inhibit">
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="s" direction="in"/>
<arg type="h" direction="out"/>
</method>
<method name="GetSession">
<arg type="s" direction="in"/>
<arg type="o" direction="out"/>
</method>
<method name="ListSessions">
<arg name="sessions" type="a(susso)" direction="out"/>
</method>
<signal name="PrepareForSleep">
<arg type="b" direction="out"/>
</signal>
</interface>
</node>`;
const SystemdLoginManagerIface = loadInterfaceXML('org.freedesktop.login1.Manager'); const SystemdLoginSessionIface = `
const SystemdLoginSessionIface = loadInterfaceXML('org.freedesktop.login1.Session'); <node>
const SystemdLoginUserIface = loadInterfaceXML('org.freedesktop.login1.User'); <interface name="org.freedesktop.login1.Session">
<signal name="Lock" />
<signal name="Unlock" />
<property name="Active" type="b" access="read" />
<property name="Class" type="s" access="read" />
<property name="Id" type="s" access="read" />
<method name="SetLockedHint">
<arg type="b" direction="in"/>
</method>
</interface>
</node>`;
const SystemdLoginUserIface = `
<node>
<interface name="org.freedesktop.login1.User">
<property name="Display" type="(so)" access="read" />
<property name="Sessions" type="a(so)" access="read" />
</interface>
</node>`;
const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface); const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface);
const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface); const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface);

View File

@@ -5,8 +5,6 @@ const Lang = imports.lang;
const NMA = imports.gi.NMA; const NMA = imports.gi.NMA;
const Signals = imports.signals; const Signals = imports.signals;
const { loadInterfaceXML } = imports.misc.fileUtils;
// _getMobileProvidersDatabase: // _getMobileProvidersDatabase:
// //
// Gets the database of mobile providers, with references between MCCMNC/SID and // Gets the database of mobile providers, with references between MCCMNC/SID and
@@ -94,10 +92,44 @@ function _findProviderForSid(sid) {
// The following are not the complete interfaces, just the methods we need // The following are not the complete interfaces, just the methods we need
// (or may need in the future) // (or may need in the future)
const ModemGsmNetworkInterface = loadInterfaceXML('org.freedesktop.ModemManager.Modem.Gsm.Network'); const ModemGsmNetworkInterface = `
<node>
<interface name="org.freedesktop.ModemManager.Modem.Gsm.Network">
<method name="GetRegistrationInfo">
<arg type="(uss)" direction="out" />
</method>
<method name="GetSignalQuality">
<arg type="u" direction="out" />
</method>
<property name="AccessTechnology" type="u" access="read" />
<signal name="SignalQuality">
<arg type="u" direction="out" />
</signal>
<signal name="RegistrationInfo">
<arg type="u" direction="out" />
<arg type="s" direction="out" />
<arg type="s" direction="out" />
</signal>
</interface>
</node>`;
const ModemGsmNetworkProxy = Gio.DBusProxy.makeProxyWrapper(ModemGsmNetworkInterface); const ModemGsmNetworkProxy = Gio.DBusProxy.makeProxyWrapper(ModemGsmNetworkInterface);
const ModemCdmaInterface = loadInterfaceXML('org.freedesktop.ModemManager.Modem.Cdma'); const ModemCdmaInterface = `
<node>
<interface name="org.freedesktop.ModemManager.Modem.Cdma">
<method name="GetSignalQuality">
<arg type="u" direction="out" />
</method>
<method name="GetServingSystem">
<arg type="(usu)" direction="out" />
</method>
<signal name="SignalQuality">
<arg type="u" direction="out" />
</signal>
</interface>
</node>`;
const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface); const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface);
var ModemGsm = new Lang.Class({ var ModemGsm = new Lang.Class({
@@ -192,13 +224,29 @@ Signals.addSignalMethods(ModemCdma.prototype);
// Support for the new ModemManager1 interface (MM >= 0.7) // Support for the new ModemManager1 interface (MM >= 0.7)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
const BroadbandModemInterface = loadInterfaceXML('org.freedesktop.ModemManager1.Modem'); const BroadbandModemInterface = `
<node>
<interface name="org.freedesktop.ModemManager1.Modem">
<property name="SignalQuality" type="(ub)" access="read" />
</interface>
</node>`;
const BroadbandModemProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemInterface); const BroadbandModemProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemInterface);
const BroadbandModem3gppInterface = loadInterfaceXML('org.freedesktop.ModemManager1.Modem.Modem3gpp'); const BroadbandModem3gppInterface = `
<node>
<interface name="org.freedesktop.ModemManager1.Modem.Modem3gpp">
<property name="OperatorCode" type="s" access="read" />
<property name="OperatorName" type="s" access="read" />
</interface>
</node>`;
const BroadbandModem3gppProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModem3gppInterface); const BroadbandModem3gppProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModem3gppInterface);
const BroadbandModemCdmaInterface = loadInterfaceXML('org.freedesktop.ModemManager1.Modem.ModemCdma'); const BroadbandModemCdmaInterface = `
<node>
<interface name="org.freedesktop.ModemManager1.Modem.ModemCdma">
<property name="Sid" type="u" access="read" />
</interface>
</node>`;
const BroadbandModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemCdmaInterface); const BroadbandModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemCdmaInterface);
var BroadbandModem = new Lang.Class({ var BroadbandModem = new Lang.Class({

View File

@@ -237,12 +237,11 @@ var ObjectManager = new Lang.Class({
_onNameVanished() { _onNameVanished() {
let objectPaths = Object.keys(this._objects); let objectPaths = Object.keys(this._objects);
for (let i = 0; i < objectPaths.length; i++) { for (let i = 0; i < objectPaths.length; i++) {
let objectPath = objectPaths[i]; let object = this._objects[objectPaths];
let object = this._objects[objectPath];
let interfaceNames = Object.keys(object); let interfaceNames = Object.keys(object);
for (let j = 0; j < interfaceNames.length; j++) { for (let j = 0; i < interfaceNames.length; i++) {
let interfaceName = interfaceNames[j]; let interfaceName = interfaceNames[i];
if (object[interfaceName]) if (object[interfaceName])
this._removeInterface(objectPath, interfaceName); this._removeInterface(objectPath, interfaceName);

View File

@@ -2,9 +2,32 @@
const Gio = imports.gi.Gio; const Gio = imports.gi.Gio;
const { loadInterfaceXML } = imports.misc.fileUtils; const PermissionStoreIface = `
<node>
<interface name="org.freedesktop.impl.portal.PermissionStore">
<method name="Lookup">
<arg name="table" type="s" direction="in"/>
<arg name="id" type="s" direction="in"/>
<arg name="permissions" type="a{sas}" direction="out"/>
<arg name="data" type="v" direction="out"/>
</method>
<method name="Set">
<arg name="table" type="s" direction="in"/>
<arg name="create" type="b" direction="in"/>
<arg name="id" type="s" direction="in"/>
<arg name="app_permissions" type="a{sas}" direction="in"/>
<arg name="data" type="v" direction="in"/>
</method>
<signal name="Changed">
<arg name="table" type="s" direction="out"/>
<arg name="id" type="s" direction="out"/>
<arg name="deleted" type="b" direction="out"/>
<arg name="data" type="v" direction="out"/>
<arg name="permissions" type="a{sas}" direction="out"/>
</signal>
</interface>
</node>`;
const PermissionStoreIface = loadInterfaceXML('org.freedesktop.impl.portal.PermissionStore');
const PermissionStoreProxy = Gio.DBusProxy.makeProxyWrapper(PermissionStoreIface); const PermissionStoreProxy = Gio.DBusProxy.makeProxyWrapper(PermissionStoreIface);
function PermissionStore(initCallback, cancellable) { function PermissionStore(initCallback, cancellable) {

View File

@@ -11,8 +11,6 @@ const GnomeSession = imports.misc.gnomeSession;
const LoginManager = imports.misc.loginManager; const LoginManager = imports.misc.loginManager;
const Main = imports.ui.main; const Main = imports.ui.main;
const { loadInterfaceXML } = imports.misc.fileUtils;
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown'; const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen'; const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen';
const DISABLE_USER_SWITCH_KEY = 'disable-user-switching'; const DISABLE_USER_SWITCH_KEY = 'disable-user-switching';
@@ -24,7 +22,12 @@ const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out';
const SENSOR_BUS_NAME = 'net.hadess.SensorProxy'; const SENSOR_BUS_NAME = 'net.hadess.SensorProxy';
const SENSOR_OBJECT_PATH = '/net/hadess/SensorProxy'; const SENSOR_OBJECT_PATH = '/net/hadess/SensorProxy';
const SensorProxyInterface = loadInterfaceXML('net.hadess.SensorProxy'); const SensorProxyInterface = `
<node>
<interface name="net.hadess.SensorProxy">
<property name="HasAccelerometer" type="b" access="read"/>
</interface>
</node>`;
const POWER_OFF_ACTION_ID = 'power-off'; const POWER_OFF_ACTION_ID = 'power-off';
const LOCK_SCREEN_ACTION_ID = 'lock-screen'; const LOCK_SCREEN_ACTION_ID = 'lock-screen';

View File

@@ -243,13 +243,13 @@ function formatTime(time, params) {
followed by a time string in 24h format. followed by a time string in 24h format.
i.e. "May 25, 14:30" */ i.e. "May 25, 14:30" */
// xgettext:no-c-format // xgettext:no-c-format
format = N_("%B %-d, %H\u2236%M"); format = N_("%B %d, %H\u2236%M");
else else
/* Translators: this is the month name, day number, year /* Translators: this is the month name, day number, year
number followed by a time string in 24h format. number followed by a time string in 24h format.
i.e. "May 25 2012, 14:30" */ i.e. "May 25 2012, 14:30" */
// xgettext:no-c-format // xgettext:no-c-format
format = N_("%B %-d %Y, %H\u2236%M"); format = N_("%B %d %Y, %H\u2236%M");
} else { } else {
// Show only the time if date is on today // Show only the time if date is on today
if (daysAgo < 1 || params.timeOnly) if (daysAgo < 1 || params.timeOnly)
@@ -272,13 +272,13 @@ function formatTime(time, params) {
followed by a time string in 12h format. followed by a time string in 12h format.
i.e. "May 25, 2:30 pm" */ i.e. "May 25, 2:30 pm" */
// xgettext:no-c-format // xgettext:no-c-format
format = N_("%B %-d, %l\u2236%M %p"); format = N_("%B %d, %l\u2236%M %p");
else else
/* Translators: this is the month name, day number, year /* Translators: this is the month name, day number, year
number followed by a time string in 12h format. 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"*/
// xgettext:no-c-format // xgettext:no-c-format
format = N_("%B %-d %Y, %l\u2236%M %p"); format = N_("%B %d %Y, %l\u2236%M %p");
} }
let formattedTime = date.format(Shell.util_translate_time_string(format)); let formattedTime = date.format(Shell.util_translate_time_string(format));

View File

@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<gresources> <gresources>
<gresource prefix="/org/gnome/shell"> <gresource prefix="/org/gnome/shell">
<file>portalHelper/main.js</file>
<file>misc/config.js</file> <file>misc/config.js</file>
<file>misc/fileUtils.js</file> <file>portalHelper/main.js</file>
<file>misc/params.js</file>
</gresource> </gresource>
</gresources> </gresources>

View File

@@ -12,7 +12,6 @@ const WebKit = imports.gi.WebKit2;
const _ = Gettext.gettext; const _ = Gettext.gettext;
const Config = imports.misc.config; const Config = imports.misc.config;
const { loadInterfaceXML } = imports.misc.fileUtils;
const PortalHelperResult = { const PortalHelperResult = {
CANCELLED: 0, CANCELLED: 0,
@@ -31,7 +30,26 @@ const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';
const CONNECTIVITY_CHECK_URI = 'http://' + CONNECTIVITY_CHECK_HOST; const CONNECTIVITY_CHECK_URI = 'http://' + CONNECTIVITY_CHECK_HOST;
const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC; const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC;
const HelperDBusInterface = loadInterfaceXML('org.gnome.Shell.PortalHelper'); const HelperDBusInterface = `
<node>
<interface name="org.gnome.Shell.PortalHelper">
<method name="Authenticate">
<arg type="o" direction="in" name="connection" />
<arg type="s" direction="in" name="url" />
<arg type="u" direction="in" name="timestamp" />
</method>
<method name="Close">
<arg type="o" direction="in" name="connection" />
</method>
<method name="Refresh">
<arg type="o" direction="in" name="connection" />
</method>
<signal name="Done">
<arg type="o" name="connection" />
<arg type="u" name="result" />
</signal>
</interface>
</node>`;
var PortalHeaderBar = new Lang.Class({ var PortalHeaderBar = new Lang.Class({
Name: 'PortalHeaderBar', Name: 'PortalHeaderBar',

View File

@@ -10,10 +10,29 @@ const CheckBox = imports.ui.checkBox;
const Dialog = imports.ui.dialog; const Dialog = imports.ui.dialog;
const ModalDialog = imports.ui.modalDialog; const ModalDialog = imports.ui.modalDialog;
const { loadInterfaceXML } = imports.misc.fileUtils; const RequestIface = `
<node>
<interface name="org.freedesktop.impl.portal.Request">
<method name="Close"/>
</interface>
</node>`;
const RequestIface = loadInterfaceXML('org.freedesktop.impl.portal.Request'); const AccessIface = `
const AccessIface = loadInterfaceXML('org.freedesktop.impl.portal.Access'); <node>
<interface name="org.freedesktop.impl.portal.Access">
<method name="AccessDialog">
<arg type="o" name="handle" direction="in"/>
<arg type="s" name="app_id" direction="in"/>
<arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="title" direction="in"/>
<arg type="s" name="subtitle" direction="in"/>
<arg type="s" name="body" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/>
<arg type="u" name="response" direction="out"/>
<arg type="a{sv}" name="results" direction="out"/>
</method>
</interface>
</node>`;
var DialogResponse = { var DialogResponse = {
OK: 0, OK: 0,

View File

@@ -3,7 +3,6 @@
const Clutter = imports.gi.Clutter; const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio; const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib; const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const Lang = imports.lang; const Lang = imports.lang;
const Mainloop = imports.mainloop; const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta; const Meta = imports.gi.Meta;
@@ -81,41 +80,41 @@ var AppSwitcherPopup = new Lang.Class({
this._items = this._switcherList.icons; this._items = this._switcherList.icons;
}, },
vfunc_allocate(box, flags) { _allocate(actor, box, flags) {
this.parent(box, flags); this.parent(actor, box, flags);
// Allocate the thumbnails // Allocate the thumbnails
// We try to avoid overflowing the screen so we base the resulting size on // We try to avoid overflowing the screen so we base the resulting size on
// those calculations // those calculations
if (this._thumbnails) { if (this._thumbnails) {
let childBox = this._switcherList.get_allocation_box(); let childBox = this._switcherList.actor.get_allocation_box();
let primary = Main.layoutManager.primaryMonitor; let primary = Main.layoutManager.primaryMonitor;
let leftPadding = this.get_theme_node().get_padding(St.Side.LEFT); let leftPadding = this.actor.get_theme_node().get_padding(St.Side.LEFT);
let rightPadding = this.get_theme_node().get_padding(St.Side.RIGHT); let rightPadding = this.actor.get_theme_node().get_padding(St.Side.RIGHT);
let bottomPadding = this.get_theme_node().get_padding(St.Side.BOTTOM); let bottomPadding = this.actor.get_theme_node().get_padding(St.Side.BOTTOM);
let hPadding = leftPadding + rightPadding; let hPadding = leftPadding + rightPadding;
let icon = this._items[this._selectedIndex]; let icon = this._items[this._selectedIndex].actor;
let [posX, posY] = icon.get_transformed_position(); let [posX, posY] = icon.get_transformed_position();
let thumbnailCenter = posX + icon.width / 2; let thumbnailCenter = posX + icon.width / 2;
let [childMinWidth, childNaturalWidth] = this._thumbnails.get_preferred_width(-1); let [childMinWidth, childNaturalWidth] = this._thumbnails.actor.get_preferred_width(-1);
childBox.x1 = Math.max(primary.x + leftPadding, Math.floor(thumbnailCenter - childNaturalWidth / 2)); childBox.x1 = Math.max(primary.x + leftPadding, Math.floor(thumbnailCenter - childNaturalWidth / 2));
if (childBox.x1 + childNaturalWidth > primary.x + primary.width - hPadding) { if (childBox.x1 + childNaturalWidth > primary.x + primary.width - hPadding) {
let offset = childBox.x1 + childNaturalWidth - primary.width + hPadding; let offset = childBox.x1 + childNaturalWidth - primary.width + hPadding;
childBox.x1 = Math.max(primary.x + leftPadding, childBox.x1 - offset - hPadding); childBox.x1 = Math.max(primary.x + leftPadding, childBox.x1 - offset - hPadding);
} }
let spacing = this.get_theme_node().get_length('spacing'); let spacing = this.actor.get_theme_node().get_length('spacing');
childBox.x2 = childBox.x1 + childNaturalWidth; childBox.x2 = childBox.x1 + childNaturalWidth;
if (childBox.x2 > primary.x + primary.width - rightPadding) if (childBox.x2 > primary.x + primary.width - rightPadding)
childBox.x2 = primary.x + primary.width - rightPadding; childBox.x2 = primary.x + primary.width - rightPadding;
childBox.y1 = this._switcherList.allocation.y2 + spacing; childBox.y1 = this._switcherList.actor.allocation.y2 + spacing;
this._thumbnails.addClones(primary.y + primary.height - bottomPadding - childBox.y1); this._thumbnails.addClones(primary.y + primary.height - bottomPadding - childBox.y1);
let [childMinHeight, childNaturalHeight] = this._thumbnails.get_preferred_height(-1); let [childMinHeight, childNaturalHeight] = this._thumbnails.actor.get_preferred_height(-1);
childBox.y2 = childBox.y1 + childNaturalHeight; childBox.y2 = childBox.y1 + childNaturalHeight;
this._thumbnails.allocate(childBox, flags); this._thumbnails.actor.allocate(childBox, flags);
} }
}, },
@@ -263,7 +262,7 @@ var AppSwitcherPopup = new Lang.Class({
_windowActivated(thumbnailList, n) { _windowActivated(thumbnailList, n) {
let appIcon = this._items[this._selectedIndex]; let appIcon = this._items[this._selectedIndex];
Main.activateWindow(appIcon.cachedWindows[n]); Main.activateWindow(appIcon.cachedWindows[n]);
this.fadeAndDestroy(); this.destroy();
}, },
_windowEntered(thumbnailList, n) { _windowEntered(thumbnailList, n) {
@@ -368,7 +367,7 @@ var AppSwitcherPopup = new Lang.Class({
}, },
_destroyThumbnails() { _destroyThumbnails() {
let thumbnailsActor = this._thumbnails; let thumbnailsActor = this._thumbnails.actor;
Tweener.addTween(thumbnailsActor, Tweener.addTween(thumbnailsActor,
{ opacity: 0, { opacity: 0,
time: THUMBNAIL_FADE_TIME, time: THUMBNAIL_FADE_TIME,
@@ -388,19 +387,19 @@ var AppSwitcherPopup = new Lang.Class({
this._thumbnails.connect('item-activated', this._windowActivated.bind(this)); this._thumbnails.connect('item-activated', this._windowActivated.bind(this));
this._thumbnails.connect('item-entered', this._windowEntered.bind(this)); this._thumbnails.connect('item-entered', this._windowEntered.bind(this));
this._thumbnails.connect('item-removed', this._windowRemoved.bind(this)); this._thumbnails.connect('item-removed', this._windowRemoved.bind(this));
this._thumbnails.connect('destroy', () => { this._thumbnails.actor.connect('destroy', () => {
this._thumbnails = null; this._thumbnails = null;
this._thumbnailsFocused = false; this._thumbnailsFocused = false;
}); });
this.add_actor(this._thumbnails); this.actor.add_actor(this._thumbnails.actor);
// Need to force an allocation so we can figure out whether we // Need to force an allocation so we can figure out whether we
// need to scroll when selecting // need to scroll when selecting
this._thumbnails.get_allocation_box(); this._thumbnails.actor.get_allocation_box();
this._thumbnails.opacity = 0; this._thumbnails.actor.opacity = 0;
Tweener.addTween(this._thumbnails, Tweener.addTween(this._thumbnails.actor,
{ opacity: 255, { opacity: 255,
time: THUMBNAIL_FADE_TIME, time: THUMBNAIL_FADE_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
@@ -472,21 +471,6 @@ var CyclerHighlight = new Lang.Class({
} }
}); });
// We don't show an actual popup, so just provide what SwitcherPopup
// expects instead of inheriting from SwitcherList
var CyclerList = new Lang.Class({
Name: 'CyclerList',
Extends: St.Widget,
Signals: { 'item-activated': { param_types: [GObject.TYPE_INT] },
'item-entered': { param_types: [GObject.TYPE_INT] },
'item-removed': { param_types: [GObject.TYPE_INT] },
'item-highlighted': { param_types: [GObject.TYPE_INT] } },
highlight(index, justOutline) {
this.emit('item-highlighted', index);
}
});
var CyclerPopup = new Lang.Class({ var CyclerPopup = new Lang.Class({
Name: 'CyclerPopup', Name: 'CyclerPopup',
Extends: SwitcherPopup.SwitcherPopup, Extends: SwitcherPopup.SwitcherPopup,
@@ -503,10 +487,11 @@ var CyclerPopup = new Lang.Class({
this._highlight = new CyclerHighlight(); this._highlight = new CyclerHighlight();
global.window_group.add_actor(this._highlight.actor); global.window_group.add_actor(this._highlight.actor);
this._switcherList = new CyclerList(); // We don't show an actual popup, so just provide what SwitcherPopup
this._switcherList.connect('item-highlighted', (list, index) => { // expects instead of inheriting from SwitcherList
this._highlightItem(index); this._switcherList = { actor: new St.Widget(),
}); highlight: this._highlightItem.bind(this),
connect() {} };
}, },
_highlightItem(index, justOutline) { _highlightItem(index, justOutline) {
@@ -668,32 +653,22 @@ var WindowCyclerPopup = new Lang.Class({
var AppIcon = new Lang.Class({ var AppIcon = new Lang.Class({
Name: 'AppIcon', Name: 'AppIcon',
Extends: St.BoxLayout,
_init(app) { _init(app) {
this.parent({ style_class: 'alt-tab-app',
vertical: true });
this.app = app; this.app = app;
this.actor = new St.BoxLayout({ style_class: 'alt-tab-app',
vertical: true });
this.icon = null; this.icon = null;
this._iconBin = new St.Bin({ x_fill: true, y_fill: true }); this._iconBin = new St.Bin({ x_fill: true, y_fill: true });
this.add(this._iconBin, { x_fill: false, y_fill: false } ); this.actor.add(this._iconBin, { x_fill: false, y_fill: false } );
this.label = new St.Label({ text: this.app.get_name() }); this.label = new St.Label({ text: this.app.get_name() });
this.add(this.label, { x_fill: false }); this.actor.add(this.label, { x_fill: false });
}, },
set_size(size) { set_size(size) {
this.icon = this.app.create_icon_texture(size); this.icon = this.app.create_icon_texture(size);
this._iconBin.child = this.icon; this._iconBin.child = this.icon;
this._iconBin.set_size(size, size);
},
vfunc_get_preferred_width(forHeight) {
let [minWidth, ] = this.parent(forHeight);
minWidth = Math.max(minWidth, forHeight);
return [minWidth, minWidth];
} }
}); });
@@ -732,10 +707,11 @@ var AppSwitcher = new Lang.Class({
} }
this._curApp = -1; this._curApp = -1;
this._iconSize = 0;
this._altTabPopup = altTabPopup; this._altTabPopup = altTabPopup;
this._mouseTimeOutId = 0; this._mouseTimeOutId = 0;
this.connect('destroy', this._onDestroy.bind(this)); this.actor.connect('destroy', this._onDestroy.bind(this));
}, },
_onDestroy() { _onDestroy() {
@@ -762,16 +738,17 @@ var AppSwitcher = new Lang.Class({
// We just assume the whole screen here due to weirdness happing with the passed width // We just assume the whole screen here due to weirdness happing with the passed width
let primary = Main.layoutManager.primaryMonitor; let primary = Main.layoutManager.primaryMonitor;
let parentPadding = this.get_parent().get_theme_node().get_horizontal_padding(); let parentPadding = this.actor.get_parent().get_theme_node().get_horizontal_padding();
let availWidth = primary.width - parentPadding - this.get_theme_node().get_horizontal_padding(); let availWidth = primary.width - parentPadding - this.actor.get_theme_node().get_horizontal_padding();
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let iconSizes = baseIconSizes.map(s => s * scaleFactor); let iconSizes = baseIconSizes.map(s => s * scaleFactor);
let iconSize = baseIconSizes[0];
if (this._items.length > 1) { if (this._items.length == 1) {
this._iconSize = baseIconSizes[0];
} else {
for(let i = 0; i < baseIconSizes.length; i++) { for(let i = 0; i < baseIconSizes.length; i++) {
iconSize = baseIconSizes[i]; this._iconSize = baseIconSizes[i];
let height = iconSizes[i] + iconSpacing; let height = iconSizes[i] + iconSpacing;
let w = height * this._items.length + totalSpacing; let w = height * this._items.length + totalSpacing;
if (w <= availWidth) if (w <= availWidth)
@@ -779,36 +756,32 @@ var AppSwitcher = new Lang.Class({
} }
} }
this._iconSize = iconSize;
for(let i = 0; i < this.icons.length; i++) { for(let i = 0; i < this.icons.length; i++) {
if (this.icons[i].icon != null) if (this.icons[i].icon != null)
break; break;
this.icons[i].set_size(iconSize); this.icons[i].set_size(this._iconSize);
} }
}, },
vfunc_get_preferred_height(forWidth) { _getPreferredHeight(actor, forWidth, alloc) {
this._setIconSize(); this._setIconSize();
return this.parent(forWidth); this.parent(actor, forWidth, alloc);
}, },
vfunc_allocate(box, flags) { _allocate(actor, box, flags) {
// Allocate the main list items // Allocate the main list items
this.parent(box, flags); this.parent(actor, box, flags);
let contentBox = this.get_theme_node().get_content_box(box); let arrowHeight = Math.floor(this.actor.get_theme_node().get_padding(St.Side.BOTTOM) / 3);
let arrowHeight = Math.floor(this.get_theme_node().get_padding(St.Side.BOTTOM) / 3);
let arrowWidth = arrowHeight * 2; let arrowWidth = arrowHeight * 2;
// Now allocate each arrow underneath its item // Now allocate each arrow underneath its item
let childBox = new Clutter.ActorBox(); let childBox = new Clutter.ActorBox();
for (let i = 0; i < this._items.length; i++) { for (let i = 0; i < this._items.length; i++) {
let itemBox = this._items[i].allocation; let itemBox = this._items[i].allocation;
childBox.x1 = contentBox.x1 + Math.floor(itemBox.x1 + (itemBox.x2 - itemBox.x1 - arrowWidth) / 2); childBox.x1 = Math.floor(itemBox.x1 + (itemBox.x2 - itemBox.x1 - arrowWidth) / 2);
childBox.x2 = childBox.x1 + arrowWidth; childBox.x2 = childBox.x1 + arrowWidth;
childBox.y1 = contentBox.y1 + itemBox.y2 + arrowHeight; childBox.y1 = itemBox.y2 + arrowHeight;
childBox.y2 = childBox.y1 + arrowHeight; childBox.y2 = childBox.y1 + arrowHeight;
this._arrows[i].allocate(childBox, flags); this._arrows[i].allocate(childBox, flags);
} }
@@ -866,7 +839,7 @@ var AppSwitcher = new Lang.Class({
_addIcon(appIcon) { _addIcon(appIcon) {
this.icons.push(appIcon); this.icons.push(appIcon);
let item = this.addItem(appIcon, appIcon.label); let item = this.addItem(appIcon.actor, appIcon.label);
appIcon._stateChangedId = appIcon.app.connect('notify::state', app => { appIcon._stateChangedId = appIcon.app.connect('notify::state', app => {
if (app.state != Shell.AppState.RUNNING) if (app.state != Shell.AppState.RUNNING)
@@ -876,7 +849,7 @@ var AppSwitcher = new Lang.Class({
let n = this._arrows.length; let n = this._arrows.length;
let arrow = new St.DrawingArea({ style_class: 'switcher-arrow' }); let arrow = new St.DrawingArea({ style_class: 'switcher-arrow' });
arrow.connect('repaint', () => { SwitcherPopup.drawArrow(arrow, St.Side.BOTTOM); }); arrow.connect('repaint', () => { SwitcherPopup.drawArrow(arrow, St.Side.BOTTOM); });
this.add_actor(arrow); this._list.add_actor(arrow);
this._arrows.push(arrow); this._arrows.push(arrow);
if (appIcon.cachedWindows.length == 1) if (appIcon.cachedWindows.length == 1)
@@ -934,21 +907,21 @@ var ThumbnailList = new Lang.Class({
} }
this.connect('destroy', this._onDestroy.bind(this)); this.actor.connect('destroy', this._onDestroy.bind(this));
}, },
addClones(availHeight) { addClones(availHeight) {
if (!this._thumbnailBins.length) if (!this._thumbnailBins.length)
return; return;
let totalPadding = this._items[0].get_theme_node().get_horizontal_padding() + this._items[0].get_theme_node().get_vertical_padding(); let totalPadding = this._items[0].get_theme_node().get_horizontal_padding() + this._items[0].get_theme_node().get_vertical_padding();
totalPadding += this.get_theme_node().get_horizontal_padding() + this.get_theme_node().get_vertical_padding(); totalPadding += this.actor.get_theme_node().get_horizontal_padding() + this.actor.get_theme_node().get_vertical_padding();
let [labelMinHeight, labelNaturalHeight] = this._labels[0].get_preferred_height(-1); let [labelMinHeight, labelNaturalHeight] = this._labels[0].get_preferred_height(-1);
let spacing = this._items[0].child.get_theme_node().get_length('spacing'); let spacing = this._items[0].child.get_theme_node().get_length('spacing');
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let thumbnailSize = THUMBNAIL_DEFAULT_SIZE * scaleFactor; let thumbnailSize = THUMBNAIL_DEFAULT_SIZE * scaleFactor;
availHeight = Math.min(availHeight - labelNaturalHeight - totalPadding - spacing, thumbnailSize); availHeight = Math.min(availHeight - labelNaturalHeight - totalPadding - spacing, thumbnailSize);
let binHeight = availHeight + this._items[0].get_theme_node().get_vertical_padding() + this.get_theme_node().get_vertical_padding() - spacing; let binHeight = availHeight + this._items[0].get_theme_node().get_vertical_padding() + this.actor.get_theme_node().get_vertical_padding() - spacing;
binHeight = Math.min(thumbnailSize, binHeight); binHeight = Math.min(thumbnailSize, binHeight);
for (let i = 0; i < this._thumbnailBins.length; i++) { for (let i = 0; i < this._thumbnailBins.length; i++) {
@@ -983,7 +956,7 @@ var ThumbnailList = new Lang.Class({
if (this._clones.length > 0) if (this._clones.length > 0)
this.highlight(SwitcherPopup.mod(index, this._clones.length)); this.highlight(SwitcherPopup.mod(index, this._clones.length));
else else
this.destroy(); this.actor.destroy();
}, },
_onDestroy() { _onDestroy() {
@@ -997,17 +970,15 @@ var ThumbnailList = new Lang.Class({
var WindowIcon = new Lang.Class({ var WindowIcon = new Lang.Class({
Name: 'WindowIcon', Name: 'WindowIcon',
Extends: St.BoxLayout,
_init(window, mode) { _init(window, mode) {
this.parent({ style_class: 'alt-tab-app',
vertical: true });
this.window = window; this.window = window;
this.actor = new St.BoxLayout({ style_class: 'alt-tab-app',
vertical: true });
this._icon = new St.Widget({ layout_manager: new Clutter.BinLayout() }); this._icon = new St.Widget({ layout_manager: new Clutter.BinLayout() });
this.add(this._icon, { x_fill: false, y_fill: false } ); this.actor.add(this._icon, { x_fill: false, y_fill: false } );
this.label = new St.Label({ text: window.get_title() }); this.label = new St.Label({ text: window.get_title() });
let tracker = Shell.WindowTracker.get_default(); let tracker = Shell.WindowTracker.get_default();
@@ -1063,7 +1034,7 @@ var WindowList = new Lang.Class({
this._label = new St.Label({ x_align: Clutter.ActorAlign.CENTER, this._label = new St.Label({ x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER }); y_align: Clutter.ActorAlign.CENTER });
this.add_actor(this._label); this.actor.add_actor(this._label);
this.windows = windows; this.windows = windows;
this.icons = []; this.icons = [];
@@ -1072,7 +1043,7 @@ var WindowList = new Lang.Class({
let win = windows[i]; let win = windows[i];
let icon = new WindowIcon(win, mode); let icon = new WindowIcon(win, mode);
this.addItem(icon, icon.label); this.addItem(icon.actor, icon.label);
this.icons.push(icon); this.icons.push(icon);
icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => { icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => {
@@ -1080,7 +1051,7 @@ var WindowList = new Lang.Class({
}); });
} }
this.connect('destroy', this._onDestroy.bind(this)); this.actor.connect('destroy', () => { this._onDestroy(); });
}, },
_onDestroy() { _onDestroy() {
@@ -1089,40 +1060,26 @@ var WindowList = new Lang.Class({
}); });
}, },
vfunc_get_preferred_height(forWidth) { _getPreferredHeight(actor, forWidth, alloc) {
let [minHeight, natHeight] = this.parent(forWidth); this.parent(actor, forWidth, alloc);
let spacing = this.get_theme_node().get_padding(St.Side.BOTTOM); let spacing = this.actor.get_theme_node().get_padding(St.Side.BOTTOM);
let [labelMin, labelNat] = this._label.get_preferred_height(-1); let [labelMin, labelNat] = this._label.get_preferred_height(-1);
alloc.min_size += labelMin + spacing;
minHeight += labelMin + spacing; alloc.natural_size += labelNat + spacing;
natHeight += labelNat + spacing;
return [minHeight, natHeight];
}, },
vfunc_allocate(box, flags) { _allocateTop(actor, box, flags) {
let themeNode = this.get_theme_node();
let contentBox = themeNode.get_content_box(box);
let childBox = new Clutter.ActorBox(); let childBox = new Clutter.ActorBox();
childBox.x1 = contentBox.x1; childBox.x1 = box.x1;
childBox.x2 = contentBox.x2; childBox.x2 = box.x2;
childBox.y2 = contentBox.y2; childBox.y2 = box.y2;
childBox.y1 = childBox.y2 - this._label.height; childBox.y1 = childBox.y2 - this._label.height;
this._label.allocate(childBox, flags); this._label.allocate(childBox, flags);
let totalLabelHeight = this._label.height + themeNode.get_padding(St.Side.BOTTOM) let spacing = this.actor.get_theme_node().get_padding(St.Side.BOTTOM);
childBox.x1 = box.x1; box.y2 -= this._label.height + spacing;
childBox.x2 = box.x2; this.parent(actor, box, flags);
childBox.y1 = box.y1;
childBox.y2 = box.y2 - totalLabelHeight;
this.parent(childBox, flags);
// Hooking up the parent vfunc will call this.set_allocation() with
// the height without the label height, so call it again with the
// correct size here.
this.set_allocation(box, flags);
}, },
highlight(index, justOutline) { highlight(index, justOutline) {

View File

@@ -30,8 +30,6 @@ const Params = imports.misc.params;
const Util = imports.misc.util; const Util = imports.misc.util;
const SystemActions = imports.misc.systemActions; const SystemActions = imports.misc.systemActions;
const { loadInterfaceXML } = imports.misc.fileUtils;
var MAX_APPLICATION_WORK_MILLIS = 75; var MAX_APPLICATION_WORK_MILLIS = 75;
var MENU_POPUP_TIMEOUT = 600; var MENU_POPUP_TIMEOUT = 600;
var MAX_COLUMNS = 6; var MAX_COLUMNS = 6;
@@ -68,7 +66,13 @@ var PAGE_SWITCH_TIME = 0.3;
const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl'; const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl'; const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl';
const SwitcherooProxyInterface = loadInterfaceXML('net.hadess.SwitcherooControl'); const SwitcherooProxyInterface = `
<node>
<interface name="net.hadess.SwitcherooControl">
<property name="HasDualGpu" type="b" access="read"/>
</interface>
</node>`;
const SwitcherooProxy = Gio.DBusProxy.makeProxyWrapper(SwitcherooProxyInterface); const SwitcherooProxy = Gio.DBusProxy.makeProxyWrapper(SwitcherooProxyInterface);
let discreteGpuAvailable = false; let discreteGpuAvailable = false;
@@ -126,17 +130,17 @@ var BaseAppView = new Lang.Class({
else else
this._grid = new IconGrid.IconGrid(gridParams); this._grid = new IconGrid.IconGrid(gridParams);
this._grid.connect('child-focused', (grid, actor) => { this._grid.connect('key-focus-in', (grid, actor) => {
this._childFocused(actor); this._keyFocusIn(actor);
}); });
// Standard hack for ClutterBinLayout // Standard hack for ClutterBinLayout
this._grid.x_expand = true; this._grid.actor.x_expand = true;
this._items = {}; this._items = {};
this._allItems = []; this._allItems = [];
}, },
_childFocused(actor) { _keyFocusIn(actor) {
// Nothing by default // Nothing by default
}, },
@@ -203,7 +207,7 @@ var BaseAppView = new Lang.Class({
}, },
_doSpringAnimation(animationDirection) { _doSpringAnimation(animationDirection) {
this._grid.opacity = 255; this._grid.actor.opacity = 255;
this._grid.animateSpring(animationDirection, this._grid.animateSpring(animationDirection,
Main.overview.getShowAppsButton()); Main.overview.getShowAppsButton());
}, },
@@ -217,8 +221,8 @@ var BaseAppView = new Lang.Class({
} }
if (animationDirection == IconGrid.AnimationDirection.IN) { if (animationDirection == IconGrid.AnimationDirection.IN) {
let id = this._grid.connect('paint', () => { let id = this._grid.actor.connect('paint', () => {
this._grid.disconnect(id); this._grid.actor.disconnect(id);
this._doSpringAnimation(animationDirection); this._doSpringAnimation(animationDirection);
}); });
} else { } else {
@@ -228,7 +232,7 @@ var BaseAppView = new Lang.Class({
animateSwitch(animationDirection) { animateSwitch(animationDirection) {
Tweener.removeTweens(this.actor); Tweener.removeTweens(this.actor);
Tweener.removeTweens(this._grid); Tweener.removeTweens(this._grid.actor);
let params = { time: VIEWS_SWITCH_TIME, let params = { time: VIEWS_SWITCH_TIME,
transition: 'easeOutQuad' }; transition: 'easeOutQuad' };
@@ -242,7 +246,7 @@ var BaseAppView = new Lang.Class({
params.onComplete = () => { this.actor.hide(); }; params.onComplete = () => { this.actor.hide(); };
} }
Tweener.addTween(this._grid, params); Tweener.addTween(this._grid.actor, params);
} }
}); });
Signals.addSignalMethods(BaseAppView.prototype); Signals.addSignalMethods(BaseAppView.prototype);
@@ -396,7 +400,7 @@ var AllView = new Lang.Class({
let box = new St.BoxLayout({ vertical: true }); let box = new St.BoxLayout({ vertical: true });
this._grid.currentPage = 0; this._grid.currentPage = 0;
this._stack.add_actor(this._grid); this._stack.add_actor(this._grid.actor);
this._eventBlocker = new St.Widget({ x_expand: true, y_expand: true }); this._eventBlocker = new St.Widget({ x_expand: true, y_expand: true });
this._stack.add_actor(this._eventBlocker); this._stack.add_actor(this._eventBlocker);
@@ -717,7 +721,7 @@ var AllView = new Lang.Class({
}); });
}, },
_childFocused(icon) { _keyFocusIn(icon) {
let itemPage = this._grid.getItemPage(icon); let itemPage = this._grid.getItemPage(icon);
this.goToPage(itemPage); this.goToPage(itemPage);
}, },
@@ -745,7 +749,7 @@ var AllView = new Lang.Class({
box.y2 = height; box.y2 = height;
box = this.actor.get_theme_node().get_content_box(box); box = this.actor.get_theme_node().get_content_box(box);
box = this._scrollView.get_theme_node().get_content_box(box); box = this._scrollView.get_theme_node().get_content_box(box);
box = this._grid.get_theme_node().get_content_box(box); box = this._grid.actor.get_theme_node().get_content_box(box);
let availWidth = box.x2 - box.x1; let availWidth = box.x2 - box.x1;
let availHeight = box.y2 - box.y1; let availHeight = box.y2 - box.y1;
let oldNPages = this._grid.nPages(); let oldNPages = this._grid.nPages();
@@ -794,9 +798,9 @@ var FrequentView = new Lang.Class({
y_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.CENTER,
y_expand: true }); y_expand: true });
this._grid.y_expand = true; this._grid.actor.y_expand = true;
this.actor.add_actor(this._grid); this.actor.add_actor(this._grid.actor);
this.actor.add_actor(this._noFrequentAppsLabel); this.actor.add_actor(this._noFrequentAppsLabel);
this._noFrequentAppsLabel.hide(); this._noFrequentAppsLabel.hide();
@@ -843,7 +847,7 @@ var FrequentView = new Lang.Class({
box.x2 = width; box.x2 = width;
box.y2 = height; box.y2 = height;
box = this.actor.get_theme_node().get_content_box(box); box = this.actor.get_theme_node().get_content_box(box);
box = this._grid.get_theme_node().get_content_box(box); box = this._grid.actor.get_theme_node().get_content_box(box);
let availWidth = box.x2 - box.x1; let availWidth = box.x2 - box.x1;
let availHeight = box.y2 - box.y1; let availHeight = box.y2 - box.y1;
this._grid.adaptToSize(availWidth, availHeight); this._grid.adaptToSize(availWidth, availHeight);
@@ -1141,12 +1145,12 @@ var FolderView = new Lang.Class({
this.parent(null, null); this.parent(null, null);
// If it not expand, the parent doesn't take into account its preferred_width when allocating // If it not expand, the parent doesn't take into account its preferred_width when allocating
// the second time it allocates, so we apply the "Standard hack for ClutterBinLayout" // the second time it allocates, so we apply the "Standard hack for ClutterBinLayout"
this._grid.x_expand = true; this._grid.actor.x_expand = true;
this.actor = new St.ScrollView({ overlay_scrollbars: true }); this.actor = new St.ScrollView({ overlay_scrollbars: true });
this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC); this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
let scrollableContainer = new St.BoxLayout({ vertical: true, reactive: true }); let scrollableContainer = new St.BoxLayout({ vertical: true, reactive: true });
scrollableContainer.add_actor(this._grid); scrollableContainer.add_actor(this._grid.actor);
this.actor.add_actor(scrollableContainer); this.actor.add_actor(scrollableContainer);
let action = new Clutter.PanAction({ interpolate: true }); let action = new Clutter.PanAction({ interpolate: true });
@@ -1154,7 +1158,7 @@ var FolderView = new Lang.Class({
this.actor.add_action(action); this.actor.add_action(action);
}, },
_childFocused(actor) { _keyFocusIn(actor) {
Util.ensureActorVisibleInScrollView(this.actor, actor); Util.ensureActorVisibleInScrollView(this.actor, actor);
}, },
@@ -1267,7 +1271,7 @@ var FolderIcon = new Lang.Class({
this._popupInvalidated = false; this._popupInvalidated = false;
this.icon = new IconGrid.BaseIcon('', { createIcon: this._createIcon.bind(this), setSizeManually: true }); this.icon = new IconGrid.BaseIcon('', { createIcon: this._createIcon.bind(this), setSizeManually: true });
this.actor.set_child(this.icon); this.actor.set_child(this.icon.actor);
this.actor.label_actor = this.icon.label; this.actor.label_actor = this.icon.label;
this.view = new FolderView(); this.view = new FolderView();
@@ -1369,7 +1373,7 @@ var FolderIcon = new Lang.Class({
_updatePopupSize() { _updatePopupSize() {
// StWidget delays style calculation until needed, make sure we use the correct values // StWidget delays style calculation until needed, make sure we use the correct values
this.view._grid.ensure_style(); this.view._grid.actor.ensure_style();
let offsetForEachSide = Math.ceil((this._popup.getOffset(St.Side.TOP) + let offsetForEachSide = Math.ceil((this._popup.getOffset(St.Side.TOP) +
this._popup.getOffset(St.Side.BOTTOM) - this._popup.getOffset(St.Side.BOTTOM) -
@@ -1462,9 +1466,7 @@ var AppFolderPopup = new Lang.Class({
global.focus_manager.add_group(this.actor); global.focus_manager.add_group(this.actor);
source.actor.connect('destroy', () => { this.actor.destroy(); }); source.actor.connect('destroy', () => { this.actor.destroy(); });
this._grabHelper = new GrabHelper.GrabHelper(this.actor, { this._grabHelper = new GrabHelper.GrabHelper(this.actor);
actionMode: Shell.ActionMode.POPUP
});
this._grabHelper.addActor(Main.layoutManager.overviewGroup); this._grabHelper.addActor(Main.layoutManager.overviewGroup);
this.actor.connect('key-press-event', this._onKeyPress.bind(this)); this.actor.connect('key-press-event', this._onKeyPress.bind(this));
}, },
@@ -1537,7 +1539,7 @@ var AppFolderPopup = new Lang.Class({
// is completed so we can animate the icons after as we like without // is completed so we can animate the icons after as we like without
// showing them while boxpointer is animating. // showing them while boxpointer is animating.
this._view.actor.opacity = 0; this._view.actor.opacity = 0;
this._boxPointer.open(BoxPointer.PopupAnimation.FADE | this._boxPointer.show(BoxPointer.PopupAnimation.FADE |
BoxPointer.PopupAnimation.SLIDE, BoxPointer.PopupAnimation.SLIDE,
() => { () => {
this._view.actor.opacity = 255; this._view.actor.opacity = 255;
@@ -1553,8 +1555,8 @@ var AppFolderPopup = new Lang.Class({
this._grabHelper.ungrab({ actor: this.actor }); this._grabHelper.ungrab({ actor: this.actor });
this._boxPointer.close(BoxPointer.PopupAnimation.FADE | this._boxPointer.hide(BoxPointer.PopupAnimation.FADE |
BoxPointer.PopupAnimation.SLIDE); BoxPointer.PopupAnimation.SLIDE);
this._isOpen = false; this._isOpen = false;
this.emit('open-state-changed', false); this.emit('open-state-changed', false);
}, },
@@ -1617,7 +1619,7 @@ var AppIcon = new Lang.Class({
iconParams['createIcon'] = this._createIcon.bind(this); iconParams['createIcon'] = this._createIcon.bind(this);
iconParams['setSizeManually'] = true; iconParams['setSizeManually'] = true;
this.icon = new IconGrid.BaseIcon(app.get_name(), iconParams); this.icon = new IconGrid.BaseIcon(app.get_name(), iconParams);
this._iconContainer.add_child(this.icon); this._iconContainer.add_child(this.icon.actor);
this.actor.label_actor = this.icon.label; this.actor.label_actor = this.icon.label;

View File

@@ -44,7 +44,6 @@ const RENAMED_DESKTOP_IDS = {
'nautilus.desktop': 'org.gnome.Nautilus.desktop', 'nautilus.desktop': 'org.gnome.Nautilus.desktop',
'polari.desktop': 'org.gnome.Polari.desktop', 'polari.desktop': 'org.gnome.Polari.desktop',
'totem.desktop': 'org.gnome.Totem.desktop', 'totem.desktop': 'org.gnome.Totem.desktop',
'evince.desktop': 'org.gnome.Evince.desktop',
}; };
var AppFavorites = new Lang.Class({ var AppFavorites = new Lang.Class({
@@ -128,6 +127,7 @@ var AppFavorites = new Lang.Class({
else else
ids.splice(pos, 0, appId); ids.splice(pos, 0, appId);
global.settings.set_strv(this.FAVORITE_APPS_KEY, ids); global.settings.set_strv(this.FAVORITE_APPS_KEY, ids);
this._favorites[appId] = app;
return true; return true;
}, },

View File

@@ -9,15 +9,25 @@ const St = imports.gi.St;
const Main = imports.ui.main; const Main = imports.ui.main;
const ModalDialog = imports.ui.modalDialog; const ModalDialog = imports.ui.modalDialog;
const { loadInterfaceXML } = imports.misc.fileUtils;
var AudioDevice = { var AudioDevice = {
HEADPHONES: 1 << 0, HEADPHONES: 1 << 0,
HEADSET: 1 << 1, HEADSET: 1 << 1,
MICROPHONE: 1 << 2 MICROPHONE: 1 << 2
}; };
const AudioDeviceSelectionIface = loadInterfaceXML('org.gnome.Shell.AudioDeviceSelection'); const AudioDeviceSelectionIface = `
<node>
<interface name="org.gnome.Shell.AudioDeviceSelection">
<method name="Open">
<arg name="devices" direction="in" type="as" />
</method>
<method name="Close">
</method>
<signal name="DeviceSelected">
<arg name="device" type="s" />
</signal>
</interface>
</node>`;
var AudioDeviceSelectionDialog = new Lang.Class({ var AudioDeviceSelectionDialog = new Lang.Class({
Name: 'AudioDeviceSelectionDialog', Name: 'AudioDeviceSelectionDialog',

View File

@@ -34,25 +34,25 @@ var POPUP_ANIMATION_TIME = 0.15;
*/ */
var BoxPointer = new Lang.Class({ var BoxPointer = new Lang.Class({
Name: 'BoxPointer', Name: 'BoxPointer',
Extends: St.Widget,
Signals: { 'arrow-side-changed': {} },
_init(arrowSide, binProperties) { _init(arrowSide, binProperties) {
this.parent();
this.actor = this;
this.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
this._arrowSide = arrowSide; this._arrowSide = arrowSide;
this._userArrowSide = arrowSide; this._userArrowSide = arrowSide;
this._arrowOrigin = 0; this._arrowOrigin = 0;
this._arrowActor = null; this._arrowActor = null;
this.actor = new St.Bin({ x_fill: true,
y_fill: true });
this._container = new Shell.GenericContainer();
this.actor.set_child(this._container);
this.actor.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
this._container.connect('get-preferred-width', this._getPreferredWidth.bind(this));
this._container.connect('get-preferred-height', this._getPreferredHeight.bind(this));
this._container.connect('allocate', this._allocate.bind(this));
this.bin = new St.Bin(binProperties); this.bin = new St.Bin(binProperties);
this.add_actor(this.bin); this._container.add_actor(this.bin);
this._border = new St.DrawingArea(); this._border = new St.DrawingArea();
this._border.connect('repaint', this._drawBorder.bind(this)); this._border.connect('repaint', this._drawBorder.bind(this));
this.add_actor(this._border); this._container.add_actor(this._border);
this.bin.raise(this._border); this.bin.raise(this._border);
this._xOffset = 0; this._xOffset = 0;
this._yOffset = 0; this._yOffset = 0;
@@ -69,49 +69,19 @@ var BoxPointer = new Lang.Class({
_muteInput() { _muteInput() {
if (this._capturedEventId == 0) if (this._capturedEventId == 0)
this._capturedEventId = this.connect('captured-event', this._capturedEventId = this.actor.connect('captured-event',
() => Clutter.EVENT_STOP); () => Clutter.EVENT_STOP);
}, },
_unmuteInput() { _unmuteInput() {
if (this._capturedEventId != 0) { if (this._capturedEventId != 0) {
this.disconnect(this._capturedEventId); this.actor.disconnect(this._capturedEventId);
this._capturedEventId = 0; this._capturedEventId = 0;
} }
}, },
// BoxPointer.show() and BoxPointer.hide() are here for only compatibility
// purposes, and will be removed in 3.32.
show(animate, onComplete) { show(animate, onComplete) {
if (animate !== undefined) { let themeNode = this.actor.get_theme_node();
try {
throw new Error('BoxPointer.show() has been moved to BoxPointer.open(), this code will break in the future.');
} catch(e) {
logError(e);
this.open(animate, onComplete);
return;
}
}
this.visible = true;
},
hide(animate, onComplete) {
if (animate !== undefined) {
try {
throw new Error('BoxPointer.hide() has been moved to BoxPointer.close(), this code will break in the future.');
} catch(e) {
logError(e);
this.close(animate, onComplete);
return;
}
}
this.visible = false;
},
open(animate, onComplete) {
let themeNode = this.get_theme_node();
let rise = themeNode.get_length('-arrow-rise'); let rise = themeNode.get_length('-arrow-rise');
let animationTime = (animate & PopupAnimation.FULL) ? POPUP_ANIMATION_TIME : 0; let animationTime = (animate & PopupAnimation.FULL) ? POPUP_ANIMATION_TIME : 0;
@@ -120,7 +90,7 @@ var BoxPointer = new Lang.Class({
else else
this.opacity = 255; this.opacity = 255;
this.show(); this.actor.show();
if (animate & PopupAnimation.SLIDE) { if (animate & PopupAnimation.SLIDE) {
switch (this._arrowSide) { switch (this._arrowSide) {
@@ -151,13 +121,13 @@ var BoxPointer = new Lang.Class({
time: animationTime }); time: animationTime });
}, },
close(animate, onComplete) { hide(animate, onComplete) {
if (!this.visible) if (!this.actor.visible)
return; return;
let xOffset = 0; let xOffset = 0;
let yOffset = 0; let yOffset = 0;
let themeNode = this.get_theme_node(); let themeNode = this.actor.get_theme_node();
let rise = themeNode.get_length('-arrow-rise'); let rise = themeNode.get_length('-arrow-rise');
let fade = (animate & PopupAnimation.FADE); let fade = (animate & PopupAnimation.FADE);
let animationTime = (animate & PopupAnimation.FULL) ? POPUP_ANIMATION_TIME : 0; let animationTime = (animate & PopupAnimation.FULL) ? POPUP_ANIMATION_TIME : 0;
@@ -188,7 +158,7 @@ var BoxPointer = new Lang.Class({
transition: 'linear', transition: 'linear',
time: animationTime, time: animationTime,
onComplete: () => { onComplete: () => {
this.hide(); this.actor.hide();
this.opacity = 0; this.opacity = 0;
this.xOffset = 0; this.xOffset = 0;
this.yOffset = 0; this.yOffset = 0;
@@ -198,48 +168,37 @@ var BoxPointer = new Lang.Class({
}); });
}, },
_adjustAllocationForArrow(isWidth, minSize, natSize) { _adjustAllocationForArrow(isWidth, alloc) {
let themeNode = this.get_theme_node(); let themeNode = this.actor.get_theme_node();
let borderWidth = themeNode.get_length('-arrow-border-width'); let borderWidth = themeNode.get_length('-arrow-border-width');
minSize += borderWidth * 2; alloc.min_size += borderWidth * 2;
natSize += borderWidth * 2; alloc.natural_size += borderWidth * 2;
if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM)) if ((!isWidth && (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM))
|| (isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) { || (isWidth && (this._arrowSide == St.Side.LEFT || this._arrowSide == St.Side.RIGHT))) {
let rise = themeNode.get_length('-arrow-rise'); let rise = themeNode.get_length('-arrow-rise');
minSize += rise; alloc.min_size += rise;
natSize += rise; alloc.natural_size += rise;
} }
return [minSize, natSize];
}, },
vfunc_get_preferred_width(forHeight) { _getPreferredWidth(actor, forHeight, alloc) {
let themeNode = this.get_theme_node(); let [minInternalSize, natInternalSize] = this.bin.get_preferred_width(forHeight);
forHeight = themeNode.adjust_for_height(forHeight); alloc.min_size = minInternalSize;
alloc.natural_size = natInternalSize;
let width = this.bin.get_preferred_width(forHeight); this._adjustAllocationForArrow(true, alloc);
width = this._adjustAllocationForArrow(true, ...width);
return themeNode.adjust_preferred_width(...width);
}, },
vfunc_get_preferred_height(forWidth) { _getPreferredHeight(actor, forWidth, alloc) {
let themeNode = this.get_theme_node(); let themeNode = this.actor.get_theme_node();
let borderWidth = themeNode.get_length('-arrow-border-width'); let borderWidth = themeNode.get_length('-arrow-border-width');
forWidth = themeNode.adjust_for_width(forWidth); let [minSize, naturalSize] = this.bin.get_preferred_height(forWidth - 2 * borderWidth);
alloc.min_size = minSize;
let height = this.bin.get_preferred_height(forWidth - 2 * borderWidth); alloc.natural_size = naturalSize;
height = this._adjustAllocationForArrow(false, ...height); this._adjustAllocationForArrow(false, alloc);
return themeNode.adjust_preferred_height(...height);
}, },
vfunc_allocate(box, flags) { _allocate(actor, box, flags) {
this.set_allocation(box, flags); let themeNode = this.actor.get_theme_node();
let themeNode = this.get_theme_node();
box = themeNode.get_content_box(box);
let borderWidth = themeNode.get_length('-arrow-border-width'); let borderWidth = themeNode.get_length('-arrow-border-width');
let rise = themeNode.get_length('-arrow-rise'); let rise = themeNode.get_length('-arrow-rise');
let childBox = new Clutter.ActorBox(); let childBox = new Clutter.ActorBox();
@@ -279,12 +238,12 @@ var BoxPointer = new Lang.Class({
}, },
_drawBorder(area) { _drawBorder(area) {
let themeNode = this.get_theme_node(); let themeNode = this.actor.get_theme_node();
if (this._arrowActor) { if (this._arrowActor) {
let [sourceX, sourceY] = this._arrowActor.get_transformed_position(); let [sourceX, sourceY] = this._arrowActor.get_transformed_position();
let [sourceWidth, sourceHeight] = this._arrowActor.get_transformed_size(); let [sourceWidth, sourceHeight] = this._arrowActor.get_transformed_size();
let [absX, absY] = this.get_transformed_position(); let [absX, absY] = this.actor.get_transformed_position();
if (this._arrowSide == St.Side.TOP || if (this._arrowSide == St.Side.TOP ||
this._arrowSide == St.Side.BOTTOM) { this._arrowSide == St.Side.BOTTOM) {
@@ -463,7 +422,7 @@ var BoxPointer = new Lang.Class({
setPosition(sourceActor, alignment) { setPosition(sourceActor, alignment) {
// We need to show it now to force an allocation, // We need to show it now to force an allocation,
// so that we can query the correct size. // so that we can query the correct size.
this.show(); this.actor.show();
this._sourceActor = sourceActor; this._sourceActor = sourceActor;
this._arrowAlignment = alignment; this._arrowAlignment = alignment;
@@ -491,13 +450,13 @@ var BoxPointer = new Lang.Class({
let sourceAllocation = Shell.util_get_transformed_allocation(sourceActor); let sourceAllocation = Shell.util_get_transformed_allocation(sourceActor);
let sourceCenterX = sourceAllocation.x1 + sourceContentBox.x1 + (sourceContentBox.x2 - sourceContentBox.x1) * this._sourceAlignment; let sourceCenterX = sourceAllocation.x1 + sourceContentBox.x1 + (sourceContentBox.x2 - sourceContentBox.x1) * this._sourceAlignment;
let sourceCenterY = sourceAllocation.y1 + sourceContentBox.y1 + (sourceContentBox.y2 - sourceContentBox.y1) * this._sourceAlignment; let sourceCenterY = sourceAllocation.y1 + sourceContentBox.y1 + (sourceContentBox.y2 - sourceContentBox.y1) * this._sourceAlignment;
let [minWidth, minHeight, natWidth, natHeight] = this.get_preferred_size(); let [minWidth, minHeight, natWidth, natHeight] = this.actor.get_preferred_size();
// We also want to keep it onscreen, and separated from the // We also want to keep it onscreen, and separated from the
// edge by the same distance as the main part of the box is // edge by the same distance as the main part of the box is
// separated from its sourceActor // separated from its sourceActor
let monitor = Main.layoutManager.findMonitorForActor(sourceActor); let monitor = Main.layoutManager.findMonitorForActor(sourceActor);
let themeNode = this.get_theme_node(); let themeNode = this.actor.get_theme_node();
let borderWidth = themeNode.get_length('-arrow-border-width'); let borderWidth = themeNode.get_length('-arrow-border-width');
let arrowBase = themeNode.get_length('-arrow-base'); let arrowBase = themeNode.get_length('-arrow-base');
let borderRadius = themeNode.get_length('-arrow-border-radius'); let borderRadius = themeNode.get_length('-arrow-border-radius');
@@ -583,7 +542,7 @@ var BoxPointer = new Lang.Class({
this.setArrowOrigin(arrowOrigin); this.setArrowOrigin(arrowOrigin);
let parent = this.get_parent(); let parent = this.actor.get_parent();
let success, x, y; let success, x, y;
while (!success) { while (!success) {
[success, x, y] = parent.transform_stage_point(resX, resY); [success, x, y] = parent.transform_stage_point(resX, resY);
@@ -622,16 +581,16 @@ var BoxPointer = new Lang.Class({
// allocation loops and warnings. Instead we do the positioning via // allocation loops and warnings. Instead we do the positioning via
// the anchor point, which is independent of allocation, and leave // the anchor point, which is independent of allocation, and leave
// x == y == 0. // x == y == 0.
this.set_anchor_point(-(this._xPosition + this._xOffset), this.actor.set_anchor_point(-(this._xPosition + this._xOffset),
-(this._yPosition + this._yOffset)); -(this._yPosition + this._yOffset));
}, },
_calculateArrowSide(arrowSide) { _calculateArrowSide(arrowSide) {
let sourceAllocation = Shell.util_get_transformed_allocation(this._sourceActor); let sourceAllocation = Shell.util_get_transformed_allocation(this._sourceActor);
let [minWidth, minHeight, boxWidth, boxHeight] = this.get_preferred_size(); let [minWidth, minHeight, boxWidth, boxHeight] = this._container.get_preferred_size();
let monitorActor = this.sourceActor; let monitorActor = this.sourceActor;
if (!monitorActor) if (!monitorActor)
monitorActor = this; monitorActor = this.actor;
let monitor = Main.layoutManager.findMonitorForActor(monitorActor); let monitor = Main.layoutManager.findMonitorForActor(monitorActor);
switch (arrowSide) { switch (arrowSide) {
@@ -666,7 +625,7 @@ var BoxPointer = new Lang.Class({
this._arrowSide = arrowSide; this._arrowSide = arrowSide;
this._reposition(); this._reposition();
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => { Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
this.queue_relayout(); this._container.queue_relayout();
return false; return false;
}); });
@@ -692,6 +651,14 @@ var BoxPointer = new Lang.Class({
return this._yOffset; return this._yOffset;
}, },
set opacity(opacity) {
this.actor.opacity = opacity;
},
get opacity() {
return this.actor.opacity;
},
updateArrowSide(side) { updateArrowSide(side) {
this._arrowSide = side; this._arrowSide = side;
this._border.queue_repaint(); this._border.queue_repaint();
@@ -704,6 +671,7 @@ var BoxPointer = new Lang.Class({
}, },
getArrowHeight() { getArrowHeight() {
return this.get_theme_node().get_length('-arrow-rise'); return this.actor.get_theme_node().get_length('-arrow-rise');
} }
}); });
Signals.addSignalMethods(BoxPointer.prototype);

View File

@@ -773,11 +773,9 @@ var NotificationMessage = new Lang.Class({
this.connect('close', () => { this.connect('close', () => {
this._closed = true; this._closed = true;
if (this.notification) this.notification.destroy(MessageTray.NotificationDestroyedReason.DISMISSED);
this.notification.destroy(MessageTray.NotificationDestroyedReason.DISMISSED);
}); });
this._destroyId = notification.connect('destroy', () => { this._destroyId = notification.connect('destroy', () => {
this.notification = null;
if (!this._closed) if (!this._closed)
this.close(); this.close();
}); });
@@ -805,8 +803,6 @@ var NotificationMessage = new Lang.Class({
}, },
_onDestroy() { _onDestroy() {
this.parent();
if (this._updatedId) if (this._updatedId)
this.notification.disconnect(this._updatedId); this.notification.disconnect(this._updatedId);
this._updatedId = 0; this._updatedId = 0;
@@ -868,11 +864,11 @@ var EventsSection = new Lang.Class({
if (sameYear(this._date, now)) if (sameYear(this._date, now))
/* Translators: Shown on calendar heading when selected day occurs on current year */ /* Translators: Shown on calendar heading when selected day occurs on current year */
dayFormat = Shell.util_translate_time_string(NC_("calendar heading", dayFormat = Shell.util_translate_time_string(NC_("calendar heading",
"%A, %B %-d")); "%A, %B %d"));
else else
/* Translators: Shown on calendar heading when selected day occurs on different year */ /* Translators: Shown on calendar heading when selected day occurs on different year */
dayFormat = Shell.util_translate_time_string(NC_("calendar heading", dayFormat = Shell.util_translate_time_string(NC_("calendar heading",
"%A, %B %-d, %Y")); "%A, %B %d, %Y"));
this._title.label = this._date.toLocaleFormat(dayFormat); this._title.label = this._date.toLocaleFormat(dayFormat);
}, },

View File

@@ -28,10 +28,7 @@ var CloseDialog = new Lang.Class({
this.parent(); this.parent();
this._window = window; this._window = window;
this._dialog = null; this._dialog = null;
this._tracked = undefined;
this._timeoutId = 0; this._timeoutId = 0;
this._windowFocusChangedId = 0;
this._keyFocusChangedId = 0;
}, },
get window() { get window() {
@@ -99,37 +96,6 @@ var CloseDialog = new Lang.Class({
this.response(Meta.CloseDialogResponse.FORCE_CLOSE); this.response(Meta.CloseDialogResponse.FORCE_CLOSE);
}, },
_onFocusChanged() {
if (Meta.is_wayland_compositor())
return;
let focusWindow = global.display.focus_window;
let keyFocus = global.stage.key_focus;
let shouldTrack;
if (focusWindow != null)
shouldTrack = focusWindow == this._window;
else
shouldTrack = keyFocus && this._dialog.contains(keyFocus);
if (this._tracked === shouldTrack)
return;
if (shouldTrack)
Main.layoutManager.trackChrome(this._dialog,
{ affectsInputRegion: true });
else
Main.layoutManager.untrackChrome(this._dialog);
// The buttons are broken when they aren't added to the input region,
// so disable them properly in that case
this._dialog.buttonLayout.get_children().forEach(b => {
b.reactive = shouldTrack;
});
this._tracked = shouldTrack;
},
vfunc_show() { vfunc_show() {
if (this._dialog != null) if (this._dialog != null)
return; return;
@@ -142,14 +108,6 @@ var CloseDialog = new Lang.Class({
return GLib.SOURCE_CONTINUE; return GLib.SOURCE_CONTINUE;
}); });
this._windowFocusChangedId =
global.display.connect('notify::focus-window',
this._onFocusChanged.bind(this));
this._keyFocusChangedId =
global.stage.connect('notify::key-focus',
this._onFocusChanged.bind(this));
this._addWindowEffect(); this._addWindowEffect();
this._initDialog(); this._initDialog();
@@ -160,7 +118,9 @@ var CloseDialog = new Lang.Class({
{ scale_y: 1, { scale_y: 1,
transition: 'linear', transition: 'linear',
time: DIALOG_TRANSITION_TIME, time: DIALOG_TRANSITION_TIME,
onComplete: this._onFocusChanged.bind(this) onComplete: () => {
Main.layoutManager.trackChrome(this._dialog, { affectsInputRegion: true });
}
}); });
}, },
@@ -173,12 +133,6 @@ var CloseDialog = new Lang.Class({
GLib.source_remove(this._timeoutId); GLib.source_remove(this._timeoutId);
this._timeoutId = 0; this._timeoutId = 0;
global.display.disconnect(this._windowFocusChangedId)
this._windowFocusChangedId = 0;
global.stage.disconnect(this._keyFocusChangedId);
this._keyFocusChangedId = 0;
let dialog = this._dialog; let dialog = this._dialog;
this._dialog = null; this._dialog = null;
this._removeWindowEffect(); this._removeWindowEffect();

View File

@@ -25,7 +25,6 @@ var AutomountManager = new Lang.Class({
_init() { _init() {
this._settings = new Gio.Settings({ schema_id: SETTINGS_SCHEMA }); this._settings = new Gio.Settings({ schema_id: SETTINGS_SCHEMA });
this._volumeQueue = []; this._volumeQueue = [];
this._activeOperations = new Map();
this._session = new GnomeSession.SessionManager(); this._session = new GnomeSession.SessionManager();
this._session.connectSignal('InhibitorAdded', this._session.connectSignal('InhibitorAdded',
this._InhibitorsChanged.bind(this)); this._InhibitorsChanged.bind(this));
@@ -183,7 +182,7 @@ var AutomountManager = new Lang.Class({
this._allowAutorun(volume); this._allowAutorun(volume);
let mountOp = operation ? operation.mountOp : null; let mountOp = operation ? operation.mountOp : null;
this._activeOperations.set(volume, operation); volume._operation = operation;
volume.mount(0, mountOp, null, volume.mount(0, mountOp, null,
this._onVolumeMounted.bind(this)); this._onVolumeMounted.bind(this));
@@ -197,13 +196,9 @@ var AutomountManager = new Lang.Class({
this._closeOperation(volume); this._closeOperation(volume);
} catch (e) { } catch (e) {
// FIXME: we will always get G_IO_ERROR_FAILED from the gvfs udisks // FIXME: we will always get G_IO_ERROR_FAILED from the gvfs udisks
// backend, see https://bugs.freedesktop.org/show_bug.cgi?id=51271 // backend in this case, see
// To reask the password if the user input was empty or wrong, we // https://bugs.freedesktop.org/show_bug.cgi?id=51271
// will check for corresponding error messages. However, these if (e.message.indexOf('No key available with this passphrase') != -1) {
// error strings are not unique for the cases in the comments below.
if (e.message.includes('No key available with this passphrase') || // cryptsetup
e.message.includes('No key available to unlock device') || // udisks (no password)
e.message.includes('Error unlocking')) { // udisks (wrong password)
this._reaskPassword(volume); this._reaskPassword(volume);
} else { } else {
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED)) if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
@@ -215,17 +210,12 @@ var AutomountManager = new Lang.Class({
}, },
_onVolumeRemoved(monitor, volume) { _onVolumeRemoved(monitor, volume) {
if (volume._allowAutorunExpireId && volume._allowAutorunExpireId > 0) {
Mainloop.source_remove(volume._allowAutorunExpireId);
delete volume._allowAutorunExpireId;
}
this._volumeQueue = this._volumeQueue =
this._volumeQueue.filter(element => (element != volume)); this._volumeQueue.filter(element => (element != volume));
}, },
_reaskPassword(volume) { _reaskPassword(volume) {
let prevOperation = this._activeOperations.get(volume); let existingDialog = volume._operation ? volume._operation.borrowDialog() : null;
let existingDialog = prevOperation ? prevOperation.borrowDialog() : null;
let operation = let operation =
new ShellMountOperation.ShellMountOperation(volume, new ShellMountOperation.ShellMountOperation(volume,
{ existingDialog: existingDialog }); { existingDialog: existingDialog });
@@ -233,11 +223,8 @@ var AutomountManager = new Lang.Class({
}, },
_closeOperation(volume) { _closeOperation(volume) {
let operation = this._activeOperations.get(volume); if (volume._operation)
if (!operation) volume._operation.close();
return;
operation.close();
this._activeOperations.delete(volume);
}, },
_allowAutorun(volume) { _allowAutorun(volume) {
@@ -247,10 +234,8 @@ var AutomountManager = new Lang.Class({
_allowAutorunExpire(volume) { _allowAutorunExpire(volume) {
let id = Mainloop.timeout_add_seconds(AUTORUN_EXPIRE_TIMEOUT_SECS, () => { let id = Mainloop.timeout_add_seconds(AUTORUN_EXPIRE_TIMEOUT_SECS, () => {
volume.allowAutorun = false; volume.allowAutorun = false;
delete volume._allowAutorunExpireId;
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;
}); });
volume._allowAutorunExpireId = id;
GLib.Source.set_name_by_id(id, '[gnome-shell] volume.allowAutorun'); GLib.Source.set_name_by_id(id, '[gnome-shell] volume.allowAutorun');
} }
}); });

View File

@@ -8,8 +8,6 @@ const GnomeSession = imports.misc.gnomeSession;
const Main = imports.ui.main; const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray; const MessageTray = imports.ui.messageTray;
const { loadInterfaceXML } = imports.misc.fileUtils;
// GSettings keys // GSettings keys
const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling'; const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling';
const SETTING_DISABLE_AUTORUN = 'autorun-never'; const SETTING_DISABLE_AUTORUN = 'autorun-never';
@@ -76,7 +74,16 @@ function startAppForMount(app, mount) {
/******************************************/ /******************************************/
const HotplugSnifferIface = loadInterfaceXML('org.gnome.Shell.HotplugSniffer'); const HotplugSnifferIface = `
<node>
<interface name="org.gnome.Shell.HotplugSniffer">
<method name="SniffURI">
<arg type="s" direction="in" />
<arg type="as" direction="out" />
</method>
</interface>
</node>`;
const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface); const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface);
function HotplugSniffer() { function HotplugSniffer() {
return new HotplugSnifferProxy(Gio.DBus.session, return new HotplugSnifferProxy(Gio.DBus.session,

Some files were not shown because too many files have changed in this diff Show More