Commit Graph

80 Commits

Author SHA1 Message Date
Jonas Ådahl
632a643994 Use paint and pick context to get framebuffer
Mutter and Clutter was changed to pass around the current target
framebuffer via the paint context instead of via the deprecated Cogl
framebuffer stack.

The framebuffer stack has also been removed from Cogl so change to use
the one in the paint context instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/827
2019-12-03 19:07:15 +00:00
Florian Müllner
1e203f4631 cleanup: Replace deprecated lower/raise calls
Those methods have been deprecated for a long time, so
move to the drop-in replacement.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808
2019-11-06 09:42:57 +01:00
Florian Müllner
43cf466d09 js: Replace Clutter.Actor.get_allocation_geometry()
The function was deprecated and has now been dropped from mutter.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/776
2019-10-21 18:41:35 +02:00
Marco Trevisan (Treviño)
c4c5c4fd5c cleanup: Use inheritance for Actor classes instead of composition
Remove the `this.actor = ...` and `this.actor._delegate = this` patterns in most
of classes, by inheriting all the actor container classes.

Uses interfaces when needed for making sure that multiple classes will implement
some required methods or to avoid redefining the same code multiple times.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
2019-10-16 15:26:13 +00:00
Florian Müllner
2fc4987c73 cleanup: Stop using Mainloop module
It is deprecated in favor of the regular GLib functions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/718
2019-09-12 19:09:24 +02:00
Jonas Dreßler
02c76695e5 tests: Stop using global grabs
Global grabs are being removed from Clutter in favour of input device
grabs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/495
2019-07-02 01:18:15 +00:00
Florian Müllner
29b04fcbf2 style: Fix stray/missing semi-colons
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
2019-07-01 23:44:11 +02:00
Florian Müllner
fd50b9a45e cleanup: Use destructuring for imports from GI
This is *much* nicer than repetitive "imports.gi" lines ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/399
2019-02-09 07:39:20 +01:00
Florian Müllner
e68dfed1f7 cleanup: Port GObject classes to JS6 classes
GJS added API for defining GObject classes with ES6 class syntax
last cycle, use it to port the remaining Lang.Class classes to
the new syntax.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
2019-01-25 14:02:44 +00:00
Florian Müllner
2fc1f1adbe cleanup: Remove obsolete Lang imports
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/350
2019-01-22 21:33:46 +00:00
Georges Basile Stavracas Neto
2ee321e0d8
tests: Stop using Shell.GenericContainer
The test doesn't look and behave like before, but they are
already broken in master anyway. This commit makes it work
without Shell.GenericContainer, but the test itself remains
to be fixed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/153
2018-10-08 22:43:01 -03:00
Florian Müllner
3b1330880f cleanup: Use Function.prototype.bind()
When not using arrow notation with anonymous functions, we use Lang.bind()
to bind `this` to named callbacks. However since ES5, this functionality
is already provided by Function.prototype.bind() - in fact, Lang.bind()
itself uses it when no extra arguments are specified. Just use the built-in
function directly where possible, and use arrow notation in the few places
where we pass additional arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:02 +00:00
Florian Müllner
213e38c2ef cleanup: Use arrow notation for anonymous functions
Arrow notation is great, use it consistently through-out the code base
to bind `this` to anonymous functions, replacing the more overbose
Lang.bind(this, function() {}).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:00 +00:00
Florian Müllner
76f09b1e49 cleanup: Use method syntax
Modern javascript has a short-hand for function properties, embrace
it for better readability and to prepare for an eventual port to
ES6 classes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:54:58 +00:00
Florian Müllner
cff0b81f32 tests: Set calendar event source
Ever since commit e9e30138bd (2011!), the calendar only initialized
the header at construction time. Set an event source to trigger an
update of the content area, which is what the test is mainly intended
for.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
2018-02-21 14:30:52 +01:00
Florian Müllner
23d6c4dcc0 tests: Fix import error in calendar
The Calendar module requires C_ at import time, which is only
available after Environment.init() has been called.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
2018-02-21 14:30:37 +01:00
Florian Müllner
66c86109dd tests: Fix a warning
Gjs now warns about excess parameters passed to functions, so don't
use Gtk.main_quit directly as signal callback.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
2018-02-21 14:30:30 +01:00
Florian Müllner
2e45be96b6 tests: Replace "for each" construct
It is no longer supported by recent mozjs versions, so replace it with
a regular for loop to unbreak the tests.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
2018-02-21 14:30:22 +01:00
Florian Müllner
5d1626aba1 tests: Avoid redeclarations with let
Mozjs made this error fatal a while ago, so those tests were broken
by gjs' JS engine updates.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
2018-02-21 14:30:09 +01:00
Cosimo Cecchi
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
Cosimo Cecchi
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
Cosimo Cecchi
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
Lionel Landwerlin
02a7b0dcfd tests: require given version of Gtk 2017-02-15 12:04:53 +00:00
Lionel Landwerlin
dd8c06f2c5 tests: load required version of Clutter/Gtk early 2017-02-15 12:04:53 +00:00
Florian Müllner
86e04048ff st: Remove StTable
Alas, the last use of StTable is not gone, so we can finally remove
our copy of the widget.

https://bugzilla.gnome.org/show_bug.cgi?id=703833
2015-05-05 16:37:41 +02:00
Florian Müllner
4a38359635 tests: Add menu item without action to gapplication
Menu items with missing actions are expected to be visible but
insensitive - add a test case for this.
2015-02-27 15:02:27 +01:00
Florian Müllner
5fca85cd28 scroll-view: Support GTK_POLICY_EXTERNAL
GTK+ added a new PolicyType which currently triggers compiler warnings
about unhandled values in switch statements. We also have a use case for
it already, so add support for the new policy type.

