Compare commits
133 Commits
goa-client
...
3.1.3
Author | SHA1 | Date | |
---|---|---|---|
3581c1d5b4 | |||
64e7459d1c | |||
f71afa9248 | |||
1ebca2e6d5 | |||
6222796b6a | |||
dcecf41d18 | |||
9d1fbffe75 | |||
6a6ba94bb9 | |||
ef5de3a5c0 | |||
f042e43990 | |||
620330db8f | |||
3765acc0a5 | |||
2e8654b96c | |||
cc5c5e7e8a | |||
9c849b0290 | |||
ad314b362e | |||
737a4f2816 | |||
96e4128e3e | |||
6f515f2327 | |||
cbb9a7ab96 | |||
e2e3b29ed1 | |||
82a8ac1976 | |||
bfec396ec2 | |||
d0e7f880d7 | |||
ff81659b9e | |||
6b2b3475c8 | |||
ed8acefc00 | |||
737f395d6c | |||
ab0a5d4a53 | |||
9412ac2027 | |||
c8670819dc | |||
4132ccae33 | |||
c450120409 | |||
6ce07abf50 | |||
e39e539ee9 | |||
9563a8f8a0 | |||
d5f37fa280 | |||
5c6e5ef6d0 | |||
42adc38609 | |||
e5fadb3b42 | |||
4c5f3aa971 | |||
6fc49b79a4 | |||
9e804b082f | |||
1fb220beb7 | |||
1fc1282fad | |||
8834a7df10 | |||
a34071e1c3 | |||
52a342300a | |||
b9456caeb0 | |||
26aa4333a5 | |||
04d2b0d282 | |||
7def1a4aa5 | |||
001b9868fb | |||
59a3e393f9 | |||
b846354787 | |||
2674d96e54 | |||
0c98fe8546 | |||
f18ed3c6ae | |||
644acf7018 | |||
96dca48b3b | |||
1309b64c33 | |||
1301dee744 | |||
efc194e36c | |||
60f41a109f | |||
890efa787a | |||
60c88612f7 | |||
82648bc86c | |||
ea1e5a5210 | |||
aa03734d39 | |||
bb0f76f562 | |||
8c2a290d09 | |||
8e661c3780 | |||
a03b6c419a | |||
fb55dd677f | |||
408790a630 | |||
08371f073d | |||
e7289378b7 | |||
31bde574de | |||
5aacfe4e6e | |||
5cf7bdabfd | |||
2021edd1fb | |||
45c1a9eafb | |||
0ae1556b94 | |||
c0739bd1e3 | |||
af51e8df7b | |||
22ef63cc44 | |||
03a5133e8c | |||
7f2456c00d | |||
aa4dbee362 | |||
7b65735cc9 | |||
7ef35fbec7 | |||
8b10d85fee | |||
d99b1e6c09 | |||
57ab7aec5b | |||
29a221bf62 | |||
671c569a9e | |||
492c033760 | |||
33a3b8046d | |||
88df183450 | |||
6a9080c3d6 | |||
019670b5ab | |||
4cab0c95d3 | |||
d51e79d483 | |||
69a27911a7 | |||
dd48514b24 | |||
eb54662098 | |||
545f0432c8 | |||
fdefb317cb | |||
4e0c8bfe67 | |||
dbd629d5d2 | |||
619a44a499 | |||
c5ca4e3ff0 | |||
55771b437b | |||
8727680983 | |||
ab9f21351f | |||
0055cabc62 | |||
fc70c2246b | |||
f7b6acaff8 | |||
91caa8e59f | |||
4c44bb7f52 | |||
df8a735aa9 | |||
82aea3e8d6 | |||
a8baf4a2a2 | |||
bfd344cdec | |||
a0fd4e195d | |||
4b3fbc4c9b | |||
63b1699a35 | |||
48acc41698 | |||
17672accfe | |||
986d72d9de | |||
ffd461cdb4 | |||
71dfab9711 | |||
c4f5274d74 |
6
.gitignore
vendored
6
.gitignore
vendored
@ -3,6 +3,7 @@
|
|||||||
*.o
|
*.o
|
||||||
.deps
|
.deps
|
||||||
.libs
|
.libs
|
||||||
|
ABOUT-NLS
|
||||||
ChangeLog
|
ChangeLog
|
||||||
INSTALL
|
INSTALL
|
||||||
Makefile
|
Makefile
|
||||||
@ -29,8 +30,13 @@ m4/
|
|||||||
omf.make
|
omf.make
|
||||||
po/*.gmo
|
po/*.gmo
|
||||||
po/gnome-shell.pot
|
po/gnome-shell.pot
|
||||||
|
po/*.header
|
||||||
|
po/*.sed
|
||||||
|
po/*.sin
|
||||||
po/Makefile.in.in
|
po/Makefile.in.in
|
||||||
|
po/Makevars.template
|
||||||
po/POTFILES
|
po/POTFILES
|
||||||
|
po/Rules-quot
|
||||||
po/stamp-it
|
po/stamp-it
|
||||||
scripts/launcher.pyc
|
scripts/launcher.pyc
|
||||||
src/*.gir
|
src/*.gir
|
||||||
|
@ -3,5 +3,5 @@ E-mail: otaylor@redhat.com
|
|||||||
Userid: otaylor
|
Userid: otaylor
|
||||||
|
|
||||||
Colin Walters
|
Colin Walters
|
||||||
E-mail: walters@redhat.com
|
E-mail: walters@verbum.org
|
||||||
Userid: walters
|
Userid: walters
|
||||||
|
117
NEWS
117
NEWS
@ -1,3 +1,120 @@
|
|||||||
|
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]
|
||||||
|
- 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
|
||||||
|
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=649318
|
||||||
|
- Miscellaneous bug fixes
|
||||||
|
648648, 650124
|
||||||
|
* Fix duplicate icons in the application browser [Owen]
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=648739
|
||||||
|
* Make clicking anywhere on the volume icon slider work [Giovanni]
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=646660
|
||||||
|
* Fix a case where activating and clicking the hot corner
|
||||||
|
at the same time could result in immediately leaving the
|
||||||
|
overview [Rui]
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=649427
|
||||||
|
* Fix a case where applications became misordered in Alt-Tab [Jasper]
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=643302
|
||||||
|
* Fix a bug where messages you send could show up in
|
||||||
|
notifications as if someone else sent them [Jonny]
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=650219
|
||||||
|
* Memory leak fixes [Colin, Maxim]
|
||||||
|
642652, 649508, 649497
|
||||||
|
* Miscellaneous minor bug fixes [Adel, Christopher, Jasper]
|
||||||
|
649596, 648765, 648983, 649632
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Christopher Aillon, Giovanni Campagna, Maxim Ermilov,
|
||||||
|
Adel Gadllah, Jonny Lamb, Rui Matos, Jasper St. Pierre,
|
||||||
|
Owen Taylor, Colin Walters, Dan Williams
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Arash Mousavi [fa], Seán de Búrca [ga], Timo Jyrinki [fi],
|
||||||
|
Sigurd Gartmann [nb], Daniel Nylander [se], Peter Mráz [sl],
|
||||||
|
Abduxukur Abdurixit [ug], Nguyễn Thái Ngọc Duy [vi]
|
||||||
|
|
||||||
3.0.1
|
3.0.1
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
35
configure.ac
35
configure.ac
@ -1,5 +1,5 @@
|
|||||||
AC_PREREQ(2.63)
|
AC_PREREQ(2.63)
|
||||||
AC_INIT([gnome-shell],[3.0.1],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
|
AC_INIT([gnome-shell],[3.1.3],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_SRCDIR([src/shell-global.c])
|
AC_CONFIG_SRCDIR([src/shell-global.c])
|
||||||
@ -23,12 +23,16 @@ AM_PROG_CC_C_O
|
|||||||
LT_PREREQ([2.2.6])
|
LT_PREREQ([2.2.6])
|
||||||
LT_INIT([disable-static])
|
LT_INIT([disable-static])
|
||||||
|
|
||||||
|
# i18n
|
||||||
|
IT_PROG_INTLTOOL([0.40])
|
||||||
|
|
||||||
|
AM_GNU_GETTEXT([external])
|
||||||
|
AM_GNU_GETTEXT_VERSION([0.17])
|
||||||
|
|
||||||
GETTEXT_PACKAGE=gnome-shell
|
GETTEXT_PACKAGE=gnome-shell
|
||||||
AC_SUBST(GETTEXT_PACKAGE)
|
AC_SUBST(GETTEXT_PACKAGE)
|
||||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||||
[The prefix for our gettext translation domains.])
|
[The prefix for our gettext translation domains.])
|
||||||
IT_PROG_INTLTOOL(0.26)
|
|
||||||
AM_GLIB_GNU_GETTEXT
|
|
||||||
|
|
||||||
PKG_PROG_PKG_CONFIG([0.22])
|
PKG_PROG_PKG_CONFIG([0.22])
|
||||||
|
|
||||||
@ -68,11 +72,11 @@ GTK_MIN_VERSION=3.0.0
|
|||||||
GIO_MIN_VERSION=2.25.9
|
GIO_MIN_VERSION=2.25.9
|
||||||
LIBECAL_MIN_VERSION=2.32.0
|
LIBECAL_MIN_VERSION=2.32.0
|
||||||
LIBEDATASERVER_MIN_VERSION=1.2.0
|
LIBEDATASERVER_MIN_VERSION=1.2.0
|
||||||
LIBEDATASERVERUI2_MIN_VERSION=1.2.0
|
LIBEDATASERVERUI_MIN_VERSION=2.91.6
|
||||||
LIBEDATASERVERUI3_MIN_VERSION=2.91.6
|
TELEPATHY_GLIB_MIN_VERSION=0.15.0
|
||||||
TELEPATHY_GLIB_MIN_VERSION=0.13.12
|
|
||||||
TELEPATHY_LOGGER_MIN_VERSION=0.2.4
|
TELEPATHY_LOGGER_MIN_VERSION=0.2.4
|
||||||
POLKIT_MIN_VERSION=0.100
|
POLKIT_MIN_VERSION=0.100
|
||||||
|
STARTUP_NOTIFICATION_MIN_VERSION=0.11
|
||||||
|
|
||||||
# Collect more than 20 libraries for a prize!
|
# Collect more than 20 libraries for a prize!
|
||||||
PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION
|
PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION
|
||||||
@ -84,7 +88,7 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION
|
|||||||
gdk-x11-3.0
|
gdk-x11-3.0
|
||||||
clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
|
clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
|
||||||
clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
|
clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
|
||||||
libstartup-notification-1.0
|
libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
|
||||||
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
|
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
|
||||||
libcanberra
|
libcanberra
|
||||||
telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
|
telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
|
||||||
@ -111,8 +115,7 @@ saved_CFLAGS=$CFLAGS
|
|||||||
saved_LIBS=$LIBS
|
saved_LIBS=$LIBS
|
||||||
CFLAGS=$GNOME_SHELL_CFLAGS
|
CFLAGS=$GNOME_SHELL_CFLAGS
|
||||||
LIBS=$GNOME_SHELL_LIBS
|
LIBS=$GNOME_SHELL_LIBS
|
||||||
# sn_startup_sequence_get_application_id, we can replace with a version check later
|
AC_CHECK_FUNCS(JS_NewGlobalObject XFixesCreatePointerBarrier)
|
||||||
AC_CHECK_FUNCS(JS_NewGlobalObject sn_startup_sequence_get_application_id XFixesCreatePointerBarrier)
|
|
||||||
CFLAGS=$saved_CFLAGS
|
CFLAGS=$saved_CFLAGS
|
||||||
LIBS=$saved_LIBS
|
LIBS=$saved_LIBS
|
||||||
|
|
||||||
@ -123,9 +126,9 @@ PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
|
|||||||
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 0.1.7)
|
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 0.1.7)
|
||||||
|
|
||||||
AC_MSG_CHECKING([for bluetooth support])
|
AC_MSG_CHECKING([for bluetooth support])
|
||||||
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 2.90.0],
|
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
|
||||||
[BLUETOOTH_DIR=`$PKG_CONFIG --variable=libdir gnome-bluetooth-1.0`/gnome-bluetooth
|
[BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0`
|
||||||
BLUETOOTH_LIBS="-L'$BLUETOOTH_DIR' -lgnome-bluetooth-applet"
|
BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0`
|
||||||
AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"])
|
AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"])
|
||||||
AC_DEFINE_UNQUOTED([BLUETOOTH_DIR],["$BLUETOOTH_DIR"],[Path to installed GnomeBluetooth typelib and library])
|
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])
|
AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet])
|
||||||
@ -135,13 +138,7 @@ PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 2.90.0],
|
|||||||
AC_SUBST([HAVE_BLUETOOTH],[0])
|
AC_SUBST([HAVE_BLUETOOTH],[0])
|
||||||
AC_MSG_RESULT([no])])
|
AC_MSG_RESULT([no])])
|
||||||
|
|
||||||
# Default to libedataserverui-3.0, but allow falling back to 1.2
|
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)
|
||||||
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_CFLAGS)
|
||||||
AC_SUBST(CALENDAR_SERVER_LIBS)
|
AC_SUBST(CALENDAR_SERVER_LIBS)
|
||||||
|
|
||||||
|
@ -15,8 +15,18 @@
|
|||||||
<default>[]</default>
|
<default>[]</default>
|
||||||
<_summary>Uuids of extensions to disable</_summary>
|
<_summary>Uuids of extensions to disable</_summary>
|
||||||
<_description>
|
<_description>
|
||||||
GNOME Shell extensions have a uuid property;
|
GNOME Shell extensions have a uuid property; this key lists extensions
|
||||||
this key lists extensions which should not be loaded.
|
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.
|
||||||
</_description>
|
</_description>
|
||||||
</key>
|
</key>
|
||||||
<key name="enable-app-monitoring" type="b">
|
<key name="enable-app-monitoring" type="b">
|
||||||
|
@ -39,6 +39,11 @@ StScrollBar
|
|||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StScrollView.vfade
|
||||||
|
{
|
||||||
|
-st-vfade-offset: 68px;
|
||||||
|
}
|
||||||
|
|
||||||
StScrollView StScrollBar
|
StScrollView StScrollBar
|
||||||
{
|
{
|
||||||
min-width: 16px;
|
min-width: 16px;
|
||||||
@ -182,6 +187,7 @@ StTooltip StLabel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.popup-inactive-menu-item {
|
.popup-inactive-menu-item {
|
||||||
|
font-weight: normal;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,24 +2,62 @@
|
|||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
<svg
|
<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:svg="http://www.w3.org/2000/svg"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
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"
|
width="119.97824"
|
||||||
height="119.97824"
|
height="119.97824"
|
||||||
id="svg7355"
|
id="svg7355"
|
||||||
version="1.1">
|
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" />
|
||||||
<defs
|
<defs
|
||||||
id="defs7357">
|
id="defs7357">
|
||||||
<radialGradient
|
<radialGradient
|
||||||
xlink:href="#linearGradient36429"
|
xlink:href="#linearGradient36429"
|
||||||
id="radialGradient7461"
|
id="radialGradient7461"
|
||||||
gradientUnits="userSpaceOnUse"
|
gradientUnits="userSpaceOnUse"
|
||||||
gradientTransform="matrix(1.0525552,0,0,1.0525552,-2.5162753,-9.0000838)"
|
gradientTransform="matrix(1.011539,0,0,0.57582113,-0.39262194,71.83807)"
|
||||||
cx="47.878681"
|
cx="47.428951"
|
||||||
cy="171.25"
|
cy="167.16817"
|
||||||
fx="47.878681"
|
fx="47.428951"
|
||||||
fy="171.25"
|
fy="167.16817"
|
||||||
r="37" />
|
r="37" />
|
||||||
<linearGradient
|
<linearGradient
|
||||||
id="linearGradient36429">
|
id="linearGradient36429">
|
||||||
@ -59,7 +97,7 @@
|
|||||||
fx="49.067139"
|
fx="49.067139"
|
||||||
cy="242.50381"
|
cy="242.50381"
|
||||||
cx="49.067139"
|
cx="49.067139"
|
||||||
gradientTransform="matrix(1.1891549,0,0,0.55513246,-9.281289,36.12653)"
|
gradientTransform="matrix(1.1891549,0,0,0.15252127,-9.281289,132.52772)"
|
||||||
gradientUnits="userSpaceOnUse"
|
gradientUnits="userSpaceOnUse"
|
||||||
id="radialGradient7488"
|
id="radialGradient7488"
|
||||||
xlink:href="#linearGradient36471" />
|
xlink:href="#linearGradient36471" />
|
||||||
@ -72,19 +110,21 @@
|
|||||||
id="g30864"
|
id="g30864"
|
||||||
transform="translate(255.223,70.118091)">
|
transform="translate(255.223,70.118091)">
|
||||||
<rect
|
<rect
|
||||||
ry="3.5996203"
|
ry="3.4593496"
|
||||||
rx="3.5996203"
|
rx="3.4593496"
|
||||||
y="98"
|
y="99.596962"
|
||||||
x="11"
|
x="12.596948"
|
||||||
height="74"
|
height="71.116341"
|
||||||
width="74"
|
width="71.116341"
|
||||||
id="rect14000"
|
id="rect14000"
|
||||||
style="opacity:0.371875;fill:url(#radialGradient7461);fill-opacity:1;stroke:none" />
|
style="opacity:0.37187500000000001;fill:url(#radialGradient7461);fill-opacity:1;stroke:none" />
|
||||||
<path
|
<path
|
||||||
id="rect34520"
|
id="rect34520"
|
||||||
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"
|
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.2;fill:none;stroke:url(#radialGradient7488);stroke-width:1;stroke-opacity:1"
|
style="opacity:0.35;fill:none;stroke:url(#radialGradient7488);stroke-width:1;stroke-opacity:1"
|
||||||
inkscape:connector-curvature="0" />
|
connector-curvature="0"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccscc" />
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.9 KiB |
@ -13,8 +13,8 @@
|
|||||||
height="22"
|
height="22"
|
||||||
id="svg3199"
|
id="svg3199"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:version="0.47 r22583"
|
inkscape:version="0.48.1 r9760"
|
||||||
sodipodi:docname="New document 11">
|
sodipodi:docname="toggle-on-intl.svg">
|
||||||
<defs
|
<defs
|
||||||
id="defs3201">
|
id="defs3201">
|
||||||
<inkscape:perspective
|
<inkscape:perspective
|
||||||
@ -39,14 +39,14 @@
|
|||||||
borderopacity="1.0"
|
borderopacity="1.0"
|
||||||
inkscape:pageopacity="0.0"
|
inkscape:pageopacity="0.0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:zoom="0.35"
|
inkscape:zoom="1"
|
||||||
inkscape:cx="32.500004"
|
inkscape:cx="49.147112"
|
||||||
inkscape:cy="10.999997"
|
inkscape:cy="17.532036"
|
||||||
inkscape:document-units="px"
|
inkscape:document-units="px"
|
||||||
inkscape:current-layer="layer1"
|
inkscape:current-layer="layer1"
|
||||||
showgrid="false"
|
showgrid="false"
|
||||||
inkscape:window-width="609"
|
inkscape:window-width="1412"
|
||||||
inkscape:window-height="501"
|
inkscape:window-height="1067"
|
||||||
inkscape:window-x="0"
|
inkscape:window-x="0"
|
||||||
inkscape:window-y="26"
|
inkscape:window-y="26"
|
||||||
inkscape:window-maximized="0" />
|
inkscape:window-maximized="0" />
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:type
|
<dc:type
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
<dc:title></dc:title>
|
<dc:title />
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
</metadata>
|
</metadata>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
transform="translate(-453.5,448.36218)"
|
transform="translate(-453.5,448.36218)"
|
||||||
id="g16453">
|
id="g16453">
|
||||||
<rect
|
<rect
|
||||||
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"
|
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"
|
||||||
id="rect16256-9-4"
|
id="rect16256-9-4"
|
||||||
width="63.000004"
|
width="63.000004"
|
||||||
height="19"
|
height="19"
|
||||||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
@ -13,8 +13,8 @@
|
|||||||
height="22"
|
height="22"
|
||||||
id="svg2857"
|
id="svg2857"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:version="0.47 r22583"
|
inkscape:version="0.48.1 r9760"
|
||||||
sodipodi:docname="New document 2">
|
sodipodi:docname="toggle-on-us.svg">
|
||||||
<defs
|
<defs
|
||||||
id="defs2859">
|
id="defs2859">
|
||||||
<inkscape:perspective
|
<inkscape:perspective
|
||||||
@ -40,16 +40,18 @@
|
|||||||
inkscape:pageopacity="0.0"
|
inkscape:pageopacity="0.0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:zoom="1"
|
inkscape:zoom="1"
|
||||||
inkscape:cx="-69.642856"
|
inkscape:cx="19.689855"
|
||||||
inkscape:cy="42.428569"
|
inkscape:cy="2.0517979"
|
||||||
inkscape:document-units="px"
|
inkscape:document-units="px"
|
||||||
inkscape:current-layer="layer1"
|
inkscape:current-layer="layer1"
|
||||||
showgrid="false"
|
showgrid="false"
|
||||||
inkscape:window-width="609"
|
inkscape:window-width="941"
|
||||||
inkscape:window-height="501"
|
inkscape:window-height="751"
|
||||||
inkscape:window-x="0"
|
inkscape:window-x="2577"
|
||||||
inkscape:window-y="26"
|
inkscape:window-y="206"
|
||||||
inkscape:window-maximized="0" />
|
inkscape:window-maximized="0"
|
||||||
|
borderlayer="true"
|
||||||
|
inkscape:showpageshadow="false" />
|
||||||
<metadata
|
<metadata
|
||||||
id="metadata2862">
|
id="metadata2862">
|
||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
@ -58,7 +60,7 @@
|
|||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:type
|
<dc:type
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
<dc:title></dc:title>
|
<dc:title />
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
</metadata>
|
</metadata>
|
||||||
@ -72,7 +74,7 @@
|
|||||||
transform="translate(-351.35714,708.36218)"
|
transform="translate(-351.35714,708.36218)"
|
||||||
id="g16453">
|
id="g16453">
|
||||||
<rect
|
<rect
|
||||||
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"
|
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"
|
||||||
id="rect16256-9-4"
|
id="rect16256-9-4"
|
||||||
width="63.000004"
|
width="63.000004"
|
||||||
height="19"
|
height="19"
|
||||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.8 KiB |
@ -109,7 +109,8 @@ const SessionManagerIface = {
|
|||||||
name: 'org.gnome.SessionManager',
|
name: 'org.gnome.SessionManager',
|
||||||
methods: [
|
methods: [
|
||||||
{ name: 'Logout', inSignature: 'u', outSignature: '' },
|
{ name: 'Logout', inSignature: 'u', outSignature: '' },
|
||||||
{ name: 'Shutdown', inSignature: '', outSignature: '' }
|
{ name: 'Shutdown', inSignature: '', outSignature: '' },
|
||||||
|
{ name: 'CanShutdown', inSignature: '', outSignature: 'b' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ function spawn(argv) {
|
|||||||
// occur when trying to parse or start the program.
|
// occur when trying to parse or start the program.
|
||||||
function spawnCommandLine(command_line) {
|
function spawnCommandLine(command_line) {
|
||||||
try {
|
try {
|
||||||
let [success, argc, argv] = GLib.shell_parse_argv(command_line);
|
let [success, argv] = GLib.shell_parse_argv(command_line);
|
||||||
trySpawn(argv);
|
trySpawn(argv);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
_handleSpawnError(command_line, err);
|
_handleSpawnError(command_line, err);
|
||||||
@ -85,10 +85,10 @@ function trySpawn(argv)
|
|||||||
// Runs @command_line in the background. If launching @command_line
|
// Runs @command_line in the background. If launching @command_line
|
||||||
// fails, this will throw an error.
|
// fails, this will throw an error.
|
||||||
function trySpawnCommandLine(command_line) {
|
function trySpawnCommandLine(command_line) {
|
||||||
let success, argc, argv;
|
let success, argv;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
[success, argc, argv] = GLib.shell_parse_argv(command_line);
|
[success, argv] = GLib.shell_parse_argv(command_line);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Replace "Error invoking GLib.shell_parse_argv: " with
|
// Replace "Error invoking GLib.shell_parse_argv: " with
|
||||||
// something nicer
|
// something nicer
|
||||||
|
@ -97,8 +97,6 @@ AltTabPopup.prototype = {
|
|||||||
// those calculations
|
// those calculations
|
||||||
if (this._thumbnails) {
|
if (this._thumbnails) {
|
||||||
let icon = this._appIcons[this._currentApp].actor;
|
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 [posX, posY] = icon.get_transformed_position();
|
||||||
let thumbnailCenter = posX + icon.width / 2;
|
let thumbnailCenter = posX + icon.width / 2;
|
||||||
let [childMinWidth, childNaturalWidth] = this._thumbnails.actor.get_preferred_width(-1);
|
let [childMinWidth, childNaturalWidth] = this._thumbnails.actor.get_preferred_width(-1);
|
||||||
@ -219,33 +217,21 @@ AltTabPopup.prototype = {
|
|||||||
|
|
||||||
this._disableHover();
|
this._disableHover();
|
||||||
|
|
||||||
if (action == Meta.KeyBindingAction.SWITCH_GROUP)
|
if (keysym == Clutter.Escape) {
|
||||||
this._select(this._currentApp, backwards ? this._previousWindow() : this._nextWindow());
|
|
||||||
else if (keysym == Clutter.Escape)
|
|
||||||
this.destroy();
|
this.destroy();
|
||||||
else if (this._thumbnailsFocused) {
|
} else if (action == Meta.KeyBindingAction.SWITCH_GROUP) {
|
||||||
if (action == Meta.KeyBindingAction.SWITCH_WINDOWS)
|
this._select(this._currentApp, backwards ? this._previousWindow() : this._nextWindow());
|
||||||
if (backwards) {
|
} else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS) {
|
||||||
if (this._currentWindow == 0 || this._currentWindow == -1)
|
this._select(backwards ? this._previousApp() : this._nextApp());
|
||||||
this._select(this._previousApp());
|
} else if (this._thumbnailsFocused) {
|
||||||
else
|
if (keysym == Clutter.Left)
|
||||||
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());
|
this._select(this._currentApp, this._previousWindow());
|
||||||
else if (keysym == Clutter.Right)
|
else if (keysym == Clutter.Right)
|
||||||
this._select(this._currentApp, this._nextWindow());
|
this._select(this._currentApp, this._nextWindow());
|
||||||
else if (keysym == Clutter.Up)
|
else if (keysym == Clutter.Up)
|
||||||
this._select(this._currentApp, null, true);
|
this._select(this._currentApp, null, true);
|
||||||
} else {
|
} else {
|
||||||
if (action == Meta.KeyBindingAction.SWITCH_WINDOWS)
|
if (keysym == Clutter.Left)
|
||||||
this._select(backwards ? this._previousApp() : this._nextApp());
|
|
||||||
else if (keysym == Clutter.Left)
|
|
||||||
this._select(this._previousApp());
|
this._select(this._previousApp());
|
||||||
else if (keysym == Clutter.Right)
|
else if (keysym == Clutter.Right)
|
||||||
this._select(this._nextApp());
|
this._select(this._nextApp());
|
||||||
|
@ -44,7 +44,7 @@ AlphabeticalView.prototype = {
|
|||||||
this.actor = new St.ScrollView({ x_fill: true,
|
this.actor = new St.ScrollView({ x_fill: true,
|
||||||
y_fill: false,
|
y_fill: false,
|
||||||
y_align: St.Align.START,
|
y_align: St.Align.START,
|
||||||
vfade: true });
|
style_class: 'vfade' });
|
||||||
this.actor.add_actor(box);
|
this.actor.add_actor(box);
|
||||||
this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
this.actor.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
||||||
this.actor.connect('notify::mapped', Lang.bind(this,
|
this.actor.connect('notify::mapped', Lang.bind(this,
|
||||||
|
@ -14,7 +14,6 @@ const Params = imports.misc.params;
|
|||||||
// workspace content.
|
// workspace content.
|
||||||
|
|
||||||
const defaultParams = {
|
const defaultParams = {
|
||||||
visibleInOverview: false,
|
|
||||||
visibleInFullscreen: false,
|
visibleInFullscreen: false,
|
||||||
affectsStruts: true,
|
affectsStruts: true,
|
||||||
affectsInputRegion: true
|
affectsInputRegion: true
|
||||||
@ -73,11 +72,8 @@ Chrome.prototype = {
|
|||||||
// in its visibility will affect the input region, but NOT the
|
// in its visibility will affect the input region, but NOT the
|
||||||
// struts.
|
// struts.
|
||||||
//
|
//
|
||||||
// If %visibleInOverview is %true in @params, @actor will remain
|
// If %visibleInFullscreen is %true, the actor will be visible
|
||||||
// visible when the overview is brought up. Otherwise it will
|
// even when a fullscreen window should be covering it.
|
||||||
// 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
|
// If %affectsStruts or %affectsInputRegion is %false, the actor
|
||||||
// will not have the indicated effect.
|
// will not have the indicated effect.
|
||||||
@ -96,7 +92,7 @@ Chrome.prototype = {
|
|||||||
//
|
//
|
||||||
// @params can have any of the same values as in addActor(), though
|
// @params can have any of the same values as in addActor(), though
|
||||||
// some possibilities don't make sense (eg, trying to have a
|
// some possibilities don't make sense (eg, trying to have a
|
||||||
// %visibleInOverview child of a non-%visibleInOverview parent).
|
// %visibleInFullscreen child of a non-%visibleInFullscreen parent).
|
||||||
// By default, @actor has the same params as its chrome ancestor.
|
// By default, @actor has the same params as its chrome ancestor.
|
||||||
trackActor: function(actor, params) {
|
trackActor: function(actor, params) {
|
||||||
let ancestor = actor.get_parent();
|
let ancestor = actor.get_parent();
|
||||||
@ -189,9 +185,7 @@ Chrome.prototype = {
|
|||||||
_updateVisibility: function() {
|
_updateVisibility: function() {
|
||||||
for (let i = 0; i < this._trackedActors.length; i++) {
|
for (let i = 0; i < this._trackedActors.length; i++) {
|
||||||
let actorData = this._trackedActors[i];
|
let actorData = this._trackedActors[i];
|
||||||
if (this._inOverview && !actorData.visibleInOverview)
|
if (!this._inOverview && !actorData.visibleInFullscreen &&
|
||||||
this.actor.set_skip_paint(actorData.actor, true);
|
|
||||||
else if (!this._inOverview && !actorData.visibleInFullscreen &&
|
|
||||||
this._findMonitorForActor(actorData.actor).inFullscreen)
|
this._findMonitorForActor(actorData.actor).inFullscreen)
|
||||||
this.actor.set_skip_paint(actorData.actor, true);
|
this.actor.set_skip_paint(actorData.actor, true);
|
||||||
else
|
else
|
||||||
@ -335,11 +329,6 @@ Chrome.prototype = {
|
|||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
this._queueUpdateRegions();
|
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() {
|
_updateRegions: function() {
|
||||||
|
@ -324,7 +324,7 @@ Dash.prototype = {
|
|||||||
this._favRemoveTarget = null;
|
this._favRemoveTarget = null;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
DND.removeMonitor(this._dragMonitor);
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onDragMotion: function(dragEvent) {
|
_onDragMotion: function(dragEvent) {
|
||||||
@ -342,7 +342,10 @@ Dash.prototype = {
|
|||||||
|
|
||||||
let srcIsFavorite = (id in favorites);
|
let srcIsFavorite = (id in favorites);
|
||||||
|
|
||||||
if (srcIsFavorite && this._favRemoveTarget == null) {
|
if (srcIsFavorite &&
|
||||||
|
dragEvent.source.actor &&
|
||||||
|
this.actor.contains (dragEvent.source.actor) &&
|
||||||
|
this._favRemoveTarget == null) {
|
||||||
this._favRemoveTarget = new RemoveFavoriteIcon();
|
this._favRemoveTarget = new RemoveFavoriteIcon();
|
||||||
this._favRemoveTarget.icon.setIconSize(this.iconSize);
|
this._favRemoveTarget.icon.setIconSize(this.iconSize);
|
||||||
this._box.add(this._favRemoveTarget.actor);
|
this._box.add(this._favRemoveTarget.actor);
|
||||||
|
@ -198,6 +198,7 @@ DateMenuButton.prototype = {
|
|||||||
|
|
||||||
_onPreferencesActivate: function() {
|
_onPreferencesActivate: function() {
|
||||||
this.menu.close();
|
this.menu.close();
|
||||||
|
Main.overview.hide();
|
||||||
let app = Shell.AppSystem.get_default().get_app('gnome-datetime-panel.desktop');
|
let app = Shell.AppSystem.get_default().get_app('gnome-datetime-panel.desktop');
|
||||||
app.activate(-1);
|
app.activate(-1);
|
||||||
},
|
},
|
||||||
|
@ -61,7 +61,7 @@ function addDragMonitor(monitor) {
|
|||||||
dragMonitors.push(monitor);
|
dragMonitors.push(monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeMonitor(monitor) {
|
function removeDragMonitor(monitor) {
|
||||||
for (let i = 0; i < dragMonitors.length; i++)
|
for (let i = 0; i < dragMonitors.length; i++)
|
||||||
if (dragMonitors[i] == monitor) {
|
if (dragMonitors[i] == monitor) {
|
||||||
dragMonitors.splice(i, 1);
|
dragMonitors.splice(i, 1);
|
||||||
@ -284,13 +284,13 @@ _Draggable.prototype = {
|
|||||||
this._dragOffsetY = actorStageY - this._dragStartY;
|
this._dragOffsetY = actorStageY - this._dragStartY;
|
||||||
|
|
||||||
// Set the actor's scale such that it will keep the same
|
// Set the actor's scale such that it will keep the same
|
||||||
// transformed size when it's reparented to the stage
|
// transformed size when it's reparented to the uiGroup
|
||||||
let [scaledWidth, scaledHeight] = this.actor.get_transformed_size();
|
let [scaledWidth, scaledHeight] = this.actor.get_transformed_size();
|
||||||
this.actor.set_scale(scaledWidth / this.actor.width,
|
this.actor.set_scale(scaledWidth / this.actor.width,
|
||||||
scaledHeight / this.actor.height);
|
scaledHeight / this.actor.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._dragActor.reparent(this.actor.get_stage());
|
this._dragActor.reparent(Main.uiGroup);
|
||||||
this._dragActor.raise_top();
|
this._dragActor.raise_top();
|
||||||
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
Shell.util_set_hidden_from_pick(this._dragActor, true);
|
||||||
|
|
||||||
@ -442,7 +442,7 @@ _Draggable.prototype = {
|
|||||||
return true;
|
return true;
|
||||||
// If it accepted the drop without taking the actor,
|
// If it accepted the drop without taking the actor,
|
||||||
// handle it ourselves.
|
// handle it ourselves.
|
||||||
if (this._dragActor.get_parent() == this._dragActor.get_stage()) {
|
if (this._dragActor.get_parent() == Main.uiGroup) {
|
||||||
if (this._restoreOnSuccess) {
|
if (this._restoreOnSuccess) {
|
||||||
this._restoreDragActor(event.get_time());
|
this._restoreDragActor(event.get_time());
|
||||||
return true;
|
return true;
|
||||||
|
@ -39,35 +39,6 @@ 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() {
|
function init() {
|
||||||
// Add some bindings to the global JS namespace; (gjs keeps the web
|
// Add some bindings to the global JS namespace; (gjs keeps the web
|
||||||
// browser convention of having that namespace be called 'window'.)
|
// browser convention of having that namespace be called 'window'.)
|
||||||
@ -99,17 +70,6 @@ function init() {
|
|||||||
return base;
|
return base;
|
||||||
};
|
};
|
||||||
|
|
||||||
_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;
|
|
||||||
|
|
||||||
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=508783
|
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=508783
|
||||||
Date.prototype.toLocaleFormat = function(format) {
|
Date.prototype.toLocaleFormat = function(format) {
|
||||||
return Shell.util_format_date(format, this.getTime());
|
return Shell.util_format_date(format, this.getTime());
|
||||||
|
@ -23,8 +23,9 @@ const ExtensionType = {
|
|||||||
const extensionMeta = {};
|
const extensionMeta = {};
|
||||||
// Maps uuid -> importer object (extension directory tree)
|
// Maps uuid -> importer object (extension directory tree)
|
||||||
const extensions = {};
|
const extensions = {};
|
||||||
// Array of uuids
|
// Arrays of uuids
|
||||||
var disabledExtensions;
|
var disabledExtensions;
|
||||||
|
var enabledExtensions;
|
||||||
// GFile for user extensions
|
// GFile for user extensions
|
||||||
var userExtensionsDir = null;
|
var userExtensionsDir = null;
|
||||||
|
|
||||||
@ -178,6 +179,7 @@ function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
disabledExtensions = global.settings.get_strv('disabled-extensions', -1);
|
disabledExtensions = global.settings.get_strv('disabled-extensions', -1);
|
||||||
|
enabledExtensions = global.settings.get_strv('enabled-extensions', -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _loadExtensionsIn(dir, type) {
|
function _loadExtensionsIn(dir, type) {
|
||||||
@ -195,7 +197,10 @@ function _loadExtensionsIn(dir, type) {
|
|||||||
if (fileType != Gio.FileType.DIRECTORY)
|
if (fileType != Gio.FileType.DIRECTORY)
|
||||||
continue;
|
continue;
|
||||||
let name = info.get_name();
|
let name = info.get_name();
|
||||||
let enabled = disabledExtensions.indexOf(name) < 0;
|
// 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 child = dir.get_child(name);
|
let child = dir.get_child(name);
|
||||||
loadExtension(child, enabled, type);
|
loadExtension(child, enabled, type);
|
||||||
}
|
}
|
||||||
|
@ -582,6 +582,53 @@ 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() {
|
function Extensions() {
|
||||||
this._init();
|
this._init();
|
||||||
}
|
}
|
||||||
@ -764,6 +811,9 @@ LookingGlass.prototype = {
|
|||||||
this._errorLog = new ErrorLog();
|
this._errorLog = new ErrorLog();
|
||||||
notebook.appendPage('Errors', this._errorLog.actor);
|
notebook.appendPage('Errors', this._errorLog.actor);
|
||||||
|
|
||||||
|
this._memory = new Memory();
|
||||||
|
notebook.appendPage('Memory', this._memory.actor);
|
||||||
|
|
||||||
this._extensions = new Extensions();
|
this._extensions = new Extensions();
|
||||||
notebook.appendPage('Extensions', this._extensions.actor);
|
notebook.appendPage('Extensions', this._extensions.actor);
|
||||||
|
|
||||||
|
@ -208,6 +208,7 @@ function start() {
|
|||||||
|
|
||||||
global.screen.connect('window-entered-monitor', _windowEnteredMonitor);
|
global.screen.connect('window-entered-monitor', _windowEnteredMonitor);
|
||||||
global.screen.connect('window-left-monitor', _windowLeftMonitor);
|
global.screen.connect('window-left-monitor', _windowLeftMonitor);
|
||||||
|
global.screen.connect('restacked', _windowsRestacked);
|
||||||
|
|
||||||
_nWorkspacesChanged();
|
_nWorkspacesChanged();
|
||||||
}
|
}
|
||||||
@ -310,6 +311,13 @@ function _windowEnteredMonitor(metaScreen, monitorIndex, metaWin) {
|
|||||||
_queueCheckWorkspaces();
|
_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() {
|
function _queueCheckWorkspaces() {
|
||||||
if (_checkWorkspacesId == 0)
|
if (_checkWorkspacesId == 0)
|
||||||
_checkWorkspacesId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, _checkWorkspaces);
|
_checkWorkspacesId = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, _checkWorkspaces);
|
||||||
@ -393,12 +401,21 @@ function setThemeStylesheet(cssStylesheet)
|
|||||||
*/
|
*/
|
||||||
function loadTheme() {
|
function loadTheme() {
|
||||||
let themeContext = St.ThemeContext.get_for_stage (global.stage);
|
let themeContext = St.ThemeContext.get_for_stage (global.stage);
|
||||||
|
let previousTheme = themeContext.get_theme();
|
||||||
|
|
||||||
let cssStylesheet = _defaultCssStylesheet;
|
let cssStylesheet = _defaultCssStylesheet;
|
||||||
if (_cssStylesheet != null)
|
if (_cssStylesheet != null)
|
||||||
cssStylesheet = _cssStylesheet;
|
cssStylesheet = _cssStylesheet;
|
||||||
|
|
||||||
let theme = new St.Theme ({ application_stylesheet: 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);
|
themeContext.set_theme (theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -557,7 +557,7 @@ Notification.prototype = {
|
|||||||
this._scrollArea = new St.ScrollView({ name: 'notification-scrollview',
|
this._scrollArea = new St.ScrollView({ name: 'notification-scrollview',
|
||||||
vscrollbar_policy: this._scrollPolicy,
|
vscrollbar_policy: this._scrollPolicy,
|
||||||
hscrollbar_policy: Gtk.PolicyType.NEVER,
|
hscrollbar_policy: Gtk.PolicyType.NEVER,
|
||||||
vfade: true });
|
style_class: 'vfade' });
|
||||||
this._table.add(this._scrollArea, { row: 1, col: 1 });
|
this._table.add(this._scrollArea, { row: 1, col: 1 });
|
||||||
this._contentArea = new St.BoxLayout({ name: 'notification-body',
|
this._contentArea = new St.BoxLayout({ name: 'notification-body',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
@ -829,6 +829,7 @@ Notification.prototype = {
|
|||||||
// Restore banner opacity in case the notification is shown in the
|
// Restore banner opacity in case the notification is shown in the
|
||||||
// banner mode again on update.
|
// banner mode again on update.
|
||||||
this._bannerLabel.opacity = 255;
|
this._bannerLabel.opacity = 255;
|
||||||
|
this.emit('collapsed');
|
||||||
},
|
},
|
||||||
|
|
||||||
_onActionInvoked: function(actor, mouseButtonClicked, id) {
|
_onActionInvoked: function(actor, mouseButtonClicked, id) {
|
||||||
@ -893,6 +894,11 @@ Source.prototype = {
|
|||||||
this.isTransient = isTransient;
|
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).
|
// Called to create a new icon actor (of size this.ICON_SIZE).
|
||||||
// Must be overridden by the subclass if you do not pass icons
|
// Must be overridden by the subclass if you do not pass icons
|
||||||
// explicitly to the Notification() constructor.
|
// explicitly to the Notification() constructor.
|
||||||
@ -995,6 +1001,11 @@ SummaryItem.prototype = {
|
|||||||
this._sourceTitleBin.child = this._sourceTitle;
|
this._sourceTitleBin.child = this._sourceTitle;
|
||||||
this._sourceTitleBin.width = 0;
|
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._sourceIcon, { y_fill: false });
|
||||||
this._sourceBox.add(this._sourceTitleBin, { expand: true, y_fill: false });
|
this._sourceBox.add(this._sourceTitleBin, { expand: true, y_fill: false });
|
||||||
this.actor.child = this._sourceBox;
|
this.actor.child = this._sourceBox;
|
||||||
@ -1002,7 +1013,7 @@ SummaryItem.prototype = {
|
|||||||
this.notificationStackView = new St.ScrollView({ name: source.isChat ? '' : 'summary-notification-stack-scrollview',
|
this.notificationStackView = new St.ScrollView({ name: source.isChat ? '' : 'summary-notification-stack-scrollview',
|
||||||
vscrollbar_policy: source.isChat ? Gtk.PolicyType.NEVER : Gtk.PolicyType.AUTOMATIC,
|
vscrollbar_policy: source.isChat ? Gtk.PolicyType.NEVER : Gtk.PolicyType.AUTOMATIC,
|
||||||
hscrollbar_policy: Gtk.PolicyType.NEVER,
|
hscrollbar_policy: Gtk.PolicyType.NEVER,
|
||||||
vfade: true });
|
style_class: 'vfade' });
|
||||||
this.notificationStack = new St.BoxLayout({ name: 'summary-notification-stack',
|
this.notificationStack = new St.BoxLayout({ name: 'summary-notification-stack',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
this.notificationStackView.add_actor(this.notificationStack);
|
this.notificationStackView.add_actor(this.notificationStack);
|
||||||
@ -1242,7 +1253,7 @@ MessageTray.prototype = {
|
|||||||
this._reNotifyAfterHideNotification = null;
|
this._reNotifyAfterHideNotification = null;
|
||||||
|
|
||||||
Main.chrome.addActor(this.actor, { affectsStruts: false,
|
Main.chrome.addActor(this.actor, { affectsStruts: false,
|
||||||
visibleInOverview: true });
|
visibleInFullscreen: true });
|
||||||
Main.chrome.trackActor(this._notificationBin);
|
Main.chrome.trackActor(this._notificationBin);
|
||||||
Main.chrome.trackActor(this._summaryBoxPointer.actor);
|
Main.chrome.trackActor(this._summaryBoxPointer.actor);
|
||||||
|
|
||||||
@ -1605,6 +1616,8 @@ MessageTray.prototype = {
|
|||||||
this._clickedSummaryItemMouseButton != button) {
|
this._clickedSummaryItemMouseButton != button) {
|
||||||
this._clickedSummaryItem = summaryItem;
|
this._clickedSummaryItem = summaryItem;
|
||||||
this._clickedSummaryItemMouseButton = button;
|
this._clickedSummaryItemMouseButton = button;
|
||||||
|
|
||||||
|
summaryItem.source.emit('summary-item-clicked', button);
|
||||||
} else {
|
} else {
|
||||||
this._unsetClickedSummaryItem();
|
this._unsetClickedSummaryItem();
|
||||||
}
|
}
|
||||||
@ -2013,7 +2026,13 @@ MessageTray.prototype = {
|
|||||||
|
|
||||||
_onNotificationExpanded: function() {
|
_onNotificationExpanded: function() {
|
||||||
let expandedY = this.actor.height - this._notificationBin.height;
|
let expandedY = this.actor.height - this._notificationBin.height;
|
||||||
if (this._notificationBin.y != expandedY)
|
|
||||||
|
// 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)
|
||||||
this._tween(this._notificationBin, '_notificationState', State.SHOWN,
|
this._tween(this._notificationBin, '_notificationState', State.SHOWN,
|
||||||
{ y: expandedY,
|
{ y: expandedY,
|
||||||
time: ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
|
@ -165,8 +165,11 @@ NotificationDaemon.prototype = {
|
|||||||
// with a transient one from the same sender, so we
|
// with a transient one from the same sender, so we
|
||||||
// always create a new source object for new transient notifications
|
// always create a new source object for new transient notifications
|
||||||
// and never add it to this._sources .
|
// and never add it to this._sources .
|
||||||
if (!isForTransientNotification && this._sources[pid])
|
if (!isForTransientNotification && this._sources[pid]) {
|
||||||
return this._sources[pid];
|
let source = this._sources[pid];
|
||||||
|
source.setTitle(title);
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
let source = new Source(title, pid);
|
let source = new Source(title, pid);
|
||||||
source.setTransient(isForTransientNotification);
|
source.setTransient(isForTransientNotification);
|
||||||
|
@ -220,7 +220,7 @@ Overview.prototype = {
|
|||||||
}
|
}
|
||||||
this._resetWindowSwitchTimeout();
|
this._resetWindowSwitchTimeout();
|
||||||
this._lastHoveredWindow = null;
|
this._lastHoveredWindow = null;
|
||||||
DND.removeMonitor(this._dragMonitor);
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
this.endItemDrag();
|
this.endItemDrag();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -281,7 +281,8 @@ Overview.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onButtonPress: function(actor, event) {
|
_onButtonPress: function(actor, event) {
|
||||||
if (this._scrollDirection == SwipeScrollDirection.NONE)
|
if (this._scrollDirection == SwipeScrollDirection.NONE
|
||||||
|
|| event.get_button() != 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let [stageX, stageY] = event.get_coords();
|
let [stageX, stageY] = event.get_coords();
|
||||||
|
@ -302,6 +302,7 @@ AppMenuButton.prototype = {
|
|||||||
|
|
||||||
this._visible = true;
|
this._visible = true;
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
|
this.actor.reactive = true;
|
||||||
|
|
||||||
if (!this._targetIsCurrent)
|
if (!this._targetIsCurrent)
|
||||||
return;
|
return;
|
||||||
@ -318,6 +319,7 @@ AppMenuButton.prototype = {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
this._visible = false;
|
this._visible = false;
|
||||||
|
this.actor.reactive = false;
|
||||||
if (!this._targetIsCurrent) {
|
if (!this._targetIsCurrent) {
|
||||||
this.actor.hide();
|
this.actor.hide();
|
||||||
return;
|
return;
|
||||||
@ -706,7 +708,7 @@ HotCorner.prototype = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Main.chrome.addActor(this.actor, { visibleInOverview: true, affectsStruts: false });
|
Main.chrome.addActor(this.actor, { affectsStruts: false });
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
@ -774,7 +776,7 @@ HotCorner.prototype = {
|
|||||||
_onCornerClicked : function() {
|
_onCornerClicked : function() {
|
||||||
if (!Main.overview.animationInProgress)
|
if (!Main.overview.animationInProgress)
|
||||||
this.maybeToggleOverviewOnClick();
|
this.maybeToggleOverviewOnClick();
|
||||||
return false;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onCornerLeft : function(actor, event) {
|
_onCornerLeft : function(actor, event) {
|
||||||
@ -1002,12 +1004,10 @@ Panel.prototype = {
|
|||||||
this.button.checked = false;
|
this.button.checked = false;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Main.chrome.addActor(this.actor, { visibleInOverview: true });
|
Main.chrome.addActor(this.actor);
|
||||||
Main.chrome.addActor(this._leftCorner.actor, { visibleInOverview: true,
|
Main.chrome.addActor(this._leftCorner.actor, { affectsStruts: false,
|
||||||
affectsStruts: false,
|
|
||||||
affectsInputRegion: false });
|
affectsInputRegion: false });
|
||||||
Main.chrome.addActor(this._rightCorner.actor, { visibleInOverview: true,
|
Main.chrome.addActor(this._rightCorner.actor, { affectsStruts: false,
|
||||||
affectsStruts: false,
|
|
||||||
affectsInputRegion: false });
|
affectsInputRegion: false });
|
||||||
|
|
||||||
Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here',
|
Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here',
|
||||||
|
@ -26,8 +26,7 @@ Button.prototype = {
|
|||||||
this.menu = new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, 0);
|
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.connect('open-state-changed', Lang.bind(this, this._onOpenStateChanged));
|
||||||
this.menu.actor.connect('key-press-event', Lang.bind(this, this._onMenuKeyPress));
|
this.menu.actor.connect('key-press-event', Lang.bind(this, this._onMenuKeyPress));
|
||||||
Main.chrome.addActor(this.menu.actor, { visibleInOverview: true,
|
Main.chrome.addActor(this.menu.actor, { affectsStruts: false });
|
||||||
affectsStruts: false });
|
|
||||||
this.menu.actor.hide();
|
this.menu.actor.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -268,10 +268,7 @@ PlacesManager.prototype = {
|
|||||||
if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS))
|
if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath);
|
let bookmarksContent = Shell.get_file_contents_utf8_sync(this._bookmarksPath);
|
||||||
|
|
||||||
if (!success)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let bookmarks = bookmarksContent.split('\n');
|
let bookmarks = bookmarksContent.split('\n');
|
||||||
|
|
||||||
|
@ -704,11 +704,36 @@ PopupSwitchMenuItem.prototype = {
|
|||||||
this._switch = new Switch(active);
|
this._switch = new Switch(active);
|
||||||
|
|
||||||
this.addActor(this.label);
|
this.addActor(this.label);
|
||||||
this.addActor(this._switch.actor, { align: St.Align.END });
|
|
||||||
|
|
||||||
this.connect('activate', Lang.bind(this,function(from) {
|
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.toggle();
|
this.toggle();
|
||||||
}));
|
}
|
||||||
|
|
||||||
|
PopupBaseMenuItem.prototype.activate.call(this, event);
|
||||||
},
|
},
|
||||||
|
|
||||||
toggle: function() {
|
toggle: function() {
|
||||||
|
@ -23,6 +23,10 @@ const HISTORY_KEY = 'command-history';
|
|||||||
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
|
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
|
||||||
const DISABLE_COMMAND_LINE_KEY = 'disable-command-line';
|
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;
|
const DIALOG_GROW_TIME = 0.1;
|
||||||
|
|
||||||
function CommandCompleter() {
|
function CommandCompleter() {
|
||||||
@ -169,6 +173,7 @@ __proto__: ModalDialog.ModalDialog.prototype,
|
|||||||
ModalDialog.ModalDialog.prototype._init.call(this, { styleClass: 'run-dialog' });
|
ModalDialog.ModalDialog.prototype._init.call(this, { styleClass: 'run-dialog' });
|
||||||
|
|
||||||
this._lockdownSettings = new Gio.Settings({ schema: LOCKDOWN_SCHEMA });
|
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 () {
|
global.settings.connect('changed::development-tools', Lang.bind(this, function () {
|
||||||
this._enableInternalCommands = global.settings.get_boolean('development-tools');
|
this._enableInternalCommands = global.settings.get_boolean('development-tools');
|
||||||
}));
|
}));
|
||||||
@ -189,7 +194,7 @@ __proto__: ModalDialog.ModalDialog.prototype,
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
'debugexit': Lang.bind(this, function() {
|
'debugexit': Lang.bind(this, function() {
|
||||||
Meta.exit(Meta.ExitCode.ERROR);
|
Meta.quit(Meta.ExitCode.ERROR);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// rt is short for "reload theme"
|
// rt is short for "reload theme"
|
||||||
@ -309,8 +314,11 @@ __proto__: ModalDialog.ModalDialog.prototype,
|
|||||||
f();
|
f();
|
||||||
} else if (input) {
|
} else if (input) {
|
||||||
try {
|
try {
|
||||||
if (inTerminal)
|
if (inTerminal) {
|
||||||
command = 'gnome-terminal -x ' + input;
|
let exec = this._terminalSettings.get_string(EXEC_KEY);
|
||||||
|
let exec_arg = this._terminalSettings.get_string(EXEC_ARG_KEY);
|
||||||
|
command = exec + ' ' + exec_arg + ' ' + input;
|
||||||
|
}
|
||||||
Util.trySpawnCommandLine(command);
|
Util.trySpawnCommandLine(command);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Mmmh, that failed - see if @input matches an existing file
|
// Mmmh, that failed - see if @input matches an existing file
|
||||||
|
@ -157,7 +157,7 @@ SearchProvider.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getResultInfo:
|
* getResultMeta:
|
||||||
* @id: Result identifier string
|
* @id: Result identifier string
|
||||||
*
|
*
|
||||||
* Return an object with 'id', 'name', (both strings) and 'createIcon'
|
* Return an object with 'id', 'name', (both strings) and 'createIcon'
|
||||||
|
@ -28,6 +28,7 @@ SearchResult.prototype = {
|
|||||||
x_align: St.Align.START,
|
x_align: St.Align.START,
|
||||||
y_fill: true });
|
y_fill: true });
|
||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
|
this._dragActorSource = null;
|
||||||
|
|
||||||
let content = provider.createResultActor(metaInfo, terms);
|
let content = provider.createResultActor(metaInfo, terms);
|
||||||
if (content == null) {
|
if (content == null) {
|
||||||
@ -37,7 +38,11 @@ SearchResult.prototype = {
|
|||||||
let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
|
let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
|
||||||
{ createIcon: this.metaInfo['createIcon'] });
|
{ createIcon: this.metaInfo['createIcon'] });
|
||||||
content.set_child(icon.actor);
|
content.set_child(icon.actor);
|
||||||
|
this._dragActorSource = icon.icon;
|
||||||
this.actor.label_actor = icon.label;
|
this.actor.label_actor = icon.label;
|
||||||
|
} else {
|
||||||
|
if (content._delegate && content._delegate.getDragActorSource)
|
||||||
|
this._dragActorSource = content._delegate.getDragActorSource();
|
||||||
}
|
}
|
||||||
this._content = content;
|
this._content = content;
|
||||||
this.actor.set_child(content);
|
this.actor.set_child(content);
|
||||||
@ -76,6 +81,8 @@ SearchResult.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getDragActorSource: function() {
|
getDragActorSource: function() {
|
||||||
|
if (this._dragActorSource)
|
||||||
|
return this._dragActorSource;
|
||||||
// not exactly right, but alignment problems are hard to notice
|
// not exactly right, but alignment problems are hard to notice
|
||||||
return this._content;
|
return this._content;
|
||||||
},
|
},
|
||||||
@ -192,7 +199,7 @@ SearchResults.prototype = {
|
|||||||
|
|
||||||
let scrollView = new St.ScrollView({ x_fill: true,
|
let scrollView = new St.ScrollView({ x_fill: true,
|
||||||
y_fill: false,
|
y_fill: false,
|
||||||
vfade: true });
|
style_class: 'vfade' });
|
||||||
scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
scrollView.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
|
||||||
scrollView.add_actor(this._content);
|
scrollView.add_actor(this._content);
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ const Shell = imports.gi.Shell;
|
|||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const Main = imports.ui.main;
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
@ -88,6 +89,7 @@ ATIndicator.prototype = {
|
|||||||
|
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
this.menu.addAction(_("Universal Access Settings"), function() {
|
this.menu.addAction(_("Universal Access Settings"), function() {
|
||||||
|
Main.overview.hide();
|
||||||
let app = Shell.AppSystem.get_default().get_app('gnome-universal-access-panel.desktop');
|
let app = Shell.AppSystem.get_default().get_app('gnome-universal-access-panel.desktop');
|
||||||
app.activate(-1);
|
app.activate(-1);
|
||||||
});
|
});
|
||||||
|
@ -90,6 +90,7 @@ Indicator.prototype = {
|
|||||||
this._updateFullMenu();
|
this._updateFullMenu();
|
||||||
|
|
||||||
this.menu.addAction(_("Bluetooth Settings"), function() {
|
this.menu.addAction(_("Bluetooth Settings"), function() {
|
||||||
|
Main.overview.hide()
|
||||||
let app = Shell.AppSystem.get_default().get_app('bluetooth-properties.desktop');
|
let app = Shell.AppSystem.get_default().get_app('bluetooth-properties.desktop');
|
||||||
app.activate(-1);
|
app.activate(-1);
|
||||||
});
|
});
|
||||||
@ -108,7 +109,11 @@ Indicator.prototype = {
|
|||||||
current_state != GnomeBluetoothApplet.KillswitchState.HARD_BLOCKED;
|
current_state != GnomeBluetoothApplet.KillswitchState.HARD_BLOCKED;
|
||||||
|
|
||||||
this._killswitch.setToggleState(on);
|
this._killswitch.setToggleState(on);
|
||||||
this._killswitch.actor.reactive = can_toggle;
|
if (can_toggle)
|
||||||
|
this._killswitch.setStatus(null);
|
||||||
|
else
|
||||||
|
/* TRANSLATORS: this means that bluetooth was disabled by hardware rfkill */
|
||||||
|
this._killswitch.setStatus(_("hardware disabled"));
|
||||||
|
|
||||||
if (has_adapter)
|
if (has_adapter)
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
@ -210,14 +215,15 @@ Indicator.prototype = {
|
|||||||
if (device.can_connect) {
|
if (device.can_connect) {
|
||||||
item._connected = device.connected;
|
item._connected = device.connected;
|
||||||
item._connectedMenuitem = new PopupMenu.PopupSwitchMenuItem(_("Connection"), device.connected);
|
item._connectedMenuitem = new PopupMenu.PopupSwitchMenuItem(_("Connection"), device.connected);
|
||||||
|
|
||||||
item._connectedMenuitem.connect('toggled', Lang.bind(this, function() {
|
item._connectedMenuitem.connect('toggled', Lang.bind(this, function() {
|
||||||
if (item._connected > ConnectionState.CONNECTED) {
|
if (item._connected > ConnectionState.CONNECTED) {
|
||||||
// operation already in progress, revert
|
// operation already in progress, revert
|
||||||
|
// (should not happen anyway)
|
||||||
menuitem.setToggleState(menuitem.state);
|
menuitem.setToggleState(menuitem.state);
|
||||||
}
|
}
|
||||||
if (item._connected) {
|
if (item._connected) {
|
||||||
item._connected = ConnectionState.DISCONNECTING;
|
item._connected = ConnectionState.DISCONNECTING;
|
||||||
|
menuitem.setStatus(_("disconnecting..."));
|
||||||
this._applet.disconnect_device(item._device.device_path, function(applet, success) {
|
this._applet.disconnect_device(item._device.device_path, function(applet, success) {
|
||||||
if (success) { // apply
|
if (success) { // apply
|
||||||
item._connected = ConnectionState.DISCONNECTED;
|
item._connected = ConnectionState.DISCONNECTED;
|
||||||
@ -226,9 +232,11 @@ Indicator.prototype = {
|
|||||||
item._connected = ConnectionState.CONNECTED;
|
item._connected = ConnectionState.CONNECTED;
|
||||||
menuitem.setToggleState(true);
|
menuitem.setToggleState(true);
|
||||||
}
|
}
|
||||||
|
menuitem.setStatus(null);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
item._connected = ConnectionState.CONNECTING;
|
item._connected = ConnectionState.CONNECTING;
|
||||||
|
menuitem.setStatus(_("connecting..."));
|
||||||
this._applet.connect_device(item._device.device_path, function(applet, success) {
|
this._applet.connect_device(item._device.device_path, function(applet, success) {
|
||||||
if (success) { // apply
|
if (success) { // apply
|
||||||
item._connected = ConnectionState.CONNECTED;
|
item._connected = ConnectionState.CONNECTED;
|
||||||
@ -237,6 +245,7 @@ Indicator.prototype = {
|
|||||||
item._connected = ConnectionState.DISCONNECTED;
|
item._connected = ConnectionState.DISCONNECTED;
|
||||||
menuitem.setToggleState(false);
|
menuitem.setToggleState(false);
|
||||||
}
|
}
|
||||||
|
menuitem.setStatus(null);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
@ -9,6 +9,7 @@ const Lang = imports.lang;
|
|||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const Main = imports.ui.main;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
@ -68,9 +69,11 @@ XKBIndicator.prototype = {
|
|||||||
|
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
this.menu.addAction(_("Show Keyboard Layout..."), Lang.bind(this, function() {
|
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)]);
|
Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
|
||||||
}));
|
}));
|
||||||
this.menu.addAction(_("Localization Settings"), function() {
|
this.menu.addAction(_("Localization Settings"), function() {
|
||||||
|
Main.overview.hide();
|
||||||
let app = Shell.AppSystem.get_default().get_app('gnome-region-panel.desktop');
|
let app = Shell.AppSystem.get_default().get_app('gnome-region-panel.desktop');
|
||||||
app.activate(-1);
|
app.activate(-1);
|
||||||
});
|
});
|
||||||
|
@ -192,63 +192,7 @@ NMNetworkMenuItem.prototype = {
|
|||||||
apObj.updateId = 0;
|
apObj.updateId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PopupMenu.PopupImageMenuItem.prototype.destroy.call(this);
|
PopupMenu.PopupBaseMenuItem.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);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -257,7 +201,13 @@ function NMWiredSectionTitleMenuItem() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NMWiredSectionTitleMenuItem.prototype = {
|
NMWiredSectionTitleMenuItem.prototype = {
|
||||||
__proto__: NMDeviceTitleMenuItem.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);
|
||||||
|
},
|
||||||
|
|
||||||
updateForDevice: function(device) {
|
updateForDevice: function(device) {
|
||||||
if (device) {
|
if (device) {
|
||||||
@ -269,7 +219,7 @@ NMWiredSectionTitleMenuItem.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
activate: function(event) {
|
activate: function(event) {
|
||||||
NMDeviceTitleMenuItem.prototype.activate.call(this, event);
|
PopupMenu.PopupSwitchMenuItem.prototype.activate.call(this, event);
|
||||||
|
|
||||||
if (!this._device) {
|
if (!this._device) {
|
||||||
log('Section title activated when there is more than one device, should be non reactive');
|
log('Section title activated when there is more than one device, should be non reactive');
|
||||||
@ -295,10 +245,12 @@ function NMWirelessSectionTitleMenuItem() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NMWirelessSectionTitleMenuItem.prototype = {
|
NMWirelessSectionTitleMenuItem.prototype = {
|
||||||
__proto__: NMDeviceTitleMenuItem.prototype,
|
__proto__: PopupMenu.PopupSwitchMenuItem.prototype,
|
||||||
|
|
||||||
_init: function(client, property, title, params) {
|
_init: function(client, property, title, params) {
|
||||||
NMDeviceTitleMenuItem.prototype._init.call(this, title, params);
|
params = params || { };
|
||||||
|
params.style_class = 'popup-subtitle-menu-item';
|
||||||
|
PopupMenu.PopupSwitchMenuItem.prototype._init.call(this, title, false, params);
|
||||||
|
|
||||||
this._client = client;
|
this._client = client;
|
||||||
this._property = property + '_enabled';
|
this._property = property + '_enabled';
|
||||||
@ -324,7 +276,7 @@ NMWirelessSectionTitleMenuItem.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
activate: function(event) {
|
activate: function(event) {
|
||||||
NMDeviceTitleMenuItem.prototype.activate.call(this, event);
|
PopupMenu.PopupSwitchMenuItem.prototype.activate.call(this, event);
|
||||||
|
|
||||||
this._client[this._setEnabledFunc](this._switch.state);
|
this._client[this._setEnabledFunc](this._switch.state);
|
||||||
},
|
},
|
||||||
@ -373,15 +325,14 @@ NMDevice.prototype = {
|
|||||||
};
|
};
|
||||||
this._connections.push(obj);
|
this._connections.push(obj);
|
||||||
}
|
}
|
||||||
this._connections.sort(function(one, two) {
|
this._connections.sort(this._connectionSortFunction);
|
||||||
return two.timestamp - one.timestamp;
|
|
||||||
});
|
|
||||||
this._activeConnection = null;
|
this._activeConnection = null;
|
||||||
this._activeConnectionItem = null;
|
this._activeConnectionItem = null;
|
||||||
this._autoConnectionItem = null;
|
this._autoConnectionItem = null;
|
||||||
|
this._overflowItem = null;
|
||||||
|
|
||||||
if (this.device) {
|
if (this.device) {
|
||||||
this.statusItem = new NMDeviceTitleMenuItem(this._getDescription());
|
this.statusItem = new PopupMenu.PopupSwitchMenuItem(this._getDescription(), this.connected, { style_class: 'popup-subtitle-menu-item' });
|
||||||
this._statusChanged = this.statusItem.connect('toggled', Lang.bind(this, function(item, state) {
|
this._statusChanged = this.statusItem.connect('toggled', Lang.bind(this, function(item, state) {
|
||||||
if (state)
|
if (state)
|
||||||
this.activate();
|
this.activate();
|
||||||
@ -482,9 +433,7 @@ NMDevice.prototype = {
|
|||||||
timestamp: connection._timestamp,
|
timestamp: connection._timestamp,
|
||||||
};
|
};
|
||||||
this._connections.push(obj);
|
this._connections.push(obj);
|
||||||
this._connections.sort(function(one, two) {
|
this._connections.sort(this._connectionSortFunction);
|
||||||
return two.timestamp - one.timestamp;
|
|
||||||
});
|
|
||||||
|
|
||||||
this._clearSection();
|
this._clearSection();
|
||||||
this._createSection();
|
this._createSection();
|
||||||
@ -519,6 +468,13 @@ NMDevice.prototype = {
|
|||||||
return this.device.connection_valid(connection);
|
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) {
|
setEnabled: function(enabled) {
|
||||||
// do nothing by default, we want to keep the conneciton list visible
|
// do nothing by default, we want to keep the conneciton list visible
|
||||||
// in the majority of cases (wired, wwan, vpn)
|
// in the majority of cases (wired, wwan, vpn)
|
||||||
@ -526,11 +482,15 @@ NMDevice.prototype = {
|
|||||||
|
|
||||||
getStatusLabel: function() {
|
getStatusLabel: function() {
|
||||||
switch(this.device.state) {
|
switch(this.device.state) {
|
||||||
case NetworkManager.DeviceState.UNMANAGED:
|
|
||||||
case NetworkManager.DeviceState.DISCONNECTED:
|
case NetworkManager.DeviceState.DISCONNECTED:
|
||||||
case NetworkManager.DeviceState.DEACTIVATING:
|
|
||||||
case NetworkManager.DeviceState.ACTIVATED:
|
case NetworkManager.DeviceState.ACTIVATED:
|
||||||
return null;
|
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.PREPARE:
|
||||||
case NetworkManager.DeviceState.CONFIG:
|
case NetworkManager.DeviceState.CONFIG:
|
||||||
case NetworkManager.DeviceState.IP_CONFIG:
|
case NetworkManager.DeviceState.IP_CONFIG:
|
||||||
@ -589,6 +549,7 @@ NMDevice.prototype = {
|
|||||||
this.section.removeAll();
|
this.section.removeAll();
|
||||||
this._autoConnectionItem = null;
|
this._autoConnectionItem = null;
|
||||||
this._activeConnectionItem = null;
|
this._activeConnectionItem = null;
|
||||||
|
this._overflowItem = null;
|
||||||
for (let i = 0; i < this._connections.length; i++) {
|
for (let i = 0; i < this._connections.length; i++) {
|
||||||
this._connections[i].item = null;
|
this._connections[i].item = null;
|
||||||
}
|
}
|
||||||
@ -607,12 +568,22 @@ NMDevice.prototype = {
|
|||||||
this.section.addMenuItem(this._activeConnectionItem);
|
this.section.addMenuItem(this._activeConnectionItem);
|
||||||
}
|
}
|
||||||
if (this._connections.length > 0) {
|
if (this._connections.length > 0) {
|
||||||
|
let activeOffset = this._activeConnectionItem ? 1 : 0;
|
||||||
|
|
||||||
for(let j = 0; j < this._connections.length; ++j) {
|
for(let j = 0; j < this._connections.length; ++j) {
|
||||||
let obj = this._connections[j];
|
let obj = this._connections[j];
|
||||||
if (this._activeConnection &&
|
if (this._activeConnection &&
|
||||||
obj.connection == this._activeConnection._connection)
|
obj.connection == this._activeConnection._connection)
|
||||||
continue;
|
continue;
|
||||||
obj.item = this._createConnectionItem(obj);
|
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) {
|
} else if (this._autoConnectionName) {
|
||||||
@ -821,7 +792,7 @@ NMDeviceModem.prototype = {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
NMDevice.prototype._init.call(this, client, device, connections, 1);
|
NMDevice.prototype._init.call(this, client, device, connections);
|
||||||
},
|
},
|
||||||
|
|
||||||
setEnabled: function(enabled) {
|
setEnabled: function(enabled) {
|
||||||
@ -838,7 +809,7 @@ NMDeviceModem.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
get connected() {
|
get connected() {
|
||||||
return this._enabled && this.device.state == NetworkManager.DeviceState.CONNECTED;
|
return this._enabled && this.device.state == NetworkManager.DeviceState.ACTIVATED;
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
@ -1512,7 +1483,7 @@ NMDeviceWireless.prototype = {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
if (position < NUM_VISIBLE_NETWORKS)
|
if (position < NUM_VISIBLE_NETWORKS)
|
||||||
this.section.addMenuItem(apObj.item);
|
this.section.addMenuItem(apObj.item, position);
|
||||||
else {
|
else {
|
||||||
if (!this._overflowItem) {
|
if (!this._overflowItem) {
|
||||||
this._overflowItem = new PopupMenu.PopupSubMenuMenuItem(_("More..."));
|
this._overflowItem = new PopupMenu.PopupSubMenuMenuItem(_("More..."));
|
||||||
@ -1613,6 +1584,7 @@ NMApplet.prototype = {
|
|||||||
this.menu.addMenuItem(this._devices.vpn.section);
|
this.menu.addMenuItem(this._devices.vpn.section);
|
||||||
|
|
||||||
this.menu.addAction(_("Network Settings"), function() {
|
this.menu.addAction(_("Network Settings"), function() {
|
||||||
|
Main.overview.hide();
|
||||||
let app = Shell.AppSystem.get_default().get_app('gnome-network-panel.desktop');
|
let app = Shell.AppSystem.get_default().get_app('gnome-network-panel.desktop');
|
||||||
app.activate(-1);
|
app.activate(-1);
|
||||||
});
|
});
|
||||||
@ -1691,21 +1663,18 @@ NMApplet.prototype = {
|
|||||||
|
|
||||||
_syncSectionTitle: function(category) {
|
_syncSectionTitle: function(category) {
|
||||||
let devices = this._devices[category].devices;
|
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 item = this._devices[category].item;
|
||||||
let section = this._devices[category].section;
|
let section = this._devices[category].section;
|
||||||
if (managedDevices.length == 0)
|
if (devices.length == 0)
|
||||||
section.actor.hide();
|
section.actor.hide();
|
||||||
else {
|
else {
|
||||||
section.actor.show();
|
section.actor.show();
|
||||||
if (managedDevices.length == 1) {
|
if (devices.length == 1) {
|
||||||
let dev = managedDevices[0];
|
let dev = devices[0];
|
||||||
dev.statusItem.actor.hide();
|
dev.statusItem.actor.hide();
|
||||||
item.updateForDevice(dev);
|
item.updateForDevice(dev);
|
||||||
} else {
|
} else {
|
||||||
managedDevices.forEach(function(dev) {
|
devices.forEach(function(dev) {
|
||||||
dev.statusItem.actor.show();
|
dev.statusItem.actor.show();
|
||||||
});
|
});
|
||||||
// remove status text from the section title item
|
// remove status text from the section title item
|
||||||
|
@ -7,6 +7,7 @@ const Mainloop = imports.mainloop;
|
|||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const Main = imports.ui.main;
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
@ -80,6 +81,7 @@ Indicator.prototype = {
|
|||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
|
|
||||||
this.menu.addAction(_("Power Settings"),function() {
|
this.menu.addAction(_("Power Settings"),function() {
|
||||||
|
Main.overview.hide();
|
||||||
let app = Shell.AppSystem.get_default().get_app('gnome-power-panel.desktop');
|
let app = Shell.AppSystem.get_default().get_app('gnome-power-panel.desktop');
|
||||||
app.activate(-1);
|
app.activate(-1);
|
||||||
});
|
});
|
||||||
|
@ -9,6 +9,7 @@ const Gvc = imports.gi.Gvc;
|
|||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const Main = imports.ui.main;
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const Util = imports.misc.util;
|
const Util = imports.misc.util;
|
||||||
@ -61,6 +62,7 @@ Indicator.prototype = {
|
|||||||
|
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
this.menu.addAction(_("Sound Settings"), function() {
|
this.menu.addAction(_("Sound Settings"), function() {
|
||||||
|
Main.overview.hide();
|
||||||
let app = Shell.AppSystem.get_default().get_app('gnome-sound-panel.desktop');
|
let app = Shell.AppSystem.get_default().get_app('gnome-sound-panel.desktop');
|
||||||
app.activate(-1);
|
app.activate(-1);
|
||||||
});
|
});
|
||||||
|
@ -26,7 +26,8 @@ const DISABLE_LOG_OUT_KEY = 'disable-log-out';
|
|||||||
|
|
||||||
const ScreenSaverInterface = {
|
const ScreenSaverInterface = {
|
||||||
name: BUS_NAME,
|
name: BUS_NAME,
|
||||||
methods: [ { name: 'Lock', inSignature: '' } ]
|
methods: [ { name: 'Lock', inSignature: '' },
|
||||||
|
{ name: 'SetActive', inSignature: 'b' }]
|
||||||
};
|
};
|
||||||
|
|
||||||
let ScreenSaverProxy = DBus.makeProxyClass(ScreenSaverInterface);
|
let ScreenSaverProxy = DBus.makeProxyClass(ScreenSaverInterface);
|
||||||
@ -57,6 +58,7 @@ StatusMenuButton.prototype = {
|
|||||||
this._presence = new GnomeSession.Presence();
|
this._presence = new GnomeSession.Presence();
|
||||||
this._presenceItems = {};
|
this._presenceItems = {};
|
||||||
this._session = new GnomeSession.SessionManager();
|
this._session = new GnomeSession.SessionManager();
|
||||||
|
this._haveShutdown = true;
|
||||||
|
|
||||||
this._account_mgr = Tp.AccountManager.dup()
|
this._account_mgr = Tp.AccountManager.dup()
|
||||||
|
|
||||||
@ -89,12 +91,25 @@ StatusMenuButton.prototype = {
|
|||||||
Lang.bind(this, this._updateSwitchUser));
|
Lang.bind(this, this._updateSwitchUser));
|
||||||
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
|
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
|
||||||
Lang.bind(this, this._updateLogout));
|
Lang.bind(this, this._updateLogout));
|
||||||
|
|
||||||
this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY,
|
this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY,
|
||||||
Lang.bind(this, this._updateLockScreen));
|
Lang.bind(this, this._updateLockScreen));
|
||||||
this._updateSwitchUser();
|
this._updateSwitchUser();
|
||||||
this._updateLogout();
|
this._updateLogout();
|
||||||
this._updateLockScreen();
|
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));
|
this._upClient.connect('notify::can-suspend', Lang.bind(this, this._updateSuspendOrPowerOff));
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -111,13 +126,25 @@ StatusMenuButton.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateSessionSeparator: function() {
|
_updateSessionSeparator: function() {
|
||||||
let showSeparator = this._loginScreenItem.actor.visible ||
|
let sessionItemsVisible = this._loginScreenItem.actor.visible ||
|
||||||
this._logoutItem.actor.visible ||
|
this._logoutItem.actor.visible ||
|
||||||
this._lockScreenItem.actor.visible;
|
this._lockScreenItem.actor.visible;
|
||||||
if (showSeparator)
|
|
||||||
|
let showSessionSeparator = sessionItemsVisible &&
|
||||||
|
this._suspendOrPowerOffItem.actor.visible;
|
||||||
|
|
||||||
|
let showSettingsSeparator = sessionItemsVisible ||
|
||||||
|
this._suspendOrPowerOffItem.actor.visible;
|
||||||
|
|
||||||
|
if (showSessionSeparator)
|
||||||
this._sessionSeparator.actor.show();
|
this._sessionSeparator.actor.show();
|
||||||
else
|
else
|
||||||
this._sessionSeparator.actor.hide();
|
this._sessionSeparator.actor.hide();
|
||||||
|
|
||||||
|
if (showSettingsSeparator)
|
||||||
|
this._settingsSeparator.actor.show();
|
||||||
|
else
|
||||||
|
this._settingsSeparator.actor.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateSwitchUser: function() {
|
_updateSwitchUser: function() {
|
||||||
@ -147,16 +174,34 @@ StatusMenuButton.prototype = {
|
|||||||
this._updateSessionSeparator();
|
this._updateSessionSeparator();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_updateHaveShutdown: function() {
|
||||||
|
this._session.CanShutdownRemote(Lang.bind(this,
|
||||||
|
function(result, error) {
|
||||||
|
if (!error) {
|
||||||
|
this._haveShutdown = result;
|
||||||
|
this._updateSuspendOrPowerOff();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
_updateSuspendOrPowerOff: function() {
|
_updateSuspendOrPowerOff: function() {
|
||||||
this._haveSuspend = this._upClient.get_can_suspend();
|
this._haveSuspend = this._upClient.get_can_suspend();
|
||||||
|
|
||||||
if (!this._suspendOrPowerOffItem)
|
if (!this._suspendOrPowerOffItem)
|
||||||
return;
|
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
|
// If we can't suspend show Power Off... instead
|
||||||
// and disable the alt key
|
// and disable the alt key
|
||||||
if (!this._haveSuspend) {
|
if (!this._haveSuspend) {
|
||||||
this._suspendOrPowerOffItem.updateText(_("Power Off..."), null);
|
this._suspendOrPowerOffItem.updateText(_("Power Off..."), null);
|
||||||
|
} else if (!this._haveShutdown) {
|
||||||
|
this._suspendOrPowerOffItem.updateText(_("Suspend"), null);
|
||||||
} else {
|
} else {
|
||||||
this._suspendOrPowerOffItem.updateText(_("Suspend"), _("Power Off..."));
|
this._suspendOrPowerOffItem.updateText(_("Suspend"), _("Power Off..."));
|
||||||
}
|
}
|
||||||
@ -202,6 +247,7 @@ StatusMenuButton.prototype = {
|
|||||||
|
|
||||||
item = new PopupMenu.PopupSeparatorMenuItem();
|
item = new PopupMenu.PopupSeparatorMenuItem();
|
||||||
this.menu.addMenuItem(item);
|
this.menu.addMenuItem(item);
|
||||||
|
this._settingsSeparator = item;
|
||||||
|
|
||||||
item = new PopupMenu.PopupMenuItem(_("Lock Screen"));
|
item = new PopupMenu.PopupMenuItem(_("Lock Screen"));
|
||||||
item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
|
item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
|
||||||
@ -269,7 +315,7 @@ StatusMenuButton.prototype = {
|
|||||||
|
|
||||||
if (this._haveSuspend &&
|
if (this._haveSuspend &&
|
||||||
this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
|
this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
|
||||||
this._screenSaverProxy.LockRemote(Lang.bind(this, function() {
|
this._screenSaverProxy.SetActiveRemote(true, Lang.bind(this, function() {
|
||||||
this._upClient.suspend_sync(null);
|
this._upClient.suspend_sync(null);
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
|
@ -77,14 +77,20 @@ Client.prototype = {
|
|||||||
// The second argument, recover, means _observeChannels will be run
|
// The second argument, recover, means _observeChannels will be run
|
||||||
// for any existing channel as well.
|
// for any existing channel as well.
|
||||||
let dbus = Tp.DBusDaemon.dup();
|
let dbus = Tp.DBusDaemon.dup();
|
||||||
this._observer = Shell.TpClient.new(dbus);
|
this._tpClient = new Shell.TpClient({ 'dbus_daemon': dbus,
|
||||||
this._observer.set_observe_channels_func(
|
'name': 'GnomeShell',
|
||||||
|
'uniquify-name': true })
|
||||||
|
this._tpClient.set_observe_channels_func(
|
||||||
Lang.bind(this, this._observeChannels));
|
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));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this._observer.register();
|
this._tpClient.register();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error('Couldn\'t register SimpleObserver. Error: \n' + e);
|
throw new Error('Couldn\'t register Telepathy client. Error: \n' + e);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -97,7 +103,7 @@ Client.prototype = {
|
|||||||
this._finishObserveChannels(account, conn, channels, context);
|
this._finishObserveChannels(account, conn, channels, context);
|
||||||
} else {
|
} else {
|
||||||
Shell.get_self_contact_features(conn,
|
Shell.get_self_contact_features(conn,
|
||||||
contactFeatures.length, contactFeatures,
|
contactFeatures,
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
this._finishObserveChannels(account, conn, channels, context);
|
this._finishObserveChannels(account, conn, channels, context);
|
||||||
}));
|
}));
|
||||||
@ -117,8 +123,8 @@ Client.prototype = {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Request a TpContact */
|
/* Request a TpContact */
|
||||||
Shell.get_tp_contacts(conn, 1, [targetHandle],
|
Shell.get_tp_contacts(conn, [targetHandle],
|
||||||
contactFeatures.length, contactFeatures,
|
contactFeatures,
|
||||||
Lang.bind(this, function (connection, contacts, failed) {
|
Lang.bind(this, function (connection, contacts, failed) {
|
||||||
if (contacts.length < 1)
|
if (contacts.length < 1)
|
||||||
return;
|
return;
|
||||||
@ -135,30 +141,82 @@ Client.prototype = {
|
|||||||
if (this._sources[channel.get_object_path()])
|
if (this._sources[channel.get_object_path()])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let source = new Source(account, conn, channel, contact);
|
let source = new Source(account, conn, channel, contact, this._tpClient);
|
||||||
|
|
||||||
this._sources[channel.get_object_path()] = source;
|
this._sources[channel.get_object_path()] = source;
|
||||||
source.connect('destroy', Lang.bind(this,
|
source.connect('destroy', Lang.bind(this,
|
||||||
function() {
|
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()];
|
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) {
|
function Source(account, conn, channel, contact, client) {
|
||||||
this._init(account, conn, channel, contact);
|
this._init(account, conn, channel, contact, client);
|
||||||
}
|
}
|
||||||
|
|
||||||
Source.prototype = {
|
Source.prototype = {
|
||||||
__proto__: MessageTray.Source.prototype,
|
__proto__: MessageTray.Source.prototype,
|
||||||
|
|
||||||
_init: function(account, conn, channel, contact) {
|
_init: function(account, conn, channel, contact, client) {
|
||||||
MessageTray.Source.prototype._init.call(this, contact.get_alias());
|
MessageTray.Source.prototype._init.call(this, contact.get_alias());
|
||||||
|
|
||||||
this.isChat = true;
|
this.isChat = true;
|
||||||
|
|
||||||
this._account = account;
|
this._account = account;
|
||||||
this._contact = contact;
|
this._contact = contact;
|
||||||
|
this._client = client;
|
||||||
|
|
||||||
|
this._pendingMessages = [];
|
||||||
|
|
||||||
this._conn = conn;
|
this._conn = conn;
|
||||||
this._channel = channel;
|
this._channel = channel;
|
||||||
@ -167,10 +225,21 @@ Source.prototype = {
|
|||||||
this._notification = new Notification(this);
|
this._notification = new Notification(this);
|
||||||
this._notification.setUrgency(MessageTray.Urgency.HIGH);
|
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._presence = contact.get_presence_type();
|
||||||
|
|
||||||
this._sentId = this._channel.connect('message-sent', Lang.bind(this, this._messageSent));
|
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._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());
|
this._setSummaryIcon(this.createNotificationIcon());
|
||||||
|
|
||||||
@ -187,7 +256,7 @@ Source.prototype = {
|
|||||||
|
|
||||||
_updateAlias: function() {
|
_updateAlias: function() {
|
||||||
let oldAlias = this.title;
|
let oldAlias = this.title;
|
||||||
this.title = this._contact.get_alias();
|
this.setTitle(this._contact.get_alias());
|
||||||
this._notification.appendAliasChange(oldAlias, this.title);
|
this._notification.appendAliasChange(oldAlias, this.title);
|
||||||
this.pushNotification(this._notification);
|
this.pushNotification(this._notification);
|
||||||
},
|
},
|
||||||
@ -216,13 +285,17 @@ Source.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
open: function(notification) {
|
open: function(notification) {
|
||||||
let props = {};
|
if (this._client.is_handling_channel(this._channel)) {
|
||||||
props[Tp.PROP_CHANNEL_CHANNEL_TYPE] = Tp.IFACE_CHANNEL_TYPE_TEXT;
|
// We are handling the channel, try to pass it to Empathy
|
||||||
[props[Tp.PROP_CHANNEL_TARGET_HANDLE], props[Tp.PROP_CHANNEL_TARGET_HANDLE_TYPE]] = this._channel.get_handle();
|
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 req = Tp.AccountChannelRequest.new(this._account, props, global.get_current_time());
|
cd.present_channel_async(this._channel, global.get_current_time(), null);
|
||||||
|
}
|
||||||
req.ensure_channel_async('', null, null);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_getLogMessages: function() {
|
_getLogMessages: function() {
|
||||||
@ -240,7 +313,18 @@ Source.prototype = {
|
|||||||
let logMessages = events.map(makeMessageFromTplEvent);
|
let logMessages = events.map(makeMessageFromTplEvent);
|
||||||
|
|
||||||
let pendingTpMessages = this._channel.get_pending_messages();
|
let pendingTpMessages = this._channel.get_pending_messages();
|
||||||
let pendingMessages = pendingTpMessages.map(function (tpMessage) { return makeMessageFromTpMessage(tpMessage, NotificationDirection.RECEIVED); });
|
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 showTimestamp = false;
|
let showTimestamp = false;
|
||||||
|
|
||||||
@ -276,6 +360,7 @@ Source.prototype = {
|
|||||||
_channelClosed: function() {
|
_channelClosed: function() {
|
||||||
this._channel.disconnect(this._closedId);
|
this._channel.disconnect(this._closedId);
|
||||||
this._channel.disconnect(this._receivedId);
|
this._channel.disconnect(this._receivedId);
|
||||||
|
this._channel.disconnect(this._pendingId);
|
||||||
this._channel.disconnect(this._sentId);
|
this._channel.disconnect(this._sentId);
|
||||||
|
|
||||||
this._contact.disconnect(this._notifyAliasId);
|
this._contact.disconnect(this._notifyAliasId);
|
||||||
@ -289,6 +374,8 @@ Source.prototype = {
|
|||||||
if (message.get_message_type() == Tp.ChannelTextMessageType.DELIVERY_REPORT)
|
if (message.get_message_type() == Tp.ChannelTextMessageType.DELIVERY_REPORT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
this._pendingMessages.push(message);
|
||||||
|
|
||||||
message = makeMessageFromTpMessage(message, NotificationDirection.RECEIVED);
|
message = makeMessageFromTpMessage(message, NotificationDirection.RECEIVED);
|
||||||
this._notification.appendMessage(message);
|
this._notification.appendMessage(message);
|
||||||
this.notify();
|
this.notify();
|
||||||
@ -315,10 +402,12 @@ Source.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let msg = Tp.ClientMessage.new_text(type, text);
|
let msg = Tp.ClientMessage.new_text(type, text);
|
||||||
this._channel.send_message_async(msg, 0, null);
|
this._channel.send_message_async(msg, 0, Lang.bind(this, function (src, result) {
|
||||||
|
this._channel.send_message_finish(result);
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
_presenceChanged: function (contact, presence, type, status, message) {
|
_presenceChanged: function (contact, presence, status, message) {
|
||||||
let msg, shouldNotify, title;
|
let msg, shouldNotify, title;
|
||||||
|
|
||||||
if (this._presence == presence)
|
if (this._presence == presence)
|
||||||
@ -351,6 +440,43 @@ Source.prototype = {
|
|||||||
this._notification.appendPresence(msg, shouldNotify);
|
this._notification.appendPresence(msg, shouldNotify);
|
||||||
if (shouldNotify)
|
if (shouldNotify)
|
||||||
this.notify();
|
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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -411,17 +537,43 @@ Notification.prototype = {
|
|||||||
styles.push('chat-action');
|
styles.push('chat-action');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.update(this.source.title, messageBody, { customContent: true, bannerMarkup: true });
|
if (message.direction == NotificationDirection.RECEIVED) {
|
||||||
|
this.update(this.source.title, messageBody, { customContent: true,
|
||||||
|
bannerMarkup: true });
|
||||||
|
}
|
||||||
|
|
||||||
this._append(messageBody, styles, message.timestamp, noTimestamp);
|
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) {
|
_append: function(text, styles, timestamp, noTimestamp) {
|
||||||
let currentTime = (Date.now() / 1000);
|
let currentTime = (Date.now() / 1000);
|
||||||
if (!timestamp)
|
if (!timestamp)
|
||||||
timestamp = currentTime;
|
timestamp = currentTime;
|
||||||
let lastMessageTime = -1;
|
|
||||||
if (this._history.length > 0)
|
|
||||||
lastMessageTime = this._history[0].time;
|
|
||||||
|
|
||||||
// Reset the old message timeout
|
// Reset the old message timeout
|
||||||
if (this._timestampTimeoutId)
|
if (this._timestampTimeoutId)
|
||||||
@ -444,23 +596,7 @@ Notification.prototype = {
|
|||||||
Lang.bind(this, this.appendTimestamp));
|
Lang.bind(this, this.appendTimestamp));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._history.length > 1) {
|
this._filterMessages();
|
||||||
// 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) {
|
_formatTimestamp: function(date) {
|
||||||
@ -502,6 +638,9 @@ Notification.prototype = {
|
|||||||
this._history.unshift({ actor: timeLabel, time: lastMessageTime, realMessage: false });
|
this._history.unshift({ actor: timeLabel, time: lastMessageTime, realMessage: false });
|
||||||
|
|
||||||
this._timestampTimeoutId = 0;
|
this._timestampTimeoutId = 0;
|
||||||
|
|
||||||
|
this._filterMessages();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -513,6 +652,8 @@ Notification.prototype = {
|
|||||||
let label = this.addBody(text, true);
|
let label = this.addBody(text, true);
|
||||||
label.add_style_class_name('chat-meta-message');
|
label.add_style_class_name('chat-meta-message');
|
||||||
this._history.unshift({ actor: label, time: (Date.now() / 1000), realMessage: false});
|
this._history.unshift({ actor: label, time: (Date.now() / 1000), realMessage: false});
|
||||||
|
|
||||||
|
this._filterMessages();
|
||||||
},
|
},
|
||||||
|
|
||||||
appendAliasChange: function(oldAlias, newAlias) {
|
appendAliasChange: function(oldAlias, newAlias) {
|
||||||
@ -526,6 +667,8 @@ Notification.prototype = {
|
|||||||
label.add_style_class_name('chat-meta-message');
|
label.add_style_class_name('chat-meta-message');
|
||||||
this._history.unshift({ actor: label, time: (Date.now() / 1000), realMessage: false });
|
this._history.unshift({ actor: label, time: (Date.now() / 1000), realMessage: false });
|
||||||
this.update(newAlias, null, { customContent: true });
|
this.update(newAlias, null, { customContent: true });
|
||||||
|
|
||||||
|
this._filterMessages();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onEntryActivated: function() {
|
_onEntryActivated: function() {
|
||||||
|
@ -6,6 +6,7 @@ const Gio = imports.gi.Gio;
|
|||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
const AltTab = imports.ui.altTab;
|
const AltTab = imports.ui.altTab;
|
||||||
const WorkspaceSwitcherPopup = imports.ui.workspaceSwitcherPopup;
|
const WorkspaceSwitcherPopup = imports.ui.workspaceSwitcherPopup;
|
||||||
@ -22,8 +23,7 @@ function getDimShader() {
|
|||||||
if (dimShader === null)
|
if (dimShader === null)
|
||||||
return null;
|
return null;
|
||||||
if (!dimShader) {
|
if (!dimShader) {
|
||||||
let [success, source, length] = GLib.file_get_contents(global.datadir +
|
let source = Shell.get_file_contents_utf8_sync(global.datadir + '/shaders/dim-window.glsl');
|
||||||
'/shaders/dim-window.glsl');
|
|
||||||
try {
|
try {
|
||||||
let shader = new Clutter.Shader();
|
let shader = new Clutter.Shader();
|
||||||
shader.set_fragment_source(source, -1);
|
shader.set_fragment_source(source, -1);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const GConf = imports.gi.GConf;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
@ -27,6 +28,8 @@ const CLOSE_BUTTON_FADE_TIME = 0.1;
|
|||||||
|
|
||||||
const DRAGGING_WINDOW_OPACITY = 100;
|
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
|
// Define a layout scheme for small window counts. For larger
|
||||||
// counts we fall back to an algorithm. We need more schemes here
|
// counts we fall back to an algorithm. We need more schemes here
|
||||||
// unless we have a really good algorithm.
|
// unless we have a really good algorithm.
|
||||||
@ -305,6 +308,21 @@ WindowClone.prototype = {
|
|||||||
this.emit('drag-begin');
|
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) {
|
_onDragCancelled : function (draggable, time) {
|
||||||
this.emit('drag-cancelled');
|
this.emit('drag-cancelled');
|
||||||
},
|
},
|
||||||
@ -435,9 +453,20 @@ WindowOverlay.prototype = {
|
|||||||
let button = this.closeButton;
|
let button = this.closeButton;
|
||||||
let title = this.title;
|
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 buttonX;
|
||||||
let buttonY = cloneY - (button.height - button._overlap);
|
let buttonY = cloneY - (button.height - button._overlap);
|
||||||
if (St.Widget.get_default_direction() == St.TextDirection.RTL)
|
if (side == St.Side.LEFT)
|
||||||
buttonX = cloneX - (button.width - button._overlap);
|
buttonX = cloneX - (button.width - button._overlap);
|
||||||
else
|
else
|
||||||
buttonX = cloneX + (cloneWidth - button._overlap);
|
buttonX = cloneX + (cloneWidth - button._overlap);
|
||||||
@ -619,6 +648,7 @@ Workspace.prototype = {
|
|||||||
function () {
|
function () {
|
||||||
this._dropRect.set_position(x, y);
|
this._dropRect.set_position(x, y);
|
||||||
this._dropRect.set_size(width, height);
|
this._dropRect.set_size(width, height);
|
||||||
|
this.positionWindows(WindowPositionFlags.ANIMATE);
|
||||||
return false;
|
return false;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -641,16 +671,6 @@ Workspace.prototype = {
|
|||||||
return this._windows.length == 0;
|
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
|
// Only use this for n <= 20 say
|
||||||
_factorial: function(n) {
|
_factorial: function(n) {
|
||||||
let result = 1;
|
let result = 1;
|
||||||
|
@ -178,6 +178,11 @@ WorkspaceThumbnail.prototype = {
|
|||||||
// Create clones for windows that should be visible in the Overview
|
// Create clones for windows that should be visible in the Overview
|
||||||
this._windows = [];
|
this._windows = [];
|
||||||
for (let i = 0; i < windows.length; i++) {
|
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])) {
|
if (this._isOverviewWindow(windows[i])) {
|
||||||
this._addWindowClone(windows[i]);
|
this._addWindowClone(windows[i]);
|
||||||
}
|
}
|
||||||
@ -257,11 +262,18 @@ WorkspaceThumbnail.prototype = {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Check if window still should be here
|
// Check if window still should be here
|
||||||
if (win && this._isMyWindow(win))
|
if (win && this._isMyWindow(win) && this._isOverviewWindow(win))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let clone = this._windows[index];
|
let clone = this._windows[index];
|
||||||
this._windows.splice(index, 1);
|
this._windows.splice(index, 1);
|
||||||
|
|
||||||
|
if (win && this._isOverviewWindow(win)) {
|
||||||
|
if (metaWin._minimizedChangedId) {
|
||||||
|
metaWin.disconnect(metaWin._minimizedChangedId);
|
||||||
|
delete metaWin._minimizedChangedId;
|
||||||
|
}
|
||||||
|
}
|
||||||
clone.destroy();
|
clone.destroy();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -290,6 +302,11 @@ WorkspaceThumbnail.prototype = {
|
|||||||
if (this._lookupIndex (metaWin) != -1)
|
if (this._lookupIndex (metaWin) != -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!metaWin._minimizedChangedId)
|
||||||
|
metaWin._minimizedChangedId = metaWin.connect('notify::minimized',
|
||||||
|
Lang.bind(this,
|
||||||
|
this._updateMinimized));
|
||||||
|
|
||||||
if (!this._isMyWindow(win) || !this._isOverviewWindow(win))
|
if (!this._isMyWindow(win) || !this._isOverviewWindow(win))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -316,6 +333,13 @@ WorkspaceThumbnail.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_updateMinimized: function(metaWin) {
|
||||||
|
if (metaWin.minimized)
|
||||||
|
this._doRemoveWindow(metaWin);
|
||||||
|
else
|
||||||
|
this._doAddWindow(metaWin);
|
||||||
|
},
|
||||||
|
|
||||||
destroy : function() {
|
destroy : function() {
|
||||||
this.actor.destroy();
|
this.actor.destroy();
|
||||||
},
|
},
|
||||||
@ -326,6 +350,14 @@ WorkspaceThumbnail.prototype = {
|
|||||||
global.screen.disconnect(this._windowEnteredMonitorId);
|
global.screen.disconnect(this._windowEnteredMonitorId);
|
||||||
global.screen.disconnect(this._windowLeftMonitorId);
|
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._windows = [];
|
||||||
this.actor = null;
|
this.actor = null;
|
||||||
},
|
},
|
||||||
@ -339,7 +371,8 @@ WorkspaceThumbnail.prototype = {
|
|||||||
// Tests if @win should be shown in the Overview
|
// Tests if @win should be shown in the Overview
|
||||||
_isOverviewWindow : function (win) {
|
_isOverviewWindow : function (win) {
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
return tracker.is_window_interesting(win.get_meta_window());
|
return tracker.is_window_interesting(win.get_meta_window()) &&
|
||||||
|
win.get_meta_window().showing_on_its_workspace();
|
||||||
},
|
},
|
||||||
|
|
||||||
// Create a clone of a (non-desktop) window and add it to the window list
|
// Create a clone of a (non-desktop) window and add it to the window list
|
||||||
|
@ -49,9 +49,12 @@ WorkspacesView.prototype = {
|
|||||||
this._height = 0;
|
this._height = 0;
|
||||||
this._x = 0;
|
this._x = 0;
|
||||||
this._y = 0;
|
this._y = 0;
|
||||||
|
this._clipX = 0;
|
||||||
|
this._clipY = 0;
|
||||||
|
this._clipWidth = 0;
|
||||||
|
this._clipHeight = 0;
|
||||||
this._workspaceRatioSpacing = 0;
|
this._workspaceRatioSpacing = 0;
|
||||||
this._spacing = 0;
|
this._spacing = 0;
|
||||||
this._lostWorkspaces = [];
|
|
||||||
this._animating = false; // tweening
|
this._animating = false; // tweening
|
||||||
this._scrolling = false; // swipe-scrolling
|
this._scrolling = false; // swipe-scrolling
|
||||||
this._animatingScroll = false; // programatically updating the adjustment
|
this._animatingScroll = false; // programatically updating the adjustment
|
||||||
@ -93,7 +96,8 @@ WorkspacesView.prototype = {
|
|||||||
this._overviewShownId =
|
this._overviewShownId =
|
||||||
Main.overview.connect('shown',
|
Main.overview.connect('shown',
|
||||||
Lang.bind(this, function() {
|
Lang.bind(this, function() {
|
||||||
this.actor.set_clip(this._x, this._y, this._width, this._height);
|
this.actor.set_clip(this._clipX, this._clipY,
|
||||||
|
this._clipWidth, this._clipHeight);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,
|
this._scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,
|
||||||
@ -137,6 +141,13 @@ WorkspacesView.prototype = {
|
|||||||
this._workspaces[i].setGeometry(x, y, width, height);
|
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) {
|
_lookupWorkspaceForMetaWindow: function (metaWindow) {
|
||||||
for (let i = 0; i < this._workspaces.length; i++) {
|
for (let i = 0; i < this._workspaces.length; i++) {
|
||||||
if (this._workspaces[i].containsMetaWindow(metaWindow))
|
if (this._workspaces[i].containsMetaWindow(metaWindow))
|
||||||
@ -150,6 +161,10 @@ WorkspacesView.prototype = {
|
|||||||
return this._workspaces[active];
|
return this._workspaces[active];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getWorkspaceByIndex: function(index) {
|
||||||
|
return this._workspaces[index];
|
||||||
|
},
|
||||||
|
|
||||||
hide: function() {
|
hide: function() {
|
||||||
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
|
||||||
let activeWorkspace = this._workspaces[activeWorkspaceIndex];
|
let activeWorkspace = this._workspaces[activeWorkspaceIndex];
|
||||||
@ -224,27 +239,6 @@ WorkspacesView.prototype = {
|
|||||||
this._updateVisibility();
|
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() {
|
_updateVisibility: function() {
|
||||||
@ -265,17 +259,6 @@ 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) {
|
_updateScrollAdjustment: function(index, showAnimation) {
|
||||||
if (this._scrolling)
|
if (this._scrolling)
|
||||||
return;
|
return;
|
||||||
@ -298,12 +281,9 @@ WorkspacesView.prototype = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateWorkspaces: function(oldNumWorkspaces, newNumWorkspaces, lostWorkspaces) {
|
updateWorkspaces: function(oldNumWorkspaces, newNumWorkspaces) {
|
||||||
let active = global.screen.get_active_workspace_index();
|
let active = global.screen.get_active_workspace_index();
|
||||||
|
|
||||||
for (let l = 0; l < lostWorkspaces.length; l++)
|
|
||||||
lostWorkspaces[l].disconnectAll();
|
|
||||||
|
|
||||||
Tweener.addTween(this._scrollAdjustment,
|
Tweener.addTween(this._scrollAdjustment,
|
||||||
{ upper: newNumWorkspaces,
|
{ upper: newNumWorkspaces,
|
||||||
time: WORKSPACE_SWITCH_TIME,
|
time: WORKSPACE_SWITCH_TIME,
|
||||||
@ -311,12 +291,13 @@ WorkspacesView.prototype = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (newNumWorkspaces > oldNumWorkspaces) {
|
if (newNumWorkspaces > oldNumWorkspaces) {
|
||||||
for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++)
|
for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
|
||||||
|
this._workspaces[w].setGeometry(this._x, this._y,
|
||||||
|
this._width, this._height);
|
||||||
this.actor.add_actor(this._workspaces[w].actor);
|
this.actor.add_actor(this._workspaces[w].actor);
|
||||||
|
}
|
||||||
|
|
||||||
this._updateWorkspaceActors(false);
|
this._updateWorkspaceActors(false);
|
||||||
} else {
|
|
||||||
this._lostWorkspaces = lostWorkspaces;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._scrollToActive(true);
|
this._scrollToActive(true);
|
||||||
@ -468,7 +449,7 @@ WorkspacesView.prototype = {
|
|||||||
Mainloop.source_remove(this._timeoutId);
|
Mainloop.source_remove(this._timeoutId);
|
||||||
this._timeoutId = 0;
|
this._timeoutId = 0;
|
||||||
}
|
}
|
||||||
DND.removeMonitor(this._dragMonitor);
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
this._inDrag = false;
|
this._inDrag = false;
|
||||||
|
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
@ -587,6 +568,9 @@ WorkspacesDisplay.prototype = {
|
|||||||
this._updateAlwaysZoom();
|
this._updateAlwaysZoom();
|
||||||
|
|
||||||
global.screen.connect('monitors-changed', Lang.bind(this, 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(){
|
Main.xdndHandler.connect('drag-begin', Lang.bind(this, function(){
|
||||||
this._alwaysZoomOut = true;
|
this._alwaysZoomOut = true;
|
||||||
}));
|
}));
|
||||||
@ -596,7 +580,6 @@ WorkspacesDisplay.prototype = {
|
|||||||
this._updateAlwaysZoom();
|
this._updateAlwaysZoom();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._nWorkspacesNotifyId = 0;
|
|
||||||
this._switchWorkspaceNotifyId = 0;
|
this._switchWorkspaceNotifyId = 0;
|
||||||
|
|
||||||
this._itemDragBeginId = 0;
|
this._itemDragBeginId = 0;
|
||||||
@ -626,10 +609,6 @@ WorkspacesDisplay.prototype = {
|
|||||||
this.workspacesView = new WorkspacesView(this._workspaces);
|
this.workspacesView = new WorkspacesView(this._workspaces);
|
||||||
this._updateWorkspacesGeometry();
|
this._updateWorkspacesGeometry();
|
||||||
|
|
||||||
this._nWorkspacesNotifyId =
|
|
||||||
global.screen.connect('notify::n-workspaces',
|
|
||||||
Lang.bind(this, this._workspacesChanged));
|
|
||||||
|
|
||||||
this._restackedNotifyId =
|
this._restackedNotifyId =
|
||||||
global.screen.connect('restacked',
|
global.screen.connect('restacked',
|
||||||
Lang.bind(this, this._onRestacked));
|
Lang.bind(this, this._onRestacked));
|
||||||
@ -660,10 +639,6 @@ WorkspacesDisplay.prototype = {
|
|||||||
this._controls.hide();
|
this._controls.hide();
|
||||||
this._thumbnailsBox.hide();
|
this._thumbnailsBox.hide();
|
||||||
|
|
||||||
if (this._nWorkspacesNotifyId > 0) {
|
|
||||||
global.screen.disconnect(this._nWorkspacesNotifyId);
|
|
||||||
this._nWorkspacesNotifyId = 0;
|
|
||||||
}
|
|
||||||
if (this._restackedNotifyId > 0){
|
if (this._restackedNotifyId > 0){
|
||||||
global.screen.disconnect(this._restackedNotifyId);
|
global.screen.disconnect(this._restackedNotifyId);
|
||||||
this._restackedNotifyId = 0;
|
this._restackedNotifyId = 0;
|
||||||
@ -712,7 +687,12 @@ WorkspacesDisplay.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_updateAlwaysZoom: function() {
|
_updateAlwaysZoom: function() {
|
||||||
this._alwaysZoomOut = false;
|
// 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;
|
||||||
|
|
||||||
let monitors = global.get_monitors();
|
let monitors = global.get_monitors();
|
||||||
let primary = global.get_primary_monitor();
|
let primary = global.get_primary_monitor();
|
||||||
@ -783,6 +763,13 @@ WorkspacesDisplay.prototype = {
|
|||||||
|
|
||||||
let rtl = (St.Widget.get_default_direction () == St.TextDirection.RTL);
|
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) {
|
if (this._zoomOut) {
|
||||||
width -= controlsNatural;
|
width -= controlsNatural;
|
||||||
if (rtl)
|
if (rtl)
|
||||||
@ -821,6 +808,12 @@ WorkspacesDisplay.prototype = {
|
|||||||
if (oldNumWorkspaces == newNumWorkspaces)
|
if (oldNumWorkspaces == newNumWorkspaces)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
this._updateAlwaysZoom();
|
||||||
|
this._updateZoom();
|
||||||
|
|
||||||
|
if (this.workspacesView == null)
|
||||||
|
return;
|
||||||
|
|
||||||
let lostWorkspaces = [];
|
let lostWorkspaces = [];
|
||||||
if (newNumWorkspaces > oldNumWorkspaces) {
|
if (newNumWorkspaces > oldNumWorkspaces) {
|
||||||
// Assume workspaces are only added at the end
|
// Assume workspaces are only added at the end
|
||||||
@ -846,24 +839,23 @@ WorkspacesDisplay.prototype = {
|
|||||||
lostWorkspaces = this._workspaces.splice(removedIndex,
|
lostWorkspaces = this._workspaces.splice(removedIndex,
|
||||||
removedNum);
|
removedNum);
|
||||||
|
|
||||||
// Don't let the user try to select this workspace as it's
|
for (let l = 0; l < lostWorkspaces.length; l++) {
|
||||||
// making its exit.
|
lostWorkspaces[l].disconnectAll();
|
||||||
for (let l = 0; l < lostWorkspaces.length; l++)
|
lostWorkspaces[l].destroy();
|
||||||
lostWorkspaces[l].setReactive(false);
|
}
|
||||||
|
|
||||||
this._thumbnailsBox.removeThumbmails(removedIndex, removedNum);
|
this._thumbnailsBox.removeThumbmails(removedIndex, removedNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.workspacesView.updateWorkspaces(oldNumWorkspaces,
|
this.workspacesView.updateWorkspaces(oldNumWorkspaces,
|
||||||
newNumWorkspaces,
|
newNumWorkspaces);
|
||||||
lostWorkspaces);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateZoom : function() {
|
_updateZoom : function() {
|
||||||
if (Main.overview.animationInProgress)
|
if (Main.overview.animationInProgress)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let shouldZoom = this._alwaysZoomOut || this._controls.hover || (this._inDrag && !this._cancelledDrag);
|
let shouldZoom = this._alwaysZoomOut || this._controls.hover;
|
||||||
if (shouldZoom != this._zoomOut) {
|
if (shouldZoom != this._zoomOut) {
|
||||||
this._zoomOut = shouldZoom;
|
this._zoomOut = shouldZoom;
|
||||||
this._updateWorkspacesGeometry();
|
this._updateWorkspacesGeometry();
|
||||||
@ -887,12 +879,22 @@ WorkspacesDisplay.prototype = {
|
|||||||
_dragBegin: function() {
|
_dragBegin: function() {
|
||||||
this._inDrag = true;
|
this._inDrag = true;
|
||||||
this._cancelledDrag = false;
|
this._cancelledDrag = false;
|
||||||
this._updateZoom();
|
this._dragMonitor = {
|
||||||
|
dragMotion: Lang.bind(this, this._onDragMotion)
|
||||||
|
};
|
||||||
|
DND.addDragMonitor(this._dragMonitor);
|
||||||
},
|
},
|
||||||
|
|
||||||
_dragCancelled: function() {
|
_dragCancelled: function() {
|
||||||
this._cancelledDrag = true;
|
this._cancelledDrag = true;
|
||||||
this._updateZoom();
|
DND.removeDragMonitor(this._dragMonitor);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onDragMotion: function(dragEvent) {
|
||||||
|
let controlsHovered = this._controls.contains(dragEvent.targetActor);
|
||||||
|
this._controls.set_hover(controlsHovered);
|
||||||
|
|
||||||
|
return DND.DragMotionResult.CONTINUE;
|
||||||
},
|
},
|
||||||
|
|
||||||
_dragEnd: function() {
|
_dragEnd: function() {
|
||||||
|
@ -36,53 +36,48 @@ visually attractive and easy to use experience.
|
|||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-r, \-\-replace
|
.B \-\-replace
|
||||||
Replace the running metacity/gnome-panel
|
Replace the running window manager
|
||||||
.br
|
.br
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-v, \-\-verbose
|
.B \-\-sm-disable
|
||||||
Shows details about the results of running `gnome-shell'.
|
Disable connection to the session manager
|
||||||
.br
|
.br
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-g, \-\-debug
|
.B \-\-sm-client-id=ID
|
||||||
Run under a debugger
|
Specify session management ID
|
||||||
.br
|
.br
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-debug\-command
|
.B \-\-sm-save-file=FILE
|
||||||
Command to use for debugging (defaults to 'gdb \-\-args')
|
Initialize session from savefile
|
||||||
|
.br
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-\-screen=SCREEN
|
||||||
|
X screen to use
|
||||||
|
.br
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-d, \-\-display=DISPLAY
|
||||||
|
X display to use
|
||||||
.br
|
.br
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-sync
|
.B \-\-sync
|
||||||
.br
|
Make X calls synchronous
|
||||||
Make X calls synchronously, useful when debugging down X errors
|
|
||||||
.br
|
.br
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-xephyr
|
.B \-\-version
|
||||||
Run a debugging instance inside Xephyr
|
Print version and exit
|
||||||
.br
|
.br
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-\-geometry
|
.B \-\-help
|
||||||
Specify Xephyr screen geometry
|
Display help and exit
|
||||||
.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
|
.br
|
||||||
|
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
af
|
af
|
||||||
an
|
an
|
||||||
ar
|
ar
|
||||||
|
be
|
||||||
bg
|
bg
|
||||||
bn
|
bn
|
||||||
bn_IN
|
bn_IN
|
||||||
ca
|
ca
|
||||||
|
ca@valencia
|
||||||
cs
|
cs
|
||||||
da
|
da
|
||||||
de
|
de
|
||||||
@ -46,6 +48,7 @@ sr
|
|||||||
sr@latin
|
sr@latin
|
||||||
sv
|
sv
|
||||||
ta
|
ta
|
||||||
|
te
|
||||||
th
|
th
|
||||||
tr
|
tr
|
||||||
ug
|
ug
|
||||||
|
1426
po/ca@valencia.po
Normal file
1426
po/ca@valencia.po
Normal file
File diff suppressed because it is too large
Load Diff
4
po/vi.po
4
po/vi.po
@ -9,7 +9,7 @@ msgstr ""
|
|||||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
||||||
"shell&keywords=I18N+L10N&component=general\n"
|
"shell&keywords=I18N+L10N&component=general\n"
|
||||||
"POT-Creation-Date: 2011-03-25 20:20+0000\n"
|
"POT-Creation-Date: 2011-03-25 20:20+0000\n"
|
||||||
"PO-Revision-Date: 2011-04-12 18:34+0700\n"
|
"PO-Revision-Date: 2011-05-22 21:50+0700\n"
|
||||||
"Last-Translator: Duy <pclouds@gmail.com>\n"
|
"Last-Translator: Duy <pclouds@gmail.com>\n"
|
||||||
"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
|
"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -551,7 +551,7 @@ msgstr "Ứng dụng"
|
|||||||
#. the left of the overview
|
#. the left of the overview
|
||||||
#: ../js/ui/overview.js:205
|
#: ../js/ui/overview.js:205
|
||||||
msgid "Dash"
|
msgid "Dash"
|
||||||
msgstr "Khung ứng dụng"
|
msgstr "Neo ứng dụng"
|
||||||
|
|
||||||
#. TODO - _quit() doesn't really work on apps in state STARTING yet
|
#. TODO - _quit() doesn't really work on apps in state STARTING yet
|
||||||
#: ../js/ui/panel.js:515
|
#: ../js/ui/panel.js:515
|
||||||
|
542
po/zh_CN.po
542
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@ -47,20 +47,20 @@ st-marshal.c: Makefile st/st-marshal.list
|
|||||||
|
|
||||||
st-enum-types.h: stamp-st-enum-types.h Makefile
|
st-enum-types.h: stamp-st-enum-types.h Makefile
|
||||||
@true
|
@true
|
||||||
stamp-st-enum-types.h: $(source_h) st/st-enum-types.h.in $(st_source_h)
|
stamp-st-enum-types.h: $(source_h) $(srcdir)/st/st-enum-types.h.in $(st_source_h)
|
||||||
$(AM_V_GEN) ( cd $(srcdir) && \
|
$(AM_V_GEN) ( \
|
||||||
$(GLIB_MKENUMS) \
|
$(GLIB_MKENUMS) \
|
||||||
--template st/st-enum-types.h.in \
|
--template $(srcdir)/st/st-enum-types.h.in \
|
||||||
$(st_source_h) ) >> $@.tmp && \
|
$(addprefix $(srcdir)/, $(st_source_h)) ) >> $@.tmp && \
|
||||||
(cmp -s $@.tmp st-enum-types.h || cp $@.tmp st-enum-types.h) && \
|
(cmp -s $@.tmp st-enum-types.h || cp $@.tmp st-enum-types.h) && \
|
||||||
rm -f $@.tmp && \
|
rm -f $@.tmp && \
|
||||||
echo timestamp > $(@F)
|
echo timestamp > $(@F)
|
||||||
|
|
||||||
st-enum-types.c: stamp-st-enum-types.h st/st-enum-types.c.in
|
st-enum-types.c: stamp-st-enum-types.h $(srcdir)/st/st-enum-types.c.in
|
||||||
$(AM_V_GEN) ( cd $(srcdir) && \
|
$(AM_V_GEN) ( \
|
||||||
$(GLIB_MKENUMS) \
|
$(GLIB_MKENUMS) \
|
||||||
--template st/st-enum-types.c.in \
|
--template $(srcdir)/st/st-enum-types.c.in \
|
||||||
$(st_source_h) ) >> $@.tmp && \
|
$(addprefix $(srcdir)/,$(st_source_h)) ) >> $@.tmp && \
|
||||||
cp $@.tmp $@ && \
|
cp $@.tmp $@ && \
|
||||||
rm -f $@.tmp
|
rm -f $@.tmp
|
||||||
|
|
||||||
|
@ -222,21 +222,21 @@ shell-marshal.c: Makefile shell-marshal.list
|
|||||||
shell-enum-types.h: stamp-shell-enum-types.h Makefile
|
shell-enum-types.h: stamp-shell-enum-types.h Makefile
|
||||||
@true
|
@true
|
||||||
stamp-shell-enum-types.h: $(srcdir)/shell-enum-types.h.in $(shell_public_headers_h)
|
stamp-shell-enum-types.h: $(srcdir)/shell-enum-types.h.in $(shell_public_headers_h)
|
||||||
$(AM_V_GEN) ( cd $(srcdir) && \
|
$(AM_V_GEN) ( \
|
||||||
$(GLIB_MKENUMS) \
|
$(GLIB_MKENUMS) \
|
||||||
--template $< \
|
--template $< \
|
||||||
$(shell_public_headers_h) ) > $(@F).tmp && \
|
$(addprefix $(srcdir)/,$(shell_public_headers_h)) ) > $(@F).tmp && \
|
||||||
(cmp -s $(@F).tmp shell-enum-types.h || mv $(@F).tmp shell-enum-types.h) && \
|
(cmp -s $(@F).tmp shell-enum-types.h || mv $(@F).tmp shell-enum-types.h) && \
|
||||||
rm -f $(@F).tmp && \
|
rm -f $(@F).tmp && \
|
||||||
echo timestamp > $(@F)
|
echo timestamp > $(@F)
|
||||||
EXTRA_DIST += shell-enum-types.h.in
|
EXTRA_DIST += shell-enum-types.h.in
|
||||||
CLEANFILES += stamp-shell-enum-types.h
|
CLEANFILES += stamp-shell-enum-types.h
|
||||||
|
|
||||||
shell-enum-types.c: shell-enum-types.c.in stamp-shell-enum-types.h
|
shell-enum-types.c: $(srcdir)/shell-enum-types.c.in stamp-shell-enum-types.h
|
||||||
$(AM_V_GEN) ( cd $(srcdir) && \
|
$(AM_V_GEN) ( \
|
||||||
$(GLIB_MKENUMS) \
|
$(GLIB_MKENUMS) \
|
||||||
--template $< \
|
--template $< \
|
||||||
$(shell_public_headers_h) ) > $(@F).tmp && \
|
$(addprefix $(srcdir)/,$(shell_public_headers_h)) ) > $(@F).tmp && \
|
||||||
mv $(@F).tmp $(@F) && \
|
mv $(@F).tmp $(@F) && \
|
||||||
rm -f $(@F).tmp
|
rm -f $(@F).tmp
|
||||||
EXTRA_DIST += shell-enum-types.c.in
|
EXTRA_DIST += shell-enum-types.c.in
|
||||||
@ -258,7 +258,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_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_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
|
||||||
Shell_0_1_gir_LIBS = libgnome-shell.la
|
Shell_0_1_gir_LIBS = libgnome-shell.la
|
||||||
Shell_0_1_gir_FILES = $(addprefix $(srcdir)/,$(libgnome_shell_la_gir_sources))
|
Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources)
|
||||||
Shell_0_1_gir_SCANNERFLAGS = --include-uninstalled=$(builddir)/St-1.0.gir \
|
Shell_0_1_gir_SCANNERFLAGS = --include-uninstalled=$(builddir)/St-1.0.gir \
|
||||||
--add-include-path=$(MUTTER_GIR_DIR)
|
--add-include-path=$(MUTTER_GIR_DIR)
|
||||||
INTROSPECTION_GIRS += Shell-0.1.gir
|
INTROSPECTION_GIRS += Shell-0.1.gir
|
||||||
|
@ -777,7 +777,10 @@ remove_user (GdmUserManager *manager,
|
|||||||
if (gdm_user_get_object_path (user) != NULL) {
|
if (gdm_user_get_object_path (user) != NULL) {
|
||||||
g_hash_table_remove (manager->priv->users_by_object_path, gdm_user_get_object_path (user));
|
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) {
|
if (manager->priv->is_loaded) {
|
||||||
g_signal_emit (manager, signals[USER_REMOVED], 0, user);
|
g_signal_emit (manager, signals[USER_REMOVED], 0, user);
|
||||||
@ -884,6 +887,13 @@ on_user_removed_in_accounts_service (DBusGProxy *proxy,
|
|||||||
|
|
||||||
user = g_hash_table_lookup (manager->priv->users_by_object_path, object_path);
|
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);
|
manager->priv->new_users = g_slist_remove (manager->priv->new_users, user);
|
||||||
|
|
||||||
remove_user (manager, user);
|
remove_user (manager, user);
|
||||||
|
11
src/main.c
11
src/main.c
@ -453,6 +453,7 @@ main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
GOptionContext *ctx;
|
GOptionContext *ctx;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
int ecode;
|
||||||
|
|
||||||
g_type_init ();
|
g_type_init ();
|
||||||
|
|
||||||
@ -507,5 +508,13 @@ main (int argc, char **argv)
|
|||||||
/* Initialize the global object */
|
/* Initialize the global object */
|
||||||
shell_global_get ();
|
shell_global_get ();
|
||||||
|
|
||||||
return meta_run ();
|
ecode = meta_run ();
|
||||||
|
|
||||||
|
if (g_getenv ("GNOME_SHELL_ENABLE_CLEANUP"))
|
||||||
|
{
|
||||||
|
g_printerr ("Doing final cleanup...\n");
|
||||||
|
g_object_unref (shell_global_get ());
|
||||||
|
}
|
||||||
|
|
||||||
|
return ecode;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,11 @@
|
|||||||
#include <meta/display.h>
|
#include <meta/display.h>
|
||||||
#include <meta/util.h>
|
#include <meta/util.h>
|
||||||
|
|
||||||
|
/* Memory report bits */
|
||||||
|
#ifdef HAVE_MALLINFO
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "shell-enum-types.h"
|
#include "shell-enum-types.h"
|
||||||
#include "shell-global-private.h"
|
#include "shell-global-private.h"
|
||||||
#include "shell-jsapi-compat-private.h"
|
#include "shell-jsapi-compat-private.h"
|
||||||
@ -34,6 +39,8 @@
|
|||||||
#include "shell-wm.h"
|
#include "shell-wm.h"
|
||||||
#include "st.h"
|
#include "st.h"
|
||||||
|
|
||||||
|
static ShellGlobal *the_object = NULL;
|
||||||
|
|
||||||
static void grab_notify (GtkWidget *widget, gboolean is_grab, gpointer user_data);
|
static void grab_notify (GtkWidget *widget, gboolean is_grab, gpointer user_data);
|
||||||
|
|
||||||
struct _ShellGlobal {
|
struct _ShellGlobal {
|
||||||
@ -62,8 +69,6 @@ struct _ShellGlobal {
|
|||||||
|
|
||||||
GdkWindow *stage_window;
|
GdkWindow *stage_window;
|
||||||
|
|
||||||
gint last_change_screen_width, last_change_screen_height;
|
|
||||||
|
|
||||||
guint work_count;
|
guint work_count;
|
||||||
GSList *leisure_closures;
|
GSList *leisure_closures;
|
||||||
guint leisure_function_id;
|
guint leisure_function_id;
|
||||||
@ -237,9 +242,6 @@ shell_global_init (ShellGlobal *global)
|
|||||||
|
|
||||||
global->input_mode = SHELL_STAGE_INPUT_MODE_NORMAL;
|
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_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_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);
|
ca_context_open (global->sound_context);
|
||||||
@ -254,6 +256,20 @@ shell_global_init (ShellGlobal *global)
|
|||||||
g_strfreev (search_path);
|
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
|
static void
|
||||||
shell_global_class_init (ShellGlobalClass *klass)
|
shell_global_class_init (ShellGlobalClass *klass)
|
||||||
{
|
{
|
||||||
@ -261,6 +277,7 @@ shell_global_class_init (ShellGlobalClass *klass)
|
|||||||
|
|
||||||
gobject_class->get_property = shell_global_get_property;
|
gobject_class->get_property = shell_global_get_property;
|
||||||
gobject_class->set_property = shell_global_set_property;
|
gobject_class->set_property = shell_global_set_property;
|
||||||
|
gobject_class->finalize = shell_global_finalize;
|
||||||
|
|
||||||
/* Emitted from gnome-shell-plugin.c during event handling */
|
/* Emitted from gnome-shell-plugin.c during event handling */
|
||||||
shell_global_signals[XDND_POSITION_CHANGED] =
|
shell_global_signals[XDND_POSITION_CHANGED] =
|
||||||
@ -424,8 +441,6 @@ shell_global_class_init (ShellGlobalClass *klass)
|
|||||||
ShellGlobal *
|
ShellGlobal *
|
||||||
shell_global_get (void)
|
shell_global_get (void)
|
||||||
{
|
{
|
||||||
static ShellGlobal *the_object = NULL;
|
|
||||||
|
|
||||||
if (!the_object)
|
if (!the_object)
|
||||||
the_object = g_object_new (SHELL_TYPE_GLOBAL, 0);
|
the_object = g_object_new (SHELL_TYPE_GLOBAL, 0);
|
||||||
|
|
||||||
@ -680,23 +695,6 @@ shell_global_get_window_actors (ShellGlobal *global)
|
|||||||
return meta_plugin_get_window_actors (global->plugin);
|
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
|
static void
|
||||||
global_stage_notify_width (GObject *gobject,
|
global_stage_notify_width (GObject *gobject,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
@ -705,11 +703,6 @@ global_stage_notify_width (GObject *gobject,
|
|||||||
ShellGlobal *global = SHELL_GLOBAL (data);
|
ShellGlobal *global = SHELL_GLOBAL (data);
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (global), "screen-width");
|
g_object_notify (G_OBJECT (global), "screen-width");
|
||||||
|
|
||||||
meta_later_add (META_LATER_BEFORE_REDRAW,
|
|
||||||
update_screen_size,
|
|
||||||
global,
|
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -720,11 +713,6 @@ global_stage_notify_height (GObject *gobject,
|
|||||||
ShellGlobal *global = SHELL_GLOBAL (data);
|
ShellGlobal *global = SHELL_GLOBAL (data);
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (global), "screen-height");
|
g_object_notify (G_OBJECT (global), "screen-height");
|
||||||
|
|
||||||
meta_later_add (META_LATER_BEFORE_REDRAW,
|
|
||||||
update_screen_size,
|
|
||||||
global,
|
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -763,7 +751,6 @@ _shell_global_set_plugin (ShellGlobal *global,
|
|||||||
G_CALLBACK (global_stage_notify_width), global);
|
G_CALLBACK (global_stage_notify_width), global);
|
||||||
g_signal_connect (stage, "notify::height",
|
g_signal_connect (stage, "notify::height",
|
||||||
G_CALLBACK (global_stage_notify_height), global);
|
G_CALLBACK (global_stage_notify_height), global);
|
||||||
update_screen_size (global);
|
|
||||||
|
|
||||||
g_signal_connect (stage, "paint",
|
g_signal_connect (stage, "paint",
|
||||||
G_CALLBACK (global_stage_before_paint), global);
|
G_CALLBACK (global_stage_before_paint), global);
|
||||||
@ -1111,6 +1098,38 @@ shell_global_maybe_gc (ShellGlobal *global)
|
|||||||
gjs_context_maybe_gc (global->js_context);
|
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:
|
* shell_global_notify_error:
|
||||||
* @global: a #ShellGlobal
|
* @global: a #ShellGlobal
|
||||||
@ -1430,73 +1449,6 @@ shell_global_create_app_launch_context (ShellGlobal *global)
|
|||||||
return (GAppLaunchContext *)context;
|
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
|
typedef struct
|
||||||
{
|
{
|
||||||
ShellLeisureFunction func;
|
ShellLeisureFunction func;
|
||||||
|
@ -90,10 +90,19 @@ void shell_global_get_pointer (ShellGlobal *global,
|
|||||||
void shell_global_gc (ShellGlobal *global);
|
void shell_global_gc (ShellGlobal *global);
|
||||||
void shell_global_maybe_gc (ShellGlobal *global);
|
void shell_global_maybe_gc (ShellGlobal *global);
|
||||||
|
|
||||||
gboolean shell_global_set_property_mutable (ShellGlobal *global,
|
typedef struct {
|
||||||
const char *object,
|
guint glibc_uordblks;
|
||||||
const char *property,
|
|
||||||
gboolean mutable);
|
guint js_bytes;
|
||||||
|
|
||||||
|
guint gjs_boxed;
|
||||||
|
guint gjs_gobject;
|
||||||
|
guint gjs_function;
|
||||||
|
guint gjs_closure;
|
||||||
|
} ShellMemoryInfo;
|
||||||
|
|
||||||
|
void shell_global_get_memory_info (ShellGlobal *global,
|
||||||
|
ShellMemoryInfo *meminfo);
|
||||||
|
|
||||||
|
|
||||||
/* Run-at-leisure API */
|
/* Run-at-leisure API */
|
||||||
|
@ -62,8 +62,6 @@ struct _ShellRecorder {
|
|||||||
|
|
||||||
gboolean only_paint; /* Used to temporarily suppress recording */
|
gboolean only_paint; /* Used to temporarily suppress recording */
|
||||||
|
|
||||||
gboolean have_pack_invert; /* True when GL_MESA_pack_invert is available */
|
|
||||||
|
|
||||||
int framerate;
|
int framerate;
|
||||||
char *pipeline_description;
|
char *pipeline_description;
|
||||||
char *filename;
|
char *filename;
|
||||||
@ -414,6 +412,8 @@ recorder_fetch_cursor_image (ShellRecorder *recorder)
|
|||||||
*(guint32 *)(data + i * stride + 4 * j) = cursor_image->pixels[i * cursor_image->width + j];
|
*(guint32 *)(data + i * stride + 4 * j) = cursor_image->pixels[i * cursor_image->width + j];
|
||||||
|
|
||||||
cairo_surface_mark_dirty (recorder->cursor_image);
|
cairo_surface_mark_dirty (recorder->cursor_image);
|
||||||
|
|
||||||
|
XFree (cursor_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Overlay the cursor image on the frame. We draw the cursor image
|
/* Overlay the cursor image on the frame. We draw the cursor image
|
||||||
@ -450,15 +450,7 @@ recorder_draw_cursor (ShellRecorder *recorder,
|
|||||||
recorder->stage_height,
|
recorder->stage_height,
|
||||||
recorder->stage_width * 4);
|
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);
|
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,
|
cairo_set_source_surface (cr,
|
||||||
recorder->cursor_image,
|
recorder->cursor_image,
|
||||||
recorder->pointer_x - recorder->cursor_hot_x,
|
recorder->pointer_x - recorder->cursor_hot_x,
|
||||||
@ -534,37 +526,12 @@ recorder_record_frame (ShellRecorder *recorder)
|
|||||||
|
|
||||||
GST_BUFFER_TIMESTAMP(buffer) = get_wall_time() - recorder->start_time;
|
GST_BUFFER_TIMESTAMP(buffer) = get_wall_time() - recorder->start_time;
|
||||||
|
|
||||||
/* We could use cogl_read_pixels, but it only currently supports
|
cogl_read_pixels (0, 0,
|
||||||
* 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,
|
recorder->stage_width, recorder->stage_height,
|
||||||
GL_BGRA,
|
COGL_READ_PIXELS_COLOR_BUFFER,
|
||||||
GL_UNSIGNED_INT_8_8_8_8_REV,
|
COGL_PIXEL_FORMAT_BGRA_8888_PRE,
|
||||||
data);
|
data);
|
||||||
|
|
||||||
if (recorder->have_pack_invert)
|
|
||||||
glPixelStorei (GL_PACK_INVERT_MESA, FALSE);
|
|
||||||
|
|
||||||
recorder_draw_cursor (recorder, buffer);
|
recorder_draw_cursor (recorder, buffer);
|
||||||
|
|
||||||
shell_recorder_src_add_buffer (SHELL_RECORDER_SRC (recorder->current_pipeline->src), buffer);
|
shell_recorder_src_add_buffer (SHELL_RECORDER_SRC (recorder->current_pipeline->src), buffer);
|
||||||
@ -866,7 +833,6 @@ recorder_set_stage (ShellRecorder *recorder,
|
|||||||
if (recorder->stage)
|
if (recorder->stage)
|
||||||
{
|
{
|
||||||
int error_base;
|
int error_base;
|
||||||
const char *gl_extensions;
|
|
||||||
|
|
||||||
recorder->stage = stage;
|
recorder->stage = stage;
|
||||||
g_signal_connect (recorder->stage, "destroy",
|
g_signal_connect (recorder->stage, "destroy",
|
||||||
@ -891,8 +857,6 @@ recorder_set_stage (ShellRecorder *recorder,
|
|||||||
XFixesDisplayCursorNotifyMask);
|
XFixesDisplayCursorNotifyMask);
|
||||||
|
|
||||||
clutter_stage_ensure_current (stage);
|
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);
|
recorder_get_initial_cursor_position (recorder);
|
||||||
}
|
}
|
||||||
@ -1093,8 +1057,6 @@ recorder_pipeline_add_source (RecorderPipeline *pipeline)
|
|||||||
GstPad *sink_pad = NULL, *src_pad = NULL;
|
GstPad *sink_pad = NULL, *src_pad = NULL;
|
||||||
gboolean result = FALSE;
|
gboolean result = FALSE;
|
||||||
GstElement *ffmpegcolorspace;
|
GstElement *ffmpegcolorspace;
|
||||||
GstElement *videoflip;
|
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
sink_pad = gst_bin_find_unlinked_pad (GST_BIN (pipeline->pipeline), GST_PAD_SINK);
|
sink_pad = gst_bin_find_unlinked_pad (GST_BIN (pipeline->pipeline), GST_PAD_SINK);
|
||||||
if (sink_pad == NULL)
|
if (sink_pad == NULL)
|
||||||
@ -1124,38 +1086,8 @@ recorder_pipeline_add_source (RecorderPipeline *pipeline)
|
|||||||
}
|
}
|
||||||
gst_bin_add (GST_BIN (pipeline->pipeline), ffmpegcolorspace);
|
gst_bin_add (GST_BIN (pipeline->pipeline), ffmpegcolorspace);
|
||||||
|
|
||||||
/* 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);
|
gst_element_link_many (pipeline->src, ffmpegcolorspace, NULL);
|
||||||
src_pad = gst_element_get_static_pad (ffmpegcolorspace, "src");
|
src_pad = gst_element_get_static_pad (ffmpegcolorspace, "src");
|
||||||
}
|
|
||||||
|
|
||||||
if (!src_pad)
|
if (!src_pad)
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,14 @@ struct _ShellTpClientPrivate
|
|||||||
ShellTpClientObserveChannelsImpl observe_impl;
|
ShellTpClientObserveChannelsImpl observe_impl;
|
||||||
gpointer user_data_obs;
|
gpointer user_data_obs;
|
||||||
GDestroyNotify destroy_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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,23 +40,71 @@ struct _ShellTpClientPrivate
|
|||||||
* Signature of the implementation of the ObserveChannels method.
|
* 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
|
static void
|
||||||
shell_tp_client_init (ShellTpClient *self)
|
shell_tp_client_init (ShellTpClient *self)
|
||||||
{
|
{
|
||||||
|
GHashTable *filter;
|
||||||
|
|
||||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, SHELL_TYPE_TP_CLIENT,
|
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, SHELL_TYPE_TP_CLIENT,
|
||||||
ShellTpClientPrivate);
|
ShellTpClientPrivate);
|
||||||
|
|
||||||
/* Observer */
|
|
||||||
tp_base_client_set_observer_recover (TP_BASE_CLIENT (self), TRUE);
|
|
||||||
|
|
||||||
/* We only care about single-user text-based chats */
|
/* We only care about single-user text-based chats */
|
||||||
tp_base_client_take_observer_filter (TP_BASE_CLIENT (self),
|
filter = tp_asv_new (
|
||||||
tp_asv_new (
|
|
||||||
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
|
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
|
||||||
TP_IFACE_CHANNEL_TYPE_TEXT,
|
TP_IFACE_CHANNEL_TYPE_TEXT,
|
||||||
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
|
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
|
||||||
TP_HANDLE_TYPE_CONTACT,
|
TP_HANDLE_TYPE_CONTACT,
|
||||||
NULL));
|
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
|
static void
|
||||||
@ -68,6 +124,40 @@ observe_channels (TpBaseClient *client,
|
|||||||
dispatch_operation, requests, context, self->priv->user_data_obs);
|
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
|
static void
|
||||||
shell_tp_client_dispose (GObject *object)
|
shell_tp_client_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
@ -79,6 +169,21 @@ shell_tp_client_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
self->priv->destroy_obs (self->priv->user_data_obs);
|
self->priv->destroy_obs (self->priv->user_data_obs);
|
||||||
self->priv->destroy_obs = NULL;
|
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)
|
if (dispose != NULL)
|
||||||
@ -96,22 +201,8 @@ shell_tp_client_class_init (ShellTpClientClass *cls)
|
|||||||
object_class->dispose = shell_tp_client_dispose;
|
object_class->dispose = shell_tp_client_dispose;
|
||||||
|
|
||||||
base_clt_cls->observe_channels = observe_channels;
|
base_clt_cls->observe_channels = observe_channels;
|
||||||
}
|
base_clt_cls->add_dispatch_operation = add_dispatch_operation;
|
||||||
|
base_clt_cls->handle_channels = handle_channels;
|
||||||
/**
|
|
||||||
* shell_tp_client_new:
|
|
||||||
* @dbus: a #TpDBusDaemon object, may not be %NULL
|
|
||||||
*
|
|
||||||
* Returns: a new #ShellTpClient
|
|
||||||
*/
|
|
||||||
ShellTpClient *
|
|
||||||
shell_tp_client_new (TpDBusDaemon *dbus)
|
|
||||||
{
|
|
||||||
return g_object_new (SHELL_TYPE_TP_CLIENT,
|
|
||||||
"dbus-daemon", dbus,
|
|
||||||
"name", "GnomeShell",
|
|
||||||
"uniquify-name", TRUE,
|
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -127,6 +218,32 @@ shell_tp_client_set_observe_channels_func (ShellTpClient *self,
|
|||||||
self->priv->destroy_obs = destroy;
|
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 */
|
/* Telepathy utility functions */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,13 +51,40 @@ typedef void (*ShellTpClientObserveChannelsImpl) (ShellTpClient *client,
|
|||||||
TpObserveChannelsContext *context,
|
TpObserveChannelsContext *context,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
ShellTpClient * shell_tp_client_new (TpDBusDaemon *dbus);
|
|
||||||
|
|
||||||
void shell_tp_client_set_observe_channels_func (ShellTpClient *self,
|
void shell_tp_client_set_observe_channels_func (ShellTpClient *self,
|
||||||
ShellTpClientObserveChannelsImpl observe_impl,
|
ShellTpClientObserveChannelsImpl observe_impl,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GDestroyNotify destroy);
|
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 */
|
/* Telepathy utility functions */
|
||||||
typedef void (*ShellGetTpContactCb) (TpConnection *connection,
|
typedef void (*ShellGetTpContactCb) (TpConnection *connection,
|
||||||
GList *contacts,
|
GList *contacts,
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include "shell-util.h"
|
#include "shell-util.h"
|
||||||
#include <glib/gi18n-lib.h>
|
#include <glib/gi18n-lib.h>
|
||||||
#include <gconf/gconf-client.h>
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
@ -72,7 +71,8 @@ shell_util_get_file_display_name_if_mount (GFile *file)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define HOME_NAME_KEY "/apps/nautilus/desktop/home_icon_name"
|
#define HOME_NAME_SCHEMA "org.gnome.nautilus.desktop"
|
||||||
|
#define HOME_NAME_KEY "home-icon-name"
|
||||||
static char *
|
static char *
|
||||||
shell_util_get_file_display_for_common_files (GFile *file)
|
shell_util_get_file_display_for_common_files (GFile *file)
|
||||||
{
|
{
|
||||||
@ -81,20 +81,23 @@ shell_util_get_file_display_for_common_files (GFile *file)
|
|||||||
compare = g_file_new_for_path (g_get_home_dir ());
|
compare = g_file_new_for_path (g_get_home_dir ());
|
||||||
if (g_file_equal (file, compare))
|
if (g_file_equal (file, compare))
|
||||||
{
|
{
|
||||||
char *gconf_name;
|
GSettings *settings;
|
||||||
|
char *name;
|
||||||
|
|
||||||
g_object_unref (compare);
|
g_object_unref (compare);
|
||||||
|
|
||||||
gconf_name = gconf_client_get_string (gconf_client_get_default (),
|
settings = g_settings_new (HOME_NAME_SCHEMA);
|
||||||
HOME_NAME_KEY, NULL);
|
name = g_settings_get_string (settings, HOME_NAME_KEY);
|
||||||
if (!(gconf_name && gconf_name[0]))
|
g_object_unref (settings);
|
||||||
|
|
||||||
|
if (!(name && name[0]))
|
||||||
{
|
{
|
||||||
g_free (gconf_name);
|
g_free (name);
|
||||||
return g_strdup (_("Home Folder"));
|
return g_strdup (_("Home Folder"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return gconf_name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_object_unref (compare);
|
g_object_unref (compare);
|
||||||
|
@ -41,24 +41,6 @@
|
|||||||
* have it also track through startup-notification.
|
* 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
|
struct _ShellWindowTracker
|
||||||
{
|
{
|
||||||
GObject parent;
|
GObject parent;
|
||||||
@ -160,47 +142,6 @@ shell_window_tracker_class_init (ShellWindowTrackerClass *klass)
|
|||||||
G_TYPE_NONE, 0);
|
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:
|
* get_appid_from_window:
|
||||||
*
|
*
|
||||||
@ -305,14 +246,6 @@ get_app_from_window_wmclass (MetaWindow *window)
|
|||||||
app = shell_app_system_lookup_heuristic_basename (appsys, with_desktop);
|
app = shell_app_system_lookup_heuristic_basename (appsys, with_desktop);
|
||||||
g_free (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;
|
return app;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -480,32 +413,30 @@ _shell_window_tracker_get_app_context (ShellWindowTracker *tracker, ShellApp *ap
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_transient_window_title_changed (MetaWindow *window,
|
update_focus_app (ShellWindowTracker *self)
|
||||||
GParamSpec *spec,
|
|
||||||
ShellWindowTracker *self)
|
|
||||||
{
|
{
|
||||||
ShellAppSystem *appsys;
|
MetaWindow *new_focus_win;
|
||||||
ShellApp *app;
|
ShellApp *new_focus_app;
|
||||||
const char *id;
|
|
||||||
|
|
||||||
/* Check if we now have a mapping using the window title */
|
new_focus_win = meta_display_get_focus_window (meta_screen_get_display (shell_global_get_screen (shell_global_get ())));
|
||||||
id = get_app_id_from_title (window);
|
new_focus_app = new_focus_win ? shell_window_tracker_get_window_app (self, new_focus_win) : NULL;
|
||||||
if (id == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
appsys = shell_app_system_get_default ();
|
set_focus_app (self, new_focus_app);
|
||||||
app = shell_app_system_get_app (appsys, id);
|
}
|
||||||
if (app == NULL)
|
|
||||||
return;
|
|
||||||
g_object_unref (app);
|
|
||||||
|
|
||||||
/* We found an app, don't listen for further title changes */
|
static void
|
||||||
g_signal_handlers_disconnect_by_func (window, G_CALLBACK (on_transient_window_title_changed),
|
on_wm_class_changed (MetaWindow *window,
|
||||||
self);
|
GParamSpec *pspec,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
ShellWindowTracker *self = SHELL_WINDOW_TRACKER (user_data);
|
||||||
|
|
||||||
/* It's simplest to just treat this as a remove + add. */
|
/* It's simplest to just treat this as a remove + add. */
|
||||||
disassociate_window (self, window);
|
disassociate_window (self, window);
|
||||||
track_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
|
static void
|
||||||
@ -524,15 +455,7 @@ track_window (ShellWindowTracker *self,
|
|||||||
/* At this point we've stored the association from window -> application */
|
/* At this point we've stored the association from window -> application */
|
||||||
g_hash_table_insert (self->window_to_app, window, app);
|
g_hash_table_insert (self->window_to_app, window, app);
|
||||||
|
|
||||||
if (shell_app_is_transient (app))
|
g_signal_connect (window, "notify::wm-class", G_CALLBACK (on_wm_class_changed), self);
|
||||||
{
|
|
||||||
/* 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);
|
_shell_app_add_window (app, window);
|
||||||
|
|
||||||
@ -564,7 +487,10 @@ disassociate_window (ShellWindowTracker *self,
|
|||||||
g_hash_table_remove (self->window_to_app, window);
|
g_hash_table_remove (self->window_to_app, window);
|
||||||
|
|
||||||
if (shell_window_tracker_is_window_interesting (window))
|
if (shell_window_tracker_is_window_interesting (window))
|
||||||
|
{
|
||||||
_shell_app_remove_window (app, 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);
|
g_signal_emit (self, signals[TRACKED_WINDOWS_CHANGED], 0);
|
||||||
|
|
||||||
@ -709,15 +635,11 @@ static void
|
|||||||
shell_window_tracker_finalize (GObject *object)
|
shell_window_tracker_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
ShellWindowTracker *self = SHELL_WINDOW_TRACKER (object);
|
ShellWindowTracker *self = SHELL_WINDOW_TRACKER (object);
|
||||||
int i;
|
|
||||||
|
|
||||||
g_hash_table_destroy (self->running_apps);
|
g_hash_table_destroy (self->running_apps);
|
||||||
g_hash_table_destroy (self->window_to_app);
|
g_hash_table_destroy (self->window_to_app);
|
||||||
g_hash_table_destroy (self->launched_pid_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);
|
G_OBJECT_CLASS (shell_window_tracker_parent_class)->finalize(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -884,13 +806,7 @@ on_focus_window_changed (MetaDisplay *display,
|
|||||||
GParamSpec *spec,
|
GParamSpec *spec,
|
||||||
ShellWindowTracker *tracker)
|
ShellWindowTracker *tracker)
|
||||||
{
|
{
|
||||||
MetaWindow *new_focus_win;
|
update_focus_app (tracker);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -944,7 +860,6 @@ shell_startup_sequence_get_id (ShellStartupSequence *sequence)
|
|||||||
ShellApp *
|
ShellApp *
|
||||||
shell_startup_sequence_get_app (ShellStartupSequence *sequence)
|
shell_startup_sequence_get_app (ShellStartupSequence *sequence)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SN_STARTUP_SEQUENCE_GET_APPLICATION_ID
|
|
||||||
const char *appid;
|
const char *appid;
|
||||||
ShellAppSystem *appsys;
|
ShellAppSystem *appsys;
|
||||||
ShellApp *app;
|
ShellApp *app;
|
||||||
@ -956,9 +871,6 @@ shell_startup_sequence_get_app (ShellStartupSequence *sequence)
|
|||||||
appsys = shell_app_system_get_default ();
|
appsys = shell_app_system_get_default ();
|
||||||
app = shell_app_system_get_app_for_path (appsys, appid);
|
app = shell_app_system_get_app_for_path (appsys, appid);
|
||||||
return app;
|
return app;
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
@ -53,7 +53,7 @@ st_icon_colors_ref (StIconColors *colors)
|
|||||||
g_return_val_if_fail (colors != NULL, NULL);
|
g_return_val_if_fail (colors != NULL, NULL);
|
||||||
g_return_val_if_fail (colors->ref_count > 0, colors);
|
g_return_val_if_fail (colors->ref_count > 0, colors);
|
||||||
|
|
||||||
g_atomic_int_add ((volatile int *)&colors->ref_count, 1);
|
g_atomic_int_inc ((volatile int *)&colors->ref_count);
|
||||||
return colors;
|
return colors;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ st_icon_colors_unref (StIconColors *colors)
|
|||||||
g_return_if_fail (colors != NULL);
|
g_return_if_fail (colors != NULL);
|
||||||
g_return_if_fail (colors->ref_count > 0);
|
g_return_if_fail (colors->ref_count > 0);
|
||||||
|
|
||||||
if (g_atomic_int_exchange_and_add ((volatile int *)&colors->ref_count, -1) - 1 == 0)
|
if (g_atomic_int_dec_and_test ((volatile int *)&colors->ref_count))
|
||||||
g_slice_free (StIconColors, colors);
|
g_slice_free (StIconColors, colors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,6 @@ update_im_cursor_location (StIMText *self)
|
|||||||
{
|
{
|
||||||
StIMTextPrivate *priv = self->priv;
|
StIMTextPrivate *priv = self->priv;
|
||||||
ClutterText *clutter_text = CLUTTER_TEXT (self);
|
ClutterText *clutter_text = CLUTTER_TEXT (self);
|
||||||
ClutterActor *parent;
|
|
||||||
gint position;
|
gint position;
|
||||||
gfloat cursor_x, cursor_y, cursor_height;
|
gfloat cursor_x, cursor_y, cursor_height;
|
||||||
gfloat actor_x, actor_y;
|
gfloat actor_x, actor_y;
|
||||||
@ -113,25 +112,7 @@ update_im_cursor_location (StIMText *self)
|
|||||||
clutter_text_position_to_coords (clutter_text, position,
|
clutter_text_position_to_coords (clutter_text, position,
|
||||||
&cursor_x, &cursor_y, &cursor_height);
|
&cursor_x, &cursor_y, &cursor_height);
|
||||||
|
|
||||||
/* This is a workaround for a bug in Clutter where
|
clutter_actor_get_transformed_position (CLUTTER_ACTOR (self), &actor_x, &actor_y);
|
||||||
* clutter_actor_get_transformed_position doesn't work during
|
|
||||||
* clutter_actor_paint() because the actor has already set up
|
|
||||||
* a model-view matrix.
|
|
||||||
*
|
|
||||||
* http://bugzilla.openedhand.com/show_bug.cgi?id=1115
|
|
||||||
*/
|
|
||||||
actor_x = actor_y = 0.;
|
|
||||||
parent = CLUTTER_ACTOR (self);
|
|
||||||
while (parent)
|
|
||||||
{
|
|
||||||
gfloat x, y;
|
|
||||||
|
|
||||||
clutter_actor_get_position (parent, &x, &y);
|
|
||||||
actor_x += x;
|
|
||||||
actor_y += y;
|
|
||||||
|
|
||||||
parent = clutter_actor_get_parent (parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
area.x = (int)(0.5 + cursor_x + actor_x);
|
area.x = (int)(0.5 + cursor_x + actor_x);
|
||||||
area.y = (int)(0.5 + cursor_y + actor_y);
|
area.y = (int)(0.5 + cursor_y + actor_y);
|
||||||
@ -355,14 +336,6 @@ st_im_text_key_press_event (ClutterActor *actor,
|
|||||||
gdk_event_free ((GdkEvent *)event_gdk);
|
gdk_event_free ((GdkEvent *)event_gdk);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ClutterText:position isn't properly notified, so we have to
|
|
||||||
* check before/after to catch a keypress (like an arrow key)
|
|
||||||
* moving the cursor position, which should reset the IM context.
|
|
||||||
* (Resetting on notify::position would require a sentinel when
|
|
||||||
* committing text)
|
|
||||||
*
|
|
||||||
* http://bugzilla.openedhand.com/show_bug.cgi?id=1830
|
|
||||||
*/
|
|
||||||
old_position = clutter_text_get_cursor_position (clutter_text);
|
old_position = clutter_text_get_cursor_position (clutter_text);
|
||||||
|
|
||||||
if (!result &&
|
if (!result &&
|
||||||
|
@ -75,14 +75,6 @@ struct _StScrollBarPrivate
|
|||||||
ClutterAnimation *paging_animation;
|
ClutterAnimation *paging_animation;
|
||||||
|
|
||||||
guint vertical : 1;
|
guint vertical : 1;
|
||||||
|
|
||||||
/* We want to keep track of whether we have a currently valid
|
|
||||||
* allocation or not. This isn't exported from ClutterActor
|
|
||||||
* so we need to shadow the computations and track it ourselves.
|
|
||||||
*
|
|
||||||
* http://bugzilla.openedhand.com/show_bug.cgi?id=2024
|
|
||||||
*/
|
|
||||||
guint needs_allocation : 1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -283,28 +275,6 @@ st_scroll_bar_unmap (ClutterActor *actor)
|
|||||||
clutter_actor_unmap (priv->handle);
|
clutter_actor_unmap (priv->handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
st_scroll_bar_parent_set (ClutterActor *actor,
|
|
||||||
ClutterActor *old_parent)
|
|
||||||
{
|
|
||||||
StScrollBarPrivate *priv = ST_SCROLL_BAR (actor)->priv;
|
|
||||||
|
|
||||||
priv->needs_allocation = TRUE;
|
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->parent_set)
|
|
||||||
CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->parent_set (actor, old_parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
st_scroll_bar_queue_relayout (ClutterActor *actor)
|
|
||||||
{
|
|
||||||
StScrollBarPrivate *priv = ST_SCROLL_BAR (actor)->priv;
|
|
||||||
|
|
||||||
priv->needs_allocation = TRUE;
|
|
||||||
|
|
||||||
CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->queue_relayout (actor);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
scroll_bar_allocate_children (StScrollBar *bar,
|
scroll_bar_allocate_children (StScrollBar *bar,
|
||||||
const ClutterActorBox *box,
|
const ClutterActorBox *box,
|
||||||
@ -581,9 +551,6 @@ st_scroll_bar_allocate (ClutterActor *actor,
|
|||||||
ClutterAllocationFlags flags)
|
ClutterAllocationFlags flags)
|
||||||
{
|
{
|
||||||
StScrollBar *bar = ST_SCROLL_BAR (actor);
|
StScrollBar *bar = ST_SCROLL_BAR (actor);
|
||||||
StScrollBarPrivate *priv = bar->priv;
|
|
||||||
|
|
||||||
priv->needs_allocation = FALSE;
|
|
||||||
|
|
||||||
/* Chain up */
|
/* Chain up */
|
||||||
CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->allocate (actor, box, flags);
|
CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->allocate (actor, box, flags);
|
||||||
@ -594,7 +561,6 @@ st_scroll_bar_allocate (ClutterActor *actor,
|
|||||||
static void
|
static void
|
||||||
scroll_bar_update_positions (StScrollBar *bar)
|
scroll_bar_update_positions (StScrollBar *bar)
|
||||||
{
|
{
|
||||||
StScrollBarPrivate *priv = bar->priv;
|
|
||||||
ClutterActorBox box;
|
ClutterActorBox box;
|
||||||
|
|
||||||
/* Due to a change in the adjustments, we need to reposition our
|
/* Due to a change in the adjustments, we need to reposition our
|
||||||
@ -608,7 +574,7 @@ scroll_bar_update_positions (StScrollBar *bar)
|
|||||||
* allocate our children if we already have a valid allocation, and
|
* allocate our children if we already have a valid allocation, and
|
||||||
* otherwise just wait for the queued relayout.
|
* otherwise just wait for the queued relayout.
|
||||||
*/
|
*/
|
||||||
if (priv->needs_allocation)
|
if (!clutter_actor_has_allocation (CLUTTER_ACTOR (bar)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clutter_actor_get_allocation_box (CLUTTER_ACTOR (bar), &box);
|
clutter_actor_get_allocation_box (CLUTTER_ACTOR (bar), &box);
|
||||||
@ -718,8 +684,6 @@ st_scroll_bar_class_init (StScrollBarClass *klass)
|
|||||||
|
|
||||||
actor_class->get_preferred_width = st_scroll_bar_get_preferred_width;
|
actor_class->get_preferred_width = st_scroll_bar_get_preferred_width;
|
||||||
actor_class->get_preferred_height = st_scroll_bar_get_preferred_height;
|
actor_class->get_preferred_height = st_scroll_bar_get_preferred_height;
|
||||||
actor_class->parent_set = st_scroll_bar_parent_set;
|
|
||||||
actor_class->queue_relayout = st_scroll_bar_queue_relayout;
|
|
||||||
actor_class->allocate = st_scroll_bar_allocate;
|
actor_class->allocate = st_scroll_bar_allocate;
|
||||||
actor_class->paint = st_scroll_bar_paint;
|
actor_class->paint = st_scroll_bar_paint;
|
||||||
actor_class->pick = st_scroll_bar_pick;
|
actor_class->pick = st_scroll_bar_pick;
|
||||||
@ -1235,8 +1199,6 @@ st_scroll_bar_init (StScrollBar *self)
|
|||||||
|
|
||||||
g_signal_connect (self, "notify::reactive",
|
g_signal_connect (self, "notify::reactive",
|
||||||
G_CALLBACK (st_scroll_bar_notify_reactive), NULL);
|
G_CALLBACK (st_scroll_bar_notify_reactive), NULL);
|
||||||
|
|
||||||
self->priv->needs_allocation = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StWidget *
|
StWidget *
|
||||||
|
@ -40,6 +40,7 @@ static const gchar *fade_glsl_shader =
|
|||||||
"uniform float height;\n"
|
"uniform float height;\n"
|
||||||
"uniform float width;\n"
|
"uniform float width;\n"
|
||||||
"uniform float scrollbar_width;\n"
|
"uniform float scrollbar_width;\n"
|
||||||
|
"uniform float scrollbar_height;\n"
|
||||||
"uniform float offset_bottom;\n"
|
"uniform float offset_bottom;\n"
|
||||||
"uniform float offset_top;\n"
|
"uniform float offset_top;\n"
|
||||||
"uniform bool rtl;\n"
|
"uniform bool rtl;\n"
|
||||||
@ -52,10 +53,10 @@ static const gchar *fade_glsl_shader =
|
|||||||
" float ratio = 1.0;\n"
|
" float ratio = 1.0;\n"
|
||||||
" float fade_bottom_start = height - offset_bottom;\n"
|
" float fade_bottom_start = height - offset_bottom;\n"
|
||||||
" float ratio_top = y / offset_top;\n"
|
" float ratio_top = y / offset_top;\n"
|
||||||
" float ratio_bottom = (height - y)/(height - fade_bottom_start);\n"
|
" float ratio_bottom = (height - scrollbar_height - y)/(height - scrollbar_height - fade_bottom_start);\n"
|
||||||
" bool in_scroll_area = ((rtl && x > scrollbar_width) || (!rtl && x < (width - scrollbar_width)));\n"
|
" bool in_scroll_area = ((rtl && x > scrollbar_width) || (!rtl && x < (width - scrollbar_width)));\n"
|
||||||
" bool fade_top = y < offset_top && in_scroll_area;\n"
|
" bool fade_top = y < offset_top && in_scroll_area;\n"
|
||||||
" bool fade_bottom = y > fade_bottom_start && in_scroll_area;\n"
|
" bool fade_bottom = y > fade_bottom_start && in_scroll_area && (y < (height - scrollbar_height));\n"
|
||||||
"\n"
|
"\n"
|
||||||
" if (fade_top) {\n"
|
" if (fade_top) {\n"
|
||||||
" ratio = ratio_top;\n"
|
" ratio = ratio_top;\n"
|
||||||
@ -81,6 +82,7 @@ struct _StScrollViewFade
|
|||||||
gint height_uniform;
|
gint height_uniform;
|
||||||
gint width_uniform;
|
gint width_uniform;
|
||||||
gint scrollbar_width_uniform;
|
gint scrollbar_width_uniform;
|
||||||
|
gint scrollbar_height_uniform;
|
||||||
gint offset_top_uniform;
|
gint offset_top_uniform;
|
||||||
gint offset_bottom_uniform;
|
gint offset_bottom_uniform;
|
||||||
gint rtl_uniform;
|
gint rtl_uniform;
|
||||||
@ -145,6 +147,8 @@ st_scroll_view_fade_pre_paint (ClutterEffect *effect)
|
|||||||
cogl_program_get_uniform_location (self->program, "width");
|
cogl_program_get_uniform_location (self->program, "width");
|
||||||
self->scrollbar_width_uniform =
|
self->scrollbar_width_uniform =
|
||||||
cogl_program_get_uniform_location (self->program, "scrollbar_width");
|
cogl_program_get_uniform_location (self->program, "scrollbar_width");
|
||||||
|
self->scrollbar_height_uniform =
|
||||||
|
cogl_program_get_uniform_location (self->program, "scrollbar_height");
|
||||||
self->rtl_uniform =
|
self->rtl_uniform =
|
||||||
cogl_program_get_uniform_location (self->program, "rtl");
|
cogl_program_get_uniform_location (self->program, "rtl");
|
||||||
self->offset_top_uniform =
|
self->offset_top_uniform =
|
||||||
@ -177,6 +181,13 @@ st_scroll_view_fade_paint_target (ClutterOffscreenEffect *effect)
|
|||||||
|
|
||||||
gdouble value, lower, upper, page_size;
|
gdouble value, lower, upper, page_size;
|
||||||
ClutterActor *vscroll = st_scroll_view_get_vscroll_bar (ST_SCROLL_VIEW (self->actor));
|
ClutterActor *vscroll = st_scroll_view_get_vscroll_bar (ST_SCROLL_VIEW (self->actor));
|
||||||
|
ClutterActor *hscroll = st_scroll_view_get_hscroll_bar (ST_SCROLL_VIEW (self->actor));
|
||||||
|
gboolean h_scroll_visible, v_scroll_visible;
|
||||||
|
|
||||||
|
g_object_get (ST_SCROLL_VIEW (self->actor),
|
||||||
|
"hscrollbar-visible", &h_scroll_visible,
|
||||||
|
"vscrollbar-visible", &v_scroll_visible,
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (self->program == COGL_INVALID_HANDLE)
|
if (self->program == COGL_INVALID_HANDLE)
|
||||||
goto out;
|
goto out;
|
||||||
@ -204,7 +215,9 @@ st_scroll_view_fade_paint_target (ClutterOffscreenEffect *effect)
|
|||||||
if (self->width_uniform > -1)
|
if (self->width_uniform > -1)
|
||||||
cogl_program_set_uniform_1f (self->program, self->width_uniform, clutter_actor_get_width (self->actor));
|
cogl_program_set_uniform_1f (self->program, self->width_uniform, clutter_actor_get_width (self->actor));
|
||||||
if (self->scrollbar_width_uniform > -1)
|
if (self->scrollbar_width_uniform > -1)
|
||||||
cogl_program_set_uniform_1f (self->program, self->scrollbar_width_uniform, clutter_actor_get_width (vscroll));
|
cogl_program_set_uniform_1f (self->program, self->scrollbar_width_uniform, v_scroll_visible ? clutter_actor_get_width (vscroll) : 0);
|
||||||
|
if (self->scrollbar_height_uniform > -1)
|
||||||
|
cogl_program_set_uniform_1f (self->program, self->scrollbar_height_uniform, h_scroll_visible ? clutter_actor_get_height (hscroll) : 0);
|
||||||
if (self->rtl_uniform > -1)
|
if (self->rtl_uniform > -1)
|
||||||
cogl_program_set_uniform_1i (self->program, self->rtl_uniform, (st_widget_get_direction (ST_WIDGET (self->actor)) == ST_TEXT_DIRECTION_RTL));
|
cogl_program_set_uniform_1i (self->program, self->rtl_uniform, (st_widget_get_direction (ST_WIDGET (self->actor)) == ST_TEXT_DIRECTION_RTL));
|
||||||
|
|
||||||
@ -416,6 +429,7 @@ st_scroll_view_fade_init (StScrollViewFade *self)
|
|||||||
self->height_uniform = -1;
|
self->height_uniform = -1;
|
||||||
self->width_uniform = -1;
|
self->width_uniform = -1;
|
||||||
self->scrollbar_width_uniform = -1;
|
self->scrollbar_width_uniform = -1;
|
||||||
|
self->scrollbar_height_uniform = -1;
|
||||||
self->rtl_uniform = -1;
|
self->rtl_uniform = -1;
|
||||||
self->offset_top_uniform = -1;
|
self->offset_top_uniform = -1;
|
||||||
self->offset_bottom_uniform = -1;
|
self->offset_bottom_uniform = -1;
|
||||||
|
@ -97,7 +97,6 @@ struct _StScrollViewPrivate
|
|||||||
gfloat row_size;
|
gfloat row_size;
|
||||||
gfloat column_size;
|
gfloat column_size;
|
||||||
|
|
||||||
gboolean vfade;
|
|
||||||
StScrollViewFade *vfade_effect;
|
StScrollViewFade *vfade_effect;
|
||||||
|
|
||||||
gboolean row_size_set : 1;
|
gboolean row_size_set : 1;
|
||||||
@ -114,8 +113,9 @@ enum {
|
|||||||
PROP_VSCROLL,
|
PROP_VSCROLL,
|
||||||
PROP_HSCROLLBAR_POLICY,
|
PROP_HSCROLLBAR_POLICY,
|
||||||
PROP_VSCROLLBAR_POLICY,
|
PROP_VSCROLLBAR_POLICY,
|
||||||
|
PROP_HSCROLLBAR_VISIBLE,
|
||||||
|
PROP_VSCROLLBAR_VISIBLE,
|
||||||
PROP_MOUSE_SCROLL,
|
PROP_MOUSE_SCROLL,
|
||||||
PROP_VFADE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -140,54 +140,57 @@ st_scroll_view_get_property (GObject *object,
|
|||||||
case PROP_VSCROLLBAR_POLICY:
|
case PROP_VSCROLLBAR_POLICY:
|
||||||
g_value_set_enum (value, priv->vscrollbar_policy);
|
g_value_set_enum (value, priv->vscrollbar_policy);
|
||||||
break;
|
break;
|
||||||
|
case PROP_HSCROLLBAR_VISIBLE:
|
||||||
|
g_value_set_boolean (value, priv->hscrollbar_visible);
|
||||||
|
break;
|
||||||
|
case PROP_VSCROLLBAR_VISIBLE:
|
||||||
|
g_value_set_boolean (value, priv->vscrollbar_visible);
|
||||||
|
break;
|
||||||
case PROP_MOUSE_SCROLL:
|
case PROP_MOUSE_SCROLL:
|
||||||
g_value_set_boolean (value, priv->mouse_scroll);
|
g_value_set_boolean (value, priv->mouse_scroll);
|
||||||
break;
|
break;
|
||||||
case PROP_VFADE:
|
|
||||||
g_value_set_boolean (value, priv->vfade);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* st_scroll_view_set_vfade:
|
* st_scroll_view_update_vfade_effect:
|
||||||
* @self: a #StScrollView
|
* @self: a #StScrollView
|
||||||
* @vfade: Whether to enable the vertical fade effect
|
* @fade_offset: The length of the fade effect, in pixels.
|
||||||
*
|
*
|
||||||
* Sets whether to fade the content at the top and bottom of the area when not
|
* Sets the height of the fade area area in pixels. A value of 0
|
||||||
* fully scrolled to that edge.
|
* disables the effect.
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
st_scroll_view_set_vfade (StScrollView *self,
|
st_scroll_view_update_vfade_effect (StScrollView *self,
|
||||||
gboolean vfade)
|
float fade_offset)
|
||||||
{
|
{
|
||||||
StScrollViewPrivate *priv = ST_SCROLL_VIEW (self)->priv;
|
StScrollViewPrivate *priv = ST_SCROLL_VIEW (self)->priv;
|
||||||
|
|
||||||
vfade = vfade != FALSE;
|
/* A fade amount of more than 0 enables the effect. */
|
||||||
if (priv->vfade == vfade)
|
if (fade_offset > 0.)
|
||||||
return;
|
|
||||||
|
|
||||||
priv->vfade = vfade;
|
|
||||||
|
|
||||||
if (vfade)
|
|
||||||
{
|
{
|
||||||
if (priv->vfade_effect == NULL)
|
if (priv->vfade_effect == NULL) {
|
||||||
priv->vfade_effect = g_object_new (ST_TYPE_SCROLL_VIEW_FADE, NULL);
|
priv->vfade_effect = g_object_new (ST_TYPE_SCROLL_VIEW_FADE, NULL);
|
||||||
|
|
||||||
clutter_actor_add_effect_with_name (CLUTTER_ACTOR (self), "vfade",
|
clutter_actor_add_effect_with_name (CLUTTER_ACTOR (self), "vfade",
|
||||||
CLUTTER_EFFECT (priv->vfade_effect));
|
CLUTTER_EFFECT (priv->vfade_effect));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_object_set (priv->vfade_effect,
|
||||||
|
"fade-offset", fade_offset,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (priv->vfade_effect != NULL) {
|
||||||
clutter_actor_remove_effect (CLUTTER_ACTOR (self), CLUTTER_EFFECT (priv->vfade_effect));
|
clutter_actor_remove_effect (CLUTTER_ACTOR (self), CLUTTER_EFFECT (priv->vfade_effect));
|
||||||
priv->vfade_effect = NULL;
|
priv->vfade_effect = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (self), "vfade");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -201,9 +204,6 @@ st_scroll_view_set_property (GObject *object,
|
|||||||
|
|
||||||
switch (property_id)
|
switch (property_id)
|
||||||
{
|
{
|
||||||
case PROP_VFADE:
|
|
||||||
st_scroll_view_set_vfade (self, g_value_get_boolean (value));
|
|
||||||
break;
|
|
||||||
case PROP_MOUSE_SCROLL:
|
case PROP_MOUSE_SCROLL:
|
||||||
st_scroll_view_set_mouse_scrolling (self,
|
st_scroll_view_set_mouse_scrolling (self,
|
||||||
g_value_get_boolean (value));
|
g_value_get_boolean (value));
|
||||||
@ -654,14 +654,33 @@ st_scroll_view_allocate (ClutterActor *actor,
|
|||||||
if (priv->child)
|
if (priv->child)
|
||||||
clutter_actor_allocate (priv->child, &child_box, flags);
|
clutter_actor_allocate (priv->child, &child_box, flags);
|
||||||
|
|
||||||
|
if (priv->hscrollbar_visible != hscrollbar_visible)
|
||||||
|
{
|
||||||
|
g_object_freeze_notify (G_OBJECT (actor));
|
||||||
priv->hscrollbar_visible = hscrollbar_visible;
|
priv->hscrollbar_visible = hscrollbar_visible;
|
||||||
|
g_object_notify (G_OBJECT (actor), "hscrollbar-visible");
|
||||||
|
g_object_thaw_notify (G_OBJECT (actor));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priv->vscrollbar_visible != vscrollbar_visible)
|
||||||
|
{
|
||||||
|
g_object_freeze_notify (G_OBJECT (actor));
|
||||||
priv->vscrollbar_visible = vscrollbar_visible;
|
priv->vscrollbar_visible = vscrollbar_visible;
|
||||||
|
g_object_notify (G_OBJECT (actor), "vscrollbar-visible");
|
||||||
|
g_object_thaw_notify (G_OBJECT (actor));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
st_scroll_view_style_changed (StWidget *widget)
|
st_scroll_view_style_changed (StWidget *widget)
|
||||||
{
|
{
|
||||||
StScrollViewPrivate *priv = ST_SCROLL_VIEW (widget)->priv;
|
StScrollView *self = ST_SCROLL_VIEW (widget);
|
||||||
|
StScrollViewPrivate *priv = self->priv;
|
||||||
|
|
||||||
|
StThemeNode *theme_node = st_widget_get_theme_node (widget);
|
||||||
|
gdouble fade_offset = st_theme_node_get_length (theme_node, "-st-vfade-offset");
|
||||||
|
st_scroll_view_update_vfade_effect (self, fade_offset);
|
||||||
|
|
||||||
st_widget_style_changed (ST_WIDGET (priv->hscroll));
|
st_widget_style_changed (ST_WIDGET (priv->hscroll));
|
||||||
st_widget_style_changed (ST_WIDGET (priv->vscroll));
|
st_widget_style_changed (ST_WIDGET (priv->vscroll));
|
||||||
@ -789,6 +808,20 @@ st_scroll_view_class_init (StScrollViewClass *klass)
|
|||||||
G_PARAM_READWRITE);
|
G_PARAM_READWRITE);
|
||||||
g_object_class_install_property (object_class, PROP_HSCROLLBAR_POLICY, pspec);
|
g_object_class_install_property (object_class, PROP_HSCROLLBAR_POLICY, pspec);
|
||||||
|
|
||||||
|
pspec = g_param_spec_boolean ("hscrollbar-visible",
|
||||||
|
"Horizontal Scrollbar Visibility",
|
||||||
|
"Whether the horizontal scrollbar is visible",
|
||||||
|
TRUE,
|
||||||
|
G_PARAM_READABLE);
|
||||||
|
g_object_class_install_property (object_class, PROP_HSCROLLBAR_VISIBLE, pspec);
|
||||||
|
|
||||||
|
pspec = g_param_spec_boolean ("vscrollbar-visible",
|
||||||
|
"Vertical Scrollbar Visibility",
|
||||||
|
"Whether the vertical scrollbar is visible",
|
||||||
|
TRUE,
|
||||||
|
G_PARAM_READABLE);
|
||||||
|
g_object_class_install_property (object_class, PROP_VSCROLLBAR_VISIBLE, pspec);
|
||||||
|
|
||||||
pspec = g_param_spec_boolean ("enable-mouse-scrolling",
|
pspec = g_param_spec_boolean ("enable-mouse-scrolling",
|
||||||
"Enable Mouse Scrolling",
|
"Enable Mouse Scrolling",
|
||||||
"Enable automatic mouse wheel scrolling",
|
"Enable automatic mouse wheel scrolling",
|
||||||
@ -798,14 +831,6 @@ st_scroll_view_class_init (StScrollViewClass *klass)
|
|||||||
PROP_MOUSE_SCROLL,
|
PROP_MOUSE_SCROLL,
|
||||||
pspec);
|
pspec);
|
||||||
|
|
||||||
pspec = g_param_spec_boolean ("vfade",
|
|
||||||
"Vertical Shadows",
|
|
||||||
"Fade the content at the top and and bottom of the area unless fully scrolled to that edge",
|
|
||||||
FALSE,
|
|
||||||
G_PARAM_READWRITE);
|
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_VFADE,
|
|
||||||
pspec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -84,9 +84,6 @@ void st_scroll_view_set_policy (StScrollView *scroll,
|
|||||||
GtkPolicyType hscroll,
|
GtkPolicyType hscroll,
|
||||||
GtkPolicyType vscroll);
|
GtkPolicyType vscroll);
|
||||||
|
|
||||||
void st_scroll_view_set_vfade (StScrollView *self,
|
|
||||||
gboolean vfade);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __ST_SCROLL_VIEW_H__ */
|
#endif /* __ST_SCROLL_VIEW_H__ */
|
||||||
|
@ -82,7 +82,7 @@ st_shadow_ref (StShadow *shadow)
|
|||||||
g_return_val_if_fail (shadow != NULL, NULL);
|
g_return_val_if_fail (shadow != NULL, NULL);
|
||||||
g_return_val_if_fail (shadow->ref_count > 0, shadow);
|
g_return_val_if_fail (shadow->ref_count > 0, shadow);
|
||||||
|
|
||||||
g_atomic_int_add (&shadow->ref_count, 1);
|
g_atomic_int_inc (&shadow->ref_count);
|
||||||
return shadow;
|
return shadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ st_shadow_unref (StShadow *shadow)
|
|||||||
g_return_if_fail (shadow != NULL);
|
g_return_if_fail (shadow != NULL);
|
||||||
g_return_if_fail (shadow->ref_count > 0);
|
g_return_if_fail (shadow->ref_count > 0);
|
||||||
|
|
||||||
if (g_atomic_int_exchange_and_add (&shadow->ref_count, -1) - 1 == 0)
|
if (g_atomic_int_dec_and_test (&shadow->ref_count))
|
||||||
g_slice_free (StShadow, shadow);
|
g_slice_free (StShadow, shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1154,7 +1154,6 @@ create_texture_and_ensure_request (StTextureCache *cache,
|
|||||||
{
|
{
|
||||||
/* Not cached and no pending request, create it */
|
/* Not cached and no pending request, create it */
|
||||||
*request = g_new0 (AsyncTextureLoadData, 1);
|
*request = g_new0 (AsyncTextureLoadData, 1);
|
||||||
(*request)->key = g_strdup (key);
|
|
||||||
g_hash_table_insert (cache->priv->outstanding_requests, g_strdup (key), *request);
|
g_hash_table_insert (cache->priv->outstanding_requests, g_strdup (key), *request);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1209,9 +1208,10 @@ load_gicon_with_colors (StTextureCache *cache,
|
|||||||
info = gtk_icon_theme_lookup_by_gicon (theme, icon, size, GTK_ICON_LOOKUP_USE_BUILTIN);
|
info = gtk_icon_theme_lookup_by_gicon (theme, icon, size, GTK_ICON_LOOKUP_USE_BUILTIN);
|
||||||
if (info != NULL)
|
if (info != NULL)
|
||||||
{
|
{
|
||||||
|
/* Transfer ownership of key */
|
||||||
|
request->key = key;
|
||||||
/* hardcoded here for now; we should actually blow this away on
|
/* hardcoded here for now; we should actually blow this away on
|
||||||
* icon theme changes probably */
|
* icon theme changes probably */
|
||||||
request->key = g_strdup (key);
|
|
||||||
request->policy = ST_TEXTURE_CACHE_POLICY_FOREVER;
|
request->policy = ST_TEXTURE_CACHE_POLICY_FOREVER;
|
||||||
request->icon = g_object_ref (icon);
|
request->icon = g_object_ref (icon);
|
||||||
request->icon_info = info;
|
request->icon_info = info;
|
||||||
@ -1227,14 +1227,13 @@ load_gicon_with_colors (StTextureCache *cache,
|
|||||||
*/
|
*/
|
||||||
g_slist_foreach (request->textures, (GFunc) g_object_unref, NULL);
|
g_slist_foreach (request->textures, (GFunc) g_object_unref, NULL);
|
||||||
g_slist_free (request->textures);
|
g_slist_free (request->textures);
|
||||||
g_free (request->key);
|
|
||||||
g_free (request);
|
g_free (request);
|
||||||
g_hash_table_remove (cache->priv->outstanding_requests, key);
|
g_hash_table_remove (cache->priv->outstanding_requests, key);
|
||||||
|
g_free (key);
|
||||||
g_object_unref (texture);
|
g_object_unref (texture);
|
||||||
texture = NULL;
|
texture = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (key);
|
|
||||||
return CLUTTER_ACTOR (texture);
|
return CLUTTER_ACTOR (texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,6 +256,30 @@ st_theme_unload_stylesheet (StTheme *theme,
|
|||||||
cr_stylesheet_unref (stylesheet);
|
cr_stylesheet_unref (stylesheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* st_theme_get_custom_stylesheets:
|
||||||
|
* @theme: an #StTheme
|
||||||
|
*
|
||||||
|
* Returns: (transfer full) (element-type utf8): the list of stylesheet filenames
|
||||||
|
* that were loaded with st_theme_load_stylesheet()
|
||||||
|
*/
|
||||||
|
GSList*
|
||||||
|
st_theme_get_custom_stylesheets (StTheme *theme)
|
||||||
|
{
|
||||||
|
GSList *result = NULL;
|
||||||
|
GSList *iter;
|
||||||
|
|
||||||
|
for (iter = theme->custom_stylesheets; iter; iter = iter->next)
|
||||||
|
{
|
||||||
|
CRStyleSheet *stylesheet = iter->data;
|
||||||
|
gchar *filename = g_hash_table_lookup (theme->filenames_by_stylesheet, stylesheet);
|
||||||
|
|
||||||
|
result = g_slist_prepend (result, g_strdup (filename));
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
static GObject *
|
static GObject *
|
||||||
st_theme_constructor (GType type,
|
st_theme_constructor (GType type,
|
||||||
guint n_construct_properties,
|
guint n_construct_properties,
|
||||||
|
@ -52,8 +52,8 @@ StTheme *st_theme_new (const char *application_stylesheet,
|
|||||||
const char *default_stylesheet);
|
const char *default_stylesheet);
|
||||||
|
|
||||||
gboolean st_theme_load_stylesheet (StTheme *theme, const char *path, GError **error);
|
gboolean st_theme_load_stylesheet (StTheme *theme, const char *path, GError **error);
|
||||||
|
|
||||||
void st_theme_unload_stylesheet (StTheme *theme, const char *path);
|
void st_theme_unload_stylesheet (StTheme *theme, const char *path);
|
||||||
|
GSList *st_theme_get_custom_stylesheets (StTheme *theme);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ function toggleFade(button) {
|
|||||||
button.label = 'No';
|
button.label = 'No';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
scrollView.set_vfade(vfade.label == 'Yes');
|
scrollView.set_style_class_name(button.label == 'Yes' ? 'vfade' : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
vfade.connect('clicked', function() { toggleFade(vfade); });
|
vfade.connect('clicked', function() { toggleFade(vfade); });
|
||||||
|
@ -68,3 +68,7 @@ stage {
|
|||||||
.push-button:active {
|
.push-button:active {
|
||||||
background: #ccbb99;
|
background: #ccbb99;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vfade {
|
||||||
|
-st-fade-offset: 68px;
|
||||||
|
}
|
@ -62,8 +62,8 @@ fi
|
|||||||
# iso-codes, libical, libxml2, ORBit2, pam, python, readline,
|
# iso-codes, libical, libxml2, ORBit2, pam, python, readline,
|
||||||
# spidermonkey ({mozilla,firefox,xulrunner}-js), startup-notification,
|
# spidermonkey ({mozilla,firefox,xulrunner}-js), startup-notification,
|
||||||
# xdamage, icon-naming-utils, upower, libtool-ltdl, libvorbis,
|
# xdamage, icon-naming-utils, upower, libtool-ltdl, libvorbis,
|
||||||
# libgcrypt, libtasn1, libgnome-keyring, libgtop, cups,
|
# libgcrypt, libtasn1, libgnome-keyring, libgtop, cups, xcb, WebKit-gtk
|
||||||
# libusb, libproxy, libdb, libproxy, sqlite
|
# libusb, libproxy, libdb, libproxy, sqlite, gudev, lcms2, sane
|
||||||
#
|
#
|
||||||
# Non-devel packages needed by gnome-shell and its deps:
|
# Non-devel packages needed by gnome-shell and its deps:
|
||||||
# glxinfo, gstreamer-plugins-base, gstreamer-plugins-good,
|
# glxinfo, gstreamer-plugins-base, gstreamer-plugins-good,
|
||||||
@ -83,7 +83,8 @@ if test "x$system" = xUbuntu -o "x$system" = xDebian -o "x$system" = xLinuxMint
|
|||||||
libgstreamer0.10-dev gstreamer0.10-plugins-base gstreamer0.10-plugins-good
|
libgstreamer0.10-dev gstreamer0.10-plugins-base gstreamer0.10-plugins-good
|
||||||
libltdl-dev libvorbis-dev iso-codes libgnome-keyring-dev libusb-1.0-0-dev
|
libltdl-dev libvorbis-dev iso-codes libgnome-keyring-dev libusb-1.0-0-dev
|
||||||
libupower-glib-dev libcups2-dev libproxy-dev libdb-dev libproxy-dev
|
libupower-glib-dev libcups2-dev libproxy-dev libdb-dev libproxy-dev
|
||||||
libsqlite3-dev
|
libsqlite3-dev libgudev-1.0-dev libsane-dev libwebkitgtk-3.0-0
|
||||||
|
libx11-xcb-dev libxcb-event1-dev libxcb-aux0-dev
|
||||||
"
|
"
|
||||||
|
|
||||||
if apt-cache show autopoint > /dev/null 2> /dev/null; then
|
if apt-cache show autopoint > /dev/null 2> /dev/null; then
|
||||||
@ -118,15 +119,17 @@ if test "x$system" = xFedora ; then
|
|||||||
pulseaudio-libs-devel python-devel pygobject2 readline-devel xulrunner-devel
|
pulseaudio-libs-devel python-devel pygobject2 readline-devel xulrunner-devel
|
||||||
libXdamage-devel libcroco-devel libxml2-devel gstreamer-devel
|
libXdamage-devel libcroco-devel libxml2-devel gstreamer-devel
|
||||||
gstreamer-plugins-base gstreamer-plugins-good glx-utils expat-devel
|
gstreamer-plugins-base gstreamer-plugins-good glx-utils expat-devel
|
||||||
startup-notification-devel zenity
|
startup-notification-devel zenity webkitgtk3-devel
|
||||||
icon-naming-utils upower-devel libtool-ltdl-devel libvorbis-devel
|
icon-naming-utils upower-devel libtool-ltdl-devel libvorbis-devel
|
||||||
iso-codes-devel libgcrypt-devel libtasn1-devel libtasn1-tools libusb1-devel
|
iso-codes-devel libgcrypt-devel libtasn1-devel libtasn1-tools libusb1-devel
|
||||||
libgnome-keyring-devel libgtop2-devel cups-devel db4-devel libproxy-devel
|
libgnome-keyring-devel libgtop2-devel cups-devel db4-devel libproxy-devel
|
||||||
sqlite-devel
|
sqlite-devel libgudev1-devel lcms2-devel sane-backends-devel xcb-util-devel
|
||||||
"
|
"
|
||||||
|
|
||||||
if expr $version \>= 14 > /dev/null ; then
|
if expr $version = 14 > /dev/null ; then
|
||||||
reqd="$reqd gettext-autopoint"
|
reqd="$reqd gettext-autopoint"
|
||||||
|
elif expr $version \>= 15 > /dev/null ; then
|
||||||
|
reqd="$reqd gettext-devel"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for pkg in $reqd ; do
|
for pkg in $reqd ; do
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
href="http://0pointer.de/lennart/projects/"/>
|
href="http://0pointer.de/lennart/projects/"/>
|
||||||
<repository type="git" name="git.freedesktop.org"
|
<repository type="git" name="git.freedesktop.org"
|
||||||
href="git://anongit.freedesktop.org"/>
|
href="git://anongit.freedesktop.org"/>
|
||||||
|
<repository type="git" name="colord.gitorious.org"
|
||||||
|
href="git://gitorious.org/colord/master.git"/>
|
||||||
|
|
||||||
<autotools id="gobject-introspection">
|
<autotools id="gobject-introspection">
|
||||||
<branch repo="git.gnome.org" module="gobject-introspection"/>
|
<branch repo="git.gnome.org" module="gobject-introspection"/>
|
||||||
@ -25,10 +27,10 @@
|
|||||||
<branch repo="git.gnome.org" module="glib"/>
|
<branch repo="git.gnome.org" module="glib"/>
|
||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
<tarball id="vala" version="0.11.7" autogenargs="--enable-vapigen">
|
<tarball id="vala" version="0.12" autogenargs="--enable-vapigen">
|
||||||
<source href="http://ftp.gnome.org/pub/GNOME/sources/vala/0.11/vala-0.11.7.tar.bz2"
|
<source href="http://download.gnome.org/sources/vala/0.12/vala-0.12.0.tar.bz2"
|
||||||
hash="sha256:d82a17003cb999b3411615631ca82849900986177a8bc6bec2333a5101b226f6"
|
hash="sha256:9a398e16fba2c78c9bcadb05e489c9bc318e34901d43451ac5d2ce4bc46b1225"
|
||||||
md5sum="5515f32552ee45ed5c7541c119009caa" size="2845070"/>
|
md5sum="b11fafaa705085342156312e356b6ff2" size="2852200"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dep package="glib"/>
|
<dep package="glib"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@ -61,6 +63,12 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
|
<tarball id="startup-notification" version="0.12">
|
||||||
|
<source href="http://www.freedesktop.org/software/startup-notification/releases/startup-notification-0.12.tar.gz"
|
||||||
|
hash="sha256:3c391f7e930c583095045cd2d10eb73a64f085c7fde9d260f2652c7cb3cfbe4a"
|
||||||
|
size="355285"/>
|
||||||
|
</tarball>
|
||||||
|
|
||||||
<autotools id="pango">
|
<autotools id="pango">
|
||||||
<branch repo="git.gnome.org" module="pango"/>
|
<branch repo="git.gnome.org" module="pango"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -109,9 +117,21 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
<autotools id="clutter">
|
<autotools id="cogl">
|
||||||
<branch repo="git.gnome.org" module="clutter" revision="clutter-1.6"/>
|
<branch repo="git.gnome.org" module="cogl"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dep package="glib"/>
|
||||||
|
<dep package="gobject-introspection"/>
|
||||||
|
<dep package="cairo"/>
|
||||||
|
<dep package="pango"/>
|
||||||
|
<dep package="gdk-pixbuf"/>
|
||||||
|
</dependencies>
|
||||||
|
</autotools>
|
||||||
|
|
||||||
|
<autotools id="clutter">
|
||||||
|
<branch repo="git.gnome.org" module="clutter"/>
|
||||||
|
<dependencies>
|
||||||
|
<dep package="cogl"/>
|
||||||
<dep package="json-glib"/>
|
<dep package="json-glib"/>
|
||||||
<dep package="gobject-introspection"/>
|
<dep package="gobject-introspection"/>
|
||||||
<dep package="atk"/>
|
<dep package="atk"/>
|
||||||
@ -187,6 +207,25 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
|
<autotools id="librest">
|
||||||
|
<branch repo="git.gnome.org" module="librest"/>
|
||||||
|
<dependencies>
|
||||||
|
<dep package="glib"/>
|
||||||
|
<dep package="libsoup"/>
|
||||||
|
</dependencies>
|
||||||
|
</autotools>
|
||||||
|
|
||||||
|
<autotools id="gnome-online-accounts">
|
||||||
|
<branch repo="git.gnome.org" module="gnome-online-accounts"/>
|
||||||
|
<dependencies>
|
||||||
|
<dep package="glib"/>
|
||||||
|
<dep package="gtk3"/>
|
||||||
|
<dep package="json-glib"/>
|
||||||
|
<dep package="libnotify"/>
|
||||||
|
<dep package="librest"/>
|
||||||
|
</dependencies>
|
||||||
|
</autotools>
|
||||||
|
|
||||||
<autotools id="gnome-control-center">
|
<autotools id="gnome-control-center">
|
||||||
<branch repo="git.gnome.org" module="gnome-control-center"/>
|
<branch repo="git.gnome.org" module="gnome-control-center"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -194,9 +233,23 @@
|
|||||||
<dep package="libcanberra"/>
|
<dep package="libcanberra"/>
|
||||||
<dep package="gnome-desktop-3"/>
|
<dep package="gnome-desktop-3"/>
|
||||||
<dep package="gnome-settings-daemon"/>
|
<dep package="gnome-settings-daemon"/>
|
||||||
|
<dep package="gnome-online-accounts"/>
|
||||||
|
<dep package="colord"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
|
<autotools id="colord" autogenargs="--disable-examples">
|
||||||
|
<branch repo="colord.gitorious.org" checkoutdir="colord" module="master"/>
|
||||||
|
<dependencies>
|
||||||
|
<dep package="glib"/>
|
||||||
|
<!-- and cups -->
|
||||||
|
<!-- and sane -->
|
||||||
|
</dependencies>
|
||||||
|
<suggests>
|
||||||
|
<dep package="polkit"/>
|
||||||
|
</suggests>
|
||||||
|
</autotools>
|
||||||
|
|
||||||
<autotools id="glib-networking">
|
<autotools id="glib-networking">
|
||||||
<branch repo="git.gnome.org" module="glib-networking"/>
|
<branch repo="git.gnome.org" module="glib-networking"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -215,8 +268,12 @@
|
|||||||
<autotools id="libgdata">
|
<autotools id="libgdata">
|
||||||
<branch repo="git.gnome.org" module="libgdata"/>
|
<branch repo="git.gnome.org" module="libgdata"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dep package="glib"/>
|
||||||
<dep package="libsoup"/>
|
<dep package="libsoup"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
<suggests>
|
||||||
|
<dep package="gobject-introspection"/>
|
||||||
|
</suggests>
|
||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
<autotools id="libgweather">
|
<autotools id="libgweather">
|
||||||
@ -233,6 +290,7 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
<dep package="libgweather"/>
|
<dep package="libgweather"/>
|
||||||
<dep package="libgdata"/>
|
<dep package="libgdata"/>
|
||||||
|
<dep package="gnome-online-accounts"/>
|
||||||
<dep package="gtk3"/>
|
<dep package="gtk3"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</autotools>
|
</autotools>
|
||||||
@ -267,6 +325,7 @@
|
|||||||
<autotools id="gnome-shell" autogenargs="--enable-jhbuild-wrapper-script">
|
<autotools id="gnome-shell" autogenargs="--enable-jhbuild-wrapper-script">
|
||||||
<branch repo="git.gnome.org" module="gnome-shell"/>
|
<branch repo="git.gnome.org" module="gnome-shell"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dep package="startup-notification"/>
|
||||||
<dep package="evolution-data-server"/>
|
<dep package="evolution-data-server"/>
|
||||||
<dep package="gobject-introspection"/>
|
<dep package="gobject-introspection"/>
|
||||||
<dep package="mutter"/>
|
<dep package="mutter"/>
|
||||||
@ -356,6 +415,7 @@
|
|||||||
<dep package="libgnomekbd"/>
|
<dep package="libgnomekbd"/>
|
||||||
<dep package="libnotify" />
|
<dep package="libnotify" />
|
||||||
<dep package="polkit"/>
|
<dep package="polkit"/>
|
||||||
|
<dep package="colord"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</autotools>
|
</autotools>
|
||||||
|
|
||||||
@ -377,4 +437,8 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</tarball>
|
</tarball>
|
||||||
|
|
||||||
|
<autotools id="caribou">
|
||||||
|
<branch repo="git.gnome.org" module="caribou"/>
|
||||||
|
</autotools>
|
||||||
|
|
||||||
</moduleset>
|
</moduleset>
|
||||||
|
Reference in New Issue
Block a user