Change property name
This commit is contained in:
@@ -12,10 +12,10 @@ var BackgroundButton = GObject.registerClass({
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'BackgroundButton.ui'])}`,
|
||||
InternalChildren: ['filechooser'],
|
||||
Properties: {
|
||||
path: GObject.ParamSpec.string(
|
||||
'path',
|
||||
'Path',
|
||||
'Path to the background file',
|
||||
uri: GObject.ParamSpec.string(
|
||||
'uri',
|
||||
'URI',
|
||||
'URI to the background file',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
null
|
||||
),
|
||||
@@ -45,7 +45,7 @@ var BackgroundButton = GObject.registerClass({
|
||||
onFileChooserResponse(fileChooser, responseId) {
|
||||
if (responseId !== Gtk.ResponseType.ACCEPT)
|
||||
return;
|
||||
this.path = fileChooser.get_file().get_uri();
|
||||
this.uri = fileChooser.get_file().get_uri();
|
||||
}
|
||||
|
||||
onClicked(_button) {
|
||||
|
||||
@@ -19,7 +19,7 @@ var BackgroundsPage = GObject.registerClass({
|
||||
super(props);
|
||||
const settings = new Gio.Settings({ schema: 'org.gnome.desktop.background' });
|
||||
|
||||
settings.bind('picture-uri', this._day_button, 'path', Gio.SettingsBindFlags.DEFAULT);
|
||||
settings.bind('picture-uri-dark', this._night_button, 'path', Gio.SettingsBindFlags.DEFAULT);
|
||||
settings.bind('picture-uri', this._day_button, 'uri', Gio.SettingsBindFlags.DEFAULT);
|
||||
settings.bind('picture-uri-dark', this._night_button, 'uri', Gio.SettingsBindFlags.DEFAULT);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
<object class="GtkPicture">
|
||||
<binding name="paintable">
|
||||
<closure function="getThumbnail" type="GdkPaintable">
|
||||
<lookup name="path">BackgroundButton</lookup>
|
||||
<lookup name="uri">BackgroundButton</lookup>
|
||||
<lookup name="thumb-width">BackgroundButton</lookup>
|
||||
<lookup name="thumb-height">BackgroundButton</lookup>
|
||||
</closure>
|
||||
|
||||
Reference in New Issue
Block a user