[StScrollView] Fix incorrect assertion, defaults, and test case
The type we don't currently handle is _ALWAYS, my original use of g_return_if_fail was wrong. Also the default should be AUTOMATIC in the properties, not ALWAYS. Finally the test case was still using the incorrect St.ScrollPolicy. https://bugzilla.gnome.org/show_bug.cgi?id=609015
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const St = imports.gi.St;
|
||||
|
||||
const UI = imports.testcommon.ui;
|
||||
@ -22,9 +23,9 @@ let v = new St.ScrollView();
|
||||
vbox.add(v, { expand: true });
|
||||
|
||||
toggle.connect('notify::checked', function () {
|
||||
v.set_policy(toggle.checked ? St.ScrollPolicy.AUTOMATIC
|
||||
: St.ScrollPolicy.NEVER,
|
||||
St.ScrollPolicy.AUTOMATIC);
|
||||
v.set_policy(toggle.checked ? Gtk.PolicyType.AUTOMATIC
|
||||
: Gtk.PolicyType.NEVER,
|
||||
Gtk.PolicyType.AUTOMATIC);
|
||||
});
|
||||
|
||||
let b = new St.BoxLayout({ vertical: true,
|
||||
|
Reference in New Issue
Block a user