Compare commits

..

31 Commits

Author SHA1 Message Date
3d209838a1 Bump version to 3.25.3
Update NEWS.
2017-06-21 21:58:31 +02:00
69396bbc1f build: Drop obsolete dist file
We no longer use ruby-sass.
2017-06-21 21:58:31 +02:00
a0140fb2c7 calendar-server: Specify the timezone for the view query
Otherwise UTC is used which results in a different interpretation of
floating time events. This then could lead to a mismatch with events
generated e_cal_client_generate_instances_sync() which always uses the
default timezone. Such a mismatch would then cause constant invalidation
and reloading.

https://bugzilla.gnome.org/show_bug.cgi?id=781950
2017-06-16 17:13:50 +02:00
d8e7fc403b appDisplay: Add a null-check for the scrollview's fade ClutterEffect
This effect will only be created when the StScrollView actor has either
a non-zero vertical or horizontal fade offset defined, so we need to
add a null-check in these two cases before assuming it's there.

https://bugzilla.gnome.org/show_bug.cgi?id=783823
2017-06-15 15:01:51 +01:00
3d6fdc8ae2 sessionMode: Drop unused import 2017-06-15 15:52:37 +02:00
47b109d25b tests/entry: add interactive tests for entry hints
https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-14 14:00:57 -07:00
6ed7034a6b st-entry: Add support for a "hint actor"
This allows a full ClutterActor to be used as hint in the entry, instead
of a simple string.

The string case has been now re-implemented on top of the hint actor.

https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-14 14:00:57 -07:00
4e07d0b073 st-entry: don't possibly allocate actors a negative size
Clutter will complain about this, so protect the code against such edge
case.

https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-14 14:00:57 -07:00
708f65e388 tests/entry: add text-shadow
Also make the text larger and add an example string, since event
delivery does not seem to work properly under tests.

https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-14 14:00:57 -07:00
8783654b38 st-entry: Add support for the text-shadow CSS property
It's supported everywhere else, we should also support it here.

https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-14 14:00:57 -07:00
4c72244c2e tests/entry: remove unused import
This is actually harmful, since it will drag a depepdency chain that
we're not able to satisfy from the tests.

https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-14 13:59:15 -07:00
9e0e7a4067 st-im-text: don't require st_im_text_set_event_window() to be called
Tests like tests/interactive/entry.js don't call it; make sure we still
display an entry in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-14 13:59:09 -07:00
a256a35779 st-entry: don't assume a cursor func has been set
That won't be the case when called from tests.

https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-14 13:59:04 -07:00
d5cac6559d st: initialize static variables to NULL
https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-14 13:58:58 -07:00
ce262b36d4 autorunManager: Remove unused import 2017-06-09 16:58:15 +02:00
02a72b12bb st-entry: remove unused variable 2017-06-06 14:52:33 -07:00
7f7d18749e st-entry: Add primary-icon and secondary-icon read-write properties
Instead of simply providing a setter, we now provide real properties.

https://bugzilla.gnome.org/show_bug.cgi?id=783484
2017-06-06 14:51:49 -07:00
2e1e00c3de st: fix "text-shadow: none" to correctly draw no shadow
We would incorrectly create a solid black st-shadow with no blur when
parsing in a "none" value from css.

https://bugzilla.gnome.org/show_bug.cgi?id=783485
2017-06-06 12:40:48 -07:00
e2838a7e06 Remove an explicit destroy to the ClutterText actor
This is the same as the previous commit, but for StEntry.
We don't have any need to explicitly destroy this actor in our dispose
implementation, and doing so breaks the assumption that we can access
the clutter_text from within destroy.

https://bugzilla.gnome.org/show_bug.cgi?id=783483
2017-06-06 08:38:45 -07:00
ad2cb22785 Remove dangerous explicit destroy
There's no need to explicitly destroy the ClutterText actor inside the
label; doing so is actually harmful, as it will break the normal
reference cycle between container and children.
As StLabel doesn't hold any extra reference to the ClutterText actor and
just uses clutter_actor_add_actor() to add it to itself, let the normal
container dispose cycle run to dispose of the reference.