https://bugzilla.gnome.org/show_bug.cgi?id=739379
2014-10-30 00:37:55 +01:00
Jasper St. Pierre
92f9aff784 tests/gapplication: Don't pass too many args to gtk_init 2014-04-23 16:49:44 -04:00
Florian Müllner
53d268a7ef st: Remove support for fixed positioning in BoxLayout
It is the job of layout containers to arrange their children; having
a hidden feature that *also* allows children to be positioned freely
outside the parent's allocation is just odd.
With the last user of the feature gone, kill it.

https://bugzilla.gnome.org/show_bug.cgi?id=703808
2013-07-09 23:19:20 +02:00
Lionel Landwerlin
ffac5279a7 tests: add animated box-shadow test to demo optimized painting 2013-07-09 11:24:26 +01:00
Florian Müllner
1bd8c67041 st-scroll-view: Add :overlay-scrollbars property
If enabled, scrollbars take away from the allocation given to the
view's content. This is usually preferrable to painting the bars on
top of the content, but there are exceptions, for instance when the
content needs to be centered with regard to the view as a whole.
Add a :overlay-scrollbars property to account for those cases.

https://bugzilla.gnome.org/show_bug.cgi?id=694261
2013-02-22 10:57:50 +01:00
Jasper St. Pierre
7c93639e59 scroll-view-sizing: Enable vfade by default
https://bugzilla.gnome.org/show_bug.cgi?id=689249
2012-11-29 16:17:09 -05:00
Jasper St. Pierre
affcd5c7de scroll-view-sizing: Add a lot more boxes
https://bugzilla.gnome.org/show_bug.cgi?id=689249
2012-11-29 16:17:08 -05:00
Giovanni Campagna
687e1eabed Overview: Resize the window title labels on content change
Reposition the window overlay when the title changes, using the current
transformed size of the window clone.
Includes a test that changes title to a string of random length every 3 seconds.

Based on a patch by Alex Hultman <alexhultman@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=620874
2012-10-27 18:18:48 +02:00
Tanner Doshier
2502ca6ccc tests: Actually call test() in box-layout 2012-10-11 19:27:56 -03:00
Jasper St. Pierre
c21b1e5fe0 st: Remove StIconType
GTK+ works by explicitly specifying a -symbolic suffix for all icons.
Do the same here.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 16:41:09 -03:00
Jasper St. Pierre
7dbc78c95f st-theme-node: Add repeating backgrounds
Add support for the CSS "background-repeat" property. Currently, this
only supports on/off, rather than allowing tiling in each individual
dimension. It is supported for both the cogl and cairo rendering paths.

https://bugzilla.gnome.org/show_bug.cgi?id=680801
2012-08-03 12:27:20 -03:00
Jasper St. Pierre
114fb4219b tests: Fix borders test
Bad merge

https://bugzilla.gnome.org/show_bug.cgi?id=680801
2012-08-03 12:27:20 -03:00
Jasper St. Pierre
985db40547 test-gapplication: Untabify, add modeline 2012-07-14 18:27:10 -04:00
Giovanni Campagna
464813ecbb Assorted test-gapplication fixes
Move this test toghether with the others, and set the appmenu
only after the application is registered (i.e. in startup)

https://bugzilla.gnome.org/show_bug.cgi?id=678978
2012-07-13 12:29:44 +02:00
Jasper St. Pierre
c7196a519f tests: Run each test in a function
As the global object of a context is rooted, if we want the GC to act
on these objects we need to take them out of the globals.

https://bugzilla.gnome.org/show_bug.cgi?id=678737
2012-06-24 19:20:48 -04:00
Jasper St. Pierre
0d82ce5210 tests: Don't use the default stage
https://bugzilla.gnome.org/show_bug.cgi?id=678737
2012-06-24 19:20:48 -04:00
Jasper St. Pierre
1983097d3a tests: Refactor background-size test to support non-square containers
https://bugzilla.gnome.org/show_bug.cgi?id=672321
2012-03-18 09:33:30 -04:00
Jasper St. Pierre
1c60aa58ae tests: Add a cogl rendering option to the background-size test
Right now we only test the cairo rendering path

https://bugzilla.gnome.org/show_bug.cgi?id=672321
2012-03-18 09:33:30 -04:00
Quentin Glidic
25948f214e St: Implement background-size CSS property
Implement the background-size CSS property, specified by the CSS
Backgrounds and Borders Module Level 3, including the keywords
"contain", "cover", and fixed-size backgrounds.

https://bugzilla.gnome.org/show_bug.cgi?id=633462
2011-12-23 14:23:23 -05:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Adel Gadllah
247ad9d7ab scroll-view-sizing: Add tests for padding / borders
Add tests to verify that the fade works fine with borders and
padding.

https://bugzilla.gnome.org/show_bug.cgi?id=659159
2011-09-19 18:51:07 +02:00
Jasper St. Pierre
523e431ece tests: Add transition test
https://bugzilla.gnome.org/show_bug.cgi?id=658092
2011-09-15 13:27:12 -04:00
Jasper St. Pierre
5bc1dede81 tests: Add tests for large rounded corners
https://bugzilla.gnome.org/show_bug.cgi?id=649513
2011-07-09 20:13:47 -04:00
Jasper St. Pierre
e7289378b7 st-scroll-view: Make the fade effect and offset themable
Theme authors now have the power (and responsibility) of creating fade
effects with the new CSS length property '-st-fade-offset'. A value of
0 disables the effect.

This new CSS approach replaces the current programmatic toggle of
the 'vfade' property. A new CSS style class name 'vfade' is used as
a replacement for the old property.

https://bugzilla.gnome.org/show_bug.cgi?id=651813
2011-06-04 15:43:49 -04:00