Compare commits

..

34 Commits
3.1.3 ... 3.0.2

Author SHA1 Message Date
73f7991264 Bump version to 3.0.2
Update NEWS
2011-05-25 15:26:34 -04:00
976f26cb26 StTextureCache: Fix leak of key string
Also micro-optimize by avoiding another strdup(), instead pass
ownership of the string when we can.

https://bugzilla.gnome.org/show_bug.cgi?id=649508
2011-05-25 14:17:07 -04:00
1278e31b65 StTextureCache: plug leak in not-found icon case
Need to free the key too.

https://bugzilla.gnome.org/show_bug.cgi?id=649508
2011-05-25 14:16:29 -04:00
92f27a3c00 st-scroll-view: remove spurious assignment of uninitialized data
https://bugzilla.gnome.org/show_bug.cgi?id=649596
2011-05-25 14:12:25 -04:00
28667a686d workspace: Use Main.uiGroup instead of global.stage
The mouse-wheel zoom "easter egg" broke when using the magnifier
because it was using global.stage. Fix it to use Main.uiGroup instead.

https://bugzilla.gnome.org/show_bug.cgi?id=649632
2011-05-25 14:12:19 -04:00
783683a12c workspacesView: Don't change opacity during dnd
We used used to indicate to the user the ability to move to another workspace
during dnd by highligthing the adjacent workspaces on hover.

This was done by changing the workspace's opacity to 200 and set it to
255 for the highlighted adjacent ones.

This is now no longer needed as the design was completely changed since
then (overview relayout; we no longer represent workspaces in the way
we did before) and introduces a bug where we don't properly reset the
opacity after the drag action, so just remove that code.

https://bugzilla.gnome.org/show_bug.cgi?id=648983
2011-05-25 14:12:11 -04:00
fc70446050 history: Fix navigation when entering a repeat
If the user typed "a", hit up, and pressed enter again, we wouldn't re-set the
history pointer to the end, so the broken navigation would instead go to the
entry before that.

https://bugzilla.gnome.org/show_bug.cgi?id=648765
2011-05-25 14:12:01 -04:00
70ab08aefd workspace: End zooming when starting a window drag
The mouse-wheel zooming "easter egg" breaks horribly when you
drag a window, due to ugly lightbox reparenting tricks it uses.

For now, just end any zoom before we drag the window around.

https://bugzilla.gnome.org/show_bug.cgi?id=649632
2011-05-25 14:11:52 -04:00
ca6308ae64 shell-app: Fix a case where last_user_time isn't updated.
When activating an uninteresting window, the last_user_time isn't updated,
because we aren't tracking the window that the user_time gets updated on.
Hack around this by setting the last_user_time in shell_app_activate when
activating an uninteresting window.

https://bugzilla.gnome.org/show_bug.cgi?id=643302
2011-05-25 14:11:46 -04:00
4dcbb84f06 network: fix modem connected state check
There is no CONNECTED state for devices, it's ACTIVATED.

https://bugzilla.gnome.org/show_bug.cgi?id=650124
2011-05-25 14:11:40 -04:00
f4e6f7074e panel: Don't propagate button-release-event in _onCornerClicked()
Since both the hot corner's ClutterGroup and the hot corner's
ClutterRectangle button-release-event is connected to
_onCornerClicked() we must handle it there by returning 'true' to
Clutter or else _onCornerClicked() is called twice which defeats the
HOT_CORNER_ACTIVATION_TIMEOUT logic.

https://bugzilla.gnome.org/show_bug.cgi?id=649427
2011-05-25 14:11:17 -04:00
0d92f2b0c5 telepathyClient: don't update notifications for outgoing messages
If you receive a message, a notification will appear. If you reply in
Empathy's chat window before the notification disappears, the
notification is updated with the contents of the message you *just*
sent! We should only update notifications if they're incoming.

https://bugzilla.gnome.org/show_bug.cgi?id=650219

Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
2011-05-25 14:11:13 -04:00
2afb4cc124 PopupSliderMenuItem: intercept clicks outside the slider
Connect to button-press-event on the menu item actor, not on the
slider, so any part that is highlighted is also clicked. This means
that click on the left of the volume slider is a rapid way to mute.

https://bugzilla.gnome.org/show_bug.cgi?id=646660
2011-05-25 14:11:09 -04:00
762b0e45e0 network: request that nm-applet show the mobile broadband wizard
Use nm-applet 0.8.999 API to call the mobile broadband wizard and
activate the new connection.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=649318
2011-05-25 14:10:45 -04:00
a7acd3b535 network: fix initial connections to WPA[2] Enterprise APs
Call out to nm-applet to do the dirty work since the dialog of
doom is pretty complicated and we don't have a JS equivalent
of it for now.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=648171
2011-05-25 14:10:24 -04:00
ccc4b20e83 network: fix handling of AP flags and enhance for 802.1x
All WPA APs were getting set as WPA2 due to the check for privacy;
WPA/WPA2 APs *must* set the Privacy bit according to the standard,
so we'd never end up in the case for NMAccessPointSecurity.WPA.

Fix that, and also add flags for WPA[2] Enterprise which we'll
use a bit later for the first-time connect case for 802.1x enabled
access points.
2011-05-25 14:08:22 -04:00
8dd45bea1c network: simplify connection sorting by using libnm-glib functions
Instead of rolling our own code, use new libnm-glib functions to do
the same thing.  Requires libnm-glib as of
779215c742bbe29a2c66202ec7e2e6d43edeb8ff (which will be part of 0.9).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=648648
2011-05-25 14:08:19 -04:00
0c80f8cec4 Updated Irish translation. 2011-05-23 02:09:38 -06:00
27508864bf vi.po: new translation for "dash" 2011-05-22 21:50:39 +07:00
117be3b14d Updated Irish translation. 2011-05-22 04:35:00 -06:00
4bc2f9b5e6 Updated Persian translation 2011-05-17 00:54:40 +04:30
ba5c45deaf st-private: Correct fix for memory leak
The previous fix in 72f9f482d was wrong; we need to keep around
the buffer until cairo is done with the pattern.

https://bugzilla.gnome.org/show_bug.cgi?id=649497
2011-05-12 14:44:10 -04:00
941246a4f0 st-private: Fix memory leak
==13810== 11,360 bytes in 1 blocks are definitely lost in loss record 18,574 of 18,765
==13810==    at 0x4005447: calloc (vg_replace_malloc.c:467)
==13810==    by 0x5191882: standard_calloc (gmem.c:107)
==13810==    by 0x51920A7: g_malloc0 (gmem.c:196)
==13810==    by 0x4056201: blur_pixels (st-private.c:466)
==13810==    by 0x40573B4: _st_create_shadow_cairo_pattern (st-private.c:710)
==13810==    by 0x4070746: st_theme_node_paint (st-theme-node-drawing.c:856)
==13810==    by 0x3FEFFFFF: ???

https://bugzilla.gnome.org/show_bug.cgi?id=649497
2011-05-12 14:44:07 -04:00
7feef56656 shell-xfixes-cursor: missing XFree
memory returned by XFixesGetCursorImage should be freed after usage.
https://bugzilla.gnome.org/show_bug.cgi?id=642652
2011-05-12 14:24:34 -04:00
9a2a07f32a Updated Norwegian bokmål translation from Sigurd Gartmann 2011-05-11 22:49:11 +02:00
af9594c902 Finnish date/time fixes from Marko Myllynen. Full usage however depends on getting bugs #647320 / #648678 in g_date_time_format fixed. 2011-05-05 18:04:51 +03:00
569008b084 appDisplay: Fix off-by-one when incrementally adding application icons
A "cosmetic" code arrangement I requested in code review resulted
in one too few items being removed from the queue for each incremental
chunk of icons added. Fix.

https://bugzilla.gnome.org/show_bug.cgi?id=648739
2011-05-03 08:53:08 -04:00
0e086563bc Added UG translation 2011-05-02 18:45:55 +02:00
91d4a832ad Added UG translation 2011-05-02 18:44:55 +02:00
832ce362f0 Added UG translation 2011-05-02 18:40:46 +02:00
aa04e453b8 Added UG translation 2011-05-02 18:40:09 +02:00
b0a75aed95 Added UG translation 2011-05-02 07:27:26 +02:00
dba97f36c0 Added Slovak translation 2011-04-27 09:01:55 +02:00
2560b37819 Updated Swedish translation 2011-04-26 23:10:51 +02:00
117 changed files with 5571 additions and 12139 deletions

6
.gitignore vendored
View File

