dbusServices/extensions: Set title on window instead of headerbar

GTK4 will remove the GtkHeaderBar:title property, so stop using it
and set the window's title property instead, as that's what headbars
use in both GTK3 and GTK4 unless explicitly overridden.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1495>
This commit is contained in:
Florian Müllner 2020-04-15 20:27:15 +02:00 committed by Marge Bot
parent 618762ebe0
commit 9d14b0c682

View File

@ -156,7 +156,6 @@ var ExtensionPrefsDialog = GObject.registerClass({
GTypeName: 'ExtensionPrefsDialog', GTypeName: 'ExtensionPrefsDialog',
Template: 'resource:///org/gnome/Shell/Extensions/ui/extension-prefs-dialog.ui', Template: 'resource:///org/gnome/Shell/Extensions/ui/extension-prefs-dialog.ui',
InternalChildren: [ InternalChildren: [
'headerBar',
'stack', 'stack',
'expander', 'expander',
'expanderArrow', 'expanderArrow',
@ -165,13 +164,13 @@ var ExtensionPrefsDialog = GObject.registerClass({
], ],
}, class ExtensionPrefsDialog extends Gtk.Window { }, class ExtensionPrefsDialog extends Gtk.Window {
_init(extension) { _init(extension) {
super._init(); super._init({
title: extension.metadata.name,
});
this._uuid = extension.uuid; this._uuid = extension.uuid;
this._url = extension.metadata.url || ''; this._url = extension.metadata.url || '';
this._headerBar.title = extension.metadata.name;
this._actionGroup = new Gio.SimpleActionGroup(); this._actionGroup = new Gio.SimpleActionGroup();
this.insert_action_group('win', this._actionGroup); this.insert_action_group('win', this._actionGroup);