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