Skip to content

Commit 27fec7a

Browse files
committed
♻️ Rename method
1 parent 3630e46 commit 27fec7a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

prefs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var PreferencesDialog = class PreferencesDialog {
3434

3535
// Load the user interface file.
3636
this._builder = new Gtk.Builder();
37-
this._builder.add_from_resource(`/ui/${utils.gtk4() ? 'gtk4' : 'gtk3'}.ui`);
37+
this._builder.add_from_resource(`/ui/${utils.isGTK4() ? 'gtk4' : 'gtk3'}.ui`);
3838

3939
// This is our top-level widget which we will return later.
4040
this._widget = this._builder.get_object('settings-widget');
@@ -77,7 +77,7 @@ var PreferencesDialog = class PreferencesDialog {
7777

7878
// Add a menu to the title bar of the preferences dialog.
7979
this._widget.connect('realize', (widget) => {
80-
const window = utils.gtk4() ? widget.get_root() : widget.get_toplevel();
80+
const window = utils.isGTK4() ? widget.get_root() : widget.get_toplevel();
8181

8282
// Show the version number in the title bar.
8383
window.set_title(`Burn-My-Windows ${Me.metadata.version}`);
@@ -113,7 +113,7 @@ var PreferencesDialog = class PreferencesDialog {
113113
});
114114

115115
// Show the widgets on GTK3.
116-
if (!utils.gtk4()) {
116+
if (!utils.isGTK4()) {
117117
this._widget.show_all();
118118
}
119119
}
@@ -280,7 +280,7 @@ var PreferencesDialog = class PreferencesDialog {
280280

281281
this._builder.get_object('fire-preset-button').set_menu_model(menu);
282282

283-
const root = utils.gtk4() ? widget.get_root() : widget.get_toplevel();
283+
const root = utils.isGTK4() ? widget.get_root() : widget.get_toplevel();
284284
root.insert_action_group(groupName, group);
285285
});
286286
}

src/common/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ function debug(message) {
3939
}
4040

4141
// This method simply returns true if we are currently using GTK4.
42-
function gtk4() {
42+
function isGTK4() {
4343
return Gtk.get_major_version() == 4;
4444
}

0 commit comments

Comments
 (0)