mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
use fillPreferencesWindow to create prefs window in gnome 42
This commit is contained in:
12
prefs.js
12
prefs.js
@@ -26,8 +26,10 @@ const GLib = imports.gi.GLib;
|
||||
const GObject = imports.gi.GObject;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Gdk = imports.gi.Gdk;
|
||||
const Adw = imports.gi.Adw;
|
||||
const Lang = imports.lang;
|
||||
const Mainloop = imports.mainloop;
|
||||
const Config = imports.misc.config;
|
||||
|
||||
const Me = imports.misc.extensionUtils.getCurrentExtension();
|
||||
const Convenience = Me.imports.convenience;
|
||||
@@ -2459,6 +2461,16 @@ function init() {
|
||||
Convenience.initTranslations();
|
||||
}
|
||||
|
||||
function fillPreferencesWindow(window) {
|
||||
window.set_default_size(680, 740);
|
||||
|
||||
let preferences = new Preferences();
|
||||
let box = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL});
|
||||
box.append(new Adw.HeaderBar);
|
||||
box.append(preferences.notebook);
|
||||
window.set_content(box);
|
||||
}
|
||||
|
||||
function buildPrefsWidget() {
|
||||
Gtk.Window.list_toplevels()[0].set_default_size(680, 740);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user