Compare commits

...

5 Commits
v2 ... v3

Author SHA1 Message Date
Simon Schneegans 8265010650 📝 Update changelog
Deploy / Extension Bundle (push) Has been cancelled
2021-12-20 20:32:10 +01:00
Simon Schneegans d4ced0b5fe 🪲 Fix support for GNOME 3.36 2021-12-20 20:24:29 +01:00
Simon Schneegans 42ccf20704 🎉 Add support for older GNOME versions 2021-12-20 20:11:39 +01:00
Simon Schneegans 570a0146b6 📝 Fix typo 2021-12-17 06:25:11 +01:00
Simon Schneegans 0480dda3ee 🎉 Bump version number 2021-12-16 20:32:41 +01:00
7 changed files with 376 additions and 8 deletions
+1 -2
View File
@@ -8,8 +8,7 @@
<a href="LICENSE"><img src="https://img.shields.io/badge/License-GPLv3-blue.svg?labelColor=303030" /></a>
<a href="https://extensions.gnome.org/extension/4679/burn-my-windows/"><img src="https://img.shields.io/badge/Download-extensions.gnome.org-e67f4d.svg?logo=gnome&logoColor=lightgrey&labelColor=303030" /></a>
When I released the [Desktop Cube Extension](https://github.com/Schneegans/Desktop-Cube/), many people requested to revive the one of the most useless features of Linux desktop history: Setting windows on fire!
When I released the [Desktop Cube Extension](https://github.com/Schneegans/Desktop-Cube/), many people requested to revive one of the most useless features of Linux desktop history: Setting windows on fire!
This extension is not only more useless than the cube, but it is also much more hacky. So I expect some bug! [Let's incinerate them all](https://github.com/Schneegans/Burn-My-Windows/issues)!
+8
View File
@@ -1,5 +1,13 @@
# Changelog of the Burn-My-Windows Extension
## [Burn My Window 3](https://github.com/schneegans/Burn-My-Windows/releases/tag/v3)
**Release Date:** 2021-12-20
#### New Features
* Add support for GNOME 3.36 and GNOME 3.38.
## [Burn My Window 2](https://github.com/schneegans/Burn-My-Windows/releases/tag/v2)
**Release Date:** 2021-12-16
+3 -1
View File
@@ -5,9 +5,11 @@
"gettext-domain": "burn-my-windows",
"settings-schema": "org.gnome.shell.extensions.burn-my-windows",
"shell-version": [
"3.36",
"3.38",
"40",
"41"
],
"url": "https://github.com/Schneegans/Burn-My-Windows",
"version": 2
"version": 3
}
+15 -5
View File
@@ -34,7 +34,7 @@ var PreferencesDialog = class PreferencesDialog {
// Load the user interface file.
this._builder = new Gtk.Builder();
this._builder.add_from_resource(`/ui/settings.ui`);
this._builder.add_from_resource(`/ui/${utils.gtk4() ? 'gtk4' : 'gtk3'}.ui`);
// This is our top-level widget which we will return later.
this._widget = this._builder.get_object('settings-widget');
@@ -70,6 +70,11 @@ var PreferencesDialog = class PreferencesDialog {
// Unregister our resources.
Gio.resources_unregister(this._resources);
});
// Show the widgets on GTK3.
if (!utils.gtk4()) {
this._widget.show_all();
}
}
// -------------------------------------------------------------------- public interface
@@ -124,9 +129,12 @@ var PreferencesDialog = class PreferencesDialog {
settingsKey, this._builder.get_object(settingsKey), property,
Gio.SettingsBindFlags.DEFAULT);
this._builder.get_object('reset-' + settingsKey)?.connect('clicked', () => {
this._settings.reset(settingsKey);
});
const resetButton = this._builder.get_object('reset-' + settingsKey);
if (resetButton) {
resetButton.connect('clicked', () => {
this._settings.reset(settingsKey);
});
}
}
// This populates the preset dropdown menu for the fire options.
@@ -210,7 +218,9 @@ var PreferencesDialog = class PreferencesDialog {
});
this._builder.get_object('fire-preset-button').set_menu_model(menu);
widget.get_root().insert_action_group(groupName, group);
const root = utils.gtk4() ? widget.get_root() : widget.get_toplevel();
root.insert_action_group(groupName, group);
});
}
}
+342
View File
@@ -0,0 +1,342 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="desktop-cube">
<requires lib="gtk" version="3.0" />
<object class="GtkAdjustment" id="destroy-animation-time">
<property name="upper">10000</property>
<property name="lower">500</property>
<property name="step-increment">10</property>
<property name="page-increment">100</property>
</object>
<object class="GtkAdjustment" id="flame-scale">
<property name="upper">3</property>
<property name="lower">0.1</property>
<property name="step-increment">0.01</property>
<property name="page-increment">0.1</property>
</object>
<object class="GtkAdjustment" id="flame-movement-speed">
<property name="upper">2.0</property>
<property name="lower">-2.0</property>
<property name="step-increment">0.01</property>
<property name="page-increment">0.1</property>
</object>
<object class="GtkScrolledWindow" id="settings-widget">
<property name="hscrollbar-policy">never</property>
<property name="min-content-height">200</property>
<property name="hexpand">0</property>
<property name="vexpand">1</property>
<child>
<object class="GtkViewport">
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="margin-start">60</property>
<property name="margin-end">60</property>
<property name="margin-top">30</property>
<property name="margin-bottom">30</property>
<child>
<object class="GtkLabel">
<property name="margin-top">30</property>
<property name="margin-bottom">10</property>
<property name="label">General Options</property>
<property name="xalign">0</property>
<style>
<class name="title-4" />
</style>
</object>
</child>
<child>
<object class="GtkFrame">
<child>
<object class="GtkListBox">
<property name="selection-mode">none</property>
<child>
<object class="GtkListBoxRow">
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="spacing">8</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Animation Time [ms]</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkScale">
<property name="halign">end</property>
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">0</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">destroy-animation-time</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-destroy-animation-time">
<child>
<object class="GtkImage">
<property name="icon-name">edit-clear-symbolic</property>
<property name="icon-size">1</property>
</object>
</child>
<property name="tooltip-text">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="margin-top">30</property>
<property name="margin-bottom">10</property>
<child>
<object class="GtkLabel">
<property name="label">Fire Options</property>
<property name="xalign">0</property>
<property name="hexpand">1</property>
<style>
<class name="title-4" />
</style>
</object>
</child>
<child>
<object class="GtkMenuButton" id="fire-preset-button">
<property name="relief">none</property>
<child>
<object class="GtkBox">
<property name="spacing">8</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Choose a Preset</property>
</object>
</child>
<child>
<object class="GtkImage">
<property name="icon-name">pan-down-symbolic</property>
<property name="icon-size">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkFrame">
<child>
<object class="GtkListBox">
<property name="selection-mode">none</property>
<style>
<class name="rich-list" />
</style>
<child>
<object class="GtkListBoxRow">
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="spacing">8</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Flame Scale</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkScale">
<property name="halign">end</property>
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">2</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">flame-scale</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-flame-scale">
<child>
<object class="GtkImage">
<property name="icon-name">edit-clear-symbolic</property>
<property name="icon-size">1</property>
</object>
</child>
<property name="tooltip-text">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="spacing">8</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Flame Movement Speed</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkScale">
<property name="halign">end</property>
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">2</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">flame-movement-speed</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-flame-movement-speed">
<child>
<object class="GtkImage">
<property name="icon-name">edit-clear-symbolic</property>
<property name="icon-size">1</property>
</object>
</child>
<property name="tooltip-text">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="activatable">0</property>
<child>
<object class="GtkBox">
<property name="spacing">8</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Fire Gradient</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="fire-color-1">
<property name="use_alpha">1</property>
<property name="show_editor">1</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="fire-color-2">
<property name="use_alpha">1</property>
<property name="show_editor">1</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="fire-color-3">
<property name="use_alpha">1</property>
<property name="show_editor">1</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="fire-color-4">
<property name="use_alpha">1</property>
<property name="show_editor">1</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="fire-color-5">
<property name="use_alpha">1</property>
<property name="show_editor">1</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-fire-colors">
<child>
<object class="GtkImage">
<property name="icon-name">edit-clear-symbolic</property>
<property name="icon-size">1</property>
</object>
</child>
<property name="tooltip-text">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
+7
View File
@@ -13,6 +13,8 @@
'use strict';
const {Gtk} = imports.gi;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = imports.misc.extensionUtils.getCurrentExtension();
@@ -35,3 +37,8 @@ function debug(message) {
log('[' + stack[0].slice(extensionRoot) + '] ' + message);
}
// This method simply returns true if we are currently using GTK4.
function gtk4() {
return Gtk.get_major_version() == 4;
}