https://bugzilla.gnome.org/show_bug.cgi?id=783483
2017-06-06 08:38:45 -07:00
7ad6bd95f7 docs: Remove reference to libgnome-shell-base
https://bugzilla.gnome.org/show_bug.cgi?id=783439
2017-06-05 23:11:02 +08:00
50d37e74a3 portalHelper: Fix auth URI not being passed to window
Gjs-Message: JS WARNING: [resource:///org/gnome/shell/portalHelper/main.js 360]: reference to undefined property top.uri
is caused by the URI variable actually being called "url".

https://bugzilla.gnome.org/show_bug.cgi?id=783286
2017-05-31 16:51:05 +02:00
c22287b517 portalHelper: Don't go through proxies for captive portals
When using an SSH tunnel (through a SOCKS proxy) to funnel all
the outgoing traffic, we need the captive portal to not go through that
proxy, otherwise we can't go through the proxy because we're not
connected to the Internet and we can't go through the portal because
we're not connected through the proxy.

This fixes a blank captive portal window and no error reporting in that
particular configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=769692
2017-05-31 16:03:11 +02:00
73cffb3c7f tests: Adjust test runner
The script currently assumes that srcdir is relative to builddir,
which is not the case for build directories outside the source tree
like the one used by jhbuild.
While we could get fancy and prepend the builddir if srcdir is relative,
there's nothing wrong with a relative path as we cd into the builddir
before evaluating srcdir.

https://bugzilla.gnome.org/show_bug.cgi?id=783206
2017-05-30 12:41:16 +02:00
4bada06917 build: Drop obsolete pkg-config check
The check belongs to the test-recorder executable that was dropped
in commit d52c95a15f.

https://bugzilla.gnome.org/show_bug.cgi?id=783206
2017-05-30 12:41:16 +02:00
31a4705789 build: Stop building a separate libgnome-shell-base
The static library was split out to avoid duplicate compilation
of mutter-independent libgnome-shell sources when we had a
wayland/non-wayland split. With the separate libmutter-wayland
library long gone, there's no reason to make the build more
complicated than it needs to be, so fold libgnome-shell-base
back into the regular libgnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=783206
2017-05-30 12:41:16 +02:00
60c00f0472 build: Always install xdg-desktop-portal metadata
The build target accidentally ended up in a network manager conditional,
though the portal doesn't depend on NM in any way.

https://bugzilla.gnome.org/show_bug.cgi?id=783206
2017-05-30 12:41:16 +02:00
e7bf23890b build: Drop check for gjs-console
Nowadays all javascript code is run via small C-wrappers ...

https://bugzilla.gnome.org/show_bug.cgi?id=783206
2017-05-30 12:41:16 +02:00
15d387df5f build: Switch to sassc for generating style
GTK+ switched from ruby-based sass to c-based sassc for performance
reasons. It makes sense to follow suit, if not to not require two
tools for the same job ...

https://bugzilla.gnome.org/show_bug.cgi?id=783210
2017-05-30 12:41:16 +02:00
e02d6e5285 panel: Update .solid style on session mode changes
The .solid style isn't supposed to apply for modes that don't support
windows, but for this to work we have to update the style on session
mode changes.

https://bugzilla.gnome.org/show_bug.cgi?id=783202
2017-05-30 11:41:35 +02:00
19d0169de4 shell-global: Use MetaSettings for settings
Scale settings were moved from MetaBackend to a new MetaSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
2017-05-26 15:27:25 +08:00
24 changed files with 535 additions and 186 deletions

14
NEWS
View File

@ -1,3 +1,17 @@
3.25.3
======
* Bypass proxies for captive portal [Bastien; #769692]
* Correctly handle "text-shadow: none;" [Matt; #783485]
* Add StEntry:hint-actor property [Mario; #783484]
* Support text-shadow CSS property in StEntry [Mario; #783484]
* Misc. bug fixes [Jonas, Florian, Bastien, Ting-Wei, Cosimo, Mario, Sebastian;
#777732, #783202, #783210, #783206, #783286, #783439, #783483, #783823,
#781950]
Contributors:
Jonas Ådahl, Cosimo Cecchi, Sebastian Keller, Ting-Wei Lan, Florian Müllner,
Bastien Nocera, Mario Sanchez Prada, Matt Watson
3.25.2
======
* Fix StEntry::primary-icon-clicked emission [Florian; #782190]

View File

@ -1,5 +1,5 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell],[3.25.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_INIT([gnome-shell],[3.25.3],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AX_IS_RELEASE([git-directory])
AC_CONFIG_HEADERS([config.h])
@ -61,7 +61,6 @@ if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then
AC_MSG_RESULT(yes)
build_recorder=true
recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11 gtk+-3.0"
PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules $LIBMUTTER_CLUTTER)
else
AC_MSG_RESULT(no)
fi
@ -85,7 +84,7 @@ AC_MSG_RESULT($enable_systemd)
GOBJECT_INTROSPECTION_MIN_VERSION=1.49.1
GJS_MIN_VERSION=1.47.0
MUTTER_MIN_VERSION=3.25.2
MUTTER_MIN_VERSION=3.25.3
GTK_MIN_VERSION=3.15.0
GIO_MIN_VERSION=2.53.0
LIBECAL_MIN_VERSION=3.5.3
@ -159,9 +158,6 @@ AC_SUBST(MUTTER_GIR_DIR)
MUTTER_TYPELIB_DIR=`$PKG_CONFIG --variable=typelibdir $LIBMUTTER`
AC_SUBST(MUTTER_TYPELIB_DIR)
GJS_CONSOLE=`$PKG_CONFIG --variable=gjs_console gjs-1.0`
AC_SUBST(GJS_CONSOLE)
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)
@ -250,7 +246,7 @@ if test -z "$GDBUS_CODEGEN"; then
AC_MSG_ERROR([gdbus-codegen not found])
fi
AC_PATH_PROG([SASS],[sass],[])
AC_PATH_PROG([SASSC],[sassc],[])
AC_CONFIG_FILES([
Makefile

View File

@ -1,15 +1,15 @@
CLEANFILES =
NULL =
portaldir = $(datadir)/xdg-desktop-portal/portals
portal_DATA = gnome-shell.portal
desktopdir=$(datadir)/applications
desktop_DATA = org.gnome.Shell.desktop gnome-shell-extension-prefs.desktop
if HAVE_NETWORKMANAGER
desktop_DATA += org.gnome.Shell.PortalHelper.desktop
portaldir = $(datadir)/xdg-desktop-portal/portals
portal_DATA = gnome-shell.portal
servicedir = $(datadir)/dbus-1/services
service_DATA = org.gnome.Shell.PortalHelper.service
@ -56,7 +56,6 @@ theme_sources = \
dist_theme_files = \
$(theme_sources) \
theme/Gemfile \
theme/HACKING \
theme/README \
theme/gnome-shell-sass/COPYING \
@ -64,14 +63,14 @@ dist_theme_files = \
theme/gnome-shell-sass/NEWS \
theme/gnome-shell-sass/README \
theme/gnome-shell-sass/gnome-shell-sass.doap \
theme/pad-osd.css \
theme/pad-osd.css \
theme/parse-sass.sh \
$(NULL)
%.css: %.scss $(theme_sources)
@if test -n "$(SASS)"; then \
@if test -n "$(SASSC)"; then \
if $(AM_V_P); then PS4= set -x; else echo " GEN $@"; fi; \
$(SASS) --sourcemap=none -f -q --update $<; \
$(SASSC) -a $< $@; \
fi
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/theme --generate-dependencies $(srcdir)/gnome-shell-theme.gresource.xml)

View File

@ -1 +0,0 @@
gem "sass", "~> 3.4.0"

View File

@ -3,10 +3,10 @@ Summary
* Do not edit the CSS directly, edit the source SCSS files and process them with SASS (running
`make` should do that when you have the required software installed, as described below;
run `/.parse-sass.sh` manually if it doesn't)
* To be able to use the lates/adequate version of sass, install ruby, gem, sass & bundle.
On Fedora F20, this is done with `sudo dnf install rubygems && gem install bundle && bundle install`
from the same directory this README resides in.
run `./parse-sass.sh` manually if it doesn't)
* Most SASS preprocessors should produce similar results, however the build system
integration and 'parse-sass.sh' script use sassc. You should be able to install
it with `pkcon install sassc` or your distribution's package manager.
How to tweak the theme
----------------------
@ -31,6 +31,4 @@ _common.scss - actual definitions of style for each widget. This is where
your changes.
You can read about SASS at http://sass-lang.com/documentation/. Once you make your changes to the
_common.scss file, you can either run the ./parse-sass.sh script or keep SASS watching for changes as you
edit. This is done by running `bundle exec sass --watch --sourcemap=none .` If sass is out of date, or is
missing, you can install it with `bundle install`.
_common.scss file, you can either run make or the ./parse-sass.sh script.

View File

@ -118,6 +118,7 @@ StEntry {
/* Scrollbars */
StScrollView.vfade {
-st-vfade-offset: 68px; }
StScrollView.hfade {
-st-hfade-offset: 68px; }
@ -152,14 +153,18 @@ StScrollBar {
/* Check Boxes */
.check-box StBoxLayout {
spacing: .8em; }
.check-box StBin {
width: 24px;
height: 22px;
background-image: url("resource:///org/gnome/shell/theme/checkbox-off.svg"); }
.check-box:focus StBin {
background-image: url("resource:///org/gnome/shell/theme/checkbox-off-focused.svg"); }
.check-box:checked StBin {
background-image: url("resource:///org/gnome/shell/theme/checkbox.svg"); }
.check-box:focus:checked StBin {
background-image: url("resource:///org/gnome/shell/theme/checkbox-focused.svg"); }
@ -337,6 +342,7 @@ StScrollBar {
.show-processes-dialog-app-list-item-icon:ltr {
padding-right: 17px; }
.show-processes-dialog-app-list-item-icon:rtl {
padding-left: 17px; }
@ -720,9 +726,17 @@ StScrollBar {
#panel .panel-button .system-status-icon {
icon-size: 1.09em;
padding: 0 5px; }
.unlock-screen #panel .panel-button, .login-screen #panel .panel-button, .lock-screen #panel .panel-button {
.unlock-screen #panel .panel-button,
.login-screen #panel .panel-button,
.lock-screen #panel .panel-button {
color: white; }
.unlock-screen #panel .panel-button:focus, .unlock-screen #panel .panel-button:hover, .unlock-screen #panel .panel-button:active, .login-screen #panel .panel-button:focus, .login-screen #panel .panel-button:hover, .login-screen #panel .panel-button:active, .lock-screen #panel .panel-button:focus, .lock-screen #panel .panel-button:hover, .lock-screen #panel .panel-button:active {
.unlock-screen #panel .panel-button:focus, .unlock-screen #panel .panel-button:hover, .unlock-screen #panel .panel-button:active,
.login-screen #panel .panel-button:focus,
.login-screen #panel .panel-button:hover,
.login-screen #panel .panel-button:active,
.lock-screen #panel .panel-button:focus,
.lock-screen #panel .panel-button:hover,
.lock-screen #panel .panel-button:active {
color: white; }
#panel .panel-status-indicators-box,
#panel .panel-status-menu-box {
@ -796,6 +810,7 @@ StScrollBar {
.events-section-title:hover,
.events-section-title:focus {
background-color: #0d0d0d; }
.datemenu-today-button:active,
.world-clocks-button:active,
.weather-button:active,
@ -937,7 +952,7 @@ StScrollBar {
color: #999999;
font-size: 0.7em;
/* HACK: the label should be baseline-aligned with a 1em label,
fake this with some bottom padding */
fake this with some bottom padding */
padding-bottom: 0.13em; }
.message-secondary-bin > StIcon {
@ -1242,6 +1257,7 @@ StScrollBar {
.list-search-result:active,
.list-search-result:checked {
background-color: rgba(23, 25, 26, 0.9); }
.search-provider-icon:focus, .search-provider-icon:selected, .search-provider-icon:hover,
.list-search-result:focus,
.list-search-result:selected,
@ -1249,7 +1265,8 @@ StScrollBar {
background-color: rgba(238, 238, 236, 0.1);
transition-duration: 200ms; }
.app-well-app:active .overview-icon, .app-well-app:checked .overview-icon,
.app-well-app:active .overview-icon,
.app-well-app:checked .overview-icon,
.app-well-app.app-folder:active .overview-icon,
.app-well-app.app-folder:checked .overview-icon,
.show-apps:active .overview-icon,
@ -1258,7 +1275,10 @@ StScrollBar {
.grid-search-result:checked .overview-icon {
background-color: rgba(23, 25, 26, 0.9);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7); }
.app-well-app:hover .overview-icon, .app-well-app:focus .overview-icon, .app-well-app:selected .overview-icon,
.app-well-app:hover .overview-icon,
.app-well-app:focus .overview-icon,
.app-well-app:selected .overview-icon,
.app-well-app.app-folder:hover .overview-icon,
.app-well-app.app-folder:focus .overview-icon,
.app-well-app.app-folder:selected .overview-icon,
@ -1686,7 +1706,8 @@ StScrollBar {
padding: 100px 0px; }
.login-dialog-user-selection-box .login-dialog-not-listed-label {
padding-left: 2px; }
.login-dialog-not-listed-button:focus .login-dialog-user-selection-box .login-dialog-not-listed-label, .login-dialog-not-listed-button:hover .login-dialog-user-selection-box .login-dialog-not-listed-label {
.login-dialog-not-listed-button:focus .login-dialog-user-selection-box .login-dialog-not-listed-label,
.login-dialog-not-listed-button:hover .login-dialog-user-selection-box .login-dialog-not-listed-label {
color: #eeeeec; }
.login-dialog-not-listed-label {
@ -1736,6 +1757,7 @@ StScrollBar {
.user-widget-label:ltr {
padding-left: 18px; }
.user-widget-label:rtl {
padding-right: 18px; }
@ -1863,6 +1885,7 @@ StScrollBar {
.lg-dialog StEntry {
selection-background-color: #bbbbbb;
selected-color: #333333; }
.lg-dialog .shell-link {
color: #999999; }
.lg-dialog .shell-link:hover {

View File

@ -118,6 +118,7 @@ StEntry {
/* Scrollbars */
StScrollView.vfade {
-st-vfade-offset: 68px; }
StScrollView.hfade {
-st-hfade-offset: 68px; }
@ -152,14 +153,18 @@ StScrollBar {
/* Check Boxes */
.check-box StBoxLayout {
spacing: .8em; }
.check-box StBin {
width: 24px;
height: 22px;
background-image: url("resource:///org/gnome/shell/theme/checkbox-off.svg"); }
.check-box:focus StBin {
background-image: url("resource:///org/gnome/shell/theme/checkbox-off-focused.svg"); }
.check-box:checked StBin {
background-image: url("resource:///org/gnome/shell/theme/checkbox.svg"); }
.check-box:focus:checked StBin {
background-image: url("resource:///org/gnome/shell/theme/checkbox-focused.svg"); }
@ -337,6 +342,7 @@ StScrollBar {
.show-processes-dialog-app-list-item-icon:ltr {
padding-right: 17px; }
.show-processes-dialog-app-list-item-icon:rtl {
padding-left: 17px; }
@ -720,9 +726,17 @@ StScrollBar {
#panel .panel-button .system-status-icon {
icon-size: 1.09em;
padding: 0 5px; }
.unlock-screen #panel .panel-button, .login-screen #panel .panel-button, .lock-screen #panel .panel-button {
.unlock-screen #panel .panel-button,
.login-screen #panel .panel-button,
.lock-screen #panel .panel-button {
color: white; }
.unlock-screen #panel .panel-button:focus, .unlock-screen #panel .panel-button:hover, .unlock-screen #panel .panel-button:active, .login-screen #panel .panel-button:focus, .login-screen #panel .panel-button:hover, .login-screen #panel .panel-button:active, .lock-screen #panel .panel-button:focus, .lock-screen #panel .panel-button:hover, .lock-screen #panel .panel-button:active {
.unlock-screen #panel .panel-button:focus, .unlock-screen #panel .panel-button:hover, .unlock-screen #panel .panel-button:active,
.login-screen #panel .panel-button:focus,
.login-screen #panel .panel-button:hover,
.login-screen #panel .panel-button:active,
.lock-screen #panel .panel-button:focus,
.lock-screen #panel .panel-button:hover,
.lock-screen #panel .panel-button:active {
color: white; }
#panel .panel-status-indicators-box,
#panel .panel-status-menu-box {
@ -796,6 +810,7 @@ StScrollBar {
.events-section-title:hover,
.events-section-title:focus {
background-color: #454c4c; }
.datemenu-today-button:active,
.world-clocks-button:active,
.weather-button:active,
@ -937,7 +952,7 @@ StScrollBar {
color: #8e8e80;
font-size: 0.7em;
/* HACK: the label should be baseline-aligned with a 1em label,
fake this with some bottom padding */
fake this with some bottom padding */
padding-bottom: 0.13em; }
.message-secondary-bin > StIcon {
@ -1242,6 +1257,7 @@ StScrollBar {
.list-search-result:active,
.list-search-result:checked {
background-color: rgba(23, 25, 26, 0.9); }
.search-provider-icon:focus, .search-provider-icon:selected, .search-provider-icon:hover,
.list-search-result:focus,
.list-search-result:selected,
@ -1249,7 +1265,8 @@ StScrollBar {
background-color: rgba(238, 238, 236, 0.1);
transition-duration: 200ms; }
.app-well-app:active .overview-icon, .app-well-app:checked .overview-icon,
.app-well-app:active .overview-icon,
.app-well-app:checked .overview-icon,
.app-well-app.app-folder:active .overview-icon,
.app-well-app.app-folder:checked .overview-icon,
.show-apps:active .overview-icon,
@ -1258,7 +1275,10 @@ StScrollBar {
.grid-search-result:checked .overview-icon {
background-color: rgba(23, 25, 26, 0.9);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7); }
.app-well-app:hover .overview-icon, .app-well-app:focus .overview-icon, .app-well-app:selected .overview-icon,
.app-well-app:hover .overview-icon,
.app-well-app:focus .overview-icon,
.app-well-app:selected .overview-icon,
.app-well-app.app-folder:hover .overview-icon,
.app-well-app.app-folder:focus .overview-icon,
.app-well-app.app-folder:selected .overview-icon,
@ -1686,7 +1706,8 @@ StScrollBar {
padding: 100px 0px; }
.login-dialog-user-selection-box .login-dialog-not-listed-label {
padding-left: 2px; }
.login-dialog-not-listed-button:focus .login-dialog-user-selection-box .login-dialog-not-listed-label, .login-dialog-not-listed-button:hover .login-dialog-user-selection-box .login-dialog-not-listed-label {
.login-dialog-not-listed-button:focus .login-dialog-user-selection-box .login-dialog-not-listed-label,
.login-dialog-not-listed-button:hover .login-dialog-user-selection-box .login-dialog-not-listed-label {
color: #eeeeec; }
.login-dialog-not-listed-label {
@ -1736,6 +1757,7 @@ StScrollBar {
.user-widget-label:ltr {
padding-left: 18px; }
.user-widget-label:rtl {
padding-right: 18px; }
@ -1863,6 +1885,7 @@ StScrollBar {
.lg-dialog StEntry {
selection-background-color: #bbbbbb;
selected-color: #333333; }
.lg-dialog .shell-link {
color: #999999; }
.lg-dialog .shell-link:hover {

View File

@ -1,3 +1,7 @@
#!/usr/bin/bash
#!/usr/bin/sh
bundle exec sass --update --sourcemap=none .
srcdir=`dirname $0`
for scss in $srcdir/*.scss
do
sassc -a $scss ${scss%%.scss}.css
done

View File

@ -113,7 +113,7 @@ expand_content_files=
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=$(GNOME_SHELL_CFLAGS)
GTKDOC_LIBS=$(GNOME_SHELL_LIBS) $(top_builddir)/src/libgnome-shell-menu.la $(top_builddir)/src/libgnome-shell-base.la $(top_builddir)/src/libgnome-shell.la -rpath $(MUTTER_TYPELIB_DIR)
GTKDOC_LIBS=$(GNOME_SHELL_LIBS) $(top_builddir)/src/libgnome-shell-menu.la $(top_builddir)/src/libgnome-shell.la -rpath $(MUTTER_TYPELIB_DIR)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make

View File

@ -143,6 +143,7 @@ const PortalWindow = new Lang.Class({
this._webContext = WebKit.WebContext.new_ephemeral();
this._webContext.set_cache_model(WebKit.CacheModel.DOCUMENT_VIEWER);
this._webContext.set_network_proxy_settings(WebKit.NetworkProxyMode.NO_PROXY, null);
this._webView = WebKit.WebView.new_with_context(this._webContext);
this._webView.connect('decide-policy', Lang.bind(this, this._onDecidePolicy));
@ -356,7 +357,7 @@ const WebPortalHelper = new Lang.Class({
if (top.window != null)
return;
top.window = new PortalWindow(this, top.uri, top.timestamp, Lang.bind(this, function(result) {
top.window = new PortalWindow(this, top.url, top.timestamp, Lang.bind(this, function(result) {
this._dbusImpl.emit_signal('Done', new GLib.Variant('(ou)', [top.connection, result]));
}));
},

View File

@ -447,7 +447,10 @@ const AllView = new Lang.Class({
}));
this._grid.connect('space-opened', Lang.bind(this,
function() {
this._scrollView.get_effect('fade').enabled = false;
let fadeEffect = this._scrollView.get_effect('fade');
if (fadeEffect)
fadeEffect.enabled = false;
this.emit('space-ready');
}));
this._grid.connect('space-closed', Lang.bind(this,
@ -658,7 +661,11 @@ const AllView = new Lang.Class({
_closeSpaceForPopup: function() {
this._updateIconOpacities(false);
this._scrollView.get_effect('fade').enabled = true;
let fadeEffect = this._scrollView.get_effect('fade');
if (fadeEffect)
fadeEffect.enabled = true;
this._grid.closeExtraSpace();
},

View File

@ -7,7 +7,6 @@ const St = imports.gi.St;
const GnomeSession = imports.misc.gnomeSession;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const ShellMountOperation = imports.ui.shellMountOperation;
// GSettings keys
const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling';

View File

@ -1015,6 +1015,8 @@ const Panel = new Lang.Class({
else
Main.messageTray.bannerAlignment = Clutter.ActorAlign.CENTER;
this._updateSolidStyle();
if (this._sessionStyle)
this._removeStyleClassName(this._sessionStyle);

View File

@ -7,7 +7,6 @@ const Mainloop = imports.mainloop;
const Signals = imports.signals;
const FileUtils = imports.misc.fileUtils;
const Main = imports.ui.main;
const Params = imports.misc.params;
const Config = imports.misc.config;

View File

@ -42,8 +42,7 @@ generated_script_substitutions = \
-e "s|@pkgdatadir[@]|$(pkgdatadir)|g" \
-e "s|@PYTHON[@]|$(PYTHON)|g" \
-e "s|@VERSION[@]|$(VERSION)|g" \
-e "s|@sysconfdir[@]|$(sysconfdir)|g" \
-e "s|@GJS_CONSOLE[@]|$(GJS_CONSOLE)|g"
-e "s|@sysconfdir[@]|$(sysconfdir)|g"
gnome-shell-extension-tool: gnome-shell-extension-tool.in Makefile
$(AM_V_GEN) sed $(generated_script_substitutions) $< > $@.tmp && mv $@.tmp $@ && chmod a+x $@
@ -79,7 +78,6 @@ gnome_shell_cflags = \
privlibdir = $(pkglibdir)
privlib_LTLIBRARIES = libgnome-shell-menu.la libgnome-shell.la
noinst_LTLIBRARIES += libgnome-shell-base.la
shell_built_sources = \
org-gtk-application.h \
@ -128,13 +126,22 @@ libgnome_shell_menu_la_SOURCES = \
gtkmenutracker.h \
$(NULL)
libgnome_shell_base_la_SOURCES = \
libgnome_shell_sources = \
$(shell_public_headers_h) \
$(shell_private_sources) \
gnome-shell-plugin.c \
shell-app.c \
shell-app-private.h \
shell-app-system.c \
shell-app-system-private.h \
shell-app-usage.c \
shell-embedded-window-private.h \
shell-embedded-window.c \
shell-generic-container.c \
shell-global.c \
shell-global-private.h \
shell-glsl-quad.c \
shell-gtk-embed.c \
shell-invert-lightness-effect.c \
shell-keyring-prompt.h \
shell-keyring-prompt.c \
@ -144,36 +151,24 @@ libgnome_shell_base_la_SOURCES = \
shell-perf-log.c \
shell-polkit-authentication-agent.h \
shell-polkit-authentication-agent.c \
shell-screenshot.c \
shell-secure-text-buffer.c \
shell-secure-text-buffer.h \
shell-stack.c \
$(NULL)
if HAVE_NETWORKMANAGER
libgnome_shell_base_la_SOURCES += shell-network-agent.c
endif
libgnome_shell_sources = \
$(shell_public_headers_h) \
shell-app-private.h \
shell-app-system-private.h \
shell-global-private.h \
shell-window-tracker-private.h \
shell-wm-private.h \
gnome-shell-plugin.c \
shell-app.c \
shell-app-system.c \
shell-app-usage.c \
shell-global.c \
shell-gtk-embed.c \
shell-screenshot.c \
shell-tray-icon.c \
shell-tray-manager.c \
shell-util.c \
shell-window-tracker.c \
shell-window-tracker-private.h \
shell-wm.c \
shell-wm-private.h \
$(NULL)
if HAVE_NETWORKMANAGER
libgnome_shell_sources += shell-network-agent.c
endif
libgnome_shell_built_sources = \
$(shell_built_sources) \
$(top_builddir)/js/js-resources.c \
@ -188,7 +183,7 @@ shell_no_gir_sources = \
org-gtk-application.c
libgnome_shell_la_gir_sources = \
$(filter-out %-private.h $(shell_private_sources) $(shell_no_gir_sources), $(shell_public_headers_h) $(libgnome_shell_base_la_SOURCES) $(libgnome_shell_sources) $(libgnome_shell_built_sources))
$(filter-out %-private.h $(shell_private_sources) $(shell_no_gir_sources), $(shell_public_headers_h) $(libgnome_shell_sources) $(libgnome_shell_built_sources))
gnome_shell_SOURCES = main.c
gnome_shell_CPPFLAGS = \
@ -306,11 +301,8 @@ libgnome_shell_menu_la_LDFLAGS = $(libgnome_shell_ldflags)
libgnome_shell_menu_la_LIBADD = $(GNOME_SHELL_LIBS)
libgnome_shell_menu_la_CPPFLAGS = $(GNOME_SHELL_CFLAGS)
libgnome_shell_base_la_LIBADD = $(libgnome_shell_libadd)
libgnome_shell_base_la_CPPFLAGS = $(gnome_shell_cflags)
libgnome_shell_la_LDFLAGS = $(libgnome_shell_ldflags)
libgnome_shell_la_LIBADD = $(GNOME_SHELL_LIBS) $(MUTTER_LIBS) libgnome-shell-base.la
libgnome_shell_la_LIBADD = $(GNOME_SHELL_LIBS) $(MUTTER_LIBS) $(libgnome_shell_libadd)
libgnome_shell_la_CPPFLAGS = $(MUTTER_CFLAGS) $(gnome_shell_cflags)
ShellMenu-0.1.gir: libgnome-shell-menu.la

View File

@ -573,6 +573,7 @@ app_load_events (App *app)
gchar *since_iso8601;
gchar *until_iso8601;
gchar *query;
const char *tz_location;
/* out with the old */
g_hash_table_remove_all (app->appointments);
@ -594,15 +595,17 @@ app_load_events (App *app)
since_iso8601 = isodate_from_time_t (app->since);
until_iso8601 = isodate_from_time_t (app->until);
tz_location = icaltimezone_get_location (app->zone);
print_debug ("Loading events since %s until %s",
since_iso8601,
until_iso8601);
query = g_strdup_printf ("occur-in-time-range? (make-time \"%s\") "
"(make-time \"%s\")",
"(make-time \"%s\") \"%s\"",
since_iso8601,
until_iso8601);
until_iso8601,
tz_location);
clients = calendar_sources_get_appointment_clients (app->sources);
for (l = clients; l != NULL; l = l->next)

View File

@ -27,6 +27,7 @@
#include <meta/util.h>
#include <meta/meta-shaped-texture.h>
#include <meta/meta-cursor-tracker.h>
#include <meta/meta-settings.h>
#ifdef HAVE_SYSTEMD
#include <systemd/sd-journal.h>
@ -835,23 +836,22 @@ global_stage_after_swap (gpointer data)
}
static void
update_scaling_factor (ShellGlobal *global,
MetaBackend *backend)
update_scaling_factor (ShellGlobal *global,
MetaSettings *settings)
{
ClutterStage *stage = CLUTTER_STAGE (global->stage);
StThemeContext *context = st_theme_context_get_for_stage (stage);
int scaling_factor;
scaling_factor = meta_backend_get_ui_scaling_factor (backend);
scaling_factor = meta_settings_get_ui_scaling_factor (settings);
g_object_set (context, "scale-factor", scaling_factor, NULL);
if (meta_is_wayland_compositor ())
{
GtkSettings *settings = gtk_settings_get_default ();
GtkSettings *gtk_settings = gtk_settings_get_default ();
int xft_dpi;
g_object_get (settings, "gtk-xft-dpi", &xft_dpi, NULL);
g_object_get (gtk_settings, "gtk-xft-dpi", &xft_dpi, NULL);
g_object_set (clutter_settings_get_default (), "font-dpi", xft_dpi, NULL);
}
@ -860,10 +860,10 @@ update_scaling_factor (ShellGlobal *global,
}
static void
ui_scaling_factor_changed (MetaBackend *backend,
ShellGlobal *global)
ui_scaling_factor_changed (MetaSettings *settings,
ShellGlobal *global)
{
update_scaling_factor (global, backend);
update_scaling_factor (global, settings);
}
/* This is an IBus workaround. The flow of events with IBus is that every time
@ -970,6 +970,7 @@ _shell_global_set_plugin (ShellGlobal *global,
MetaPlugin *plugin)
{
MetaBackend *backend;
MetaSettings *settings;
g_return_if_fail (SHELL_IS_GLOBAL (global));
g_return_if_fail (global->plugin == NULL);
@ -1052,14 +1053,15 @@ _shell_global_set_plugin (ShellGlobal *global,
G_CALLBACK (focus_window_changed), global);
backend = meta_get_backend ();
g_signal_connect (backend, "ui-scaling-factor-changed",
settings = meta_backend_get_settings (backend);
g_signal_connect (settings, "ui-scaling-factor-changed",
G_CALLBACK (ui_scaling_factor_changed), global);
gdk_event_handler_set (gnome_shell_gdk_event_handler, global, NULL);
global->focus_manager = st_focus_manager_get_for_stage (global->stage);
update_scaling_factor (global, meta_get_backend ());
update_scaling_factor (global, settings);
}
GjsContext *

View File

@ -34,7 +34,7 @@
* <para>focus: the widget has focus</para>
* </listitem>
* <listitem>
* <para>indeterminate: the widget is showing the hint text</para>
* <para>indeterminate: the widget is showing the hint text or actor</para>
* </listitem>
* </itemizedlist>
*/
@ -56,6 +56,7 @@
#include "st-im-text.h"
#include "st-icon.h"
#include "st-label.h"
#include "st-widget.h"
#include "st-texture-cache.h"
#include "st-clipboard.h"
@ -72,7 +73,10 @@ enum
PROP_0,
PROP_CLUTTER_TEXT,
PROP_PRIMARY_ICON,
PROP_SECONDARY_ICON,
PROP_HINT_TEXT,
PROP_HINT_ACTOR,
PROP_TEXT,
PROP_INPUT_PURPOSE,
PROP_INPUT_HINTS,
@ -94,16 +98,20 @@ typedef struct _StEntryPrivate StEntryPrivate;
struct _StEntryPrivate
{
ClutterActor *entry;
gchar *hint;
ClutterActor *primary_icon;
ClutterActor *secondary_icon;
ClutterActor *hint_actor;
gfloat spacing;
gboolean hint_visible;
gboolean capslock_warning_shown;
gboolean has_ibeam;
CoglHandle text_shadow_material;
gfloat shadow_width;
gfloat shadow_height;
};
static guint entry_signals[LAST_SIGNAL] = { 0, };
@ -122,10 +130,22 @@ st_entry_set_property (GObject *gobject,
switch (prop_id)
{
case PROP_PRIMARY_ICON:
st_entry_set_primary_icon (entry, g_value_get_object (value));
break;
case PROP_SECONDARY_ICON:
st_entry_set_secondary_icon (entry, g_value_get_object (value));
break;
case PROP_HINT_TEXT:
st_entry_set_hint_text (entry, g_value_get_string (value));
break;
case PROP_HINT_ACTOR:
st_entry_set_hint_actor (entry, g_value_get_object (value));
break;
case PROP_TEXT:
st_entry_set_text (entry, g_value_get_string (value));
break;
@ -158,8 +178,20 @@ st_entry_get_property (GObject *gobject,
g_value_set_object (value, priv->entry);
break;
case PROP_PRIMARY_ICON:
g_value_set_object (value, priv->primary_icon);
break;
case PROP_SECONDARY_ICON:
g_value_set_object (value, priv->secondary_icon);
break;
case PROP_HINT_TEXT:
g_value_set_string (value, priv->hint);
g_value_set_string (value, st_entry_get_hint_text (ST_ENTRY (gobject)));
break;
case PROP_HINT_ACTOR:
g_value_set_object (value, priv->hint_actor);
break;
case PROP_TEXT:
@ -230,10 +262,10 @@ st_entry_dispose (GObject *object)
StEntryPrivate *priv = ST_ENTRY_PRIV (entry);
GdkKeymap *keymap;
if (priv->entry)
if (priv->text_shadow_material != COGL_INVALID_HANDLE)
{
clutter_actor_destroy (priv->entry);
priv->entry = NULL;
cogl_handle_unref (priv->text_shadow_material);
priv->text_shadow_material = COGL_INVALID_HANDLE;
}
keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
@ -243,14 +275,21 @@ st_entry_dispose (GObject *object)
}
static void
st_entry_finalize (GObject *object)
st_entry_update_hint_visibility (StEntry *self)
{
StEntryPrivate *priv = ST_ENTRY_PRIV (object);
StEntryPrivate *priv = ST_ENTRY_PRIV (self);
gboolean hint_visible =
priv->hint_actor != NULL &&
strcmp (clutter_text_get_text (CLUTTER_TEXT (priv->entry)), "") == 0 &&
!HAS_FOCUS (priv->entry);
g_free (priv->hint);
priv->hint = NULL;
if (priv->hint_actor)
g_object_set (priv->hint_actor, "visible", hint_visible, NULL);
G_OBJECT_CLASS (st_entry_parent_class)->finalize (object);
if (hint_visible)
st_widget_add_style_pseudo_class (ST_WIDGET (self), "indeterminate");
else
st_widget_remove_style_pseudo_class (ST_WIDGET (self), "indeterminate");
}
static void
@ -263,6 +302,12 @@ st_entry_style_changed (StWidget *self)
gchar *font_string, *font_name;
gdouble size;
if (priv->text_shadow_material != COGL_INVALID_HANDLE)
{
cogl_handle_unref (priv->text_shadow_material);
priv->text_shadow_material = COGL_INVALID_HANDLE;
}
theme_node = st_widget_get_theme_node (self);
st_theme_node_get_foreground_color (theme_node, &color);
@ -324,7 +369,7 @@ st_entry_get_preferred_width (ClutterActor *actor,
{
StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
gfloat icon_w;
gfloat hint_w, icon_w;
st_theme_node_adjust_for_height (theme_node, &for_height);
@ -332,6 +377,17 @@ st_entry_get_preferred_width (ClutterActor *actor,
min_width_p,
natural_width_p);
if (priv->hint_actor)
{
clutter_actor_get_preferred_width (priv->hint_actor, -1, NULL, &hint_w);
if (min_width_p && hint_w > *min_width_p)
*min_width_p = hint_w;
if (natural_width_p && hint_w > *natural_width_p)
*natural_width_p = hint_w;
}
if (priv->primary_icon)
{
clutter_actor_get_preferred_width (priv->primary_icon, -1, NULL, &icon_w);
@ -366,7 +422,7 @@ st_entry_get_preferred_height (ClutterActor *actor,
{
StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
gfloat icon_h;
gfloat hint_h, icon_h;
st_theme_node_adjust_for_width (theme_node, &for_width);
@ -374,6 +430,17 @@ st_entry_get_preferred_height (ClutterActor *actor,
min_height_p,
natural_height_p);
if (priv->hint_actor)
{
clutter_actor_get_preferred_height (priv->hint_actor, -1, NULL, &hint_h);
if (min_height_p && hint_h > *min_height_p)
*min_height_p = hint_h;
if (natural_height_p && hint_h > *natural_height_p)
*natural_height_p = hint_h;
}
if (priv->primary_icon)
{
clutter_actor_get_preferred_height (priv->primary_icon,
@ -408,12 +475,16 @@ st_entry_allocate (ClutterActor *actor,
{
StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
ClutterActorBox content_box, child_box, icon_box;
ClutterActorBox content_box, child_box, icon_box, hint_box;
gfloat icon_w, icon_h;
gfloat hint_w, hint_h;
gfloat entry_h, min_h, pref_h, avail_h;
ClutterActor *left_icon, *right_icon;
gboolean is_rtl;
if (clutter_actor_get_text_direction (actor) == CLUTTER_TEXT_DIRECTION_RTL)
is_rtl = clutter_actor_get_text_direction (actor) == CLUTTER_TEXT_DIRECTION_RTL;
if (is_rtl)
{
right_icon = priv->primary_icon;
left_icon = priv->secondary_icon;
@ -447,7 +518,7 @@ st_entry_allocate (ClutterActor *actor,
clutter_actor_allocate (left_icon, &icon_box, flags);
/* reduce the size for the entry */
child_box.x1 += icon_w + priv->spacing;
child_box.x1 = MIN (child_box.x2, child_box.x1 + icon_w + priv->spacing);
}
if (right_icon)
@ -464,7 +535,26 @@ st_entry_allocate (ClutterActor *actor,
clutter_actor_allocate (right_icon, &icon_box, flags);
/* reduce the size for the entry */
child_box.x2 -= icon_w + priv->spacing;
child_box.x2 = MAX (child_box.x1, child_box.x2 - icon_w - priv->spacing);
}
if (priv->hint_actor)
{
/* now allocate the hint actor */
hint_box = child_box;
clutter_actor_get_preferred_width (priv->hint_actor, -1, NULL, &hint_w);
clutter_actor_get_preferred_height (priv->hint_actor, -1, NULL, &hint_h);
if (is_rtl)
hint_box.x1 = hint_box.x2 - hint_w;
else
hint_box.x2 = hint_box.x1 + hint_w;
hint_box.y1 = ceil (content_box.y1 + avail_h / 2 - hint_h / 2);
hint_box.y2 = hint_box.y1 + hint_h;
clutter_actor_allocate (priv->hint_actor, &hint_box, flags);
}
clutter_actor_get_preferred_height (priv->entry, child_box.x2 - child_box.x1,
@ -483,23 +573,15 @@ clutter_text_focus_in_cb (ClutterText *text,
ClutterActor *actor)
{
StEntry *entry = ST_ENTRY (actor);
StEntryPrivate *priv = ST_ENTRY_PRIV (entry);
GdkKeymap *keymap;
/* remove the hint if visible */
if (priv->hint && priv->hint_visible)
{
priv->hint_visible = FALSE;
clutter_text_set_text (text, "");
}
st_entry_update_hint_visibility (entry);
keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
keymap_state_changed (keymap, entry);
g_signal_connect (keymap, "state-changed",
G_CALLBACK (keymap_state_changed), entry);
st_widget_remove_style_pseudo_class (ST_WIDGET (actor), "indeterminate");
st_widget_add_style_pseudo_class (ST_WIDGET (actor), "focus");
clutter_text_set_cursor_visible (text, TRUE);
}
@ -509,19 +591,12 @@ clutter_text_focus_out_cb (ClutterText *text,
ClutterActor *actor)
{
StEntry *entry = ST_ENTRY (actor);
StEntryPrivate *priv = ST_ENTRY_PRIV (entry);
GdkKeymap *keymap;
st_widget_remove_style_pseudo_class (ST_WIDGET (actor), "focus");
/* add a hint if the entry is empty */
if (priv->hint && !strcmp (clutter_text_get_text (text), ""))
{
priv->hint_visible = TRUE;
st_entry_update_hint_visibility (entry);
clutter_text_set_text (text, priv->hint);
st_widget_add_style_pseudo_class (ST_WIDGET (actor), "indeterminate");
}
clutter_text_set_cursor_visible (text, FALSE);
remove_capslock_feedback (entry);
@ -541,6 +616,22 @@ clutter_text_password_char_cb (GObject *object,
remove_capslock_feedback (entry);
}
static void
clutter_text_changed_cb (GObject *object,
GParamSpec *pspec,
gpointer user_data)
{
StEntry *entry = ST_ENTRY (user_data);
StEntryPrivate *priv = ST_ENTRY_PRIV (entry);
/* Since the text changed, force a regen of the shadow texture */
if (priv->text_shadow_material != COGL_INVALID_HANDLE)
{
cogl_handle_unref (priv->text_shadow_material);
priv->text_shadow_material = COGL_INVALID_HANDLE;
}
}
static void
st_entry_clipboard_callback (StClipboard *clipboard,
const gchar *text,
@ -707,8 +798,8 @@ st_entry_key_focus_in (ClutterActor *actor)
clutter_actor_grab_key_focus (priv->entry);
}
static StEntryCursorFunc cursor_func;
static gpointer cursor_func_data;
static StEntryCursorFunc cursor_func = NULL;
static gpointer cursor_func_data = NULL;
/**
* st_entry_set_cursor_func: (skip)
@ -728,7 +819,8 @@ static void
st_entry_set_cursor (StEntry *entry,
gboolean use_ibeam)
{
cursor_func (entry, use_ibeam, cursor_func_data);
if (cursor_func)
cursor_func (entry, use_ibeam, cursor_func_data);
((StEntryPrivate *)ST_ENTRY_PRIV (entry))->has_ibeam = use_ibeam;
}
@ -755,6 +847,56 @@ st_entry_leave_event (ClutterActor *actor,
return CLUTTER_ACTOR_CLASS (st_entry_parent_class)->leave_event (actor, event);
}
static void
st_entry_paint (ClutterActor *actor)
{
StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
StShadow *shadow_spec = st_theme_node_get_text_shadow (theme_node);
ClutterActorClass *parent_class;
st_widget_paint_background (ST_WIDGET (actor));
if (shadow_spec)
{
ClutterActorBox allocation;
float width, height;
clutter_actor_get_allocation_box (priv->entry, &allocation);
clutter_actor_box_get_size (&allocation, &width, &height);
if (priv->text_shadow_material == COGL_INVALID_HANDLE ||
width != priv->shadow_width ||
height != priv->shadow_height)
{
CoglHandle material;
if (priv->text_shadow_material != COGL_INVALID_HANDLE)
cogl_handle_unref (priv->text_shadow_material);
material = _st_create_shadow_pipeline_from_actor (shadow_spec,
priv->entry);
priv->shadow_width = width;
priv->shadow_height = height;
priv->text_shadow_material = material;
}
if (priv->text_shadow_material != COGL_INVALID_HANDLE)
_st_paint_shadow_with_opacity (shadow_spec,
priv->text_shadow_material,
&allocation,
clutter_actor_get_paint_opacity (priv->entry));
}
/* Since we paint the background ourselves, chain to the parent class
* of StWidget, to avoid painting it twice.
* This is needed as we still want to paint children.
*/
parent_class = g_type_class_peek_parent (st_entry_parent_class);
parent_class->paint (actor);
}
static void
st_entry_unmap (ClutterActor *actor)
{
@ -775,12 +917,12 @@ st_entry_class_init (StEntryClass *klass)
gobject_class->set_property = st_entry_set_property;
gobject_class->get_property = st_entry_get_property;
gobject_class->finalize = st_entry_finalize;
gobject_class->dispose = st_entry_dispose;
actor_class->get_preferred_width = st_entry_get_preferred_width;
actor_class->get_preferred_height = st_entry_get_preferred_height;
actor_class->allocate = st_entry_allocate;
actor_class->paint = st_entry_paint;
actor_class->unmap = st_entry_unmap;
actor_class->key_press_event = st_entry_key_press_event;
@ -800,6 +942,20 @@ st_entry_class_init (StEntryClass *klass)
G_PARAM_READABLE);
g_object_class_install_property (gobject_class, PROP_CLUTTER_TEXT, pspec);
pspec = g_param_spec_object ("primary-icon",
"Primary Icon",
"Primary Icon actor",
CLUTTER_TYPE_ACTOR,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_PRIMARY_ICON, pspec);
pspec = g_param_spec_object ("secondary-icon",
"Secondary Icon",
"Secondary Icon actor",
CLUTTER_TYPE_ACTOR,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_SECONDARY_ICON, pspec);
pspec = g_param_spec_string ("hint-text",
"Hint Text",
"Text to display when the entry is not focused "
@ -807,6 +963,14 @@ st_entry_class_init (StEntryClass *klass)
NULL, G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_HINT_TEXT, pspec);
pspec = g_param_spec_object ("hint-actor",
"Hint Actor",
"An actor to display when the entry is not focused "
"and the text property is empty",
CLUTTER_TYPE_ACTOR,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_HINT_ACTOR, pspec);
pspec = g_param_spec_string ("text",
"Text",
"Text of the entry",
@ -889,8 +1053,15 @@ st_entry_init (StEntry *entry)
g_signal_connect (priv->entry, "button-press-event",
G_CALLBACK (clutter_text_button_press_event), entry);
g_signal_connect (priv->entry, "notify::text",
G_CALLBACK (clutter_text_changed_cb), entry);
priv->spacing = 6.0f;
priv->text_shadow_material = COGL_INVALID_HANDLE;
priv->shadow_width = -1.;
priv->shadow_height = -1.;
clutter_actor_add_child (CLUTTER_ACTOR (entry), priv->entry);
clutter_actor_set_reactive ((ClutterActor *) entry, TRUE);
@ -935,7 +1106,7 @@ st_entry_get_text (StEntry *entry)
g_return_val_if_fail (ST_IS_ENTRY (entry), NULL);
priv = st_entry_get_instance_private (entry);
if (priv->hint_visible)
if (clutter_actor_is_visible (priv->hint_actor))
return "";
else
return clutter_text_get_text (CLUTTER_TEXT (priv->entry));
@ -958,24 +1129,10 @@ st_entry_set_text (StEntry *entry,
priv = st_entry_get_instance_private (entry);
/* set a hint if we are blanking the entry */
if (priv->hint
&& text && !strcmp ("", text)
&& !HAS_FOCUS (priv->entry))
{
text = priv->hint;
priv->hint_visible = TRUE;
st_widget_add_style_pseudo_class (ST_WIDGET (entry), "indeterminate");
}
else
{
st_widget_remove_style_pseudo_class (ST_WIDGET (entry), "indeterminate");
priv->hint_visible = FALSE;
}
clutter_text_set_text (CLUTTER_TEXT (priv->entry), text);
st_entry_update_hint_visibility (entry);
g_object_notify (G_OBJECT (entry), "text");
}
@ -1009,24 +1166,12 @@ void
st_entry_set_hint_text (StEntry *entry,
const gchar *text)
{
StEntryPrivate *priv;
StWidget *label;
g_return_if_fail (ST_IS_ENTRY (entry));
priv = st_entry_get_instance_private (entry);
g_free (priv->hint);
priv->hint = g_strdup (text);
if (!strcmp (clutter_text_get_text (CLUTTER_TEXT (priv->entry)), "")
&& !HAS_FOCUS (priv->entry))
{
priv->hint_visible = TRUE;
clutter_text_set_text (CLUTTER_TEXT (priv->entry), priv->hint);
st_widget_add_style_pseudo_class (ST_WIDGET (entry), "indeterminate");
}
label = st_label_new (text);
st_entry_set_hint_actor (ST_ENTRY (entry), CLUTTER_ACTOR (label));
}
/**
@ -1041,9 +1186,16 @@ st_entry_set_hint_text (StEntry *entry,
const gchar *
st_entry_get_hint_text (StEntry *entry)
{
StEntryPrivate *priv;
g_return_val_if_fail (ST_IS_ENTRY (entry), NULL);
return ((StEntryPrivate *)ST_ENTRY_PRIV (entry))->hint;
priv = ST_ENTRY_PRIV (entry);
if (priv->hint_actor != NULL && ST_IS_LABEL (priv->hint_actor))
return st_label_get_text (ST_LABEL (priv->hint_actor));
return NULL;
}
/**
@ -1199,6 +1351,23 @@ st_entry_set_primary_icon (StEntry *entry,
_st_entry_set_icon (entry, &priv->primary_icon, icon);
}
/**
* st_entry_get_primary_icon:
* @entry: a #StEntry
*
* Returns: (transfer none): a #ClutterActor
*/
ClutterActor *
st_entry_get_primary_icon (StEntry *entry)
{
StEntryPrivate *priv;
g_return_val_if_fail (ST_IS_ENTRY (entry), NULL);
priv = ST_ENTRY_PRIV (entry);
return priv->primary_icon;
}
/**
* st_entry_set_secondary_icon:
* @entry: a #StEntry
@ -1219,6 +1388,74 @@ st_entry_set_secondary_icon (StEntry *entry,
_st_entry_set_icon (entry, &priv->secondary_icon, icon);
}
/**
* st_entry_get_secondary_icon:
* @entry: a #StEntry
*
* Returns: (transfer none): a #ClutterActor
*/
ClutterActor *
st_entry_get_secondary_icon (StEntry *entry)
{
StEntryPrivate *priv;
g_return_val_if_fail (ST_IS_ENTRY (entry), NULL);
priv = ST_ENTRY_PRIV (entry);
return priv->secondary_icon;
}
/**
* st_entry_set_hint_actor:
* @entry: a #StEntry
* @hint_actor: (allow-none): a #ClutterActor
*
* Set the hint actor of the entry to @hint_actor
*/
void
st_entry_set_hint_actor (StEntry *entry,
ClutterActor *hint_actor)
{
StEntryPrivate *priv;
g_return_if_fail (ST_IS_ENTRY (entry));
priv = ST_ENTRY_PRIV (entry);
if (priv->hint_actor != NULL)
{
clutter_actor_remove_child (CLUTTER_ACTOR (entry), priv->hint_actor);
priv->hint_actor = NULL;
}
if (hint_actor != NULL)
{
priv->hint_actor = hint_actor;
clutter_actor_add_child (CLUTTER_ACTOR (entry), priv->hint_actor);
}
st_entry_update_hint_visibility (entry);
clutter_actor_queue_relayout (CLUTTER_ACTOR (entry));
}
/**
* st_entry_get_hint_actor:
* @entry: a #StEntry
*
* Returns: (transfer none): a #ClutterActor
*/
ClutterActor *
st_entry_get_hint_actor (StEntry *entry)
{
StEntryPrivate *priv;
g_return_val_if_fail (ST_IS_ENTRY (entry), NULL);
priv = ST_ENTRY_PRIV (entry);
return priv->hint_actor;
}
/******************************************************************************/
/*************************** ACCESSIBILITY SUPPORT ****************************/
/******************************************************************************/

View File

@ -57,10 +57,17 @@ void st_entry_set_input_hints (StEntry *entry,
GtkInputHints hints);
GtkInputHints st_entry_get_input_hints (StEntry *entry);
void st_entry_set_primary_icon (StEntry *entry,
ClutterActor *icon);
void st_entry_set_secondary_icon (StEntry *entry,
ClutterActor *icon);
void st_entry_set_primary_icon (StEntry *entry,
ClutterActor *icon);
ClutterActor * st_entry_get_primary_icon (StEntry *entry);
void st_entry_set_secondary_icon (StEntry *entry,
ClutterActor *icon);
ClutterActor * st_entry_get_secondary_icon (StEntry *entry);
void st_entry_set_hint_actor (StEntry *entry,
ClutterActor *hint_actor);
ClutterActor * st_entry_get_hint_actor (StEntry *entry);
typedef void (*StEntryCursorFunc) (StEntry *entry, gboolean use_ibeam, gpointer data);
void st_entry_set_cursor_func (StEntryCursorFunc func,

View File

@ -202,7 +202,7 @@ st_im_text_get_paint_volume (ClutterActor *self,
return clutter_paint_volume_set_from_allocation (volume, self);
}
static GdkWindow *event_window;
static GdkWindow *event_window = NULL;
void
st_im_text_set_event_window (GdkWindow *window)
@ -217,9 +217,11 @@ st_im_text_realize (ClutterActor *actor)
{
StIMTextPrivate *priv = ST_IM_TEXT (actor)->priv;
g_assert (event_window != NULL);
priv->window = g_object_ref (event_window);
gtk_im_context_set_client_window (priv->im_context, priv->window);
if (event_window != NULL)
{
priv->window = g_object_ref (event_window);
gtk_im_context_set_client_window (priv->im_context, priv->window);
}
}
static void
@ -230,8 +232,12 @@ st_im_text_unrealize (ClutterActor *actor)
reset_im_context (self);
gtk_im_context_set_client_window (priv->im_context, NULL);
g_object_unref (priv->window);
priv->window = NULL;
if (priv->window != NULL)
{
g_object_unref (priv->window);
priv->window = NULL;
}
}
static gboolean
@ -277,10 +283,12 @@ static GdkEventKey *
key_event_to_gdk (ClutterKeyEvent *event_clutter)
{
GdkEventKey *event_gdk;
if (event_window == NULL)
return NULL;
event_gdk = (GdkEventKey *)gdk_event_new ((event_clutter->type == CLUTTER_KEY_PRESS) ?
GDK_KEY_PRESS : GDK_KEY_RELEASE);
g_assert (event_window != NULL);
event_gdk->window = g_object_ref (event_window);
event_gdk->send_event = FALSE;
event_gdk->time = event_clutter->time;
@ -348,13 +356,14 @@ st_im_text_captured_event (ClutterActor *actor,
{
GdkEventKey *event_gdk = key_event_to_gdk ((ClutterKeyEvent *)event);
if (gtk_im_context_filter_keypress (priv->im_context, event_gdk))
if (event_gdk && gtk_im_context_filter_keypress (priv->im_context, event_gdk))
{
priv->need_im_reset = TRUE;
result = TRUE;
}
gdk_event_free ((GdkEvent *)event_gdk);
if (event_gdk)
gdk_event_free ((GdkEvent *)event_gdk);
}
old_position = clutter_text_get_cursor_position (clutter_text);

View File

@ -180,12 +180,6 @@ st_label_dispose (GObject *object)
{
StLabelPrivate *priv = ST_LABEL (object)->priv;
if (priv->label)
{
clutter_actor_destroy (priv->label);
priv->label = NULL;
}
g_clear_pointer (&priv->text_shadow_pipeline, cogl_object_unref);
G_OBJECT_CLASS (st_label_parent_class)->dispose (object);

View File

@ -3198,11 +3198,13 @@ parse_shadow_property (StThemeNode *node,
gdouble *yoffset,
gdouble *blur,
gdouble *spread,
gboolean *inset)
gboolean *inset,
gboolean *is_none)
{
GetFromTermResult result;
CRTerm *term;
int n_offsets = 0;
*is_none = FALSE;
/* default values */
color->red = 0x0; color->green = 0x0; color->blue = 0x0; color->alpha = 0xff;
@ -3224,8 +3226,10 @@ parse_shadow_property (StThemeNode *node,
for (term = decl->value; term; term = term->next)
{
/* if we found "none", we're all set with the default values */
if (term_is_none (term))
if (term_is_none (term)) {
*is_none = TRUE;
return VALUE_FOUND;
}
if (term->type == TERM_NUMBER)
{
@ -3324,7 +3328,8 @@ parse_shadow_property (StThemeNode *node,
* See also st_theme_node_get_shadow(), which provides a simpler API.
*
* Return value: %TRUE if the property was found in the properties for this
* theme node (or in the properties of parent nodes when inheriting.)
* theme node (or in the properties of parent nodes when inheriting.), %FALSE
* if the property was not found, or was explicitly set to 'none'.
*/
gboolean
st_theme_node_lookup_shadow (StThemeNode *node,
@ -3338,6 +3343,7 @@ st_theme_node_lookup_shadow (StThemeNode *node,
gdouble blur = 0.;
gdouble spread = 0.;
gboolean inset = FALSE;
gboolean is_none = FALSE;
int i;
@ -3356,9 +3362,13 @@ st_theme_node_lookup_shadow (StThemeNode *node,
&yoffset,
&blur,
&spread,
&inset);
&inset,
&is_none);
if (result == VALUE_FOUND)
{
if (is_none)
return FALSE;
*shadow = st_shadow_new (&color,
xoffset, yoffset,
blur, spread,

View File

@ -4,10 +4,9 @@ const UI = imports.testcommon.ui;
const Clutter = imports.gi.Clutter;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const St = imports.gi.St;
const Calendar = imports.ui.calendar;
function test() {
let stage = new Clutter.Stage({ width: 400, height: 400 });
UI.init(stage);
@ -15,15 +14,47 @@ function test() {
let vbox = new St.BoxLayout({ vertical: true,
width: stage.width,
height: stage.height,
style: 'padding: 10px; spacing: 10px; font: 15px sans-serif;' });
style: 'padding: 10px; spacing: 10px; font: 32px sans-serif;' });
stage.add_actor(vbox);
let entry = new St.Entry({ style: 'border: 1px solid black;' });
let entry = new St.Entry({ style: 'border: 1px solid black; text-shadow: 0 2px red;',
text: 'Example text' });
vbox.add(entry,
{ expand: true,
y_fill: false, y_align: St.Align.MIDDLE });
entry.grab_key_focus();
let entryTextHint = new St.Entry({ style: 'border: 1px solid black; text-shadow: 0 2px red;',
hint_text: 'Hint text' });
vbox.add(entryTextHint,
{ expand: true,
y_fill: false, y_align: St.Align.MIDDLE });
let hintActor = new St.Label({ text: 'Hint actor' });
let entryHintActor = new St.Entry({ style: 'border: 1px solid black; text-shadow: 0 2px red;',
hint_actor: hintActor });
vbox.add(entryHintActor,
{ expand: true,
y_fill: false, y_align: St.Align.MIDDLE });
let hintActor2 = new St.Label({ text: 'Hint both (actor)' });
let entryHintBoth = new St.Entry({ style: 'border: 1px solid black; text-shadow: 0 2px red;',
hint_actor: hintActor2 });
let idx = 0;
Mainloop.timeout_add_seconds(1, function() {
idx++;
if (idx % 2 == 0)
entryHintBoth.hint_actor = hintActor2;
else
entryHintBoth.hint_text = 'Hint both (text)';
return true;
});
vbox.add(entryHintBoth,
{ expand: true,
y_fill: false, y_align: St.Align.MIDDLE });
UI.main(stage);
}
test();

View File

@ -27,11 +27,11 @@ done
builddir=`dirname $0`
builddir=`cd $builddir && pwd`
srcdir=$builddir/@srcdir@
srcdir=@srcdir@
srcdir=`cd $srcdir && pwd`
GI_TYPELIB_PATH="$GI_TYPELIB_PATH${GI_TYPELIB_PATH:+:}@MUTTER_TYPELIB_DIR@:$builddir/../src:$builddir/../src/gvc"
GJS_PATH="$srcdir:$srcdir/../js"
GJS_PATH="$srcdir:$srcdir/../js:$builddir/../js"
GJS_DEBUG_OUTPUT=stderr
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
GNOME_SHELL_TESTSDIR="$srcdir/"