@ -3,7 +3,6 @@
*.o
.deps
.libs
ABOUT-NLS
ChangeLog
INSTALL
Makefile
@ -30,13 +29,8 @@ m4/
omf.make
po/*.gmo
po/gnome-shell.pot
po/*.header
po/*.sed
po/*.sin
po/Makefile.in.in
po/Makevars.template
po/POTFILES
po/Rules-quot
po/stamp-it
scripts/launcher.pyc
src/*.gir

View File

@ -3,5 +3,5 @@ E-mail: otaylor@redhat.com
Userid: otaylor
Colin Walters
E-mail: walters@verbum.org
E-mail: walters@redhat.com
Userid: walters

84
NEWS
View File

@ -1,86 +1,6 @@
3.1.2
=====
* Fix problem with "user theme extension" breaking the CSS for other
extensions [Giovanni; #650971]
* Telepathy IM framework integration
- Switch to using telepathy-glib rather than talking to
Telepathy via D-Bus [Guillaume, Jasper; #645585, #649633, #651138, #651227]
- Acknowledge messages when the user clicks on them [Guillaume, #647893]
- Fix problem with telepathy icon blinking for incoming messages
even though the user has been notified of them [Guillaume; #643594]
* Networking
- keep wirelesss networks in predictable order [Giovanni; #646580, #652313]
- Show unmanaged devices in the menu [Giovanni; #646946]
- Fix overflow when too many VPN connections [Giovanni; #651602]
* Bluetooth
- Show "hardware disabled" when disabled by rfkill [Giovanni; #648048]
- Fix bug updating status of devices [Giovanni; #647565]
* LookingGlass console:
- Add a "Memory" tab [Colin; #650692]
- Make escape work from any page [Dan Winship; #647303]
- Provide a way to refer to panel items as, e.g.,
Main.panel._activities [Dan Winship; #646915]
* User menu
- Fix problem with suspend menu option locking the screen even when the user
disabled that. [Florian; #652327]
- Hide "power off..." option if shutdown is disabled via PolicyKit
[Florian; #652038]
* Track changes to WM_CLASS (fixes problems with LibreOffice tracking)
[Colin; #649315]
* Remove app tracking workarounds for Firefox and LibreOffice [Colin; #651015]
* Use upstream gettext autoconfigury rather than glib version [Javier; #631576]
* Show messages in the message tray when an application is fullscreen
[Dan Winship; #608667]
* Don't autohide the workspace pager if there is more than one workspace
[Florian; #652714, #653078, #653142]
* Don't always slide out the workspace pager at drag begin [Florian; #652730]
* Only offer to remove a favorite app when dragging it's icon [Owen; #642895]
* Allow dropping an icon anywhere on a workspace [Adel; #652079]
* st-scroll-view: Make the fade effect and offset themable [Jasper; #651813]
* Obey the user's preference when running an application in a terminal
from the run dialog [Florian; #648422]
* Consistently exit overview when launching external applications
[Colin; #653095]
* Adapt to changes in GJS for how GObject APIs are bound
[Alex, Colin, Florian, Jasper, Marc-Antoine; #649981, #652597]
* Fix problems with scrolling in overflow for alt-Tab switcher
[Dan Winship, Adel; #647807]
* Mark relationships between labels and actors for accessibility [Alejandro]
* Add org.gnome.shell.enabled-extensions complementing disabled-extensions
GSetting [Tassilo; #651088]
* Visual tweaks [Jakub, Jasper; #646261, #652715]
* Switch to building against clutter-1.7 with independent Cogl [Adel; #653397]
* Code cleanups [Colin, Dan Winship, Florian; #633620, #645031, #648755, #648758,
#648760, #649203, #649517, #650317, #652730]
* Memory leak fixes [Colin, Maxim; #649508, #650934]
* Build Fixes [Colin, Dan Winship, Florian, Ionut, Morten, Owen, Sean; #647395,
#648006, #650869, #653199, #653275
* Miscellaneous bug fixes [Adam, Adel, Dan Williams, Dan Winship, Florian,
Ionut, Jasper, Maxim, Ray; #620105, #639459, #641570, #642793, #643513,
#645848, #646919, #647186, #648305, #648410, #648562, #648894, #649001,
#645990, #647893, #647907, #651012, #651086, #651606, #651569, #651866,
#652388, #653511]
Contributors:
Ionut Biru, Giovanni Campagna, Guillaume Desmottes, Adam Dingle,
Maxim Ermilov, Adel Gadllah, Tassilo Horn, Javier Jardón, Jonny Lamb,
Alexander Larsson, Rui Matos, Morten Mjelva, Florian Müllner,
Marc-Antoine Perennou, Alejandro Piñeiro, Jasper St. Pierre, Jakub Steiner,
Ray Strode, Owen Taylor, Colin Walters, Dan Williams, Sean Wilson, Dan Winship
Translations:
Daniel Martinez Cucalon [ar], Ihar Hrachyshka [be], Carles Ferrando,
Gil Forcada, Sílvia Miranda [ca], Kristjan Schmidt [eo], Jorge González,
Daniel Mustieles [es], Seán de Búrca [ga], Fran Diéguez [gl],
Yaron Shahrabani [he], Kjartan Maraas [nb], Misha Shnurapet,
Yuri Myasoedov [ru], Daniel Nylander [se], Peter Mráz [sk],
Matej Urbančič [sl], Krishnababu Krothapalli [te], Daniel Korostil [uk],
Aron Xu [zh_CN]
3.0.2
=====
* Network Menu [Dan Williams]
* Network Menu [Dan Williams
- Fix connecting to WPA2 Enterprise access points
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=648171
- Show the mobile broadband wizard when selecting 3G network
@ -103,7 +23,7 @@ Translations:
* Memory leak fixes [Colin, Maxim]
642652, 649508, 649497
* Miscellaneous minor bug fixes [Adel, Christopher, Jasper]
649596, 648765, 648983, 649632
649596,648765, 648983, 649632
Contributors:
Christopher Aillon, Giovanni Campagna, Maxim Ermilov,

View File

@ -1,5 +1,5 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell],[3.1.3],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_INIT([gnome-shell],[3.0.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/shell-global.c])
@ -23,16 +23,12 @@ AM_PROG_CC_C_O
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
# i18n
IT_PROG_INTLTOOL([0.40])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.17])
GETTEXT_PACKAGE=gnome-shell
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.])
IT_PROG_INTLTOOL(0.26)
AM_GLIB_GNU_GETTEXT
PKG_PROG_PKG_CONFIG([0.22])
@ -72,11 +68,11 @@ GTK_MIN_VERSION=3.0.0
GIO_MIN_VERSION=2.25.9
LIBECAL_MIN_VERSION=2.32.0
LIBEDATASERVER_MIN_VERSION=1.2.0
LIBEDATASERVERUI_MIN_VERSION=2.91.6
TELEPATHY_GLIB_MIN_VERSION=0.15.0
LIBEDATASERVERUI2_MIN_VERSION=1.2.0
LIBEDATASERVERUI3_MIN_VERSION=2.91.6
TELEPATHY_GLIB_MIN_VERSION=0.13.12
TELEPATHY_LOGGER_MIN_VERSION=0.2.4
POLKIT_MIN_VERSION=0.100
STARTUP_NOTIFICATION_MIN_VERSION=0.11
# Collect more than 20 libraries for a prize!
PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION
@ -88,7 +84,7 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION
gdk-x11-3.0
clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
libstartup-notification-1.0
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
libcanberra
telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
@ -115,20 +111,22 @@ saved_CFLAGS=$CFLAGS
saved_LIBS=$LIBS
CFLAGS=$GNOME_SHELL_CFLAGS
LIBS=$GNOME_SHELL_LIBS
AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier)
# sn_startup_sequence_get_application_id, we can replace with a version check later
AC_CHECK_FUNCS(JS_NewGlobalObject sn_startup_sequence_get_application_id XFixesCreatePointerBarrier)
CFLAGS=$saved_CFLAGS
LIBS=$saved_LIBS
PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 gnome-desktop-3.0 >= 2.90.0 x11)
PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 gnome-desktop-3.0 >= 2.90.0 x11)
PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-3.0)
PKG_CHECK_MODULES(TRAY, gtk+-3.0)
PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
PKG_CHECK_MODULES(JS_TEST, clutter-x11-1.0 gjs-1.0 gobject-introspection-1.0 gtk+-3.0)
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 0.1.7)
AC_MSG_CHECKING([for bluetooth support])
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
[BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0`
BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0`
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 2.90.0],
[BLUETOOTH_DIR=`$PKG_CONFIG --variable=libdir gnome-bluetooth-1.0`/gnome-bluetooth
BLUETOOTH_LIBS="-L'$BLUETOOTH_DIR' -lgnome-bluetooth-applet"
AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"])
AC_DEFINE_UNQUOTED([BLUETOOTH_DIR],["$BLUETOOTH_DIR"],[Path to installed GnomeBluetooth typelib and library])
AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet])
@ -138,7 +136,13 @@ PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
AC_SUBST([HAVE_BLUETOOTH],[0])
AC_MSG_RESULT([no])])
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION libedataserverui-3.0 >= $LIBEDATASERVERUI_MIN_VERSION gio-2.0)
# Default to libedataserverui-3.0, but allow falling back to 1.2
PKG_CHECK_EXISTS(libedataserverui-3.0,
[EDS_API=3.0
LIBEDATASERVERUI_MIN_VERSION=$LIBEDATASERVERUI3_MIN_VERSION],
[EDS_API=1.2
LIBEDATASERVERUI_MIN_VERSION=$LIBEDATASERVERUI2_MIN_VERSION])
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION libedataserverui-$EDS_API >= $LIBEDATASERVERUI_MIN_VERSION gio-2.0)
AC_SUBST(CALENDAR_SERVER_CFLAGS)
AC_SUBST(CALENDAR_SERVER_LIBS)

View File

@ -30,14 +30,26 @@ dist_theme_DATA = \
theme/filter-selected-ltr.svg \
theme/filter-selected-rtl.svg \
theme/gnome-shell.css \
theme/mosaic-view-active.svg \
theme/mosaic-view.svg \
theme/move-window-on-new.svg \
theme/panel-border.svg \
theme/panel-button-border.svg \
theme/panel-button-highlight-narrow.svg \
theme/panel-button-highlight-wide.svg \
theme/process-working.svg \
theme/running-indicator.svg \
theme/scroll-button-down-hover.png \
theme/scroll-button-down.png \
theme/scroll-button-up-hover.png \
theme/scroll-button-up.png \
theme/scroll-hhandle.svg \
theme/scroll-vhandle.svg \
theme/section-more.svg \
theme/section-more-open.svg \
theme/separator-white.png \
theme/single-view-active.svg \
theme/single-view.svg \
theme/source-button-border.svg \
theme/toggle-off-us.svg \
theme/toggle-off-intl.svg \

View File

@ -15,18 +15,8 @@
<default>[]</default>
<_summary>Uuids of extensions to disable</_summary>
<_description>
GNOME Shell extensions have a uuid property; this key lists extensions
which should not be loaded. This setting overrides enabled-extensions
for extensions that appear in both lists.
</_description>
</key>
<key name="enabled-extensions" type="as">
<default>[]</default>
<_summary>Uuids of extensions to enable</_summary>
<_description>
GNOME Shell extensions have a uuid property; this key lists extensions
which should be loaded. disabled-extensions overrides this setting for
extensions that appear in both lists.
GNOME Shell extensions have a uuid property;
this key lists extensions which should not be loaded.
</_description>
</key>
<key name="enable-app-monitoring" type="b">

View File

@ -39,11 +39,6 @@ StScrollBar
padding: 0px;
}
StScrollView.vfade
{
-st-vfade-offset: 68px;
}
StScrollView StScrollBar
{
min-width: 16px;
@ -187,7 +182,6 @@ StTooltip StLabel {
}
.popup-inactive-menu-item {
font-weight: normal;
color: #999;
}

View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="24"
height="16"
id="svg6503"
version="1.1"
inkscape:version="0.47pre4 r22446"
sodipodi:docname="mosaic-view-active.svg">
<defs
id="defs6505">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 16 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="32 : 16 : 1"
inkscape:persp3d-origin="16 : 10.666667 : 1"
id="perspective6511" />
<inkscape:perspective
id="perspective6494"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.197802"
inkscape:cx="-15.97056"
inkscape:cy="16"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1680"
inkscape:window-height="997"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1" />
<metadata
id="metadata6508">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-16)">
<g
style="display:inline;fill:#cbcbcb;fill-opacity:1"
transform="translate(-449.85476,-685.85869)"
id="g5306">
<rect
style="fill:#cbcbcb;fill-opacity:1;stroke:#000000;stroke-width:0.99999970000000005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.44262299999999999;stroke-dasharray:none"
id="rect5308"
width="11"
height="7"
x="450.5"
y="710.5"
rx="0.99999958"
ry="1" />
<rect
style="fill:#cbcbcb;fill-opacity:1;stroke:#000000;stroke-width:0.99999970000000005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.44262299999999999;stroke-dasharray:none;display:inline"
id="rect5310"
width="11"
height="7"
x="462.5"
y="702.5"
rx="0.99999958"
ry="1" />
<rect
style="fill:#cbcbcb;fill-opacity:1;stroke:#000000;stroke-width:0.99999976000000002;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.44262299999999999;stroke-dasharray:none;display:inline"
id="rect5312"
width="11"
height="7"
x="450.5"
y="702.5"
rx="0.99999958"
ry="1" />
<rect
style="fill:#cbcbcb;fill-opacity:1;stroke:#000000;stroke-width:0.99999970000000005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.44262299999999999;stroke-dasharray:none;display:inline"
id="rect5314"
width="11"
height="7"
x="462.5"
y="710.5"
rx="0.99999958"
ry="1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

113
data/theme/mosaic-view.svg Normal file
View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="24"
height="16"
id="svg6503"
version="1.1"
inkscape:version="0.47pre4 r22446"
sodipodi:docname="New document 19">
<defs
id="defs6505">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 16 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="32 : 16 : 1"
inkscape:persp3d-origin="16 : 10.666667 : 1"
id="perspective6511" />
<inkscape:perspective
id="perspective6494"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.197802"
inkscape:cx="16"
inkscape:cy="16"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1680"
inkscape:window-height="997"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1" />
<metadata
id="metadata6508">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-16)">
<g
style="display:inline"
transform="translate(-449.85476,-685.85869)"
id="g5306">
<rect
style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.442623;stroke-dasharray:none"
id="rect5308"
width="11"
height="7"
x="450.5"
y="710.5"
rx="0.99999958"
ry="1" />
<rect
style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.442623;stroke-dasharray:none;display:inline"
id="rect5310"
width="11"
height="7"
x="462.5"
y="702.5"
rx="0.99999958"
ry="1" />
<rect
style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:0.99999976;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.442623;stroke-dasharray:none;display:inline"
id="rect5312"
width="11"
height="7"
x="450.5"
y="702.5"
rx="0.99999958"
ry="1" />
<rect
style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:0.9999997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.442623;stroke-dasharray:none;display:inline"
id="rect5314"
width="11"
height="7"
x="462.5"
y="710.5"
rx="0.99999958"
ry="1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="98"
height="98"
id="svg6375"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="add-workspace.svg">
<defs
id="defs6377">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 16 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="32 : 16 : 1"
inkscape:persp3d-origin="16 : 10.666667 : 1"
id="perspective6383" />
<inkscape:perspective
id="perspective6366"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.9590209"
inkscape:cx="56.650687"
inkscape:cy="20.635343"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1680"
inkscape:window-height="997"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1" />
<metadata
id="metadata6380">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,66)">
<g
id="g2824"
transform="matrix(11.568551,0,0,11.698271,-78.828159,-304.81518)">
<path
style="fill:none;stroke:#666666;stroke-width:1.99999952;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 11.07363,21.36834 0,6.43903"
id="path5322" />
<path
style="fill:none;stroke:#666666;stroke-width:1.99999952;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
d="m 14.29314,24.58786 -6.43902,0"
id="path5324" />
</g>
<path
style="fill:#000000;fill-opacity:0.98823529"
d="m 48.239516,97.908047 c -0.41677,-0.05102 -1.269253,-0.222408 -1.894408,-0.380859 -4.088493,-1.036262 -7.520781,-4.753234 -8.330163,-9.021094 -0.154947,-0.817026 -0.257819,-6.68112 -0.257819,-14.696556 l 0,-13.337088 -13.829177,-0.08909 C 10.802042,60.298796 10.026884,60.268266 8.6851548,59.783022 3.6288503,57.954375 0.62673331,53.828648 0.62673331,48.708554 c 0,-5.625522 4.25936019,-10.425065 9.97721469,-11.242548 0.987903,-0.141242 7.368912,-0.254994 14.460646,-0.257791 l 12.692532,-0.005 0,-13.586668 c 0,-14.6441583 0.03287,-15.0698926 1.364686,-17.6753047 2.185477,-4.2754229 6.938193,-6.75739913 11.687647,-6.10355607 3.382776,0.46569661 6.737962,2.72496967 8.414081,5.66577137 1.480816,2.5981315 1.519067,3.0522448 1.519067,18.0333334 l 0,13.666424 12.692533,0.005 c 7.091733,0.0028 13.472742,0.116549 14.460646,0.257791 6.395303,0.914337 10.804785,6.623716 9.941157,12.871766 -0.698243,5.051565 -4.792685,9.104635 -9.941157,9.840713 -0.987904,0.141242 -7.368913,0.254995 -14.460646,0.257791 l -12.692533,0.005 0,13.801945 c 0,13.031417 -0.02798,13.895893 -0.501177,15.484801 -1.526902,5.127058 -6.919246,8.802262 -12.001914,8.18002 z"
id="path2828"
transform="translate(0,-66)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -2,62 +2,24 @@
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="119.97824"
height="119.97824"
id="svg7355"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="running-indicator.svg">
<metadata
id="metadata4175">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#2c1cff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1141"
id="namedview4173"
showgrid="false"
inkscape:zoom="8.1348081"
inkscape:cx="81.120662"
inkscape:cy="58.117986"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1"
inkscape:current-layer="g30864" />
version="1.1">
<defs
id="defs7357">
<radialGradient
xlink:href="#linearGradient36429"
id="radialGradient7461"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.011539,0,0,0.57582113,-0.39262194,71.83807)"
cx="47.428951"
cy="167.16817"
fx="47.428951"
fy="167.16817"
gradientTransform="matrix(1.0525552,0,0,1.0525552,-2.5162753,-9.0000838)"
cx="47.878681"
cy="171.25"
fx="47.878681"
fy="171.25"
r="37" />
<linearGradient
id="linearGradient36429">
@ -97,7 +59,7 @@
fx="49.067139"
cy="242.50381"
cx="49.067139"
gradientTransform="matrix(1.1891549,0,0,0.15252127,-9.281289,132.52772)"
gradientTransform="matrix(1.1891549,0,0,0.55513246,-9.281289,36.12653)"
gradientUnits="userSpaceOnUse"
id="radialGradient7488"
xlink:href="#linearGradient36471" />
@ -110,21 +72,19 @@
id="g30864"
transform="translate(255.223,70.118091)">
<rect
ry="3.4593496"
rx="3.4593496"
y="99.596962"
x="12.596948"
height="71.116341"
width="71.116341"
ry="3.5996203"
rx="3.5996203"
y="98"
x="11"
height="74"
width="74"
id="rect14000"
style="opacity:0.37187500000000001;fill:url(#radialGradient7461);fill-opacity:1;stroke:none" />
style="opacity:0.371875;fill:url(#radialGradient7461);fill-opacity:1;stroke:none" />
<path
id="rect34520"
d="m 83.273151,166.72152 c 0,1.96759 -1.584022,3.55163 -3.551629,3.55163 l -63.443032,0 c -1.967608,0 -3.551648,-1.58402 -3.551643,-3.55164 0,-5.85318 0,-5.85318 0,0"
style="opacity:0.35;fill:none;stroke:url(#radialGradient7488);stroke-width:1;stroke-opacity:1"
connector-curvature="0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscc" />
d="m 84.506708,167.95508 c 6e-6,1.96759 -1.584022,3.55162 -3.551629,3.55163 l -65.910146,0 c -1.967608,-1e-5 -3.551648,-1.58402 -3.551643,-3.55164"
style="opacity:0.2;fill:none;stroke:url(#radialGradient7488);stroke-width:1;stroke-opacity:1"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="5.8600588"
height="9"
id="svg3647"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="section-more.svg">
<defs
id="defs3649">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective3655" />
<inkscape:perspective
id="perspective3603"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="82.777778"
inkscape:cx="2.9300294"
inkscape:cy="5.466443"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1680"
inkscape:window-height="997"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1" />
<metadata
id="metadata3652">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-262.78425,-490.71933)">
<path
transform="matrix(0,-0.98149546,0.71467449,0,25.404986,578.15569)"
d="M 88.830127,340 80.169873,340 84.5,332.5 88.830127,340 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="true"
sodipodi:arg2="1.5707963"
sodipodi:arg1="0.52359878"
sodipodi:r2="2.5"
sodipodi:r1="5"
sodipodi:cy="337.5"
sodipodi:cx="84.5"
sodipodi:sides="3"
id="path5497-5"
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.59699643;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
sodipodi:type="star" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

87
data/theme/section-more.svg Executable file
View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="5.8600588"
height="9"
id="svg3647"
version="1.1"
inkscape:version="0.46+devel"
sodipodi:docname="New document 6">
<defs
id="defs3649">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective3655" />
<inkscape:perspective
id="perspective3603"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="112.21575"
inkscape:cy="-32.642856"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="609"
inkscape:window-height="501"
inkscape:window-x="164"
inkscape:window-y="26"
inkscape:window-maximized="0" />
<metadata
id="metadata3652">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-262.78425,-490.71933)">
<path
transform="matrix(0,0.98149546,-0.71467449,0,506.02358,412.28296)"
d="M 88.830127,340 80.169873,340 84.5,332.5 88.830127,340 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="true"
sodipodi:arg2="1.5707963"
sodipodi:arg1="0.52359878"
sodipodi:r2="2.5"
sodipodi:r1="5"
sodipodi:cy="337.5"
sodipodi:cx="84.5"
sodipodi:sides="3"
id="path5497-5"
style="fill:#5f5f5f;fill-opacity:1;stroke:#5f5f5f;stroke-width:0.59699643;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
sodipodi:type="star" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="24"
height="16"
id="svg6446"
version="1.1"
inkscape:version="0.47pre4 r22446"
sodipodi:docname="single-view-active.svg">
<defs
id="defs6448">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 16 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="32 : 16 : 1"
inkscape:persp3d-origin="16 : 10.666667 : 1"
id="perspective6454" />
<inkscape:perspective
id="perspective6441"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.197802"
inkscape:cx="0.014720032"
inkscape:cy="16"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1680"
inkscape:window-height="997"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1" />
<metadata
id="metadata6451">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-17)">
<rect
ry="0.5"
rx="0.49999979"
y="17.483809"
x="0.53483802"
height="15"
width="23"
id="rect5304"
style="fill:#cccccc;fill-opacity:1;stroke:#cccccc;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="24"
height="16"
id="svg6446"
version="1.1"
inkscape:version="0.47pre4 r22446"
sodipodi:docname="single-view.svg">
<defs
id="defs6448">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 16 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="32 : 16 : 1"
inkscape:persp3d-origin="16 : 10.666667 : 1"
id="perspective6454" />
<inkscape:perspective
id="perspective6441"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.197802"
inkscape:cx="0.014720032"
inkscape:cy="16"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1680"
inkscape:window-height="997"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1" />
<metadata
id="metadata6451">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,-17)">
<rect
ry="0.5"
rx="0.49999979"
y="17.483809"
x="0.53483802"
height="15"
width="23"
id="rect5304"
style="fill:#626262;fill-opacity:1;stroke:#cccccc;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -13,8 +13,8 @@
height="22"
id="svg3199"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="toggle-on-intl.svg">
inkscape:version="0.47 r22583"
sodipodi:docname="New document 11">
<defs
id="defs3201">
<inkscape:perspective
@ -39,14 +39,14 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="49.147112"
inkscape:cy="17.532036"
inkscape:zoom="0.35"
inkscape:cx="32.500004"
inkscape:cy="10.999997"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1412"
inkscape:window-height="1067"
inkscape:window-width="609"
inkscape:window-height="501"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="0" />
@ -58,7 +58,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@ -72,7 +72,7 @@
transform="translate(-453.5,448.36218)"
id="g16453">
<rect
style="color:#000000;fill:#4a90d9;fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999994000000003;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
style="color:#000000;fill:#204a87;fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect16256-9-4"
width="63.000004"
height="19"

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -13,8 +13,8 @@
height="22"
id="svg2857"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="toggle-on-us.svg">
inkscape:version="0.47 r22583"
sodipodi:docname="New document 2">
<defs
id="defs2859">
<inkscape:perspective
@ -40,18 +40,16 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="19.689855"
inkscape:cy="2.0517979"
inkscape:cx="-69.642856"
inkscape:cy="42.428569"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="941"
inkscape:window-height="751"
inkscape:window-x="2577"
inkscape:window-y="206"
inkscape:window-maximized="0"
borderlayer="true"
inkscape:showpageshadow="false" />
inkscape:window-width="609"
inkscape:window-height="501"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="0" />
<metadata
id="metadata2862">
<rdf:RDF>
@ -60,7 +58,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@ -74,7 +72,7 @@
transform="translate(-351.35714,708.36218)"
id="g16453">
<rect
style="color:#000000;fill:#4a90d9;fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999994000000003;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
style="color:#000000;fill:#204a87;fill-opacity:1;fill-rule:nonzero;stroke:#3465a4;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect16256-9-4"
width="63.000004"
height="19"

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -109,8 +109,7 @@ const SessionManagerIface = {
name: 'org.gnome.SessionManager',
methods: [
{ name: 'Logout', inSignature: 'u', outSignature: '' },
{ name: 'Shutdown', inSignature: '', outSignature: '' },
{ name: 'CanShutdown', inSignature: '', outSignature: 'b' }
{ name: 'Shutdown', inSignature: '', outSignature: '' }
]
};

View File

@ -7,6 +7,9 @@ const Shell = imports.gi.Shell;
const Main = imports.ui.main;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
/* http://daringfireball.net/2010/07/improved_regex_for_matching_urls */
const _urlRegexp = new RegExp('\\b(([a-z][\\w-]+:(/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)([^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'\\".,<>?«»“”‘’]))', 'gi');
@ -45,7 +48,7 @@ function spawn(argv) {
// occur when trying to parse or start the program.
function spawnCommandLine(command_line) {
try {
let [success, argv] = GLib.shell_parse_argv(command_line);
let [success, argc, argv] = GLib.shell_parse_argv(command_line);
trySpawn(argv);
} catch (err) {
_handleSpawnError(command_line, err);
@ -85,10 +88,10 @@ function trySpawn(argv)
// Runs @command_line in the background. If launching @command_line
// fails, this will throw an error.
function trySpawnCommandLine(command_line) {
let success, argv;
let success, argc, argv;
try {
[success, argv] = GLib.shell_parse_argv(command_line);
[success, argc, argv] = GLib.shell_parse_argv(command_line);
} catch (err) {
// Replace "Error invoking GLib.shell_parse_argv: " with
// something nicer

View File

@ -87,7 +87,7 @@ AltTabPopup.prototype = {
let [childMinHeight, childNaturalHeight] = this._appSwitcher.actor.get_preferred_height(primary.width - hPadding);
let [childMinWidth, childNaturalWidth] = this._appSwitcher.actor.get_preferred_width(childNaturalHeight);
childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth);
childBox.x2 = Math.min(primary.x + primary.width - hPadding, childBox.x1 + childNaturalWidth);
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
childBox.y2 = childBox.y1 + childNaturalHeight;
this._appSwitcher.actor.allocate(childBox, flags);
@ -97,6 +97,8 @@ AltTabPopup.prototype = {
// those calculations
if (this._thumbnails) {
let icon = this._appIcons[this._currentApp].actor;
// Force a stage relayout to make sure we get the correct position
global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, 0, 0);
let [posX, posY] = icon.get_transformed_position();
let thumbnailCenter = posX + icon.width / 2;
let [childMinWidth, childNaturalWidth] = this._thumbnails.actor.get_preferred_width(-1);
@ -143,12 +145,6 @@ AltTabPopup.prototype = {
this._appIcons = this._appSwitcher.icons;
// Need to force an allocation so we can figure out whether we
// need to scroll when selecting
this.actor.opacity = 0;
this.actor.show();
this.actor.get_allocation_box();
// Make the initial selection
if (switch_group) {
if (backward) {
@ -178,6 +174,8 @@ AltTabPopup.prototype = {
return false;
}
this.actor.opacity = 0;
this.actor.show();
Tweener.addTween(this.actor,
{ opacity: 255,
time: POPUP_FADE_TIME,
@ -217,21 +215,33 @@ AltTabPopup.prototype = {
this._disableHover();
if (keysym == Clutter.Escape) {
this.destroy();
} else if (action == Meta.KeyBindingAction.SWITCH_GROUP) {
if (action == Meta.KeyBindingAction.SWITCH_GROUP)
this._select(this._currentApp, backwards ? this._previousWindow() : this._nextWindow());
} else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS) {
this._select(backwards ? this._previousApp() : this._nextApp());
} else if (this._thumbnailsFocused) {
if (keysym == Clutter.Left)
else if (keysym == Clutter.Escape)
this.destroy();
else if (this._thumbnailsFocused) {
if (action == Meta.KeyBindingAction.SWITCH_WINDOWS)
if (backwards) {
if (this._currentWindow == 0 || this._currentWindow == -1)
this._select(this._previousApp());
else
this._select(this._currentApp, this._previousWindow());
} else {
if (this._currentWindow == this._appIcons[this._currentApp].cachedWindows.length - 1)
this._select(this._nextApp());
else
this._select(this._currentApp, this._nextWindow());
}
else if (keysym == Clutter.Left)
this._select(this._currentApp, this._previousWindow());
else if (keysym == Clutter.Right)
this._select(this._currentApp, this._nextWindow());
else if (keysym == Clutter.Up)
this._select(this._currentApp, null, true);
} else {
if (keysym == Clutter.Left)
if (action == Meta.KeyBindingAction.SWITCH_WINDOWS)
this._select(backwards ? this._previousApp() : this._nextApp());
else if (keysym == Clutter.Left)
this._select(this._previousApp());
else if (keysym == Clutter.Right)
this._select(this._nextApp());
@ -573,7 +583,7 @@ SwitcherList.prototype = {
this._rightArrow.opacity = this._rightGradient.opacity;
},
addItem : function(item, label) {
addItem : function(item) {
let bbox = new St.Button({ style_class: 'item-box',
reactive: true });
@ -584,8 +594,6 @@ SwitcherList.prototype = {
bbox.connect('clicked', Lang.bind(this, function() { this._onItemClicked(n); }));
bbox.connect('enter-event', Lang.bind(this, function() { this._onItemEnter(n); }));
bbox.label_actor = label;
this._items.push(bbox);
},
@ -971,7 +979,7 @@ AppSwitcher.prototype = {
_addIcon : function(appIcon) {
this.icons.push(appIcon);
this.addItem(appIcon.actor, appIcon.label);
this.addItem(appIcon.actor);
let n = this._arrows.length;
let arrow = new St.DrawingArea({ style_class: 'switcher-arrow' });
@ -1041,12 +1049,9 @@ ThumbnailList.prototype = {
this._labels.push(bin);
bin.add_actor(name);
box.add_actor(bin);
this.addItem(box, name);
} else {
this.addItem(box, null);
}
this.addItem(box);
}
},

View File

@ -9,6 +9,8 @@ const Signals = imports.signals;
const Meta = imports.gi.Meta;
const St = imports.gi.St;
const Mainloop = imports.mainloop;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const AppFavorites = imports.ui.appFavorites;
const DND = imports.ui.dnd;
@ -44,7 +46,7 @@ AlphabeticalView.prototype = {
this.actor = new St.ScrollView({ x_fill: true,
y_fill: false,
y_align: St.Align.START,
style_class: 'vfade' });
vfade: true });
this.actor.add_actor(box);
this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
this.actor.connect('notify::mapped', Lang.bind(this,
@ -432,8 +434,6 @@ AppWellIcon.prototype = {
this.icon = new AppIcon(app, iconParams);
this.actor.set_child(this.icon.actor);
this.actor.label_actor = this.icon.label;
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
this.actor.connect('popup-menu', Lang.bind(this, this._onKeyboardPopupMenu));

View File

@ -3,6 +3,8 @@
const Shell = imports.gi.Shell;
const Lang = imports.lang;
const Signals = imports.signals;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Main = imports.ui.main;

View File

@ -8,6 +8,9 @@ const St = imports.gi.St;
const Signals = imports.signals;
const Pango = imports.gi.Pango;
const Gettext_gtk30 = imports.gettext.domain('gtk30');
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const C_ = Gettext.pgettext;
const Mainloop = imports.mainloop;
const Shell = imports.gi.Shell;

View File

@ -14,6 +14,7 @@ const Params = imports.misc.params;
// workspace content.
const defaultParams = {
visibleInOverview: false,
visibleInFullscreen: false,
affectsStruts: true,
affectsInputRegion: true
@ -72,8 +73,11 @@ Chrome.prototype = {
// in its visibility will affect the input region, but NOT the
// struts.
//
// If %visibleInFullscreen is %true, the actor will be visible
// even when a fullscreen window should be covering it.
// If %visibleInOverview is %true in @params, @actor will remain
// visible when the overview is brought up. Otherwise it will
// automatically be hidden. Likewise, if %visibleInFullscreen is
// %true, the actor will be visible even when a fullscreen window
// should be covering it.
//
// If %affectsStruts or %affectsInputRegion is %false, the actor
// will not have the indicated effect.
@ -92,7 +96,7 @@ Chrome.prototype = {
//
// @params can have any of the same values as in addActor(), though
// some possibilities don't make sense (eg, trying to have a
// %visibleInFullscreen child of a non-%visibleInFullscreen parent).
// %visibleInOverview child of a non-%visibleInOverview parent).
// By default, @actor has the same params as its chrome ancestor.
trackActor: function(actor, params) {
let ancestor = actor.get_parent();
@ -185,8 +189,10 @@ Chrome.prototype = {
_updateVisibility: function() {
for (let i = 0; i < this._trackedActors.length; i++) {
let actorData = this._trackedActors[i];
if (!this._inOverview && !actorData.visibleInFullscreen &&
this._findMonitorForActor(actorData.actor).inFullscreen)
if (this._inOverview && !actorData.visibleInOverview)
this.actor.set_skip_paint(actorData.actor, true);
else if (!this._inOverview && !actorData.visibleInFullscreen &&
this._findMonitorForActor(actorData.actor).inFullscreen)
this.actor.set_skip_paint(actorData.actor, true);
else
this.actor.set_skip_paint(actorData.actor, false);
@ -329,6 +335,11 @@ Chrome.prototype = {
this._updateVisibility();
this._queueUpdateRegions();
}
// Figure out where the pointer is in case we lost track of
// it during a grab. (In particular, if a trayicon popup menu
// is dismissed, see if we need to close the message tray.)
global.sync_pointer();
},
_updateRegions: function() {

View File

@ -323,6 +323,6 @@ CtrlAltTabSwitcher.prototype = {
let text = new St.Label({ text: item.name });
box.add(text, { x_fill: false });
this.addItem(box, text);
this.addItem(box);
}
};

View File

@ -6,6 +6,8 @@ const Lang = imports.lang;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const AppDisplay = imports.ui.appDisplay;
const AppFavorites = imports.ui.appFavorites;
@ -324,7 +326,7 @@ Dash.prototype = {
this._favRemoveTarget = null;
}));
}
DND.removeDragMonitor(this._dragMonitor);
DND.removeMonitor(this._dragMonitor);
},
_onDragMotion: function(dragEvent) {
@ -342,10 +344,7 @@ Dash.prototype = {
let srcIsFavorite = (id in favorites);
if (srcIsFavorite &&
dragEvent.source.actor &&
this.actor.contains (dragEvent.source.actor) &&
this._favRemoveTarget == null) {
if (srcIsFavorite && this._favRemoveTarget == null) {
this._favRemoveTarget = new RemoveFavoriteIcon();
this._favRemoveTarget.icon.setIconSize(this.iconSize);
this._box.add(this._favRemoveTarget.actor);

View File

@ -8,6 +8,8 @@ const Cairo = imports.cairo;
const Clutter = imports.gi.Clutter;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Util = imports.misc.util;
const Main = imports.ui.main;
@ -198,7 +200,6 @@ DateMenuButton.prototype = {
_onPreferencesActivate: function() {
this.menu.close();
Main.overview.hide();
let app = Shell.AppSystem.get_default().get_app('gnome-datetime-panel.desktop');
app.activate(-1);
},

View File

@ -61,7 +61,7 @@ function addDragMonitor(monitor) {
dragMonitors.push(monitor);
}
function removeDragMonitor(monitor) {
function removeMonitor(monitor) {
for (let i = 0; i < dragMonitors.length; i++)
if (dragMonitors[i] == monitor) {
dragMonitors.splice(i, 1);
@ -284,13 +284,13 @@ _Draggable.prototype = {
this._dragOffsetY = actorStageY - this._dragStartY;
// Set the actor's scale such that it will keep the same
// transformed size when it's reparented to the uiGroup
// transformed size when it's reparented to the stage
let [scaledWidth, scaledHeight] = this.actor.get_transformed_size();
this.actor.set_scale(scaledWidth / this.actor.width,
scaledHeight / this.actor.height);
}
this._dragActor.reparent(Main.uiGroup);
this._dragActor.reparent(this.actor.get_stage());
this._dragActor.raise_top();
Shell.util_set_hidden_from_pick(this._dragActor, true);
@ -442,7 +442,7 @@ _Draggable.prototype = {
return true;
// If it accepted the drop without taking the actor,
// handle it ourselves.
if (this._dragActor.get_parent() == Main.uiGroup) {
if (this._dragActor.get_parent() == this._dragActor.get_stage()) {
if (this._restoreOnSuccess) {
this._restoreDragActor(event.get_time());
return true;

View File

@ -1,5 +1,8 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const DocInfo = imports.misc.docInfo;
const Params = imports.misc.params;
const Search = imports.ui.search;

View File

@ -22,6 +22,9 @@ const DBus = imports.dbus;
const Lang = imports.lang;
const Signals = imports.signals;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Clutter = imports.gi.Clutter;
const Gdm = imports.gi.Gdm;
const GLib = imports.gi.GLib;

View File

@ -1,22 +1,14 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
imports.gi.versions.Clutter = '1.0';
imports.gi.versions.Gio = '2.0';
imports.gi.versions.Gdk = '3.0';
imports.gi.versions.GdkPixbuf = '2.0';
imports.gi.versions.Gtk = '3.0';
const Clutter = imports.gi.Clutter;;
const Gettext = imports.gettext;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Gettext_gtk30 = imports.gettext.domain('gtk30');
// We can't import shell JS modules yet, because they may have
// variable initializations, etc, that depend on init() already having
// been run.
const Tweener = imports.ui.tweener;
const Format = imports.misc.format;
// "monkey patch" in some varargs ClutterContainer methods; we need
// to do this per-container class since there is no representation
@ -39,42 +31,49 @@ function _patchContainerClass(containerClass) {
};
}
// Replace @method with something that throws an error instead
function _blockMethod(method, replacement, reason) {
let match = method.match(/^(.+)\.([^.]+)$/);
if (!match)
throw new Error('Bad method name "' + method + '"');
let proto = 'imports.gi.' + match[1] + '.prototype';
let property = match[2];
if (!global.set_property_mutable(proto, property, true))
throw new Error('Bad method name "' + method + '"');
// eval() is evil in general, but we know it's safe here since
// set_property_mutable() would have failed if proto was
// malformed.
let node = eval(proto);
let msg = 'Do not use "' + method + '".';
if (replacement)
msg += ' Use "' + replacement + '" instead.';
if (reason)
msg += ' (' + reason + ')';
node[property] = function() {
throw new Error(msg);
};
global.set_property_mutable(proto, property, false);
}
function init() {
// Add some bindings to the global JS namespace; (gjs keeps the web
// browser convention of having that namespace be called 'window'.)
window.global = Shell.Global.get();
window._ = Gettext.gettext;
window.C_ = Gettext.pgettext;
window.ngettext = Gettext.ngettext;
// Set the default direction for St widgets (this needs to be done before any use of St)
if (Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL) {
St.Widget.set_default_direction(St.TextDirection.RTL);
}
// Miscellaneous monkeypatching
_patchContainerClass(St.BoxLayout);
_patchContainerClass(St.Table);
Clutter.Actor.prototype.toString = function() {
return St.describe_actor(this);
};
let origToString = Object.prototype.toString;
Object.prototype.toString = function() {
let base = origToString.call(this);
if ('actor' in this && this.actor instanceof Clutter.Actor)
return base.replace(/\]$/, ' delegate for ' + this.actor.toString().substring(1));
else
return base;
};
Tweener.init();
String.prototype.format = Format.format;
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=508783
Date.prototype.toLocaleFormat = function(format) {
return Shell.util_format_date(format, this.getTime());
};
// Set the default direction for St widgets (this needs to be done before any use of St)
if (Gettext_gtk30.gettext('default:LTR') == 'default:RTL') {
St.Widget.set_default_direction(St.TextDirection.RTL);
}
let slowdownEnv = GLib.getenv('GNOME_SHELL_SLOWDOWN_FACTOR');
if (slowdownEnv) {
let factor = parseFloat(slowdownEnv);
@ -82,10 +81,24 @@ function init() {
St.set_slow_down_factor(factor);
}
// OK, now things are initialized enough that we can import shell JS
const Format = imports.misc.format;
const Tweener = imports.ui.tweener;
_patchContainerClass(St.BoxLayout);
_patchContainerClass(St.Table);
Tweener.init();
String.prototype.format = Format.format;
Clutter.Actor.prototype.toString = function() {
return St.describe_actor(this);
};
if (window.global === undefined) // test environment
return;
_blockMethod('Clutter.Event.get_state', 'Shell.get_event_state',
'gjs\'s handling of Clutter.ModifierType is broken. See bug 597292.');
_blockMethod('Gdk.Window.get_device_position', 'global.get_pointer',
'gjs\'s handling of Gdk.ModifierType is broken. See bug 597292.');
// Now close the back door to prevent extensions from trying to
// abuse it. We can't actually delete it since
// Shell.Global.prototype itself is read-only.
global.set_property_mutable('imports.gi.Shell.Global.prototype', 'set_property_mutable', true);
Shell.Global.prototype.set_property_mutable = undefined;
}

View File

@ -23,9 +23,8 @@ const ExtensionType = {
const extensionMeta = {};
// Maps uuid -> importer object (extension directory tree)
const extensions = {};
// Arrays of uuids
// Array of uuids
var disabledExtensions;
var enabledExtensions;
// GFile for user extensions
var userExtensionsDir = null;
@ -179,7 +178,6 @@ function init() {
}
disabledExtensions = global.settings.get_strv('disabled-extensions', -1);
enabledExtensions = global.settings.get_strv('enabled-extensions', -1);
}
function _loadExtensionsIn(dir, type) {
@ -197,10 +195,7 @@ function _loadExtensionsIn(dir, type) {
if (fileType != Gio.FileType.DIRECTORY)
continue;
let name = info.get_name();
// Enable all but disabled extensions if enabledExtensions is not set.
// If it is set, enable one those, except they are disabled as well.
let enabled = (enabledExtensions.length == 0 || enabledExtensions.indexOf(name) >= 0)
&& disabledExtensions.indexOf(name) < 0;
let enabled = disabledExtensions.indexOf(name) < 0;
let child = dir.get_child(name);
loadExtension(child, enabled, type);
}

View File

@ -42,10 +42,10 @@ BaseIcon.prototype = {
box.add_actor(this._iconBin);
if (params.showLabel) {
this.label = new St.Label({ text: label });
box.add_actor(this.label);
this._name = new St.Label({ text: label });
box.add_actor(this._name);
} else {
this.label = null;
this._name = null;
}
if (params.createIcon)
@ -67,8 +67,8 @@ BaseIcon.prototype = {
let childBox = new Clutter.ActorBox();
if (this.label) {
let [labelMinHeight, labelNatHeight] = this.label.get_preferred_height(-1);
if (this._name) {
let [labelMinHeight, labelNatHeight] = this._name.get_preferred_height(-1);
preferredHeight += this._spacing + labelNatHeight;
let labelHeight = availHeight >= preferredHeight ? labelNatHeight
@ -79,7 +79,7 @@ BaseIcon.prototype = {
childBox.x2 = availWidth;
childBox.y1 = iconSize + this._spacing;
childBox.y2 = childBox.y1 + labelHeight;
this.label.allocate(childBox, flags);
this._name.allocate(childBox, flags);
}
childBox.x1 = Math.floor((availWidth - iconNatWidth) / 2);
@ -98,8 +98,8 @@ BaseIcon.prototype = {
alloc.min_size = iconMinHeight;
alloc.natural_size = iconNatHeight;
if (this.label) {
let [labelMinHeight, labelNatHeight] = this.label.get_preferred_height(forWidth);
if (this._name) {
let [labelMinHeight, labelNatHeight] = this._name.get_preferred_height(forWidth);
alloc.min_size += this._spacing + labelMinHeight;
alloc.natural_size += this._spacing + labelNatHeight;
}

View File

@ -5,13 +5,14 @@ const Cogl = imports.gi.Cogl;
const GConf = imports.gi.GConf;
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const Pango = imports.gi.Pango;
const St = imports.gi.St;
const Shell = imports.gi.Shell;
const Signals = imports.signals;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const History = imports.misc.history;
const ExtensionSystem = imports.ui.extensionSystem;
@ -99,19 +100,12 @@ Notebook.prototype = {
selectIndex: function(index) {
if (index == this._selectedIndex)
return;
this._unselect();
if (index < 0) {
this._unselect();
this.emit('selection', null);
return;
}
// Focus the new tab before unmapping the old one
let tabData = this._tabs[index];
if (!tabData.scrollView.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false))
this.actor.grab_key_focus();
this._unselect();
tabData.labelBox.add_style_pseudo_class('selected');
tabData.scrollView.show();
this._selectedIndex = index;
@ -582,53 +576,6 @@ ErrorLog.prototype = {
}
};
function Memory() {
this._init();
}
Memory.prototype = {
_init: function() {
this.actor = new St.BoxLayout({ vertical: true });
this._glibc_uordblks = new St.Label();
this.actor.add(this._glibc_uordblks);
this._js_bytes = new St.Label();
this.actor.add(this._js_bytes);
this._gjs_boxed = new St.Label();
this.actor.add(this._gjs_boxed);
this._gjs_gobject = new St.Label();
this.actor.add(this._gjs_gobject);
this._gjs_function = new St.Label();
this.actor.add(this._gjs_function);
this._gjs_closure = new St.Label();
this.actor.add(this._gjs_closure);
this._gcbutton = new St.Button({ label: 'Full GC',
style_class: 'lg-obj-inspector-button' });
this._gcbutton.connect('clicked', Lang.bind(this, function () { global.gc(); this._renderText(); }));
this.actor.add(this._gcbutton, { x_align: St.Align.START,
x_fill: false });
this.actor.connect('notify::mapped', Lang.bind(this, this._renderText));
},
_renderText: function() {
if (!this.actor.mapped)
return;
let memInfo = global.get_memory_info();
this._glibc_uordblks.text = 'glibc_uordblks: ' + memInfo.glibc_uordblks;
this._js_bytes.text = 'js bytes: ' + memInfo.js_bytes;
this._gjs_boxed.text = 'gjs_boxed: ' + memInfo.gjs_boxed;
this._gjs_gobject.text = 'gjs_gobject: ' + memInfo.gjs_gobject;
this._gjs_function.text = 'gjs_function: ' + memInfo.gjs_function;
this._gjs_closure.text = 'gjs_closure: ' + memInfo.gjs_closure;
}
};
function Extensions() {
this._init();
}
@ -798,7 +745,12 @@ LookingGlass.prototype = {
let label = new St.Label({ text: 'js>>> ' });
entryArea.add(label);
this._entry = new St.Entry({ can_focus: true });
this._entry = new St.Entry();
/* unmapping the edit box will un-focus it, undo that */
notebook.connect('selection', Lang.bind(this, function (nb, child) {
if (child == this._evalBox)
global.stage.set_key_focus(this._entry);
}));
entryArea.add(this._entry, { expand: true });
this._windowList = new WindowList();
@ -811,9 +763,6 @@ LookingGlass.prototype = {
this._errorLog = new ErrorLog();
notebook.appendPage('Errors', this._errorLog.actor);
this._memory = new Memory();
notebook.appendPage('Memory', this._memory.actor);
this._extensions = new Extensions();
notebook.appendPage('Extensions', this._extensions.actor);
@ -960,7 +909,6 @@ LookingGlass.prototype = {
if (!Main.pushModal(this._entry))
return;
this._notebook.selectIndex(0);
this.actor.show();
this.actor.lower(Main.chrome.actor);
this._open = true;

View File

@ -1,5 +1,11 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
imports.gi.versions.Clutter = '1.0';
imports.gi.versions.Gio = '2.0';
imports.gi.versions.Gdk = '3.0';
imports.gi.versions.GdkPixbuf = '2.0';
imports.gi.versions.Gtk = '3.0';
const Clutter = imports.gi.Clutter;
const DBus = imports.dbus;
const Gdk = imports.gi.Gdk;
@ -11,6 +17,8 @@ const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Chrome = imports.ui.chrome;
const CtrlAltTab = imports.ui.ctrlAltTab;
@ -67,7 +75,12 @@ let _cssStylesheet = null;
let background = null;
function start() {
// Monkey patch utility functions into the global proxy;
// Add a binding for 'global' in the global JS namespace; (gjs
// keeps the web browser convention of having that namespace be
// called 'window'.)
window.global = Shell.Global.get();
// Now monkey patch utility functions into the global proxy;
// This is easier and faster than indirecting down into global
// if we want to call back up into JS.
global.logError = _logError;
@ -89,6 +102,8 @@ function start() {
// not loading any events until the user presses the clock
global.launch_calendar_server();
Environment.init();
// Ensure ShellWindowTracker and ShellAppUsage are initialized; this will
// also initialize ShellAppSystem first. ShellAppSystem
// needs to load all the .desktop files, and ShellWindowTracker
@ -208,7 +223,6 @@ function start() {
global.screen.connect('window-entered-monitor', _windowEnteredMonitor);
global.screen.connect('window-left-monitor', _windowLeftMonitor);
global.screen.connect('restacked', _windowsRestacked);
_nWorkspacesChanged();
}
@ -311,13 +325,6 @@ function _windowEnteredMonitor(metaScreen, monitorIndex, metaWin) {
_queueCheckWorkspaces();
}
function _windowsRestacked() {
// Figure out where the pointer is in case we lost track of
// it during a grab. (In particular, if a trayicon popup menu
// is dismissed, see if we need to close the message tray.)
global.sync_pointer();
}
function _queueCheckWorkspaces() {
if (_checkWorkspacesId == 0)
_checkWorkspacesId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, _checkWorkspaces);
@ -401,21 +408,12 @@ function setThemeStylesheet(cssStylesheet)
*/
function loadTheme() {
let themeContext = St.ThemeContext.get_for_stage (global.stage);
let previousTheme = themeContext.get_theme();
let cssStylesheet = _defaultCssStylesheet;
if (_cssStylesheet != null)
cssStylesheet = _cssStylesheet;
let theme = new St.Theme ({ application_stylesheet: cssStylesheet });
if (previousTheme) {
let customStylesheets = previousTheme.get_custom_stylesheets();
for (let i = 0; i < customStylesheets.length; i++)
theme.load_stylesheet(customStylesheets[i]);
}
themeContext.set_theme (theme);
}

View File

@ -20,6 +20,9 @@ const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const Util = imports.misc.util;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const ANIMATION_TIME = 0.2;
const NOTIFICATION_TIMEOUT = 4;
const SUMMARY_TIMEOUT = 1;
@ -557,7 +560,7 @@ Notification.prototype = {
this._scrollArea = new St.ScrollView({ name: 'notification-scrollview',
vscrollbar_policy: this._scrollPolicy,
hscrollbar_policy: Gtk.PolicyType.NEVER,
style_class: 'vfade' });
vfade: true });
this._table.add(this._scrollArea, { row: 1, col: 1 });
this._contentArea = new St.BoxLayout({ name: 'notification-body',
vertical: true });
@ -829,7 +832,6 @@ Notification.prototype = {
// Restore banner opacity in case the notification is shown in the
// banner mode again on update.
this._bannerLabel.opacity = 255;
this.emit('collapsed');
},
_onActionInvoked: function(actor, mouseButtonClicked, id) {
@ -894,11 +896,6 @@ Source.prototype = {
this.isTransient = isTransient;
},
setTitle: function(newTitle) {
this.title = newTitle;
this.emit('title-changed');
},
// Called to create a new icon actor (of size this.ICON_SIZE).
// Must be overridden by the subclass if you do not pass icons
// explicitly to the Notification() constructor.
@ -1001,11 +998,6 @@ SummaryItem.prototype = {
this._sourceTitleBin.child = this._sourceTitle;
this._sourceTitleBin.width = 0;
this.source.connect('title-changed',
Lang.bind(this, function() {
this._sourceTitle.text = source.title;
}));
this._sourceBox.add(this._sourceIcon, { y_fill: false });
this._sourceBox.add(this._sourceTitleBin, { expand: true, y_fill: false });
this.actor.child = this._sourceBox;
@ -1013,7 +1005,7 @@ SummaryItem.prototype = {
this.notificationStackView = new St.ScrollView({ name: source.isChat ? '' : 'summary-notification-stack-scrollview',
vscrollbar_policy: source.isChat ? Gtk.PolicyType.NEVER : Gtk.PolicyType.AUTOMATIC,
hscrollbar_policy: Gtk.PolicyType.NEVER,
style_class: 'vfade' });
vfade: true });
this.notificationStack = new St.BoxLayout({ name: 'summary-notification-stack',
vertical: true });
this.notificationStackView.add_actor(this.notificationStack);
@ -1253,7 +1245,7 @@ MessageTray.prototype = {
this._reNotifyAfterHideNotification = null;
Main.chrome.addActor(this.actor, { affectsStruts: false,
visibleInFullscreen: true });
visibleInOverview: true });
Main.chrome.trackActor(this._notificationBin);
Main.chrome.trackActor(this._summaryBoxPointer.actor);
@ -1616,8 +1608,6 @@ MessageTray.prototype = {
this._clickedSummaryItemMouseButton != button) {
this._clickedSummaryItem = summaryItem;
this._clickedSummaryItemMouseButton = button;
summaryItem.source.emit('summary-item-clicked', button);
} else {
this._unsetClickedSummaryItem();
}
@ -2024,15 +2014,9 @@ MessageTray.prototype = {
this._notification.expand(!autoExpanding);
},
_onNotificationExpanded: function() {
_onNotificationExpanded: function() {
let expandedY = this.actor.height - this._notificationBin.height;
// Don't animate the notification to its new position if it has shrunk:
// there will be a very visible "gap" that breaks the illusion.
if (this._notificationBin.y < expandedY)
this._notificationBin.y = expandedY;
else if (this._notification.y != expandedY)
if (this._notificationBin.y != expandedY)
this._tween(this._notificationBin, '_notificationState', State.SHOWN,
{ y: expandedY,
time: ANIMATION_TIME,

View File

@ -10,6 +10,8 @@ const Pango = imports.gi.Pango;
const St = imports.gi.St;
const Shell = imports.gi.Shell;
const Signals = imports.signals;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Params = imports.misc.params;

View File

@ -7,6 +7,8 @@ const Lang = imports.lang;
const Shell = imports.gi.Shell;
const Mainloop = imports.mainloop;
const St = imports.gi.St;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Config = imports.misc.config;
const Main = imports.ui.main;
@ -165,11 +167,8 @@ NotificationDaemon.prototype = {
// with a transient one from the same sender, so we
// always create a new source object for new transient notifications
// and never add it to this._sources .
if (!isForTransientNotification && this._sources[pid]) {
let source = this._sources[pid];
source.setTitle(title);
return source;
}
if (!isForTransientNotification && this._sources[pid])
return this._sources[pid];
let source = new Source(title, pid);
source.setTransient(isForTransientNotification);

View File

@ -8,6 +8,8 @@ const Signals = imports.signals;
const Lang = imports.lang;
const St = imports.gi.St;
const Shell = imports.gi.Shell;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Gdk = imports.gi.Gdk;
const AppDisplay = imports.ui.appDisplay;
@ -220,7 +222,7 @@ Overview.prototype = {
}
this._resetWindowSwitchTimeout();
this._lastHoveredWindow = null;
DND.removeDragMonitor(this._dragMonitor);
DND.removeMonitor(this._dragMonitor);
this.endItemDrag();
},
@ -281,8 +283,7 @@ Overview.prototype = {
},
_onButtonPress: function(actor, event) {
if (this._scrollDirection == SwipeScrollDirection.NONE
|| event.get_button() != 1)
if (this._scrollDirection == SwipeScrollDirection.NONE)
return;
let [stageX, stageY] = event.get_coords();

View File

@ -9,6 +9,8 @@ const Pango = imports.gi.Pango;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Signals = imports.signals;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Config = imports.misc.config;
const CtrlAltTab = imports.ui.ctrlAltTab;
@ -302,7 +304,6 @@ AppMenuButton.prototype = {
this._visible = true;
this.actor.show();
this.actor.reactive = true;
if (!this._targetIsCurrent)
return;
@ -319,7 +320,6 @@ AppMenuButton.prototype = {
return;
this._visible = false;
this.actor.reactive = false;
if (!this._targetIsCurrent) {
this.actor.hide();
return;
@ -708,7 +708,7 @@ HotCorner.prototype = {
}
});
Main.chrome.addActor(this.actor, { affectsStruts: false });
Main.chrome.addActor(this.actor, { visibleInOverview: true, affectsStruts: false });
},
destroy: function() {
@ -817,8 +817,6 @@ Panel.prototype = {
reactive: true });
this.actor._delegate = this;
this._statusArea = {};
Main.overview.connect('shown', Lang.bind(this, function () {
this.actor.add_style_class_name('in-overview');
}));
@ -915,7 +913,6 @@ Panel.prototype = {
style_class: 'panel-button',
reactive: true,
can_focus: true });
this._activities = this.button;
this.button.set_child(label);
this.button._delegate = this.button;
this.button._xdndTimeOut = 0;
@ -944,10 +941,10 @@ Panel.prototype = {
this._hotCorner = null;
this._appMenu = new AppMenuButton();
this._leftBox.add(this._appMenu.actor);
let appMenuButton = new AppMenuButton();
this._leftBox.add(appMenuButton.actor);
this._menus.addMenu(this._appMenu.menu);
this._menus.addMenu(appMenuButton.menu);
/* center */
this._dateMenu = new DateMenu.DateMenuButton();
@ -966,12 +963,12 @@ Panel.prototype = {
this._rightBox.add(this._trayBox);
this._rightBox.add(this._statusBox);
this._userMenu = new StatusMenu.StatusMenuButton();
this._userMenu.actor.name = 'panelStatus';
this._rightBox.add(this._userMenu.actor);
this._statusmenu = new StatusMenu.StatusMenuButton();
this._statusmenu.actor.name = 'panelStatus';
this._rightBox.add(this._statusmenu.actor);
// Synchronize the buttons pseudo classes with its corner
this._userMenu.actor.connect('style-changed', Lang.bind(this,
this._statusmenu.actor.connect('style-changed', Lang.bind(this,
function(actor) {
let rtl = actor.get_direction() == St.TextDirection.RTL;
let corner = rtl ? this._leftCorner : this._rightCorner;
@ -1004,11 +1001,13 @@ Panel.prototype = {
this.button.checked = false;
}));
Main.chrome.addActor(this.actor);
Main.chrome.addActor(this._leftCorner.actor, { affectsStruts: false,
affectsInputRegion: false });
Main.chrome.addActor(this._rightCorner.actor, { affectsStruts: false,
affectsInputRegion: false });
Main.chrome.addActor(this.actor, { visibleInOverview: true });
Main.chrome.addActor(this._leftCorner.actor, { visibleInOverview: true,
affectsStruts: false,
affectsInputRegion: false });
Main.chrome.addActor(this._rightCorner.actor, { visibleInOverview: true,
affectsStruts: false,
affectsInputRegion: false });
Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here',
{ sortGroup: CtrlAltTab.SortGroup.TOP });
@ -1052,13 +1051,11 @@ Panel.prototype = {
let indicator = new constructor();
this._statusBox.add(indicator.actor);
this._menus.addMenu(indicator.menu);
this._statusArea[role] = indicator;
}
// PopupMenuManager depends on menus being added in order for
// keyboard navigation
this._menus.addMenu(this._userMenu.menu);
this._menus.addMenu(this._statusmenu.menu);
},
startupAnimation: function() {

View File

@ -26,7 +26,8 @@ Button.prototype = {
this.menu = new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, 0);
this.menu.connect('open-state-changed', Lang.bind(this, this._onOpenStateChanged));
this.menu.actor.connect('key-press-event', Lang.bind(this, this._onMenuKeyPress));
Main.chrome.addActor(this.menu.actor, { affectsStruts: false });
Main.chrome.addActor(this.menu.actor, { visibleInOverview: true,
affectsStruts: false });
this.menu.actor.hide();
},

View File

@ -7,6 +7,8 @@ const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Signals = imports.signals;
const St = imports.gi.St;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const DND = imports.ui.dnd;
const Main = imports.ui.main;
@ -268,7 +270,10 @@ PlacesManager.prototype = {
if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS))
return;
let bookmarksContent = Shell.get_file_contents_utf8_sync(this._bookmarksPath);
let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath);
if (!success)
return;
let bookmarks = bookmarksContent.split('\n');

View File

@ -22,6 +22,8 @@
const Lang = imports.lang;
const Signals = imports.signals;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Shell = imports.gi.Shell;
const Clutter = imports.gi.Clutter;
const St = imports.gi.St;

View File

@ -13,6 +13,9 @@ const Main = imports.ui.main;
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const SLIDER_SCROLL_STEP = 0.05; /* Slider scrolling step in % */
function PopupBaseMenuItem(params) {
@ -704,36 +707,11 @@ PopupSwitchMenuItem.prototype = {
this._switch = new Switch(active);
this.addActor(this.label);
this.addActor(this._switch.actor, { align: St.Align.END });
this._statusBin = new St.Bin({ x_align: St.Align.END });
this.addActor(this._statusBin, { align: St.Align.END });
this._statusLabel = new St.Label({ text: '',
style_class: 'popup-inactive-menu-item'
});
this._switch = new Switch(false);
this._statusBin.child = this._switch.actor;
},
setStatus: function(text) {
if (text != null) {
this._statusLabel.text = text;
this._statusBin.child = this._statusLabel;
this.actor.reactive = false;
this.actor.can_focus = false;
} else {
this._statusBin.child = this._switch.actor;
this.actor.reactive = true;
this.actor.can_focus = true;
}
},
activate: function(event) {
if (this._switch.actor.mapped) {
this.connect('activate', Lang.bind(this,function(from) {
this.toggle();
}
PopupBaseMenuItem.prototype.activate.call(this, event);
}));
},
toggle: function() {

View File

@ -8,6 +8,8 @@ const Meta = imports.gi.Meta;
const St = imports.gi.St;
const Shell = imports.gi.Shell;
const Signals = imports.signals;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const FileUtils = imports.misc.fileUtils;
const Main = imports.ui.main;
@ -23,10 +25,6 @@ const HISTORY_KEY = 'command-history';
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
const DISABLE_COMMAND_LINE_KEY = 'disable-command-line';
const TERMINAL_SCHEMA = 'org.gnome.desktop.default-applications.terminal';
const EXEC_KEY = 'exec';
const EXEC_ARG_KEY = 'exec-arg';
const DIALOG_GROW_TIME = 0.1;
function CommandCompleter() {
@ -173,7 +171,6 @@ __proto__: ModalDialog.ModalDialog.prototype,
ModalDialog.ModalDialog.prototype._init.call(this, { styleClass: 'run-dialog' });
this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA });
this._terminalSettings = new Gio.Settings({ schema: TERMINAL_SCHEMA });
global.settings.connect('changed::development-tools', Lang.bind(this, function () {
this._enableInternalCommands = global.settings.get_boolean('development-tools');
}));
@ -194,7 +191,7 @@ __proto__: ModalDialog.ModalDialog.prototype,
}),
'debugexit': Lang.bind(this, function() {
Meta.quit(Meta.ExitCode.ERROR);
Meta.exit(Meta.ExitCode.ERROR);
}),
// rt is short for "reload theme"
@ -314,11 +311,8 @@ __proto__: ModalDialog.ModalDialog.prototype,
f();
} else if (input) {
try {
if (inTerminal) {
let exec = this._terminalSettings.get_string(EXEC_KEY);
let exec_arg = this._terminalSettings.get_string(EXEC_ARG_KEY);
command = exec + ' ' + exec_arg + ' ' + input;
}
if (inTerminal)
command = 'gnome-terminal -x ' + input;
Util.trySpawnCommandLine(command);
} catch (e) {
// Mmmh, that failed - see if @input matches an existing file

View File

@ -7,6 +7,9 @@ const Signals = imports.signals;
const Shell = imports.gi.Shell;
const Util = imports.misc.util;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const FileUtils = imports.misc.fileUtils;
const Main = imports.ui.main;
@ -157,7 +160,7 @@ SearchProvider.prototype = {
},
/**
* getResultMeta:
* getResultInfo:
* @id: Result identifier string
*
* Return an object with 'id', 'name', (both strings) and 'createIcon'
@ -273,7 +276,7 @@ OpenSearchSystem.prototype = {
_addProvider: function(fileName) {
let path = global.datadir + '/search_providers/' + fileName;
let source = Shell.get_file_contents_utf8_sync(path);
let [success, name, url, langs, icon_uri] = Shell.parse_search_provider(source);
let [success, name, url, langs, icon_uri] = global.parse_search_provider(source);
let provider ={ name: name,
url: url,
id: this._providers.length,

View File

@ -2,6 +2,8 @@
const Clutter = imports.gi.Clutter;
const Lang = imports.lang;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Gtk = imports.gi.Gtk;
const Meta = imports.gi.Meta;
const St = imports.gi.St;
@ -28,7 +30,6 @@ SearchResult.prototype = {
x_align: St.Align.START,
y_fill: true });
this.actor._delegate = this;
this._dragActorSource = null;
let content = provider.createResultActor(metaInfo, terms);
if (content == null) {
@ -38,11 +39,6 @@ SearchResult.prototype = {
let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
{ createIcon: this.metaInfo['createIcon'] });
content.set_child(icon.actor);
this._dragActorSource = icon.icon;
this.actor.label_actor = icon.label;
} else {
if (content._delegate && content._delegate.getDragActorSource)
this._dragActorSource = content._delegate.getDragActorSource();
}
this._content = content;
this.actor.set_child(content);
@ -81,8 +77,6 @@ SearchResult.prototype = {
},
getDragActorSource: function() {
if (this._dragActorSource)
return this._dragActorSource;
// not exactly right, but alignment problems are hard to notice
return this._content;
},
@ -199,7 +193,7 @@ SearchResults.prototype = {
let scrollView = new St.ScrollView({ x_fill: true,
y_fill: false,
style_class: 'vfade' });
vfade: true });
scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
scrollView.add_actor(this._content);
@ -265,7 +259,6 @@ SearchResults.prototype = {
let title = new St.Label({ text: provider.name,
style_class: 'dash-search-button-label' });
button.label_actor = title;
bin.set_child(title);
button.set_child(bin);
provider.actor = button;

View File

@ -10,11 +10,13 @@ const Shell = imports.gi.Shell;
const Signals = imports.signals;
const St = imports.gi.St;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Util = imports.misc.util;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
const KEY_STICKY_KEYS_ENABLED = 'stickykeys-enable';
const KEY_BOUNCE_KEYS_ENABLED = 'bouncekeys-enable';
@ -89,7 +91,6 @@ ATIndicator.prototype = {
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addAction(_("Universal Access Settings"), function() {
Main.overview.hide();
let app = Shell.AppSystem.get_default().get_app('gnome-universal-access-panel.desktop');
app.activate(-1);
});

View File

@ -16,6 +16,9 @@ const MessageTray = imports.ui.messageTray;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const ConnectionState = {
DISCONNECTED: 0,
CONNECTED: 1,
@ -64,7 +67,7 @@ Indicator.prototype = {
this._fullMenuItems = [new PopupMenu.PopupSeparatorMenuItem(),
new PopupMenu.PopupMenuItem(_("Send Files to Device...")),
new PopupMenu.PopupMenuItem(_("Set up a New Device...")),
new PopupMenu.PopupMenuItem(_("Setup a New Device...")),
new PopupMenu.PopupSeparatorMenuItem()];
this._hasDevices = false;
this._deviceSep = this._fullMenuItems[0]; // hidden if no device exists
@ -90,7 +93,6 @@ Indicator.prototype = {
this._updateFullMenu();
this.menu.addAction(_("Bluetooth Settings"), function() {
Main.overview.hide()
let app = Shell.AppSystem.get_default().get_app('bluetooth-properties.desktop');
app.activate(-1);
});
@ -109,11 +111,7 @@ Indicator.prototype = {
current_state != GnomeBluetoothApplet.KillswitchState.HARD_BLOCKED;
this._killswitch.setToggleState(on);
if (can_toggle)
this._killswitch.setStatus(null);
else
/* TRANSLATORS: this means that bluetooth was disabled by hardware rfkill */
this._killswitch.setStatus(_("hardware disabled"));
this._killswitch.actor.reactive = can_toggle;
if (has_adapter)
this.actor.show();
@ -129,6 +127,13 @@ Indicator.prototype = {
}
},
_deviceCompare: function(d1, d2) {
return d1.device_path == d2.device_path &&
d1.bdaddr == d2.bdaddr &&
d1.can_connect == d2.can_connect &&
d1.capabilities == d2.capabilities;
},
_updateDevices: function() {
let devices = this._applet.get_devices();
@ -137,8 +142,12 @@ Indicator.prototype = {
let item = this._deviceItems[i];
let destroy = true;
for (let j = 0; j < devices.length; j++) {
if (item._device.device_path == devices[j].device_path) {
this._updateDeviceItem(item, devices[j]);
// we need to deep compare because BluetoothSimpleDevice is a boxed type
// (but we take advantage of that, because _skip will disappear the next
// time get_devices() is called)
if (this._deviceCompare(item._device, devices[j])) {
item.label.text = devices[j].alias;
devices[j]._skip = true;
destroy = false;
break;
}
@ -153,7 +162,7 @@ Indicator.prototype = {
this._hasDevices = newlist.length > 0;
for (let i = 0; i < devices.length; i++) {
let d = devices[i];
if (d._item)
if (d._skip)
continue;
let item = this._createDeviceItem(d);
if (item) {
@ -168,62 +177,23 @@ Indicator.prototype = {
this._deviceSep.actor.hide();
},
_updateDeviceItem: function(item, device) {
if (!device.can_connect && device.capabilities == GnomeBluetoothApplet.Capabilities.NONE) {
item.destroy();
return;
}
let prevDevice = item._device;
let prevCapabilities = prevDevice.capabilities;
let prevCanConnect = prevDevice.can_connect;
// adopt the new device object
item._device = device;
device._item = item;
// update properties
item.label.text = device.alias;
if (prevCapabilities != device.capabilities ||
prevCanConnect != device.can_connect) {
// need to rebuild the submenu
item.menu.removeAll();
this._buildDeviceSubMenu(item, device);
}
// update connected property
if (device.can_connect)
item._connectedMenuitem.setToggleState(device.connected);
},
_createDeviceItem: function(device) {
if (!device.can_connect && device.capabilities == GnomeBluetoothApplet.Capabilities.NONE)
return null;
let item = new PopupMenu.PopupSubMenuMenuItem(device.alias);
// adopt the device object, and add a back link
item._device = device;
device._item = item;
this._buildDeviceSubMenu(item, device);
return item;
},
_buildDeviceSubMenu: function(item, device) {
if (device.can_connect) {
item._connected = device.connected;
item._connectedMenuitem = new PopupMenu.PopupSwitchMenuItem(_("Connection"), device.connected);
item._connectedMenuitem.connect('toggled', Lang.bind(this, function() {
let menuitem = new PopupMenu.PopupSwitchMenuItem(_("Connection"), device.connected);
menuitem.connect('toggled', Lang.bind(this, function() {
if (item._connected > ConnectionState.CONNECTED) {
// operation already in progress, revert
// (should not happen anyway)
menuitem.setToggleState(menuitem.state);
}
if (item._connected) {
item._connected = ConnectionState.DISCONNECTING;
menuitem.setStatus(_("disconnecting..."));
this._applet.disconnect_device(item._device.device_path, function(applet, success) {
if (success) { // apply
item._connected = ConnectionState.DISCONNECTED;
@ -232,11 +202,9 @@ Indicator.prototype = {
item._connected = ConnectionState.CONNECTED;
menuitem.setToggleState(true);
}
menuitem.setStatus(null);
});
} else {
item._connected = ConnectionState.CONNECTING;
menuitem.setStatus(_("connecting..."));
this._applet.connect_device(item._device.device_path, function(applet, success) {
if (success) { // apply
item._connected = ConnectionState.CONNECTED;
@ -245,12 +213,11 @@ Indicator.prototype = {
item._connected = ConnectionState.DISCONNECTED;
menuitem.setToggleState(false);
}
menuitem.setStatus(null);
});
}
}));
item.menu.addMenuItem(item._connectedMenuitem);
item.menu.addMenuItem(menuitem);
}
if (device.capabilities & GnomeBluetoothApplet.Capabilities.OBEX_PUSH) {
@ -296,6 +263,8 @@ Indicator.prototype = {
default:
break;
}
return item;
},
_updateFullMenu: function() {

View File

@ -9,11 +9,13 @@ const Lang = imports.lang;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Main = imports.ui.main;
const PopupMenu = imports.ui.popupMenu;
const PanelMenu = imports.ui.panelMenu;
const Util = imports.misc.util;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
function LayoutMenuItem() {
this._init.apply(this, arguments);
}
@ -69,11 +71,9 @@ XKBIndicator.prototype = {
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addAction(_("Show Keyboard Layout..."), Lang.bind(this, function() {
Main.overview.hide();
Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
}));
this.menu.addAction(_("Localization Settings"), function() {
Main.overview.hide();
let app = Shell.AppSystem.get_default().get_app('gnome-region-panel.desktop');
app.activate(-1);
});

View File

@ -18,6 +18,9 @@ const MessageTray = imports.ui.messageTray;
const ModemManager = imports.misc.modemManager;
const Util = imports.misc.util;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const NMConnectionCategory = {
INVALID: 'invalid',
WIRED: 'wired',
@ -41,10 +44,6 @@ const NM80211Mode = NetworkManager['80211Mode'];
const NM80211ApFlags = NetworkManager['80211ApFlags'];
const NM80211ApSecurityFlags = NetworkManager['80211ApSecurityFlags'];
// number of wireless networks that should be visible
// (the remaining are placed into More...)
const NUM_VISIBLE_NETWORKS = 5;
const NMAppletHelperInterface = {
name: 'org.gnome.network_manager_applet',
methods: [
@ -192,7 +191,63 @@ NMNetworkMenuItem.prototype = {
apObj.updateId = 0;
}
PopupMenu.PopupBaseMenuItem.prototype.destroy.call(this);
PopupMenu.PopupImageMenuItem.prototype.destroy.call(this);
}
};
function NMDeviceTitleMenuItem() {
this._init.apply(this, arguments);
}
NMDeviceTitleMenuItem.prototype = {
__proto__: PopupMenu.PopupBaseMenuItem.prototype,
_init: function(description, params) {
PopupMenu.PopupBaseMenuItem.prototype._init.call(this, params);
this._descriptionLabel = new St.Label({ text: description,
style_class: 'popup-subtitle-menu-item'
});
this.addActor(this._descriptionLabel);
this._statusBin = new St.Bin({ x_align: St.Align.END });
this.addActor(this._statusBin, { align: St.Align.END });
this._statusLabel = new St.Label({ text: '',
style_class: 'popup-inactive-menu-item'
});
this._switch = new PopupMenu.Switch(false);
this._statusBin.child = this._switch.actor;
},
setStatus: function(text) {
if (text != null) {
this._statusLabel.text = text;
this._statusBin.child = this._statusLabel;
this.actor.reactive = false;
this.actor.can_focus = false;
} else {
this._statusBin.child = this._switch.actor;
this.actor.reactive = true;
this.actor.can_focus = true;
}
},
activate: function(event) {
if (this._switch.actor.mapped) {
this._switch.toggle();
this.emit('toggled', this._switch.state);
}
PopupMenu.PopupBaseMenuItem.prototype.activate.call(this, event);
},
get state() {
return this._switch.state;
},
setToggleState: function(newval) {
this._switch.setToggleState(newval);
}
};
@ -201,13 +256,7 @@ function NMWiredSectionTitleMenuItem() {
}
NMWiredSectionTitleMenuItem.prototype = {
__proto__: PopupMenu.PopupSwitchMenuItem.prototype,
_init: function(label, params) {
params = params || { };
params.style_class = 'popup-subtitle-menu-item';
PopupMenu.PopupSwitchMenuItem.prototype._init.call(this, label, false, params);
},
__proto__: NMDeviceTitleMenuItem.prototype,
updateForDevice: function(device) {
if (device) {
@ -219,7 +268,7 @@ NMWiredSectionTitleMenuItem.prototype = {
},
activate: function(event) {
PopupMenu.PopupSwitchMenuItem.prototype.activate.call(this, event);
NMDeviceTitleMenuItem.prototype.activate.call(this, event);
if (!this._device) {
log('Section title activated when there is more than one device, should be non reactive');
@ -245,12 +294,10 @@ function NMWirelessSectionTitleMenuItem() {
}
NMWirelessSectionTitleMenuItem.prototype = {
__proto__: PopupMenu.PopupSwitchMenuItem.prototype,
__proto__: NMDeviceTitleMenuItem.prototype,
_init: function(client, property, title, params) {
params = params || { };
params.style_class = 'popup-subtitle-menu-item';
PopupMenu.PopupSwitchMenuItem.prototype._init.call(this, title, false, params);
NMDeviceTitleMenuItem.prototype._init.call(this, title, params);
this._client = client;
this._property = property + '_enabled';
@ -276,7 +323,7 @@ NMWirelessSectionTitleMenuItem.prototype = {
},
activate: function(event) {
PopupMenu.PopupSwitchMenuItem.prototype.activate.call(this, event);
NMDeviceTitleMenuItem.prototype.activate.call(this, event);
this._client[this._setEnabledFunc](this._switch.state);
},
@ -325,14 +372,15 @@ NMDevice.prototype = {
};
this._connections.push(obj);
}
this._connections.sort(this._connectionSortFunction);
this._connections.sort(function(one, two) {
return two.timestamp - one.timestamp;
});
this._activeConnection = null;
this._activeConnectionItem = null;
this._autoConnectionItem = null;
this._overflowItem = null;
if (this.device) {
this.statusItem = new PopupMenu.PopupSwitchMenuItem(this._getDescription(), this.connected, { style_class: 'popup-subtitle-menu-item' });
this.statusItem = new NMDeviceTitleMenuItem(this._getDescription());
this._statusChanged = this.statusItem.connect('toggled', Lang.bind(this, function(item, state) {
if (state)
this.activate();
@ -433,7 +481,9 @@ NMDevice.prototype = {
timestamp: connection._timestamp,
};
this._connections.push(obj);
this._connections.sort(this._connectionSortFunction);
this._connections.sort(function(one, two) {
return two.timestamp - one.timestamp;
});
this._clearSection();
this._createSection();
@ -468,13 +518,6 @@ NMDevice.prototype = {
return this.device.connection_valid(connection);
},
_connectionSortFunction: function(one, two) {
if (one.timestamp == two.timestamp)
return GLib.utf8_collate(one.name, two.name);
return two.timestamp - one.timestamp;
},
setEnabled: function(enabled) {
// do nothing by default, we want to keep the conneciton list visible
// in the majority of cases (wired, wwan, vpn)
@ -482,15 +525,11 @@ NMDevice.prototype = {
getStatusLabel: function() {
switch(this.device.state) {
case NetworkManager.DeviceState.UNMANAGED:
case NetworkManager.DeviceState.DISCONNECTED:
case NetworkManager.DeviceState.DEACTIVATING:
case NetworkManager.DeviceState.ACTIVATED:
return null;
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) */
return _("unmanaged");
case NetworkManager.DeviceState.DEACTIVATING:
return _("disconnecting...");
case NetworkManager.DeviceState.PREPARE:
case NetworkManager.DeviceState.CONFIG:
case NetworkManager.DeviceState.IP_CONFIG:
@ -549,7 +588,6 @@ NMDevice.prototype = {
this.section.removeAll();
this._autoConnectionItem = null;
this._activeConnectionItem = null;
this._overflowItem = null;
for (let i = 0; i < this._connections.length; i++) {
this._connections[i].item = null;
}
@ -568,23 +606,13 @@ NMDevice.prototype = {
this.section.addMenuItem(this._activeConnectionItem);
}
if (this._connections.length > 0) {
let activeOffset = this._activeConnectionItem ? 1 : 0;
for(let j = 0; j < this._connections.length; ++j) {
let obj = this._connections[j];
if (this._activeConnection &&
obj.connection == this._activeConnection._connection)
continue;
obj.item = this._createConnectionItem(obj);
if (j + activeOffset >= NUM_VISIBLE_NETWORKS) {
if (!this._overflowItem) {
this._overflowItem = new PopupMenu.PopupSubMenuMenuItem(_("More..."));
this.section.addMenuItem(this._overflowItem);
}
this._overflowItem.menu.addMenuItem(obj.item);
} else
this.section.addMenuItem(obj.item);
this.section.addMenuItem(obj.item);
}
} else if (this._autoConnectionName) {
this._autoConnectionItem = new PopupMenu.PopupMenuItem(this._autoConnectionName);
@ -792,7 +820,7 @@ NMDeviceModem.prototype = {
}));
}
NMDevice.prototype._init.call(this, client, device, connections);
NMDevice.prototype._init.call(this, client, device, connections, 1);
},
setEnabled: function(enabled) {
@ -998,7 +1026,6 @@ NMDeviceWireless.prototype = {
item: null,
accessPoints: [ ap ]
};
obj.ssidText = NetworkManager.utils_ssid_to_utf8(obj.ssid);
this._networks.push(obj);
}
@ -1011,14 +1038,6 @@ NMDeviceWireless.prototype = {
}
}
}
if (this.device.active_access_point) {
this._activeNetwork = this._networks[this._findNetwork(this.device.active_access_point)];
} else {
this._activeNetwork = null;
}
this._networks.sort(this._networkSortFunction);
this._apChangedId = device.connect('notify::active-access-point', Lang.bind(this, this._activeApChanged));
this._apAddedId = device.connect('access-point-added', Lang.bind(this, this._accessPointAdded));
this._apRemovedId = device.connect('access-point-removed', Lang.bind(this, this._accessPointRemoved));
@ -1026,13 +1045,8 @@ NMDeviceWireless.prototype = {
},
destroy: function() {
if (this._apChangedId) {
// see above for this HACK
GObject.Object.prototype.disconnect.call(this.device, this._apChangedId);
this._apChangedId = 0;
}
if (this._apAddedId) {
// see above for this HACK
GObject.Object.prototype.disconnect.call(this.device, this._apAddedId);
this._apAddedId = 0;
}
@ -1098,19 +1112,6 @@ NMDeviceWireless.prototype = {
}
},
_activeApChanged: function() {
this._activeNetwork = null;
let activeAp = this.device.active_access_point;
if (activeAp) {
let pos = this._findNetwork(activeAp);
this._activeNetwork = this._networks[pos];
}
// we don't refresh the view here, setActiveConnection will
},
_getApSecurityType: function(accessPoint) {
if (accessPoint._secType)
return accessPoint._secType;
@ -1142,32 +1143,6 @@ NMDeviceWireless.prototype = {
return type;
},
_networkSortFunction: function(one, two) {
let oneHasConnection = one.connections.length != 0;
let twoHasConnection = two.connections.length != 0;
// place known connections first
// (-1 = good order, 1 = wrong order)
if (oneHasConnection && !twoHasConnection)
return -1;
else if (!oneHasConnection && twoHasConnection)
return 1;
let oneHasSecurity = one.security != NMAccessPointSecurity.NONE;
let twoHasSecurity = two.security != NMAccessPointSecurity.NONE;
// place secure connections first
// (we treat WEP/WPA/WPA2 the same as there is no way to
// take them apart from the UI)
if (oneHasSecurity && !twoHasSecurity)
return -1;
else if (!oneHasSecurity && twoHasSecurity)
return 1;
// sort alphabetically
return GLib.utf8_collate(one.ssidText, two.ssidText);
},
_networkCompare: function(network, accessPoint) {
if (!ssidCompare(network.ssid, accessPoint.get_ssid()))
return false;
@ -1190,8 +1165,6 @@ NMDeviceWireless.prototype = {
_accessPointAdded: function(device, accessPoint) {
let pos = this._findNetwork(accessPoint);
let apObj;
let needsupdate = false;
if (pos != -1) {
apObj = this._networks[pos];
if (apObj.accessPoints.indexOf(accessPoint) != -1) {
@ -1200,8 +1173,6 @@ NMDeviceWireless.prototype = {
}
apObj.accessPoints.push(accessPoint);
if (apObj.item)
apObj.item.updateAccessPoints(apObj.accessPoints);
} else {
apObj = { ssid: accessPoint.get_ssid(),
mode: accessPoint.mode,
@ -1210,8 +1181,7 @@ NMDeviceWireless.prototype = {
item: null,
accessPoints: [ accessPoint ]
};
apObj.ssidText = NetworkManager.utils_ssid_to_utf8(apObj.ssid);
needsupdate = true;
this._networks.push(apObj);
}
// check if this enables new connections for this group
@ -1220,44 +1190,12 @@ NMDeviceWireless.prototype = {
if (accessPoint.connection_valid(connection) &&
apObj.connections.indexOf(connection) == -1) {
apObj.connections.push(connection);
// this potentially changes the order
needsupdate = true;
}
}
if (needsupdate) {
if (apObj.item)
apObj.item.destroy();
if (pos != -1)
this._networks.splice(pos, 1);
if (this._networks.length == 0) {
// only network in the list
this._networks.push(apObj);
this._clearSection();
this._createSection();
return;
}
// skip networks that should appear earlier
let menuPos = 0;
for (pos = 0;
pos < this._networks.length &&
this._networkSortFunction(this._networks[pos], apObj) < 0; ++pos) {
if (this._networks[pos] != this._activeNetwork)
menuPos++;
}
// (re-)add the network
this._networks.splice(pos, 0, apObj);
if (this._shouldShowConnectionList()) {
menuPos += (this._activeConnectionItem ? 1 : 0);
this._createNetworkItem(apObj, menuPos);
}
}
// update everything
this._clearSection();
this._createSection();
},
_accessPointRemoved: function(device, accessPoint) {
@ -1335,12 +1273,6 @@ NMDeviceWireless.prototype = {
// remove the connection from the access point group
connections.splice(k);
anyauto = connections.length == 0;
if (anyauto) {
// this potentially changes the sorting order
forceupdate = true;
break;
}
if (apObj.item) {
if (apObj.item instanceof PopupMenu.PopupSubMenuMenuItem) {
let items = apObj.item.menu.getMenuItems();
@ -1366,7 +1298,6 @@ NMDeviceWireless.prototype = {
}
if (forceupdate || anyauto) {
this._networks.sort(this._networkSortFunction);
this._clearSection();
this._createSection();
}
@ -1382,24 +1313,42 @@ NMDeviceWireless.prototype = {
this._connections.push(obj);
// find an appropriate access point
let forceupdate = false;
let any = false, forceupdate = false;
for (let i = 0; i < this._networks.length; i++) {
let apObj = this._networks[i];
// Check if connection is valid for any of these access points
let any = false;
for (let k = 0; k < apObj.accessPoints.length; k++) {
let ap = apObj.accessPoints[k];
if (ap.connection_valid(connection)) {
apObj.connections.push(connection);
// this potentially changes the sorting order
forceupdate = true;
any = true;
break;
}
}
if (any && this._shouldShowConnectionList()) {
// we need to show this connection
if (apObj.item && apObj.item.menu) {
// We're already showing the submenu for this access point
apObj.item.menu.addMenuItem(this._createAPItem(connection, apObj, true));
} else {
if (apObj.item)
apObj.item.destroy();
if (apObj.connections.length == 1) {
apObj.item = this._createAPItem(connection, apObj, false);
this.section.addMenuItem(apObj.item);
} else {
apObj.item = null;
// we need to force an update to create the submenu
forceupdate = true;
}
}
}
}
if (forceupdate) {
this._networks.sort(this._networkSortFunction);
this._clearSection();
this._createSection();
}
@ -1451,48 +1400,6 @@ NMDeviceWireless.prototype = {
return connection;
},
_createNetworkItem: function(apObj, position) {
if(apObj.connections.length > 0) {
if (apObj.connections.length == 1)
apObj.item = this._createAPItem(apObj.connections[0], apObj, false);
else {
let title = apObj.ssidText;
apObj.item = new PopupMenu.PopupSubMenuMenuItem(title);
apObj.item._apObj = apObj;
for (let i = 0; i < apObj.connections.length; i++)
apObj.item.menu.addMenuItem(this._createAPItem(apObj.connections[i], apObj, true));
}
} else {
apObj.item = new NMNetworkMenuItem(apObj.accessPoints);
apObj.item._apObj = apObj;
apObj.item.connect('activate', Lang.bind(this, function() {
let accessPoints = sortAccessPoints(apObj.accessPoints);
if ( (accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT)
|| (accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
// 802.1x-enabled APs get handled by nm-applet for now...
this._applet_proxy.ConnectTo8021xNetworkRemote(this.device.get_path(),
accessPoints[0].dbus_path,
Lang.bind(this, function(results, err) {
if (err)
log(err);
}));
} else {
let connection = this._createAutomaticConnection(apObj);
this._client.add_and_activate_connection(connection, this.device, accessPoints[0].dbus_path, null)
}
}));
}
if (position < NUM_VISIBLE_NETWORKS)
this.section.addMenuItem(apObj.item, position);
else {
if (!this._overflowItem) {
this._overflowItem = new PopupMenu.PopupSubMenuMenuItem(_("More..."));
this.section.addMenuItem(this._overflowItem);
}
this._overflowItem.menu.addMenuItem(apObj.item, position - NUM_VISIBLE_NETWORKS);
}
},
_createSection: function() {
if (!this._shouldShowConnectionList())
return;
@ -1502,14 +1409,58 @@ NMDeviceWireless.prototype = {
this.section.addMenuItem(this._activeConnectionItem);
}
let activeOffset = this._activeConnectionItem ? 1 : 0;
let activeAp = this.device.active_access_point;
let activeApSsid = activeAp ? activeAp.get_ssid() : null;
// we want five access points in the menu, including the active one
let numItems = this._activeConnection ? 4 : 5;
for(let j = 0; j < this._networks.length; j++) {
let apObj = this._networks[j];
if (apObj == this._activeNetwork)
if(activeAp && ssidCompare(apObj.ssid, activeApSsid))
continue;
this._createNetworkItem(apObj, j + activeOffset);
let menuItem;
if(apObj.connections.length > 0) {
if (apObj.connections.length == 1)
apObj.item = this._createAPItem(apObj.connections[0], apObj, false);
else {
let title = NetworkManager.utils_ssid_to_utf8(apObj.ssid) || _("<unknown>");
apObj.item = new PopupMenu.PopupSubMenuMenuItem(title);
apObj.item._apObj = apObj;
for (let i = 0; i < apObj.connections.length; i++)
apObj.item.menu.addMenuItem(this._createAPItem(apObj.connections[i], apObj, true));
}
} else {
apObj.item = new NMNetworkMenuItem(apObj.accessPoints);
apObj.item._apObj = apObj;
apObj.item.connect('activate', Lang.bind(this, function() {
let accessPoints = sortAccessPoints(apObj.accessPoints);
if ( (accessPoints[0]._secType == NMAccessPointSecurity.WPA2_ENT)
|| (accessPoints[0]._secType == NMAccessPointSecurity.WPA_ENT)) {
// 802.1x-enabled APs get handled by nm-applet for now...
this._applet_proxy.ConnectTo8021xNetworkRemote(this.device.get_path(),
accessPoints[0].dbus_path,
Lang.bind(this, function(results, err) {
if (err)
log(err);
}));
} else {
let connection = this._createAutomaticConnection(apObj);
this._client.add_and_activate_connection(connection, this.device, accessPoints[0].dbus_path, null)
}
}));
}
if (j < numItems)
this.section.addMenuItem(apObj.item);
else {
if (!this._overflowItem) {
this._overflowItem = new PopupMenu.PopupSubMenuMenuItem(_("More..."));
this.section.addMenuItem(this._overflowItem);
}
this._overflowItem.menu.addMenuItem(apObj.item);
}
}
},
};
@ -1584,7 +1535,6 @@ NMApplet.prototype = {
this.menu.addMenuItem(this._devices.vpn.section);
this.menu.addAction(_("Network Settings"), function() {
Main.overview.hide();
let app = Shell.AppSystem.get_default().get_app('gnome-network-panel.desktop');
app.activate(-1);
});
@ -1663,18 +1613,21 @@ NMApplet.prototype = {
_syncSectionTitle: function(category) {
let devices = this._devices[category].devices;
let managedDevices = devices.filter(function(dev) {
return dev.device.state != NetworkManager.DeviceState.UNMANAGED;
});
let item = this._devices[category].item;
let section = this._devices[category].section;
if (devices.length == 0)
if (managedDevices.length == 0)
section.actor.hide();
else {
section.actor.show();
if (devices.length == 1) {
let dev = devices[0];
if (managedDevices.length == 1) {
let dev = managedDevices[0];
dev.statusItem.actor.hide();
item.updateForDevice(dev);
} else {
devices.forEach(function(dev) {
managedDevices.forEach(function(dev) {
dev.statusItem.actor.show();
});
// remove status text from the section title item

View File

@ -7,11 +7,13 @@ const Mainloop = imports.mainloop;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Util = imports.misc.util;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const BUS_NAME = 'org.gnome.PowerManager';
const OBJECT_PATH = '/org/gnome/PowerManager';
@ -81,7 +83,6 @@ Indicator.prototype = {
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addAction(_("Power Settings"),function() {
Main.overview.hide();
let app = Shell.AppSystem.get_default().get_app('gnome-power-panel.desktop');
app.activate(-1);
});
@ -114,15 +115,15 @@ Indicator.prototype = {
let timestring;
if (time > 60) {
if (minutes == 0) {
timestring = ngettext("%d hour remaining", "%d hours remaining", hours).format(hours);
timestring = Gettext.ngettext("%d hour remaining", "%d hours remaining", hours).format(hours);
} else {
/* TRANSLATORS: this is a time string, as in "%d hours %d minutes remaining" */
let template = _("%d %s %d %s remaining");
timestring = template.format (hours, ngettext("hour", "hours", hours), minutes, ngettext("minute", "minutes", minutes));
timestring = template.format (hours, Gettext.ngettext("hour", "hours", hours), minutes, Gettext.ngettext("minute", "minutes", minutes));
}
} else
timestring = ngettext("%d minute remaining", "%d minutes remaining", minutes).format(minutes);
timestring = Gettext.ngettext("%d minute remaining", "%d minutes remaining", minutes).format(minutes);
this._batteryItem.label.text = timestring;
}
this._primaryPercentage.text = Math.round(percentage) + '%';

View File

@ -9,11 +9,13 @@ const Gvc = imports.gi.Gvc;
const Signals = imports.signals;
const St = imports.gi.St;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Util = imports.misc.util;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const VOLUME_ADJUSTMENT_STEP = 0.05; /* Volume adjustment step in % */
const VOLUME_NOTIFY_ID = 1;
@ -62,7 +64,6 @@ Indicator.prototype = {
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addAction(_("Sound Settings"), function() {
Main.overview.hide();
let app = Shell.AppSystem.get_default().get_app('gnome-sound-panel.desktop');
app.activate(-1);
});

View File

@ -9,6 +9,8 @@ const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Tp = imports.gi.TelepathyGLib;
const UPowerGlib = imports.gi.UPowerGlib;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const GnomeSession = imports.misc.gnomeSession;
const Main = imports.ui.main;
@ -26,8 +28,7 @@ const DISABLE_LOG_OUT_KEY = 'disable-log-out';
const ScreenSaverInterface = {
name: BUS_NAME,
methods: [ { name: 'Lock', inSignature: '' },
{ name: 'SetActive', inSignature: 'b' }]
methods: [ { name: 'Lock', inSignature: '' } ]
};
let ScreenSaverProxy = DBus.makeProxyClass(ScreenSaverInterface);
@ -58,7 +59,6 @@ StatusMenuButton.prototype = {
this._presence = new GnomeSession.Presence();
this._presenceItems = {};
this._session = new GnomeSession.SessionManager();
this._haveShutdown = true;
this._account_mgr = Tp.AccountManager.dup()
@ -91,25 +91,12 @@ StatusMenuButton.prototype = {
Lang.bind(this, this._updateSwitchUser));
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
Lang.bind(this, this._updateLogout));
this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY,
Lang.bind(this, this._updateLockScreen));
this._updateSwitchUser();
this._updateLogout();
this._updateLockScreen();
// Whether shutdown is available or not depends on both lockdown
// settings (disable-log-out) and Polkit policy - the latter doesn't
// notify, so we update the menu item each time the menu opens or
// the lockdown setting changes, which should be close enough.
this.menu.connect('open-state-changed', Lang.bind(this,
function(menu, open) {
if (open)
this._updateHaveShutdown();
}));
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
Lang.bind(this, this._updateHaveShutdown));
this._upClient.connect('notify::can-suspend', Lang.bind(this, this._updateSuspendOrPowerOff));
},
@ -126,25 +113,13 @@ StatusMenuButton.prototype = {
},
_updateSessionSeparator: function() {
let sessionItemsVisible = this._loginScreenItem.actor.visible ||
this._logoutItem.actor.visible ||
this._lockScreenItem.actor.visible;
let showSessionSeparator = sessionItemsVisible &&
this._suspendOrPowerOffItem.actor.visible;
let showSettingsSeparator = sessionItemsVisible ||
this._suspendOrPowerOffItem.actor.visible;
if (showSessionSeparator)
let showSeparator = this._loginScreenItem.actor.visible ||
this._logoutItem.actor.visible ||
this._lockScreenItem.actor.visible;
if (showSeparator)
this._sessionSeparator.actor.show();
else
this._sessionSeparator.actor.hide();
if (showSettingsSeparator)
this._settingsSeparator.actor.show();
else
this._settingsSeparator.actor.hide();
},
_updateSwitchUser: function() {
@ -174,34 +149,16 @@ StatusMenuButton.prototype = {
this._updateSessionSeparator();
},
_updateHaveShutdown: function() {
this._session.CanShutdownRemote(Lang.bind(this,
function(result, error) {
if (!error) {
this._haveShutdown = result;
this._updateSuspendOrPowerOff();
}
}));
},
_updateSuspendOrPowerOff: function() {
this._haveSuspend = this._upClient.get_can_suspend();
if (!this._suspendOrPowerOffItem)
return;
if (!this._haveShutdown && !this._haveSuspend)
this._suspendOrPowerOffItem.actor.hide();
else
this._suspendOrPowerOffItem.actor.show();
this._updateSessionSeparator();
// If we can't suspend show Power Off... instead
// and disable the alt key
if (!this._haveSuspend) {
this._suspendOrPowerOffItem.updateText(_("Power Off..."), null);
} else if (!this._haveShutdown) {
this._suspendOrPowerOffItem.updateText(_("Suspend"), null);
} else {
this._suspendOrPowerOffItem.updateText(_("Suspend"), _("Power Off..."));
}
@ -247,7 +204,6 @@ StatusMenuButton.prototype = {
item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item);
this._settingsSeparator = item;
item = new PopupMenu.PopupMenuItem(_("Lock Screen"));
item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
@ -315,7 +271,7 @@ StatusMenuButton.prototype = {
if (this._haveSuspend &&
this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
this._screenSaverProxy.SetActiveRemote(true, Lang.bind(this, function() {
this._screenSaverProxy.LockRemote(Lang.bind(this, function() {
this._upClient.suspend_sync(null);
}));
} else {

View File

@ -9,6 +9,9 @@ const Signals = imports.signals;
const St = imports.gi.St;
const Tpl = imports.gi.TelepathyLogger;
const Tp = imports.gi.TelepathyGLib;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const C_ = Gettext.pgettext;
const History = imports.misc.history;
const Main = imports.ui.main;
@ -77,20 +80,19 @@ Client.prototype = {
// The second argument, recover, means _observeChannels will be run
// for any existing channel as well.
let dbus = Tp.DBusDaemon.dup();
this._tpClient = new Shell.TpClient({ 'dbus_daemon': dbus,
'name': 'GnomeShell',
'uniquify-name': true })
this._tpClient.set_observe_channels_func(
Lang.bind(this, this._observeChannels));
this._tpClient.set_approve_channels_func(
Lang.bind(this, this._approveChannels));
this._tpClient.set_handle_channels_func(
Lang.bind(this, this._handleChannels));
this._observer = Tp.SimpleObserver.new(dbus, true, 'GnomeShell', true,
Lang.bind(this, this._observeChannels));
// We only care about single-user text-based chats
let props = {};
props[Tp.PROP_CHANNEL_CHANNEL_TYPE] = Tp.IFACE_CHANNEL_TYPE_TEXT;
props[Tp.PROP_CHANNEL_TARGET_HANDLE_TYPE] = Tp.HandleType.CONTACT;
this._observer.add_observer_filter(props);
try {
this._tpClient.register();
this._observer.register();
} catch (e) {
throw new Error('Couldn\'t register Telepathy client. Error: \n' + e);
throw new Error('Couldn\'t register SimpleObserver. Error: \n' + e);
}
},
@ -103,7 +105,7 @@ Client.prototype = {
this._finishObserveChannels(account, conn, channels, context);
} else {
Shell.get_self_contact_features(conn,
contactFeatures,
contactFeatures.length, contactFeatures,
Lang.bind(this, function() {
this._finishObserveChannels(account, conn, channels, context);
}));
@ -123,8 +125,8 @@ Client.prototype = {
continue;
/* Request a TpContact */
Shell.get_tp_contacts(conn, [targetHandle],
contactFeatures,
Shell.get_tp_contacts(conn, 1, [targetHandle],
contactFeatures.length, contactFeatures,
Lang.bind(this, function (connection, contacts, failed) {
if (contacts.length < 1)
return;
@ -141,82 +143,30 @@ Client.prototype = {
if (this._sources[channel.get_object_path()])
return;
let source = new Source(account, conn, channel, contact, this._tpClient);
let source = new Source(account, conn, channel, contact);
this._sources[channel.get_object_path()] = source;
source.connect('destroy', Lang.bind(this,
function() {
if (this._tpClient.is_handling_channel(channel)) {
// The chat box has been destroyed so it can't
// handle the channel any more.
channel.close_async(function(src, result) {
channel.close_finish(result);
});
}
delete this._sources[channel.get_object_path()];
}));
},
_handlingChannels: function(account, conn, channels) {
let len = channels.length;
for (let i = 0; i < len; i++) {
let channel = channels[i];
// We can only handle text channel, so close any other channel
if (!(channel instanceof Tp.TextChannel)) {
channel.close_async(null);
continue;
}
if (this._tpClient.is_handling_channel(channel)) {
// We are already handling the channel, display the source
let source = this._sources[channel.get_object_path()];
if (source)
source.notify();
}
}
},
_approveChannels: function(approver, account, conn, channels,
dispatchOp, context) {
// Approve the channels right away as we are going to handle it
dispatchOp.claim_with_async(this._tpClient,
Lang.bind (this, function(dispatchOp, result) {
try {
dispatchOp.claim_with_finish(result);
this._handlingChannels(account, conn, channels);
} catch (err) {
global.logError('Failed to Claim channel: ' + err);
}}));
context.accept();
},
_handleChannels: function(handler, account, conn, channels,
requests, user_action_time, context) {
this._handlingChannels(account, conn, channels);
context.accept();
}
};
function Source(account, conn, channel, contact, client) {
this._init(account, conn, channel, contact, client);
function Source(account, conn, channel, contact) {
this._init(account, conn, channel, contact);
}
Source.prototype = {
__proto__: MessageTray.Source.prototype,
_init: function(account, conn, channel, contact, client) {
_init: function(account, conn, channel, contact) {
MessageTray.Source.prototype._init.call(this, contact.get_alias());
this.isChat = true;
this._account = account;
this._contact = contact;
this._client = client;
this._pendingMessages = [];
this._conn = conn;
this._channel = channel;
@ -225,21 +175,10 @@ Source.prototype = {
this._notification = new Notification(this);
this._notification.setUrgency(MessageTray.Urgency.HIGH);
// We ack messages when the message box is collapsed if user has
// interacted with it before and so read the messages:
// - user clicked on it the tray
// - user expanded the notification by hovering over the toaster notification
this._shouldAck = false;
this.connect('summary-item-clicked', Lang.bind(this, this._summaryItemClicked));
this._notification.connect('expanded', Lang.bind(this, this._notificationExpanded));
this._notification.connect('collapsed', Lang.bind(this, this._notificationCollapsed));
this._presence = contact.get_presence_type();
this._sentId = this._channel.connect('message-sent', Lang.bind(this, this._messageSent));
this._receivedId = this._channel.connect('message-received', Lang.bind(this, this._messageReceived));
this._pendingId = this._channel.connect('pending-message-removed', Lang.bind(this, this._pendingRemoved));
this._setSummaryIcon(this.createNotificationIcon());
@ -256,7 +195,7 @@ Source.prototype = {
_updateAlias: function() {
let oldAlias = this.title;
this.setTitle(this._contact.get_alias());
this.title = this._contact.get_alias();
this._notification.appendAliasChange(oldAlias, this.title);
this.pushNotification(this._notification);
},
@ -285,17 +224,13 @@ Source.prototype = {
},
open: function(notification) {
if (this._client.is_handling_channel(this._channel)) {
// We are handling the channel, try to pass it to Empathy
this._client.delegate_channels_async([this._channel], global.get_current_time(), "", null);
}
else {
// We are not the handler, just ask to present the channel
let dbus = Tp.DBusDaemon.dup();
let cd = Tp.ChannelDispatcher.new(dbus);
let props = {};
props[Tp.PROP_CHANNEL_CHANNEL_TYPE] = Tp.IFACE_CHANNEL_TYPE_TEXT;
[props[Tp.PROP_CHANNEL_TARGET_HANDLE], props[Tp.PROP_CHANNEL_TARGET_HANDLE_TYPE]] = this._channel.get_handle();
cd.present_channel_async(this._channel, global.get_current_time(), null);
}
let req = Tp.AccountChannelRequest.new(this._account, props, global.get_current_time());
req.ensure_channel_async('', null, null);
},
_getLogMessages: function() {
@ -313,18 +248,7 @@ Source.prototype = {
let logMessages = events.map(makeMessageFromTplEvent);
let pendingTpMessages = this._channel.get_pending_messages();
let pendingMessages = [];
for (let i = 0; i < pendingTpMessages.length; i++) {
let message = pendingTpMessages[i];
if (message.get_message_type() == Tp.ChannelTextMessageType.DELIVERY_REPORT)
continue;
pendingMessages.push(makeMessageFromTpMessage(message, NotificationDirection.RECEIVED));
this._pendingMessages.push(message);
}
let pendingMessages = pendingTpMessages.map(function (tpMessage) { return makeMessageFromTpMessage(tpMessage, NotificationDirection.RECEIVED); });
let showTimestamp = false;
@ -360,7 +284,6 @@ Source.prototype = {
_channelClosed: function() {
this._channel.disconnect(this._closedId);
this._channel.disconnect(this._receivedId);
this._channel.disconnect(this._pendingId);
this._channel.disconnect(this._sentId);
this._contact.disconnect(this._notifyAliasId);
@ -371,11 +294,6 @@ Source.prototype = {
},
_messageReceived: function(channel, message) {
if (message.get_message_type() == Tp.ChannelTextMessageType.DELIVERY_REPORT)
return;
this._pendingMessages.push(message);
message = makeMessageFromTpMessage(message, NotificationDirection.RECEIVED);
this._notification.appendMessage(message);
this.notify();
@ -402,12 +320,10 @@ Source.prototype = {
}
let msg = Tp.ClientMessage.new_text(type, text);
this._channel.send_message_async(msg, 0, Lang.bind(this, function (src, result) {
this._channel.send_message_finish(result);
}));
this._channel.send_message_async(msg, 0, null);
},
_presenceChanged: function (contact, presence, status, message) {
_presenceChanged: function (contact, presence, type, status, message) {
let msg, shouldNotify, title;
if (this._presence == presence)
@ -440,43 +356,6 @@ Source.prototype = {
this._notification.appendPresence(msg, shouldNotify);
if (shouldNotify)
this.notify();
},
_pendingRemoved: function(channel, message) {
let idx = this._pendingMessages.indexOf(message);
if (idx >= 0)
this._pendingMessages.splice(idx, 1);
else
throw new Error('Message not in our pending list: ' + message);
},
_ackMessages: function() {
if (this._pendingMessages.length == 0)
return;
// Don't clear our messages here, tp-glib will send a
// 'pending-message-removed' for each one.
this._channel.ack_messages_async(this._pendingMessages, Lang.bind(this, function(src, result) {
this._channel.ack_messages_finish(result);}));
},
_summaryItemClicked: function(source, button) {
if (button != 1)
return;
this._shouldAck = true;
},
_notificationExpanded: function() {
this._shouldAck = true;
},
_notificationCollapsed: function() {
if (this._shouldAck)
this._ackMessages();
this._shouldAck = false;
}
};
@ -545,35 +424,13 @@ Notification.prototype = {
this._append(messageBody, styles, message.timestamp, noTimestamp);
},
_filterMessages: function() {
if (this._history.length < 1)
return;
let lastMessageTime = this._history[0].time;
let currentTime = (Date.now() / 1000);
// Keep the scrollback from growing too long. If the most
// recent message (before the one we just added) is within
// SCROLLBACK_RECENT_TIME, we will keep
// SCROLLBACK_RECENT_LENGTH previous messages. Otherwise
// we'll keep SCROLLBACK_IDLE_LENGTH messages.
let maxLength = (lastMessageTime < currentTime - SCROLLBACK_RECENT_TIME) ?
SCROLLBACK_IDLE_LENGTH : SCROLLBACK_RECENT_LENGTH;
let filteredHistory = this._history.filter(function(item) { return item.realMessage });
if (filteredHistory.length > maxLength) {
let lastMessageToKeep = filteredHistory[maxLength];
let expired = this._history.splice(this._history.indexOf(lastMessageToKeep));
for (let i = 0; i < expired.length; i++)
expired[i].actor.destroy();
}
},
_append: function(text, styles, timestamp, noTimestamp) {
let currentTime = (Date.now() / 1000);
if (!timestamp)
timestamp = currentTime;
let lastMessageTime = -1;
if (this._history.length > 0)
lastMessageTime = this._history[0].time;
// Reset the old message timeout
if (this._timestampTimeoutId)
@ -596,7 +453,23 @@ Notification.prototype = {
Lang.bind(this, this.appendTimestamp));
}
this._filterMessages();
if (this._history.length > 1) {
// Keep the scrollback from growing too long. If the most
// recent message (before the one we just added) is within
// SCROLLBACK_RECENT_TIME, we will keep
// SCROLLBACK_RECENT_LENGTH previous messages. Otherwise
// we'll keep SCROLLBACK_IDLE_LENGTH messages.
let maxLength = (lastMessageTime < currentTime - SCROLLBACK_RECENT_TIME) ?
SCROLLBACK_IDLE_LENGTH : SCROLLBACK_RECENT_LENGTH;
let filteredHistory = this._history.filter(function(item) { return item.realMessage });
if (filteredHistory.length > maxLength) {
let lastMessageToKeep = filteredHistory[maxLength];
let expired = this._history.splice(this._history.indexOf(lastMessageToKeep));
for (let i = 0; i < expired.length; i++)
expired[i].actor.destroy();
}
}
},
_formatTimestamp: function(date) {
@ -638,9 +511,6 @@ Notification.prototype = {
this._history.unshift({ actor: timeLabel, time: lastMessageTime, realMessage: false });
this._timestampTimeoutId = 0;
this._filterMessages();
return false;
},
@ -652,23 +522,21 @@ Notification.prototype = {
let label = this.addBody(text, true);
label.add_style_class_name('chat-meta-message');
this._history.unshift({ actor: label, time: (Date.now() / 1000), realMessage: false});
this._filterMessages();
},
appendAliasChange: function(oldAlias, newAlias) {
oldAlias = GLib.markup_escape_text(oldAlias, -1);
newAlias = GLib.markup_escape_text(newAlias, -1);
// FIXME: uncomment this after 3.0 string freeze ends
/* Translators: this is the other person changing their old IM name to their new
IM name. */
let message = '<i>' + _("%s is now known as %s").format(oldAlias, newAlias) + '</i>';
let label = this.addBody(message, true);
label.add_style_class_name('chat-meta-message');
this._history.unshift({ actor: label, time: (Date.now() / 1000), realMessage: false });
this.update(newAlias, null, { customContent: true });
// oldAlias = GLib.markup_escape_text(oldAlias, -1);
// newAlias = GLib.markup_escape_text(newAlias, -1);
this._filterMessages();
// /* Translators: this is the other person changing their old IM name to their new
// IM name. */
// let message = '<i>' + _("%s is now known as %s").format(oldAlias, newAlias) + '</i>';
// let label = this.addBody(message, true);
// label.add_style_class_name('chat-meta-message');
// this._history.unshift({ actor: label, time: (Date.now() / 1000), realMessage: false });
// this.update(newAlias, null, { customContent: true });
},
_onEntryActivated: function() {

View File

@ -8,6 +8,8 @@ const Signals = imports.signals;
const Lang = imports.lang;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Main = imports.ui.main;
const Search = imports.ui.search;

View File

@ -2,6 +2,8 @@
const Lang = imports.lang;
const Shell = imports.gi.Shell;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;

View File

@ -6,7 +6,6 @@ const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Meta = imports.gi.Meta;
const St = imports.gi.St;
const Shell = imports.gi.Shell;
const AltTab = imports.ui.altTab;
const WorkspaceSwitcherPopup = imports.ui.workspaceSwitcherPopup;
@ -23,7 +22,8 @@ function getDimShader() {
if (dimShader === null)
return null;
if (!dimShader) {
let source = Shell.get_file_contents_utf8_sync(global.datadir + '/shaders/dim-window.glsl');
let [success, source, length] = GLib.file_get_contents(global.datadir +
'/shaders/dim-window.glsl');
try {
let shader = new Clutter.Shader();
shader.set_fragment_source(source, -1);

View File

@ -1,7 +1,6 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Clutter = imports.gi.Clutter;
const GConf = imports.gi.GConf;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
@ -28,8 +27,6 @@ const CLOSE_BUTTON_FADE_TIME = 0.1;
const DRAGGING_WINDOW_OPACITY = 100;
const BUTTON_LAYOUT_KEY = '/desktop/gnome/shell/windows/button_layout';
// Define a layout scheme for small window counts. For larger
// counts we fall back to an algorithm. We need more schemes here
// unless we have a really good algorithm.
@ -308,21 +305,6 @@ WindowClone.prototype = {
this.emit('drag-begin');
},
_getWorkspaceActor : function() {
let index = this.metaWindow.get_workspace().index();
return Main.overview.workspaces.getWorkspaceByIndex(index);
},
handleDragOver : function(source, actor, x, y, time) {
let workspace = this._getWorkspaceActor();
return workspace.handleDragOver(source, actor, x, y, time);
},
acceptDrop : function(source, actor, x, y, time) {
let workspace = this._getWorkspaceActor();
workspace.acceptDrop(source, actor, x, y, time);
},
_onDragCancelled : function (draggable, time) {
this.emit('drag-cancelled');
},
@ -415,8 +397,6 @@ WindowOverlay.prototype = {
show: function() {
this._hidden = false;
if (this._windowClone.actor.has_pointer)
this.closeButton.show();
this.title.show();
},
@ -453,20 +433,9 @@ WindowOverlay.prototype = {
let button = this.closeButton;
let title = this.title;
let gconf = GConf.Client.get_default();
let layout = gconf.get_string(BUTTON_LAYOUT_KEY);
let rtl = St.Widget.get_default_direction() == St.TextDirection.RTL;
let split = layout.split(":");
let side;
if (split[0].indexOf("close") > -1)
side = rtl ? St.Side.RIGHT : St.Side.LEFT;
else
side = rtl ? St.Side.LEFT : St.Side.RIGHT;
let buttonX;
let buttonY = cloneY - (button.height - button._overlap);
if (side == St.Side.LEFT)
if (St.Widget.get_default_direction() == St.TextDirection.RTL)
buttonX = cloneX - (button.width - button._overlap);
else
buttonX = cloneX + (cloneWidth - button._overlap);
@ -648,7 +617,6 @@ Workspace.prototype = {
function () {
this._dropRect.set_position(x, y);
this._dropRect.set_size(width, height);
this.positionWindows(WindowPositionFlags.ANIMATE);
return false;
}));
@ -671,6 +639,16 @@ Workspace.prototype = {
return this._windows.length == 0;
},
/**
* setReactive:
* @reactive: %true iff the workspace should be reactive
*
* Set the workspace (desktop) reactive
**/
setReactive: function(reactive) {
this.actor.reactive = reactive;
},
// Only use this for n <= 20 say
_factorial: function(n) {
let result = 1;

View File

@ -178,11 +178,6 @@ WorkspaceThumbnail.prototype = {
// Create clones for windows that should be visible in the Overview
this._windows = [];
for (let i = 0; i < windows.length; i++) {
windows[i].meta_window._minimizedChangedId =
windows[i].meta_window.connect('notify::minimized',
Lang.bind(this,
this._updateMinimized));
if (this._isOverviewWindow(windows[i])) {
this._addWindowClone(windows[i]);
}
@ -262,18 +257,11 @@ WorkspaceThumbnail.prototype = {
return;
// Check if window still should be here
if (win && this._isMyWindow(win) && this._isOverviewWindow(win))
if (win && this._isMyWindow(win))
return;
let clone = this._windows[index];
this._windows.splice(index, 1);
if (win && this._isOverviewWindow(win)) {
if (metaWin._minimizedChangedId) {
metaWin.disconnect(metaWin._minimizedChangedId);
delete metaWin._minimizedChangedId;
}
}
clone.destroy();
},
@ -302,11 +290,6 @@ WorkspaceThumbnail.prototype = {
if (this._lookupIndex (metaWin) != -1)
return;
if (!metaWin._minimizedChangedId)
metaWin._minimizedChangedId = metaWin.connect('notify::minimized',
Lang.bind(this,
this._updateMinimized));
if (!this._isMyWindow(win) || !this._isOverviewWindow(win))
return;
@ -333,13 +316,6 @@ WorkspaceThumbnail.prototype = {
}
},
_updateMinimized: function(metaWin) {
if (metaWin.minimized)
this._doRemoveWindow(metaWin);
else
this._doAddWindow(metaWin);
},
destroy : function() {
this.actor.destroy();
},
@ -350,14 +326,6 @@ WorkspaceThumbnail.prototype = {
global.screen.disconnect(this._windowEnteredMonitorId);
global.screen.disconnect(this._windowLeftMonitorId);
for (let i = 0; i < this._windows.length; i++) {
let metaWin = this._windows[i].metaWindow;
if (metaWin._minimizedChangedId) {
metaWin.disconnect(metaWin._minimizedChangedId);
delete metaWin._minimizedChangedId;
}
}
this._windows = [];
this.actor = null;
},
@ -371,8 +339,7 @@ WorkspaceThumbnail.prototype = {
// Tests if @win should be shown in the Overview
_isOverviewWindow : function (win) {
let tracker = Shell.WindowTracker.get_default();
return tracker.is_window_interesting(win.get_meta_window()) &&
win.get_meta_window().showing_on_its_workspace();
return tracker.is_window_interesting(win.get_meta_window());
},
// Create a clone of a (non-desktop) window and add it to the window list

View File

@ -7,6 +7,8 @@ const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Signals = imports.signals;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
const DND = imports.ui.dnd;
const Main = imports.ui.main;
@ -49,12 +51,9 @@ WorkspacesView.prototype = {
this._height = 0;
this._x = 0;
this._y = 0;
this._clipX = 0;
this._clipY = 0;
this._clipWidth = 0;
this._clipHeight = 0;
this._workspaceRatioSpacing = 0;
this._spacing = 0;
this._lostWorkspaces = [];
this._animating = false; // tweening
this._scrolling = false; // swipe-scrolling
this._animatingScroll = false; // programatically updating the adjustment
@ -96,8 +95,7 @@ WorkspacesView.prototype = {
this._overviewShownId =
Main.overview.connect('shown',
Lang.bind(this, function() {
this.actor.set_clip(this._clipX, this._clipY,
this._clipWidth, this._clipHeight);
this.actor.set_clip(this._x, this._y, this._width, this._height);
}));
this._scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,
@ -141,13 +139,6 @@ WorkspacesView.prototype = {
this._workspaces[i].setGeometry(x, y, width, height);
},
setClipRect: function(x, y, width, height) {
this._clipX = x;
this._clipY = y;
this._clipWidth = width;
this._clipHeight = height;
},
_lookupWorkspaceForMetaWindow: function (metaWindow) {
for (let i = 0; i < this._workspaces.length; i++) {
if (this._workspaces[i].containsMetaWindow(metaWindow))
@ -161,10 +152,6 @@ WorkspacesView.prototype = {
return this._workspaces[active];
},
getWorkspaceByIndex: function(index) {
return this._workspaces[index];
},
hide: function() {
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
let activeWorkspace = this._workspaces[activeWorkspaceIndex];
@ -239,6 +226,27 @@ WorkspacesView.prototype = {
this._updateVisibility();
}
}
for (let l = 0; l < this._lostWorkspaces.length; l++) {
let workspace = this._lostWorkspaces[l];
Tweener.removeTweens(workspace.actor);
workspace.actor.show();
workspace.hideWindowsOverlays();
if (showAnimation) {
Tweener.addTween(workspace.actor,
{ y: workspace.x,
time: WORKSPACE_SWITCH_TIME,
transition: 'easeOutQuad',
onComplete: Lang.bind(this,
this._cleanWorkspaces)
});
} else {
this._cleanWorkspaces();
}
}
},
_updateVisibility: function() {
@ -259,6 +267,17 @@ WorkspacesView.prototype = {
}
},
_cleanWorkspaces: function() {
if (this._lostWorkspaces.length == 0)
return;
for (let l = 0; l < this._lostWorkspaces.length; l++)
this._lostWorkspaces[l].destroy();
this._lostWorkspaces = [];
this._updateWorkspaceActors(false);
},
_updateScrollAdjustment: function(index, showAnimation) {
if (this._scrolling)
return;
@ -281,9 +300,12 @@ WorkspacesView.prototype = {
}
},
updateWorkspaces: function(oldNumWorkspaces, newNumWorkspaces) {
updateWorkspaces: function(oldNumWorkspaces, newNumWorkspaces, lostWorkspaces) {
let active = global.screen.get_active_workspace_index();
for (let l = 0; l < lostWorkspaces.length; l++)
lostWorkspaces[l].disconnectAll();
Tweener.addTween(this._scrollAdjustment,
{ upper: newNumWorkspaces,
time: WORKSPACE_SWITCH_TIME,
@ -291,13 +313,12 @@ WorkspacesView.prototype = {
});
if (newNumWorkspaces > oldNumWorkspaces) {
for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
this._workspaces[w].setGeometry(this._x, this._y,
this._width, this._height);
for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++)
this.actor.add_actor(this._workspaces[w].actor);
}
this._updateWorkspaceActors(false);
} else {
this._lostWorkspaces = lostWorkspaces;
}
this._scrollToActive(true);
@ -449,7 +470,7 @@ WorkspacesView.prototype = {
Mainloop.source_remove(this._timeoutId);
this._timeoutId = 0;
}
DND.removeDragMonitor(this._dragMonitor);
DND.removeMonitor(this._dragMonitor);
this._inDrag = false;
for (let i = 0; i < this._workspaces.length; i++)
@ -568,9 +589,6 @@ WorkspacesDisplay.prototype = {
this._updateAlwaysZoom();
global.screen.connect('monitors-changed', Lang.bind(this, this._updateAlwaysZoom));
global.screen.connect('notify::n-workspaces',
Lang.bind(this, this._workspacesChanged));
Main.xdndHandler.connect('drag-begin', Lang.bind(this, function(){
this._alwaysZoomOut = true;
}));
@ -580,6 +598,7 @@ WorkspacesDisplay.prototype = {
this._updateAlwaysZoom();
}));
this._nWorkspacesNotifyId = 0;
this._switchWorkspaceNotifyId = 0;
this._itemDragBeginId = 0;
@ -609,6 +628,10 @@ WorkspacesDisplay.prototype = {
this.workspacesView = new WorkspacesView(this._workspaces);
this._updateWorkspacesGeometry();
this._nWorkspacesNotifyId =
global.screen.connect('notify::n-workspaces',
Lang.bind(this, this._workspacesChanged));
this._restackedNotifyId =
global.screen.connect('restacked',
Lang.bind(this, this._onRestacked));
@ -639,6 +662,10 @@ WorkspacesDisplay.prototype = {
this._controls.hide();
this._thumbnailsBox.hide();
if (this._nWorkspacesNotifyId > 0) {
global.screen.disconnect(this._nWorkspacesNotifyId);
this._nWorkspacesNotifyId = 0;
}
if (this._restackedNotifyId > 0){
global.screen.disconnect(this._restackedNotifyId);
this._restackedNotifyId = 0;
@ -687,12 +714,7 @@ WorkspacesDisplay.prototype = {
},
_updateAlwaysZoom: function() {
// Always show the pager if workspaces are actually used,
// e.g. there are windows on more than one
this._alwaysZoomOut = global.screen.n_workspaces > 2;
if (this._alwaysZoomOut)
return;
this._alwaysZoomOut = false;
let monitors = global.get_monitors();
let primary = global.get_primary_monitor();
@ -763,13 +785,6 @@ WorkspacesDisplay.prototype = {
let rtl = (St.Widget.get_default_direction () == St.TextDirection.RTL);
let clipWidth = width - controlsVisible;
let clipHeight = (fullHeight / fullWidth) * clipWidth;
let clipX = rtl ? x + controlsVisible : x;
let clipY = y + (fullHeight - clipHeight) / 2;
this.workspacesView.setClipRect(clipX, clipY, clipWidth, clipHeight);
if (this._zoomOut) {
width -= controlsNatural;
if (rtl)
@ -808,12 +823,6 @@ WorkspacesDisplay.prototype = {
if (oldNumWorkspaces == newNumWorkspaces)
return;
this._updateAlwaysZoom();
this._updateZoom();
if (this.workspacesView == null)
return;
let lostWorkspaces = [];
if (newNumWorkspaces > oldNumWorkspaces) {
// Assume workspaces are only added at the end
@ -839,23 +848,24 @@ WorkspacesDisplay.prototype = {
lostWorkspaces = this._workspaces.splice(removedIndex,
removedNum);
for (let l = 0; l < lostWorkspaces.length; l++) {
lostWorkspaces[l].disconnectAll();
lostWorkspaces[l].destroy();
}
// Don't let the user try to select this workspace as it's
// making its exit.
for (let l = 0; l < lostWorkspaces.length; l++)
lostWorkspaces[l].setReactive(false);
this._thumbnailsBox.removeThumbmails(removedIndex, removedNum);
}
this.workspacesView.updateWorkspaces(oldNumWorkspaces,
newNumWorkspaces);
newNumWorkspaces,
lostWorkspaces);
},
_updateZoom : function() {
if (Main.overview.animationInProgress)
return;
let shouldZoom = this._alwaysZoomOut || this._controls.hover;
let shouldZoom = this._alwaysZoomOut || this._controls.hover || (this._inDrag && !this._cancelledDrag);
if (shouldZoom != this._zoomOut) {
this._zoomOut = shouldZoom;
this._updateWorkspacesGeometry();
@ -879,22 +889,12 @@ WorkspacesDisplay.prototype = {
_dragBegin: function() {
this._inDrag = true;
this._cancelledDrag = false;
this._dragMonitor = {
dragMotion: Lang.bind(this, this._onDragMotion)
};
DND.addDragMonitor(this._dragMonitor);
this._updateZoom();
},
_dragCancelled: function() {
this._cancelledDrag = true;
DND.removeDragMonitor(this._dragMonitor);
},
_onDragMotion: function(dragEvent) {
let controlsHovered = this._controls.contains(dragEvent.targetActor);
this._controls.set_hover(controlsHovered);
return DND.DragMotionResult.CONTINUE;
this._updateZoom();
},
_dragEnd: function() {

View File

@ -36,48 +36,53 @@ visually attractive and easy to use experience.
.SH OPTIONS
.TP
.B \-\-replace
Replace the running window manager
.B \-r, \-\-replace
Replace the running metacity/gnome-panel
.br
.TP
.B \-\-sm-disable
Disable connection to the session manager
.B \-v, \-\-verbose
Shows details about the results of running `gnome-shell'.
.br
.TP
.B \-\-sm-client-id=ID
Specify session management ID
.B \-g, \-\-debug
Run under a debugger
.br
.TP
.B \-\-sm-save-file=FILE
Initialize session from savefile
.br
.TP
.B \-\-screen=SCREEN
X screen to use
.br
.TP
.B \-d, \-\-display=DISPLAY
X display to use
.B \-\-debug\-command
Command to use for debugging (defaults to 'gdb \-\-args')
.br
.TP
.B \-\-sync
Make X calls synchronous
.br
Make X calls synchronously, useful when debugging down X errors
.br
.TP
.B \-\-version
Print version and exit
.B \-\-xephyr
Run a debugging instance inside Xephyr
.br
.TP
.B \-\-help
Display help and exit
.B \-\-geometry
Specify Xephyr screen geometry
.br
.TP
.B \-w, \-\-wide
Use widescreen (1280x800) with Xephyr
.br
.TP
.B \-\-create\-extension
Create a new GNOME Shell extension
.TP
.B \-\-eval\-file
Evaluate the contents of the given JavaScript file
.br
.SH BUGS

View File

@ -1,18 +1,14 @@
af
an
ar
be
bg
bn
bn_IN
ca
ca@valencia
cs
da
de
el
en_GB
eo
es
et
eu
@ -48,7 +44,6 @@ sr
sr@latin
sv
ta
te
th
tr
ug

1161
po/an.po

File diff suppressed because it is too large Load Diff

1217
po/be.po

File diff suppressed because it is too large Load Diff

553
po/ca.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1222
po/eo.po

File diff suppressed because it is too large Load Diff

622
po/es.po

File diff suppressed because it is too large Load Diff

174
po/fa.po
View File

@ -7,10 +7,9 @@
msgid ""
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"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2011-04-15 18:20+0000\n"
"PO-Revision-Date: 2011-04-06 23:37+0330\n"
"PO-Revision-Date: 2011-05-17 00:53+0330\n"
"Last-Translator: Arash Mousavi <mousavi.arash@gmail.com>\n"
"Language-Team: Persian <translate@ifsug.org>\n"
"Language: fa\n"
@ -31,18 +30,12 @@ msgid "Window management and application launching"
msgstr "مدیریت پنجره‌ها و اجرا کننده‌ی برنامه‌ها"
#: ../data/org.gnome.shell.gschema.xml.in.h:1
msgid ""
"Allows access to internal debugging and monitoring tools using the Alt-F2 "
"dialog."
msgstr ""
"اجازه دسترسی به ابزارهای اشکال‌زدا و پایشگر داخلی با استفاده از محاوره‌ی Alt-"
"F2."
msgid "Allows access to internal debugging and monitoring tools using the Alt-F2 dialog."
msgstr "اجازه دسترسی به ابزارهای اشکال‌زدا و پایشگر داخلی با استفاده از محاوره‌ی Alt-F2."
#: ../data/org.gnome.shell.gschema.xml.in.h:2
msgid "Enable internal tools useful for developers and testers from Alt-F2"
msgstr ""
"فعال کردن ابزارهای داخلی مفید برای توسعه دهندگان و آزمایش کنندگان از طریق "
"Alt-F2"
msgstr "فعال کردن ابزارهای داخلی مفید برای توسعه دهندگان و آزمایش کنندگان از طریق Alt-F2"
#: ../data/org.gnome.shell.gschema.xml.in.h:3
msgid "File extension used for storing the screencast"
@ -53,12 +46,8 @@ msgid "Framerate used for recording screencasts."
msgstr "سرعت فریم استفاده شده در تصویربرداری از صفحه‌نمایش."
#: ../data/org.gnome.shell.gschema.xml.in.h:5
msgid ""
"GNOME Shell extensions have a uuid property; this key lists extensions which "
"should not be loaded."
msgstr ""
"افزونه‌های پوسته‌ی گنوم مشخصه‌ی uuid دارند؛ این کلید افزونه‌هایی که نباید بار "
"شوند را فهرست می‌کند."
msgid "GNOME Shell extensions have a uuid property; this key lists extensions which should not be loaded."
msgstr "افزونه‌های پوسته‌ی گنوم مشخصه‌ی uuid دارند؛ این کلید افزونه‌هایی که نباید بار شوند را فهرست می‌کند."
#: ../data/org.gnome.shell.gschema.xml.in.h:6
msgid "History for command (Alt-F2) dialog"
@ -86,17 +75,7 @@ msgstr "فهرست شناسه‌های پرونده‌ی رومیزی برای
#: ../data/org.gnome.shell.gschema.xml.in.h:13
#, no-c-format
msgid ""
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
"used for gst-launch. The pipeline should have an unconnected sink pad where "
"the recorded video is recorded. It will normally have a unconnected source "
"pad; output from that pad will be written into the output file. However the "
"pipeline can also take care of its own output - this might be used to send "
"the output to an icecast server via shout2send or similar. When unset or set "
"to an empty value, the default pipeline will be used. This is currently "
"'videorate ! vp8enc quality=10 speed=2 threads=%T ! queue ! webmmux' and "
"records to WEBM using the VP8 codec. %T is used as a placeholder for a guess "
"at the optimal thread count on the system."
msgid "Sets the GStreamer pipeline used to encode recordings. It follows the syntax used for gst-launch. The pipeline should have an unconnected sink pad where the recorded video is recorded. It will normally have a unconnected source pad; output from that pad will be written into the output file. However the pipeline can also take care of its own output - this might be used to send the output to an icecast server via shout2send or similar. When unset or set to an empty value, the default pipeline will be used. This is currently 'videorate ! vp8enc quality=10 speed=2 threads=%T ! queue ! webmmux' and records to WEBM using the VP8 codec. %T is used as a placeholder for a guess at the optimal thread count on the system."
msgstr ""
#: ../data/org.gnome.shell.gschema.xml.in.h:14
@ -112,45 +91,24 @@ msgid "Show time with seconds"
msgstr "نمایش ساعت همراه با ثانیه"
#: ../data/org.gnome.shell.gschema.xml.in.h:17
msgid ""
"The applications corresponding to these identifiers will be displayed in the "
"favorites area."
msgid "The applications corresponding to these identifiers will be displayed in the favorites area."
msgstr "برنامه‌های مشابه این شناسه‌ها در قسمت مورد پسندها نمایش داده می‌شود."
#: ../data/org.gnome.shell.gschema.xml.in.h:18
msgid ""
"The filename for recorded screencasts will be a unique filename based on the "
"current date, and use this extension. It should be changed when recording to "
"a different container format."
msgstr ""
"نام پرونده‌ی ضبط شده برای تصویربرداری از صفحه‌نمایش یکتا و براساس تاریخ جاری "
"خواهد بود و از این افزونه استفاده خواهد کرد. اگر در زمان ضبط از قالب دیگری "
"استفاده کنید باید تغییر کند."
msgid "The filename for recorded screencasts will be a unique filename based on the current date, and use this extension. It should be changed when recording to a different container format."
msgstr "نام پرونده‌ی ضبط شده برای تصویربرداری از صفحه‌نمایش یکتا و براساس تاریخ جاری خواهد بود و از این افزونه استفاده خواهد کرد. اگر در زمان ضبط از قالب دیگری استفاده کنید باید تغییر کند."
#: ../data/org.gnome.shell.gschema.xml.in.h:19
msgid ""
"The framerate of the resulting screencast recordered by GNOME Shell's "
"screencast recorder in frames-per-second."
msgstr ""
"سرعت فریم حاصل از تصویربرداری از صفحه نمایش با استفاده از ضبط کننده نمایشگر "
"پوسته‌ی گنوم بر اساس فریم بر ثانیه"
msgid "The framerate of the resulting screencast recordered by GNOME Shell's screencast recorder in frames-per-second."
msgstr "سرعت فریم حاصل از تصویربرداری از صفحه نمایش با استفاده از ضبط کننده نمایشگر پوسته‌ی گنوم بر اساس فریم بر ثانیه"
#: ../data/org.gnome.shell.gschema.xml.in.h:20
msgid "The gstreamer pipeline used to encode the screencast"
msgstr "مجرای ارتباطی gstreamer برای کدگذاری تصویربرداری از صفحه نمایش"
#: ../data/org.gnome.shell.gschema.xml.in.h:21
msgid ""
"The shell normally monitors active applications in order to present the most "
"used ones (e.g. in launchers). While this data will be kept private, you may "
"want to disable this for privacy reasons. Please note that doing so won't "
"remove already saved data."
msgstr ""
"پوسته گنوم در حالت عادی برنامه‌های فعال را جهت ارائه برنامه‌های بیشتر استفاده "
"شده پایش می کند. (برای مثال در اجرا کننده‌ها). با اینکه که این اطلاعات به "
"صورت خصوصی نگاه‌داری می‌شود، ممکن است شما بخواهید این امکان را به دلایل امنیتی "
"غیرفعال کنید. لطفا توجه کنید این کار باعث پاک شدن اطلاعاتی که تاکنون ذخیره "
"شده‌اند نمی‌شود."
msgid "The shell normally monitors active applications in order to present the most used ones (e.g. in launchers). While this data will be kept private, you may want to disable this for privacy reasons. Please note that doing so won't remove already saved data."
msgstr "پوسته گنوم در حالت عادی برنامه‌های فعال را جهت ارائه برنامه‌های بیشتر استفاده شده پایش می کند. (برای مثال در اجرا کننده‌ها). با اینکه که این اطلاعات به صورت خصوصی نگاه‌داری می‌شود، ممکن است شما بخواهید این امکان را به دلایل امنیتی غیرفعال کنید. لطفا توجه کنید این کار باعث پاک شدن اطلاعاتی که تاکنون ذخیره شده‌اند نمی‌شود."
#: ../data/org.gnome.shell.gschema.xml.in.h:22
msgid "Uuids of extensions to disable"
@ -158,8 +116,7 @@ msgstr "شناسه‌های Uuid مربوط به افزونه‌ها که غیر
#: ../data/org.gnome.shell.gschema.xml.in.h:23
msgid "Whether to collect stats about applications usage"
msgstr ""
"اینکه اطلاعات برنامه‌ها درباره‌ی میزان استفاده از منابع جمع‌آوری شود یا خیر"
msgstr "اینکه اطلاعات برنامه‌ها درباره‌ی میزان استفاده از منابع جمع‌آوری شود یا خیر"
#: ../data/org.gnome.shell.gschema.xml.in.h:24
msgid "disabled OpenSearch providers"
@ -227,13 +184,13 @@ msgstr "تمام روز"
#: ../js/ui/calendar.js:71
msgctxt "event list time"
msgid "%H:%M"
msgstr "%OH:%OM"
msgstr "%H:%M"
#. Transators: Shown in calendar event list, if 12h format
#: ../js/ui/calendar.js:78
msgctxt "event list time"
msgid "%l:%M %p"
msgstr "%OI:%OM"
msgstr "%l:%M %p"
#. Translators: Calendar grid abbreviation for Sunday.
#. *
@ -334,16 +291,18 @@ msgid "Nothing Scheduled"
msgstr "بدون برنامه‌ریزی"
#. Translators: Shown on calendar heading when selected day occurs on current year
#: ../js/ui/calendar.js:720 ../js/ui/telepathyClient.js:492
#: ../js/ui/calendar.js:720
#: ../js/ui/telepathyClient.js:492
msgctxt "calendar heading"
msgid "%A, %B %d"
msgstr "%A %Od %B "
msgstr "%A, %B %d"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: ../js/ui/calendar.js:723 ../js/ui/telepathyClient.js:495
#: ../js/ui/calendar.js:723
#: ../js/ui/telepathyClient.js:495
msgctxt "calendar heading"
msgid "%A, %B %d, %Y"
msgstr "%A %Od %B %Oy"
msgstr "%A, %B %d, %Y"
#: ../js/ui/calendar.js:733
msgid "Today"
@ -361,7 +320,8 @@ msgstr "این هفته"
msgid "Next week"
msgstr "هفته آینده"
#: ../js/ui/dash.js:174 ../js/ui/messageTray.js:1037
#: ../js/ui/dash.js:174
#: ../js/ui/messageTray.js:1037
msgid "Remove"
msgstr "حذف"
@ -377,48 +337,48 @@ msgstr "بازکردن تقویم"
#. in 24-hour mode.
#: ../js/ui/dateMenu.js:164
msgid "%a %b %e, %R:%S"
msgstr "%a %Od %b %OH:%OM:%OS"
msgstr "%a %b %e, %R:%S"
#: ../js/ui/dateMenu.js:165
msgid "%a %b %e, %R"
msgstr "%a %Od %b %OH:%OM"
msgstr "%a %b %e, %R"
#. Translators: This is the time format without date used
#. in 24-hour mode.
#: ../js/ui/dateMenu.js:169
msgid "%a %R:%S"
msgstr "%a %OH:%OM:%OS"
msgstr "%a %R:%S"
#: ../js/ui/dateMenu.js:170
msgid "%a %R"
msgstr "%a %OH:%OM"
msgstr "%a %R"
#. Translators: This is a time format with date used
#. for AM/PM.
#: ../js/ui/dateMenu.js:177
msgid "%a %b %e, %l:%M:%S %p"
msgstr "%a Od% %b %OH:%OM:%OS"
msgstr "%a %b %e, %l:%M:%S %p"
#: ../js/ui/dateMenu.js:178
msgid "%a %b %e, %l:%M %p"
msgstr "%a %Od %b %OH:%OM"
msgstr "%a %b %e, %l:%M %p"
#. Translators: This is a time format without date used
#. for AM/PM.
#: ../js/ui/dateMenu.js:182
msgid "%a %l:%M:%S %p"
msgstr "%a %OH:%OM:%OS"
msgstr "%a %l:%M:%S %p"
#: ../js/ui/dateMenu.js:183
msgid "%a %l:%M %p"
msgstr "%a %OH:%OM"
msgstr "%a %l:%M %p"
#. Translators: This is the date format to use when the calendar popup is
#. * shown - it is shown just below the time in the shell (e.g. "Tue 9:29 AM").
#.
#: ../js/ui/dateMenu.js:194
msgid "%A %B %e, %Y"
msgstr "%A %Od %B"
msgstr "%A %B %e, %Y"
#: ../js/ui/docDisplay.js:19
msgid "RECENT ITEMS"
@ -429,14 +389,14 @@ msgstr "موارد اخیر"
msgid "Log Out %s"
msgstr "خروج از %s"
#: ../js/ui/endSessionDialog.js:64 ../js/ui/endSessionDialog.js:70
#: ../js/ui/endSessionDialog.js:64
#: ../js/ui/endSessionDialog.js:70
msgid "Log Out"
msgstr "خروج از سیستم"
#: ../js/ui/endSessionDialog.js:65
msgid "Click Log Out to quit these applications and log out of the system."
msgstr ""
"بر روی خروج از سیستم کلیک کنید تا از این برنامه‌ها خارج و از سیستم خارج شوید."
msgstr "بر روی خروج از سیستم کلیک کنید تا از این برنامه‌ها خارج و از سیستم خارج شوید."
#: ../js/ui/endSessionDialog.js:66
#, c-format
@ -452,7 +412,8 @@ msgstr "شما در مدت %Id ثانیه به طور خودکار از سیست
msgid "Logging out of the system."
msgstr "درحال خروج از سیستم."
#: ../js/ui/endSessionDialog.js:75 ../js/ui/endSessionDialog.js:82
#: ../js/ui/endSessionDialog.js:75
#: ../js/ui/endSessionDialog.js:82
msgid "Power Off"
msgstr "خاموش کردن"
@ -469,16 +430,15 @@ msgstr "سیستم در مدت %Id ثانیه به طور خودکار خامو
msgid "Powering off the system."
msgstr "درحال خاموش کردن سیستم."
#: ../js/ui/endSessionDialog.js:80 ../js/ui/endSessionDialog.js:88
#: ../js/ui/endSessionDialog.js:80
#: ../js/ui/endSessionDialog.js:88
#: ../js/ui/endSessionDialog.js:93
msgid "Restart"
msgstr "راه‌اندازی مجدد"
#: ../js/ui/endSessionDialog.js:89
msgid "Click Restart to quit these applications and restart the system."
msgstr ""
"بر روی راه‌اندازی مجدد کلیک کنید تا از این برنامه‌ها خارج و سیستم مجددا "
"راه‌اندازی گردد."
msgstr "بر روی راه‌اندازی مجدد کلیک کنید تا از این برنامه‌ها خارج و سیستم مجددا راه‌اندازی گردد."
#: ../js/ui/endSessionDialog.js:90
#, c-format
@ -489,7 +449,8 @@ msgstr "سیستم در مدت %Id ثانیه به طور خودکار مجدد
msgid "Restarting the system."
msgstr "درحال راه‌اندازی مجدد سیستم."
#: ../js/ui/endSessionDialog.js:413 ../js/ui/polkitAuthenticationAgent.js:172
#: ../js/ui/endSessionDialog.js:413
#: ../js/ui/polkitAuthenticationAgent.js:172
#: ../js/ui/status/bluetooth.js:466
msgid "Cancel"
msgstr "لغو"
@ -504,7 +465,8 @@ msgstr "به کار انداختن"
#. translators:
#. * The device has been disabled
#: ../js/ui/lookingGlass.js:627 ../src/gvc/gvc-mixer-control.c:1091
#: ../js/ui/lookingGlass.js:627
#: ../src/gvc/gvc-mixer-control.c:1091
msgid "Disabled"
msgstr "از کار انداختن"
@ -628,12 +590,14 @@ msgstr "درحال حستجو..."
msgid "No matching results."
msgstr "نتیجه‌ی منطبقی پیدا نشد."
#: ../js/ui/statusMenu.js:161 ../js/ui/statusMenu.js:163
#: ../js/ui/statusMenu.js:161
#: ../js/ui/statusMenu.js:163
#: ../js/ui/statusMenu.js:228
msgid "Power Off..."
msgstr "خاموش کردن..."
#: ../js/ui/statusMenu.js:163 ../js/ui/statusMenu.js:227
#: ../js/ui/statusMenu.js:163
#: ../js/ui/statusMenu.js:227
msgid "Suspend"
msgstr "تعلیق"
@ -707,9 +671,12 @@ msgstr "کنتراست بالا"
msgid "Large Text"
msgstr "متن درشت"
#: ../js/ui/status/bluetooth.js:42 ../js/ui/status/bluetooth.js:237
#: ../js/ui/status/bluetooth.js:333 ../js/ui/status/bluetooth.js:367
#: ../js/ui/status/bluetooth.js:407 ../js/ui/status/bluetooth.js:440
#: ../js/ui/status/bluetooth.js:42
#: ../js/ui/status/bluetooth.js:237
#: ../js/ui/status/bluetooth.js:333
#: ../js/ui/status/bluetooth.js:367
#: ../js/ui/status/bluetooth.js:407
#: ../js/ui/status/bluetooth.js:440
msgid "Bluetooth"
msgstr "بلوتوث"
@ -758,7 +725,8 @@ msgstr "تنظیمات صفحه‌کلید"
msgid "Mouse Settings"
msgstr "تنظیمات موشی"
#: ../js/ui/status/bluetooth.js:259 ../js/ui/status/volume.js:66
#: ../js/ui/status/bluetooth.js:259
#: ../js/ui/status/volume.js:66
msgid "Sound Settings"
msgstr "تنظیمات صدا"
@ -789,7 +757,8 @@ msgstr "رد کردن"
msgid "Pairing confirmation for %s"
msgstr "تایید جهت جفت‌شدن با %s"
#: ../js/ui/status/bluetooth.js:414 ../js/ui/status/bluetooth.js:448
#: ../js/ui/status/bluetooth.js:414
#: ../js/ui/status/bluetooth.js:448
#, c-format
msgid "Device %s wants to pair with this computer"
msgstr "دستگاه %s می‌خواهد با این رایانه جفت شود"
@ -797,9 +766,7 @@ msgstr "دستگاه %s می‌خواهد با این رایانه جفت شود
#: ../js/ui/status/bluetooth.js:415
#, c-format
msgid "Please confirm whether the PIN '%s' matches the one on the device."
msgstr ""
"لطفا تایید کنید که آیا PIN مربوط به «%s» با همتای آن در دستگاه مطابقت دارد "
"یا خیر."
msgstr "لطفا تایید کنید که آیا PIN مربوط به «%s» با همتای آن در دستگاه مطابقت دارد یا خیر."
#: ../js/ui/status/bluetooth.js:417
msgid "Matches"
@ -830,7 +797,8 @@ msgstr "نمایش چیدمان صفحه‌کلید..."
msgid "Localization Settings"
msgstr "تنظیمات محلی‌سازی"
#: ../js/ui/status/network.js:109 ../js/ui/status/network.js:1498
#: ../js/ui/status/network.js:109
#: ../js/ui/status/network.js:1498
msgid "<unknown>"
msgstr "<ناشناخته>"
@ -852,7 +820,7 @@ msgstr "تصدیق هویت لازم است"
#. module, which is missing
#: ../js/ui/status/network.js:534
msgid "firmware missing"
msgstr ""
msgstr "میان‌افزار پیدا نشد"
#. Translators: this is for wired network devices that are physically disconnected
#: ../js/ui/status/network.js:541
@ -871,7 +839,8 @@ msgstr "اتصال شکست خورد"
#. TRANSLATORS: this is the indication that a connection for another logged in user is active,
#. and we cannot access its settings (including the name)
#: ../js/ui/status/network.js:628 ../js/ui/status/network.js:1446
#: ../js/ui/status/network.js:628
#: ../js/ui/status/network.js:1446
msgid "Connected (private)"
msgstr "متصل شد (خصوصی)"
@ -888,7 +857,8 @@ msgid "Auto dial-up"
msgstr "دایال‌آپ خودکار"
#. TRANSLATORS: this the automatic wireless connection name (including the network name)
#: ../js/ui/status/network.js:937 ../js/ui/status/network.js:1458
#: ../js/ui/status/network.js:937
#: ../js/ui/status/network.js:1458
#, c-format
msgid "Auto %s"
msgstr "اتصال بیسیم %s خودکار"
@ -1048,7 +1018,8 @@ msgstr "لوح‌رایانه"
msgid "Computer"
msgstr "رایانه"
#: ../js/ui/status/power.js:250 ../src/shell-app-system.c:1088
#: ../js/ui/status/power.js:250
#: ../src/shell-app-system.c:1088
msgid "Unknown"
msgstr "ناشناخته"
@ -1096,7 +1067,8 @@ msgstr "ارسال در %X بر روی %A"
msgid "Type to search..."
msgstr "برای جستجو تایپ کنید..."
#: ../js/ui/viewSelector.js:142 ../src/shell-util.c:250
#: ../js/ui/viewSelector.js:142
#: ../src/shell-util.c:250
msgid "Search"
msgstr "جستجو"

581
po/ga.po

File diff suppressed because it is too large Load Diff

551
po/gl.po

File diff suppressed because it is too large Load Diff

605
po/he.po

File diff suppressed because it is too large Load Diff

528
po/nb.po

File diff suppressed because it is too large Load Diff

598
po/ru.po

File diff suppressed because it is too large Load Diff

104
po/sk.po
View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: gnome-shell\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2011-04-26 12:47+0000\n"
"POT-Creation-Date: 2011-04-26 21:10+0000\n"
"PO-Revision-Date: 2011-04-27 08:53+0200\n"
"Last-Translator: Peter Mráz <etkinator@gmail.com>\n"
"Language-Team: Slovak <gnome-sk-list@gnome.org>\n"
@ -60,7 +60,7 @@ msgid "History for command (Alt-F2) dialog"
msgstr "História dialógového okna príkazov (Alt-F2)"
# neviem ako preložiť looking glass
#PŠ: tak si zisti, čo to znamená v prostredí gnome-shell
# PŠ: tak si zisti, čo to znamená v prostredí gnome-shell
#: ../data/org.gnome.shell.gschema.xml.in.h:7
#, fuzzy
msgid "History for the looking glass dialog"
@ -102,15 +102,15 @@ msgid ""
"at the optimal thread count on the system."
msgstr ""
"Nastavuje zreťazenie systému GStreamer určené pre kódované nahrávok. Používa "
"rovnakú syntax ako gst-launch. Zreťazenie by malo mať ďalej nepripojený cieľ, "
"v ktorom sa video nahráva. Obvykle má nepripojený zdroj; výstup z takého "
"zdroja sa bude zapisovať do výstupného súboru. Zreťazenie je ale schopné "
"zabezpečiť i vlastný výstup, čo sa dá využiť na odosielanie výstupu na "
"server icecast cez shout2send a pod. Ak toto nie je nastavené, alebo je to "
"nastavené na prázdnu hodnotu, použije sa predvolené zreťazenie. Teraz je to "
"„videorate ! vp8enc quality=10 speed=2 threads=%T ! queue ! webmmux“, čo "
"nahráva do WEBM použitím kodeku VP8. %T sa použije ako zástupný symbol odhadu "
"najvhodnejšieho počtu vlákien v systéme."
"rovnakú syntax ako gst-launch. Zreťazenie by malo mať ďalej nepripojený "
"cieľ, v ktorom sa video nahráva. Obvykle má nepripojený zdroj; výstup z "
"takého zdroja sa bude zapisovať do výstupného súboru. Zreťazenie je ale "
"schopné zabezpečiť i vlastný výstup, čo sa dá využiť na odosielanie výstupu "
"na server icecast cez shout2send a pod. Ak toto nie je nastavené, alebo je "
"to nastavené na prázdnu hodnotu, použije sa predvolené zreťazenie. Teraz je "
"to „videorate ! vp8enc quality=10 speed=2 threads=%T ! queue ! webmmux“, čo "
"nahráva do WEBM použitím kodeku VP8. %T sa použije ako zástupný symbol "
"odhadu najvhodnejšieho počtu vlákien v systéme."
#: ../data/org.gnome.shell.gschema.xml.in.h:14
msgid "Show date in clock"
@ -138,8 +138,8 @@ msgid ""
"current date, and use this extension. It should be changed when recording to "
"a different container format."
msgstr ""
"Súbor pre nahrané záznamy diania na obrazovke bude mať jedinečný názov "
"na základe aktuálneho dátumu a použije túto príponu. Pri nahrávaní do iného "
"Súbor pre nahrané záznamy diania na obrazovke bude mať jedinečný názov na "
"základe aktuálneho dátumu a použije túto príponu. Pri nahrávaní do iného "
"formátu kontajneru by mala byť zmenená."
#: ../data/org.gnome.shell.gschema.xml.in.h:19
@ -578,11 +578,11 @@ msgstr "Ukončiť %s"
#. Button on the left side of the panel.
#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
#: ../js/ui/panel.js:913
#: ../js/ui/panel.js:911
msgid "Activities"
msgstr "Aktivity"
#: ../js/ui/panel.js:1015
#: ../js/ui/panel.js:1012
msgid "Top Bar"
msgstr "Horná lišta"
@ -854,141 +854,141 @@ msgid "Localization Settings"
msgstr "Miestne nastavenia"
# zariadenie
#: ../js/ui/status/network.js:113
#: ../js/ui/status/network.js:109 ../js/ui/status/network.js:1501
msgid "<unknown>"
msgstr "<neznáme>"
#. Translators: this indicates that wireless or wwan is disabled by hardware killswitch
#: ../js/ui/status/network.js:330
#: ../js/ui/status/network.js:326
msgid "disabled"
msgstr "zakázané"
#: ../js/ui/status/network.js:528
#: ../js/ui/status/network.js:524
msgid "connecting..."
msgstr "pripája sa..."
#. Translators: this is for network connections that require some kind of key or password
#: ../js/ui/status/network.js:531
#: ../js/ui/status/network.js:527
msgid "authentication required"
msgstr "požaduje sa overenie totožnosti"
#. Translators: this is for devices that require some kind of firmware or kernel
#. module, which is missing
#: ../js/ui/status/network.js:541
#: ../js/ui/status/network.js:537
msgid "firmware missing"
msgstr "chýba firmvér"
#. Translators: this is for wired network devices that are physically disconnected
#: ../js/ui/status/network.js:548
#: ../js/ui/status/network.js:544
msgid "cable unplugged"
msgstr "kábel odpojený"
#. 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:553
#: ../js/ui/status/network.js:549
msgid "unavailable"
msgstr "nedostupné"
#: ../js/ui/status/network.js:555
#: ../js/ui/status/network.js:551
msgid "connection failed"
msgstr "pripojenie zlyhalo"
#. TRANSLATORS: this is the indication that a connection for another logged in user is active,
#. and we cannot access its settings (including the name)
#: ../js/ui/status/network.js:635 ../js/ui/status/network.js:1532
#: ../js/ui/status/network.js:631 ../js/ui/status/network.js:1449
msgid "Connected (private)"
msgstr "Pripojené (súkromne)"
#: ../js/ui/status/network.js:720
#: ../js/ui/status/network.js:716
msgid "Auto Ethernet"
msgstr ""
#: ../js/ui/status/network.js:795
#: ../js/ui/status/network.js:791
msgid "Auto broadband"
msgstr ""
#: ../js/ui/status/network.js:798
#: ../js/ui/status/network.js:794
msgid "Auto dial-up"
msgstr ""
#. TRANSLATORS: this the automatic wireless connection name (including the network name)
#: ../js/ui/status/network.js:944 ../js/ui/status/network.js:1544
#: ../js/ui/status/network.js:940 ../js/ui/status/network.js:1461
#, c-format
msgid "Auto %s"
msgstr ""
#: ../js/ui/status/network.js:946
#: ../js/ui/status/network.js:942
msgid "Auto bluetooth"
msgstr ""
#: ../js/ui/status/network.js:1546
#: ../js/ui/status/network.js:1463
msgid "Auto wireless"
msgstr ""
#: ../js/ui/status/network.js:1583
#: ../js/ui/status/network.js:1521
msgid "More..."
msgstr "Viac..."
#: ../js/ui/status/network.js:1625
#: ../js/ui/status/network.js:1544
msgid "Enable networking"
msgstr "Povoliť sieť"
#: ../js/ui/status/network.js:1637
#: ../js/ui/status/network.js:1556
msgid "Wired"
msgstr "Drôtové"
#: ../js/ui/status/network.js:1648
#: ../js/ui/status/network.js:1567
msgid "Wireless"
msgstr "Bezdrôtové"
# podľa prekladu v module NetworkManager
#: ../js/ui/status/network.js:1658
#: ../js/ui/status/network.js:1577
msgid "Mobile broadband"
msgstr "Mobilné"
#: ../js/ui/status/network.js:1668
#: ../js/ui/status/network.js:1587
msgid "VPN Connections"
msgstr "VPN pripojenie"
#: ../js/ui/status/network.js:1680
#: ../js/ui/status/network.js:1599
msgid "Network Settings"
msgstr "Nastavenia siete"
#: ../js/ui/status/network.js:1974
#: ../js/ui/status/network.js:1893
#, c-format
msgid "You're now connected to mobile broadband connection '%s'"
msgstr "Teraz ste pripojený k mobilnej sieti „%s“"
#: ../js/ui/status/network.js:1978
#: ../js/ui/status/network.js:1897
#, c-format
msgid "You're now connected to wireless network '%s'"
msgstr "Teraz ste pripojený k bezdrôtovej sieti „%s“"
#: ../js/ui/status/network.js:1982
#: ../js/ui/status/network.js:1901
#, c-format
msgid "You're now connected to wired network '%s'"
msgstr "Teraz ste pripojený k drôtovej sieti „%s“"
#: ../js/ui/status/network.js:1986
#: ../js/ui/status/network.js:1905
#, c-format
msgid "You're now connected to VPN network '%s'"
msgstr "Teraz ste pripojený k VPN sieti „%s“"
#: ../js/ui/status/network.js:1991
#: ../js/ui/status/network.js:1910
#, c-format
msgid "You're now connected to '%s'"
msgstr "Teraz ste pripojený k „%s“"
# PŠ: tu by sa asi zišlo connection preložiť ako spojenie - predsa len to je zaužívané slovné spojenie... alebo established preložiť inakšie
#: ../js/ui/status/network.js:1999
#: ../js/ui/status/network.js:1918
msgid "Connection established"
msgstr "Pripojenie nadviazané"
#: ../js/ui/status/network.js:2125
#: ../js/ui/status/network.js:2044
msgid "Networking is disabled"
msgstr "Sieť je zakázaná"
#: ../js/ui/status/network.js:2250
#: ../js/ui/status/network.js:2169
msgid "Network Manager"
msgstr "Správca siete"
@ -1123,13 +1123,6 @@ msgstr "%s je zaneprázdnený."
msgid "Sent at %X on %A"
msgstr "Čas odoslania: %A, %R"
#. Translators: this is the other person changing their old IM name to their new
#. IM name.
#: ../js/ui/telepathyClient.js:529
#, c-format
msgid "%s is now known as %s"
msgstr "%s odteraz vystupuje ako %s"
# nič lepšie ma nenapadlo
#. Translators: this is the text displayed
#. in the search entry when no search is
@ -1149,7 +1142,7 @@ msgid "%s has finished starting"
msgstr "Spúšťanie %s je dokočené"
# ide o zriadenie
#PŠ: a to máš odkiaľ? %s je totiž titulok okna!
# PŠ: a to máš odkiaľ? %s je totiž titulok okna!
#: ../js/ui/windowAttentionHandler.js:44
#, c-format
msgid "'%s' is ready"
@ -1229,7 +1222,7 @@ msgid "United Kingdom"
msgstr "Veľká Británia"
# nastavenia
#PŠ: zase nesprávne: ide o APN (Access Point Name, pri GPRS pripojení) - názov, takže mužský rod
# PŠ: zase nesprávne: ide o APN (Access Point Name, pri GPRS pripojení) - názov, takže mužský rod
#: ../src/shell-mobile-providers.c:526
msgid "Default"
msgstr "Predvolený"
@ -1259,6 +1252,9 @@ msgstr "Súborový systém"
msgid "%1$s: %2$s"
msgstr "%1$s: %2$s"
#~ msgid "%s is now known as %s"
#~ msgstr "%s odteraz vystupuje ako %s"
#~ msgid "No such application"
#~ msgstr "Aplikácia neexistuje"

689
po/sl.po

File diff suppressed because it is too large Load Diff

612
po/sv.po

File diff suppressed because it is too large Load Diff

1254
po/te.po

File diff suppressed because it is too large Load Diff

234
po/uk.po
View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-05-02 02:44+0300\n"
"PO-Revision-Date: 2011-05-02 02:46+0300\n"
"POT-Creation-Date: 2011-03-27 18:25+0300\n"
"PO-Revision-Date: 2011-03-27 18:27+0300\n"
"Last-Translator: Korostil Daniel <ted.korostiled@gmail.com>\n"
"Language-Team: translation@linux.org.ua\n"
"Language: uk\n"
@ -98,7 +98,7 @@ msgstr ""
"Вказує канал даних GStreamer для кодування запису. Звідси відповідний "
"синтаксис для gst-launch. Канал даних повинен мати нез'єднаний приймальний "
"буфер, де відео записано. Зазвичай воно має нез'єднане джерело буфера; вивід "
"з цього буфера буде записано в вихідний файл. Однак канал даних також "
"з цього буфера буде записано в вихідний файл. Однак канал даних також "
"відповідати за власний вивід — це може бути використано для відправлення "
"виводу до сервера через протокол shout2send чи будь-який інший. Коли не "
"вказано або вказано порожнє значення, буде використано типовий канал даних. "
@ -189,27 +189,27 @@ msgid "Execution of '%s' failed:"
msgstr "Не вдалось виконати «%s»:"
#. Translators: Filter to display all applications
#: ../js/ui/appDisplay.js:260
#: ../js/ui/appDisplay.js:230
msgid "All"
msgstr "Всі"
#: ../js/ui/appDisplay.js:359
#: ../js/ui/appDisplay.js:328
msgid "APPLICATIONS"
msgstr "ПРОГРАМИ"
#: ../js/ui/appDisplay.js:385
#: ../js/ui/appDisplay.js:354
msgid "SETTINGS"
msgstr "ПАРАМЕТРИ"
#: ../js/ui/appDisplay.js:658
#: ../js/ui/appDisplay.js:625
msgid "New Window"
msgstr "Нове вікно"
#: ../js/ui/appDisplay.js:661
#: ../js/ui/appDisplay.js:628
msgid "Remove from Favorites"
msgstr "Вилучити з улюбленого"
#: ../js/ui/appDisplay.js:662
#: ../js/ui/appDisplay.js:629
msgid "Add to Favorites"
msgstr "Додати до улюбленого"
@ -342,13 +342,13 @@ msgid "Nothing Scheduled"
msgstr "Нічого не заплановано"
#. Translators: Shown on calendar heading when selected day occurs on current year
#: ../js/ui/calendar.js:720 ../js/ui/telepathyClient.js:487
#: ../js/ui/calendar.js:720
msgctxt "calendar heading"
msgid "%A, %B %d"
msgstr "%A, %B %d"
#. Translators: Shown on calendar heading when selected day occurs on different year
#: ../js/ui/calendar.js:723 ../js/ui/telepathyClient.js:490
#: ../js/ui/calendar.js:723
msgctxt "calendar heading"
msgid "%A, %B %d, %Y"
msgstr "%A, %B %d, %Y"
@ -369,7 +369,7 @@ msgstr "Цей тиждень"
msgid "Next week"
msgstr "Наступний тиждень"
#: ../js/ui/dash.js:174 ../js/ui/messageTray.js:1037
#: ../js/ui/dash.js:174 ../js/ui/messageTray.js:1000
msgid "Remove"
msgstr "Вилучити"
@ -495,8 +495,8 @@ msgstr "Система автоматично перезапуститься ч
msgid "Restarting the system."
msgstr "Перезапуск системи."
#: ../js/ui/endSessionDialog.js:413 ../js/ui/polkitAuthenticationAgent.js:172
#: ../js/ui/status/bluetooth.js:491
#: ../js/ui/endSessionDialog.js:415 ../js/ui/polkitAuthenticationAgent.js:172
#: ../js/ui/status/bluetooth.js:466
msgid "Cancel"
msgstr "Скасувати"
@ -530,11 +530,11 @@ msgstr "Переглянути джерело"
msgid "Web Page"
msgstr "Веб-сторінка"
#: ../js/ui/messageTray.js:1030
#: ../js/ui/messageTray.js:993
msgid "Open"
msgstr "Відкрити"
#: ../js/ui/messageTray.js:2194
#: ../js/ui/messageTray.js:2151
msgid "System Information"
msgstr "Інформація про систему"
@ -557,18 +557,18 @@ msgid "Dash"
msgstr "Риска"
#. TODO - _quit() doesn't really work on apps in state STARTING yet
#: ../js/ui/panel.js:533
#: ../js/ui/panel.js:515
#, c-format
msgid "Quit %s"
msgstr "Вийти з %s"
#. Button on the left side of the panel.
#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
#: ../js/ui/panel.js:913
#: ../js/ui/panel.js:878
msgid "Activities"
msgstr "Діяльність"
#: ../js/ui/panel.js:1015
#: ../js/ui/panel.js:979
msgid "Top Bar"
msgstr "Верхня панель"
@ -626,11 +626,11 @@ msgstr "toggle-switch-intl"
msgid "Please enter a command:"
msgstr "Будь ласка, введіть команду:"
#: ../js/ui/searchDisplay.js:313
#: ../js/ui/searchDisplay.js:310
msgid "Searching..."
msgstr "Пошук…"
#: ../js/ui/searchDisplay.js:327
#: ../js/ui/searchDisplay.js:324
msgid "No matching results."
msgstr "Нема збігів."
@ -713,9 +713,9 @@ msgstr "Висока контрастність"
msgid "Large Text"
msgstr "Більший текст"
#: ../js/ui/status/bluetooth.js:42 ../js/ui/status/bluetooth.js:264
#: ../js/ui/status/bluetooth.js:358 ../js/ui/status/bluetooth.js:392
#: ../js/ui/status/bluetooth.js:432 ../js/ui/status/bluetooth.js:465
#: ../js/ui/status/bluetooth.js:42 ../js/ui/status/bluetooth.js:237
#: ../js/ui/status/bluetooth.js:333 ../js/ui/status/bluetooth.js:367
#: ../js/ui/status/bluetooth.js:407 ../js/ui/status/bluetooth.js:440
msgid "Bluetooth"
msgstr "Bluetooth"
@ -728,101 +728,101 @@ msgid "Send Files to Device..."
msgstr "Відправити файли до пристрою…"
#: ../js/ui/status/bluetooth.js:70
msgid "Set up a New Device..."
msgid "Setup a New Device..."
msgstr "Встановити новий пристрій…"
#: ../js/ui/status/bluetooth.js:95
msgid "Bluetooth Settings"
msgstr "Параметри Bluetooth"
#: ../js/ui/status/bluetooth.js:215
#: ../js/ui/status/bluetooth.js:188
msgid "Connection"
msgstr "З'єднання"
#: ../js/ui/status/bluetooth.js:251
#: ../js/ui/status/bluetooth.js:224
msgid "Send Files..."
msgstr "Відправити файли…"
#: ../js/ui/status/bluetooth.js:256
#: ../js/ui/status/bluetooth.js:229
msgid "Browse Files..."
msgstr "Огляд файлів…"
#: ../js/ui/status/bluetooth.js:265
#: ../js/ui/status/bluetooth.js:238
msgid "Error browsing device"
msgstr "Помилка перегляду пристрою…"
#: ../js/ui/status/bluetooth.js:266
#: ../js/ui/status/bluetooth.js:239
#, c-format
msgid "The requested device cannot be browsed, error is '%s'"
msgstr "Потрібний пристрій неможливо переглянути, помилка — «%s»"
#: ../js/ui/status/bluetooth.js:274
#: ../js/ui/status/bluetooth.js:247
msgid "Keyboard Settings"
msgstr "Параметри клавіатури"
#: ../js/ui/status/bluetooth.js:279
#: ../js/ui/status/bluetooth.js:252
msgid "Mouse Settings"
msgstr "Параметри миші"
#: ../js/ui/status/bluetooth.js:286 ../js/ui/status/volume.js:66
#: ../js/ui/status/bluetooth.js:259 ../js/ui/status/volume.js:66
msgid "Sound Settings"
msgstr "Параметри звуку"
#: ../js/ui/status/bluetooth.js:393
#: ../js/ui/status/bluetooth.js:368
#, c-format
msgid "Authorization request from %s"
msgstr "Запит про авторизацію від %s"
#: ../js/ui/status/bluetooth.js:399
#: ../js/ui/status/bluetooth.js:374
#, c-format
msgid "Device %s wants access to the service '%s'"
msgstr "Пристрій %s потребує доступ до служби «%s»"
#: ../js/ui/status/bluetooth.js:401
#: ../js/ui/status/bluetooth.js:376
msgid "Always grant access"
msgstr "Завжди надавати доступ"
#: ../js/ui/status/bluetooth.js:402
#: ../js/ui/status/bluetooth.js:377
msgid "Grant this time only"
msgstr "Надати лише цього разу"
#: ../js/ui/status/bluetooth.js:403
#: ../js/ui/status/bluetooth.js:378
msgid "Reject"
msgstr "Відмовити"
#: ../js/ui/status/bluetooth.js:433
#: ../js/ui/status/bluetooth.js:408
#, c-format
msgid "Pairing confirmation for %s"
msgstr "Сполучення підтвердження для %s"
#: ../js/ui/status/bluetooth.js:439 ../js/ui/status/bluetooth.js:473
#: ../js/ui/status/bluetooth.js:414 ../js/ui/status/bluetooth.js:448
#, c-format
msgid "Device %s wants to pair with this computer"
msgstr "Пристрій %s потребує прив'язання до цього комп'ютера"
#: ../js/ui/status/bluetooth.js:440
#: ../js/ui/status/bluetooth.js:415
#, c-format
msgid "Please confirm whether the PIN '%s' matches the one on the device."
msgstr "Будь ласка, підвердьте, чи «%s» збігається з PIN на пристрої."
#: ../js/ui/status/bluetooth.js:442
#: ../js/ui/status/bluetooth.js:417
msgid "Matches"
msgstr "Збігається"
#: ../js/ui/status/bluetooth.js:443
#: ../js/ui/status/bluetooth.js:418
msgid "Does not match"
msgstr "Не збігається"
#: ../js/ui/status/bluetooth.js:466
#: ../js/ui/status/bluetooth.js:441
#, c-format
msgid "Pairing request for %s"
msgstr "Запит на сполучення для %s"
#: ../js/ui/status/bluetooth.js:474
#: ../js/ui/status/bluetooth.js:449
msgid "Please enter the PIN mentioned on the device."
msgstr "Будь ласка, введіть PIN, згаданий на пристрої."
#: ../js/ui/status/bluetooth.js:490
#: ../js/ui/status/bluetooth.js:465
msgid "OK"
msgstr "Гаразд"
@ -834,139 +834,139 @@ msgstr "Показувати розкладку клавіатури…"
msgid "Localization Settings"
msgstr "Параметри локалізації"
#: ../js/ui/status/network.js:113
#: ../js/ui/status/network.js:104 ../js/ui/status/network.js:1454
msgid "<unknown>"
msgstr "<невідомо>"
#. Translators: this indicates that wireless or wwan is disabled by hardware killswitch
#: ../js/ui/status/network.js:330
#: ../js/ui/status/network.js:311
msgid "disabled"
msgstr "вимкнено"
#: ../js/ui/status/network.js:528
#: ../js/ui/status/network.js:494
msgid "connecting..."
msgstr "з'єднання…"
#. Translators: this is for network connections that require some kind of key or password
#: ../js/ui/status/network.js:531
#: ../js/ui/status/network.js:497
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:541
#: ../js/ui/status/network.js:507
msgid "firmware missing"
msgstr "Бракує мікропрограми"
#. Translators: this is for wired network devices that are physically disconnected
#: ../js/ui/status/network.js:548
#: ../js/ui/status/network.js:514
msgid "cable unplugged"
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:553
#: ../js/ui/status/network.js:519
msgid "unavailable"
msgstr "недоступний"
#: ../js/ui/status/network.js:555
#: ../js/ui/status/network.js:521
msgid "connection failed"
msgstr "не вдалось з'єднатись"
#. TRANSLATORS: this is the indication that a connection for another logged in user is active,
#. and we cannot access its settings (including the name)
#: ../js/ui/status/network.js:635 ../js/ui/status/network.js:1532
#: ../js/ui/status/network.js:602 ../js/ui/status/network.js:1402
msgid "Connected (private)"
msgstr "З'єднано (приватно)"
#: ../js/ui/status/network.js:720
#: ../js/ui/status/network.js:683
msgid "Auto Ethernet"
msgstr "Автоматично Ethernet"
#: ../js/ui/status/network.js:795
#: ../js/ui/status/network.js:758
msgid "Auto broadband"
msgstr "Автоматично радіомережа"
#: ../js/ui/status/network.js:798
#: ../js/ui/status/network.js:761
msgid "Auto dial-up"
msgstr "Автоматично додзвін"
#. TRANSLATORS: this the automatic wireless connection name (including the network name)
#: ../js/ui/status/network.js:944 ../js/ui/status/network.js:1544
#: ../js/ui/status/network.js:904 ../js/ui/status/network.js:1414
#, c-format
msgid "Auto %s"
msgstr "Автоматично %s"
#: ../js/ui/status/network.js:946
#: ../js/ui/status/network.js:906
msgid "Auto bluetooth"
msgstr "Автоматично Bluetooth"
#: ../js/ui/status/network.js:1546
#: ../js/ui/status/network.js:1416
msgid "Auto wireless"
msgstr "Автоматично бездротова мережа"
#: ../js/ui/status/network.js:1583
#: ../js/ui/status/network.js:1474
msgid "More..."
msgstr "Більше…"
#: ../js/ui/status/network.js:1625
#: ../js/ui/status/network.js:1497
msgid "Enable networking"
msgstr "Увімкнути мережу"
#: ../js/ui/status/network.js:1637
#: ../js/ui/status/network.js:1509
msgid "Wired"
msgstr "Дротова"
#: ../js/ui/status/network.js:1648
#: ../js/ui/status/network.js:1520
msgid "Wireless"
msgstr "Бездротова"
#: ../js/ui/status/network.js:1658
#: ../js/ui/status/network.js:1530
msgid "Mobile broadband"
msgstr "Мобільна радіомережа"
#: ../js/ui/status/network.js:1668
#: ../js/ui/status/network.js:1540
msgid "VPN Connections"
msgstr "З'єднання VPN"
#: ../js/ui/status/network.js:1680
#: ../js/ui/status/network.js:1549
msgid "Network Settings"
msgstr "Налаштування мережі"
#: ../js/ui/status/network.js:1974
#: ../js/ui/status/network.js:1844
#, c-format
msgid "You're now connected to mobile broadband connection '%s'"
msgstr "Зараз ви з'єднані через мобільну радіомережу «%s»"
#: ../js/ui/status/network.js:1978
#: ../js/ui/status/network.js:1848
#, c-format
msgid "You're now connected to wireless network '%s'"
msgstr "Зараз ви з'єднані через бездротову мережу «%s»"
#: ../js/ui/status/network.js:1982
#: ../js/ui/status/network.js:1852
#, c-format
msgid "You're now connected to wired network '%s'"
msgstr "Зараз ви з'єднані через дротову мережу «%s»"
#: ../js/ui/status/network.js:1986
#: ../js/ui/status/network.js:1856
#, c-format
msgid "You're now connected to VPN network '%s'"
msgstr "Зараз ви з'єднані через мережу VPN «%s»"
#: ../js/ui/status/network.js:1991
#: ../js/ui/status/network.js:1861
#, c-format
msgid "You're now connected to '%s'"
msgstr "Зараз ви з'єднані через «%s»"
#: ../js/ui/status/network.js:1999
#: ../js/ui/status/network.js:1869
msgid "Connection established"
msgstr "З'єднання встановлено"
#: ../js/ui/status/network.js:2125
#: ../js/ui/status/network.js:1991
msgid "Networking is disabled"
msgstr "Мережу вимкнено"
#: ../js/ui/status/network.js:2250
#: ../js/ui/status/network.js:2116
msgid "Network Manager"
msgstr "Керування мережею"
@ -1072,22 +1072,22 @@ msgstr "Гучність"
msgid "Microphone"
msgstr "Мікрофон"
#: ../js/ui/telepathyClient.js:330
#: ../js/ui/telepathyClient.js:331
#, c-format
msgid "%s is online."
msgstr "%s в мережі."
#: ../js/ui/telepathyClient.js:335
#: ../js/ui/telepathyClient.js:336
#, c-format
msgid "%s is offline."
msgstr "%s поза мережею."
#: ../js/ui/telepathyClient.js:338
#: ../js/ui/telepathyClient.js:339
#, c-format
msgid "%s is away."
msgstr "%s відійшов."
#: ../js/ui/telepathyClient.js:341
#: ../js/ui/telepathyClient.js:342
#, c-format
msgid "%s is busy."
msgstr "%s зайнятий."
@ -1095,18 +1095,11 @@ msgstr "%s зайнятий."
#. Translators: this is a time format string followed by a date.
#. If applicable, replace %X with a strftime format valid for your
#. locale, without seconds.
#: ../js/ui/telepathyClient.js:479
#: ../js/ui/telepathyClient.js:473
#, no-c-format
msgid "Sent at %X on %A"
msgstr "Відправити на %X в %A"
#. Translators: this is the other person changing their old IM name to their new
#. IM name.
#: ../js/ui/telepathyClient.js:524
#, c-format
msgid "%s is now known as %s"
msgstr "%s тепер відомий як %s"
#. Translators: this is the text displayed
#. in the search entry when no search is
#. active; it should not exceed ~30
@ -1153,7 +1146,7 @@ msgstr[2] "%u входів"
msgid "System Sounds"
msgstr "Системні звуки"
#: ../src/main.c:445
#: ../src/main.c:446
msgid "Print version"
msgstr "Показати версію"
@ -1162,6 +1155,42 @@ msgstr "Показати версію"
msgid "Failed to launch '%s'"
msgstr "Не вдалось запустити «%s»"
#: ../src/shell-global.c:1395
msgid "Less than a minute ago"
msgstr "Менше хвилини тому"
#: ../src/shell-global.c:1399
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%d хвилина тому"
msgstr[1] "%d хвилини тому"
msgstr[2] "%d хвилин тому"
#: ../src/shell-global.c:1404
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "%d година тому"
msgstr[1] "%d години тому"
msgstr[2] "%d годин тому"
#: ../src/shell-global.c:1409
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
msgstr[0] "%d день тому"
msgstr[1] "%d дні тому"
msgstr[2] "%d днів тому"
#: ../src/shell-global.c:1414
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
msgstr[0] "%d тиждень тому"
msgstr[1] "%d тижні тому"
msgstr[2] "%d тижнів тому"
#: ../src/shell-mobile-providers.c:80
msgid "United Kingdom"
msgstr "Великобританія"
@ -1194,33 +1223,6 @@ msgstr "Файлова система"
msgid "%1$s: %2$s"
msgstr "%1$s: %2$s"
#~ msgid "Less than a minute ago"
#~ msgstr "Менше хвилини тому"
#~ msgid "%d minute ago"
#~ msgid_plural "%d minutes ago"
#~ msgstr[0] "%d хвилина тому"
#~ msgstr[1] "%d хвилини тому"
#~ msgstr[2] "%d хвилин тому"
#~ msgid "%d hour ago"
#~ msgid_plural "%d hours ago"
#~ msgstr[0] "%d година тому"
#~ msgstr[1] "%d години тому"
#~ msgstr[2] "%d годин тому"
#~ msgid "%d day ago"
#~ msgid_plural "%d days ago"
#~ msgstr[0] "%d день тому"
#~ msgstr[1] "%d дні тому"
#~ msgstr[2] "%d днів тому"
#~ msgid "%d week ago"
#~ msgid_plural "%d weeks ago"
#~ msgstr[0] "%d тиждень тому"
#~ msgstr[1] "%d тижні тому"
#~ msgstr[2] "%d тижнів тому"
#~ msgid "Shut Down"
#~ msgstr "Вимкнути"

File diff suppressed because it is too large Load Diff

View File

@ -47,20 +47,20 @@ st-marshal.c: Makefile st/st-marshal.list
st-enum-types.h: stamp-st-enum-types.h Makefile
@true
stamp-st-enum-types.h: $(source_h) $(srcdir)/st/st-enum-types.h.in $(st_source_h)
$(AM_V_GEN) ( \
stamp-st-enum-types.h: $(source_h) st/st-enum-types.h.in $(st_source_h)
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template $(srcdir)/st/st-enum-types.h.in \
$(addprefix $(srcdir)/, $(st_source_h)) ) >> $@.tmp && \
--template st/st-enum-types.h.in \
$(st_source_h) ) >> $@.tmp && \
(cmp -s $@.tmp st-enum-types.h || cp $@.tmp st-enum-types.h) && \
rm -f $@.tmp && \
echo timestamp > $(@F)
st-enum-types.c: stamp-st-enum-types.h $(srcdir)/st/st-enum-types.c.in
$(AM_V_GEN) ( \
st-enum-types.c: stamp-st-enum-types.h st/st-enum-types.c.in
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template $(srcdir)/st/st-enum-types.c.in \
$(addprefix $(srcdir)/,$(st_source_h)) ) >> $@.tmp && \
--template st/st-enum-types.c.in \
$(st_source_h) ) >> $@.tmp && \
cp $@.tmp $@ && \
rm -f $@.tmp

View File

@ -100,7 +100,6 @@ shell_public_headers_h = \
shell-perf-log.h \
shell-slicer.h \
shell-stack.h \
shell-tp-client.h \
shell-tray-icon.h \
shell-tray-manager.h \
shell-util.h \
@ -135,7 +134,6 @@ libgnome_shell_la_SOURCES = \
shell-polkit-authentication-agent.c \
shell-slicer.c \
shell-stack.c \
shell-tp-client.c \
shell-tray-icon.c \
shell-tray-manager.c \
shell-util.c \
@ -186,10 +184,27 @@ gnome_shell_perf_helper_LDADD = $(SHELL_PERF_HELPER_LIBS)
########################################
# In order to run the interactive tests for GUI components, we need to have
# an executable that exports the St components. Libtool doesn't have a way
# to include all the symbols from a convenience library into a executable
# so what we do is build a small uninstalled library that pulls in the
# St convenience library and link the test running program to that.
noinst_LTLIBRARIES += libjs-test.la
libjs_test_la_LDFLAGS = -rpath $(libdir)
libjs_test_la_CPPFLAGS = $(JS_TEST_CFLAGS)
libjs_test_la_LIBADD = $(JS_TEST_LIBS) libst-1.0.la
# The tests use or reference a couple of Shell classes
libjs_test_la_SOURCES = \
shell-generic-container.c \
shell-perf-log.c
noinst_PROGRAMS += run-js-test
run_js_test_CPPFLAGS = $(gnome_shell_cflags)
run_js_test_LDADD = libgnome-shell.la $(libgnome_shell_la_LIBADD)
run_js_test_CPPFLAGS = $(JS_TEST_CFLAGS)
run_js_test_LDADD = $(JS_TEST_LIBS) libjs-test.la
run_js_test_LDFLAGS = -export-dynamic
run_js_test_SOURCES = \
@ -222,21 +237,21 @@ shell-marshal.c: Makefile shell-marshal.list
shell-enum-types.h: stamp-shell-enum-types.h Makefile
@true
stamp-shell-enum-types.h: $(srcdir)/shell-enum-types.h.in $(shell_public_headers_h)
$(AM_V_GEN) ( \
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template $< \
$(addprefix $(srcdir)/,$(shell_public_headers_h)) ) > $(@F).tmp && \
$(shell_public_headers_h) ) > $(@F).tmp && \
(cmp -s $(@F).tmp shell-enum-types.h || mv $(@F).tmp shell-enum-types.h) && \
rm -f $(@F).tmp && \
echo timestamp > $(@F)
EXTRA_DIST += shell-enum-types.h.in
CLEANFILES += stamp-shell-enum-types.h
shell-enum-types.c: $(srcdir)/shell-enum-types.c.in stamp-shell-enum-types.h
$(AM_V_GEN) ( \
shell-enum-types.c: shell-enum-types.c.in stamp-shell-enum-types.h
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template $< \
$(addprefix $(srcdir)/,$(shell_public_headers_h)) ) > $(@F).tmp && \
$(shell_public_headers_h) ) > $(@F).tmp && \
mv $(@F).tmp $(@F) && \
rm -f $(@F).tmp
EXTRA_DIST += shell-enum-types.c.in
@ -258,7 +273,7 @@ Shell-0.1.gir: libgnome-shell.la St-1.0.gir
Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2
Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
Shell_0_1_gir_LIBS = libgnome-shell.la
Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources)
Shell_0_1_gir_FILES = $(addprefix $(srcdir)/,$(libgnome_shell_la_gir_sources))
Shell_0_1_gir_SCANNERFLAGS = --include-uninstalled=$(builddir)/St-1.0.gir \
--add-include-path=$(MUTTER_GIR_DIR)
INTROSPECTION_GIRS += Shell-0.1.gir

View File

@ -777,10 +777,7 @@ remove_user (GdmUserManager *manager,
if (gdm_user_get_object_path (user) != NULL) {
g_hash_table_remove (manager->priv->users_by_object_path, gdm_user_get_object_path (user));
}
if (gdm_user_get_user_name (user) != NULL) {
g_hash_table_remove (manager->priv->users_by_name, gdm_user_get_user_name (user));
}
g_hash_table_remove (manager->priv->users_by_name, gdm_user_get_user_name (user));
if (manager->priv->is_loaded) {
g_signal_emit (manager, signals[USER_REMOVED], 0, user);
@ -887,13 +884,6 @@ on_user_removed_in_accounts_service (DBusGProxy *proxy,
user = g_hash_table_lookup (manager->priv->users_by_object_path, object_path);
if (user == NULL) {
g_debug ("GdmUserManager: ignoring untracked user %s", object_path);
return;
} else {
g_debug ("GdmUserManager: tracked user %s removed from accounts service", object_path);
}
manager->priv->new_users = g_slist_remove (manager->priv->new_users, user);
remove_user (manager, user);

View File

@ -178,8 +178,7 @@ gnome_shell_plugin_start (MetaPlugin *plugin)
gjs_context = _shell_global_get_gjs_context (shell_plugin->global);
if (!gjs_context_eval (gjs_context,
"imports.ui.environment.init();"
"imports.ui.main.start();",
"const Main = imports.ui.main; Main.start();",
-1,
"<main>",
&status,

View File

@ -453,13 +453,11 @@ main (int argc, char **argv)
{
GOptionContext *ctx;
GError *error = NULL;
int ecode;
g_type_init ();
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
ctx = meta_get_option_context ();
g_option_context_add_main_entries (ctx, gnome_shell_options, GETTEXT_PACKAGE);
@ -508,13 +506,5 @@ main (int argc, char **argv)
/* Initialize the global object */
shell_global_get ();
ecode = meta_run ();
if (g_getenv ("GNOME_SHELL_ENABLE_CLEANUP"))
{
g_printerr ("Doing final cleanup...\n");
g_object_unref (shell_global_get ());
}
return ecode;
return meta_run ();
}

View File

@ -24,19 +24,15 @@
* IN THE SOFTWARE.
*/
#include "config.h"
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <clutter/x11/clutter-x11.h>
#include <gdk/gdkx.h>
#include <gjs/gjs.h>
#include <config.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <clutter/x11/clutter-x11.h>
#include <string.h>
#include <stdlib.h>
#include <locale.h>
#include "shell-global.h"
#include "shell-global-private.h"
#include <gjs/gjs.h>
static char **include_path = NULL;
static char *command = NULL;
@ -63,10 +59,10 @@ event_filter (GdkXEvent *xevent,
int
main(int argc, char **argv)
{
char *command_line;
GOptionContext *context;
ClutterActor *stage;
GError *error = NULL;
ShellGlobal *global;
GjsContext *js_context;
char *script;
const char *filename;
@ -98,8 +94,12 @@ main(int argc, char **argv)
setlocale (LC_ALL, "");
g_type_init ();
global = shell_global_get ();
js_context = _shell_global_get_gjs_context (global);
command_line = g_strjoinv (" ", argv);
g_debug ("Command line: %s", command_line);
g_free (command_line);
g_debug ("Creating new context to eval console script");
js_context = gjs_context_new_with_search_path (include_path);
/* prepare command line arguments */
if (!gjs_context_define_string_array (js_context, "ARGV",

View File

@ -22,14 +22,12 @@
#include <gio/gio.h>
#include <gjs/gjs-module.h>
#include <girepository.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
#include <meta/display.h>
#include <meta/util.h>
/* Memory report bits */
#ifdef HAVE_MALLINFO
#include <malloc.h>
#endif
#include "shell-enum-types.h"
#include "shell-global-private.h"
#include "shell-jsapi-compat-private.h"
@ -39,8 +37,6 @@
#include "shell-wm.h"
#include "st.h"
static ShellGlobal *the_object = NULL;
static void grab_notify (GtkWidget *widget, gboolean is_grab, gpointer user_data);
struct _ShellGlobal {
@ -69,6 +65,8 @@ struct _ShellGlobal {
GdkWindow *stage_window;
gint last_change_screen_width, last_change_screen_height;
guint work_count;
GSList *leisure_closures;
guint leisure_function_id;
@ -242,6 +240,9 @@ shell_global_init (ShellGlobal *global)
global->input_mode = SHELL_STAGE_INPUT_MODE_NORMAL;
global->last_change_screen_width = 0;
global->last_change_screen_height = 0;
ca_context_create (&global->sound_context);
ca_context_change_props (global->sound_context, CA_PROP_APPLICATION_NAME, PACKAGE_NAME, CA_PROP_APPLICATION_ID, "org.gnome.Shell", NULL);
ca_context_open (global->sound_context);
@ -256,20 +257,6 @@ shell_global_init (ShellGlobal *global)
g_strfreev (search_path);
}
static void
shell_global_finalize (GObject *object)
{
ShellGlobal *global = SHELL_GLOBAL (object);
g_object_unref (global->js_context);
gtk_widget_destroy (GTK_WIDGET (global->grab_notifier));
g_object_unref (global->settings);
the_object = NULL;
G_OBJECT_CLASS(shell_global_parent_class)->finalize (object);
}
static void
shell_global_class_init (ShellGlobalClass *klass)
{
@ -277,7 +264,6 @@ shell_global_class_init (ShellGlobalClass *klass)
gobject_class->get_property = shell_global_get_property;
gobject_class->set_property = shell_global_set_property;
gobject_class->finalize = shell_global_finalize;
/* Emitted from gnome-shell-plugin.c during event handling */
shell_global_signals[XDND_POSITION_CHANGED] =
@ -431,6 +417,31 @@ shell_global_class_init (ShellGlobalClass *klass)
G_PARAM_READABLE));
}
/**
* shell_clutter_texture_set_from_pixbuf:
* texture: #ClutterTexture to be modified
* pixbuf: #GdkPixbuf to set as an image for #ClutterTexture
*
* Convenience function for setting an image for #ClutterTexture based on #GdkPixbuf.
* Copied from an example posted by hp in this thread http://mail.gnome.org/archives/gtk-devel-list/2008-September/msg00218.html
*
* Return value: %TRUE on success, %FALSE on failure
*/
gboolean
shell_clutter_texture_set_from_pixbuf (ClutterTexture *texture,
GdkPixbuf *pixbuf)
{
return clutter_texture_set_from_rgb_data (texture,
gdk_pixbuf_get_pixels (pixbuf),
gdk_pixbuf_get_has_alpha (pixbuf),
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
gdk_pixbuf_get_rowstride (pixbuf),
gdk_pixbuf_get_has_alpha (pixbuf)
? 4 : 3,
0, NULL);
}
/**
* shell_global_get:
*
@ -441,6 +452,8 @@ shell_global_class_init (ShellGlobalClass *klass)
ShellGlobal *
shell_global_get (void)
{
static ShellGlobal *the_object = NULL;
if (!the_object)
the_object = g_object_new (SHELL_TYPE_GLOBAL, 0);
@ -695,6 +708,23 @@ shell_global_get_window_actors (ShellGlobal *global)
return meta_plugin_get_window_actors (global->plugin);
}
static gboolean
update_screen_size (gpointer data)
{
int width, height;
ShellGlobal *global = SHELL_GLOBAL (data);
meta_plugin_query_screen_size (global->plugin, &width, &height);
if (global->last_change_screen_width == width && global->last_change_screen_height == height)
return FALSE;
global->last_change_screen_width = width;
global->last_change_screen_height = height;
return FALSE;
}
static void
global_stage_notify_width (GObject *gobject,
GParamSpec *pspec,
@ -703,6 +733,11 @@ global_stage_notify_width (GObject *gobject,
ShellGlobal *global = SHELL_GLOBAL (data);
g_object_notify (G_OBJECT (global), "screen-width");
meta_later_add (META_LATER_BEFORE_REDRAW,
update_screen_size,
global,
NULL);
}
static void
@ -713,6 +748,11 @@ global_stage_notify_height (GObject *gobject,
ShellGlobal *global = SHELL_GLOBAL (data);
g_object_notify (G_OBJECT (global), "screen-height");
meta_later_add (META_LATER_BEFORE_REDRAW,
update_screen_size,
global,
NULL);
}
static void
@ -751,6 +791,7 @@ _shell_global_set_plugin (ShellGlobal *global,
G_CALLBACK (global_stage_notify_width), global);
g_signal_connect (stage, "notify::height",
G_CALLBACK (global_stage_notify_height), global);
update_screen_size (global);
g_signal_connect (stage, "paint",
G_CALLBACK (global_stage_before_paint), global);
@ -819,6 +860,30 @@ shell_global_end_modal (ShellGlobal *global,
meta_plugin_end_modal (global->plugin, timestamp);
}
/**
* shell_global_display_is_grabbed
* @global: a #ShellGlobal
*
* Determines whether Mutter currently has a grab (keyboard or mouse or
* both) on the display. This could be the result of a current window
* management operation like a window move, or could be from
* shell_global_begin_modal().
*
* This function is useful to for ad-hoc checks to avoid over-grabbing
* the Mutter grab a grab from GTK+. Longer-term we might instead want a
* mechanism to make Mutter use GDK grabs instead of raw XGrabPointer().
*
* Return value: %TRUE if Mutter has a grab on the display
*/
gboolean
shell_global_display_is_grabbed (ShellGlobal *global)
{
MetaScreen *screen = meta_plugin_get_screen (global->plugin);
MetaDisplay *display = meta_screen_get_display (screen);
return meta_display_get_grab_op (display) != META_GRAB_OP_NONE;
}
/**
* shell_global_create_pointer_barrier
* @global: a #ShellGlobal
@ -1069,6 +1134,149 @@ shell_global_reexec_self (ShellGlobal *global)
g_ptr_array_free (arr, TRUE);
}
/**
* shell_global_breakpoint:
* @global: A #ShellGlobal
*
* Using G_BREAKPOINT(), interrupt the current process. This is useful
* in conjunction with a debugger such as gdb.
*/
void
shell_global_breakpoint (ShellGlobal *global)
{
G_BREAKPOINT ();
}
/**
* shell_global_parse_search_provider:
* @global: A #ShellGlobal
* @data: description of provider
* @name: (out): location to store a display name
* @url: (out): location to store template of url
* @langs: (out) (transfer full) (element-type utf8): list of supported languages
* @icon_data_uri: (out): location to store uri
* @error: location to store GError
*
* Returns: %TRUE on success
*/
gboolean
shell_global_parse_search_provider (ShellGlobal *global,
const char *data,
char **name,
char **url,
GList **langs,
char **icon_data_uri,
GError **error)
{
xmlDocPtr doc = xmlParseMemory (data, strlen(data));
xmlNode *root;
*name = NULL;
*url = NULL;
*icon_data_uri = NULL;
*langs = NULL;
if (!doc)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Malformed xml");
return FALSE;
}
root = xmlDocGetRootElement (doc);
if (root && root->name && xmlStrcmp (root->name, (const xmlChar *)"OpenSearchDescription") == 0)
{
xmlNode *child;
for (child = root->children; child; child = child->next)
{
if (!child->name)
continue;
if (xmlStrcmp (child->name, (const xmlChar *)"Language") == 0)
{
xmlChar *val = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
if (!val)
continue;
*langs = g_list_append (*langs, g_strdup ((char *)val));
xmlFree (val);
}
if (!*name && xmlStrcmp (child->name, (const xmlChar *)"ShortName") == 0)
{
xmlChar *val = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
*name = g_strdup ((char *)val);
xmlFree (val);
}
if (!*icon_data_uri && xmlStrcmp (child->name, (const xmlChar *)"Image") == 0)
{
xmlChar *val = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
if (val)
*icon_data_uri = g_strdup ((char *)val);
xmlFree (val);
}
if (!*url && xmlStrcmp (child->name, (const xmlChar *)"Url") == 0)
{
xmlChar *template;
xmlChar *type;
type = xmlGetProp(child, (const xmlChar *)"type");
if (!type)
continue;
if (xmlStrcmp (type, (const xmlChar *)"text/html") != 0)
{
xmlFree (type);
continue;
}
xmlFree (type);
template = xmlGetProp(child, (const xmlChar *)"template");
if (!template)
continue;
*url = g_strdup ((char *)template);
xmlFree (template);
}
}
}
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Invalid OpenSearch document");
xmlFreeDoc (doc);
return FALSE;
}
xmlFreeDoc (doc);
if (*icon_data_uri && *name && *url)
return TRUE;
if (*icon_data_uri)
g_free (*icon_data_uri);
else
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"search provider doesn't have icon");
if (*name)
g_free (*name);
else if (error && !*error)
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"search provider doesn't have ShortName");
if (*url)
g_free (*url);
else if (error && !*error)
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"search provider doesn't have template for url");
if (*langs)
{
g_list_foreach (*langs, (GFunc)g_free, NULL);
g_list_free (*langs);
}
*url = NULL;
*name = NULL;
*icon_data_uri = NULL;
*langs = NULL;
return FALSE;
}
/**
* shell_global_gc:
* @global: A #ShellGlobal
@ -1098,38 +1306,6 @@ shell_global_maybe_gc (ShellGlobal *global)
gjs_context_maybe_gc (global->js_context);
}
/**
* shell_global_get_memory_info:
* @global:
* @meminfo: (out caller-allocates): Output location for memory information
*
* Load process-global data about memory usage.
*/
void
shell_global_get_memory_info (ShellGlobal *global,
ShellMemoryInfo *meminfo)
{
JSContext *context;
memset (meminfo, 0, sizeof (meminfo));
#ifdef HAVE_MALLINFO
{
struct mallinfo info = mallinfo ();
meminfo->glibc_uordblks = info.uordblks;
}
#endif
context = gjs_context_get_native_context (global->js_context);
meminfo->js_bytes = JS_GetGCParameter (JS_GetRuntime (context), JSGC_BYTES);
meminfo->gjs_boxed = (unsigned int) gjs_counter_boxed.value;
meminfo->gjs_gobject = (unsigned int) gjs_counter_object.value;
meminfo->gjs_function = (unsigned int) gjs_counter_function.value;
meminfo->gjs_closure = (unsigned int) gjs_counter_closure.value;
}
/**
* shell_global_notify_error:
* @global: a #ShellGlobal
@ -1193,6 +1369,54 @@ void shell_global_init_xdnd (ShellGlobal *global)
32, PropModeReplace, (const unsigned char *)&stage_win, 1);
}
/**
* shell_global_format_time_relative_pretty:
* @global:
* @delta: Time in seconds since the current time
* @text: (out): Relative human-consumption-only time string
* @next_update: (out): Time in seconds until we should redisplay the time
*
* Format a time value for human consumption only. The passed time
* value is a delta in terms of seconds from the current time.
* This function needs to be in C because of its use of ngettext() which
* is not accessible from JavaScript.
*/
void
shell_global_format_time_relative_pretty (ShellGlobal *global,
guint delta,
char **text,
guint *next_update)
{
#define MINUTE (60)
#define HOUR (MINUTE*60)
#define DAY (HOUR*24)
#define WEEK (DAY*7)
if (delta < MINUTE) {
*text = g_strdup (_("Less than a minute ago"));
*next_update = MINUTE - delta;
} else if (delta < HOUR) {
*text = g_strdup_printf (dngettext (GETTEXT_PACKAGE,
"%d minute ago", "%d minutes ago",
delta / MINUTE), delta / MINUTE);
*next_update = MINUTE - (delta % MINUTE);
} else if (delta < DAY) {
*text = g_strdup_printf (dngettext (GETTEXT_PACKAGE,
"%d hour ago", "%d hours ago",
delta / HOUR), delta / HOUR);
*next_update = HOUR - (delta % HOUR);
} else if (delta < WEEK) {
*text = g_strdup_printf (dngettext (GETTEXT_PACKAGE,
"%d day ago", "%d days ago",
delta / DAY), delta / DAY);
*next_update = DAY - (delta % DAY);
} else {
*text = g_strdup_printf (dngettext (GETTEXT_PACKAGE,
"%d week ago", "%d weeks ago",
delta / WEEK), delta / WEEK);
*next_update = WEEK - (delta % WEEK);
}
}
/**
* shell_global_get_monitors:
* @global: the #ShellGlobal
@ -1293,7 +1517,8 @@ shell_global_get_focus_monitor (ShellGlobal *global)
}
}
return shell_global_get_primary_monitor (global);
meta_screen_get_monitor_geometry (screen, 0, &rect);
return meta_rectangle_copy (&rect);
}
/**
@ -1362,6 +1587,25 @@ shell_global_sync_pointer (ShellGlobal *global)
clutter_event_put ((ClutterEvent *)&event);
}
/**
* shell_get_event_state:
* @event: a #ClutterEvent
*
* Gets the current state of the event (the set of modifier keys that
* are pressed down). Thhis is a wrapper around
* clutter_event_get_state() that strips out any un-declared modifier
* flags, to make gjs happy; see
* https://bugzilla.gnome.org/show_bug.cgi?id=597292.
*
* Return value: the state from the event
*/
ClutterModifierType
shell_get_event_state (ClutterEvent *event)
{
ClutterModifierType state = clutter_event_get_state (event);
return state & CLUTTER_MODIFIER_MASK;
}
/**
* shell_global_get_settings:
* @global: A #ShellGlobal
@ -1376,6 +1620,59 @@ shell_global_get_settings (ShellGlobal *global)
return global->settings;
}
static void
shell_popup_menu_position_func (GtkMenu *menu,
int *x,
int *y,
gboolean *push_in,
gpointer user_data)
{
*x = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu), "shell-menu-x"));
*y = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu), "shell-menu-y"));
}
/**
* shell_popup_menu:
* @menu: a #GtkMenu
* @button: mouse button that triggered the menu
* @time: timestamp of event that triggered the menu
* @menu_x: x coordinate to display the menu at
* @menu_y: y coordinate to display the menu at
*
* Wraps gtk_menu_popup(), but using @menu_x, @menu_y for the location
* rather than needing a callback.
**/
void
shell_popup_menu (GtkMenu *menu, int button, guint32 time,
int menu_x, int menu_y)
{
g_object_set_data (G_OBJECT (menu), "shell-menu-x", GINT_TO_POINTER (menu_x));
g_object_set_data (G_OBJECT (menu), "shell-menu-y", GINT_TO_POINTER (menu_y));
gtk_menu_popup (menu, NULL, NULL, shell_popup_menu_position_func, NULL,
button, time);
}
/**
* shell_write_string_to_stream:
* @stream: a #GOutputStream
* @str: a UTF-8 string to write to @stream
* @error: location to store GError
*
* Write a string to a GOutputStream as UTF-8. This is a workaround
* for not having binary buffers in GJS.
*
* Return value: %TRUE if write succeeded
*/
gboolean
shell_write_string_to_stream (GOutputStream *stream,
const char *str,
GError **error)
{
return g_output_stream_write_all (stream, str, strlen (str),
NULL, NULL, error);
}
/**
* shell_global_get_current_time:
* @global: A #ShellGlobal
@ -1449,6 +1746,73 @@ shell_global_create_app_launch_context (ShellGlobal *global)
return (GAppLaunchContext *)context;
}
/**
* shell_global_set_property_mutable:
* @global: the #ShellGlobal
* @object: the "path" to a JS object, starting from the root object.
* (Eg, "global.stage" or "imports.gi.Gtk.Window.prototype")
* @property: a property on @object
* @mutable: %TRUE or %FALSE
*
* If @mutable is %TRUE, this clears the "permanent" and "readonly" flags
* on @property of @object. If @mutable is %FALSE, it sets them.
*
* You can use this to make it possible to modify properties that
* would otherwise be read-only from JavaScript.
*
* Return value: success or failure.
*/
gboolean
shell_global_set_property_mutable (ShellGlobal *global,
const char *object,
const char *property,
gboolean mutable)
{
JSContext *context = gjs_context_get_native_context (global->js_context);
char **parts;
JSObject *obj;
jsval val = JSVAL_VOID;
int i;
jsuint attrs;
JSBool found;
JS_BeginRequest (context);
JS_AddValueRoot (context, &val);
parts = g_strsplit (object, ".", -1);
obj = JS_GetGlobalObject (context);
for (i = 0; parts[i]; i++)
{
if (!JS_GetProperty (context, obj, parts[i], &val))
{
g_strfreev (parts);
goto out_error;
}
obj = JSVAL_TO_OBJECT (val);
}
g_strfreev (parts);
if (!JS_GetPropertyAttributes (context, obj, property, &attrs, &found) || !found)
goto out_error;
if (mutable)
attrs &= ~(JSPROP_PERMANENT | JSPROP_READONLY);
else
attrs |= (JSPROP_PERMANENT | JSPROP_READONLY);
if (!JS_SetPropertyAttributes (context, obj, property, attrs, &found))
goto out_error;
JS_RemoveValueRoot (context, &val);
JS_EndRequest (context);
return TRUE;
out_error:
gjs_log_exception (context, NULL);
JS_RemoveValueRoot (context, &val);
JS_EndRequest (context);
return FALSE;
}
typedef struct
{
ShellLeisureFunction func;
@ -1685,6 +2049,66 @@ gboolean _shell_global_check_xdnd_event (ShellGlobal *global,
return FALSE;
}
/**
* ShellGetTpContactCb:
* @connection: The connection
* @contacts: (element-type TelepathyGLib.Contact): List of contacts
* @failed: Array of failed contacts
*/
static void
shell_global_get_tp_contacts_cb (TpConnection *self,
guint n_contacts,
TpContact * const *contacts,
guint n_failed,
const TpHandle *failed,
const GError *error,
gpointer user_data,
GObject *weak_object)
{
int i;
GList *contact_list = NULL;
for (i = 0; i < n_contacts; i++) {
contact_list = g_list_append(contact_list, contacts[i]);
}
TpHandle *failed_list = g_new0 (TpHandle, n_failed + 1);
memcpy(failed_list, failed, n_failed);
((ShellGetTpContactCb)user_data)(self, contact_list, failed_list);
}
/**
* shell_get_tp_contacts:
* @self: A connection, which must be ready
* @n_handles: Number of handles in handles
* @handles: (array length=n_handles) (element-type uint): Array of handles
* @n_features: Number of features in features
* @features: (array length=n_features) (allow-none) (element-type uint):
* Array of features
* @callback: (scope async): User callback to run when the contacts are ready
*
* Wrap tp_connection_get_contacts_by_handle so we can transform the array
* into a null-terminated one, which gjs can handle.
* We send the original callback to tp_connection_get_contacts_by_handle as
* user_data, and we have our own function as callback, which does the
* transforming.
*/
void
shell_get_tp_contacts (TpConnection *self,
guint n_handles,
const TpHandle *handles,
guint n_features,
const TpContactFeature *features,
ShellGetTpContactCb callback)
{
tp_connection_get_contacts_by_handle(self, n_handles, handles,
n_features, features,
shell_global_get_tp_contacts_cb,
callback, NULL, NULL);
}
/**
* shell_global_launch_calendar_server:
* @global: The #ShellGlobal.
@ -1738,3 +2162,103 @@ shell_global_launch_calendar_server (ShellGlobal *global)
g_free (calendar_server_exe);
}
static void
shell_global_get_self_contact_features_cb (TpConnection *connection,
guint n_contacts,
TpContact * const *contacts,
const GError *error,
gpointer user_data,
GObject *weak_object)
{
if (error != NULL) {
g_print ("Failed to upgrade self contact: %s", error->message);
return;
}
((ShellGetSelfContactFeaturesCb)user_data)(connection, *contacts);
}
/**
* shell_get_self_contact_features:
* @self: A connection, which must be ready
* @n_features: Number of features in features
* @features: (array length=n_features) (allow-none) (element-type uint):
* Array of features
* @callback: (scope async): User callback to run when the contact is ready
*
* Wrap tp_connection_upgrade_contacts due to the lack of support for
* proper arrays arguments in GJS.
*/
void
shell_get_self_contact_features (TpConnection *self,
guint n_features,
const TpContactFeature *features,
ShellGetSelfContactFeaturesCb callback)
{
TpContact *self_contact = tp_connection_get_self_contact (self);
tp_connection_upgrade_contacts (self, 1, &self_contact,
n_features, features,
shell_global_get_self_contact_features_cb,
callback, NULL, NULL);
}
/**
* shell_get_contact_events:
* @log_manager: A #TplLogManager
* @account: A #TpAccount
* @entity: A #TplEntity
* @num_events: The number of events to retrieve
* @callback: (scope async): User callback to run when the contact is ready
*
* Wrap tpl_log_manager_get_filtered_events_async because gjs cannot support
* multiple callbacks in the same function call.
*/
void
shell_get_contact_events (TplLogManager *log_manager,
TpAccount *account,
TplEntity *entity,
guint num_events,
GAsyncReadyCallback callback)
{
tpl_log_manager_get_filtered_events_async (log_manager,
account,
entity,
TPL_EVENT_MASK_TEXT,
num_events,
NULL, NULL,
callback, NULL);
}
/**
* shell_get_file_contents_utf8_sync:
* @path: UTF-8 encoded filename path
* @error: a #GError
*
* Synchronously load the contents of a file as a NUL terminated
* string, validating it as UTF-8. Embedded NUL characters count as
* invalid content.
*
* Returns: (transfer full): File contents
*/
char *
shell_get_file_contents_utf8_sync (const char *path,
GError **error)
{
char *contents;
gsize len;
if (!g_file_get_contents (path, &contents, &len, error))
return NULL;
if (!g_utf8_validate (contents, len, NULL))
{
g_free (contents);
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
"File %s contains invalid UTF-8",
path);
return NULL;
}
return contents;
}

View File

@ -7,6 +7,8 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtk.h>
#include <meta/meta-plugin.h>
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-logger/telepathy-logger.h>
G_BEGIN_DECLS
@ -20,45 +22,20 @@ typedef struct _ShellGlobalClass ShellGlobalClass;
#define SHELL_IS_GLOBAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_GLOBAL))
#define SHELL_GLOBAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_GLOBAL, ShellGlobalClass))
#define SHELL_GCONF_DIR "/desktop/gnome/shell"
struct _ShellGlobalClass
{
GObjectClass parent_class;
};
GType shell_global_get_type (void) G_GNUC_CONST;
GType shell_global_get_type (void) G_GNUC_CONST;
ShellGlobal *shell_global_get (void);
gboolean shell_clutter_texture_set_from_pixbuf (ClutterTexture *texture,
GdkPixbuf *pixbuf);
MetaScreen *shell_global_get_screen (ShellGlobal *global);
GdkScreen *shell_global_get_gdk_screen (ShellGlobal *global);
GList *shell_global_get_window_actors (ShellGlobal *global);
GSList *shell_global_get_monitors (ShellGlobal *global);
MetaRectangle *shell_global_get_primary_monitor (ShellGlobal *global);
int shell_global_get_primary_monitor_index (ShellGlobal *global);
MetaRectangle *shell_global_get_focus_monitor (ShellGlobal *global);
GSettings *shell_global_get_settings (ShellGlobal *global);
guint32 shell_global_get_current_time (ShellGlobal *global);
ShellGlobal *shell_global_get (void);
/* Input/event handling */
gboolean shell_global_begin_modal (ShellGlobal *global,
guint32 timestamp);
void shell_global_end_modal (ShellGlobal *global,
guint32 timestamp);
typedef enum {
SHELL_STAGE_INPUT_MODE_NONREACTIVE,
SHELL_STAGE_INPUT_MODE_NORMAL,
SHELL_STAGE_INPUT_MODE_FOCUSED,
SHELL_STAGE_INPUT_MODE_FULLSCREEN
} ShellStageInputMode;
void shell_global_set_stage_input_mode (ShellGlobal *global,
ShellStageInputMode mode);
void shell_global_set_stage_input_region (ShellGlobal *global,
GSList *rectangles);
/* X utilities */
typedef enum {
SHELL_CURSOR_DND_IN_DRAG,
SHELL_CURSOR_DND_UNSUPPORTED_TARGET,
@ -67,83 +44,149 @@ typedef enum {
SHELL_CURSOR_POINTING_HAND
} ShellCursor;
void shell_global_set_cursor (ShellGlobal *global,
ShellCursor type);
void shell_global_unset_cursor (ShellGlobal *global);
void shell_global_set_cursor (ShellGlobal *global,
ShellCursor type);
guint32 shell_global_create_pointer_barrier (ShellGlobal *global,
int x1,
int y1,
int x2,
int y2,
int directions);
void shell_global_destroy_pointer_barrier (ShellGlobal *global,
guint32 barrier);
void shell_global_unset_cursor (ShellGlobal *global);
void shell_global_get_pointer (ShellGlobal *global,
int *x,
int *y,
ClutterModifierType *mods);
MetaScreen *shell_global_get_screen (ShellGlobal *global);
GdkScreen *shell_global_get_gdk_screen (ShellGlobal *global);
/* JavaScript utilities */
void shell_global_gc (ShellGlobal *global);
void shell_global_maybe_gc (ShellGlobal *global);
gboolean shell_global_add_extension_importer (ShellGlobal *global,
const char *target_object_script,
const char *target_property,
const char *directory,
GError **error);
typedef struct {
guint glibc_uordblks;
typedef enum {
SHELL_STAGE_INPUT_MODE_NONREACTIVE,
SHELL_STAGE_INPUT_MODE_NORMAL,
SHELL_STAGE_INPUT_MODE_FOCUSED,
SHELL_STAGE_INPUT_MODE_FULLSCREEN
} ShellStageInputMode;
guint js_bytes;
void shell_global_set_stage_input_mode (ShellGlobal *global,
ShellStageInputMode mode);
void shell_global_set_stage_input_region (ShellGlobal *global,
GSList *rectangles);
guint gjs_boxed;
guint gjs_gobject;
guint gjs_function;
guint gjs_closure;
} ShellMemoryInfo;
GList *shell_global_get_window_actors (ShellGlobal *global);
void shell_global_get_memory_info (ShellGlobal *global,
ShellMemoryInfo *meminfo);
gboolean shell_global_begin_modal (ShellGlobal *global,
guint32 timestamp);
void shell_global_end_modal (ShellGlobal *global,
guint32 timestamp);
gboolean shell_global_display_is_grabbed (ShellGlobal *global);
/* Run-at-leisure API */
void shell_global_begin_work (ShellGlobal *global);
void shell_global_end_work (ShellGlobal *global);
void shell_global_reexec_self (ShellGlobal *global);
void shell_global_breakpoint (ShellGlobal *global);
gboolean shell_global_parse_search_provider (ShellGlobal *global,
const char *data,
char **name,
char **url,
GList **langs,
char **icon_data_uri,
GError **error);
void shell_global_gc (ShellGlobal *global);
void shell_global_maybe_gc (ShellGlobal *global);
void shell_global_format_time_relative_pretty (ShellGlobal *global, guint delta, char **text, guint *next_update);
GSList *shell_global_get_monitors (ShellGlobal *global);
MetaRectangle *shell_global_get_primary_monitor (ShellGlobal *global);
int shell_global_get_primary_monitor_index (ShellGlobal *global);
MetaRectangle *shell_global_get_focus_monitor (ShellGlobal *global);
guint32 shell_global_create_pointer_barrier (ShellGlobal *global,
int x1, int y1, int x2, int y2,
int directions);
void shell_global_destroy_pointer_barrier (ShellGlobal *global,
guint32 barrier);
void shell_global_get_pointer (ShellGlobal *global,
int *x,
int *y,
ClutterModifierType *mods);
void shell_global_sync_pointer (ShellGlobal *global);
GSettings *shell_global_get_settings (ShellGlobal *global);
ClutterModifierType shell_get_event_state (ClutterEvent *event);
void shell_popup_menu (GtkMenu *menu, int button, guint32 time,
int menu_x, int menu_y);
gboolean shell_write_string_to_stream (GOutputStream *stream,
const char *str,
GError **error);
guint32 shell_global_get_current_time (ShellGlobal *global);
GAppLaunchContext *shell_global_create_app_launch_context (ShellGlobal *global);
gboolean shell_global_set_property_mutable (ShellGlobal *global,
const char *object,
const char *property,
gboolean mutable);
void shell_global_begin_work (ShellGlobal *global);
void shell_global_end_work (ShellGlobal *global);
typedef void (*ShellLeisureFunction) (gpointer data);
void shell_global_run_at_leisure (ShellGlobal *global,
ShellLeisureFunction func,
gpointer user_data,
GDestroyNotify notify);
void shell_global_run_at_leisure (ShellGlobal *global,
ShellLeisureFunction func,
gpointer user_data,
GDestroyNotify notify);
void shell_global_play_theme_sound (ShellGlobal *global,
guint id,
const char *name);
void shell_global_cancel_theme_sound (ShellGlobal *global,
guint id);
/* Misc utilities / Shell API */
gboolean shell_global_add_extension_importer (ShellGlobal *global,
const char *target_object_script,
const char *target_property,
const char *directory,
GError **error);
void shell_global_notify_error (ShellGlobal *global,
const char *msg,
const char *details);
void shell_global_sync_pointer (ShellGlobal *global);
void shell_global_init_xdnd (ShellGlobal *global);
GAppLaunchContext *
shell_global_create_app_launch_context (ShellGlobal *global);
typedef void (*ShellGetTpContactCb) (TpConnection *connection,
GList *contacts,
TpHandle *failed);
void shell_global_play_theme_sound (ShellGlobal *global,
guint id,
const char *name);
void shell_global_cancel_theme_sound (ShellGlobal *global,
guint id);
void shell_get_tp_contacts (TpConnection *self,
guint n_handles,
const TpHandle *handles,
guint n_features,
const TpContactFeature *features,
ShellGetTpContactCb callback);
void shell_global_notify_error (ShellGlobal *global,
const char *msg,
const char *details);
void shell_global_launch_calendar_server (ShellGlobal *global);
void shell_global_init_xdnd (ShellGlobal *global);
typedef void (*ShellGetSelfContactFeaturesCb) (TpConnection *connection,
TpContact *contact);
void shell_global_reexec_self (ShellGlobal *global);
void shell_get_self_contact_features (TpConnection *self,
guint n_features,
const TpContactFeature *features,
ShellGetSelfContactFeaturesCb callback);
void shell_global_launch_calendar_server (ShellGlobal *global);
void shell_get_contact_events (TplLogManager *log_manager,
TpAccount *account,
TplEntity *entity,
guint num_events,
GAsyncReadyCallback callback);
char *shell_get_file_contents_utf8_sync (const char *path,
GError **error);
G_END_DECLS

View File

@ -62,6 +62,8 @@ struct _ShellRecorder {
gboolean only_paint; /* Used to temporarily suppress recording */
gboolean have_pack_invert; /* True when GL_MESA_pack_invert is available */
int framerate;
char *pipeline_description;
char *filename;
@ -412,8 +414,6 @@ recorder_fetch_cursor_image (ShellRecorder *recorder)
*(guint32 *)(data + i * stride + 4 * j) = cursor_image->pixels[i * cursor_image->width + j];
cairo_surface_mark_dirty (recorder->cursor_image);
XFree (cursor_image);
}
/* Overlay the cursor image on the frame. We draw the cursor image
@ -450,7 +450,15 @@ recorder_draw_cursor (ShellRecorder *recorder,
recorder->stage_height,
recorder->stage_width * 4);
/* When not using GL_MESA_pack_invert the data we get from glReadPixels is "upside down",
* so transform our cairo drawing to match */
cr = cairo_create (surface);
if (!recorder->have_pack_invert)
{
cairo_translate(cr, 0, recorder->stage_height);
cairo_scale(cr, 1, -1);
}
cairo_set_source_surface (cr,
recorder->cursor_image,
recorder->pointer_x - recorder->cursor_hot_x,
@ -526,11 +534,36 @@ recorder_record_frame (ShellRecorder *recorder)
GST_BUFFER_TIMESTAMP(buffer) = get_wall_time() - recorder->start_time;
cogl_read_pixels (0, 0,
recorder->stage_width, recorder->stage_height,
COGL_READ_PIXELS_COLOR_BUFFER,
COGL_PIXEL_FORMAT_BGRA_8888_PRE,
data);
/* We could use cogl_read_pixels, but it only currently supports
* COGL_PIXEL_FORMAT_RGBA_8888, while we prefer the native framebuffer
* format. (COGL_PIXEL_FORMAT_ARGB_8888_PRE,
* COGL_PIXEL_FORMAT_BGRA_PRE, depending on endianess)
*
* http://bugzilla.openedhand.com/show_bug.cgi?id=1959
*/
/* Flush any primitives that Cogl has batched up */
cogl_flush ();
/* Set the parameters for how data is stored; these are the initial
* values but Cogl will have modified them for its own purposes */
glPixelStorei (GL_PACK_ALIGNMENT, 4);
glPixelStorei (GL_PACK_ROW_LENGTH, 0);
glPixelStorei (GL_PACK_SKIP_PIXELS, 0);
glPixelStorei (GL_PACK_SKIP_ROWS, 0);
if (recorder->have_pack_invert)
glPixelStorei (GL_PACK_INVERT_MESA, TRUE);
glReadBuffer (GL_BACK_LEFT);
glReadPixels (0, 0,
recorder->stage_width, recorder->stage_height,
GL_BGRA,
GL_UNSIGNED_INT_8_8_8_8_REV,
data);
if (recorder->have_pack_invert)
glPixelStorei (GL_PACK_INVERT_MESA, FALSE);
recorder_draw_cursor (recorder, buffer);
@ -833,6 +866,7 @@ recorder_set_stage (ShellRecorder *recorder,
if (recorder->stage)
{
int error_base;
const char *gl_extensions;
recorder->stage = stage;
g_signal_connect (recorder->stage, "destroy",
@ -857,6 +891,8 @@ recorder_set_stage (ShellRecorder *recorder,
XFixesDisplayCursorNotifyMask);
clutter_stage_ensure_current (stage);
gl_extensions = (const char *)glGetString (GL_EXTENSIONS);
recorder->have_pack_invert = strstr (gl_extensions, "GL_MESA_pack_invert") != NULL;
recorder_get_initial_cursor_position (recorder);
}
@ -1057,6 +1093,8 @@ recorder_pipeline_add_source (RecorderPipeline *pipeline)
GstPad *sink_pad = NULL, *src_pad = NULL;
gboolean result = FALSE;
GstElement *ffmpegcolorspace;
GstElement *videoflip;
GError *error = NULL;
sink_pad = gst_bin_find_unlinked_pad (GST_BIN (pipeline->pipeline), GST_PAD_SINK);
if (sink_pad == NULL)
@ -1086,8 +1124,38 @@ recorder_pipeline_add_source (RecorderPipeline *pipeline)
}
gst_bin_add (GST_BIN (pipeline->pipeline), ffmpegcolorspace);
gst_element_link_many (pipeline->src, ffmpegcolorspace, NULL);
src_pad = gst_element_get_static_pad (ffmpegcolorspace, "src");
/* glReadPixels gives us an upside-down buffer, so we have to flip it back
* right-side up.
*
* When available MESA_pack_invert extension is used to avoid the
* flip entirely, since the data is actually stored in the frame buffer
* in the order that we expect.
*
* We use gst_parse_launch to avoid having to know the enum value for flip-vertical
*/
if (!pipeline->recorder->have_pack_invert)
{
videoflip = gst_parse_launch_full ("videoflip method=vertical-flip", NULL,
GST_PARSE_FLAG_FATAL_ERRORS,
&error);
if (videoflip == NULL)
{
g_warning("Can't create videoflip element: %s", error->message);
g_error_free (error);
goto out;
}
gst_bin_add (GST_BIN (pipeline->pipeline), videoflip);
gst_element_link_many (pipeline->src, ffmpegcolorspace, videoflip, NULL);
src_pad = gst_element_get_static_pad (videoflip, "src");
}
else
{
gst_element_link_many (pipeline->src, ffmpegcolorspace, NULL);
src_pad = gst_element_get_static_pad (ffmpegcolorspace, "src");
}
if (!src_pad)
{

View File

@ -1,373 +0,0 @@
#include "shell-tp-client.h"
#include <string.h>
#include <telepathy-glib/telepathy-glib.h>
G_DEFINE_TYPE(ShellTpClient, shell_tp_client, TP_TYPE_BASE_CLIENT)
struct _ShellTpClientPrivate
{
ShellTpClientObserveChannelsImpl observe_impl;
gpointer user_data_obs;
GDestroyNotify destroy_obs;
ShellTpClientApproveChannelsImpl approve_channels_impl;
gpointer user_data_approve_channels;
GDestroyNotify destroy_approve_channels;
ShellTpClientHandleChannelsImpl handle_channels_impl;
gpointer user_data_handle_channels;
GDestroyNotify destroy_handle_channels;
};
/**
* ShellTpClientObserveChannelsImpl:
* @client: a #ShellTpClient instance
* @account: a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared if possible
* @connection: a #TpConnection having %TP_CONNECTION_FEATURE_CORE prepared
* if possible
* @channels: (element-type TelepathyGLib.Channel): a #GList of #TpChannel,
* all having %TP_CHANNEL_FEATURE_CORE prepared if possible
* @dispatch_operation: (allow-none): a #TpChannelDispatchOperation or %NULL;
* the dispatch_operation is not guaranteed to be prepared
* @requests: (element-type TelepathyGLib.ChannelRequest): a #GList of
* #TpChannelRequest, all having their object-path defined but are not
* guaranteed to be prepared.
* @context: a #TpObserveChannelsContext representing the context of this
* D-Bus call
*
* Signature of the implementation of the ObserveChannels method.
*/
/**
* ShellTpClientApproveChannelsImpl:
* @client: a #ShellTpClient instance
* @account: a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared if possible
* @connection: a #TpConnection having %TP_CONNECTION_FEATURE_CORE prepared
* if possible
* @channels: (element-type TelepathyGLib.Channel): a #GList of #TpChannel,
* all having %TP_CHANNEL_FEATURE_CORE prepared if possible
* @dispatch_operation: (allow-none): a #TpChannelDispatchOperation or %NULL;
* the dispatch_operation is not guaranteed to be prepared
* @context: a #TpAddDispatchOperationContext representing the context of this
* D-Bus call
*
* Signature of the implementation of the AddDispatchOperation method.
*/
/**
* ShellTpClientHandleChannelsImpl:
* @client: a #ShellTpClient instance
* @account: a #TpAccount having %TP_ACCOUNT_FEATURE_CORE prepared if possible
* @connection: a #TpConnection having %TP_CONNECTION_FEATURE_CORE prepared
* if possible
* @channels: (element-type TelepathyGLib.Channel): a #GList of #TpChannel,
* all having %TP_CHANNEL_FEATURE_CORE prepared if possible
* @requests_satisfied: (element-type TelepathyGLib.ChannelRequest): a #GList of
* #TpChannelRequest having their object-path defined but are not guaranteed
* to be prepared.
* @user_action_time: the time at which user action occurred, or one of the
* special values %TP_USER_ACTION_TIME_NOT_USER_ACTION or
* %TP_USER_ACTION_TIME_CURRENT_TIME
* (see #TpAccountChannelRequest:user-action-time for details)
* @context: a #TpHandleChannelsContext representing the context of this
* D-Bus call
*
* Signature of the implementation of the HandleChannels method.
*/
static void
shell_tp_client_init (ShellTpClient *self)
{
GHashTable *filter;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, SHELL_TYPE_TP_CLIENT,
ShellTpClientPrivate);
/* We only care about single-user text-based chats */
filter = tp_asv_new (
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
TP_IFACE_CHANNEL_TYPE_TEXT,
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
TP_HANDLE_TYPE_CONTACT,
NULL);
/* Observer */
tp_base_client_set_observer_recover (TP_BASE_CLIENT (self), TRUE);
tp_base_client_add_observer_filter (TP_BASE_CLIENT (self), filter);
/* Approver */
tp_base_client_add_approver_filter (TP_BASE_CLIENT (self), filter);
/* Handler */
tp_base_client_add_handler_filter (TP_BASE_CLIENT (self), filter);
g_hash_table_unref (filter);
}
static void
observe_channels (TpBaseClient *client,
TpAccount *account,
TpConnection *connection,
GList *channels,
TpChannelDispatchOperation *dispatch_operation,
GList *requests,
TpObserveChannelsContext *context)
{
ShellTpClient *self = (ShellTpClient *) client;
g_assert (self->priv->observe_impl != NULL);
self->priv->observe_impl (self, account, connection, channels,
dispatch_operation, requests, context, self->priv->user_data_obs);
}
static void
add_dispatch_operation (TpBaseClient *client,
TpAccount *account,
TpConnection *connection,
GList *channels,
TpChannelDispatchOperation *dispatch_operation,
TpAddDispatchOperationContext *context)
{
ShellTpClient *self = (ShellTpClient *) client;
g_assert (self->priv->approve_channels_impl != NULL);
self->priv->approve_channels_impl (self, account, connection, channels,
dispatch_operation, context, self->priv->user_data_approve_channels);
}
static void
handle_channels (TpBaseClient *client,
TpAccount *account,
TpConnection *connection,
GList *channels,
GList *requests_satisfied,
gint64 user_action_time,
TpHandleChannelsContext *context)
{
ShellTpClient *self = (ShellTpClient *) client;
g_assert (self->priv->handle_channels_impl != NULL);
self->priv->handle_channels_impl (self, account, connection, channels,
requests_satisfied, user_action_time, context,
self->priv->user_data_handle_channels);
}
static void
shell_tp_client_dispose (GObject *object)
{
ShellTpClient *self = SHELL_TP_CLIENT (object);
void (*dispose) (GObject *) =
G_OBJECT_CLASS (shell_tp_client_parent_class)->dispose;
if (self->priv->destroy_obs != NULL)
{
self->priv->destroy_obs (self->priv->user_data_obs);
self->priv->destroy_obs = NULL;
self->priv->user_data_obs = NULL;
}
if (self->priv->destroy_approve_channels != NULL)
{
self->priv->destroy_approve_channels (self->priv->user_data_approve_channels);
self->priv->destroy_approve_channels = NULL;
self->priv->user_data_approve_channels = NULL;
}
if (self->priv->destroy_handle_channels != NULL)
{
self->priv->destroy_handle_channels (self->priv->user_data_handle_channels);
self->priv->destroy_handle_channels = NULL;
self->priv->user_data_handle_channels = NULL;
}
if (dispose != NULL)
dispose (object);
}
static void
shell_tp_client_class_init (ShellTpClientClass *cls)
{
GObjectClass *object_class = G_OBJECT_CLASS (cls);
TpBaseClientClass *base_clt_cls = TP_BASE_CLIENT_CLASS (cls);
g_type_class_add_private (cls, sizeof (ShellTpClientPrivate));
object_class->dispose = shell_tp_client_dispose;
base_clt_cls->observe_channels = observe_channels;
base_clt_cls->add_dispatch_operation = add_dispatch_operation;
base_clt_cls->handle_channels = handle_channels;
}
void
shell_tp_client_set_observe_channels_func (ShellTpClient *self,
ShellTpClientObserveChannelsImpl observe_impl,
gpointer user_data,
GDestroyNotify destroy)
{
g_assert (self->priv->observe_impl == NULL);
self->priv->observe_impl = observe_impl;
self->priv->user_data_obs = user_data;
self->priv->destroy_obs = destroy;
}
void
shell_tp_client_set_approve_channels_func (ShellTpClient *self,
ShellTpClientApproveChannelsImpl approve_channels_impl,
gpointer user_data,
GDestroyNotify destroy)
{
g_assert (self->priv->approve_channels_impl == NULL);
self->priv->approve_channels_impl = approve_channels_impl;
self->priv->user_data_approve_channels = user_data;
self->priv->destroy_approve_channels = destroy;
}
void
shell_tp_client_set_handle_channels_func (ShellTpClient *self,
ShellTpClientHandleChannelsImpl handle_channels_impl,
gpointer user_data,
GDestroyNotify destroy)
{
g_assert (self->priv->handle_channels_impl == NULL);
self->priv->handle_channels_impl = handle_channels_impl;
self->priv->user_data_handle_channels = user_data;
self->priv->destroy_handle_channels = destroy;
}
/* Telepathy utility functions */
/**
* ShellGetTpContactCb:
* @connection: The connection
* @contacts: (element-type TelepathyGLib.Contact): List of contacts
* @failed: Array of failed contacts
*/
static void
shell_global_get_tp_contacts_cb (TpConnection *self,
guint n_contacts,
TpContact * const *contacts,
guint n_failed,
const TpHandle *failed,
const GError *error,
gpointer user_data,
GObject *weak_object)
{
int i;
GList *contact_list = NULL;
for (i = 0; i < n_contacts; i++) {
contact_list = g_list_append(contact_list, contacts[i]);
}
TpHandle *failed_list = g_new0 (TpHandle, n_failed + 1);
memcpy(failed_list, failed, n_failed);
((ShellGetTpContactCb)user_data)(self, contact_list, failed_list);
}
/**
* shell_get_tp_contacts:
* @self: A connection, which must be ready
* @n_handles: Number of handles in handles
* @handles: (array length=n_handles) (element-type uint): Array of handles
* @n_features: Number of features in features
* @features: (array length=n_features) (allow-none) (element-type uint):
* Array of features
* @callback: (scope async): User callback to run when the contacts are ready
*
* Wrap tp_connection_get_contacts_by_handle so we can transform the array
* into a null-terminated one, which gjs can handle.
* We send the original callback to tp_connection_get_contacts_by_handle as
* user_data, and we have our own function as callback, which does the
* transforming.
*/
void
shell_get_tp_contacts (TpConnection *self,
guint n_handles,
const TpHandle *handles,
guint n_features,
const TpContactFeature *features,
ShellGetTpContactCb callback)
{
tp_connection_get_contacts_by_handle(self, n_handles, handles,
n_features, features,
shell_global_get_tp_contacts_cb,
callback, NULL, NULL);
}
static void
shell_global_get_self_contact_features_cb (TpConnection *connection,
guint n_contacts,
TpContact * const *contacts,
const GError *error,
gpointer user_data,
GObject *weak_object)
{
if (error != NULL) {
g_print ("Failed to upgrade self contact: %s", error->message);
return;
}
((ShellGetSelfContactFeaturesCb)user_data)(connection, *contacts);
}
/**
* shell_get_self_contact_features:
* @self: A connection, which must be ready
* @n_features: Number of features in features
* @features: (array length=n_features) (allow-none) (element-type uint):
* Array of features
* @callback: (scope async): User callback to run when the contact is ready
*
* Wrap tp_connection_upgrade_contacts due to the lack of support for
* proper arrays arguments in GJS.
*/
void
shell_get_self_contact_features (TpConnection *self,
guint n_features,
const TpContactFeature *features,
ShellGetSelfContactFeaturesCb callback)
{
TpContact *self_contact = tp_connection_get_self_contact (self);
tp_connection_upgrade_contacts (self, 1, &self_contact,
n_features, features,
shell_global_get_self_contact_features_cb,
callback, NULL, NULL);
}
/**
* shell_get_contact_events:
* @log_manager: A #TplLogManager
* @account: A #TpAccount
* @entity: A #TplEntity
* @num_events: The number of events to retrieve
* @callback: (scope async): User callback to run when the contact is ready
*
* Wrap tpl_log_manager_get_filtered_events_async because gjs cannot support
* multiple callbacks in the same function call.
*/
void
shell_get_contact_events (TplLogManager *log_manager,
TpAccount *account,
TplEntity *entity,
guint num_events,
GAsyncReadyCallback callback)
{
tpl_log_manager_get_filtered_events_async (log_manager,
account,
entity,
TPL_EVENT_MASK_TEXT,
num_events,
NULL, NULL,
callback, NULL);
}

View File

@ -1,115 +0,0 @@
#ifndef __SHELL_TP_CLIENT_H__
#define __SHELL_TP_CLIENT_H__
#include <dbus/dbus-glib.h>
#include <glib-object.h>
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-logger/telepathy-logger.h>
G_BEGIN_DECLS
typedef struct _ShellTpClient ShellTpClient;
typedef struct _ShellTpClientClass ShellTpClientClass;
typedef struct _ShellTpClientPrivate ShellTpClientPrivate;
struct _ShellTpClientClass {
/*<private>*/
TpBaseClientClass parent_class;
};
struct _ShellTpClient {
/*<private>*/
TpBaseClient parent;
ShellTpClientPrivate *priv;
};
GType shell_tp_client_get_type (void);
#define SHELL_TYPE_TP_CLIENT \
(shell_tp_client_get_type ())
#define SHELL_TP_CLIENT(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_TP_CLIENT, \
ShellTpClient))
#define SHELL_TP_CLIENT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_TP_CLIENT, \
ShellTpClientClass))
#define SHELL_IS_TP_CLIENT(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_TP_CLIENT))
#define SHELL_IS_TP_CLIENT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_TP_CLIENT))
#define SHELL_TP_CLIENT_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_TP_CLIENT, \
ShellTpClientClass))
typedef void (*ShellTpClientObserveChannelsImpl) (ShellTpClient *client,
TpAccount *account,
TpConnection *connection,
GList *channels,
TpChannelDispatchOperation *dispatch_operation,
GList *requests,
TpObserveChannelsContext *context,
gpointer user_data);
void shell_tp_client_set_observe_channels_func (ShellTpClient *self,
ShellTpClientObserveChannelsImpl observe_impl,
gpointer user_data,
GDestroyNotify destroy);
typedef void (*ShellTpClientApproveChannelsImpl) (
ShellTpClient *client,
TpAccount *account,
TpConnection *connection,
GList *channels,
TpChannelDispatchOperation *dispatch_operation,
TpAddDispatchOperationContext *context,
gpointer user_data);
void shell_tp_client_set_approve_channels_func (ShellTpClient *self,
ShellTpClientApproveChannelsImpl approve_impl,
gpointer user_data,
GDestroyNotify destroy);
typedef void (*ShellTpClientHandleChannelsImpl) (
ShellTpClient *client,
TpAccount *account,
TpConnection *connection,
GList *channels,
GList *requests_satisfied,
gint64 user_action_time,
TpHandleChannelsContext *context,
gpointer user_data);
void shell_tp_client_set_handle_channels_func (ShellTpClient *self,
ShellTpClientHandleChannelsImpl handle_channels_impl,
gpointer user_data,
GDestroyNotify destroy);
/* Telepathy utility functions */
typedef void (*ShellGetTpContactCb) (TpConnection *connection,
GList *contacts,
TpHandle *failed);
void shell_get_tp_contacts (TpConnection *self,
guint n_handles,
const TpHandle *handles,
guint n_features,
const TpContactFeature *features,
ShellGetTpContactCb callback);
typedef void (*ShellGetSelfContactFeaturesCb) (TpConnection *connection,
TpContact *contact);
void shell_get_self_contact_features (TpConnection *self,
guint n_features,
const TpContactFeature *features,
ShellGetSelfContactFeaturesCb callback);
void shell_get_contact_events (TplLogManager *log_manager,
TpAccount *account,
TplEntity *entity,
guint num_events,
GAsyncReadyCallback callback);
G_END_DECLS
#endif /* __SHELL_TP_CLIENT_H__ */

View File

@ -4,13 +4,10 @@
#include "shell-util.h"
#include <glib/gi18n-lib.h>
#include <gconf/gconf-client.h>
#include <gtk/gtk.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
/* Some code in this file adapted under the GPLv2+ from:
/* The code in this file adapted under the GPLv2+ from:
*
* GNOME panel utils: gnome-panel/gnome-panel/panel-util.c
* (C) 1997, 1998, 1999, 2000 The Free Software Foundation
@ -71,8 +68,7 @@ shell_util_get_file_display_name_if_mount (GFile *file)
return ret;
}
#define HOME_NAME_SCHEMA "org.gnome.nautilus.desktop"
#define HOME_NAME_KEY "home-icon-name"
#define HOME_NAME_KEY "/apps/nautilus/desktop/home_icon_name"
static char *
shell_util_get_file_display_for_common_files (GFile *file)
{
@ -81,23 +77,20 @@ shell_util_get_file_display_for_common_files (GFile *file)
compare = g_file_new_for_path (g_get_home_dir ());
if (g_file_equal (file, compare))
{
GSettings *settings;
char *name;
char *gconf_name;
g_object_unref (compare);
settings = g_settings_new (HOME_NAME_SCHEMA);
name = g_settings_get_string (settings, HOME_NAME_KEY);
g_object_unref (settings);
if (!(name && name[0]))
gconf_name = gconf_client_get_string (gconf_client_get_default (),
HOME_NAME_KEY, NULL);
if (!(gconf_name && gconf_name[0]))
{
g_free (name);
g_free (gconf_name);
return g_strdup (_("Home Folder"));
}
else
{
return name;
return gconf_name;
}
}
g_object_unref (compare);
@ -540,214 +533,3 @@ shell_util_format_date (const char *format,
g_date_time_unref (datetime);
return result;
}
/**
* shell_get_event_state:
* @event: a #ClutterEvent
*
* Gets the current state of the event (the set of modifier keys that
* are pressed down). Thhis is a wrapper around
* clutter_event_get_state() that strips out any un-declared modifier
* flags, to make gjs happy; see
* https://bugzilla.gnome.org/show_bug.cgi?id=597292.
*
* Return value: the state from the event
*/
ClutterModifierType
shell_get_event_state (ClutterEvent *event)
{
ClutterModifierType state = clutter_event_get_state (event);
return state & CLUTTER_MODIFIER_MASK;
}
/**
* shell_write_string_to_stream:
* @stream: a #GOutputStream
* @str: a UTF-8 string to write to @stream
* @error: location to store GError
*
* Write a string to a GOutputStream as UTF-8. This is a workaround
* for not having binary buffers in GJS.
*
* Return value: %TRUE if write succeeded
*/
gboolean
shell_write_string_to_stream (GOutputStream *stream,
const char *str,
GError **error)
{
return g_output_stream_write_all (stream, str, strlen (str),
NULL, NULL, error);
}
/**
* shell_get_file_contents_utf8_sync:
* @path: UTF-8 encoded filename path
* @error: a #GError
*
* Synchronously load the contents of a file as a NUL terminated
* string, validating it as UTF-8. Embedded NUL characters count as
* invalid content.
*
* Returns: (transfer full): File contents
*/
char *
shell_get_file_contents_utf8_sync (const char *path,
GError **error)
{
char *contents;
gsize len;
if (!g_file_get_contents (path, &contents, &len, error))
return NULL;
if (!g_utf8_validate (contents, len, NULL))
{
g_free (contents);
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
"File %s contains invalid UTF-8",
path);
return NULL;
}
return contents;
}
/**
* shell_breakpoint:
*
* Using G_BREAKPOINT(), interrupt the current process. This is useful
* in conjunction with a debugger such as gdb.
*/
void
shell_breakpoint (void)
{
G_BREAKPOINT ();
}
/**
* shell_parse_search_provider:
* @data: description of provider
* @name: (out): location to store a display name
* @url: (out): location to store template of url
* @langs: (out) (transfer full) (element-type utf8): list of supported languages
* @icon_data_uri: (out): location to store uri
* @error: location to store GError
*
* Returns: %TRUE on success
*/
gboolean
shell_parse_search_provider (const char *data,
char **name,
char **url,
GList **langs,
char **icon_data_uri,
GError **error)
{
xmlDocPtr doc = xmlParseMemory (data, strlen (data));
xmlNode *root;
*name = NULL;
*url = NULL;
*icon_data_uri = NULL;
*langs = NULL;
if (!doc)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Malformed xml");
return FALSE;
}
root = xmlDocGetRootElement (doc);
if (root && root->name && xmlStrcmp (root->name, (const xmlChar *)"OpenSearchDescription") == 0)
{
xmlNode *child;
for (child = root->children; child; child = child->next)
{
if (!child->name)
continue;
if (xmlStrcmp (child->name, (const xmlChar *)"Language") == 0)
{
xmlChar *val = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
if (!val)
continue;
*langs = g_list_append (*langs, g_strdup ((char *)val));
xmlFree (val);
}
if (!*name && xmlStrcmp (child->name, (const xmlChar *)"ShortName") == 0)
{
xmlChar *val = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
*name = g_strdup ((char *)val);
xmlFree (val);
}
if (!*icon_data_uri && xmlStrcmp (child->name, (const xmlChar *)"Image") == 0)
{
xmlChar *val = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
if (val)
*icon_data_uri = g_strdup ((char *)val);
xmlFree (val);
}
if (!*url && xmlStrcmp (child->name, (const xmlChar *)"Url") == 0)
{
xmlChar *template;
xmlChar *type;
type = xmlGetProp(child, (const xmlChar *)"type");
if (!type)
continue;
if (xmlStrcmp (type, (const xmlChar *)"text/html") != 0)
{
xmlFree (type);
continue;
}
xmlFree (type);
template = xmlGetProp(child, (const xmlChar *)"template");
if (!template)
continue;
*url = g_strdup ((char *)template);
xmlFree (template);
}
}
}
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Invalid OpenSearch document");
xmlFreeDoc (doc);
return FALSE;
}
xmlFreeDoc (doc);
if (*icon_data_uri && *name && *url)
return TRUE;
if (*icon_data_uri)
g_free (*icon_data_uri);
else
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"search provider doesn't have icon");
if (*name)
g_free (*name);
else if (error && !*error)
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"search provider doesn't have ShortName");
if (*url)
g_free (*url);
else if (error && !*error)
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"search provider doesn't have template for url");
if (*langs)
{
g_list_foreach (*langs, (GFunc)g_free, NULL);
g_list_free (*langs);
}
*url = NULL;
*name = NULL;
*icon_data_uri = NULL;
*langs = NULL;
return FALSE;
}

View File

@ -8,38 +8,16 @@
G_BEGIN_DECLS
char *shell_util_get_label_for_uri (const char *text_uri);
GIcon *shell_util_get_icon_for_uri (const char *text_uri);
GIcon *shell_util_icon_from_string (const char *string,
GError **error);
char *shell_util_get_label_for_uri (const char *text_uri);
GIcon *shell_util_get_icon_for_uri (const char *text_uri);
GIcon *shell_util_icon_from_string (const char *string, GError **error);
void shell_util_set_hidden_from_pick (ClutterActor *actor, gboolean hidden);
void shell_util_set_hidden_from_pick (ClutterActor *actor,
gboolean hidden);
void shell_util_get_transformed_allocation (ClutterActor *actor,
ClutterActorBox *box);
void shell_util_get_transformed_allocation (ClutterActor *actor,
ClutterActorBox *box);
char *shell_util_format_date (const char *format,
gint64 time_ms);
ClutterModifierType
shell_get_event_state (ClutterEvent *event);
gboolean shell_write_string_to_stream (GOutputStream *stream,
const char *str,
GError **error);
char *shell_get_file_contents_utf8_sync (const char *path,
GError **error);
void shell_breakpoint (void);
gboolean shell_parse_search_provider (const char *data,
char **name,
char **url,
GList **langs,
char **icon_data_uri,
GError **error);
char *shell_util_format_date (const char *format,
gint64 time_ms);
G_END_DECLS

View File

@ -41,6 +41,24 @@
* have it also track through startup-notification.
*/
/* Title patterns to detect apps that don't set WM class as needed.
* Format: application ID, title regex pattern, NULL (for GRegex) */
static struct
{
const char *app_id;
const char *pattern;
GRegex *regex;
} title_patterns[] = {
{"mozilla-firefox.desktop", ".* - Mozilla Firefox", NULL}, \
{"openoffice.org-writer.desktop", ".* - OpenOffice.org Writer$", NULL}, \
{"openoffice.org-calc.desktop", ".* - OpenOffice.org Calc$", NULL}, \
{"openoffice.org-impress.desktop", ".* - OpenOffice.org Impress$", NULL}, \
{"openoffice.org-draw.desktop", ".* - OpenOffice.org Draw$", NULL}, \
{"openoffice.org-base.desktop", ".* - OpenOffice.org Base$", NULL}, \
{"openoffice.org-math.desktop", ".* - OpenOffice.org Math$", NULL}, \
{NULL, NULL, NULL}
};
struct _ShellWindowTracker
{
GObject parent;
@ -142,6 +160,47 @@ shell_window_tracker_class_init (ShellWindowTrackerClass *klass)
G_TYPE_NONE, 0);
}
/**
* get_app_id_from_title:
*
* Use a window's "title" property to determine an application ID.
* This is a temporary crutch for a few applications until we get
* them correctly setting their WM_CLASS.
*/
static const char *
get_app_id_from_title (MetaWindow *window)
{
static gboolean patterns_initialized = FALSE;
const char *title;
int i;
title = meta_window_get_title (window);
if (!patterns_initialized) /* Generate match patterns once for all */
{
patterns_initialized = TRUE;
for (i = 0; title_patterns[i].app_id; i++)
{
title_patterns[i].regex = g_regex_new (title_patterns[i].pattern,
0, 0, NULL);
}
}
/* Match window title patterns to identifiers for non-standard apps */
if (title)
{
for (i = 0; title_patterns[i].app_id; i++)
{
if (g_regex_match (title_patterns[i].regex, title, 0, NULL))
{
/* Matched, return the app id we want */
return title_patterns[i].app_id;
}
}
}
return NULL;
}
/**
* get_appid_from_window:
*
@ -246,6 +305,14 @@ get_app_from_window_wmclass (MetaWindow *window)
app = shell_app_system_lookup_heuristic_basename (appsys, with_desktop);
g_free (with_desktop);
if (app == NULL)
{
const char *id = get_app_id_from_title (window);
if (id != NULL)
app = shell_app_system_get_app (appsys, id);
}
return app;
}
@ -413,30 +480,32 @@ _shell_window_tracker_get_app_context (ShellWindowTracker *tracker, ShellApp *ap
}
static void
update_focus_app (ShellWindowTracker *self)
on_transient_window_title_changed (MetaWindow *window,
GParamSpec *spec,
ShellWindowTracker *self)
{
MetaWindow *new_focus_win;
ShellApp *new_focus_app;
ShellAppSystem *appsys;
ShellApp *app;
const char *id;
new_focus_win = meta_display_get_focus_window (meta_screen_get_display (shell_global_get_screen (shell_global_get ())));
new_focus_app = new_focus_win ? shell_window_tracker_get_window_app (self, new_focus_win) : NULL;
/* Check if we now have a mapping using the window title */
id = get_app_id_from_title (window);
if (id == NULL)
return;
set_focus_app (self, new_focus_app);
}
appsys = shell_app_system_get_default ();
app = shell_app_system_get_app (appsys, id);
if (app == NULL)
return;
g_object_unref (app);
static void
on_wm_class_changed (MetaWindow *window,
GParamSpec *pspec,
gpointer user_data)
{
ShellWindowTracker *self = SHELL_WINDOW_TRACKER (user_data);
/* We found an app, don't listen for further title changes */
g_signal_handlers_disconnect_by_func (window, G_CALLBACK (on_transient_window_title_changed),
self);
/* It's simplest to just treat this as a remove + add. */
disassociate_window (self, window);
track_window (self, window);
/* also just recaulcuate the focused app, in case it was the focused
window that changed */
update_focus_app (self);
}
static void
@ -455,7 +524,15 @@ track_window (ShellWindowTracker *self,
/* At this point we've stored the association from window -> application */
g_hash_table_insert (self->window_to_app, window, app);
g_signal_connect (window, "notify::wm-class", G_CALLBACK (on_wm_class_changed), self);
if (shell_app_is_transient (app))
{
/* For a transient application, it's possible one of our title regexps
* will match at a later time, i.e. the application may not have set
* its title fully at the time it initially maps a window. Watch
* for title changes and recompute the app.
*/
g_signal_connect (window, "notify::title", G_CALLBACK (on_transient_window_title_changed), self);
}
_shell_app_add_window (app, window);
@ -487,10 +564,7 @@ disassociate_window (ShellWindowTracker *self,
g_hash_table_remove (self->window_to_app, window);
if (shell_window_tracker_is_window_interesting (window))
{
_shell_app_remove_window (app, window);
g_signal_handlers_disconnect_by_func (window, G_CALLBACK(on_wm_class_changed), self);
}
g_signal_emit (self, signals[TRACKED_WINDOWS_CHANGED], 0);
@ -635,11 +709,15 @@ static void
shell_window_tracker_finalize (GObject *object)
{
ShellWindowTracker *self = SHELL_WINDOW_TRACKER (object);
int i;
g_hash_table_destroy (self->running_apps);
g_hash_table_destroy (self->window_to_app);
g_hash_table_destroy (self->launched_pid_to_app);
for (i = 0; title_patterns[i].app_id; i++)
g_regex_unref (title_patterns[i].regex);
G_OBJECT_CLASS (shell_window_tracker_parent_class)->finalize(object);
}
@ -806,7 +884,13 @@ on_focus_window_changed (MetaDisplay *display,
GParamSpec *spec,
ShellWindowTracker *tracker)
{
update_focus_app (tracker);
MetaWindow *new_focus_win;
ShellApp *new_focus_app;
new_focus_win = meta_display_get_focus_window (display);
new_focus_app = new_focus_win ? shell_window_tracker_get_window_app (tracker, new_focus_win) : NULL;
set_focus_app (tracker, new_focus_app);
}
/**
@ -860,6 +944,7 @@ shell_startup_sequence_get_id (ShellStartupSequence *sequence)
ShellApp *
shell_startup_sequence_get_app (ShellStartupSequence *sequence)
{
#ifdef HAVE_SN_STARTUP_SEQUENCE_GET_APPLICATION_ID
const char *appid;
ShellAppSystem *appsys;
ShellApp *app;
@ -871,6 +956,9 @@ shell_startup_sequence_get_app (ShellStartupSequence *sequence)
appsys = shell_app_system_get_default ();
app = shell_app_system_get_app_for_path (appsys, appid);
return app;
#else
return NULL;
#endif
}
const char *

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