Compare commits

...

174 Commits

Author SHA1 Message Date
db19012a41 Bump version to 3.11.91
Update NEWS.
2014-03-06 00:23:41 +01:00
62be46884e calendar: Don't forget to rebuild the calendar
Don't forget to rebuild the calendar when changing the setting
'org.gnome.shell.calendar show-weekdate'. This wasn't happening anymore
and changing the setting resulted in a calendar without the days
grid.

https://bugzilla.gnome.org/show_bug.cgi?id=725533
2014-03-05 20:14:56 +01:00
3f2e6a48a9 Updated Hebrew translation 2014-03-05 18:58:56 +02:00
ff124e5f74 Updated Spanish translation 2014-03-05 16:58:35 +01:00
c07421c195 Calendar: make current date label clickable
Once you start navigating between months, you can't return to the
current day.  However, the current day is always displayed above the
calendar grid.  Fix this by making the current date clickable; when
clicked, the calendar grid jumps back to that day.

https://bugzilla.gnome.org/show_bug.cgi?id=641366
2014-03-05 16:40:56 +01:00
de8348d3b9 Updated Spanish translation 2014-03-05 16:39:11 +01:00
184df8a853 Updated Korean translation 2014-03-05 19:55:27 +09:00
12768a147c Updated Norwegian bokmål translation 2014-03-05 06:47:35 +01:00
94161cea37 Updated Polish translation 2014-03-04 18:18:35 +01:00
52a4ef7cf7 Updated Hebrew translation 2014-03-04 18:30:55 +02:00
3432f71500 NetworkMenu: use Connected instead of profile name for wired and wwan
The profile name is most often not useful (because it's an
autogenerated string like "Wired Connection 1"), and even when it
is, it's already available in the submenu.

https://bugzilla.gnome.org/show_bug.cgi?id=725586
2014-03-04 16:08:02 +01:00
8282aa6c24 Updated Galician translations 2014-03-03 17:34:02 +01:00
59f9eaa1c9 NetworkAgent: fix initial secrets requests after 17726abb
While the named commit was correct for VPN connections, it didn't
work correctly for the initial secrets requests like when connecting
to a new access point.  In that case, secrets *should* be requested
when none are found, but only if interaction is enabled.  The
bits of 17726abb which removed checking secrets against the hints
*were* correct, but 17726abb removed too much.

Also, to ensure passwords don't get inadvertently cleared when
simply reading them from the keyring, don't save passwords
unless something might have changed.

https://bugzilla.gnome.org/show_bug.cgi?id=724779
2014-03-03 15:17:43 +01:00
4433b735c4 Updated Lithuanian translation 2014-03-02 19:57:10 +02:00
9cd30fa6b5 Updated Polish translation 2014-03-02 17:24:18 +01:00
2c7bbfb500 Fix a typo 2014-03-02 17:21:34 +01:00
51a1d23bf9 Finnish translation update by Jiri Grönroos 2014-03-01 20:15:45 +02:00
c02e6e82bc Update Arabic translation 2014-02-28 23:09:15 +02:00
e37a3fa7e6 perf: Restore shell after runs
Currently running the perf tool results into no wm running
afterwards making it hard for the user to get the results from a terminal
and generally does not make it easy for users to run it to gather numbers.

So restore the shell after the test has completed.

https://bugzilla.gnome.org/show_bug.cgi?id=724870
2014-02-28 21:40:31 +01:00
e23c2ffecc plugin: Don't query for swap_events support directly
There is no need for the duplication, clutter already exports
this information.

https://bugzilla.gnome.org/show_bug.cgi?id=724870
2014-02-28 21:40:31 +01:00
744f11d045 Updated Spanish translation 2014-02-28 14:13:08 +01:00
b7eb1f3e8b Don't use get_core_device
clutter_device_manager_get_core_device calls XIGetClientPointer, which
requires a round-trip to the server. Since we do this on StWidget
creation, this means a full round-trip for every created StWidget.
Replace this with get_device with the ID of the VCP/VCK, since mutter
doesn't support MPX, and we know this is what the device is.
2014-02-27 14:55:29 -05:00
3f28091e52 Tajik translation updated 2014-02-27 12:13:18 +05:00
b4ee86955d messageTray: Make sure that the source actor is square
Commit b7e1539699 removed the size to support hidpi but that caused the
actor to no longer be square. Fix that by going back to setting a size
but apply the scale factor before doing so.
2014-02-26 18:15:38 +01:00
8b866efe92 location: Adapt to new Geoclue agent interface
To be able to correctly setup dbus policy, I had to change the expected
agent D-Bus API a bit: Now object path is fixed and not different for
each user.

https://bugzilla.gnome.org/show_bug.cgi?id=725082
2014-02-25 12:45:32 +00:00
fb61ab8df7 Updated Spanish translation 2014-02-24 17:28:11 +01:00
990956ece7 Updated Galician translations 2014-02-24 15:22:12 +01:00
414b592d53 Updated Hebrew translation 2014-02-24 15:25:37 +02:00
751154d9da shell-util: Fix warning in shell_util_cursor_tracker_to_clutter
If the sprite is NULL, like if a Wayland app wanted to hide the cursor,
then we need to hide the ClutterTexture on our side, as ClutterTexture
has no easy way to tell it to paint nothing.
2014-02-23 10:54:32 -05:00
29addc499c shell-global: Only set the scale factor if get_setting succeeded
If gdk_screen_get_setting fails, like if it's running without XSettings,
then the GValue will have a value of 0. A lot of code tries to divide by
the scale factor. This produces NaN, and combined with the fact that NaN
is "leaky", we very quickly end up spinning out of control.
2014-02-23 10:54:32 -05:00
caa98de581 Updated Hebrew translation 2014-02-23 14:16:30 +02:00
1fd1ec4312 Updated Chinese (China) translation 2014-02-23 09:57:11 +00:00
f4607626e4 workspaceThumbnails: Really fix DND creating new workspaces
The same problem spotted in commit 89a2dc71fc is present in
some more places, fix those as well.

https://bugzilla.gnome.org/show_bug.cgi?id=724686
2014-02-23 00:29:29 +01:00
b494c15e4b shell-js: Kill some compile warnings
jsapi.h has some bad warnings with gcc. gjs-module.h already includes
jsapi.h and uses a complicated set of GCC pragmas to mask them out, so
just kill our include.
2014-02-22 17:42:03 -05:00
3c0defa125 Updated Belarusian translation. 2014-02-22 11:27:32 +01:00
f2df4d95de Updated Czech translation 2014-02-22 08:51:14 +01:00
fabcf20e06 Updated Kazakh translation 2014-02-21 17:25:04 +00:00
b9510b9ab7 Updated Spanish translation 2014-02-21 13:10:31 +01:00
52a2ebad04 Updated Brazilian Portuguese translation 2014-02-21 12:02:52 +00:00
89a2dc71fc workspaceThumbnails: Fix creating new workspace via DND
Commit 61a58ff3c9 replaced the (removed in commit 254afc50223a7)
MetaWindowActor.get_workspace() method by MetaWindow.get_workspace(),
but did not take into account that the return values differ - the
former returns the workspace index, the latter the workspace object.

https://bugzilla.gnome.org/show_bug.cgi?id=724686
2014-02-21 11:48:55 +01:00
adb0de43d8 Updated Indonesian translation 2014-02-21 06:46:22 +00:00
e2a811a720 Updated Greek translation 2014-02-20 23:20:56 +02:00
5bcafc5c17 Updated Lithuanian translation 2014-02-20 22:42:10 +02:00
2d24536caf shellDBus: Fix LaunchExtensionPreferences()
Commit 5dedc5d8ba removed "unused" functionality which was
still used by that method. Launch it via GAppInfo instead, which
still supports passing URIs.

https://bugzilla.gnome.org/show_bug.cgi?id=724813
2014-02-20 20:27:02 +01:00
b088c4086b Tajik translation updated 2014-02-20 17:00:40 +05:00
3c58f4abd3 Bump version to 3.11.90
Update NEWS.
2014-02-20 00:31:55 +01:00
e2a9b27b2b Revert "viewSelector: Give the active page key focus when it is shown"
This broke keyboard navigation in the app picker, which is not an
acceptable regression for the release.

This reverts commit ec2bb039ae.
2014-02-20 00:29:14 +01:00
fcd5f06c09 windowManager: Animate tile previews
With tile previews being implemented as Clutter actors in the shell, we
can now easily add fancy animations when showing/hiding the preview.
Besides looking more polished, the animations also help understanding
what will happen to the window when the drag is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=665758
2014-02-20 00:29:14 +01:00
6d93c8b3fd windowManager: Implement tile previews
Mutter now delegates tile previews to compositor plugins, so
add a simple implementation based on the UI previously provided
by mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=665758
2014-02-20 00:29:14 +01:00
2663e1be5d window-tracker: Be more cautious when setting focus app
Since we started tracking non-interesting windows, we can no longer
assume that if we manage to find an app associated with the focus window,
it should appear focused - we now can find apps for docks, the DESKTOP
window etc.
To restore the old behavior, make sure that the focus window or one of
its parents is "interesting".

https://bugzilla.gnome.org/show_bug.cgi?id=722928
2014-02-20 00:29:14 +01:00
0fa6be4614 endSessionDialog: Add extra strings for translation
Add two extra, currently unused strings in order to make the life easier
for translators and avoid breaking the upcoming string freezes.

https://bugzilla.gnome.org/show_bug.cgi?id=722898
2014-02-20 00:27:35 +01:00
46163a6607 endSessionDialog: Warn when trying to install updates on battery power
Interrupting update installation can mess up the package database quite
a bit and could lead to totally destroying the distro installtion. To
avoid running out of juice during an upgrade, warn when someone tries to
install updates on battery power.

https://bugzilla.gnome.org/show_bug.cgi?id=722898
2014-02-20 00:27:35 +01:00
645ef093f7 endSessionDialog: Offer offline updates in the shutdown dialog
This adds a checkbox for installing software updates to the shut down
dialog. The implementation relies on an already prepared offline update
and uses PackageKit's pk-trigger-offline-update helper to trigger the
installation.

https://bugzilla.gnome.org/show_bug.cgi?id=722898
2014-02-20 00:27:35 +01:00
7551e134da endSessionDialog: Fix the "Restart & Install" button
This moves the dialog type overriding that gnome-software uses to bring
up restartInstallDialogContent from _sync() to OpenAsync(), in order to
ensure the type is overridden early enough to show the correct buttons.

While at this, make sure the & symbol in the button's label is escaped
to avoid runtime warnings, now that the label actually gets used.

https://bugzilla.gnome.org/show_bug.cgi?id=722898
2014-02-20 00:27:35 +01:00
5bec5fb6cb endSessionDialog: Simplify CSS padding handling
... so that we add more items to messageLayout without having to
hardcode the same padding in each of the children.

https://bugzilla.gnome.org/show_bug.cgi?id=722898
2014-02-20 00:27:35 +01:00
c176af4da5 endSessionDialog: Use a 48px icon as per mockups
https://bugzilla.gnome.org/show_bug.cgi?id=722898
2014-02-20 00:27:35 +01:00
2631f03108 windowManager: Don't remove the active workspace
Currently workspaces (except for the last one) are removed when
they become empty. While we do have special treatment for the
case where the currently active workspace is removed, we just
move directly without animations to the last workspace to avoid
ending up on a "random" workspace. However this behavior is still
a bit confusing, so keep the workspace around instead until the
user decides to move to another one.

https://bugzilla.gnome.org/show_bug.cgi?id=709064
2014-02-19 21:52:52 +01:00
525c71658b Updated Norwegian bokmål translation 2014-02-19 19:45:45 +01:00
10e5778deb Updated Brazilian Portuguese translation 2014-02-19 18:04:26 +00:00
6512a5fd6b browser_plugin: Expose version validation boolean
Expose the version validation boolean through the public JS
API so that e.g.o can make use of it.

https://bugzilla.gnome.org/show_bug.cgi?id=724683
2014-02-19 17:07:38 +01:00
1af40b1345 extensionSystem: Add a gsettings key to disable version validation
Add a key 'disable-extension-version-validation' key that disables
the validation of extension's claimed to be supported shell version
with the shell version and just load all extensions unconditionally.

https://bugzilla.gnome.org/show_bug.cgi?id=724683
2014-02-19 17:07:38 +01:00
0418b68051 popupMenu: Use an image for arrows
Until now the arrows were the associated arrow
character of the font. This cause some problems like
different arrows for different fonts, and size can be
altered because of the font size.
To solve that, use an image for the arrows.

https://bugzilla.gnome.org/show_bug.cgi?id=720206
2014-02-19 13:44:27 +01:00
a7283864e8 popupMenu: Use relative rotation for arrows
Currently the animation of the arrows doesn't take
into account previous rotation.
Since in a incoming patch we will use one arrow
and rotate it to generate the four directions, we
need that the animation use relative rotation.

https://bugzilla.gnome.org/show_bug.cgi?id=720206
2014-02-19 13:44:26 +01:00
4950bad2a7 popupMenu: Rename _arrow_rotation to follow JS covention 2014-02-19 13:44:26 +01:00
470ac0eae3 shell_global: Use correct agruments for in update_scale_factor
Otherwise we crash ...

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-18 23:40:34 +01:00
87abbf9b20 hdpi: Revert hacks
Revert the hacks that where added in response to a bug caused by
commit ba459f4d20

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-18 23:40:34 +01:00
3e7e88cd5f popupMenu: Make destroy() a bit more robust
Currently destroying a menu's actor and calling its destroy() method
are subtly different - the latter will also result in the menu being
removed from the corresponding menu manager.
There is no good justification for that behavior, so make both actions
behave the same.

https://bugzilla.gnome.org/show_bug.cgi?id=724690
2014-02-18 21:27:24 +01:00
b7e1539699 messageTray: don't force a size on SourceActor's iconBin
Supports hidpi icons this way.

https://bugzilla.gnome.org/show_bug.cgi?id=724607
2014-02-18 07:46:54 -08:00
8492f2ba24 osdWindow: scale by scaleFactor
Since we calculate this dimensions from the size of the monitor, the
result was too large. Scale it by scaleFactor instead.

https://bugzilla.gnome.org/show_bug.cgi?id=724607
2014-02-18 07:46:07 -08:00
737f4eb1c1 dateMenu: Update gnome-clocks' desktop file
https://bugzilla.gnome.org/show_bug.cgi?id=724282
2014-02-18 14:52:48 +01:00
58191ea66b telepathyClient: Use locale format for timestamps
Until now the timestamps were using 24h format.
Check gsetting clock-format to know when
the user is using 12h format or 24h format and
make the timestamp acordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=715158
2014-02-18 11:27:34 +01:00
1f786df462 NetworkMenu: add VPN settings menu item
Add a menu item that launches the VPN page of the network panel,
or the network panel generically if multiple VPNs are configured.

https://bugzilla.gnome.org/show_bug.cgi?id=709167
2014-02-18 00:17:11 +01:00
fa4c481aed telepathyClient: Use ratio char for timestamps 2014-02-17 20:52:51 +01:00
d555fd7883 ShellApp: remove impossible check
The action muxer is created and destroyed with the running state,
it can never be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=722554
2014-02-17 20:44:58 +01:00
fe7ece1f5a NetworkMenu: use radio items instead of switches for multiple profiles
Multiple connections for the same device are mutually exclusive, so
a switch is not the appropriate UI metaphor. Use a radio item instead,
and provide a separate "Turn off" item to disconnect.
Behavior when there is only one connection is not changed, there
is a single Connect/Turn off item.

https://bugzilla.gnome.org/show_bug.cgi?id=723570
2014-02-17 20:44:58 +01:00
2bb3aed729 NetworkMenu: sort connections by name only
We don't watch for timestamp changes, and sorting by name keeps
the order consistent and predictable. In practice, there should
be at most 3 or 4 elements, so the user will always read all them
at once and sorting is irrelevant.

https://bugzilla.gnome.org/show_bug.cgi?id=723570
2014-02-17 20:44:57 +01:00
488a42696c NetworkMenu: fix connection name update
If the connection name is changed, the UUID doesn't necessarily,
so checkConnection would take the early return path. Make sure
we update the existing menu item too.

https://bugzilla.gnome.org/show_bug.cgi?id=723570
2014-02-17 20:44:57 +01:00
f43ff45683 NetworkMenu: update for latest designs
Distinguish reaching the full internet from being in a non-routed
LAN, and show a different icon when being an hotspot master.

https://bugzilla.gnome.org/show_bug.cgi?id=723570
2014-02-17 20:44:57 +01:00
bde1451896 NMDeviceWired: don't unconditionally access device.active_connection
The active_connection might be null, but the NMApplet code might
still belive the device wrapper is the primary connection (because
dbus signals are emitted one after the other).
(Also, remove an old and wrong comment about bluetooth in wwan code)

Fixes:

(gnome-shell:22511): Gjs-WARNING **: JS ERROR: Exception in callback for signal: icon-changed: TypeError: this._device.active_connection is null
NMDeviceWired<.getIndicatorIcon@resource:///org/gnome/shell/ui/status/network.js:475
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
NMApplet<._updateIcon@resource:///org/gnome/shell/ui/status/network.js:1790
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
_emit@resource:///org/gnome/gjs/modules/signals.js:124
NMConnectionSection<._addConnection/<@resource:///org/gnome/shell/ui/status/network.js:265
_emit@resource:///org/gnome/gjs/modules/signals.js:124
NMConnectionItem<._sync@resource:///org/gnome/shell/ui/status/network.js:137
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
NMConnectionItem<.setActiveConnection@resource:///org/gnome/shell/ui/status/network.js:169
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
NMConnectionDevice<._activeConnectionChanged@resource:///org/gnome/shell/ui/status/network.js:327
wrapper@resource:///org/gnome/gjs/modules/lang.js:169

https://bugzilla.gnome.org/show_bug.cgi?id=723570
2014-02-17 20:44:57 +01:00
fff2ca6f26 telephatyIdle: Time stamps next conversation line
To give more context to the chat notification bubble, put the
time stamp next to the last conversation line instead of
a new line.

https://bugzilla.gnome.org/show_bug.cgi?id=708031
2014-02-17 20:00:00 +01:00
bec57a6cee Revert "location: Allow user to disable GPS"
This reverts commit 5d05b66902.

Had a long discussion with Bastien Nocera and Allan Day on IRC about
this and in the end we decided to go with the simple on/off controls for
now.

Conflicts:
	js/ui/status/location.js

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 15:49:34 +00:00
a012ca4fac layout: Don't query the monitor size twice 2014-02-17 13:42:20 +01:00
3ba49b0a50 layout: Protect against broken monitor size reports
VNC / XRDP reports nonsensial (i.e 0) monitor dimensions causing us to
end up with a dpi of "Infinity" and thus scale even though we shouldn't.

https://bugzilla.redhat.com/show_bug.cgi?id=1065788
2014-02-17 13:38:55 +01:00
314aa024b5 appDisplay: Add time to view switch animation
Add more time to the fade in/out animation when switching
views so they don't switch abruptly and add a delay
between view switch animations to avoid morphing.

https://bugzilla.gnome.org/show_bug.cgi?id=722331
2014-02-17 13:31:52 +01:00
598f750859 messageTray: Add source actor without count label
Split the current implementation of SourceActor into
SourceActor and SourceActorWithLabel.
In this manner we can use source actors withouth count labels,
required in the screenShield to not clash with the count
text label.

https://bugzilla.gnome.org/show_bug.cgi?id=709275
2014-02-17 13:22:39 +01:00
8057848458 location: Rename _onoffAction to _onOffAction
It was just a typo that this patch now corrects.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 12:08:40 +00:00
e80c28a530 location: Mark 2 user-visible strings for translation
https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 12:08:40 +00:00
5d05b66902 location: Allow user to disable GPS
When exact accuracy (i-e GPS) is available, allow user to disable that.
When users don't want application to get their precise location, they
can now opt for network-based geolocation only, which can be
street-level at best.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 12:08:40 +00:00
59634b2cf5 location: Rename _updateMenuVisibility to _updateMenu
We'll soon be doing more than just toggling the accuracy of menu itself
in this function. Hence the renaming.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 12:08:40 +00:00
7c3892f5a2 location: disconnect from 'g-properties-changed' signal
https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 12:08:40 +00:00
19406a238b location: 'MaxAccuracyLevel' property is now read-only
https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 12:08:40 +00:00
d6146197dd location,schema: Keep max accuracy in gsetting
Instead of relying on geoclue to store this user configuration, lets
keep it in gsettings. Geoclue is a system service and therefore is not
the appropriate entity to keep this info.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 12:08:39 +00:00
38f241479c location: Coding style fixes
No space between identifier and '('.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 12:08:39 +00:00
aa45999824 location: Rename _setAccuracy to setMaxAccuracyLevel
More descriptive name to avoid any confusion.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-17 12:08:39 +00:00
3b7593ed7f altTab: Scale thumbnails by the scale factor
Fixes their size on high dpi.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 16:55:55 +01:00
f959cafb36 appDisplay: don't force size on folder icon actor
Use a table layout instead.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:25 -08:00
e92d204d42 dash: account for scale factor to determine icon size
https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:25 -08:00
f543161234 st-icon: remove custom size request/allocate
Use a layout manager instead. This has the effect of not enforcing a
priv->icon_size size request, since that value is unscaled.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:25 -08:00
9cc1017912 iconGrid: don't force icon size to the BaseIcon
Since we might get a scaled up version for HiDpi.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:25 -08:00
fc719c19f9 altTab: account for scale factor when computing icon size
https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:24 -08:00
ad97fc6855 altTab: don't override icon size request
Instead of overriding the actor's request with the icon size, just set
the new icon size on the actors, and let the default handler take the
preferred size of children.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:24 -08:00
407dc74502 shell-app: finish support for loading with scale
https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:24 -08:00
e5e764b402 texture-cache: require icon scale to load gicon
To support HiDpi.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-16 07:49:24 -08:00
65ad65fe52 Updated Brazilian Portuguese translation 2014-02-16 06:23:41 +00:00
8d09d20510 Updated Hebrew translation 2014-02-15 20:16:43 +02:00
5a5b04b2b0 Updated POTFILES.in 2014-02-15 20:13:20 +02:00
3113bac8e6 location: React to changes in available accuracy level
GPS could be plugged in and out, network can go up and down and
therefore available accuracy level can also change.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-15 17:41:26 +00:00
9217f2c916 location: Don't show menu if geoclue is totally incapable
If geoclue can't provide location at all (no GPS or network), don't
bother to show controls that don't serve any purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-15 17:41:26 +00:00
32a49b7846 location: Provide a way to disable geolocation
Now that we are indicating 'geolocation in use' to user, we better also
provide at least a way to disable geolocation. Once this is in place, we
can provide slightly better controls rather than simply on/off switch.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-15 17:41:26 +00:00
12ef034b7b location: Make _connectToGeoclue() reentrent
https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-15 17:41:26 +00:00
e70e4a21f2 location: Rename _onGeoclueAppeared to _connectToGeoclue
Rename _onGeoclueAppeared to _connectToGeoclue as in the following patch
we'll call it from other contexts then geoclue appearing.

https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-15 17:41:26 +00:00
7826fb4f04 location: Create Geoclue proxy asynchronously
https://bugzilla.gnome.org/show_bug.cgi?id=723684
2014-02-15 17:41:26 +00:00
8f1b8909dc Fix position/size changed disconnects
Commit 3f7a989d38 changed the signals to match mutter api changes,
but did not update disconnects, so do that.
2014-02-15 13:07:14 +01:00
3f7a989d38 Update to changes for MetaWindow size-changed / position-changed signals
These have changed upstream to be on the MetaWindow, rather than
the MetaWindowActor. Follow suit.
2014-02-14 23:49:54 -05:00
4d3fd7598d appDisplay: Re-add _getCategories
It was introduced by one of the commits reverted by 812a61939e,
but is now used for app folders as well; add it back.
2014-02-14 14:02:31 +01:00
620e3cef20 appDisplay: Open new window on middle-click
The current middle-click action of opening a new window on a new
workspace is a bit peculiar; it is also not overly hard to achieve
the same result by moving a new window to the desired workspace or
selecting a workspace before opening a new window. Just opening
a new window is also a more common action, so having a shortcut
available that doesn't require a modifier is a good idea as well;
change the middle-click behavior accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=695010
2014-02-14 12:01:48 +01:00
812a61939e Revert "appDisplay: Special case terminal launching"
Having terminal launchers behave differently than any other launchers
is non-obvious and confusing. Remove the special-casing to restore
consistency, we will make the new window action more accessible
instead.
This reverts commit 68faba6bde, 4ed0f3e5f0
and 887a21afb9.

https://bugzilla.gnome.org/show_bug.cgi?id=695010
2014-02-14 12:01:48 +01:00
793c6c2f7b Magnifier: clip the UI group clone to the allocation
Without clipping, we show parts of the message tray and workspace
thumbnails that are normally clipped by the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=724305
2014-02-13 19:43:44 +01:00
f8f4d0f646 Magnifier: use the system noise texture for the dead area
The design says that the noise texture is the implicit bottom
layer, and so it's appropriate to use it togheter with the default
color to cover the dead area outside the screen which becomes
visibile when scrolling.

https://bugzilla.gnome.org/show_bug.cgi?id=724305
2014-02-13 19:43:44 +01:00
3a92aa751f Magnifier: don't listen for focus/tracker events if the magnifier is not active
In addition to checking the current settings, check also if the
zoom region is active before registering the event listener.
This way, we avoid DBus traffic for events we're not interested in.

Also, make FocusCaretTracker resilient to multiple register/deregister
calls (which can now happen).

https://bugzilla.gnome.org/show_bug.cgi?id=724305
2014-02-13 19:43:41 +01:00
6882273aa0 Magnifier: demote exceptions reading focus/caret position
It's possible that the DBus call goes in timeout (which is bad,
but unavoidable, given that atspi is synchronous) or fails
because the component has been removed (race condition). Those
errors are not dependent on gnome-shell, but on faulty applications
(mostly).
If they happen, log a debug message and continue.

https://bugzilla.gnome.org/show_bug.cgi?id=724305
2014-02-13 19:31:00 +01:00
3b0197620f Magnifier: fix a warning when calling setActive() with the same value
We must not call enable/disable_unredirect if we didn't change the
active value, otherwise mutter gets confused and emits warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=724293
2014-02-13 19:31:00 +01:00
f6240e114c Don't send all debug messages to Telepathy
The log handler can be invoked at bad times, and in particular
it can be invoked from gsignal with the signal lock taken.
At that time, calling into arbitrary high-level APIs can
cause a dead-lock.
Instead, only send to telepathy the tp-glib debug messages.
Everything else is in the journal anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=724256
2014-02-13 13:03:37 +01:00
0f3c129b95 layout: Set high dpi scaling factor
Set the scaling factor when the dpi is above the hidpi threshold.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-12 22:53:37 +01:00
6f87b01c47 Revert "shell-global: Set high dpi scaling factor"
This reverts commit ba459f4d20.

This breaks gdm.
2014-02-12 22:53:11 +01:00
32110a9866 layout: Remove stray reference to parentSetId
This was removed in a4dea25d76.
2014-02-12 14:13:08 -05:00
ba459f4d20 shell-global: Set high dpi scaling factor
Set the scaling factor based on the xsetting.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-12 19:45:53 +01:00
d868e6bfaf st: Add high dpi support
Add a scale_factor property to StThemeContext that can
be used to enable (integer) scaling of pixel values.

https://bugzilla.gnome.org/show_bug.cgi?id=705410
2014-02-12 19:45:47 +01:00
9f3499a7c3 make NetworkManager optional
NetworkManager is only available on Linux.

https://bugzilla.gnome.org/show_bug.cgi?id=669495
2014-02-11 18:04:44 -05:00
ccec7732a7 calendar server: fix _LDFLAGS vs _LDADD mixup
_LDFLAGS is for flags.  _LDADD is for LIBS.

