♻️ Introduce utils.getGTKString()

This commit is contained in:
Simon Schneegans
2022-01-10 05:53:09 +01:00
parent 67186eb37d
commit 63515a3d8d
4 changed files with 10 additions and 12 deletions
+4 -8
View File
@@ -45,14 +45,10 @@ var PreferencesDialog = class PreferencesDialog {
this._settings = ExtensionUtils.getSettings();
// Load the general user interface files.
{
const dir = utils.isGTK4() ? 'gtk4' : 'gtk3';
this._builder = new Gtk.Builder();
this._builder.add_from_resource(`/ui/common/main-menu.ui`);
this._builder.add_from_resource(`/ui/${dir}/prefs.ui`);
this._builder.add_from_resource(`/ui/${dir}/generalPage.ui`);
}
this._builder = new Gtk.Builder();
this._builder.add_from_resource(`/ui/common/main-menu.ui`);
this._builder.add_from_resource(`/ui/${utils.getGTKString()}/prefs.ui`);
this._builder.add_from_resource(`/ui/${utils.getGTKString()}/generalPage.ui`);
// Bind general options properties.
this.bindSwitch('destroy-dialogs');