diff --git a/docs/how-to-create-new-effects.md b/docs/how-to-create-new-effects.md index 2c3a6db..9b1ccc1 100644 --- a/docs/how-to-create-new-effects.md +++ b/docs/how-to-create-new-effects.md @@ -261,7 +261,7 @@ This is because starting with GNOME Shell 40, the preference dialog uses GTK4, b Usually, there are only a few minor differences between the two files. We will load the respective file in the `initPreferences()` method of your new effect class. -Just save the code below to `resources/ui/gtk3/simpleFadePage.ui` and `resources/ui/gtk4/simpleFadePage.ui` respectively. +Just save the code below to `resources/ui/gtk3/SimpleFade.ui` and `resources/ui/gtk4/SimpleFade.ui` respectively. Remember to replace any occurrence of `simple-fade` with your effect's nick-name!
@@ -545,7 +545,7 @@ In order to load the above `*.ui` files, add the following code to your effect's static initPreferences(dialog) { // Add the settings page to the builder. - dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/simpleFadePage.ui`); + dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/SimpleFade.ui`); // These connect the settings to the UI elements. Have a look at prefs.js // on how to bind other types of UI elements. diff --git a/prefs.js b/prefs.js index 4a67280..5c41ce4 100644 --- a/prefs.js +++ b/prefs.js @@ -59,16 +59,10 @@ var PreferencesDialog = class PreferencesDialog { 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'); - // Add the General Options page to the main stack. - const stack = this._builder.get_object('main-stack'); - stack.add_titled( - this._builder.get_object('general-prefs'), 'general', 'General Options'); - // Add all other effect pages. ALL_EFFECTS.forEach(Effect => { const [minMajor, minMinor] = Effect.getMinShellVersion(); diff --git a/resources/ui/gtk3/energizeAPage.ui b/resources/ui/gtk3/EnergizeA.ui similarity index 100% rename from resources/ui/gtk3/energizeAPage.ui rename to resources/ui/gtk3/EnergizeA.ui diff --git a/resources/ui/gtk3/energizeBPage.ui b/resources/ui/gtk3/EnergizeB.ui similarity index 100% rename from resources/ui/gtk3/energizeBPage.ui rename to resources/ui/gtk3/EnergizeB.ui diff --git a/resources/ui/gtk3/firePage.ui b/resources/ui/gtk3/Fire.ui similarity index 100% rename from resources/ui/gtk3/firePage.ui rename to resources/ui/gtk3/Fire.ui diff --git a/resources/ui/gtk3/tvPage.ui b/resources/ui/gtk3/TVEffect.ui similarity index 100% rename from resources/ui/gtk3/tvPage.ui rename to resources/ui/gtk3/TVEffect.ui diff --git a/resources/ui/gtk3/wispsPage.ui b/resources/ui/gtk3/Wisps.ui similarity index 100% rename from resources/ui/gtk3/wispsPage.ui rename to resources/ui/gtk3/Wisps.ui diff --git a/resources/ui/gtk3/generalPage.ui b/resources/ui/gtk3/generalPage.ui deleted file mode 100644 index 9c5c704..0000000 --- a/resources/ui/gtk3/generalPage.ui +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - vertical - 60 - 60 - 30 - 30 - - - - center - burn-my-windows-symbolic - 128 - - - - - - Welcome to Burn-My-Windows! - 8 - 6 - - - - - - - If you like this extension, recommend it to your friends :) - 36 - - - - - - - - - none - - - - 10 - 10 - 10 - 10 - 0 - - - 8 - - - vertical - 3 - - - Close Window Animation - 0 - start - center - 1 - - - - - If multiple are selected, one is chosen randomly. - 0 - start - center - 1 - - - - - - - - close-effect-menu - - - 8 - - - Choose Effects - - - - - pan-down-symbolic - 1 - - - - - - - - - - - - - - 10 - 10 - 10 - 10 - 0 - - - 8 - - - Also Burn Dialogs - 0 - start - center - 1 - - - - - end - center - - - - - - - edit-clear-symbolic - 1 - - - Reset to Default Value - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/resources/ui/gtk3/prefs.ui b/resources/ui/gtk3/prefs.ui index 5b79db1..e2dc5dc 100644 --- a/resources/ui/gtk3/prefs.ui +++ b/resources/ui/gtk3/prefs.ui @@ -2,6 +2,8 @@ + + main-menu 1 @@ -25,6 +27,171 @@ slide-up-down 1 + + + general + General Options + + + + vertical + 60 + 60 + 30 + 30 + + + + center + burn-my-windows-symbolic + 128 + + + + + + Welcome to Burn-My-Windows! + 8 + 6 + + + + + + + If you like this extension, recommend it to your friends :) + 36 + + + + + + + + + none + + + + 10 + 10 + 10 + 10 + 0 + + + 8 + + + vertical + 3 + + + Close Window Animation + 0 + start + center + 1 + + + + + If multiple are selected, one is chosen randomly. + 0 + start + center + 1 + + + + + + + + close-effect-menu + + + 8 + + + Choose Effects + + + + + pan-down-symbolic + 1 + + + + + + + + + + + + + + 10 + 10 + 10 + 10 + 0 + + + 8 + + + Also Burn Dialogs + 0 + start + center + 1 + + + + + end + center + + + + + + + edit-clear-symbolic + 1 + + + Reset to Default Value + + + + + + + + + + + + + + + + + + + diff --git a/resources/ui/gtk4/energizeAPage.ui b/resources/ui/gtk4/EnergizeA.ui similarity index 100% rename from resources/ui/gtk4/energizeAPage.ui rename to resources/ui/gtk4/EnergizeA.ui diff --git a/resources/ui/gtk4/energizeBPage.ui b/resources/ui/gtk4/EnergizeB.ui similarity index 100% rename from resources/ui/gtk4/energizeBPage.ui rename to resources/ui/gtk4/EnergizeB.ui diff --git a/resources/ui/gtk4/firePage.ui b/resources/ui/gtk4/Fire.ui similarity index 100% rename from resources/ui/gtk4/firePage.ui rename to resources/ui/gtk4/Fire.ui diff --git a/resources/ui/gtk4/matrixPage.ui b/resources/ui/gtk4/Matrix.ui similarity index 100% rename from resources/ui/gtk4/matrixPage.ui rename to resources/ui/gtk4/Matrix.ui diff --git a/resources/ui/gtk4/trexPage.ui b/resources/ui/gtk4/TRexAttack.ui similarity index 100% rename from resources/ui/gtk4/trexPage.ui rename to resources/ui/gtk4/TRexAttack.ui diff --git a/resources/ui/gtk4/tvPage.ui b/resources/ui/gtk4/TVEffect.ui similarity index 100% rename from resources/ui/gtk4/tvPage.ui rename to resources/ui/gtk4/TVEffect.ui diff --git a/resources/ui/gtk4/wispsPage.ui b/resources/ui/gtk4/Wisps.ui similarity index 100% rename from resources/ui/gtk4/wispsPage.ui rename to resources/ui/gtk4/Wisps.ui diff --git a/resources/ui/gtk4/generalPage.ui b/resources/ui/gtk4/generalPage.ui deleted file mode 100644 index 077d700..0000000 --- a/resources/ui/gtk4/generalPage.ui +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - vertical - 60 - 60 - 60 - 60 - - - - center - burn-my-windows-symbolic - 128 - - - - - - Welcome to Burn-My-Windows! - 8 - 6 - - - - - - - If you like this extension, recommend it to your friends :) - 36 - - - - - - - - none - 1 - - - - - - 0 - - - - - vertical - 3 - - - Close Window Animation - 0 - start - center - 1 - - - - - If multiple are selected, one is chosen randomly. - 0 - start - center - 1 - - - - - - - - Choose Effects - close-effect-menu - - - - - - - - - - 0 - - - - - Also Burn Dialogs - 0 - start - center - 1 - - - - - end - center - - - - - edit-clear-symbolic - Reset to Default Value - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/resources/ui/gtk4/prefs.ui b/resources/ui/gtk4/prefs.ui index 92a5f39..9d77674 100644 --- a/resources/ui/gtk4/prefs.ui +++ b/resources/ui/gtk4/prefs.ui @@ -2,6 +2,8 @@ + + main-menu open-menu-symbolic @@ -18,6 +20,144 @@ slide-up-down 1 + + + general + General Options + + + + vertical + 60 + 60 + 60 + 60 + + + + center + burn-my-windows-symbolic + 128 + + + + + + Welcome to Burn-My-Windows! + 8 + 6 + + + + + + + If you like this extension, recommend it to your friends :) + 36 + + + + + + + + none + 1 + + + + + + 0 + + + + + vertical + 3 + + + Close Window Animation + 0 + start + center + 1 + + + + + If multiple are selected, one is chosen randomly. + 0 + start + center + 1 + + + + + + + + Choose Effects + close-effect-menu + + + + + + + + + + 0 + + + + + Also Burn Dialogs + 0 + start + center + 1 + + + + + end + center + + + + + edit-clear-symbolic + Reset to Default Value + + + + + + + + + + + + + + + + + + diff --git a/src/EnergizeA.js b/src/EnergizeA.js index 3dab7bd..2d16b12 100644 --- a/src/EnergizeA.js +++ b/src/EnergizeA.js @@ -59,7 +59,7 @@ var EnergizeA = class EnergizeA { static initPreferences(dialog) { // Add the settings page to the builder. - dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/energizeAPage.ui`); + dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/EnergizeA.ui`); // Bind all properties. dialog.bindAdjustment('energize-a-animation-time'); diff --git a/src/EnergizeB.js b/src/EnergizeB.js index a9848d6..58e225b 100644 --- a/src/EnergizeB.js +++ b/src/EnergizeB.js @@ -59,7 +59,7 @@ var EnergizeB = class EnergizeB { static initPreferences(dialog) { // Add the settings page to the builder. - dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/energizeBPage.ui`); + dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/EnergizeB.ui`); // Bind all properties. dialog.bindAdjustment('energize-b-animation-time'); diff --git a/src/Fire.js b/src/Fire.js index 55a4a38..b90c078 100644 --- a/src/Fire.js +++ b/src/Fire.js @@ -63,7 +63,7 @@ var Fire = class Fire { static initPreferences(dialog) { // Add the settings page to the builder. - dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/firePage.ui`); + dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/Fire.ui`); // Bind all properties. dialog.bindAdjustment('fire-animation-time'); diff --git a/src/Matrix.js b/src/Matrix.js index a879ff5..3701f99 100644 --- a/src/Matrix.js +++ b/src/Matrix.js @@ -63,7 +63,7 @@ var Matrix = class Matrix { static initPreferences(dialog) { // Add the settings page to the builder. - dialog.getBuilder().add_from_resource('/ui/gtk4/matrixPage.ui'); + dialog.getBuilder().add_from_resource('/ui/gtk4/Matrix.ui'); // Bind all properties. dialog.bindAdjustment('matrix-animation-time'); diff --git a/src/TRexAttack.js b/src/TRexAttack.js index 99286de..3b610a4 100644 --- a/src/TRexAttack.js +++ b/src/TRexAttack.js @@ -61,7 +61,7 @@ var TRexAttack = class TRexAttack { static initPreferences(dialog) { // Add the settings page to the builder. - dialog.getBuilder().add_from_resource('/ui/gtk4/trexPage.ui'); + dialog.getBuilder().add_from_resource('/ui/gtk4/TRexAttack.ui'); // Bind all properties. dialog.bindAdjustment('trex-animation-time'); diff --git a/src/TVEffect.js b/src/TVEffect.js index d97f8a7..96643b6 100644 --- a/src/TVEffect.js +++ b/src/TVEffect.js @@ -61,7 +61,7 @@ var TVEffect = class TVEffect { static initPreferences(dialog) { // Add the settings page to the builder. - dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/tvPage.ui`); + dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/TVEffect.ui`); // Bind all properties. dialog.bindAdjustment('tv-animation-time'); diff --git a/src/Wisps.js b/src/Wisps.js index a04e2c8..e221cad 100644 --- a/src/Wisps.js +++ b/src/Wisps.js @@ -60,7 +60,7 @@ var Wisps = class Wisps { static initPreferences(dialog) { // Add the settings page to the builder. - dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/wispsPage.ui`); + dialog.getBuilder().add_from_resource(`/ui/${utils.getGTKString()}/Wisps.ui`); // Bind all properties. dialog.bindAdjustment('wisps-animation-time');