https://bugzilla.gnome.org/show_bug.cgi?id=724184
2014-02-11 17:46:44 -05:00
3b980a173f Updated Assamese translation 2014-02-11 13:07:53 +00:00
246139f90b Updated Ukranian 2014-02-09 23:08:26 +02:00
4e85fb7d8d Updated German translation 2014-02-09 20:17:24 +00:00
ab32411b0c Updated Norwegian bokmål translation 2014-02-09 19:46:37 +01:00
477f28a6bd LayoutManager: untrack actors that are destroyed
If an actor is destroyed, calling get_transformed_size()/position()
can return bogus values and trigger JS exceptions.
This can happen if a tracked actor comes from an extension
(such as classic mode's window-list) and that extension is
deactivated.

https://bugzilla.gnome.org/show_bug.cgi?id=723661
2014-02-09 19:30:02 +01:00
96ef0a178d autogen.sh: use #!/bin/sh instead of #!/bin/bash
We don't have any bashisms in this file, so we may as well use sh.

https://bugzilla.gnome.org/show_bug.cgi?id=722342
2014-02-09 11:00:04 -05:00
ab603e7ef7 Updated Aragonese translation 2014-02-09 13:25:09 +01:00
d52104a62a Updated Kazakh translation 2014-02-09 04:11:08 +00:00
8d8d1cfdd6 Magnifier: Restore crosshairs
This patch is to restore broken crosshairs so they may be used
once more

https://bugzilla.gnome.org/show_bug.cgi?id=723709
	magnifier.js
2014-02-08 23:47:40 +00:00
5451751513 Updated Czech translation 2014-02-08 11:22:36 +01:00
92ae26bb9f Fix username shadows in Lock/Loginscreen
https://bugzilla.gnome.org/show_bug.cgi?id=723833
2014-02-07 16:20:14 +00:00
3c8ee0c8cb Updated Spanish translation 2014-02-07 14:47:46 +01:00
20f76b8118 Tajik translation updated 2014-02-07 09:59:45 +05:00
d8eeeead18 Updated Galician translations 2014-02-07 00:59:18 +01:00
5452162bc3 Updated Brazilian Portuguese translation 2014-02-06 18:53:18 +00:00
a4adcba405 Revert "network: Use NMDevice.get_available_connections(); for NMWirelessDialog"
This reverts commit a36bfced47.

get_available_connections() returns the connections that are
available right now, ie, with the currently visible APs, but
that might change while the dialog is open, so we can't use it.

https://bugzilla.gnome.org/show_bug.cgi?id=709128
2014-02-06 19:45:24 +01:00
66da594382 Updated Hebrew translation 2014-02-06 20:30:25 +02:00
aa426842f2 BluetoothMenu: show the submenu when active but not connected
Following the updated designs for system status, show the submenu
but not the indicator when bluetooth radio is on but no device
is connected.

https://bugzilla.gnome.org/show_bug.cgi?id=709353
2014-02-06 19:07:48 +01:00
ed53a45228 NetworkMenu: show the device name instead of Bluetooth
To distinguish the bluetooth network menu from the bluetooth
menu proper, use the device name as the label.
Also, replace Connect with "Use as Internet connection"

https://bugzilla.gnome.org/show_bug.cgi?id=709353
2014-02-06 19:07:47 +01:00
2ddbcb2369 Updated Brazilian Portuguese translation 2014-02-06 17:35:33 +00:00
61a58ff3c9 Fix regression after mutter commit 254afc50223a707c3afa7c9f638681199f41809e
The "old and unused API" was not so unused after all :)
2014-02-06 18:15:36 +01:00
638aee65c0 Update Arabic translation 2014-02-06 15:32:37 +02:00
f21c49f8da Slider: put imports in order
Bug https://bugzilla.gnome.org/show_bug.cgi?id=712649
2014-02-05 19:36:50 +00:00
583d2cb4e4 Magnifier: take x,y from center of focused widget
bug https://bugzilla.gnome.org/show_bug.cgi?id=720951
2014-02-05 18:21:42 +00:00
aa70dcfc8f Updated Spanish translation 2014-02-05 13:48:04 +01:00
ffb61c425b Tajik translation updated 2014-02-05 10:59:16 +05:00
858cf5e0c9 Bump version to 3.11.5
Update NEWS.
2014-02-05 00:17:32 +01:00
881dd4666e Updated Hebrew translation
Signed-off-by: Yosef Or Boczko <yoseforb@src.gnome.org>
2014-02-05 00:32:33 +02:00
c4aeaf7fe8 NetworkMenu: use the carrier state to the decide if wired should be shown
The design says "when a network cable is connected", not
"When a network cable is connected and the link is up and we
have an IP etc. etc." (which is what ACTIVATED would imply).

https://bugzilla.gnome.org/show_bug.cgi?id=723570
2014-02-04 22:25:11 +01:00
ea1f5a8fc6 NMWirelessDialog: show an informative message when airplane mode is on
Rather than just showing "No networks", inform the user if airplane
mode is on or if wifi is off, and allow the user to change that
from the dialog (if possible).

https://bugzilla.gnome.org/show_bug.cgi?id=709128
2014-02-04 22:25:06 +01:00
7f1e420a0a NMWirelessDialog: request a scan when there are no visible access points
Ideally, we should keep scanning while the dialog is open, and
stop (or reduce the frequency) when it's closed. Forcing a new
scan when the dialog is opened empty is a close approximation
and increases the probability that the user will find the AP
he needs.

https://bugzilla.gnome.org/show_bug.cgi?id=709128
2014-02-04 22:24:01 +01:00
1272eaf07f NMWirelessDialog: fix removing access points
We must destroy the actor, not the item, because the latter doesn't
have a destroy() method.

https://bugzilla.gnome.org/show_bug.cgi?id=709128
2014-02-04 22:24:00 +01:00
2fe760cc4b rfkill: split out the dbus handling parts from the indicator
status.network wants to watch for airplane mode too, we can
share the code with a manager singleton.

https://bugzilla.gnome.org/show_bug.cgi?id=709128
2014-02-04 22:24:00 +01:00
df3a50bae8 AirplaneMode: don't show a "Turn off" item if HW enabled
If airplane mode is enabled with an HW switch, we can't turn it
off from the menu, so make the menu item insensitive and
replace it with a helpful tip.

https://bugzilla.gnome.org/show_bug.cgi?id=709685
2014-02-04 22:24:00 +01:00
0db3605f33 Magnifier: Disable unredirect when active
The unredirect feature does not apply to the magnifier and it
prevents users from gaming whilst it is on so disable when magnifier
is active and allow magnifier users to game!

Bug https://bugzilla.gnome.org/show_bug.cgi?id=708985
2014-02-04 16:58:25 +01:00
173fa92116 Updated Indonesian translation 2014-02-04 14:16:26 +00:00
02ca58c1eb Updated Hebrew translation. 2014-02-03 16:30:03 +02:00
4a22fe58bf updated kn.po 2014-02-03 16:51:29 +05:30
3fc478a14b overview: don't add a null desktop clone
If there is no desktop window, getDesktopClone() returns null.
In that case, we know that no animation is needed.

Fixes a regression from b97f3a9ecf

https://bugzilla.gnome.org/show_bug.cgi?id=723523
2014-02-03 11:55:50 +01:00
203bc674fe Updated Traditional Chinese translation(Hong Kong and Taiwan) 2014-02-02 20:36:23 +08:00
a4a9f0a04c Updated Kazakh translation 2014-02-01 15:12:11 +00:00
918e7fffeb Updated Tajik translation 2014-02-01 12:55:49 +00:00
e1648de661 Updated Brazilian Portuguese translation 2014-02-01 10:05:14 +00:00
f7c94e6343 Updated Greek translation 2014-02-01 08:16:19 +02:00
85 changed files with 11095 additions and 7723 deletions

85
NEWS
View File

