Change property name

This commit is contained in:
Romain Vigier
2022-02-18 15:44:38 +01:00
parent d40a739680
commit 5432c229f1
3 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -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) {
+2 -2
View File
@@ -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);
}
});
+1 -1
View File
@@ -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>