@ -1,3 +1,88 @@
3.11.91
=======
* Don't use network profile name in menu [Giovanni; #725586]
* calendar: Make date label clickable to return to current date [Vit; #641366]
* Misc. bug fixes [Florian, Zeeshan, Adel, Jasper, Dan, Volker; #724813,
#724686, #725082, #724870, #724779, #725533]
Contributors:
Zeeshan Ali (Khattak), Giovanni Campagna, Piotr Drąg, Adel Gadllah,
Florian Müllner, Volker Sobek, Vit Stanislav, Jasper St. Pierre, Dan Williams
Translations:
Victor Ibragimov [tg], Aurimas Černius [lt], Dimitris Spingos [el],
Andika Triwidada [id], Rafael Ferreira [pt_BR], Daniel Mustieles [es],
Baurzhan Muftakhidinov [kk], Marek Černocký [cs], Ihar Hrachyshka [be],
eternalhui [zh_CN], Yosef Or Boczko [he], Fran Diéguez [gl],
Khaled Hosny [ar], Ville-Pekka Vainio [fi], Piotr Drąg [pl],
Kjartan Maraas [nb], Changwoo Ryu [ko]
3.11.90
=======
* Stop showing two bluetooth entries [Giovanni; #709353]
* Improve styling of login/lock screen [Reda; #723833]
* Fix magnifier crosshairs [Magdalen; #723709]
* Make NetworkManager support optional [Michael; #669495]
* Make middle-click open a new instance [Florian; #695010]
* Scale the UI on high resolution displays [Cosimo, Adel; #705410, #724607]
* Remove notification counter on screen shield [Carlos; #709275]
* Improve app picker transition [Carlos; #722331]
* Add geolocation indicator to status menu [Zeeshan; #723684]
* Improve timestamps in chat notifications [Carlos; #708031, #715158]
* Improve network menus [Giovanni; #723570]
* Add "VPN Setting" item to VPN submenu [Giovanni; #709167]
* Improve appearance of disclosure arrows [Carlos; #720206]
* Add GSetting key to disable version validation of extensions [Adel; #724683]
* Delay auto-removing empty workspaces [Florian; #709064]
* Offer offline updates in the shutdown dialog [Kalev; #722898]
* Animate tile previews [Florian; #665758]
* Misc. bug fixes and cleanups [Giovanni, Ryan, Debarshi, Florian; #709128,
#722342, #723661, #724184, #724256, #724293, #724305, #722554, #724282,
#724690, #722928]
Contributors:
Zeeshan Ali (Khattak), Magdalen Berns, Michael Biebl, Giovanni Campagna,
Cosimo Cecchi, Adel Gadllah, Reda Lazri, Kalev Lember, Ryan Lortie,
Florian Müllner, Debarshi Ray, Carlos Soriano, Jasper St. Pierre,
Colin Walters
Translations:
Victor Ibragimov [tg], Daniel Mustieles [es], Khaled Hosny [ar],
Enrico Nicoletto [pt_BR], Yosef Or Boczko [he], Fran Diéguez [gl],
Marek Černocký [cs], Baurzhan Muftakhidinov [kk], Jorge Pérez Pérez [an],
Kjartan Maraas [nb], David Lüder [de], Daniel Korostil [uk], ngoswami [as],
Rafael Ferreira [pt_BR]
3.11.5
======
* Fix extension preference tool [Florian; #722334]
* Fix keyboard activation of legacy tray icons [Giovanni; #721267]
* Add radial background shade for modal dialogs [Giovanni; #669798]
* Show attached modal windows in the overview [Giovanni; #650843]
* Add support for desktop actions [Giovanni; #669603]
* Indicate in system status when location service is used [Zeeshan; #709372]
* Add support for extended app folder schema [Jasper; #723179]
* Show status icon for wired network connections [Jasper; #708966]
* Indicate airplane mode in network selection dialog [Giovanni; #709128]
* Misc bug fixes and cleanups [Florian, Sebastian, Giovanni, Tim, Matt, Jasper;
#722417, #722494, #722547, #722593, #722434, #722787, #722690, #722840,
#722660, #722812, #723197, #722927, #723306, #723308, #723523, #709685,
#723570]
Contributors:
Zeeshan Ali (Khattak), Magdalen Berns, Giovanni Campagna, William Jon McCann,
Sebastian Keller, Tim Lunn, Florian Müllner, Carlos Soriano,
Jasper St. Pierre, Rico Tzschichholz, Matt Watson
Translations:
Marek Černocký [cs], Mattias Põldaru [et], Tong Hui [zh_CN],
Victor Ibragimov [tg], Enrico Nicoletto [pt_BR], Daniel Mustieles [es],
Fran Diéguez [gl], Kjartan Maraas [nb], Nilamdyuti Goswami [as],
Aurimas Černius [lt], Stas Solovey [ru], Yosef Or Boczko [he],
Jorge Pérez Pérez [an], Dimitris Spingos [el], Baurzhan Muftakhidinov [kk],
Chao-Hsiung Liao [zh_HK, zh_TW], Shankar Prasad [kn], Yaron Shahrabani [he],
Andika Triwidada [id]
3.11.4
======
* Fix removal of workspacaes that are not at the end [Giovanni; #721417]

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`

View File

@ -41,6 +41,8 @@
#define PLUGIN_API_VERSION 5
#define EXTENSION_DISABLE_VERSION_CHECK_KEY "disable-extension-version-validation"
typedef struct {
GDBusProxy *proxy;
} PluginData;
@ -831,6 +833,16 @@ plugin_get_shell_version (PluginObject *obj,
return ret;
}
static gboolean
plugin_get_version_validation_enabled (PluginObject *obj,
NPVariant *result)
{
gboolean is_enabled = !g_settings_get_boolean (obj->settings, EXTENSION_DISABLE_VERSION_CHECK_KEY);
BOOLEAN_TO_NPVARIANT(is_enabled, *result);
return TRUE;
}
#define METHODS \
METHOD (list_extensions) \
METHOD (get_info) \
@ -850,6 +862,8 @@ static NPIdentifier api_version_id;
static NPIdentifier shell_version_id;
static NPIdentifier onextension_changed_id;
static NPIdentifier onrestart_id;
static NPIdentifier version_validation_enabled_id;
static bool
plugin_object_has_method (NPObject *npobj,
@ -892,7 +906,8 @@ plugin_object_has_property (NPObject *npobj,
return (name == onextension_changed_id ||
name == onrestart_id ||
name == api_version_id ||
name == shell_version_id);
name == shell_version_id ||
name == version_validation_enabled_id);
}
static bool
@ -910,6 +925,8 @@ plugin_object_get_property (NPObject *npobj,
return plugin_get_api_version (obj, result);
else if (name == shell_version_id)
return plugin_get_shell_version (obj, result);
else if (name == version_validation_enabled_id)
return plugin_get_version_validation_enabled (obj, result);
else if (name == onextension_changed_id)
{
if (obj->listener)
@ -988,6 +1005,7 @@ init_methods_and_properties (void)
/* this is the JS public API; it is manipulated through NPIdentifiers for speed */
api_version_id = funcs.getstringidentifier ("apiVersion");
shell_version_id = funcs.getstringidentifier ("shellVersion");
version_validation_enabled_id = funcs.getstringidentifier ("versionValidationEnabled");
get_info_id = funcs.getstringidentifier ("getExtensionInfo");
list_extensions_id = funcs.getstringidentifier ("listExtensions");

View File

@ -1,5 +1,5 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell],[3.11.4],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_INIT([gnome-shell],[3.11.91],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/shell-global.c])
@ -76,7 +76,7 @@ AC_MSG_RESULT($enable_systemd)
CLUTTER_MIN_VERSION=1.15.90
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
GJS_MIN_VERSION=1.39.0
MUTTER_MIN_VERSION=3.11.1
MUTTER_MIN_VERSION=3.11.91
GTK_MIN_VERSION=3.7.9
GIO_MIN_VERSION=2.37.0
LIBECAL_MIN_VERSION=3.5.3
@ -105,9 +105,7 @@ SHARED_PCS="gio-unix-2.0 >= $GIO_MIN_VERSION
libcanberra libcanberra-gtk3
telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
polkit-agent-1 >= $POLKIT_MIN_VERSION
libnm-glib libnm-util >= $NETWORKMANAGER_MIN_VERSION
libnm-gtk >= $NETWORKMANAGER_MIN_VERSION
libsecret-unstable gcr-base-3 >= $GCR_MIN_VERSION"
gcr-base-3 >= $GCR_MIN_VERSION"
if test x$have_systemd = xyes; then
SHARED_PCS="${SHARED_PCS} libsystemd-journal"
fi
@ -182,6 +180,38 @@ if test "$langinfo_ok" = "yes"; then
[Define if _NL_TIME_FIRST_WEEKDAY is available])
fi
AC_ARG_ENABLE(networkmanager,
AS_HELP_STRING([--disable-networkmanager],
[disable NetworkManager support @<:@default=auto@:>@]),,
[enable_networkmanager=auto])
if test "x$enable_networkmanager" != "xno"; then
PKG_CHECK_MODULES(NETWORKMANAGER,
[libnm-glib
libnm-util >= $NETWORKMANAGER_MIN_VERSION
libnm-gtk >= $NETWORKMANAGER_MIN_VERSION
libsecret-unstable],
[have_networkmanager=yes],
[have_networkmanager=no])
GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $NETWORKMANAGER_CFLAGS"
GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $NETWORKMANAGER_LIBS"
else
have_networkmanager="no (disabled)"
fi
if test "x$have_networkmanager" = "xyes"; then
AC_DEFINE(HAVE_NETWORKMANAGER, [1], [Define if we have NetworkManager])
AC_SUBST([HAVE_NETWORKMANAGER], [1])
else
if test "x$enable_networkmanager" = "xyes"; then
AC_MSG_ERROR([Couldn't find NetworkManager.])
fi
AC_SUBST([HAVE_NETWORKMANAGER], [0])
fi
AM_CONDITIONAL(HAVE_NETWORKMANAGER, test "$have_networkmanager" = "yes")
# Sets GLIB_GENMARSHAL and GLIB_MKENUMS
AM_PATH_GLIB_2_0()
@ -223,3 +253,15 @@ AC_CONFIG_FILES([
man/Makefile
])
AC_OUTPUT
echo "
Build configuration:
Prefix: ${prefix}
Source code location: ${srcdir}
Compiler: ${CC}
Compiler Warnings: $enable_compile_warnings
Support for NetworkManager: $have_networkmanager
Support for GStreamer recording: $build_recorder
"

View File

@ -39,6 +39,7 @@ dist_theme_DATA = \
theme/filter-selected-rtl.svg \
theme/gnome-shell.css \
theme/logged-in-indicator.svg \
theme/menu-arrow-symbolic.svg \
theme/message-tray-background.png \
theme/more-results.svg \
theme/noise-texture.png \

View File

@ -21,6 +21,15 @@
EnableExtension and DisableExtension D-Bus methods on org.gnome.Shell.
</_description>
</key>
<key name="disable-extension-version-validation" type="b">
<default>false</default>
<_summary>Disables the validation of extension version compatibility</_summary>
<_description>
GNOME Shell will only load extensions that claim to support the current
running version. Enabling this option will disable this check and try to
load all extensions regardless of the versions they claim to support.
</_description>
</key>
<key name="favorite-apps" type="as">
<default>[ 'epiphany.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop' ]</default>
<_summary>List of desktop file IDs for favorite applications</_summary>
@ -65,6 +74,7 @@
<child name="calendar" schema="org.gnome.shell.calendar"/>
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
<child name="keyboard" schema="org.gnome.shell.keyboard"/>
<child name="location" schema="org.gnome.shell.location"/>
</schema>
<schema id="org.gnome.shell.calendar" path="/org/gnome/shell/calendar/"
@ -134,6 +144,32 @@
</key>
</schema>
<enum id="org.gnome.shell.geoclue.AccuracyLevel">
<value value="0" nick="off"/>
<value value="1" nick="country"/>
<value value="4" nick="city"/>
<value value="5" nick="neighborhood"/>
<value value="6" nick="street"/>
<value value="8" nick="exact"/>
</enum>
<schema id="org.gnome.shell.location"
path="/org/gnome/shell/location/"
gettext-domain="@GETTEXT_PACKAGE@">
<key name="max-accuracy-level" enum="org.gnome.shell.geoclue.AccuracyLevel">
<default>'exact'</default>
<_summary>The maximum accuracy level of location.</_summary>
<_description>
Configures the maximum level of location accuracy applications are
allowed to see. Valid options are 'off' (disable location tracking),
'country', 'city', 'neighborhood', 'street', and 'exact' (typically
requires GPS receiver). Please keep in mind that this only controls
what GeoClue will allow applications to see and they can find user's
location on their own using network resources (albeit with street-level
accuracy at best).
</_description>
</key>
</schema>
<schema id="org.gnome.shell.app-switcher"
path="/org/gnome/shell/app-switcher/"
gettext-domain="@GETTEXT_PACKAGE@">

View File

@ -157,8 +157,9 @@ StScrollBar StButton#vhandle:active {
min-width: 200px;
}
.unicode-arrow {
font-size: 120%;
.popup-menu-arrow {
width: 16px;
height: 16px;
}
.popup-submenu-menu-item:open {
@ -289,6 +290,20 @@ StScrollBar StButton#vhandle:active {
spacing: 10px;
}
.nm-dialog-airplane-box {
spacing: 12px;
}
.nm-dialog-airplane-headline {
font-size: 1.1em;
font-weight: bold;
text-align: center;
}
.nm-dialog-airplane-text {
color: #999999;
}
.nm-dialog-header-icon {
icon-size: 32px;
}
@ -1289,12 +1304,18 @@ StScrollBar StButton#vhandle:active {
font-weight: bold;
text-align: center;
color: #eeeeec;
border-radius: 4px;
}
.datemenu-date-label:hover,
.datemenu-date-label:focus {
background-color: #999999;
}
.datemenu-date-label:active {
background-color: #aaaaaa;
}
.calendar-day-base {
font-size: 9pt;
text-align: center;
@ -1453,6 +1474,10 @@ StScrollBar StButton#vhandle:active {
color: #999999;
}
.no-networks-box {
spacing: 12px;
}
.notification {
border-radius: 10px 10px 0px 0px;
background: rgba(0,0,0,0.9);
@ -1630,8 +1655,8 @@ StScrollBar StButton#vhandle:active {
color: #888888;
}
.chat-group-sent, .chat-group-meta {
padding: 8px 0;
.chat-empty-line {
font-size: 4px;
}
.chat-received {
@ -1656,6 +1681,7 @@ StScrollBar StButton#vhandle:active {
.chat-meta-message {
padding-left: 4px;
font-size: 9pt;
font-weight: bold;
color: #bbbbbb;
}
@ -1857,6 +1883,27 @@ StScrollBar StButton#vhandle:active {
border-radius: 8px;
}
/* Tile previews */
.tile-preview {
background-color: rgba(74, 144, 217, 0.35);
border: 1px solid #4a90d9; /* Adwaita selected bg color */
}
.tile-preview-left.on-primary {
/* keep in sync with -panel-corner-radius */
border-radius: 6px 0 0 0;
}
.tile-preview-right.on-primary {
/* keep in sync with -panel-corner-radius */
border-radius: 0 6px 0 0;
}
.tile-preview-left.tile-preview-right.on-primary {
/* keep in sync with -panel-corner-radius */
border-radius: 6px 6px 0 0;
}
/* Modal Dialogs */
/* Dialog Subject Text Style */
@ -1927,45 +1974,57 @@ StScrollBar StButton#vhandle:active {
padding-top: 20px;
}
.end-session-dialog-subject {
.end-session-dialog-layout {
padding-left: 17px;
padding-bottom: 20px;
}
.end-session-dialog-subject:rtl {
padding-left: 0px;
.end-session-dialog-layout:rtl {
padding-right: 17px;
}
.end-session-dialog-description {
padding-left: 17px;
width: 28em;
padding-bottom: 10px;
}
.end-session-dialog-description:rtl {
padding-right: 17px;
width: 28em;
padding-bottom: 10px;
text-align: right;
}
.end-session-dialog-warning {
width: 28em;
color: #f57900;
padding-top: 6px;
}
.end-session-dialog-warning:rtl {
width: 28em;
color: #f57900;
padding-top: 6px;
text-align: right;
}
.end-session-dialog-logout-icon {
border: 2px solid #8b8b8b;
border-radius: 5px;
width: 32px;
height: 32px;
width: 48px;
height: 48px;
background-size: contain;
}
.end-session-dialog-shutdown-icon {
color: #bebebe;
width: 32px;
height: 32px;
width: 48px;
height: 48px;
}
.end-session-dialog-inhibitor-layout {
spacing: 16px;
max-height: 200px;
padding-right: 50px;
padding-left: 50px;
padding-right: 65px;
padding-left: 65px;
}
.end-session-dialog-session-list,
@ -2388,12 +2447,13 @@ StScrollBar StButton#vhandle:active {
color: #E8E8E8;
}
.login-dialog-username {
.login-dialog-username,
.user-widget-label {
font-size: 16pt;
font-weight: bold;
text-align: left;
padding-left: 15px;
text-shadow: black 0px 4px 3px 0px;
text-shadow: rgba(0, 0, 0, 0.5) 0px 2px 1px 0px;
}
.login-dialog-prompt-layout {
@ -2485,11 +2545,6 @@ StScrollBar StButton#vhandle:active {
}
.user-widget-label {
font-size: 20px;
font-weight: bold;
text-align: left;
color:white;
text-shadow: black 0px 4px 3px 0px;
}
.user-widget-label:ltr {

View File

@ -0,0 +1,90 @@
<?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="16"
height="16"
id="svg3863"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="menu-arrow.svg">
<defs
id="defs3865" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="15.836083"
inkscape:cx="-3.1641676"
inkscape:cy="11.823817"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1366"
inkscape:window-height="702"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-bbox="true">
<sodipodi:guide
orientation="1,0"
position="15.996443,16.922964"
id="guide3873" />
<sodipodi:guide
orientation="0,1"
position="28.041217,3.1256134"
id="guide3875" />
<sodipodi:guide
orientation="0,1"
position="-0.80372916,24.469088"
id="guide3877" />
<sodipodi:guide
orientation="1,0"
position="3.0363102,34.649657"
id="guide3879" />
<sodipodi:guide
orientation="1,0"
position="29.023553,28.577037"
id="guide3881" />
<inkscape:grid
type="xygrid"
id="grid2988" />
</sodipodi:namedview>
<metadata
id="metadata3868">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-16)">
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 4,23 8,0 -4,5 z"
id="path3883"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -6,6 +6,7 @@ misc/config.js: misc/config.js.in Makefile
sed -e "s|[@]PACKAGE_NAME@|$(PACKAGE_NAME)|g" \
-e "s|[@]PACKAGE_VERSION@|$(PACKAGE_VERSION)|g" \
-e "s|[@]HAVE_BLUETOOTH@|$(HAVE_BLUETOOTH)|g" \
-e "s|[@]HAVE_NETWORKMANAGER@|$(HAVE_NETWORKMANAGER)|g" \
-e "s|[@]GETTEXT_PACKAGE@|$(GETTEXT_PACKAGE)|g" \
-e "s|[@]datadir@|$(datadir)|g" \
-e "s|[@]libexecdir@|$(libexecdir)|g" \

View File

@ -6,6 +6,8 @@ const PACKAGE_NAME = '@PACKAGE_NAME@';
const PACKAGE_VERSION = '@PACKAGE_VERSION@';
/* 1 if gnome-bluetooth is available, 0 otherwise */
const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
/* 1 if networkmanager is available, 0 otherwise */
const HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
/* gettext package */
const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
/* locale dir */

View File

@ -24,7 +24,7 @@ const WINDOW_PREVIEW_SIZE = 128;
const APP_ICON_SIZE = 96;
const APP_ICON_SIZE_SMALL = 48;
const iconSizes = [96, 64, 48, 32, 22];
const baseIconSizes = [96, 64, 48, 32, 22];
const AppIconMode = {
THUMBNAIL_ONLY: 1,
@ -430,7 +430,6 @@ const AppIcon = new Lang.Class({
set_size: function(size) {
this.icon = this.app.create_icon_texture(size);
this._iconBin.set_size(size, size);
this._iconBin.child = this.icon;
}
});
@ -479,12 +478,13 @@ const AppSwitcher = new Lang.Class({
Mainloop.source_remove(this._mouseTimeOutId);
},
_getPreferredHeight: function (actor, forWidth, alloc) {
_setIconSize: function() {
let j = 0;
while(this._items.length > 1 && this._items[j].style_class != 'item-box') {
j++;
}
let themeNode = this._items[j].get_theme_node();
let iconPadding = themeNode.get_horizontal_padding();
let iconBorder = themeNode.get_border_width(St.Side.LEFT) + themeNode.get_border_width(St.Side.RIGHT);
let [iconMinHeight, iconNaturalHeight] = this.icons[j].label.get_preferred_height(-1);
@ -495,19 +495,22 @@ const AppSwitcher = new Lang.Class({
let primary = Main.layoutManager.primaryMonitor;
let parentPadding = this.actor.get_parent().get_theme_node().get_horizontal_padding();
let availWidth = primary.width - parentPadding - this.actor.get_theme_node().get_horizontal_padding();
let height = 0;
for(let i = 0; i < iconSizes.length; i++) {
this._iconSize = iconSizes[i];
height = iconSizes[i] + iconSpacing;
let w = height * this._items.length + totalSpacing;
if (w <= availWidth)
break;
}
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let iconSizes = baseIconSizes.map(function(s) {
return s * scaleFactor;
});
if (this._items.length == 1) {
this._iconSize = iconSizes[0];
height = iconSizes[0] + iconSpacing;
this._iconSize = baseIconSizes[0];
} else {
for(let i = 0; i < baseIconSizes.length; i++) {
this._iconSize = baseIconSizes[i];
let height = iconSizes[i] + iconSpacing;
let w = height * this._items.length + totalSpacing;
if (w <= availWidth)
break;
}
}
for(let i = 0; i < this.icons.length; i++) {
@ -515,9 +518,11 @@ const AppSwitcher = new Lang.Class({
break;
this.icons[i].set_size(this._iconSize);
}
},
alloc.min_size = height;
alloc.natural_size = height;
_getPreferredHeight: function (actor, forWidth, alloc) {
this._setIconSize();
this.parent(actor, forWidth, alloc);
},
_allocate: function (actor, box, flags) {
@ -650,17 +655,19 @@ const ThumbnailList = new Lang.Class({
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 spacing = this._items[0].child.get_theme_node().get_length('spacing');
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let thumbnailSize = THUMBNAIL_DEFAULT_SIZE * scaleFactor;
availHeight = Math.min(availHeight - labelNaturalHeight - totalPadding - spacing, THUMBNAIL_DEFAULT_SIZE);
availHeight = Math.min(availHeight - labelNaturalHeight - totalPadding - spacing, thumbnailSize);
let binHeight = availHeight + this._items[0].get_theme_node().get_vertical_padding() + this.actor.get_theme_node().get_vertical_padding() - spacing;
binHeight = Math.min(THUMBNAIL_DEFAULT_SIZE, binHeight);
binHeight = Math.min(thumbnailSize, binHeight);
for (let i = 0; i < this._thumbnailBins.length; i++) {
let mutterWindow = this._windows[i].get_compositor_private();
if (!mutterWindow)
continue;
let clone = _createWindowClone(mutterWindow, THUMBNAIL_DEFAULT_SIZE);
let clone = _createWindowClone(mutterWindow, thumbnailSize);
this._thumbnailBins[i].set_height(binHeight);
this._thumbnailBins[i].add_actor(clone);
this._clones.push(clone);

View File

@ -46,6 +46,9 @@ const INDICATORS_ANIMATION_MAX_TIME = 0.75;
const PAGE_SWITCH_TRESHOLD = 0.2;
const PAGE_SWITCH_TIME = 0.3;
const VIEWS_SWITCH_TIME = 0.4;
const VIEWS_SWITCH_ANIMATION_DELAY = 0.1;
function _getCategories(info) {
let categoriesStr = info.get_categories();
if (!categoriesStr)
@ -53,14 +56,6 @@ function _getCategories(info) {
return categoriesStr.split(';');
}
function _isTerminal(app) {
let info = app.get_app_info();
if (!info)
return false;
let categories = _getCategories(info);
return categories.indexOf('TerminalEmulator') > -1;
}
function _listsIntersect(a, b) {
for (let itemA of a)
if (b.indexOf(itemA) >= 0)
@ -256,7 +251,8 @@ const PageIndicators = new Lang.Class({
Tweener.addTween(children[i],
{ translation_x: 0,
time: INDICATORS_BASE_TIME + delay * i,
transition: 'easeInOutQuad'
transition: 'easeInOutQuad',
delay: VIEWS_SWITCH_ANIMATION_DELAY
});
}
}
@ -791,8 +787,10 @@ const AppDisplay = new Lang.Class({
_showView: function(activeIndex) {
for (let i = 0; i < this._views.length; i++) {
let actor = this._views[i].view.actor;
let params = { time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
opacity: (i == activeIndex) ? 255 : 0 };
let params = { time: VIEWS_SWITCH_TIME,
opacity: (i == activeIndex) ? 255 : 0,
delay: (i == activeIndex) ? VIEWS_SWITCH_ANIMATION_DELAY : 0 };
if (i == activeIndex)
actor.visible = true;
else
@ -888,7 +886,7 @@ const AppSearchProvider = new Lang.Class({
let app = this._appSys.lookup_app(result);
let event = Clutter.get_current_event();
let modifiers = event ? event.get_state() : 0;
let openNewWindow = (modifiers & Clutter.ModifierType.CONTROL_MASK) || _isTerminal(app);
let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK;
if (openNewWindow)
app.open_new_window(-1);
@ -932,9 +930,9 @@ const FolderView = new Lang.Class({
},
createFolderIcon: function(size) {
let icon = new St.Widget({ layout_manager: new Clutter.BinLayout(),
style_class: 'app-folder-icon',
width: size, height: size });
let layout = new Clutter.TableLayout();
let icon = new St.Widget({ layout_manager: layout,
style_class: 'app-folder-icon' });
let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size);
let aligns = [ Clutter.ActorAlign.START, Clutter.ActorAlign.END ];
@ -944,7 +942,7 @@ const FolderView = new Lang.Class({
x_expand: true, y_expand: true });
bin.set_x_align(aligns[i % 2]);
bin.set_y_align(aligns[Math.floor(i / 2)]);
icon.add_actor(bin);
layout.pack(bin, i % 2, Math.floor(i / 2));
}
return icon;
@ -1403,9 +1401,6 @@ const AppIcon = new Lang.Class({
if (button == 1) {
this._onActivate(Clutter.get_current_event());
} else if (button == 2) {
// Last workspace is always empty
let launchWorkspace = global.screen.get_workspace_by_index(global.screen.n_workspaces - 1);
launchWorkspace.activate(global.get_current_time());
this.app.open_new_window(-1);
Main.overview.hide();
}
@ -1466,9 +1461,8 @@ const AppIcon = new Lang.Class({
_onActivate: function (event) {
let modifiers = event.get_state();
if ((modifiers & Clutter.ModifierType.CONTROL_MASK
&& this.app.state == Shell.AppState.RUNNING)
|| _isTerminal(this.app)) {
if (modifiers & Clutter.ModifierType.CONTROL_MASK
&& this.app.state == Shell.AppState.RUNNING) {
this.app.open_new_window(-1);
} else {
this.app.activate();

View File

@ -548,6 +548,7 @@ const Calendar = new Lang.Class({
_onSettingsChange: function() {
this._useWeekdate = this._settings.get_boolean(SHOW_WEEKDATE_KEY);
this._buildHeader();
this._rebuildCalendar();
this._update();
},

View File

@ -1,5 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const Lang = imports.lang;
@ -28,6 +29,8 @@ const SCROLLBACK_HISTORY_LINES = 10;
// See Notification._onEntryChanged
const COMPOSING_STOP_TIMEOUT = 5;
const CLOCK_FORMAT_KEY = 'clock-format';
const NotificationDirection = {
SENT: 'chat-sent',
RECEIVED: 'chat-received'
@ -905,14 +908,14 @@ const ChatNotification = new Lang.Class({
let group = props.group;
if (group != this._lastGroup) {
let style = 'chat-group-' + group;
this._lastGroup = group;
this._lastGroupActor = new St.BoxLayout({ style_class: style,
vertical: true });
this.addActor(this._lastGroupActor);
let emptyLine = new St.Label({ style_class: 'chat-empty-line' });
this.addActor(emptyLine);
}
this._lastGroupActor.add(body, props.childProps);
this._lastMessageBox = new St.BoxLayout({ vertical: false });
this._lastMessageBox.add(body, props.childProps);
this.addActor(this._lastMessageBox);
this.updated();
@ -941,32 +944,81 @@ const ChatNotification = new Lang.Class({
let format;
// Show only the hour if date is on today
if(daysAgo < 1){
format = "<b>%H:%M</b>";
}
// Show the word "Yesterday" and time if date is on yesterday
else if(daysAgo <2){
/* Translators: this is the word "Yesterday" followed by a time string. i.e. "Yesterday, 14:30"*/
// xgettext:no-c-format
format = _("<b>Yesterday</b>, <b>%H:%M</b>");
}
// Show a week day and time if date is in the last week
else if (daysAgo < 7) {
/* Translators: this is the week day name followed by a time string. i.e. "Monday, 14:30*/
// xgettext:no-c-format
format = _("<b>%A</b>, <b>%H:%M</b>");
let desktopSettings = new Gio.Settings({ schema: 'org.gnome.desktop.interface' });
let clockFormat = desktopSettings.get_string(CLOCK_FORMAT_KEY);
} else if (date.getYear() == now.getYear()) {
/* Translators: this is the month name and day number followed by a time string. i.e. "May 25, 14:30"*/
// xgettext:no-c-format
format = _("<b>%B</b> <b>%d</b>, <b>%H:%M</b>");
} else {
/* Translators: this is the month name, day number, year number followed by a time string. i.e. "May 25 2012, 14:30"*/
// xgettext:no-c-format
format = _("<b>%B</b> <b>%d</b> <b>%Y</b>, <b>%H:%M</b> ");
}
switch (clockFormat) {
case '24h':
// Show only the time if date is on today
if(daysAgo < 1){
/* Translators: Time in 24h format */
format = _("%H\u2236%M");
}
// Show the word "Yesterday" and time if date is on yesterday
else if(daysAgo <2){
/* Translators: this is the word "Yesterday" followed by a
time string in 24h format. i.e. "Yesterday, 14:30" */
// xgettext:no-c-format
format = _("Yesterday, %H\u2236%M");
}
// Show a week day and time if date is in the last week
else if (daysAgo < 7) {
/* Translators: this is the week day name followed by a time
string in 24h format. i.e. "Monday, 14:30" */
// xgettext:no-c-format
format = _("%A, %H\u2236%M");
} else if (date.getYear() == now.getYear()) {
/* Translators: this is the month name and day number
followed by a time string in 24h format.
i.e. "May 25, 14:30" */
// xgettext:no-c-format
format = _("%B %d, %H\u2236%M");
} else {
/* Translators: this is the month name, day number, year
number followed by a time string in 24h format.
i.e. "May 25 2012, 14:30" */
// xgettext:no-c-format
format = _("%B %d %Y, %H\u2236%M");
}
break;
default:
/* explicit fall-through */
case '12h':
// Show only the time if date is on today
if(daysAgo < 1){
/* Translators: Time in 24h format */
format = _("%l\u2236%M %p");
}
// Show the word "Yesterday" and time if date is on yesterday
else if(daysAgo <2){
/* Translators: this is the word "Yesterday" followed by a
time string in 12h format. i.e. "Yesterday, 2:30 pm" */
// xgettext:no-c-format
format = _("Yesterday, %l\u2236%M %p");
}
// Show a week day and time if date is in the last week
else if (daysAgo < 7) {
/* Translators: this is the week day name followed by a time
string in 12h format. i.e. "Monday, 2:30 pm" */
// xgettext:no-c-format
format = _("%A, %l\u2236%M %p");
} else if (date.getYear() == now.getYear()) {
/* Translators: this is the month name and day number
followed by a time string in 12h format.
i.e. "May 25, 2:30 pm" */
// xgettext:no-c-format
format = _("%B %d, %l\u2236%M %p");
} else {
/* Translators: this is the month name, day number, year
number followed by a time string in 12h format.
i.e. "May 25 2012, 2:30 pm"*/
// xgettext:no-c-format
format = _("%B %d %Y, %l\u2236%M %p");
}
break;
}
return date.toLocaleFormat(format);
},
@ -976,13 +1028,14 @@ const ChatNotification = new Lang.Class({
let lastMessageTime = this._history[0].time;
let lastMessageDate = new Date(lastMessageTime * 1000);
let timeLabel = this._append({ body: this._formatTimestamp(lastMessageDate),
group: 'meta',
styles: ['chat-meta-message'],
childProps: { expand: true, x_fill: false,
x_align: St.Align.END },
noTimestamp: true,
timestamp: lastMessageTime });
let timeLabel = new St.Label({ text: this._formatTimestamp(lastMessageDate),
style_class: 'chat-meta-message',
x_expand: true,
y_expand: true,
x_align: Clutter.ActorAlign.END,
y_align: Clutter.ActorAlign.END });
this._lastMessageBox.add_actor(timeLabel);
this._filterMessages();

View File

@ -381,6 +381,8 @@ const DashActor = new Lang.Class({
}
});
const baseIconSizes = [ 16, 22, 24, 32, 48, 64 ];
const Dash = new Lang.Class({
Name: 'Dash',
@ -632,25 +634,24 @@ const Dash = new Lang.Class({
let minHeight, natHeight;
// Enforce the current icon size during the size request
let [currentWidth, currentHeight] = firstIcon.icon.get_size();
firstIcon.icon.set_size(this.iconSize, this.iconSize);
firstIcon.setIconSize(this.iconSize);
[minHeight, natHeight] = firstButton.get_preferred_height(-1);
firstIcon.icon.set_size(currentWidth, currentHeight);
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let iconSizes = baseIconSizes.map(function(s) {
return s * scaleFactor;
});
// Subtract icon padding and box spacing from the available height
availHeight -= iconChildren.length * (natHeight - this.iconSize) +
availHeight -= iconChildren.length * (natHeight - this.iconSize * scaleFactor) +
(iconChildren.length - 1) * spacing;
let availSize = availHeight / iconChildren.length;
let iconSizes = [ 16, 22, 24, 32, 48, 64 ];
let newIconSize = 16;
let newIconSize = baseIconSizes[0];
for (let i = 0; i < iconSizes.length; i++) {
if (iconSizes[i] < availSize)
newIconSize = iconSizes[i];
newIconSize = baseIconSizes[i];
}
if (newIconSize == this.iconSize)

View File

@ -63,9 +63,14 @@ const DateMenuButton = new Lang.Class({
hbox.add(vbox);
// Date
this._date = new St.Label({ style_class: 'datemenu-date-label',
can_focus: true });
vbox.add(this._date);
this._date = new St.Button({ style_class: 'datemenu-date-label',
can_focus: true,
});
this._date.connect('clicked',
Lang.bind(this, function() {
this._calendar.setDate(new Date(), false);
}));
vbox.add(this._date, { x_fill: false });
this._eventList = new Calendar.EventsList();
this._calendar = new Calendar.Calendar();
@ -186,7 +191,7 @@ const DateMenuButton = new Lang.Class({
*/
let dateFormat = _("%A %B %e, %Y");
let displayDate = new Date();
this._date.set_text(displayDate.toLocaleFormat(dateFormat));
this._date.set_label(displayDate.toLocaleFormat(dateFormat));
},
_getCalendarApp: function() {
@ -202,7 +207,7 @@ const DateMenuButton = new Lang.Class({
},
_getClockApp: function() {
return Shell.AppSystem.get_default().lookup_app('gnome-clocks.desktop');
return Shell.AppSystem.get_default().lookup_app('org.gnome.clocks.desktop');
},
_onOpenCalendarActivate: function() {

View File

@ -25,9 +25,11 @@ const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Pango = imports.gi.Pango;
const Polkit = imports.gi.Polkit;
const St = imports.gi.St;
const Shell = imports.gi.Shell;
const CheckBox = imports.ui.checkBox;
const GnomeSession = imports.misc.gnomeSession;
const LoginManager = imports.misc.loginManager;
const ModalDialog = imports.ui.modalDialog;
@ -36,8 +38,10 @@ const UserWidget = imports.ui.userWidget;
let _endSessionDialog = null;
const TRIGGER_OFFLINE_UPDATE = '/usr/libexec/pk-trigger-offline-update';
const _ITEM_ICON_SIZE = 48;
const _DIALOG_ICON_SIZE = 32;
const _DIALOG_ICON_SIZE = 48;
const GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
@ -71,6 +75,7 @@ const logoutDialogContent = {
"You will be logged out automatically in %d seconds.",
seconds).format(seconds);
},
showBatteryWarning: false,
confirmButtons: [{ signal: 'ConfirmedLogout',
label: C_("button", "Log Out") }],
iconStyleClass: 'end-session-dialog-logout-icon',
@ -79,11 +84,14 @@ const logoutDialogContent = {
const shutdownDialogContent = {
subject: C_("title", "Power Off"),
subjectWithUpdates: C_("title", "Install Updates & Power Off"),
description: function(seconds) {
return ngettext("The system will power off automatically in %d second.",
"The system will power off automatically in %d seconds.",
seconds).format(seconds);
},
checkBoxText: C_("checkbox", "Install pending software updates"),
showBatteryWarning: true,
confirmButtons: [{ signal: 'ConfirmedReboot',
label: C_("button", "Restart") },
{ signal: 'ConfirmedShutdown',
@ -100,6 +108,7 @@ const restartDialogContent = {
"The system will restart automatically in %d seconds.",
seconds).format(seconds);
},
showBatteryWarning: false,
confirmButtons: [{ signal: 'ConfirmedReboot',
label: C_("button", "Restart") }],
iconName: 'view-refresh-symbolic',
@ -115,8 +124,11 @@ const restartInstallDialogContent = {
"The system will automatically restart and install updates in %d seconds.",
seconds).format(seconds);
},
showBatteryWarning: true,
confirmButtons: [{ signal: 'ConfirmedReboot',
label: C_("button", "Restart & Install") }],
label: C_("button", "Restart &amp; Install") }],
unusedFutureButtonForTranslation: C_("button", "Install &amp; Power Off"),
unusedFutureCheckBoxForTranslation: C_("checkbox", "Power off after updates are installed"),
iconName: 'view-refresh-symbolic',
iconStyleClass: 'end-session-dialog-shutdown-icon',
showOtherSessions: true,
@ -143,6 +155,14 @@ const LogindSessionIface = '<node> \
const LogindSession = Gio.DBusProxy.makeProxyWrapper(LogindSessionIface);
const UPowerIface = '<node> \
<interface name="org.freedesktop.UPower"> \
<property name="OnBattery" type="b" access="read"/> \
</interface> \
</node>';
const UPowerProxy = Gio.DBusProxy.makeProxyWrapper(UPowerIface);
function findAppFromInhibitor(inhibitor) {
let desktopFile;
try {
@ -195,6 +215,18 @@ function _setLabelText(label, text) {
}
}
function _setCheckBoxLabel(checkBox, text) {
let label = checkBox.getLabelActor();
if (text) {
label.set_text(text);
checkBox.actor.show();
} else {
label.set_text('');
checkBox.actor.hide();
}
}
function init() {
// This always returns the same singleton object
// By instantiating it initially, we register the
@ -214,6 +246,20 @@ const EndSessionDialog = new Lang.Class({
this._userManager = AccountsService.UserManager.get_default();
this._user = this._userManager.get_user(GLib.get_user_name());
this._updatesFile = Gio.File.new_for_path('/system-update');
this._preparedUpdateFile = Gio.File.new_for_path('/var/lib/PackageKit/prepared-update');
this._powerProxy = new UPowerProxy(Gio.DBus.system,
'org.freedesktop.UPower',
'/org/freedesktop/UPower',
Lang.bind(this, function(proxy, error) {
if (error) {
log(error.message);
return;
}
this._powerProxy.connect('g-properties-changed',
Lang.bind(this, this._sync));
this._sync();
}));
this._secondsLeft = 0;
this._totalSecondsToStayOpen = 0;
@ -240,7 +286,8 @@ const EndSessionDialog = new Lang.Class({
x_align: St.Align.END,
y_align: St.Align.START });
let messageLayout = new St.BoxLayout({ vertical: true });
let messageLayout = new St.BoxLayout({ vertical: true,
style_class: 'end-session-dialog-layout' });
mainContentLayout.add(messageLayout,
{ y_align: St.Align.START });
@ -260,6 +307,16 @@ const EndSessionDialog = new Lang.Class({
{ y_fill: true,
y_align: St.Align.START });
this._checkBox = new CheckBox.CheckBox();
this._checkBox.actor.connect('clicked', Lang.bind(this, this._sync));
messageLayout.add(this._checkBox.actor);
this._batteryWarning = new St.Label({ style_class: 'end-session-dialog-warning',
text: _("Running on battery power: please plug in before installing updates.") });
this._batteryWarning.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._batteryWarning.clutter_text.line_wrap = true;
messageLayout.add(this._batteryWarning);
this._scrollView = new St.ScrollView({ style_class: 'end-session-dialog-list' });
this._scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
this.contentLayout.add(this._scrollView,
@ -285,6 +342,12 @@ const EndSessionDialog = new Lang.Class({
this._inhibitorSection.add_actor(this._sessionHeader);
this._inhibitorSection.add_actor(this._sessionList);
try {
this._updatesPermission = Polkit.Permission.new_sync("org.freedesktop.packagekit.trigger-offline-update", null, null);
} catch(e) {
log('No permission to trigger offline updates: %s'.format(e.toString()));
}
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(EndSessionDialogIface, this);
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/SessionManager/EndSessionDialog');
},
@ -299,13 +362,22 @@ const EndSessionDialog = new Lang.Class({
if (!open)
return;
if (this._type == 2 && this._updatesFile.query_exists(null))
this._type = 3;
let dialogContent = DialogContent[this._type];
let subject = dialogContent.subject;
// Use different title when we are installing updates
if (dialogContent.subjectWithUpdates && this._checkBox.actor.checked)
subject = dialogContent.subjectWithUpdates;
if (dialogContent.showBatteryWarning) {
// Warn when running on battery power
if (this._powerProxy.OnBattery && this._checkBox.actor.checked)
this._batteryWarning.opacity = 255;
else
this._batteryWarning.opacity = 0;
}
let description;
let displayTime = _roundSecondsToInterval(this._totalSecondsToStayOpen,
this._secondsLeft,
@ -388,15 +460,75 @@ const EndSessionDialog = new Lang.Class({
},
_confirm: function(signal) {
this._fadeOutDialog();
this._stopTimer();
this._dbusImpl.emit_signal(signal, null);
let callback = Lang.bind(this, function() {
this._fadeOutDialog();
this._stopTimer();
this._dbusImpl.emit_signal(signal, null);
});
// Offline update not available; just emit the signal
if (!this._checkBox.actor.visible) {
callback();
return;
}
// Trigger the offline update as requested
if (this._checkBox.actor.checked) {
switch (signal) {
case "ConfirmedReboot":
this._triggerOfflineUpdateReboot(callback);
break;
case "ConfirmedShutdown":
// To actually trigger the offline update, we need to
// reboot to do the upgrade. When the upgrade is complete,
// the computer will shut down automatically.
signal = "ConfirmedReboot";
this._triggerOfflineUpdateShutdown(callback);
break;
default:
callback();
break;
}
} else {
this._triggerOfflineUpdateCancel(callback);
}
},
_onOpened: function() {
this._sync();
},
_triggerOfflineUpdateReboot: function(callback) {
this._pkexecSpawn([TRIGGER_OFFLINE_UPDATE, 'reboot'], callback);
},
_triggerOfflineUpdateShutdown: function(callback) {
this._pkexecSpawn([TRIGGER_OFFLINE_UPDATE, 'power-off'], callback);
},
_triggerOfflineUpdateCancel: function(callback) {
this._pkexecSpawn([TRIGGER_OFFLINE_UPDATE, '--cancel'], callback);
},
_pkexecSpawn: function(argv, callback) {
let ret, pid;
try {
[ret, pid] = GLib.spawn_async(null, ['pkexec'].concat(argv), null,
GLib.SpawnFlags.DO_NOT_REAP_CHILD | GLib.SpawnFlags.SEARCH_PATH,
null);
} catch (e) {
log('Error spawning "pkexec %s": %s'.format(argv.join(' '), e.toString()));
callback();
return;
}
GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, function(pid, status) {
GLib.spawn_close_pid(pid);
callback();
});
},
_startTimer: function() {
let startTime = GLib.get_monotonic_time();
this._secondsLeft = this._totalSecondsToStayOpen;
@ -544,6 +676,9 @@ const EndSessionDialog = new Lang.Class({
this._totalSecondsToStayOpen = totalSecondsToStayOpen;
this._type = type;
if (this._type == 2 && this._updatesFile.query_exists(null))
this._type = 3;
this._applications = [];
this._applicationList.destroy_all_children();
@ -556,6 +691,8 @@ const EndSessionDialog = new Lang.Class({
return;
}
let dialogContent = DialogContent[this._type];
for (let i = 0; i < inhibitorObjectPaths.length; i++) {
let inhibitor = new GnomeSession.Inhibitor(inhibitorObjectPaths[i], Lang.bind(this, function(proxy, error) {
this._onInhibitorLoaded(proxy);
@ -564,9 +701,23 @@ const EndSessionDialog = new Lang.Class({
this._applications.push(inhibitor);
}
if (DialogContent[type].showOtherSessions)
if (dialogContent.showOtherSessions)
this._loadSessions();
let preparedUpdate = this._preparedUpdateFile.query_exists(null);
let updateAlreadyTriggered = this._updatesFile.query_exists(null);
let updatesAllowed = this._updatesPermission && this._updatesPermission.allowed;
_setCheckBoxLabel(this._checkBox, dialogContent.checkBoxText);
this._checkBox.actor.visible = (dialogContent.checkBoxText && preparedUpdate && updatesAllowed);
this._checkBox.actor.checked = (preparedUpdate && updateAlreadyTriggered);
// We show the warning either together with the checkbox, or when
// updates have already been triggered, but the user doesn't have
// enough permissions to cancel them.
this._batteryWarning.visible = (dialogContent.showBatteryWarning &&
(this._checkBox.actor.visible || preparedUpdate && updateAlreadyTriggered && !updatesAllowed));
this._updateButtons();
if (!this.open(timestamp)) {

View File

@ -38,6 +38,7 @@ const connect = Lang.bind(_signals, _signals.connect);
const disconnect = Lang.bind(_signals, _signals.disconnect);
const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
const EXTENSION_DISABLE_VERSION_CHECK_KEY = 'disable-extension-version-validation';
var initted = false;
var enabled;
@ -156,7 +157,9 @@ function loadExtension(extension) {
// Default to error, we set success as the last step
extension.state = ExtensionState.ERROR;
if (ExtensionUtils.isOutOfDate(extension)) {
let checkVersion = !global.settings.get_boolean(EXTENSION_DISABLE_VERSION_CHECK_KEY);
if (checkVersion && ExtensionUtils.isOutOfDate(extension)) {
extension.state = ExtensionState.OUT_OF_DATE;
} else {
let enabled = enabledExtensions.indexOf(extension.uuid) != -1;
@ -267,8 +270,19 @@ function onEnabledExtensionsChanged() {
enabledExtensions = newEnabledExtensions;
}
function _onVersionValidationChanged() {
if (Main.sessionMode.allowExtensions) {
enabledExtensions.forEach(function(uuid) {
if (ExtensionUtils.extensions[uuid])
reloadExtension(ExtensionUtils.extensions[uuid]);
});
}
}
function _loadExtensions() {
global.settings.connect('changed::' + ENABLED_EXTENSIONS_KEY, onEnabledExtensionsChanged);
global.settings.connect('changed::' + EXTENSION_DISABLE_VERSION_CHECK_KEY, _onVersionValidationChanged);
enabledExtensions = getEnabledExtensions();
let finder = new ExtensionUtils.ExtensionFinder();

View File

@ -34,7 +34,11 @@ const FocusCaretTracker = new Lang.Class({
_init: function() {
Atspi.init();
Atspi.set_timeout(250, 250);
this._atspiListener = Atspi.EventListener.new(Lang.bind(this, this._onChanged));
this._focusListenerRegistered = false;
this._caretListenerRegistered = false;
},
_onChanged: function(event) {
@ -45,21 +49,39 @@ const FocusCaretTracker = new Lang.Class({
},
registerFocusListener: function() {
return this._atspiListener.register(STATECHANGED + ':focused') &&
this._atspiListener.register(STATECHANGED + ':selected');
if (this._focusListenerRegistered)
return;
// Ignore the return value, we get an exception if they fail
// And they should never fail
this._atspiListener.register(STATECHANGED + ':focused');
this._atspiListener.register(STATECHANGED + ':selected');
this._focusListenerRegistered = true;
},
registerCaretListener: function() {
return this._atspiListener.register(CARETMOVED);
if (this._caretListenerRegistered)
return;
this._atspiListener.register(CARETMOVED);
this._caretListenerRegistered = true;
},
deregisterFocusListener: function() {
return this._atspiListener.deregister(STATECHANGED + ':focused') &&
this._atspiListener.deregister(STATECHANGED + ':selected');
if (!this._focusListenerRegistered)
return;
this._atspiListener.deregister(STATECHANGED + ':focused');
this._atspiListener.deregister(STATECHANGED + ':selected');
this._focusListenerRegistered = false;
},
deregisterCaretListener: function() {
return this._atspiListener.deregister(CARETMOVED);
if (!this._caretListenerRegistered)
return;
this._atspiListener.deregister(CARETMOVED);
this._caretListenerRegistered = false;
}
});
Signals.addSignalMethods(FocusCaretTracker.prototype);

View File

@ -143,11 +143,6 @@ const BaseIcon = new Lang.Class({
this.icon = this.createIcon(this.iconSize);
this._iconBin.child = this.icon;
// The icon returned by createIcon() might actually be smaller than
// the requested icon size (for instance StTextureCache does this
// for fallback icons), so set the size explicitly.
this._iconBin.set_size(this.iconSize, this.iconSize);
},
_onStyleChanged: function() {

View File

@ -834,6 +834,8 @@ const LayoutManager = new Lang.Class({
Lang.bind(this, this._queueUpdateRegions));
actorData.allocationId = actor.connect('notify::allocation',
Lang.bind(this, this._queueUpdateRegions));
actorData.destroyId = actor.connect('destroy',
Lang.bind(this, this._untrackActor));
// Note that destroying actor will unset its parent, so we don't
// need to connect to 'destroy' too.
@ -851,7 +853,7 @@ const LayoutManager = new Lang.Class({
this._trackedActors.splice(i, 1);
actor.disconnect(actorData.visibleId);
actor.disconnect(actorData.allocationId);
actor.disconnect(actorData.parentSetId);
actor.disconnect(actorData.destroyId);
this._queueUpdateRegions();
},

View File

@ -11,6 +11,7 @@ const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
const Signals = imports.signals;
const Background = imports.ui.background;
const FocusCaretTracker = imports.ui.focusCaretTracker;
const Main = imports.ui.main;
const MagnifierDBus = imports.ui.magnifierDBus;
@ -57,20 +58,6 @@ const Magnifier = new Lang.Class({
// Magnifier is a manager of ZoomRegions.
this._zoomRegions = [];
// Export to dbus.
magDBusService = new MagnifierDBus.ShellMagnifier();
let showAtLaunch = this._settingsInit();
this.setActive(showAtLaunch);
},
_initialize: function() {
if (this._initialized)
return;
this._initialized = true;
this._settingsInitLate();
// Create small clutter tree for the magnified mouse.
let cursorTracker = Meta.CursorTracker.get_for_screen(global.screen);
this._mouseSprite = new Clutter.Texture();
@ -86,11 +73,15 @@ const Magnifier = new Lang.Class({
let aZoomRegion = new ZoomRegion(this, this._cursorRoot);
this._zoomRegions.push(aZoomRegion);
this._settingsInitRegion(aZoomRegion);
let showAtLaunch = this._settingsInit(aZoomRegion);
aZoomRegion.scrollContentsTo(this.xMouse, this.yMouse);
cursorTracker.connect('cursor-changed', Lang.bind(this, this._updateMouseSprite));
this._cursorTracker = cursorTracker;
// Export to dbus.
magDBusService = new MagnifierDBus.ShellMagnifier();
this.setActive(showAtLaunch);
},
/**
@ -115,20 +106,21 @@ const Magnifier = new Lang.Class({
* @activate: Boolean to activate or de-activate the magnifier.
*/
setActive: function(activate) {
if (activate == this.isActive())
return;
if (activate)
this._initialize();
let isActive = this.isActive();
this._zoomRegions.forEach (function(zoomRegion, index, array) {
zoomRegion.setActive(activate);
});
if (activate)
this.startTrackingMouse();
else
this.stopTrackingMouse();
if (isActive != activate) {
if (activate) {
Meta.disable_unredirect_for_screen(global.screen);
this.startTrackingMouse();
} else {
Meta.enable_unredirect_for_screen(global.screen);
this.stopTrackingMouse();
}
}
// Make sure system mouse pointer is shown when all zoom regions are
// invisible.
@ -448,68 +440,64 @@ const Magnifier = new Lang.Class({
this._mouseSprite.set_anchor_point(xHot, yHot);
},
_settingsInitRegion: function(zoomRegion) {
// Mag factor is accurate to two decimal places.
let aPref = parseFloat(this._settings.get_double(MAG_FACTOR_KEY).toFixed(2));
if (aPref != 0.0)
zoomRegion.setMagFactor(aPref, aPref);
aPref = this._settings.get_enum(SCREEN_POSITION_KEY);
if (aPref)
zoomRegion.setScreenPosition(aPref);
zoomRegion.setLensMode(this._settings.get_boolean(LENS_MODE_KEY));
zoomRegion.setClampScrollingAtEdges(!this._settings.get_boolean(CLAMP_MODE_KEY));
aPref = this._settings.get_enum(MOUSE_TRACKING_KEY);
if (aPref)
zoomRegion.setMouseTrackingMode(aPref);
aPref = this._settings.get_enum(FOCUS_TRACKING_KEY);
if (aPref)
zoomRegion.setFocusTrackingMode(aPref);
aPref = this._settings.get_enum(CARET_TRACKING_KEY);
if (aPref)
zoomRegion.setCaretTrackingMode(aPref);
aPref = this._settings.get_boolean(INVERT_LIGHTNESS_KEY);
if (aPref)
zoomRegion.setInvertLightness(aPref);
aPref = this._settings.get_double(COLOR_SATURATION_KEY);
if (aPref)
zoomRegion.setColorSaturation(aPref);
let bc = {};
bc.r = this._settings.get_double(BRIGHT_RED_KEY);
bc.g = this._settings.get_double(BRIGHT_GREEN_KEY);
bc.b = this._settings.get_double(BRIGHT_BLUE_KEY);
zoomRegion.setBrightness(bc);
bc.r = this._settings.get_double(CONTRAST_RED_KEY);
bc.g = this._settings.get_double(CONTRAST_GREEN_KEY);
bc.b = this._settings.get_double(CONTRAST_BLUE_KEY);
zoomRegion.setContrast(bc);
},
_settingsInit: function() {
_settingsInit: function(zoomRegion) {
this._appSettings = new Gio.Settings({ schema: APPLICATIONS_SCHEMA });
this._settings = new Gio.Settings({ schema: MAGNIFIER_SCHEMA });
this._appSettings.connect('changed::' + SHOW_KEY, Lang.bind(this, function() {
let active = this._appSettings.get_boolean(SHOW_KEY);
this.setActive(active);
}));
if (zoomRegion) {
// Mag factor is accurate to two decimal places.
let aPref = parseFloat(this._settings.get_double(MAG_FACTOR_KEY).toFixed(2));
if (aPref != 0.0)
zoomRegion.setMagFactor(aPref, aPref);
return this._appSettings.get_boolean(SHOW_KEY);
},
aPref = this._settings.get_enum(SCREEN_POSITION_KEY);
if (aPref)
zoomRegion.setScreenPosition(aPref);
zoomRegion.setLensMode(this._settings.get_boolean(LENS_MODE_KEY));
zoomRegion.setClampScrollingAtEdges(!this._settings.get_boolean(CLAMP_MODE_KEY));
aPref = this._settings.get_enum(MOUSE_TRACKING_KEY);
if (aPref)
zoomRegion.setMouseTrackingMode(aPref);
aPref = this._settings.get_enum(FOCUS_TRACKING_KEY);
if (aPref)
zoomRegion.setFocusTrackingMode(aPref);
aPref = this._settings.get_enum(CARET_TRACKING_KEY);
if (aPref)
zoomRegion.setCaretTrackingMode(aPref);
aPref = this._settings.get_boolean(INVERT_LIGHTNESS_KEY);
if (aPref)
zoomRegion.setInvertLightness(aPref);
aPref = this._settings.get_double(COLOR_SATURATION_KEY);
if (aPref)
zoomRegion.setColorSaturation(aPref);
let bc = {};
bc.r = this._settings.get_double(BRIGHT_RED_KEY);
bc.g = this._settings.get_double(BRIGHT_GREEN_KEY);
bc.b = this._settings.get_double(BRIGHT_BLUE_KEY);
zoomRegion.setBrightness(bc);
bc.r = this._settings.get_double(CONTRAST_RED_KEY);
bc.g = this._settings.get_double(CONTRAST_GREEN_KEY);
bc.b = this._settings.get_double(CONTRAST_BLUE_KEY);
zoomRegion.setContrast(bc);
}
_settingsInitLate: function() {
let showCrosshairs = this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY);
this.addCrosshairs();
this.setCrosshairsVisible(showCrosshairs);
this._appSettings.connect('changed::' + SHOW_KEY,
Lang.bind(this, function() {
this.setActive(this._appSettings.get_boolean(SHOW_KEY));
}));
this._settings.connect('changed::' + SCREEN_POSITION_KEY,
Lang.bind(this, this._updateScreenPosition));
this._settings.connect('changed::' + MAG_FACTOR_KEY,
@ -573,6 +561,7 @@ const Magnifier = new Lang.Class({
Lang.bind(this, function() {
this.setCrosshairsClip(this._settings.get_boolean(CROSS_HAIRS_CLIP_KEY));
}));
return this._appSettings.get_boolean(SHOW_KEY);
},
_updateScreenPosition: function() {
@ -731,8 +720,16 @@ const ZoomRegion = new Lang.Class({
let component = event.source.get_component_iface();
if (!component || event.detail1 != 1)
return;
let extents = component.get_extents(Atspi.CoordType.SCREEN);
[this._xFocus, this._yFocus] = [extents.x, extents.y]
let extents;
try {
extents = component.get_extents(Atspi.CoordType.SCREEN);
} catch(e) {
log('Failed to read extents of focused component: ' + e.message);
return;
}
[this._xFocus, this._yFocus] = [extents.x + (extents.width / 2),
extents.y + (extents.height / 2)];
this._centerFromFocusPosition();
},
@ -740,7 +737,14 @@ const ZoomRegion = new Lang.Class({
let text = event.source.get_text_iface();
if (!text)
return;
let extents = text.get_character_extents(text.get_caret_offset(), 0);
let extents;
try {
extents = text.get_character_extents(text.get_caret_offset(), 0);
} catch(e) {
log('Failed to read extents of text caret: ' + e.message);
return;
}
[this._xCaret, this._yCaret] = [extents.x, extents.y];
this._centerFromCaretPosition();
},
@ -763,6 +767,9 @@ const ZoomRegion = new Lang.Class({
} else {
this._destroyActors();
}
this._syncCaretTracking();
this._syncFocusTracking();
},
/**
@ -822,10 +829,7 @@ const ZoomRegion = new Lang.Class({
*/
setFocusTrackingMode: function(mode) {
this._focusTrackingMode = mode;
if (this._focusTrackingMode == GDesktopEnums.MagnifierFocusTrackingMode.NONE)
this._focusCaretTracker.deregisterFocusListener();
else
this._focusCaretTracker.registerFocusListener();
this._syncFocusTracking();
},
/**
@ -834,10 +838,27 @@ const ZoomRegion = new Lang.Class({
*/
setCaretTrackingMode: function(mode) {
this._caretTrackingMode = mode;
if (this._caretTrackingMode == GDesktopEnums.MagnifierCaretTrackingMode.NONE)
this._focusCaretTracker.deregisterCaretListener();
this._syncCaretTracking();
},
_syncFocusTracking: function() {
let enabled = this._focusTrackingMode != GDesktopEnums.MagnifierFocusTrackingMode.NONE &&
this.isActive();
if (enabled)
this._focusCaretTracker.registerFocusListener();
else
this._focusCaretTracker.deregisterFocusListener();
},
_syncCaretTracking: function() {
let enabled = this._caretTrackingMode != GDesktopEnums.MagnifierCaretTrackingMode.NONE &&
this.isActive();
if (enabled)
this._focusCaretTracker.registerCaretListener();
else
this._focusCaretTracker.deregisterCaretListener();
},
/**
@ -1178,13 +1199,17 @@ const ZoomRegion = new Lang.Class({
// Add a background for when the magnified uiGroup is scrolled
// out of view (don't want to see desktop showing through).
this._background = new Clutter.Actor({ background_color: Main.DEFAULT_BACKGROUND_COLOR,
layout_manager: new Clutter.BinLayout(),
width: global.screen_width,
height: global.screen_height });
let noiseTexture = (new Background.SystemBackground()).actor;
this._background.add_actor(noiseTexture);
mainGroup.add_actor(this._background);
// Clone the group that contains all of UI on the screen. This is the
// chrome, the windows, etc.
this._uiGroupClone = new Clutter.Clone({ source: Main.uiGroup });
this._uiGroupClone = new Clutter.Clone({ source: Main.uiGroup,
clip_to_allocation: true });
mainGroup.add_actor(this._uiGroupClone);
// Add either the given mouseSourceActor to the ZoomRegion, or a clone of

View File

@ -1162,32 +1162,12 @@ const SourceActor = new Lang.Class({
}));
this._actorDestroyed = false;
this._counterLabel = new St.Label({ x_align: Clutter.ActorAlign.CENTER,
x_expand: true,
y_align: Clutter.ActorAlign.CENTER,
y_expand: true });
this._counterBin = new St.Bin({ style_class: 'summary-source-counter',
child: this._counterLabel,
layout_manager: new Clutter.BinLayout() });
this._counterBin.hide();
this._counterBin.connect('style-changed', Lang.bind(this, function() {
let themeNode = this._counterBin.get_theme_node();
this._counterBin.translation_x = themeNode.get_length('-shell-counter-overlap-x');
this._counterBin.translation_y = themeNode.get_length('-shell-counter-overlap-y');
}));
this._iconBin = new St.Bin({ width: size,
height: size,
x_fill: true,
y_fill: true });
let scale_factor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._iconBin = new St.Bin({ x_fill: true,
height: size * scale_factor,
width: size * scale_factor });
this.actor.add_actor(this._iconBin);
this.actor.add_actor(this._counterBin);
this._source.connect('count-updated', Lang.bind(this, this._updateCount));
this._updateCount();
this._source.connect('icon-updated', Lang.bind(this, this._updateIcon));
this._updateIcon();
@ -1211,6 +1191,48 @@ const SourceActor = new Lang.Class({
_allocate: function(actor, box, flags) {
// the iconBin should fill our entire box
this._iconBin.allocate(box, flags);
},
_updateIcon: function() {
if (this._actorDestroyed)
return;
if (!this._iconSet)
this._iconBin.child = this._source.createIcon(this._size);
}
});
const SourceActorWithLabel = new Lang.Class({
Name: 'SourceActorWithLabel',
Extends: SourceActor,
_init: function(source, size) {
this.parent(source, size);
this._counterLabel = new St.Label({ x_align: Clutter.ActorAlign.CENTER,
x_expand: true,
y_align: Clutter.ActorAlign.CENTER,
y_expand: true });
this._counterBin = new St.Bin({ style_class: 'summary-source-counter',
child: this._counterLabel,
layout_manager: new Clutter.BinLayout() });
this._counterBin.hide();
this._counterBin.connect('style-changed', Lang.bind(this, function() {
let themeNode = this._counterBin.get_theme_node();
this._counterBin.translation_x = themeNode.get_length('-shell-counter-overlap-x');
this._counterBin.translation_y = themeNode.get_length('-shell-counter-overlap-y');
}));
this.actor.add_actor(this._counterBin);
this._source.connect('count-updated', Lang.bind(this, this._updateCount));
this._updateCount();
},
_allocate: function(actor, box, flags) {
this.parent(actor, box, flags);
let childBox = new Clutter.ActorBox();
@ -1233,14 +1255,6 @@ const SourceActor = new Lang.Class({
this._counterBin.allocate(childBox, flags);
},
_updateIcon: function() {
if (this._actorDestroyed)
return;
if (!this._iconSet)
this._iconBin.child = this._source.createIcon(this._size);
},
_updateCount: function() {
if (this._actorDestroyed)
return;
@ -1353,7 +1367,7 @@ const Source = new Lang.Class({
if (this._mainIcon)
return;
this._mainIcon = new SourceActor(this, this.SOURCE_ICON_SIZE);
this._mainIcon = new SourceActorWithLabel(this, this.SOURCE_ICON_SIZE);
},
// Unlike createIcon, this always returns the same actor;

View File

@ -200,8 +200,9 @@ const OsdWindow = new Lang.Class({
let scale = Math.min(scalew, scaleh);
this._popupSize = 110 * Math.max(1, scale);
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._icon.icon_size = this._popupSize / (2 * scaleFactor);
this._box.translation_y = monitor.height / 4;
this._icon.icon_size = this._popupSize / 2;
this._box.style_changed();
},
@ -217,7 +218,10 @@ const OsdWindow = new Lang.Class({
let minWidth = this._popupSize - verticalPadding - leftBorder - rightBorder;
let minHeight = this._popupSize - horizontalPadding - topBorder - bottomBorder;
this._box.style = 'min-height: %dpx;'.format(Math.max(minWidth, minHeight));
// minWidth/minHeight here are in real pixels,
// but the theme takes measures in unscaled dimensions
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._box.style = 'min-height: %dpx;'.format(Math.max(minWidth, minHeight) / scaleFactor);
},
setMonitor: function(index) {

View File

@ -493,8 +493,13 @@ const Overview = new Lang.Class({
},
fadeOutDesktop: function() {
if (!this._desktopFade.get_n_children())
this._desktopFade.add_child(this._getDesktopClone());
if (!this._desktopFade.get_n_children()) {
let clone = this._getDesktopClone();
if (!clone)
return;
this._desktopFade.add_child(clone);
}
this._desktopFade.opacity = 255;
this._desktopFade.show();

View File

@ -213,7 +213,7 @@ const AppMenuButton = new Lang.Class({
this._label = new TextShadower();
this._label.actor.y_align = Clutter.ActorAlign.CENTER;
this._hbox.add_actor(this._label.actor);
this._arrow = PopupMenu.unicodeArrow(St.Side.BOTTOM);
this._arrow = PopupMenu.arrowIcon(St.Side.BOTTOM);
this._hbox.add_actor(this._arrow);
this._iconBottomClip = 0;
@ -812,7 +812,11 @@ const AggregateMenu = new Lang.Class({
this._indicators = new St.BoxLayout({ style_class: 'panel-status-indicators-box' });
this.actor.add_child(this._indicators);
this._network = new imports.ui.status.network.NMApplet();
if (Config.HAVE_NETWORKMANAGER) {
this._network = new imports.ui.status.network.NMApplet();
} else {
this._network = null;
}
if (Config.HAVE_BLUETOOTH) {
this._bluetooth = new imports.ui.status.bluetooth.Indicator();
} else {
@ -829,22 +833,27 @@ const AggregateMenu = new Lang.Class({
this._indicators.add_child(this._screencast.indicators);
this._indicators.add_child(this._location.indicators);
this._indicators.add_child(this._network.indicators);
if (this._network) {
this._indicators.add_child(this._network.indicators);
}
if (this._bluetooth) {
this._indicators.add_child(this._bluetooth.indicators);
}
this._indicators.add_child(this._rfkill.indicators);
this._indicators.add_child(this._volume.indicators);
this._indicators.add_child(this._power.indicators);
this._indicators.add_child(PopupMenu.unicodeArrow(St.Side.BOTTOM));
this._indicators.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
this.menu.addMenuItem(this._volume.menu);
this.menu.addMenuItem(this._brightness.menu);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addMenuItem(this._network.menu);
if (this._network) {
this.menu.addMenuItem(this._network.menu);
}
if (this._bluetooth) {
this.menu.addMenuItem(this._bluetooth.menu);
}
this.menu.addMenuItem(this._location.menu);
this.menu.addMenuItem(this._rfkill.menu);
this.menu.addMenuItem(this._power.menu);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());

View File

@ -45,28 +45,35 @@ function isPopupMenuItemVisible(child) {
/**
* @side Side to which the arrow points.
*/
function unicodeArrow(side) {
let arrowChar;
function arrowIcon(side) {
let rotation;
switch (side) {
case St.Side.TOP:
arrowChar = '\u25B4';
rotation = 180;
break;
case St.Side.RIGHT:
arrowChar = '\u25B8';
rotation = - 90;
break;
case St.Side.BOTTOM:
arrowChar = '\u25BE';
rotation = 0;
break;
case St.Side.LEFT:
arrowChar = '\u25C2';
rotation = 90;
break;
}
return new St.Label({ text: arrowChar,
style_class: 'unicode-arrow',
accessible_role: Atk.Role.ARROW,
y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
let gicon = new Gio.FileIcon({ file: Gio.File.new_for_path(global.datadir +
'/theme/menu-arrow-symbolic.svg') });
let arrow = new St.Icon({ style_class: 'popup-menu-arrow',
gicon: gicon,
accessible_role: Atk.Role.ARROW,
y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
arrow.rotation_angle_z = rotation;
return arrow;
}
const PopupBaseMenuItem = new Lang.Class({
@ -111,6 +118,7 @@ const PopupBaseMenuItem = new Lang.Class({
this.actor.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
this.actor.connect('key-focus-out', Lang.bind(this, this._onKeyFocusOut));
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
},
_getTopMenu: function() {
@ -192,6 +200,9 @@ const PopupBaseMenuItem = new Lang.Class({
destroy: function() {
this.actor.destroy();
},
_onDestroy: function() {
this.emit('destroy');
},
@ -868,14 +879,14 @@ const PopupSubMenu = new Lang.Class({
if (animate) {
let [minHeight, naturalHeight] = this.actor.get_preferred_height(-1);
this.actor.height = 0;
this.actor._arrow_rotation = this._arrow.rotation_angle_z;
this.actor._arrowRotation = this._arrow.rotation_angle_z;
Tweener.addTween(this.actor,
{ _arrow_rotation: 90,
{ _arrowRotation: this.actor._arrowRotation + 90,
height: naturalHeight,
time: 0.25,
onUpdateScope: this,
onUpdate: function() {
this._arrow.rotation_angle_z = this.actor._arrow_rotation;
this._arrow.rotation_angle_z = this.actor._arrowRotation;
},
onCompleteScope: this,
onComplete: function() {
@ -883,7 +894,7 @@ const PopupSubMenu = new Lang.Class({
}
});
} else {
this._arrow.rotation_angle_z = 90;
this._arrow.rotation_angle_z = this.actor._arrowRotation + 90;
}
},
@ -901,14 +912,14 @@ const PopupSubMenu = new Lang.Class({
animate = false;
if (animate) {
this.actor._arrow_rotation = this._arrow.rotation_angle_z;
this.actor._arrowRotation = this._arrow.rotation_angle_z;
Tweener.addTween(this.actor,
{ _arrow_rotation: 0,
{ _arrowRotation: this.actor._arrowRotation - 90,
height: 0,
time: 0.25,
onUpdateScope: this,
onUpdate: function() {
this._arrow.rotation_angle_z = this.actor._arrow_rotation;
this._arrow.rotation_angle_z = this.actor._arrowRotation;
},
onCompleteScope: this,
onComplete: function() {
@ -917,7 +928,7 @@ const PopupSubMenu = new Lang.Class({
},
});
} else {
this._arrow.rotation_angle_z = 0;
this._arrow.rotation_angle_z = this.actor._arrowRotation - 90;
this.actor.hide();
}
},
@ -989,7 +1000,7 @@ const PopupSubMenuMenuItem = new Lang.Class({
y_align: Clutter.ActorAlign.CENTER });
this.actor.add_child(this.status);
this._triangle = unicodeArrow(St.Side.RIGHT);
this._triangle = arrowIcon(St.Side.RIGHT);
this._triangle.pivot_point = new Clutter.Point({ x: 0.5, y: 0.6 });
this._triangleBin = new St.Widget({ y_expand: true,

View File

@ -10,6 +10,8 @@ const FileUtils = imports.misc.fileUtils;
const Main = imports.ui.main;
const Params = imports.misc.params;
const Config = imports.misc.config;
const DEFAULT_MODE = 'restrictive';
const _modes = {
@ -92,8 +94,12 @@ const _modes = {
isLocked: false,
isPrimary: true,
unlockDialog: imports.ui.unlockDialog.UnlockDialog,
components: ['networkAgent', 'polkitAgent', 'telepathyClient',
components: Config.HAVE_NETWORKMANAGER ?
['networkAgent', 'polkitAgent', 'telepathyClient',
'keyring', 'autorunManager', 'automountManager'] :
['polkitAgent', 'telepathyClient',
'keyring', 'autorunManager', 'automountManager'],
panel: {
left: ['activities', 'appMenu'],
center: ['dateMenu'],

View File

@ -371,8 +371,10 @@ const GnomeShellExtensions = new Lang.Class({
LaunchExtensionPrefs: function(uuid) {
let appSys = Shell.AppSystem.get_default();
let app = appSys.lookup_app('gnome-shell-extension-prefs.desktop');
app.launch(global.display.get_current_time_roundtrip(),
['extension:///' + uuid], -1, null);
let info = app.get_app_info();
let timestamp = global.display.get_current_time_roundtrip();
info.launch_uris(['extension:///' + uuid],
global.create_app_launch_context(timestamp, -1));
},
ReloadExtension: function(uuid) {

View File

@ -1,11 +1,11 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Atk = imports.gi.Atk;
const Cairo = imports.cairo;
const Clutter = imports.gi.Clutter;
const Lang = imports.lang;
const St = imports.gi.St;
const Signals = imports.signals;
const Atk = imports.gi.Atk;
const SLIDER_SCROLL_STEP = 0.05; /* Slider scrolling step in % */

View File

@ -44,7 +44,7 @@ const ATIndicator = new Lang.Class({
this._hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
this._hbox.add_child(new St.Icon({ style_class: 'system-status-icon',
icon_name: 'preferences-desktop-accessibility-symbolic' }));
this._hbox.add_child(PopupMenu.unicodeArrow(St.Side.BOTTOM));
this._hbox.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
this.actor.add_child(this._hbox);

View File

@ -38,7 +38,10 @@ const Indicator = new Lang.Class({
log(error.message);
return;
}
this._sync();
}));
this._proxy.connect('g-properties-changed', Lang.bind(this, this._sync));
// The Bluetooth menu only appears when Bluetooth is in use,
// so just statically build it with a "Turn Off" menu item.
@ -90,11 +93,12 @@ const Indicator = new Lang.Class({
_sync: function() {
let nDevices = this._getNConnectedDevices();
let on = nDevices > 0;
this._indicator.visible = on;
this._item.actor.visible = on;
this._indicator.visible = nDevices > 0;
this._item.actor.visible = !this._proxy.BluetoothAirplaneMode;
if (on)
if (nDevices > 0)
this._item.status.text = ngettext("%d Connected Device", "%d Connected Devices", nDevices).format(nDevices);
else
this._item.status.text = _("Not Connected");
},
});

View File

@ -341,7 +341,7 @@ const InputSourceIndicator = new Lang.Class({
this._hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
this._hbox.add_child(this._container);
this._hbox.add_child(PopupMenu.unicodeArrow(St.Side.BOTTOM));
this._hbox.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
this.actor.add_child(this._hbox);
this.actor.add_style_class_name('panel-status-button');

View File

@ -1,18 +1,40 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Shell = imports.gi.Shell;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const LOCATION_SCHEMA = 'org.gnome.shell.location';
const MAX_ACCURACY_LEVEL = 'max-accuracy-level';
var GeoclueIface = '<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>';
const GeoclueManager = Gio.DBusProxy.makeProxyWrapper(GeoclueIface);
var AgentIface = '<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>';
const Indicator = new Lang.Class({
Name: 'LocationIndicator',
Extends: PanelMenu.SystemIndicator,
@ -20,18 +42,52 @@ const Indicator = new Lang.Class({
_init: function() {
this.parent();
this._settings = new Gio.Settings({ schema: LOCATION_SCHEMA });
this._settings.connect('changed::' + MAX_ACCURACY_LEVEL,
Lang.bind(this, this._onMaxAccuracyLevelChanged));
this._indicator = this._addIndicator();
this._indicator.icon_name = 'find-location-symbolic';
this._sync();
this._item = new PopupMenu.PopupSubMenuMenuItem(_("Location"), true);
this._item.icon.icon_name = 'find-location-symbolic';
this._agent = Gio.DBusExportedObject.wrapJSObject(AgentIface, this);
this._agent.export(Gio.DBus.system, '/org/freedesktop/GeoClue2/Agent');
this._item.status.text = _("On");
this._onOffAction = this._item.menu.addAction(_("Turn Off"), Lang.bind(this, this._onOnOffAction));
this.menu.addMenuItem(this._item);
this._watchId = Gio.bus_watch_name(Gio.BusType.SYSTEM,
'org.freedesktop.GeoClue2',
0,
Lang.bind(this, this._onGeoclueAppeared),
Lang.bind(this, this._connectToGeoclue),
Lang.bind(this, this._onGeoclueVanished));
this._onMaxAccuracyLevelChanged();
this._connectToGeoclue();
},
_sync: function() {
get MaxAccuracyLevel() {
return this._getMaxAccuracyLevel();
},
// We (and geoclue) have currently no way to reliably identifying apps so
// for now, lets just authorize all apps as long as they provide a valid
// desktop ID. We also ensure they don't get more accuracy than global max.
AuthorizeApp: function(desktop_id, reqAccuracyLevel) {
var appSystem = Shell.AppSystem.get_default();
var app = appSystem.lookup_app(desktop_id + ".desktop");
if (app == null) {
return [false, 0];
}
let allowedAccuracyLevel = clamp(reqAccuracyLevel, 0, this._getMaxAccuracyLevel());
return [true, allowedAccuracyLevel];
},
_syncIndicator: function() {
if (this._proxy == null) {
this._indicator.visible = false;
return;
@ -40,19 +96,98 @@ const Indicator = new Lang.Class({
this._indicator.visible = this._proxy.InUse;
},
_onGeoclueAppeared: function() {
// FIXME: This should be done async
this._proxy = new GeoclueManager(Gio.DBus.system,
'org.freedesktop.GeoClue2',
'/org/freedesktop/GeoClue2/Manager');
this._proxy.connect('g-properties-changed', Lang.bind(this, this._sync));
_connectToGeoclue: function() {
if (this._proxy != null || this._connecting)
return false;
this._sync();
this._connecting = true;
new GeoclueManager(Gio.DBus.system,
'org.freedesktop.GeoClue2',
'/org/freedesktop/GeoClue2/Manager',
Lang.bind(this, this._onProxyReady));
return true;
},
_onProxyReady: function(proxy, error) {
if (error != null) {
log(error.message);
this._connecting = false;
return;
}
this._proxy = proxy;
this._propertiesChangedId = this._proxy.connect('g-properties-changed',
Lang.bind(this, this._onGeocluePropsChanged));
this._updateMenu();
this._syncIndicator();
this._proxy.AddAgentRemote('gnome-shell', Lang.bind(this, this._onAgentRegistered));
},
_onAgentRegistered: function(result, error) {
this._connecting = false;
this._notifyMaxAccuracyLevel();
if (error != null)
log(error.message);
},
_onGeoclueVanished: function() {
if (this._propertiesChangedId) {
this._proxy.disconnect(this._propertiesChangedId);
this._propertiesChangedId = 0;
}
this._proxy = null;
this._sync();
this._syncIndicator();
},
_onOnOffAction: function() {
if (this._getMaxAccuracyLevel() == 0)
this._settings.set_enum(MAX_ACCURACY_LEVEL, this._availableAccuracyLevel);
else
this._settings.set_enum(MAX_ACCURACY_LEVEL, 0);
},
_onMaxAccuracyLevelChanged: function() {
if (this._getMaxAccuracyLevel() == 0) {
this._item.status.text = _("Off");
this._onOffAction.label.text = _("Turn On");
} else {
this._item.status.text = _("On");
this._onOffAction.label.text = _("Turn Off");
}
// Gotta ensure geoclue is up and we are registered as agent to it
// before we emit the notify for this property change.
if (!this._connectToGeoclue())
this._notifyMaxAccuracyLevel();
},
_getMaxAccuracyLevel: function() {
return this._settings.get_enum(MAX_ACCURACY_LEVEL);
},
_notifyMaxAccuracyLevel: function() {
let variant = new GLib.Variant('u', this._getMaxAccuracyLevel());
this._agent.emit_property_changed('MaxAccuracyLevel', variant);
},
_updateMenu: function() {
this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
this.menu.actor.visible = (this._availableAccuracyLevel != 0);
},
_onGeocluePropsChanged: function(proxy, properties) {
let unpacked = properties.deep_unpack();
if ("InUse" in unpacked)
this._syncIndicator();
if ("AvailableAccuracyLevel" in unpacked)
this._updateMenu();
}
});
function clamp(value, min, max) {
return Math.max(min, Math.min(max, value));
}

View File

@ -9,14 +9,17 @@ const NetworkManager = imports.gi.NetworkManager;
const NMClient = imports.gi.NMClient;
const NMGtk = imports.gi.NMGtk;
const Signals = imports.signals;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Animation = imports.ui.animation;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const MessageTray = imports.ui.messageTray;
const ModalDialog = imports.ui.modalDialog;
const ModemManager = imports.misc.modemManager;
const Rfkill = imports.ui.status.rfkill;
const Util = imports.misc.util;
const NMConnectionCategory = {
@ -102,18 +105,34 @@ const NMConnectionItem = new Lang.Class({
this._activeConnection = null;
this._activeConnectionChangedId = 0;
this._buildUI();
this._sync();
},
_buildUI: function() {
this.labelItem = new PopupMenu.PopupMenuItem('');
this.labelItem.connect('activate', Lang.bind(this, this._toggle));
this.switchItem = new PopupMenu.PopupSwitchMenuItem(connection.get_id(), false);
this.switchItem.connect('toggled', Lang.bind(this, this._toggle));
this._sync();
this.radioItem = new PopupMenu.PopupMenuItem(this._connection.get_id(), false);
this.radioItem.connect('activate', Lang.bind(this, this._activate));
},
destroy: function() {
this.labelItem.destroy();
this.switchItem.destroy();
this.radioItem.destroy();
},
updateForConnection: function(connection) {
// connection should always be the same object
// (and object path) as this._connection, but
// this can be false if NetworkManager was restarted
// and picked up connections in a different order
// Just to be safe, we set it here again
this._connection = connection;
this.radioItem.label.text = connection.get_id();
this._sync();
this.emit('name-changed');
},
getName: function() {
@ -129,9 +148,8 @@ const NMConnectionItem = new Lang.Class({
_sync: function() {
let isActive = this.isActive();
this.labelItem.label.text = isActive ? _("Turn Off") : _("Connect");
this.switchItem.setToggleState(isActive);
this.switchItem.setStatus(this._getStatus());
this.labelItem.label.text = isActive ? _("Turn Off") : this._section.getConnectLabel();
this.radioItem.setOrnament(isActive ? PopupMenu.Ornament.DOT : PopupMenu.Ornament.NONE);
this.emit('icon-changed');
},
@ -144,8 +162,11 @@ const NMConnectionItem = new Lang.Class({
this._sync();
},
_getStatus: function() {
return null;
_activate: function() {
if (this._activeConnection == null)
this._section.activateConnection(this._connection);
this._sync();
},
_connectionStateChanged: function(ac, newstate, reason) {
@ -180,11 +201,11 @@ const NMConnectionSection = new Lang.Class({
this._connections = [];
this._labelSection = new PopupMenu.PopupMenuSection();
this._switchSection = new PopupMenu.PopupMenuSection();
this._radioSection = new PopupMenu.PopupMenuSection();
this.item = new PopupMenu.PopupSubMenuMenuItem('', true);
this.item.menu.addMenuItem(this._labelSection);
this.item.menu.addMenuItem(this._switchSection);
this.item.menu.addMenuItem(this._radioSection);
this.connect('icon-changed', Lang.bind(this, this._sync));
},
@ -196,7 +217,7 @@ const NMConnectionSection = new Lang.Class({
_sync: function() {
let nItems = this._connectionItems.size;
this._switchSection.actor.visible = (nItems > 1);
this._radioSection.actor.visible = (nItems > 1);
this._labelSection.actor.visible = (nItems == 1);
this.item.status.text = this._getStatus();
@ -211,18 +232,12 @@ const NMConnectionSection = new Lang.Class({
this.item.label.text = '';
},
_getStatus: function() {
let values = this._connectionItems.values();
for (let item of values) {
if (item.isActive())
return item.getName();
}
return _("Off");
_getMenuIcon: function() {
return this.getIndicatorIcon();
},
_hasConnection: function(connection) {
return this._connectionItems.has(connection.get_uuid());
getConnectLabel: function() {
return _("Connect");
},
_connectionValid: function(connection) {
@ -230,10 +245,7 @@ const NMConnectionSection = new Lang.Class({
},
_connectionSortFunction: function(one, two) {
if (one._timestamp == two._timestamp)
return GLib.utf8_collate(one.get_id(), two.get_id());
return two._timestamp - one._timestamp;
return GLib.utf8_collate(one.get_id(), two.get_id());
},
_makeConnectionItem: function(connection) {
@ -244,10 +256,20 @@ const NMConnectionSection = new Lang.Class({
if (!this._connectionValid(connection))
return;
if (this._hasConnection(connection))
return;
// This function is called everytime connection is added or updated
// In the usual case, we already added this connection and UUID
// didn't change. So we need to check if we already have an item,
// and update it for properties in the connection that changed
// (the only one we care about is the name)
// But it's also possible we didn't know about this connection
// (eg, during coldplug, or because it was updated and suddenly
// it's valid for this device), in which case we add a new item
this._addConnection(connection);
let item = this._connectionItems.get(connection.get_uuid());
if (item)
item.updateForConnection(connection);
else
this._addConnection(connection);
},
_addConnection: function(connection) {
@ -261,10 +283,11 @@ const NMConnectionSection = new Lang.Class({
item.connect('activation-failed', Lang.bind(this, function(item, reason) {
this.emit('activation-failed', reason);
}));
item.connect('name-changed', Lang.bind(this, this._sync));
let pos = Util.insertSorted(this._connections, connection, Lang.bind(this, this._connectionSortFunction));
this._labelSection.addMenuItem(item.labelItem, pos);
this._switchSection.addMenuItem(item.switchItem, pos);
this._radioSection.addMenuItem(item.radioItem, pos);
this._connectionItems.set(connection.get_uuid(), item);
this._sync();
},
@ -292,11 +315,19 @@ const NMConnectionDevice = new Lang.Class({
this._settings = settings;
this._autoConnectItem = this.item.menu.addAction(_("Connect"), Lang.bind(this, this._autoConnect));
this._deactivateItem = this._radioSection.addAction(_("Turn Off"), Lang.bind(this, this.deactivateConnection));
this._stateChangedId = this._device.connect('state-changed', Lang.bind(this, this._deviceStateChanged));
this._activeConnectionChangedId = this._device.connect('notify::active-connection', Lang.bind(this, this._activeConnectionChanged));
},
_canReachInternet: function() {
if (this._client.primary_connection != this._device.active_connection)
return true;
return this._client.connectivity == NetworkManager.ConnectivityState.FULL;
},
_autoConnect: function() {
let connection = new NetworkManager.Connection();
this._client.add_and_activate_connection(connection, this._device, null, null);
@ -371,6 +402,7 @@ const NMConnectionDevice = new Lang.Class({
_sync: function() {
let nItems = this._connectionItems.size;
this._autoConnectItem.actor.visible = (nItems == 0);
this._deactivateItem.actor.visible = this._device.state > NetworkManager.DeviceState.DISCONNECTED;
this.parent();
},
@ -382,7 +414,7 @@ const NMConnectionDevice = new Lang.Class({
case NetworkManager.DeviceState.DISCONNECTED:
return _("Off");
case NetworkManager.DeviceState.ACTIVATED:
return this.parent();
return _("Connected");
case NetworkManager.DeviceState.UNMANAGED:
/* Translators: this is for network devices that are physically present but are not
under NetworkManager's control (and thus cannot be used in the menu) */
@ -430,33 +462,33 @@ const NMDeviceWired = new Lang.Class({
this.item.menu.addMenuItem(createSettingsAction(_("Wired Settings"), device));
},
_isConnected: function() {
if (!this._device.active_connection)
return false;
let state = this._device.active_connection.state;
return state >= NetworkManager.ActiveConnectionState.ACTIVATING;
_hasCarrier: function() {
if (this._device instanceof NMClient.DeviceEthernet)
return this._device.carrier;
else
return true;
},
_sync: function() {
this.item.actor.visible = this._isConnected();
this.item.actor.visible = this._hasCarrier();
this.parent();
},
_getMenuIcon: function() {
if (this._device.active_connection)
return this.getIndicatorIcon();
else
return 'network-wired-disconnected-symbolic';
},
getIndicatorIcon: function() {
let state = this._device.active_connection.state;
if (state == NetworkManager.ActiveConnectionState.ACTIVATING)
return 'network-wired-acquiring-symbolic';
else if (state == NetworkManager.ActiveConnectionState.ACTIVATED)
return 'network-wired-symbolic';
else
if (this._device.active_connection) {
let state = this._device.active_connection.state;
if (state == NetworkManager.ActiveConnectionState.ACTIVATING) {
return 'network-wired-acquiring-symbolic';
} else if (state == NetworkManager.ActiveConnectionState.ACTIVATED) {
if (this._canReachInternet())
return 'network-wired-symbolic';
else
return 'network-wired-no-route-symbolic';
} else {
return 'network-wired-disconnected-symbolic';
}
} else
return 'network-wired-disconnected-symbolic';
}
});
@ -523,28 +555,20 @@ const NMDeviceModem = new Lang.Class({
return this.parent();
},
_getMenuIcon: function() {
if (this._device.active_connection)
return this.getIndicatorIcon();
else
getIndicatorIcon: function() {
if (this._device.active_connection) {
if (this._device.active_connection.state == NetworkManager.ActiveConnectionState.ACTIVATING)
return 'network-cellular-acquiring-symbolic';
return this._getSignalIcon();
} else {
return 'network-cellular-signal-none-symbolic';
}
},
_getSignalIcon: function() {
return 'network-cellular-signal-' + signalToIcon(this._mobileDevice.signal_quality) + '-symbolic';
},
getIndicatorIcon: function() {
if (this._device.active_connection.state == NetworkManager.ActiveConnectionState.ACTIVATING)
return 'network-cellular-acquiring-symbolic';
if (!this._mobileDevice) {
// this can happen for bluetooth in PAN mode
return 'network-cellular-connected-symbolic';
}
return this._getSignalIcon();
}
});
const NMDeviceBluetooth = new Lang.Class({
@ -558,21 +582,26 @@ const NMDeviceBluetooth = new Lang.Class({
this.item.menu.addMenuItem(createSettingsAction(_("Mobile Broadband Settings"), device));
},
_getMenuIcon: function() {
if (this._device.active_connection)
return this.getIndicatorIcon();
else
return 'network-cellular-signal-none-symbolic';
_getDescription: function() {
return this._device.name;
},
getConnectLabel: function() {
return _("Use as Internet connection");
},
getIndicatorIcon: function() {
let state = this._device.active_connection.state;
if (state == NetworkManager.ActiveConnectionState.ACTIVATING)
return 'network-cellular-acquiring-symbolic';
else if (state == NetworkManager.ActiveConnectionState.ACTIVATED)
return 'network-cellular-connected-symbolic';
else
if (this._device.active_connection) {
let state = this._device.active_connection.state;
if (state == NetworkManager.ActiveConnectionState.ACTIVATING)
return 'network-cellular-acquiring-symbolic';
else if (state == NetworkManager.ActiveConnectionState.ACTIVATED)
return 'network-cellular-connected-symbolic';
else
return 'network-cellular-signal-none-symbolic';
} else {
return 'network-cellular-signal-none-symbolic';
}
}
});
@ -645,16 +674,26 @@ const NMWirelessDialog = new Lang.Class({
Name: 'NMWirelessDialog',
Extends: ModalDialog.ModalDialog,
_init: function(client, device) {
_init: function(client, device, settings) {
this.parent({ styleClass: 'nm-dialog' });
this._client = client;
this._device = device;
this._wirelessEnabledChangedId = this._client.connect('notify::wireless-enabled',
Lang.bind(this, this._syncView));
this._rfkill = Rfkill.getRfkillManager();
this._airplaneModeChangedId = this._rfkill.connect('airplane-mode-changed',
Lang.bind(this, this._syncView));
this._networks = [];
this._buildLayout();
this._connections = device.get_available_connections();
let connections = settings.list_connections();
this._connections = connections.filter(Lang.bind(this, function(connection) {
return device.connection_valid(connection);
}));
this._apAddedId = device.connect('access-point-added', Lang.bind(this, this._accessPointAdded));
this._apRemovedId = device.connect('access-point-removed', Lang.bind(this, this._accessPointRemoved));
@ -669,6 +708,12 @@ const NMWirelessDialog = new Lang.Class({
this._selectedNetwork = null;
this._activeApChanged();
this._updateSensitivity();
this._syncView();
if (accessPoints.length == 0) {
/* If there are no visible access points, request a scan */
this._device.request_scan_simple(null);
}
},
destroy: function() {
@ -684,6 +729,14 @@ const NMWirelessDialog = new Lang.Class({
GObject.Object.prototype.disconnect.call(this._device, this._activeApChangedId);
this._activeApChangedId = 0;
}
if (this._wirelessEnabledChangedId) {
this._client.disconnect(this._wirelessEnabledChangedId);
this._wirelessEnabledChangedId = 0;
}
if (this._airplaneModeChangedId) {
this._rfkill.disconnect(this._airplaneModeChangedId);
this._airplaneModeChangedId = 0;
}
this.parent();
},
@ -705,13 +758,44 @@ const NMWirelessDialog = new Lang.Class({
},
_updateSensitivity: function() {
let connectSensitive = this._selectedNetwork && (this._selectedNetwork != this._activeNetwork);
let connectSensitive = this._client.wireless_enabled && this._selectedNetwork && (this._selectedNetwork != this._activeNetwork);
this._connectButton.reactive = connectSensitive;
this._connectButton.can_focus = connectSensitive;
},
_updateVisibility: function() {
this._noNetworksLabel.visible = (this._networks.length == 0);
_syncView: function() {
if (this._rfkill.airplaneMode) {
this._airplaneBox.show();
this._airplaneIcon.icon_name = 'airplane-mode-symbolic';
this._airplaneHeadline.text = _("Airplane Mode is On");
this._airplaneText.text = _("Wi-Fi is disabled when airplane mode is on.");
this._airplaneButton.label = _("Turn Off Airplane Mode");
this._airplaneButton.visible = !this._rfkill.hwAirplaneMode;
this._airplaneInactive.visible = this._rfkill.hwAirplaneMode;
this._noNetworksBox.hide();
} else if (!this._client.wireless_enabled) {
this._airplaneBox.show();
this._airplaneIcon.icon_name = 'dialog-information-symbolic';
this._airplaneHeadline.text = _("Wi-Fi is Off");
this._airplaneText.text = _("Wi-Fi needs to be turned on in order to connect to a network.");
this._airplaneButton.label = _("Turn On Wi-Fi");
this._airplaneButton.show();
this._airplaneInactive.hide();
this._noNetworksBox.hide();
} else {
this._airplaneBox.hide();
this._noNetworksBox.visible = (this._networks.length == 0);
}
if (this._noNetworksBox.visible)
this._noNetworksSpinner.play();
else
this._noNetworksSpinner.stop();
},
_buildLayout: function() {
@ -745,11 +829,43 @@ const NMWirelessDialog = new Lang.Class({
this._scrollView.add_actor(this._itemBox);
this._stack.add_child(this._scrollView);
this._noNetworksLabel = new St.Label({ style_class: 'no-networks-label',
this._noNetworksBox = new St.BoxLayout({ vertical: true,
style_class: 'no-networks-box',
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER });
this._noNetworksSpinner = new Animation.AnimatedIcon(global.datadir + '/theme/process-working.svg', 24, 24);
this._noNetworksBox.add_actor(this._noNetworksSpinner.actor);
this._noNetworksBox.add_actor(new St.Label({ style_class: 'no-networks-label',
text: _("No Networks") }));
this._stack.add_child(this._noNetworksBox);
this._airplaneBox = new St.BoxLayout({ vertical: true,
style_class: 'nm-dialog-airplane-box',
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
text: _("No Networks") });
this._stack.add_child(this._noNetworksLabel);
y_align: Clutter.ActorAlign.CENTER });
this._airplaneIcon = new St.Icon({ icon_size: 48 });
this._airplaneHeadline = new St.Label({ style_class: 'nm-dialog-airplane-headline' });
this._airplaneText = new St.Label({ style_class: 'nm-dialog-airplane-text' });
let airplaneSubStack = new St.Widget({ layout_manager: new Clutter.BinLayout });
this._airplaneButton = new St.Button({ style_class: 'modal-dialog-button' });
this._airplaneButton.connect('clicked', Lang.bind(this, function() {
if (this._rfkill.airplaneMode)
this._rfkill.airplaneMode = false;
else
this._client.wireless_enabled = true;
}));
airplaneSubStack.add_actor(this._airplaneButton);
this._airplaneInactive = new St.Label({ style_class: 'nm-dialog-airplane-text',
text: _("Use hardware switch to turn off") });
airplaneSubStack.add_actor(this._airplaneInactive);
this._airplaneBox.add(this._airplaneIcon, { x_align: St.Align.MIDDLE });
this._airplaneBox.add(this._airplaneHeadline, { x_align: St.Align.MIDDLE });
this._airplaneBox.add(this._airplaneText, { x_align: St.Align.MIDDLE });
this._airplaneBox.add(airplaneSubStack, { x_align: St.Align.MIDDLE });
this._stack.add_child(this._airplaneBox);
this.contentLayout.add(this._stack, { expand: true });
@ -942,7 +1058,7 @@ const NMWirelessDialog = new Lang.Class({
this._itemBox.insert_child_at_index(network.item.actor, newPos);
}
this._updateVisibility();
this._syncView();
},
_accessPointRemoved: function(device, accessPoint) {
@ -957,14 +1073,14 @@ const NMWirelessDialog = new Lang.Class({
network.accessPoints.splice(res.ap, 1);
if (network.accessPoints.length == 0) {
network.item.destroy();
network.item.actor.destroy();
this._networks.splice(res.network, 1);
} else {
network.item.updateBestAP(network.accessPoints[0]);
this._resortItems();
}
this._updateVisibility();
this._syncView();
},
_resortItems: function() {
@ -1004,9 +1120,10 @@ const NMDeviceWireless = new Lang.Class({
Name: 'NMDeviceWireless',
category: NMConnectionCategory.WIRELESS,
_init: function(client, device) {
_init: function(client, device, settings) {
this._client = client;
this._device = device;
this._settings = settings;
this._description = '';
@ -1074,7 +1191,7 @@ const NMDeviceWireless = new Lang.Class({
},
_showDialog: function() {
this._dialog = new NMWirelessDialog(this._client, this._device);
this._dialog = new NMWirelessDialog(this._client, this._device, this._settings);
this._dialog.connect('closed', Lang.bind(this, this._dialogClosed));
this._dialog.open();
},
@ -1121,7 +1238,12 @@ const NMDeviceWireless = new Lang.Class({
_getStatus: function() {
let ap = this._device.active_access_point;
if (ap)
if (this._isHotSpotMaster())
return _("Hotspot Active");
else if (this._device.state >= NetworkManager.DeviceState.PREPARE &&
this._device.state < NetworkManager.DeviceState.ACTIVATED)
return _("Connecting");
else if (ap)
return ssidToLabel(ap.get_ssid());
else if (!this._client.wireless_hardware_enabled)
return _("Hardware Disabled");
@ -1140,20 +1262,52 @@ const NMDeviceWireless = new Lang.Class({
return 'network-wireless-signal-none-symbolic';
},
_canReachInternet: function() {
if (this._client.primary_connection != this._device.active_connection)
return true;
return this._client.connectivity == NetworkManager.ConnectivityState.FULL;
},
_isHotSpotMaster: function() {
if (!this._device.active_connection)
return false;
let connection = this._settings.get_connection_by_path(this._device.active_connection.connection);
if (!connection)
return false;
let ip4config = connection.get_setting_ip4_config();
if (!ip4config)
return false;
return ip4config.get_method() == NetworkManager.SETTING_IP4_CONFIG_METHOD_SHARED;
},
getIndicatorIcon: function() {
if (this._device.state >= NetworkManager.DeviceState.PREPARE &&
this._device.state < NetworkManager.DeviceState.ACTIVATED)
if (this._device.state < NetworkManager.DeviceState.PREPARE)
return 'network-wireless-disconnected-symbolic';
if (this._device.state < NetworkManager.DeviceState.ACTIVATED)
return 'network-wireless-acquiring-symbolic';
if (this._isHotSpotMaster())
return 'network-wireless-hotspot-symbolic';
let ap = this._device.active_access_point;
if (!ap) {
if (this._device.mode != NM80211Mode.ADHOC)
log('An active wireless connection, in infrastructure mode, involves no access point?');
return 'network-wireless-connected-symbolic';
if (this._canReachInternet())
return 'network-wireless-connected-symbolic';
else
return 'network-wireless-no-route-symbolic';
}
return 'network-wireless-signal-' + signalToIcon(ap.strength) + '-symbolic';
if (this._canReachInternet())
return 'network-wireless-signal-' + signalToIcon(ap.strength) + '-symbolic';
else
return 'network-wireless-no-route-symbolic';
},
});
Signals.addSignalMethods(NMDeviceWireless.prototype);
@ -1169,6 +1323,22 @@ const NMVPNConnectionItem = new Lang.Class({
return this._activeConnection.vpn_state != NetworkManager.VPNConnectionState.DISCONNECTED;
},
_buildUI: function() {
this.labelItem = new PopupMenu.PopupMenuItem('');
this.labelItem.connect('activate', Lang.bind(this, this._toggle));
this.radioItem = new PopupMenu.PopupSwitchMenuItem(this._connection.get_id(), false);
this.radioItem.connect('toggled', Lang.bind(this, this._toggle));
},
_sync: function() {
let isActive = this.isActive();
this.labelItem.label.text = isActive ? _("Turn Off") : this._section.getConnectLabel();
this.radioItem.setToggleState(isActive);
this.radioItem.setStatus(this._getStatus());
this.emit('icon-changed');
},
_getStatus: function() {
if (this._activeConnection == null)
return null;
@ -1238,19 +1408,53 @@ const NMVPNSection = new Lang.Class({
_init: function(client) {
this.parent(client);
this._vpnSettings = new PopupMenu.PopupMenuItem('');
this.item.menu.addMenuItem(this._vpnSettings);
this._vpnSettings.connect('activate', Lang.bind(this, this._onSettingsActivate));
this._sync();
},
_sync: function() {
let nItems = this._connectionItems.size;
this.item.actor.visible = (nItems > 0);
if (nItems > 1)
this._vpnSettings.label.text = _("Network Settings");
else
this._vpnSettings.label.text = _("VPN Settings");
this.parent();
},
_onSettingsActivate: function() {
let nItems = this._connectionItems.size;
if (nItems > 1) {
let appSys = Shell.AppSystem.get_default();
let app = appSys.lookup_app('gnome-network-panel.desktop');
app.launch(0, -1);
} else {
let connection = this._connections[0];
Util.spawnApp(['gnome-control-center', 'network', 'show-device',
connection.get_path()]);
}
},
_getDescription: function() {
return _("VPN");
},
_getStatus: function() {
let values = this._connectionItems.values();
for (let item of values) {
if (item.isActive())
return item.getName();
}
return _("Off");
},
_getMenuIcon: function() {
return this.getIndicatorIcon() || 'network-vpn-symbolic';
},
@ -1629,7 +1833,6 @@ const NMApplet = new Lang.Class({
let connectionSettings = connection.get_setting_by_name(NetworkManager.SETTING_CONNECTION_SETTING_NAME);
connection._type = connectionSettings.type;
connection._section = this._ctypes[connection._type] || NMConnectionCategory.INVALID;
connection._timestamp = connectionSettings.timestamp;
let section = connection._section;

View File

@ -2,6 +2,7 @@
const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Signals = imports.signals;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
@ -12,11 +13,55 @@ const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill';
const RfkillManagerInterface = '<node> \
<interface name="org.gnome.SettingsDaemon.Rfkill"> \
<property name="AirplaneMode" type="b" access="readwrite" /> \
<property name="HardwareAirplaneMode" type="b" access="read" /> \
</interface> \
</node>';
const RfkillManagerProxy = Gio.DBusProxy.makeProxyWrapper(RfkillManagerInterface);
const RfkillManager = new Lang.Class({
Name: 'RfkillManager',
_init: function() {
this._proxy = new RfkillManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH,
Lang.bind(this, function(proxy, error) {
if (error) {
log(error.message);
return;
}
this._proxy.connect('g-properties-changed',
Lang.bind(this, this._changed));
this._changed();
}));
},
get airplaneMode() {
return this._proxy.AirplaneMode;
},
set airplaneMode(v) {
this._proxy.AirplaneMode = v;
},
get hwAirplaneMode() {
return this._proxy.HardwareAirplaneMode;
},
_changed: function() {
this.emit('airplane-mode-changed');
}
});
Signals.addSignalMethods(RfkillManager.prototype);
var _manager;
function getRfkillManager() {
if (_manager != null)
return _manager;
_manager = new RfkillManager();
return _manager;
}
const Indicator = new Lang.Class({
Name: 'RfkillIndicator',
Extends: PanelMenu.SystemIndicator,
@ -24,16 +69,8 @@ const Indicator = new Lang.Class({
_init: function() {
this.parent();
this._proxy = new RfkillManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH,
Lang.bind(this, function(proxy, error) {
if (error) {
log(error.message);
return;
}
this._proxy.connect('g-properties-changed',
Lang.bind(this, this._sync));
this._sync();
}));
this._manager = getRfkillManager();
this._manager.connect('airplane-mode-changed', Lang.bind(this, this._sync));
this._indicator = this._addIndicator();
this._indicator.icon_name = 'airplane-mode-symbolic';
@ -45,7 +82,7 @@ const Indicator = new Lang.Class({
this._item = new PopupMenu.PopupSubMenuMenuItem(_("Airplane Mode"), true);
this._item.icon.icon_name = 'airplane-mode-symbolic';
this._item.status.text = _("On");
this._item.menu.addAction(_("Turn Off"), Lang.bind(this, function() {
this._offItem = this._item.menu.addAction(_("Turn Off"), Lang.bind(this, function() {
this._proxy.AirplaneMode = false;
}));
this._item.menu.addSettingsAction(_("Network Settings"), 'gnome-network-panel.desktop');
@ -53,8 +90,18 @@ const Indicator = new Lang.Class({
},
_sync: function() {
let airplaneMode = this._proxy.AirplaneMode;
let airplaneMode = this._manager.airplaneMode;
let hwAirplaneMode = this._manager.hwAirplaneMode;
let changed = (airplaneMode != this._indicator.visible) ||
(hwAirplaneMode != this._offItem.actor.visible);
this._indicator.visible = airplaneMode;
this._item.actor.visible = airplaneMode;
this._offItem.setSensitive(!hwAirplaneMode);
if (hwAirplaneMode)
this._offItem.label.text = _("Use hardware switch to turn off");
else
this._offItem.label.text = _("Turn Off");
},
});

View File

@ -187,7 +187,6 @@ const ViewSelector = new Lang.Class({
params = Params.parse(params, { a11yFocus: null });
let page = new St.Bin({ child: actor,
visible: false,
x_align: St.Align.START,
y_align: St.Align.START,
x_fill: true,
@ -212,7 +211,7 @@ const ViewSelector = new Lang.Class({
oldPage.hide();
this.emit('page-empty');
this._activePage.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
this._activePage.show();
Tweener.addTween(this._activePage,
{ opacity: 255,
@ -283,6 +282,14 @@ const ViewSelector = new Lang.Class({
return Clutter.EVENT_STOP;
} else if (this._shouldTriggerSearch(symbol)) {
this.startSearch(event);
} else if (!this._searchActive) {
if (symbol == Clutter.Tab || symbol == Clutter.Down) {
this._activePage.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
return true;
} else if (symbol == Clutter.ISO_Left_Tab) {
this._activePage.navigate_focus(null, Gtk.DirectionType.TAB_BACKWARD, false);
return true;
}
}
return Clutter.EVENT_PROPAGATE;
},

View File

@ -191,6 +191,7 @@ const WorkspaceTracker = new Lang.Class({
tracker.connect('startup-sequence-changed', Lang.bind(this, this._queueCheckWorkspaces));
global.screen.connect('notify::n-workspaces', Lang.bind(this, this._nWorkspacesChanged));
global.window_manager.connect('switch-workspace', Lang.bind(this, this._queueCheckWorkspaces));
global.screen.connect('window-entered-monitor', Lang.bind(this, this._windowEnteredMonitor));
global.screen.connect('window-left-monitor', Lang.bind(this, this._windowLeftMonitor));
@ -249,13 +250,7 @@ const WorkspaceTracker = new Lang.Class({
}
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
let removingCurrentWorkspace = (emptyWorkspaces[activeWorkspaceIndex] &&
activeWorkspaceIndex < emptyWorkspaces.length - 1);
if (removingCurrentWorkspace) {
// "Merge" the empty workspace we are removing with the one at the end
this._wm.blockAnimations();
}
emptyWorkspaces[activeWorkspaceIndex] = false;
// Delete other empty workspaces; do it from the end to avoid index changes
for (i = emptyWorkspaces.length - 2; i >= 0; i--) {
@ -263,11 +258,6 @@ const WorkspaceTracker = new Lang.Class({
global.screen.remove_workspace(this._workspaces[i], global.get_current_time());
}
if (removingCurrentWorkspace) {
global.screen.get_workspace_by_index(global.screen.n_workspaces - 1).activate(global.get_current_time());
this._wm.unblockAnimations();
}
this._checkWorkspacesId = 0;
return false;
},
@ -368,6 +358,93 @@ const WorkspaceTracker = new Lang.Class({
}
});
const TilePreview = new Lang.Class({
Name: 'TilePreview',
_init: function() {
this.actor = new St.Widget();
global.window_group.add_actor(this.actor);
this._reset();
this._showing = false;
},
show: function(window, tileRect, monitorIndex) {
let windowActor = window.get_compositor_private();
if (!windowActor)
return;
global.window_group.set_child_below_sibling(this.actor, windowActor);
if (this._rect && this._rect.equal(tileRect))
return;
let changeMonitor = (this._monitorIndex == -1 ||
this._monitorIndex != monitorIndex);
this._monitorIndex = monitorIndex;
this._rect = tileRect;
let monitor = Main.layoutManager.monitors[monitorIndex];
this._updateStyle(monitor);
if (!this._showing || changeMonitor) {
let monitorRect = new Meta.Rectangle({ x: monitor.x,
y: monitor.y,
width: monitor.width,
height: monitor.height });
let [, rect] = window.get_outer_rect().intersect(monitorRect);
this.actor.set_size(rect.width, rect.height);
this.actor.set_position(rect.x, rect.y);
this.actor.opacity = 0;
}
this._showing = true;
this.actor.show();
Tweener.addTween(this.actor,
{ x: tileRect.x,
y: tileRect.y,
width: tileRect.width,
height: tileRect.height,
opacity: 255,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad'
});
},
hide: function() {
if (!this._showing)
return;
this._showing = false;
Tweener.addTween(this.actor,
{ opacity: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: Lang.bind(this, this._reset)
});
},
_reset: function() {
this.actor.hide();
this._rect = null;
this._monitorIndex = -1;
},
_updateStyle: function(monitor) {
let styles = ['tile-preview'];
if (this._monitorIndex == Main.layoutManager.primaryIndex)
styles.push('on-primary');
if (this._rect.x == monitor.x)
styles.push('tile-preview-left');
if (this._rect.x + this._rect.width == monitor.x + monitor.width)
styles.push('tile-preview-right');
this.actor.style_class = styles.join(' ');
}
});
const WindowManager = new Lang.Class({
Name: 'WindowManager',
@ -398,6 +475,8 @@ const WindowManager = new Lang.Class({
}));
this._shellwm.connect('switch-workspace', Lang.bind(this, this._switchWorkspace));
this._shellwm.connect('show-tile-preview', Lang.bind(this, this._showTilePreview));
this._shellwm.connect('hide-tile-preview', Lang.bind(this, this._hideTilePreview));
this._shellwm.connect('minimize', Lang.bind(this, this._minimizeWindow));
this._shellwm.connect('maximize', Lang.bind(this, this._maximizeWindow));
this._shellwm.connect('unmaximize', Lang.bind(this, this._unmaximizeWindow));
@ -407,6 +486,8 @@ const WindowManager = new Lang.Class({
this._shellwm.connect('confirm-display-change', Lang.bind(this, this._confirmDisplayChange));
this._workspaceSwitcherPopup = null;
this._tilePreview = null;
this.setCustomKeybindingHandler('switch-to-workspace-left',
Shell.KeyBindingMode.NORMAL |
Shell.KeyBindingMode.OVERVIEW,
@ -1056,6 +1137,18 @@ const WindowManager = new Lang.Class({
shellwm.completed_switch_workspace();
},
_showTilePreview: function(shellwm, window, tileRect, monitorIndex) {
if (!this._tilePreview)
this._tilePreview = new TilePreview();
this._tilePreview.show(window, tileRect, monitorIndex);
},
_hideTilePreview: function(shellwm) {
if (!this._tilePreview)
return;
this._tilePreview.hide();
},
_startAppSwitcher : function(display, screen, window, binding) {
/* prevent a corner case where both popups show up at once */
if (this._workspaceSwitcherPopup != null)

View File

@ -131,7 +131,7 @@ const WindowClone = new Lang.Class({
this._dragSlot = [0, 0, 0, 0];
this._stackAbove = null;
this._windowClone._updateId = this.realWindow.connect('size-changed',
this._windowClone._updateId = this.metaWindow.connect('size-changed',
Lang.bind(this, this._onRealWindowSizeChanged));
this._windowClone._destroyId = this.realWindow.connect('destroy', Lang.bind(this, function() {
// First destroy the clone and then destroy everything
@ -199,7 +199,7 @@ const WindowClone = new Lang.Class({
_doAddAttachedDialog: function(metaWin, realWin) {
let clone = new Clutter.Clone({ source: realWin });
clone._updateId = realWin.connect('size-changed', Lang.bind(this, function() {
clone._updateId = metaWin.connect('size-changed', Lang.bind(this, function() {
this._computeBoundingBox();
this.emit('size-changed');
}));
@ -295,7 +295,7 @@ const WindowClone = new Lang.Class({
else
realWindow = child.source;
realWindow.disconnect(child._updateId);
realWindow.meta_window.disconnect(child._updateId);
realWindow.disconnect(child._destroyId);
}));
},

View File

@ -68,7 +68,7 @@ const WindowClone = new Lang.Class({
this.realWindow = realWindow;
this.metaWindow = realWindow.meta_window;
this.clone._updateId = this.realWindow.connect('position-changed',
this.clone._updateId = this.metaWindow.connect('position-changed',
Lang.bind(this, this._onPositionChanged));
this.clone._destroyId = this.realWindow.connect('destroy', Lang.bind(this, function() {
// First destroy the clone and then destroy everything
@ -151,7 +151,7 @@ const WindowClone = new Lang.Class({
let clone = new Clutter.Clone({ source: realDialog });
this._updateDialogPosition(realDialog, clone);
clone._updateId = realDialog.connect('position-changed',
clone._updateId = metaDialog.connect('position-changed',
Lang.bind(this, this._updateDialogPosition, clone));
clone._destroyId = realDialog.connect('destroy', Lang.bind(this, function() {
clone.destroy();
@ -176,7 +176,7 @@ const WindowClone = new Lang.Class({
this.actor.get_children().forEach(function(child) {
let realWindow = child.source;
realWindow.disconnect(child._updateId);
realWindow.meta_window.disconnect(child._updateId);
realWindow.disconnect(child._destroyId);
});
},
@ -804,22 +804,25 @@ const ThumbnailsBox = new Lang.Class({
[newWorkspaceIndex, this._dropPlaceholderPos] = [this._dropPlaceholderPos, -1];
// Nab all the windows below us.
let windows = global.get_window_actors().filter(function(win) {
let windows = global.get_window_actors().filter(function(winActor) {
// If the window is attached to an ancestor, we don't need/want to move it
if (!!win.meta_window.get_transient_for())
let window = winActor.meta_window;
if (window.get_transient_for() != null)
return false;
if (isWindow)
return win.get_workspace() >= newWorkspaceIndex && win != source;
return window.get_workspace().index() >= newWorkspaceIndex && winActor != source;
else
return win.get_workspace() >= newWorkspaceIndex;
return window.get_workspace().index() >= newWorkspaceIndex;
});
this._spliceIndex = newWorkspaceIndex;
// ... move them down one.
windows.forEach(function(win) {
win.meta_window.change_workspace_by_index(win.get_workspace() + 1, true);
windows.forEach(function(winActor) {
let window = winActor.meta_window;
window.change_workspace_by_index(window.get_workspace().index() + 1, true);
});
if (isWindow)

View File

@ -45,6 +45,7 @@ js/ui/status/accessibility.js
js/ui/status/bluetooth.js
js/ui/status/brightness.js
js/ui/status/keyboard.js
js/ui/status/location.js
js/ui/status/network.js
js/ui/status/power.js
js/ui/status/rfkill.js

117
po/an.po
View File

@ -9,8 +9,8 @@ msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2014-01-29 20:43+0000\n"
"PO-Revision-Date: 2014-01-30 19:56+0100\n"
"POT-Creation-Date: 2014-02-08 10:22+0000\n"
"PO-Revision-Date: 2014-02-08 19:31+0100\n"
"Last-Translator: Jorge Pérez Pérez <jorgtum@gmail.com>\n"
"Language-Team: Aragonese <softaragones@googlegroups.com>\n"
"Language: an\n"
@ -280,7 +280,7 @@ msgstr ""
#: ../js/gdm/authPrompt.js:147 ../js/ui/components/networkAgent.js:136
#: ../js/ui/components/polkitAgent.js:166 ../js/ui/endSessionDialog.js:357
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:399
#: ../js/ui/status/network.js:757
#: ../js/ui/status/network.js:857
msgid "Cancel"
msgstr "Cancelar"
@ -574,8 +574,8 @@ msgstr "Clau de paso:"
msgid "Type again:"
msgstr "Escriba atra vegada:"
#: ../js/ui/components/networkAgent.js:131 ../js/ui/status/network.js:132
#: ../js/ui/status/network.js:294 ../js/ui/status/network.js:760
#: ../js/ui/components/networkAgent.js:131 ../js/ui/status/network.js:227
#: ../js/ui/status/network.js:300 ../js/ui/status/network.js:860
msgid "Connect"
msgstr "Connectar"
@ -1077,7 +1077,7 @@ msgstr "Activau"
#. because it's disabled by rfkill (airplane mode) */
#. translators:
#. * The device has been disabled
#: ../js/ui/lookingGlass.js:717 ../js/ui/status/network.js:518
#: ../js/ui/lookingGlass.js:717 ../js/ui/status/network.js:523
#: ../src/gvc/gvc-mixer-control.c:1830
msgid "Disabled"
msgstr "Desactivau"
@ -1297,26 +1297,31 @@ msgstr "Contraste alto"
msgid "Large Text"
msgstr "Texto gran"
#: ../js/ui/status/bluetooth.js:45
#: ../js/ui/status/bluetooth.js:48
msgid "Bluetooth"
msgstr "Bluetooth"
#: ../js/ui/status/bluetooth.js:47 ../js/ui/status/network.js:132
#: ../js/ui/status/network.js:1108 ../js/ui/status/rfkill.js:48
#: ../js/ui/status/bluetooth.js:50 ../js/ui/status/network.js:134
#: ../js/ui/status/network.js:1209 ../js/ui/status/rfkill.js:85
#: ../js/ui/status/rfkill.js:105
msgid "Turn Off"
msgstr "Desenchegar"
#: ../js/ui/status/bluetooth.js:50
#: ../js/ui/status/bluetooth.js:53
msgid "Bluetooth Settings"
msgstr "Cofiguracion de Bluetooth"
#: ../js/ui/status/bluetooth.js:98
#: ../js/ui/status/bluetooth.js:100
#, javascript-format
msgid "%d Connected Device"
msgid_plural "%d Connected Devices"
msgstr[0] "%d dispositivo connectau"
msgstr[1] "%d dispositivos connectaus"
#: ../js/ui/status/bluetooth.js:102 ../js/ui/status/network.js:1232
msgid "Not Connected"
msgstr "No connectau"
#: ../js/ui/status/brightness.js:44
msgid "Brightness"
msgstr "Brilo"
@ -1325,103 +1330,133 @@ msgstr "Brilo"
msgid "Show Keyboard Layout"
msgstr "Amostrar a distribución d'o teclau"
#: ../js/ui/status/network.js:71
#: ../js/ui/status/network.js:73
msgid "<unknown>"
msgstr "<desconoxiu>"
#: ../js/ui/status/network.js:221 ../js/ui/status/network.js:383
#: ../js/ui/status/network.js:1129
#: ../js/ui/status/network.js:223 ../js/ui/status/network.js:389
#: ../js/ui/status/network.js:1230
msgid "Off"
msgstr "DESENCHEGAU"
#. Translators: this is for network devices that are physically present but are not
#. under NetworkManager's control (and thus cannot be used in the menu) */
#: ../js/ui/status/network.js:389
#: ../js/ui/status/network.js:395
msgid "unmanaged"
msgstr "no chestionada"
#: ../js/ui/status/network.js:391
#: ../js/ui/status/network.js:397
msgid "disconnecting..."
msgstr "deconectando…"
#: ../js/ui/status/network.js:397 ../js/ui/status/network.js:1183
#: ../js/ui/status/network.js:403 ../js/ui/status/network.js:1284
msgid "connecting..."
msgstr "conectando…"
#. Translators: this is for network connections that require some kind of key or password */
#: ../js/ui/status/network.js:400 ../js/ui/status/network.js:1186
#: ../js/ui/status/network.js:406 ../js/ui/status/network.js:1287
msgid "authentication required"
msgstr "s'amenista autenticacion"
#. Translators: this is for devices that require some kind of firmware or kernel
#. module, which is missing */
#: ../js/ui/status/network.js:408
#: ../js/ui/status/network.js:414
msgid "firmware missing"
msgstr "falta o \"firmware\""
#. Translators: this is for a network device that cannot be activated (for example it
#. is disabled by rfkill, or it has no coverage */
#: ../js/ui/status/network.js:412
#: ../js/ui/status/network.js:418
msgid "unavailable"
msgstr "no disponible"
#: ../js/ui/status/network.js:414 ../js/ui/status/network.js:1188
#: ../js/ui/status/network.js:420 ../js/ui/status/network.js:1289
msgid "connection failed"
msgstr "falló a connexión"
#: ../js/ui/status/network.js:430
#: ../js/ui/status/network.js:436
msgid "Wired Settings"
msgstr "Opcions inalambricas"
#: ../js/ui/status/network.js:472 ../js/ui/status/network.js:558
#: ../js/ui/status/network.js:477 ../js/ui/status/network.js:563
msgid "Mobile Broadband Settings"
msgstr "Opcions de Banda ampla mobil"
#: ../js/ui/status/network.js:514 ../js/ui/status/network.js:1127
#: ../js/ui/status/network.js:519 ../js/ui/status/network.js:1228
msgid "Hardware Disabled"
msgstr "Hardware desactivau"
#: ../js/ui/status/network.js:725
#: ../js/ui/status/network.js:578
msgid "Use as Internet connection"
msgstr "Fer servir como una connexión a internet"
#: ../js/ui/status/network.js:755
msgid "Airplane Mode is On"
msgstr "O modo avión ye enchegau"
#: ../js/ui/status/network.js:756
msgid "Wi-Fi is disabled when airplane mode is on."
msgstr "O wi-Fi ye desactivau quan o modo avión ye enchegau."
#: ../js/ui/status/network.js:757
msgid "Turn Off Airplane Mode"
msgstr "Desenchegar o modo avión"
#: ../js/ui/status/network.js:766
msgid "Wi-Fi is Off"
msgstr "O wi-fi ye desenchegau"
#: ../js/ui/status/network.js:767
msgid "Wi-Fi needs to be turned on in order to connect to a network."
msgstr "O wi-Fi ameniste estar enchegau ta connectar-se a un ret."
#: ../js/ui/status/network.js:768
#, fuzzy
#| msgid "Turn On"
msgid "Turn On Wi-Fi"
msgstr "Enchegar"
#: ../js/ui/status/network.js:793
msgid "Wi-Fi Networks"
msgstr "Retz inalambricos"
#: ../js/ui/status/network.js:727
#: ../js/ui/status/network.js:795
msgid "Select a network"
msgstr "Selecciona un ret"
#: ../js/ui/status/network.js:751
#: ../js/ui/status/network.js:824
msgid "No Networks"
msgstr "No bi ha retz"
#: ../js/ui/status/network.js:1014
#: ../js/ui/status/network.js:845 ../js/ui/status/rfkill.js:103
msgid "Use hardware switch to turn off"
msgstr "Fer servir o selector de hardware ta desenchegar-lo"
#: ../js/ui/status/network.js:1115
msgid "Select Network"
msgstr "Selecciona o ret"
#: ../js/ui/status/network.js:1020
#: ../js/ui/status/network.js:1121
msgid "Wi-Fi Settings"
msgstr "Opcions inalambricas"
#: ../js/ui/status/network.js:1108
#: ../js/ui/status/network.js:1209
msgid "Turn On"
msgstr "Enchegar"
#: ../js/ui/status/network.js:1131
msgid "Not Connected"
msgstr "No connectau"
#: ../js/ui/status/network.js:1251
#: ../js/ui/status/network.js:1352
msgid "VPN"
msgstr "VPN"
#: ../js/ui/status/network.js:1394
#: ../js/ui/status/network.js:1495
msgid "Network Manager"
msgstr "Chestor d'o rete"
#: ../js/ui/status/network.js:1433
#: ../js/ui/status/network.js:1534
msgid "Connection failed"
msgstr "Falló a connexión"
#: ../js/ui/status/network.js:1434
#: ../js/ui/status/network.js:1535
msgid "Activation of network connection failed"
msgstr "Falló l'activación d'a connexión de ret"
@ -1455,15 +1490,15 @@ msgstr "SAI"
msgid "Battery"
msgstr "Batería"
#: ../js/ui/status/rfkill.js:45
#: ../js/ui/status/rfkill.js:82
msgid "Airplane Mode"
msgstr "Modo avión"
#: ../js/ui/status/rfkill.js:47
#: ../js/ui/status/rfkill.js:84
msgid "On"
msgstr "Enchegau"
#: ../js/ui/status/rfkill.js:51
#: ../js/ui/status/rfkill.js:88
msgid "Network Settings"
msgstr "Configuracion d'o rete"

709
po/ar.po

File diff suppressed because it is too large Load Diff

283
po/as.po
View File

@ -9,8 +9,8 @@ msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2014-01-17 21:35+0000\n"
"PO-Revision-Date: 2014-01-23 19:06+0630\n"
"POT-Creation-Date: 2014-02-11 08:31+0000\n"
"PO-Revision-Date: 2014-02-11 18:44+0630\n"
"Last-Translator: Nilamdyuti Goswami <ngoswami@redhat.com>\n"
"Language-Team: Assamese <kde-i18n-doc@kde.org>\n"
"Language: as_IN\n"
@ -83,16 +83,10 @@ msgstr ""
"দিয়ে।"
#: ../data/org.gnome.shell.gschema.xml.in.in.h:3
#| msgid "Uuids of extensions to enable"
msgid "UUIDs of extensions to enable"
msgstr "সামৰ্থবান কৰিব লগিয়া সম্প্ৰসাৰণসমূহৰ UUIDs"
#: ../data/org.gnome.shell.gschema.xml.in.in.h:4
#| msgid ""
#| "GNOME Shell extensions have a uuid property; this key lists extensions "
#| "which should be loaded. Any extension that wants to be loaded needs to be "
#| "in this list. You can also manipulate this list with the EnableExtension "
#| "and DisableExtension DBus methods on org.gnome.Shell."
msgid ""
"GNOME Shell extensions have a UUID property; this key lists extensions which "
"should be loaded. Any extension that wants to be loaded needs to be in this "
@ -126,20 +120,17 @@ msgid "History for the looking glass dialog"
msgstr "চোৱা কাঁচ ডাইলগৰ কাৰণে ইতিহাস"
#: ../data/org.gnome.shell.gschema.xml.in.in.h:9
#| msgid "Always show the 'Log out' menuitem in the user menu."
msgid "Always show the 'Log out' menu item in the user menu."
msgstr "ব্যৱহাৰকাৰী মেনুত 'লগ আউট' মেনু আইটেম সদায় দেখুৱাব।"
#: ../data/org.gnome.shell.gschema.xml.in.in.h:10
#| msgid ""
#| "This key overrides the automatic hiding of the 'Log out' menuitem in "
#| "single-user, single-session situations."
msgid ""
"This key overrides the automatic hiding of the 'Log out' menu item in single-"
"user, single-session situations."
msgstr ""
"এই কি'য়ে এটা-ব্যৱহাৰকাৰী, এটা-অধিবেশন অৱস্থাবোৰত 'লগ আউট' মেনুআইটেম "
"স্বচালিতভাৱে লুকুৱা অভাৰৰাইড কৰে।"
"স্বচালিতভাৱে "
"লুকুৱা অভাৰৰাইড কৰে।"
#: ../data/org.gnome.shell.gschema.xml.in.in.h:11
msgid ""
@ -289,7 +280,7 @@ msgstr "উপৰত দিয়া কম্বোবাকচ ব্যৱহা
#: ../js/gdm/authPrompt.js:147 ../js/ui/components/networkAgent.js:136
#: ../js/ui/components/polkitAgent.js:166 ../js/ui/endSessionDialog.js:357
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:399
#: ../js/ui/status/network.js:724
#: ../js/ui/status/network.js:857
msgid "Cancel"
msgstr "বাতিল কৰক"
@ -347,31 +338,30 @@ msgstr "কমান্ড বিশ্লেষন কৰিব নোৱাৰ
#: ../js/misc/util.js:156
#, javascript-format
#| msgid "Execution of '%s' failed:"
msgid "Execution of “%s” failed:"
msgstr "“%s” ৰ প্ৰেৰণ ব্যৰ্থ হল:"
#: ../js/ui/appDisplay.js:540
#: ../js/ui/appDisplay.js:633
msgid "Frequently used applications will appear here"
msgstr "সঘনে ব্যৱহাৰ কৰা এপ্লিকেচনসমূহ ইয়াত উপস্থিত হব"
#: ../js/ui/appDisplay.js:660
#: ../js/ui/appDisplay.js:744
msgid "Frequent"
msgstr "সঘন"
#: ../js/ui/appDisplay.js:667
#: ../js/ui/appDisplay.js:751
msgid "All"
msgstr "সকলো"
#: ../js/ui/appDisplay.js:1498
#: ../js/ui/appDisplay.js:1558
msgid "New Window"
msgstr "নতুন উইন্ডো"
#: ../js/ui/appDisplay.js:1501 ../js/ui/dash.js:285
#: ../js/ui/appDisplay.js:1580 ../js/ui/dash.js:285
msgid "Remove from Favorites"
msgstr "পছন্দৰ পৰা আতৰাওক"
#: ../js/ui/appDisplay.js:1502
#: ../js/ui/appDisplay.js:1586
msgid "Add to Favorites"
msgstr "পছন্দলে যোগ কৰক"
@ -584,8 +574,8 @@ msgstr "পাছৱাৰ্ড:"
msgid "Type again:"
msgstr "আকৌ টাইপ কৰক:"
#: ../js/ui/components/networkAgent.js:131 ../js/ui/status/network.js:131
#: ../js/ui/status/network.js:293 ../js/ui/status/network.js:727
#: ../js/ui/components/networkAgent.js:131 ../js/ui/status/network.js:227
#: ../js/ui/status/network.js:300 ../js/ui/status/network.js:860
msgid "Connect"
msgstr "সংযোগ কৰক"
@ -619,9 +609,6 @@ msgstr "বেতাঁৰ নেটৱাৰ্কৰ দ্বাৰা প্
#: ../js/ui/components/networkAgent.js:312
#, javascript-format
#| msgid ""
#| "Passwords or encryption keys are required to access the wireless network "
#| "'%s'."
msgid ""
"Passwords or encryption keys are required to access the wireless network "
"“%s”."
@ -659,7 +646,6 @@ msgstr "মবাইল ব্ৰডবেণ্ড নেটৱাৰ্ক প
#: ../js/ui/components/networkAgent.js:339
#, javascript-format
#| msgid "A password is required to connect to '%s'."
msgid "A password is required to connect to “%s”."
msgstr "“%s” লে সংযোগ কৰিবলে এটা পাছৱাৰ্ডৰ প্ৰয়োজন।"
@ -708,35 +694,35 @@ msgid "Mute"
msgstr "মোন কৰক"
#. Translators: this is the word "Yesterday" followed by a time string. i.e. "Yesterday, 14:30"*/
#: ../js/ui/components/telepathyClient.js:941
#: ../js/ui/components/telepathyClient.js:952
msgid "<b>Yesterday</b>, <b>%H:%M</b>"
msgstr "<b>যোৱাকালী</b>, <b>%H:%M</b>"
#. Translators: this is the week day name followed by a time string. i.e. "Monday, 14:30*/
#: ../js/ui/components/telepathyClient.js:947
#: ../js/ui/components/telepathyClient.js:958
msgid "<b>%A</b>, <b>%H:%M</b>"
msgstr "<b>%A</b>, <b>%H:%M</b>"
#. Translators: this is the month name and day number followed by a time string. i.e. "May 25, 14:30"*/
#: ../js/ui/components/telepathyClient.js:952
#: ../js/ui/components/telepathyClient.js:963
msgid "<b>%B</b> <b>%d</b>, <b>%H:%M</b>"
msgstr "<b>%B</b> <b>%d</b>, <b>%H:%M</b>"
#. Translators: this is the month name, day number, year number followed by a time string. i.e. "May 25 2012, 14:30"*/
#: ../js/ui/components/telepathyClient.js:956
#: ../js/ui/components/telepathyClient.js:967
msgid "<b>%B</b> <b>%d</b> <b>%Y</b>, <b>%H:%M</b> "
msgstr "<b>%B</b> <b>%d</b> <b>%Y</b>, <b>%H:%M</b> "
#. Translators: this is the other person changing their old IM name to their new
#. IM name. */
#: ../js/ui/components/telepathyClient.js:987
#: ../js/ui/components/telepathyClient.js:998
#, javascript-format
msgid "%s is now known as %s"
msgstr "%s এতিয়া %s হিচাপে জনাজাত"
#. translators: argument is a room name like
#. * room@jabber.org for example. */
#: ../js/ui/components/telepathyClient.js:1090
#: ../js/ui/components/telepathyClient.js:1101
#, javascript-format
msgid "Invitation to %s"
msgstr "%s লে নিমন্ত্ৰণ"
@ -744,38 +730,38 @@ msgstr "%s লে নিমন্ত্ৰণ"
#. translators: first argument is the name of a contact and the second
#. * one the name of a room. "Alice is inviting you to join room@jabber.org
#. * for example. */
#: ../js/ui/components/telepathyClient.js:1098
#: ../js/ui/components/telepathyClient.js:1109
#, javascript-format
msgid "%s is inviting you to join %s"
msgstr "%s এ আপোনাক %s ত অংশগ্ৰহণ কৰিবলে আমন্ত্ৰণ জনাইছে"
#: ../js/ui/components/telepathyClient.js:1100
#: ../js/ui/components/telepathyClient.js:1135
#: ../js/ui/components/telepathyClient.js:1169
#: ../js/ui/components/telepathyClient.js:1226
#: ../js/ui/components/telepathyClient.js:1111
#: ../js/ui/components/telepathyClient.js:1146
#: ../js/ui/components/telepathyClient.js:1180
#: ../js/ui/components/telepathyClient.js:1237
msgid "Decline"
msgstr "নাকচ কৰক"
#: ../js/ui/components/telepathyClient.js:1106
#: ../js/ui/components/telepathyClient.js:1175
#: ../js/ui/components/telepathyClient.js:1231
#: ../js/ui/components/telepathyClient.js:1117
#: ../js/ui/components/telepathyClient.js:1186
#: ../js/ui/components/telepathyClient.js:1242
msgid "Accept"
msgstr "গ্ৰহন কৰক"
#. translators: argument is a contact name like Alice for example. */
#: ../js/ui/components/telepathyClient.js:1125
#: ../js/ui/components/telepathyClient.js:1136
#, javascript-format
msgid "Video call from %s"
msgstr "%s ৰ পৰা ভিডিঅ' কল"
#. translators: argument is a contact name like Alice for example. */
#: ../js/ui/components/telepathyClient.js:1128
#: ../js/ui/components/telepathyClient.js:1139
#, javascript-format
msgid "Call from %s"
msgstr "%s ৰ পৰা কল"
#. translators: this is a button label (verb), not a noun */
#: ../js/ui/components/telepathyClient.js:1142
#: ../js/ui/components/telepathyClient.js:1153
msgid "Answer"
msgstr "উত্তৰ দিয়ক"
@ -784,110 +770,110 @@ msgstr "উত্তৰ দিয়ক"
#. * file name. The string will be something
#. * like: "Alice is sending you test.ogg"
#. */
#: ../js/ui/components/telepathyClient.js:1163
#: ../js/ui/components/telepathyClient.js:1174
#, javascript-format
msgid "%s is sending you %s"
msgstr "%s এ আপোনাক %s পঠাই আছে"
#. To translators: The parameter is the contact's alias */
#: ../js/ui/components/telepathyClient.js:1192
#: ../js/ui/components/telepathyClient.js:1203
#, javascript-format
msgid "%s would like permission to see when you are online"
msgstr "আপুনি কেতিয়া অনলাইন আছে চাবলে %s এ অনুমতি বিচাৰিব"
#: ../js/ui/components/telepathyClient.js:1277
#: ../js/ui/components/telepathyClient.js:1288
msgid "Network error"
msgstr "নেটৱাৰ্ক ত্ৰুটি"
#: ../js/ui/components/telepathyClient.js:1279
#: ../js/ui/components/telepathyClient.js:1290
msgid "Authentication failed"
msgstr "প্ৰমাণীকৰণ ব্যৰ্থ"
#: ../js/ui/components/telepathyClient.js:1281
#: ../js/ui/components/telepathyClient.js:1292
msgid "Encryption error"
msgstr "ইনক্ৰিপষণ ত্ৰুটি"
#: ../js/ui/components/telepathyClient.js:1283
#: ../js/ui/components/telepathyClient.js:1294
msgid "Certificate not provided"
msgstr "প্ৰমাণপত্ৰ প্ৰদান কৰা হোৱা নাই"
#: ../js/ui/components/telepathyClient.js:1285
#: ../js/ui/components/telepathyClient.js:1296
msgid "Certificate untrusted"
msgstr "প্ৰমাণপত্ৰক ভৰষা কৰিব নোৱাৰি"
#: ../js/ui/components/telepathyClient.js:1287
#: ../js/ui/components/telepathyClient.js:1298
msgid "Certificate expired"
msgstr "প্ৰমাণপত্ৰৰ অৱসান ঘটিছে"
#: ../js/ui/components/telepathyClient.js:1289
#: ../js/ui/components/telepathyClient.js:1300
msgid "Certificate not activated"
msgstr "প্ৰমাণপত্ৰ সক্ৰিয় কৰা হোৱা নাই"
#: ../js/ui/components/telepathyClient.js:1291
#: ../js/ui/components/telepathyClient.js:1302
msgid "Certificate hostname mismatch"
msgstr "প্ৰমাণপত্ৰ হস্টনাম অমিল"
#: ../js/ui/components/telepathyClient.js:1293
#: ../js/ui/components/telepathyClient.js:1304
msgid "Certificate fingerprint mismatch"
msgstr "প্ৰমাণপত্ৰ ফিংগাৰপ্ৰিন্ট অমিল"
#: ../js/ui/components/telepathyClient.js:1295
#: ../js/ui/components/telepathyClient.js:1306
msgid "Certificate self-signed"
msgstr "প্ৰমাণপত্ৰ স্ব-স্বাক্ষৰীত"
#: ../js/ui/components/telepathyClient.js:1297
#: ../js/ui/components/telepathyClient.js:1308
msgid "Status is set to offline"
msgstr "অৱস্থা অফলাইনলে সংহতি কৰা হৈছে"
#: ../js/ui/components/telepathyClient.js:1299
#: ../js/ui/components/telepathyClient.js:1310
msgid "Encryption is not available"
msgstr "ইনক্ৰিপষণ উপলব্ধ নহয়"
#: ../js/ui/components/telepathyClient.js:1301
#: ../js/ui/components/telepathyClient.js:1312
msgid "Certificate is invalid"
msgstr "প্ৰমাণপত্ৰ অবৈধ"
#: ../js/ui/components/telepathyClient.js:1303
#: ../js/ui/components/telepathyClient.js:1314
msgid "Connection has been refused"
msgstr "সংযোগ নাকচ কৰা হৈছে"
#: ../js/ui/components/telepathyClient.js:1305
#: ../js/ui/components/telepathyClient.js:1316
msgid "Connection can't be established"
msgstr "সংযোগ স্থাপন কৰিব নোৱাৰি"
#: ../js/ui/components/telepathyClient.js:1307
#: ../js/ui/components/telepathyClient.js:1318
msgid "Connection has been lost"
msgstr "সংযোগ হেৰাইছে"
#: ../js/ui/components/telepathyClient.js:1309
#: ../js/ui/components/telepathyClient.js:1320
msgid "This account is already connected to the server"
msgstr "এই একাওন্ট ইতিমধ্যে চাৰ্ভাৰৰ সৈতে সংযোগিত"
#: ../js/ui/components/telepathyClient.js:1311
#: ../js/ui/components/telepathyClient.js:1322
msgid ""
"Connection has been replaced by a new connection using the same resource"
msgstr "সংযোগক একে সম্পদ ব্যৱহাৰ কৰি এটা নতুন সংযোগৰে প্ৰতিস্থাপন কৰা হৈছে"
#: ../js/ui/components/telepathyClient.js:1313
#: ../js/ui/components/telepathyClient.js:1324
msgid "The account already exists on the server"
msgstr "একাওন্ট ইতিমধ্যে চাৰ্ভাৰত উপস্থিত"
#: ../js/ui/components/telepathyClient.js:1315
#: ../js/ui/components/telepathyClient.js:1326
msgid "Server is currently too busy to handle the connection"
msgstr "চাৰ্ভাৰ সংযোগ ব্যৱস্থাপনা কৰিবলে বৰ্তমানে অতি ব্যস্ত"
#: ../js/ui/components/telepathyClient.js:1317
#: ../js/ui/components/telepathyClient.js:1328
msgid "Certificate has been revoked"
msgstr "প্ৰমাণপত্ৰ প্ৰত্যাহাৰ কৰা হৈছে"
#: ../js/ui/components/telepathyClient.js:1319
#: ../js/ui/components/telepathyClient.js:1330
msgid ""
"Certificate uses an insecure cipher algorithm or is cryptographically weak"
msgstr ""
"প্ৰমাণপত্ৰয় এটা অসুৰক্ষিত চিফাৰ এলগৰিথম ব্যৱহাৰ কৰে অথবা ক্ৰিপ্টোগ্ৰাফিয়ভাৱে "
"দুৰ্বল"
#: ../js/ui/components/telepathyClient.js:1321
#: ../js/ui/components/telepathyClient.js:1332
msgid ""
"The length of the server certificate, or the depth of the server certificate "
"chain, exceed the limits imposed by the cryptography library"
@ -896,22 +882,22 @@ msgstr ""
"ক্ৰিপ্টোগ্ৰাফী "
"লাইব্ৰেৰীয়ে প্ৰণয়ন কৰা সীমাসমূহত অতিক্ৰম কৰে"
#: ../js/ui/components/telepathyClient.js:1323
#: ../js/ui/components/telepathyClient.js:1334
msgid "Internal error"
msgstr "অভ্যন্তৰীক ত্ৰুটি"
#. translators: argument is the account name, like
#. * name@jabber.org for example. */
#: ../js/ui/components/telepathyClient.js:1333
#: ../js/ui/components/telepathyClient.js:1344
#, javascript-format
msgid "Unable to connect to %s"
msgstr "%s ৰ সৈতে সংযোগ কৰিবলে অক্ষম"
#: ../js/ui/components/telepathyClient.js:1338
#: ../js/ui/components/telepathyClient.js:1349
msgid "View account"
msgstr "একাওন্ট দৰ্শন কৰক"
#: ../js/ui/components/telepathyClient.js:1370
#: ../js/ui/components/telepathyClient.js:1381
msgid "Unknown reason"
msgstr "অজ্ঞাত কাৰণ"
@ -1058,7 +1044,6 @@ msgstr "ইনস্টল কৰক"
#: ../js/ui/extensionDownloader.js:204
#, javascript-format
#| msgid "Download and install '%s' from extensions.gnome.org?"
msgid "Download and install “%s” from extensions.gnome.org?"
msgstr "extensions.gnome.org ৰ পৰা “%s” ক ডাউনল'ড আৰু ইনস্টল কৰিব নে?"
@ -1092,7 +1077,7 @@ msgstr "সামৰ্থবান কৰা আছে"
#. because it's disabled by rfkill (airplane mode) */
#. translators:
#. * The device has been disabled
#: ../js/ui/lookingGlass.js:717 ../js/ui/status/network.js:470
#: ../js/ui/lookingGlass.js:717 ../js/ui/status/network.js:523
#: ../src/gvc/gvc-mixer-control.c:1830
msgid "Disabled"
msgstr "অসামৰ্থবান কৰা আছে"
@ -1117,43 +1102,43 @@ msgstr "উৎস দৰ্শন কৰক"
msgid "Web Page"
msgstr "ৱেব পৃষ্ঠা"
#: ../js/ui/messageTray.js:1309
#: ../js/ui/messageTray.js:1312
msgid "Open"
msgstr "খোলক"
#: ../js/ui/messageTray.js:1316
#: ../js/ui/messageTray.js:1319
msgid "Remove"
msgstr "আতৰাওক"
#: ../js/ui/messageTray.js:1613
#: ../js/ui/messageTray.js:1616
msgid "Notifications"
msgstr "অধিসূচনাসমূহ"
#: ../js/ui/messageTray.js:1620
#: ../js/ui/messageTray.js:1623
msgid "Clear Messages"
msgstr "বাৰ্তাসমূহ পৰিষ্কাৰ কৰক"
#: ../js/ui/messageTray.js:1639
#: ../js/ui/messageTray.js:1642
msgid "Notification Settings"
msgstr "অধিসূচনা সংহতিসমূহ"
#: ../js/ui/messageTray.js:1692
#: ../js/ui/messageTray.js:1695
msgid "Tray Menu"
msgstr "ট্ৰে মেনু"
#: ../js/ui/messageTray.js:1909
#: ../js/ui/messageTray.js:1912
msgid "No Messages"
msgstr "কোনো বাৰ্তা নাই"
#: ../js/ui/messageTray.js:1947
#: ../js/ui/messageTray.js:1950
msgid "Message Tray"
msgstr "বাৰ্তা ট্ৰে"
#: ../js/ui/messageTray.js:2931
#: ../js/ui/messageTray.js:2934
msgid "System Information"
msgstr "চিস্টেম তথ্য"
#: ../js/ui/notificationDaemon.js:515 ../src/shell-app.c:397
#: ../js/ui/notificationDaemon.js:515 ../src/shell-app.c:399
msgctxt "program"
msgid "Unknown"
msgstr "অজ্ঞাত"
@ -1191,7 +1176,7 @@ msgstr "প্ৰস্থান কৰক"
msgid "Activities"
msgstr "কাৰ্য্যসমূহ"
#: ../js/ui/panel.js:903
#: ../js/ui/panel.js:905
msgid "Top Bar"
msgstr "উপৰৰ বাৰ"
@ -1220,19 +1205,19 @@ msgid_plural "%d new notifications"
msgstr[0] "%d নতুন অধিসূচনা"
msgstr[1] "%d নতুন অধিসূচনাসমূহ"
#: ../js/ui/screenShield.js:472 ../js/ui/status/system.js:342
#: ../js/ui/screenShield.js:473 ../js/ui/status/system.js:342
msgid "Lock"
msgstr "লক কৰক"
#: ../js/ui/screenShield.js:706
#: ../js/ui/screenShield.js:707
msgid "GNOME needs to lock the screen"
msgstr "GNOME এ পৰ্দা লক কৰিব লাগিব"
#: ../js/ui/screenShield.js:833 ../js/ui/screenShield.js:1300
#: ../js/ui/screenShield.js:834 ../js/ui/screenShield.js:1301
msgid "Unable to lock"
msgstr "লক কৰিবলে অক্ষম"
#: ../js/ui/screenShield.js:834 ../js/ui/screenShield.js:1301
#: ../js/ui/screenShield.js:835 ../js/ui/screenShield.js:1302
msgid "Lock was blocked by an application"
msgstr "লক কাৰ্য্য এটা এপ্লিকেচন দ্বাৰা প্ৰতিৰোধ কৰা হৈছিল"
@ -1312,26 +1297,31 @@ msgstr "উচ্চ কন্ট্ৰাস্ট"
msgid "Large Text"
msgstr "ডাঙৰ লিখনী"
#: ../js/ui/status/bluetooth.js:45
#: ../js/ui/status/bluetooth.js:48
msgid "Bluetooth"
msgstr "ব্লুটুথ"
#: ../js/ui/status/bluetooth.js:47 ../js/ui/status/network.js:131
#: ../js/ui/status/network.js:1081 ../js/ui/status/rfkill.js:48
#: ../js/ui/status/bluetooth.js:50 ../js/ui/status/network.js:134
#: ../js/ui/status/network.js:1209 ../js/ui/status/rfkill.js:85
#: ../js/ui/status/rfkill.js:105
msgid "Turn Off"
msgstr "বন্ধ কৰক"
#: ../js/ui/status/bluetooth.js:50
#: ../js/ui/status/bluetooth.js:53
msgid "Bluetooth Settings"
msgstr "ব্লুটুথ সংহতিসমূহ"
#: ../js/ui/status/bluetooth.js:98
#: ../js/ui/status/bluetooth.js:100
#, javascript-format
msgid "%d Connected Device"
msgid_plural "%d Connected Devices"
msgstr[0] "%d সংযুক্ত ডিভাইচ"
msgstr[1] "%d সংযুক্ত ডিভাইচসমূহ"
#: ../js/ui/status/bluetooth.js:102 ../js/ui/status/network.js:1232
msgid "Not Connected"
msgstr "সংযুক্ত নহয়"
#: ../js/ui/status/brightness.js:44
msgid "Brightness"
msgstr "উজ্জ্বলতা"
@ -1340,103 +1330,136 @@ msgstr "উজ্জ্বলতা"
msgid "Show Keyboard Layout"
msgstr "কিবৰ্ড বিন্যাস দেখুৱাওক"
#: ../js/ui/status/network.js:70
#: ../js/ui/status/network.js:73
msgid "<unknown>"
msgstr "<unknown>"
#: ../js/ui/status/network.js:220 ../js/ui/status/network.js:377
#: ../js/ui/status/network.js:1102
#: ../js/ui/status/network.js:223 ../js/ui/status/network.js:389
#: ../js/ui/status/network.js:1230
msgid "Off"
msgstr "অফ"
#. Translators: this is for network devices that are physically present but are not
#. under NetworkManager's control (and thus cannot be used in the menu) */
#: ../js/ui/status/network.js:383
#: ../js/ui/status/network.js:395
msgid "unmanaged"
msgstr "অব্যৱস্থাপিত"
#: ../js/ui/status/network.js:385
#: ../js/ui/status/network.js:397
msgid "disconnecting..."
msgstr "বিচ্ছিনিত কৰা হৈছে..."
#: ../js/ui/status/network.js:391 ../js/ui/status/network.js:1156
#: ../js/ui/status/network.js:403 ../js/ui/status/network.js:1284
msgid "connecting..."
msgstr "সংযোগ কৰা হৈছে..."
#. Translators: this is for network connections that require some kind of key or password */
#: ../js/ui/status/network.js:394 ../js/ui/status/network.js:1159
#: ../js/ui/status/network.js:406 ../js/ui/status/network.js:1287
msgid "authentication required"
msgstr "প্ৰমাণীকৰণৰ প্ৰয়োজন"
#. Translators: this is for devices that require some kind of firmware or kernel
#. module, which is missing */
#: ../js/ui/status/network.js:402
#: ../js/ui/status/network.js:414
msgid "firmware missing"
msgstr "ফাৰ্মৱেৰ সন্ধানহীন"
#. Translators: this is for a network device that cannot be activated (for example it
#. is disabled by rfkill, or it has no coverage */
#: ../js/ui/status/network.js:406
#: ../js/ui/status/network.js:418
msgid "unavailable"
msgstr "উপলব্ধ নাই"
#: ../js/ui/status/network.js:408 ../js/ui/status/network.js:1161
#: ../js/ui/status/network.js:420 ../js/ui/status/network.js:1289
msgid "connection failed"
msgstr "সংযোগ ব্যৰ্থ"
#: ../js/ui/status/network.js:424 ../js/ui/status/network.js:510
#| msgid "Mobile broadband"
#: ../js/ui/status/network.js:436
#| msgid "Wi-Fi Settings"
msgid "Wired Settings"
msgstr "তাঁৰযুক্ত সংহতিসমূহ"
#: ../js/ui/status/network.js:477 ../js/ui/status/network.js:563
msgid "Mobile Broadband Settings"
msgstr "মবাইল ব্ৰডবেণ্ড সংহতিসমূহ"
#: ../js/ui/status/network.js:466 ../js/ui/status/network.js:1100
#| msgid "hardware disabled"
#: ../js/ui/status/network.js:519 ../js/ui/status/network.js:1228
msgid "Hardware Disabled"
msgstr "হাৰ্ডৱেৰ অসামৰ্থবান কৰা আছে"
#: ../js/ui/status/network.js:692
#: ../js/ui/status/network.js:578
msgid "Use as Internet connection"
msgstr "ইন্টাৰনেট সংযোগ ৰূপে ব্যৱহাৰ কৰক"
#: ../js/ui/status/network.js:755
#| msgid "Airplane Mode"
msgid "Airplane Mode is On"
msgstr "বিমান অৱস্থা অন আছে"
#: ../js/ui/status/network.js:756
msgid "Wi-Fi is disabled when airplane mode is on."
msgstr "বিমান অৱস্থা অন থকা অৱস্থাত Wi-Fi অসামৰ্থবান থাকে।"
#: ../js/ui/status/network.js:757
#| msgid "Airplane Mode"
msgid "Turn Off Airplane Mode"
msgstr "বিমান অৱস্থা বন্ধ কৰক"
#: ../js/ui/status/network.js:766
#| msgid "Wi-Fi Settings"
msgid "Wi-Fi is Off"
msgstr "Wi-Fi অফ আছে"
#: ../js/ui/status/network.js:767
msgid "Wi-Fi needs to be turned on in order to connect to a network."
msgstr "এটা নেটৱাৰ্কৰ সৈতে সংযোগ কৰিবলে Wi-Fi অন কৰিব লাগিব।"
#: ../js/ui/status/network.js:768
#| msgid "Turn On"
msgid "Turn On Wi-Fi"
msgstr "Wi-Fi অন কৰক"
#: ../js/ui/status/network.js:793
msgid "Wi-Fi Networks"
msgstr "Wi-Fi নেটৱাৰ্কসমূহ"
#: ../js/ui/status/network.js:694
#: ../js/ui/status/network.js:795
msgid "Select a network"
msgstr "এটা নেটৱাৰ্ক বাছক"
#: ../js/ui/status/network.js:718
#: ../js/ui/status/network.js:824
msgid "No Networks"
msgstr "কোনো নেটৱাৰ্ক নাই"
#: ../js/ui/status/network.js:987
#: ../js/ui/status/network.js:845 ../js/ui/status/rfkill.js:103
msgid "Use hardware switch to turn off"
msgstr "বন্ধ কৰিবলে হাৰ্ডৱেৰ চুইচ ব্যৱহাৰ কৰক"
#: ../js/ui/status/network.js:1115
msgid "Select Network"
msgstr "নেটৱাৰ্ক বাছক"
#: ../js/ui/status/network.js:993
#| msgid "Settings"
#: ../js/ui/status/network.js:1121
msgid "Wi-Fi Settings"
msgstr "Wi-Fi সংহতিসমূহ"
#: ../js/ui/status/network.js:1081
#: ../js/ui/status/network.js:1209
msgid "Turn On"
msgstr "অন কৰক"
#: ../js/ui/status/network.js:1104
#| msgid "Connect"
msgid "Not Connected"
msgstr "সংযুক্ত নহয়"
#: ../js/ui/status/network.js:1224
#: ../js/ui/status/network.js:1352
msgid "VPN"
msgstr "VPN"
#: ../js/ui/status/network.js:1364
#: ../js/ui/status/network.js:1495
msgid "Network Manager"
msgstr "নেটৱাৰ্ক ব্যৱস্থাপক"
#: ../js/ui/status/network.js:1403
#: ../js/ui/status/network.js:1534
msgid "Connection failed"
msgstr "সংযোগ ব্যৰ্থ"
#: ../js/ui/status/network.js:1404
#: ../js/ui/status/network.js:1535
msgid "Activation of network connection failed"
msgstr "নেটৱাৰ্ক সংযোগ সক্ৰিয়কৰণ ব্যৰ্থ হল"
@ -1470,15 +1493,15 @@ msgstr "UPS"
msgid "Battery"
msgstr "বেটাৰি"
#: ../js/ui/status/rfkill.js:45
#: ../js/ui/status/rfkill.js:82
msgid "Airplane Mode"
msgstr "বিমান অৱস্থা"
#: ../js/ui/status/rfkill.js:47
#: ../js/ui/status/rfkill.js:84
msgid "On"
msgstr "অন"
#: ../js/ui/status/rfkill.js:51
#: ../js/ui/status/rfkill.js:88
msgid "Network Settings"
msgstr "নেটৱাৰ্ক সংহতিসমূহ"
@ -1532,7 +1555,6 @@ msgstr "সন্ধান কৰক"
#: ../js/ui/windowAttentionHandler.js:19
#, javascript-format
#| msgid "'%s' is ready"
msgid "“%s” is ready"
msgstr "“%s” প্ৰস্তুত"
@ -1600,9 +1622,8 @@ msgstr "লগিন পৰ্দাৰ বাবে এটা বিশেষ
msgid "List possible modes"
msgstr "সম্ভাব্য অৱস্থাসমূহ তালিকাভুক্ত কৰক"
#: ../src/shell-app.c:640
#: ../src/shell-app.c:642
#, c-format
#| msgid "Failed to launch '%s'"
msgid "Failed to launch “%s”"
msgstr "“%s” লঞ্চ কৰিবলে ব্যৰ্থ"

884
po/be.po

File diff suppressed because it is too large Load Diff

579
po/cs.po

File diff suppressed because it is too large Load Diff

452
po/de.po

File diff suppressed because it is too large Load Diff

602
po/el.po

File diff suppressed because it is too large Load Diff

575
po/es.po

File diff suppressed because it is too large Load Diff

939
po/fi.po

File diff suppressed because it is too large Load Diff

803
po/gl.po

File diff suppressed because it is too large Load Diff

640
po/he.po

File diff suppressed because it is too large Load Diff

614
po/id.po

File diff suppressed because it is too large Load Diff

610
po/kk.po

File diff suppressed because it is too large Load Diff

728
po/kn.po

File diff suppressed because it is too large Load Diff

1475
po/ko.po

File diff suppressed because it is too large Load Diff

569
po/lt.po

File diff suppressed because it is too large Load Diff

545
po/nb.po

File diff suppressed because it is too large Load Diff

908
po/pl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

566
po/tg.po

File diff suppressed because it is too large Load Diff

801
po/uk.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ gnome_shell_calendar_server_CFLAGS = \
$(CALENDAR_SERVER_CFLAGS) \
$(NULL)
gnome_shell_calendar_server_LDFLAGS = \
gnome_shell_calendar_server_LDADD = \
$(CALENDAR_SERVER_LIBS) \
$(NULL)

View File

@ -98,7 +98,6 @@ shell_public_headers_h = \
shell-invert-lightness-effect.h \
shell-keybinding-modes.h \
shell-mount-operation.h \
shell-network-agent.h \
shell-perf-log.h \
shell-screenshot.h \
shell-slicer.h \
@ -110,6 +109,10 @@ shell_public_headers_h = \
shell-window-tracker.h \
shell-wm.h
if HAVE_NETWORKMANAGER
shell_public_headers_h += shell-network-agent.h
endif
libgnome_shell_menu_la_SOURCES = \
gtkactionmuxer.h \
gtkactionmuxer.c \
@ -136,7 +139,6 @@ libgnome_shell_base_la_SOURCES = \
shell-menu-tracker.c \
shell-menu-tracker.h \
shell-mount-operation.c \
shell-network-agent.c \
shell-perf-log.c \
shell-polkit-authentication-agent.h \
shell-polkit-authentication-agent.c \
@ -147,6 +149,10 @@ libgnome_shell_base_la_SOURCES = \
shell-tp-client.c \
$(NULL)
if HAVE_NETWORKMANAGER
libgnome_shell_base_la_SOURCES += shell-network-agent.c
endif
libgnome_shell_sources = \
$(shell_public_headers_h) \
shell-app-private.h \
@ -343,7 +349,10 @@ INTROSPECTION_GIRS += ShellMenu-0.1.gir
CLEANFILES += ShellMenu-0.1.gir
Shell-0.1.gir: gnome-shell St-1.0.gir ShellMenu-0.1.gir
Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 Soup-2.4 GMenu-3.0 NetworkManager-1.0 NMClient-1.0
Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 Soup-2.4 GMenu-3.0
if HAVE_NETWORKMANAGER
Shell_0_1_gir_INCLUDES += NetworkManager-1.0 NMClient-1.0
endif
Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
# Hack! we use PROGRAM instead of LIBS so that the soname is not included
# in the typelib. This way the symbols will be resolved with the libgnome-shell

View File

@ -99,6 +99,15 @@ def run_shell(perf_output=None):
shell.wait()
return shell.returncode == 0
def restore_shell():
pid = os.fork()
if (pid == 0):
if "MUTTER_WM_CLASS_FILTER" in os.environ:
del os.environ["MUTTER_WM_CLASS_FILTER"]
os.execlp("gnome-shell", "gnome-shell", "--replace")
else:
sys.exit(0)
def upload_performance_report(report_text):
try:
config_home = os.environ['XDG_CONFIG_HOME']
@ -320,6 +329,6 @@ if args:
normal_exit = run_performance_test()
if normal_exit:
sys.exit(0)
restore_shell()
else:
sys.exit(1)

View File

@ -68,6 +68,12 @@ static void gnome_shell_plugin_kill_window_effects (MetaPlugin *plugin,
MetaWindowActor *actor);
static void gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin);
static void gnome_shell_plugin_show_tile_preview (MetaPlugin *plugin,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor);
static void gnome_shell_plugin_hide_tile_preview (MetaPlugin *plugin);
static gboolean gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
XEvent *event);
@ -132,6 +138,9 @@ gnome_shell_plugin_class_init (GnomeShellPluginClass *klass)
plugin_class->kill_window_effects = gnome_shell_plugin_kill_window_effects;
plugin_class->kill_switch_workspace = gnome_shell_plugin_kill_switch_workspace;
plugin_class->show_tile_preview = gnome_shell_plugin_show_tile_preview;
plugin_class->hide_tile_preview = gnome_shell_plugin_hide_tile_preview;
plugin_class->xevent_filter = gnome_shell_plugin_xevent_filter;
plugin_class->keybinding_filter = gnome_shell_plugin_keybinding_filter;
@ -145,45 +154,6 @@ gnome_shell_plugin_init (GnomeShellPlugin *shell_plugin)
{
}
static gboolean
gnome_shell_plugin_has_swap_event (GnomeShellPlugin *shell_plugin)
{
MetaPlugin *plugin = META_PLUGIN (shell_plugin);
CoglDisplay *cogl_display =
cogl_context_get_display (shell_plugin->cogl_context);
CoglRenderer *renderer = cogl_display_get_renderer (cogl_display);
const char * (* query_extensions_string) (Display *dpy, int screen);
Bool (* query_extension) (Display *dpy, int *error, int *event);
MetaScreen *screen;
MetaDisplay *display;
Display *xdisplay;
const char *glx_extensions;
/* We will only get swap events if Cogl is using GLX */
if (cogl_renderer_get_winsys_id (renderer) != COGL_WINSYS_ID_GLX)
return FALSE;
screen = meta_plugin_get_screen (plugin);
display = meta_screen_get_display (screen);
xdisplay = meta_display_get_xdisplay (display);
query_extensions_string =
(void *) cogl_get_proc_address ("glXQueryExtensionsString");
query_extension =
(void *) cogl_get_proc_address ("glXQueryExtension");
query_extension (xdisplay,
&shell_plugin->glx_error_base,
&shell_plugin->glx_event_base);
glx_extensions =
query_extensions_string (xdisplay,
meta_screen_get_screen_number (screen));
return strstr (glx_extensions, "GLX_INTEL_swap_event") != NULL;
}
static void
gnome_shell_plugin_start (MetaPlugin *plugin)
{
@ -196,8 +166,7 @@ gnome_shell_plugin_start (MetaPlugin *plugin)
backend = clutter_get_default_backend ();
shell_plugin->cogl_context = clutter_backend_get_cogl_context (backend);
shell_plugin->have_swap_event =
gnome_shell_plugin_has_swap_event (shell_plugin);
shell_plugin->have_swap_event = clutter_feature_available (CLUTTER_FEATURE_SWAP_EVENTS);
shell_perf_log_define_event (shell_perf_log_get_default (),
"glx.swapComplete",
@ -319,6 +288,21 @@ gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin)
_shell_wm_kill_switch_workspace (get_shell_wm());
}
static void
gnome_shell_plugin_show_tile_preview (MetaPlugin *plugin,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor)
{
_shell_wm_show_tile_preview (get_shell_wm (), window, tile_rect, tile_monitor);
}
static void
gnome_shell_plugin_hide_tile_preview (MetaPlugin *plugin)
{
_shell_wm_hide_tile_preview (get_shell_wm ());
}
static gboolean
gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
XEvent *xev)

View File

@ -271,7 +271,9 @@ default_log_handler (const char *log_domain,
g_get_current_time (&now);
tp_debug_sender_add_message (sender, &now, log_domain, log_level, message);
/* Send telepathy debug through DBus */
if (log_domain != NULL && g_str_has_prefix (log_domain, "tp-glib"))
tp_debug_sender_add_message (sender, &now, log_domain, log_level, message);
/* Filter out telepathy-glib logs, we don't want to flood Shell's output
* with those. */

View File

@ -160,6 +160,15 @@ window_backed_app_get_icon (ShellApp *app,
{
MetaWindow *window;
ClutterActor *actor;
gint scale;
ShellGlobal *global;
StThemeContext *context;
global = shell_global_get ();
context = st_theme_context_get_for_stage (shell_global_get_stage (global));
g_object_get (context, "scale-factor", &scale, NULL);
size *= scale;
/* During a state transition from running to not-running for
* window-backend apps, it's possible we get a request for the icon.
@ -193,8 +202,14 @@ shell_app_create_icon_texture (ShellApp *app,
int size)
{
GIcon *icon;
gint scale;
ClutterActor *ret;
ShellGlobal *global;
StThemeContext *context;
global = shell_global_get ();
context = st_theme_context_get_for_stage (shell_global_get_stage (global));
g_object_get (context, "scale-factor", &scale, NULL);
ret = NULL;
if (app->info == NULL)
@ -202,12 +217,12 @@ shell_app_create_icon_texture (ShellApp *app,
icon = g_app_info_get_icon (G_APP_INFO (app->info));
if (icon != NULL)
ret = st_texture_cache_load_gicon (st_texture_cache_get_default (), NULL, icon, size);
ret = st_texture_cache_load_gicon (st_texture_cache_get_default (), NULL, icon, size, scale);
if (ret == NULL)
{
icon = g_themed_icon_new ("application-x-executable");
ret = st_texture_cache_load_gicon (st_texture_cache_get_default (), NULL, icon, size);
ret = st_texture_cache_load_gicon (st_texture_cache_get_default (), NULL, icon, size, scale);
g_object_unref (icon);
}
@ -217,6 +232,7 @@ shell_app_create_icon_texture (ShellApp *app,
typedef struct {
ShellApp *app;
int size;
int scale;
ClutterTextDirection direction;
} CreateFadedIconData;
@ -230,6 +246,7 @@ shell_app_create_faded_icon_cpu (StTextureCache *cache,
ShellApp *app;
GdkPixbuf *pixbuf;
int size;
int scale;
CoglHandle texture;
gint width, height, rowstride;
guint8 n_channels;
@ -245,23 +262,24 @@ shell_app_create_faded_icon_cpu (StTextureCache *cache,
app = data->app;
size = data->size;
scale = data->scale;
info = NULL;
icon = g_app_info_get_icon (G_APP_INFO (app->info));
if (icon != NULL)
{
info = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_default (),
icon, size,
GTK_ICON_LOOKUP_FORCE_SIZE);
info = gtk_icon_theme_lookup_by_gicon_for_scale (gtk_icon_theme_get_default (),
icon, size, scale,
GTK_ICON_LOOKUP_FORCE_SIZE);
}
if (info == NULL)
{
icon = g_themed_icon_new ("application-x-executable");
info = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_default (),
icon, size,
GTK_ICON_LOOKUP_FORCE_SIZE);
info = gtk_icon_theme_lookup_by_gicon_for_scale (gtk_icon_theme_get_default (),
icon, size, scale,
GTK_ICON_LOOKUP_FORCE_SIZE);
g_object_unref (icon);
}
@ -345,6 +363,9 @@ shell_app_get_faded_icon (ShellApp *app, int size, ClutterTextDirection directio
ClutterActor *result;
char *cache_key;
CreateFadedIconData data;
gint scale;
ShellGlobal *global;
StThemeContext *context;
/* Don't fade for window backed apps for now...easier to reuse the
* property tracking bits, and this helps us visually distinguish
@ -353,14 +374,19 @@ shell_app_get_faded_icon (ShellApp *app, int size, ClutterTextDirection directio
if (!app->info)
return window_backed_app_get_icon (app, size);
global = shell_global_get ();
context = st_theme_context_get_for_stage (shell_global_get_stage (global));
g_object_get (context, "scale-factor", &scale, NULL);
/* Use icon: prefix so that we get evicted from the cache on
* icon theme changes. */
cache_key = g_strdup_printf ("icon:%s,size=%d,faded-%s",
cache_key = g_strdup_printf ("icon:%s,size=%d,scale=%d,faded-%s",
shell_app_get_id (app),
size,
size, scale,
direction == CLUTTER_TEXT_DIRECTION_RTL ? "rtl" : "ltr");
data.app = app;
data.size = size;
data.scale = scale;
data.direction = direction;
texture = st_texture_cache_load (st_texture_cache_get_default (),
cache_key,
@ -378,7 +404,7 @@ shell_app_get_faded_icon (ShellApp *app, int size, ClutterTextDirection directio
else
{
result = clutter_texture_new ();
g_object_set (result, "opacity", 0, "width", (float) size, "height", (float) size, NULL);
g_object_set (result, "opacity", 0, "width", (float) size * scale, "height", (float) size * scale, NULL);
}
return result;
@ -585,9 +611,7 @@ shell_app_update_window_actions (ShellApp *app, MetaWindow *window)
g_object_set_data_full (G_OBJECT (window), "actions", actions, g_object_unref);
}
if (!app->running_state->muxer)
app->running_state->muxer = gtk_action_muxer_new ();
g_assert (app->running_state->muxer);
gtk_action_muxer_insert (app->running_state->muxer, "win", actions);
g_object_notify (G_OBJECT (app), "action-group");
}

View File

@ -746,6 +746,20 @@ global_stage_after_paint (gpointer data)
return TRUE;
}
static void
update_scale_factor (GdkScreen *screen, gpointer data)
{
ShellGlobal *global = SHELL_GLOBAL (data);
ClutterStage *stage = CLUTTER_STAGE (global->stage);
StThemeContext *context = st_theme_context_get_for_stage (stage);
GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_INT);
if (gdk_screen_get_setting (global->gdk_screen, "gdk-window-scaling-factor", &value))
g_object_set (context, "scale-factor", g_value_get_int (&value), NULL);
}
/* This is an IBus workaround. The flow of events with IBus is that every time
* it gets gets a key event, it:
*
@ -805,8 +819,8 @@ gnome_shell_gdk_event_handler (GdkEvent *event_gdk,
if (event_gdk->key.window == global->ibus_window)
{
ClutterDeviceManager *device_manager = clutter_device_manager_get_default ();
ClutterInputDevice *keyboard = clutter_device_manager_get_core_device (device_manager,
CLUTTER_KEYBOARD_DEVICE);
ClutterInputDevice *keyboard = clutter_device_manager_get_device (device_manager,
META_VIRTUAL_CORE_KEYBOARD_ID);
ClutterEvent *event_clutter = clutter_event_new ((event_gdk->type == GDK_KEY_PRESS) ?
CLUTTER_KEY_PRESS : CLUTTER_KEY_RELEASE);
@ -924,9 +938,19 @@ _shell_global_set_plugin (ShellGlobal *global,
g_signal_connect (global->meta_display, "notify::focus-window",
G_CALLBACK (focus_window_changed), global);
/*
* We connect to GdkScreen's monitors-changed here to avoid
* a race condition. GdkScreen's monitors-changed signal is
* emitted *after* the xsetting has been updated.
*/
g_signal_connect (global->gdk_screen, "monitors-changed",
G_CALLBACK (update_scale_factor), global);
gdk_event_handler_set (gnome_shell_gdk_event_handler, global, NULL);
global->focus_manager = st_focus_manager_get_for_stage (global->stage);
update_scale_factor (global->gdk_screen, global);
}
GjsContext *
@ -1256,8 +1280,8 @@ shell_global_sync_pointer (ShellGlobal *global)
event.y = y;
event.modifier_state = mods;
event.axes = NULL;
event.device = clutter_device_manager_get_core_device (clutter_device_manager_get_default (),
CLUTTER_POINTER_DEVICE);
event.device = clutter_device_manager_get_device (clutter_device_manager_get_default (),
META_VIRTUAL_CORE_POINTER_ID);
/* Leaving event.source NULL will force clutter to look it up, which
* will generate enter/leave events as a side effect, if they are

View File

@ -4,7 +4,6 @@
#include "shell-js.h"
#include <jsapi.h>
#include <gio/gio.h>
#include <gjs/gjs.h>
#include <gjs/gjs-module.h>

View File

@ -256,6 +256,7 @@ get_secrets_keyring_cb (GObject *source,
GList *items;
GList *l;
GHashTable *outer;
gboolean secrets_found = FALSE;
items = secret_service_search_finish (NULL, result, &secret_error);
@ -312,6 +313,8 @@ get_secrets_keyring_cb (GObject *source,
else
g_hash_table_insert (closure->vpn_entries, secret_name, g_strdup (secret_value_get (secret, NULL)));
secrets_found = TRUE;
g_hash_table_unref (attributes);
secret_value_unref (secret);
break;
@ -325,9 +328,13 @@ get_secrets_keyring_cb (GObject *source,
g_list_free_full (items, g_object_unref);
/* All VPN requests get sent to the VPN's auth dialog, since it knows better
* than the agent do about what secrets are required.
* than the agent about what secrets are required. Otherwise, if no secrets
* were found and interaction is allowed the ask for some secrets, because
* NetworkManager will fail the connection if not secrets are returned
* instead of asking again with REQUEST_NEW.
*/
if (closure->is_vpn)
if (closure->is_vpn ||
(!secrets_found && (closure->flags & NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION)))
{
nm_connection_update_secrets (closure->connection, closure->setting_name, closure->entries, NULL);
@ -463,7 +470,6 @@ shell_network_agent_respond (ShellNetworkAgent *self,
{
ShellNetworkAgentPrivate *priv;
ShellAgentRequest *request;
NMConnection *dup;
GHashTable *outer;
g_return_if_fail (SHELL_IS_NETWORK_AGENT (self));
@ -498,11 +504,16 @@ shell_network_agent_respond (ShellNetworkAgent *self,
/* response == SHELL_NETWORK_AGENT_CONFIRMED */
/* Save updated secrets */
dup = nm_connection_duplicate (request->connection);
/* Save any updated secrets */
if ((request->flags & NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION) ||
(request->flags & NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW))
{
NMConnection *dup = nm_connection_duplicate (request->connection);
nm_connection_update_secrets (dup, request->setting_name, request->entries, NULL);
nm_secret_agent_save_secrets (NM_SECRET_AGENT (self), dup, NULL, NULL);
nm_connection_update_secrets (dup, request->setting_name, request->entries, NULL);
nm_secret_agent_save_secrets (NM_SECRET_AGENT (self), dup, NULL, NULL);
g_object_unref (dup);
}
outer = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (outer, request->setting_name, request->entries);
@ -510,7 +521,6 @@ shell_network_agent_respond (ShellNetworkAgent *self,
request->callback (NM_SECRET_AGENT (self), request->connection, outer, NULL, request->callback_data);
g_hash_table_destroy (outer);
g_object_unref (dup);
g_hash_table_remove (priv->requests, request_id);
}

View File

@ -253,7 +253,7 @@ get_pointer_coords (int *x,
ClutterPoint point;
manager = clutter_device_manager_get_default ();
device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE);
device = clutter_device_manager_get_device (manager, META_VIRTUAL_CORE_POINTER_ID);
clutter_input_device_get_coords (device, NULL, &point);
*x = point.x;

View File

@ -347,5 +347,13 @@ shell_util_cursor_tracker_to_clutter (MetaCursorTracker *tracker,
CoglTexture *sprite;
sprite = meta_cursor_tracker_get_sprite (tracker);
clutter_texture_set_cogl_texture (texture, sprite);
if (sprite)
{
clutter_actor_show (CLUTTER_ACTOR (texture));
clutter_texture_set_cogl_texture (texture, sprite);
}
else
{
clutter_actor_hide (CLUTTER_ACTOR (texture));
}
}

View File

@ -424,6 +424,16 @@ update_focus_app (ShellWindowTracker *self)
ShellApp *new_focus_app;
new_focus_win = meta_display_get_focus_window (shell_global_get_display (shell_global_get ()));
/* we only consider an app focused if the focus window can be clearly
* associated with a running app; this is the case if the focus window
* or one of its parents is visible in the taskbar, e.g.
* - 'nautilus' should appear focused when its about dialog has focus
* - 'nautilus' should not appear focused when the DESKTOP has focus
*/
while (new_focus_win && meta_window_is_skip_taskbar (new_focus_win))
new_focus_win = meta_window_get_transient_for (new_focus_win);
new_focus_app = new_focus_win ? shell_window_tracker_get_window_app (self, new_focus_win) : NULL;
if (new_focus_app)
@ -848,18 +858,25 @@ shell_startup_sequence_create_icon (ShellStartupSequence *sequence, guint size)
GIcon *themed;
const char *icon_name;
ClutterActor *texture;
gint scale;
ShellGlobal *global;
StThemeContext *context;
global = shell_global_get ();
context = st_theme_context_get_for_stage (shell_global_get_stage (global));
g_object_get (context, "scale-factor", &scale, NULL);
icon_name = sn_startup_sequence_get_icon_name ((SnStartupSequence*)sequence);
if (!icon_name)
{
texture = clutter_texture_new ();
clutter_actor_set_size (texture, size, size);
clutter_actor_set_size (texture, size * scale, size * scale);
return texture;
}
themed = g_themed_icon_new (icon_name);
texture = st_texture_cache_load_gicon (st_texture_cache_get_default (),
NULL, themed, size);
NULL, themed, size, scale);
g_object_unref (G_OBJECT (themed));
return texture;
}

View File

@ -35,6 +35,12 @@ void _shell_wm_kill_window_effects (ShellWM *wm,
MetaWindowActor *actor);
void _shell_wm_kill_switch_workspace (ShellWM *wm);
void _shell_wm_show_tile_preview (ShellWM *wm,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor);
void _shell_wm_hide_tile_preview (ShellWM *wm);
gboolean _shell_wm_filter_keybinding (ShellWM *wm,
MetaKeyBinding *binding);

View File

@ -26,6 +26,8 @@ enum
SWITCH_WORKSPACE,
KILL_SWITCH_WORKSPACE,
KILL_WINDOW_EFFECTS,
SHOW_TILE_PREVIEW,
HIDE_TILE_PREVIEW,
FILTER_KEYBINDING,
CONFIRM_DISPLAY_CHANGE,
@ -117,6 +119,22 @@ shell_wm_class_init (ShellWMClass *klass)
NULL, NULL, NULL,
G_TYPE_NONE, 1,
META_TYPE_WINDOW_ACTOR);
shell_wm_signals[SHOW_TILE_PREVIEW] =
g_signal_new ("show-tile-preview",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 3,
META_TYPE_WINDOW,
META_TYPE_RECTANGLE,
G_TYPE_INT);
shell_wm_signals[HIDE_TILE_PREVIEW] =
g_signal_new ("hide-tile-preview",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
G_TYPE_NONE, 0);
shell_wm_signals[FILTER_KEYBINDING] =
g_signal_new ("filter-keybinding",
G_TYPE_FROM_CLASS (klass),
@ -254,6 +272,22 @@ _shell_wm_kill_window_effects (ShellWM *wm,
g_signal_emit (wm, shell_wm_signals[KILL_WINDOW_EFFECTS], 0, actor);
}
void
_shell_wm_show_tile_preview (ShellWM *wm,
MetaWindow *window,
MetaRectangle *tile_rect,
int tile_monitor)
{
g_signal_emit (wm, shell_wm_signals[SHOW_TILE_PREVIEW], 0,
window, tile_rect, tile_monitor);
}
void
_shell_wm_hide_tile_preview (ShellWM *wm)
{
g_signal_emit (wm, shell_wm_signals[HIDE_TILE_PREVIEW], 0);
}
void
_shell_wm_minimize (ShellWM *wm,

View File

@ -29,6 +29,7 @@
#include "st-enum-types.h"
#include "st-icon.h"
#include "st-texture-cache.h"
#include "st-theme-context.h"
#include "st-private.h"
enum
@ -162,76 +163,6 @@ st_icon_dispose (GObject *gobject)
G_OBJECT_CLASS (st_icon_parent_class)->dispose (gobject);
}
static void
st_icon_get_preferred_height (ClutterActor *actor,
gfloat for_width,
gfloat *min_height_p,
gfloat *nat_height_p)
{
StIconPrivate *priv = ST_ICON (actor)->priv;
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
if (min_height_p)
*min_height_p = priv->icon_size;
if (nat_height_p)
*nat_height_p = priv->icon_size;
st_theme_node_adjust_preferred_height (theme_node, min_height_p, nat_height_p);
}
static void
st_icon_get_preferred_width (ClutterActor *actor,
gfloat for_height,
gfloat *min_width_p,
gfloat *nat_width_p)
{
StIconPrivate *priv = ST_ICON (actor)->priv;
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
if (min_width_p)
*min_width_p = priv->icon_size;
if (nat_width_p)
*nat_width_p = priv->icon_size;
st_theme_node_adjust_preferred_width (theme_node, min_width_p, nat_width_p);
}
static void
st_icon_allocate (ClutterActor *actor,
const ClutterActorBox *box,
ClutterAllocationFlags flags)
{
StIconPrivate *priv = ST_ICON (actor)->priv;
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
clutter_actor_set_allocation (actor, box, flags);
if (priv->icon_texture)
{
ClutterActorBox content_box;
st_theme_node_get_content_box (theme_node, box, &content_box);
/* Center the texture in the allocation; scaling up the icon from the size
* we loaded it at is just a bad idea and probably accidental. Main downside
* of doing this is that it may not be obvious that they have to turn off
* fill to align the icon non-centered in the parent container.
*
* We don't use clutter_actor_allocate_align_fill() for a bit of efficiency
* and because we expect to get rid of the child actor in favor of a
* CoglTexture in the future.
*/
content_box.x1 = (int)(0.5 + content_box.x1 + (content_box.x2 - content_box.x1 - priv->icon_size) / 2.);
content_box.x2 = content_box.x1 + priv->icon_size;
content_box.y1 = (int)(0.5 + content_box.y1 + (content_box.y2 - content_box.y1 - priv->icon_size) / 2.);
content_box.y2 = content_box.y1 + priv->icon_size;
clutter_actor_allocate (priv->icon_texture, &content_box, flags);
}
}
static void
st_icon_paint (ClutterActor *actor)
{
@ -307,9 +238,6 @@ st_icon_class_init (StIconClass *klass)
object_class->set_property = st_icon_set_property;
object_class->dispose = st_icon_dispose;
actor_class->get_preferred_height = st_icon_get_preferred_height;
actor_class->get_preferred_width = st_icon_get_preferred_width;
actor_class->allocate = st_icon_allocate;
actor_class->paint = st_icon_paint;
widget_class->style_changed = st_icon_style_changed;
@ -338,8 +266,14 @@ st_icon_class_init (StIconClass *klass)
static void
st_icon_init (StIcon *self)
{
ClutterLayoutManager *layout_manager;
self->priv = ST_ICON_GET_PRIVATE (self);
layout_manager = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FILL,
CLUTTER_BIN_ALIGNMENT_FILL);
clutter_actor_set_layout_manager (CLUTTER_ACTOR (self), layout_manager);
self->priv->icon_size = DEFAULT_ICON_SIZE;
self->priv->prop_icon_size = -1;
@ -397,6 +331,8 @@ st_icon_finish_update (StIcon *icon)
{
priv->icon_texture = priv->pending_texture;
priv->pending_texture = NULL;
clutter_actor_set_x_align (priv->icon_texture, CLUTTER_ACTOR_ALIGN_CENTER);
clutter_actor_set_y_align (priv->icon_texture, CLUTTER_ACTOR_ALIGN_CENTER);
clutter_actor_add_child (CLUTTER_ACTOR (icon), priv->icon_texture);
/* Remove the temporary ref we added */
@ -430,6 +366,9 @@ st_icon_update (StIcon *icon)
StIconPrivate *priv = icon->priv;
StThemeNode *theme_node;
StTextureCache *cache;
gint scale;
ClutterActor *stage;
StThemeContext *context;
if (priv->pending_texture)
{
@ -443,13 +382,18 @@ st_icon_update (StIcon *icon)
if (theme_node == NULL)
return;
stage = clutter_actor_get_stage (CLUTTER_ACTOR (icon));
context = st_theme_context_get_for_stage (CLUTTER_STAGE (stage));
g_object_get (context, "scale-factor", &scale, NULL);
cache = st_texture_cache_get_default ();
if (priv->gicon)
{
priv->pending_texture = st_texture_cache_load_gicon (cache,
theme_node,
priv->gicon,
priv->icon_size);
priv->icon_size,
scale);
}
if (priv->pending_texture)
@ -483,7 +427,19 @@ st_icon_update_icon_size (StIcon *icon)
if (priv->prop_icon_size > 0)
new_size = priv->prop_icon_size;
else if (priv->theme_icon_size > 0)
new_size = priv->theme_icon_size;
{
gint scale;
ClutterActor *stage;
StThemeContext *context;
/* The theme will give us an already-scaled size, so we
* undo it here, as priv->icon_size is in unscaled pixels.
*/
stage = clutter_actor_get_stage (CLUTTER_ACTOR (icon));
context = st_theme_context_get_for_stage (CLUTTER_STAGE (stage));
g_object_get (context, "scale-factor", &scale, NULL);
new_size = (gint) (priv->theme_icon_size / scale);
}
else
new_size = DEFAULT_ICON_SIZE;

View File

@ -909,6 +909,7 @@ static ClutterActor *
load_gicon_with_colors (StTextureCache *cache,
GIcon *icon,
gint size,
gint scale,
StIconColors *colors)
{
AsyncTextureLoadData *request;
@ -922,7 +923,7 @@ load_gicon_with_colors (StTextureCache *cache,
/* Do theme lookups in the main thread to avoid thread-unsafety */
theme = cache->priv->icon_theme;
info = gtk_icon_theme_lookup_by_gicon (theme, icon, size, GTK_ICON_LOOKUP_USE_BUILTIN);
info = gtk_icon_theme_lookup_by_gicon_for_scale (theme, icon, size, scale, GTK_ICON_LOOKUP_USE_BUILTIN);
if (info == NULL)
return NULL;
@ -936,8 +937,8 @@ load_gicon_with_colors (StTextureCache *cache,
if (colors)
{
/* This raises some doubts about the practice of using string keys */
key = g_strdup_printf (CACHE_PREFIX_ICON "%s,size=%d,colors=%2x%2x%2x%2x,%2x%2x%2x%2x,%2x%2x%2x%2x,%2x%2x%2x%2x",
gicon_string, size,
key = g_strdup_printf (CACHE_PREFIX_ICON "%s,size=%d,scale=%d,colors=%2x%2x%2x%2x,%2x%2x%2x%2x,%2x%2x%2x%2x,%2x%2x%2x%2x",
gicon_string, size, scale,
colors->foreground.red, colors->foreground.blue, colors->foreground.green, colors->foreground.alpha,
colors->warning.red, colors->warning.blue, colors->warning.green, colors->warning.alpha,
colors->error.red, colors->error.blue, colors->error.green, colors->error.alpha,
@ -945,13 +946,13 @@ load_gicon_with_colors (StTextureCache *cache,
}
else
{
key = g_strdup_printf (CACHE_PREFIX_ICON "%s,size=%d",
gicon_string, size);
key = g_strdup_printf (CACHE_PREFIX_ICON "%s,size=%d,scale=%d",
gicon_string, size, scale);
}
g_free (gicon_string);
texture = (ClutterActor *) create_default_texture ();
clutter_actor_set_size (texture, size, size);
clutter_actor_set_size (texture, size * scale, size * scale);
if (ensure_request (cache, key, policy, &request, texture))
{
@ -969,7 +970,7 @@ load_gicon_with_colors (StTextureCache *cache,
request->policy = policy;
request->colors = colors ? st_icon_colors_ref (colors) : NULL;
request->icon_info = info;
request->width = request->height = size;
request->width = request->height = size * scale;
request->enforced_square = TRUE;
load_texture_async (cache, request);
@ -985,6 +986,7 @@ load_gicon_with_colors (StTextureCache *cache,
* if the icon must not be recolored
* @icon: the #GIcon to load
* @size: Size of themed
* @scale: Scale factor of display
*
* This method returns a new #ClutterActor for a given #GIcon. If the
* icon isn't loaded already, the texture will be filled
@ -996,9 +998,10 @@ ClutterActor *
st_texture_cache_load_gicon (StTextureCache *cache,
StThemeNode *theme_node,
GIcon *icon,
gint size)
gint size,
gint scale)
{
return load_gicon_with_colors (cache, icon, size, theme_node ? st_theme_node_get_icon_colors (theme_node) : NULL);
return load_gicon_with_colors (cache, icon, size, scale, theme_node ? st_theme_node_get_icon_colors (theme_node) : NULL);
}
static ClutterActor *

View File

@ -83,7 +83,8 @@ ClutterActor *st_texture_cache_bind_pixbuf_property (StTextureCache *cache,
ClutterActor *st_texture_cache_load_gicon (StTextureCache *cache,
StThemeNode *theme_node,
GIcon *icon,
gint size);
gint size,
gint scale);
ClutterActor *st_texture_cache_load_uri_async (StTextureCache *cache,
const gchar *uri,

View File

@ -34,6 +34,8 @@ struct _StThemeContext {
/* set of StThemeNode */
GHashTable *nodes;
int scale_factor;
};
struct _StThemeContextClass {
@ -42,6 +44,12 @@ struct _StThemeContextClass {
#define DEFAULT_FONT "sans-serif 10"
enum
{
PROP_0,
PROP_SCALE_FACTOR
};
enum
{
CHANGED,
@ -57,6 +65,15 @@ static void on_icon_theme_changed (StTextureCache *cache,
StThemeContext *context);
static void st_theme_context_changed (StThemeContext *context);
static void st_theme_context_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void st_theme_context_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void
st_theme_context_finalize (GObject *object)
{
@ -86,8 +103,23 @@ st_theme_context_class_init (StThemeContextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->set_property = st_theme_context_set_property;
object_class->get_property = st_theme_context_get_property;
object_class->finalize = st_theme_context_finalize;
/**
* StThemeContext:scale-factor:
*
* The scaling factor used or high dpi scaling.
*/
g_object_class_install_property (object_class,
PROP_SCALE_FACTOR,
g_param_spec_int ("scale-factor",
"Scale factor",
"Integer scale factor used for high dpi scaling",
0, G_MAXINT, 1,
G_PARAM_READABLE | G_PARAM_WRITABLE));
signals[CHANGED] =
g_signal_new ("changed",
G_TYPE_FROM_CLASS (klass),
@ -114,6 +146,53 @@ st_theme_context_init (StThemeContext *context)
context->nodes = g_hash_table_new_full ((GHashFunc) st_theme_node_hash,
(GEqualFunc) st_theme_node_equal,
g_object_unref, NULL);
context->scale_factor = 1;
}
static void
st_theme_context_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
StThemeContext *context = ST_THEME_CONTEXT (object);
switch (prop_id)
{
case PROP_SCALE_FACTOR:
{
int scale_factor = g_value_get_int (value);
if (scale_factor != context->scale_factor)
{
context->scale_factor = scale_factor;
st_theme_context_changed (context);
}
break;
}
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
st_theme_context_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
StThemeContext *context = ST_THEME_CONTEXT (object);
switch (prop_id)
{
case PROP_SCALE_FACTOR:
g_value_set_int (value, context->scale_factor);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
/**

View File

@ -1015,6 +1015,9 @@ get_length_from_term (StThemeNode *node,
} type = ABSOLUTE;
double multiplier = 1.0;
int scale_factor;
g_object_get (node->context, "scale-factor", &scale_factor, NULL);
if (term->type != TERM_NUMBER)
{
@ -1028,7 +1031,7 @@ get_length_from_term (StThemeNode *node,
{
case NUM_LENGTH_PX:
type = ABSOLUTE;
multiplier = 1;
multiplier = 1 * scale_factor;
break;
case NUM_LENGTH_PT:
type = POINTS;

View File

@ -46,6 +46,9 @@
#include <gtk/gtk.h>
#include <atk/atk-enum-types.h>
/* This is set in stone and also hard-coded in GDK. */
#define VIRTUAL_CORE_POINTER_ID 2
/*
* Forward declaration for sake of StWidgetChild
*/
@ -1722,8 +1725,7 @@ st_widget_sync_hover (StWidget *widget)
ClutterActor *pointer_actor;
device_manager = clutter_device_manager_get_default ();
pointer = clutter_device_manager_get_core_device (device_manager,
CLUTTER_POINTER_DEVICE);
pointer = clutter_device_manager_get_device (device_manager, VIRTUAL_CORE_POINTER_ID);
pointer_actor = clutter_input_device_get_pointer_actor (pointer);
if (pointer_actor)
st_widget_set_hover (widget, clutter_actor_contains (CLUTTER_ACTOR (widget), pointer_actor));