Compare commits

...

25 Commits

Author SHA1 Message Date
Simon Schneegans 8829aa039e 📝 Set release date
Deploy / Bundle GNOME Shell Extension (push) Has been cancelled
Deploy / Bundle KWin Effect (push) Has been cancelled
2023-06-06 20:44:01 +02:00
Simon Schneegans e04b2769b1 💞 Update credits 2023-06-06 20:26:37 +02:00
Simon Schneegans 9293a5ab4d 🔀 Merge pull request #346 from Schneegans/feature/support-dialog 2023-06-06 09:00:21 +02:00
Simon Schneegans 0c58b507d8 📝 Add some comments 2023-06-06 08:47:23 +02:00
Simon Schneegans a585da93a8 🔧 Revert to heart emoji as the burning emoji does not work on GTK3 2023-06-06 08:36:43 +02:00
Simon Schneegans e450e619e6 🔧 Use burning heart emoji 2023-06-06 08:35:12 +02:00
Simon Schneegans 4a747602d9 🔧 Only show the support dialog every tenth time 2023-06-06 08:33:48 +02:00
Simon Schneegans d936717ac0 🔧 Improve wording of the support-dialog 2023-06-06 08:33:17 +02:00
Simon Schneegans 154b5bec32 🔧 Use notify::visible event to show the support dialog 2023-06-06 07:44:30 +02:00
Simon Schneegans 2e20bc8753 🔧 Use map event to show the support dialog 2023-06-06 07:32:58 +02:00
Simon Schneegans 6cc26d0dbc 🔧 Show support dialog programmatically 2023-06-06 06:03:59 +02:00
Simon Schneegans 78d4e79925 🪲 Fix support dialog on GTK4 2023-06-05 21:58:52 +02:00
Simon Schneegans b8759174f8 🪲 Show dialog on GTK3 2023-06-05 21:53:00 +02:00
Simon Schneegans d89be65fe3 🔧 Add support dialog for GTK3 and GTK4 2023-06-05 21:51:33 +02:00
Simon Schneegans 106ed964d5 📝 Add changelog entry 2023-06-05 20:44:16 +02:00
Simon Schneegans f4babe7575 🎉 Add a dialog to ask for support 2023-06-05 20:41:15 +02:00
Simon Schneegans fff39f66a8 🔀 Merge pull request #345 from Schneegans/fix/#344 2023-06-05 06:01:30 +02:00
Simon Schneegans 708b4ca1ad 📝 Add changelog entry 2023-06-05 05:47:29 +02:00
Simon Schneegans b2158eb2e2 🪲 Re-add accidentally deleted line 2023-06-05 05:43:44 +02:00
Simon Schneegans bb46352c37 🪲 Attempt to fix #344 2023-06-05 05:27:18 +02:00
Sabri Ünal 6b63222cbe 🌐 Translated using Weblate (Turkish) 2023-05-28 21:04:03 +02:00
TCr3 a2daa2e1b8 🌐 Translated using Weblate (Turkish) 2023-05-28 21:04:03 +02:00
Sabri Ünal d37c505bef 🌐 Translated using Weblate (Turkish) 2023-05-28 21:04:03 +02:00
Simon Schneegans cb368a6207 🪲 Fix issue #343 2023-05-28 20:37:55 +02:00
Simon Schneegans b0e6b66380 🎉 Bump version number 2023-05-22 20:42:28 +02:00
10 changed files with 256 additions and 112 deletions
+14
View File
@@ -5,6 +5,20 @@ SPDX-License-Identifier: CC-BY-4.0
# Changelog of the Burn-My-Windows Extension
## [Burn My Windows 33](https://github.com/schneegans/Burn-My-Windows/releases/tag/v33)
**Release Date:** 2023-06-06
#### Enhancements
- When opening the preferences, a dialog is now shown occasionally to kindly ask for a donation. The dialog can be disabled once it has been shown for the first time.
- Several translations have been updated. Thanks to all the translators!
#### Bug Fixes
- Fixed an issue on GNOME 44.2 which caused the effects to look broken. It was caused by [this change](https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2650).
- Fixed an issue which prevented the settings of the Snap of Disintegration effect from being translatable.
## [Burn My Windows 32](https://github.com/schneegans/Burn-My-Windows/releases/tag/v32)
**Release Date:** 2023-05-22
+1 -1
View File
@@ -549,7 +549,7 @@ SPDX-FileCopyrightText: Your Name <your@email.com>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<interface>
<interface domain="burn-my-windows">
<object class="GtkAdjustment" id="simple-fade-animation-time">
<property name="upper">5000</property>
+1 -1
View File
@@ -14,5 +14,5 @@
"44"
],
"url": "https://github.com/Schneegans/Burn-My-Windows",
"version": 32
"version": 33
}
+62 -61
View File
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: Burn-My-Windows\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-21 16:46+0100\n"
"PO-Revision-Date: 2022-09-16 14:17+0000\n"
"Last-Translator: Muha Aliss <muhaaliss@pm.me>\n"
"PO-Revision-Date: 2023-05-27 03:16+0000\n"
"Last-Translator: Sabri Ünal <libreajans@gmail.com>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/burn-my-windows/"
"core/tr/>\n"
"Language: tr\n"
@@ -17,81 +17,81 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1-dev\n"
"X-Generator: Weblate 4.18-dev\n"
#: src/ProfileManager.js:168 resources/ui/gtk4/prefs.ui:220
#: resources/ui/gtk3/prefs.ui:265 resources/ui/adw/prefs.ui:103
msgid "Opening Windows"
msgstr ""
msgstr "Pencerelerin Açılması"
#: src/ProfileManager.js:169 resources/ui/gtk4/prefs.ui:221
#: resources/ui/gtk3/prefs.ui:266 resources/ui/adw/prefs.ui:104
msgid "Closing Windows"
msgstr ""
msgstr "Pencerelerin Kapanması"
#: src/ProfileManager.js:170 resources/ui/gtk4/prefs.ui:249
#: resources/ui/gtk3/prefs.ui:294 resources/ui/adw/prefs.ui:118
msgid "Normal Windows"
msgstr ""
msgstr "Normal Pencereler"
#: src/ProfileManager.js:171 resources/ui/gtk4/prefs.ui:250
#: resources/ui/gtk3/prefs.ui:295 resources/ui/adw/prefs.ui:119
msgid "Dialog Windows"
msgstr ""
msgstr "İletişim Kutusu Pencereleri"
#: src/ProfileManager.js:172 resources/ui/gtk4/prefs.ui:278
#: resources/ui/gtk3/prefs.ui:323 resources/ui/adw/prefs.ui:133
msgid "Default Color Scheme"
msgstr ""
msgstr "Öntanımlı Renk Şeması"
#: src/ProfileManager.js:173 resources/ui/gtk4/prefs.ui:279
#: resources/ui/gtk3/prefs.ui:324 resources/ui/adw/prefs.ui:134
msgid "Dark Color Scheme"
msgstr ""
msgstr "Koyu Renk Şeması"
#: src/ProfileManager.js:174 resources/ui/gtk4/prefs.ui:307
#: resources/ui/gtk3/prefs.ui:352 resources/ui/adw/prefs.ui:148
msgid "On Battery"
msgstr ""
msgstr "Pilde"
#: src/ProfileManager.js:175 resources/ui/gtk4/prefs.ui:308
#: resources/ui/gtk3/prefs.ui:353 resources/ui/adw/prefs.ui:149
msgid "Plugged In"
msgstr ""
msgstr "Fişe Takılı"
#: src/ProfileManager.js:176 resources/ui/gtk4/prefs.ui:336
#: resources/ui/gtk3/prefs.ui:381 resources/ui/adw/prefs.ui:163
msgid "Power-Saver Mode"
msgstr ""
msgstr "Güç Tutumu Kipi"
#: src/ProfileManager.js:177 resources/ui/gtk4/prefs.ui:337
#: resources/ui/gtk3/prefs.ui:382 resources/ui/adw/prefs.ui:164
msgid "Balanced Mode"
msgstr ""
msgstr "Dengeli Kip"
#: src/ProfileManager.js:178 resources/ui/gtk4/prefs.ui:338
#: resources/ui/gtk3/prefs.ui:383 resources/ui/adw/prefs.ui:165
msgid "Performance Mode"
msgstr ""
msgstr "Performans Kipi"
#: src/ProfileManager.js:179 resources/ui/gtk4/prefs.ui:339
#: resources/ui/gtk3/prefs.ui:384 resources/ui/adw/prefs.ui:166
msgid "Power Saver or Balanced"
msgstr ""
msgstr "Güç Tutumu veya Dengeli"
#: src/ProfileManager.js:180 resources/ui/gtk4/prefs.ui:340
#: resources/ui/gtk3/prefs.ui:385 resources/ui/adw/prefs.ui:167
msgid "Balanced or Performance"
msgstr ""
msgstr "Dengeli veya Performans"
#: src/ProfileManager.js:185 resources/ui/gtk4/prefs.ui:387
#: resources/ui/gtk3/prefs.ui:432 resources/ui/adw/prefs.ui:183
msgid "High Priority"
msgstr ""
msgstr "Yüksek Öncelik"
#: src/ProfileManager.js:191
msgid "Standard Profile"
msgstr ""
msgstr "Standart Profil"
#: src/effects/Apparition.js:78
msgid "Apparition"
@@ -119,7 +119,7 @@ msgstr "Ateş"
#: src/effects/Fire.js:154
msgid "Default Fire"
msgstr "Varsayılan Ateş"
msgstr "Öntanımlı Ateş"
#: src/effects/Fire.js:164
msgid "Hell Fire"
@@ -127,7 +127,7 @@ msgstr "Cehennem Ateşi"
#: src/effects/Fire.js:174
msgid "Dark and Smutty"
msgstr "Karanlık ve Sürmeli"
msgstr "Karanlık ve Kirli"
#: src/effects/Fire.js:184
msgid "Cold Breeze"
@@ -139,11 +139,11 @@ msgstr "Noel Baba Geliyor"
#: src/effects/Glide.js:78
msgid "Glide"
msgstr ""
msgstr "Süzülme"
#: src/effects/Glitch.js:86
msgid "Glitch"
msgstr ""
msgstr "Kusur"
#: src/effects/Hexagon.js:94
msgid "Hexagon"
@@ -171,11 +171,11 @@ msgstr "Piksel Süpürme"
#: src/effects/Portal.js:88
msgid "Portal"
msgstr ""
msgstr "Portal"
#: src/effects/SnapOfDisintegration.js:114
msgid "Snap of Disintegration"
msgstr "El Şıklatma Parçalanması"
msgstr "Parçalanma Anı"
#: src/effects/TRexAttack.js:112
msgid "T-Rex Attack"
@@ -183,11 +183,11 @@ msgstr "T-Rex Saldırısı"
#: src/effects/TVEffect.js:78
msgid "TV Effect"
msgstr "TV Efekti"
msgstr "TV Etkisi"
#: src/effects/TVGlitch.js:87
msgid "TV Glitch"
msgstr ""
msgstr "TV Bozukluğu"
#: src/effects/Wisps.js:82
msgid "Wisps"
@@ -195,11 +195,11 @@ msgstr "Sihir"
#: prefs.js:247
msgid "Preview this effect"
msgstr ""
msgstr "Bu etkiyi önizle"
#: prefs.js:364 resources/ui/gtk4/prefs.ui:50 resources/ui/gtk3/prefs.ui:86
msgid "Burn-My-Windows has been updated!"
msgstr ""
msgstr "Burn-My-Windows güncellendi!"
#: prefs.js:365 resources/ui/common/menus.ui:17 resources/ui/gtk4/prefs.ui:56
#: resources/ui/gtk3/prefs.ui:96
@@ -224,31 +224,32 @@ msgstr "Eski Sponsorlar"
#: prefs.js:585
msgid "Delete this Profile?"
msgstr ""
msgstr "Bu Profil Silinsin Mi?"
#: prefs.js:587
msgid ""
"The current effect profile with all its effect settings will be permanently "
"lost."
msgstr ""
"Tüm etki ayarlarıyla birlikte var olan etki profili kalıcı olarak kaybolacak."
#: prefs.js:592
msgid "Cancel"
msgstr ""
msgstr "İptal"
#: prefs.js:593
msgid "Delete"
msgstr ""
msgstr "Sil"
#. Translators: %s will be replaced by the effect's name.
#: prefs.js:923
#, javascript-format
msgid "Preview for %s"
msgstr "%s ön izleme"
msgstr "%s Ön İzleme"
#: prefs.js:945
msgid "Close this Window to Preview the Effect!"
msgstr "Efekti Ön izlemek İçin Bu Pencereyi Kapatın!"
msgstr "Etkiyi Ön İzlemek İçin Bu Pencereyi Kapatın!"
#: resources/ui/common/menus.ui:13
msgid "Visit Homepage"
@@ -256,7 +257,7 @@ msgstr "Ana Sayfaya Git"
#: resources/ui/common/menus.ui:21
msgid "View Matching Wallpapers"
msgstr ""
msgstr "Eşleşen Duvar Kağıtlarını Görüntüle"
#: resources/ui/common/menus.ui:27
msgid "Report a Bug"
@@ -264,7 +265,7 @@ msgstr "Hata Bildir"
#: resources/ui/common/menus.ui:31
msgid "Create an Effect"
msgstr "Efekt Oluştur"
msgstr "Etki Oluştur"
#: resources/ui/common/menus.ui:35
msgid "Translate"
@@ -280,7 +281,7 @@ msgstr "Burn-My-Windows Hakkında"
#: resources/ui/common/menus.ui:63
msgid "Add New Profile..."
msgstr ""
msgstr "Yeni Profil Ekle..."
#: resources/ui/gtk4/broken-glass.ui:22 resources/ui/gtk4/tv-glitch.ui:23
#: resources/ui/gtk4/glitch.ui:23 resources/ui/gtk4/matrix.ui:23
@@ -426,7 +427,7 @@ msgstr "Animasyon Süresi [ms]"
#: resources/ui/adw/pixelate.ui:69 resources/ui/adw/pixelate.ui:102
#: resources/ui/adw/tv.ui:36 resources/ui/adw/tv.ui:61
msgid "Reset to Default Value"
msgstr "Varsayılan Değere Sıfırla"
msgstr "Öntanımlı Değere Sıfırla"
#: resources/ui/gtk4/broken-glass.ui:68 resources/ui/gtk4/tv-glitch.ui:69
#: resources/ui/gtk4/glitch.ui:69 resources/ui/gtk4/matrix.ui:69
@@ -472,7 +473,7 @@ msgstr ""
#: resources/ui/gtk3/tv-glitch.ui:142 resources/ui/gtk3/glitch.ui:142
#: resources/ui/adw/tv-glitch.ui:80 resources/ui/adw/glitch.ui:80
msgid "Strength"
msgstr ""
msgstr "Güç"
#: resources/ui/gtk4/tv-glitch.ui:161 resources/ui/gtk4/glitch.ui:161
#: resources/ui/gtk4/fire.ui:138 resources/ui/gtk3/tv-glitch.ui:187
@@ -519,12 +520,12 @@ msgstr "Yazı Rengi"
#: resources/ui/gtk4/doom.ui:68 resources/ui/gtk3/doom.ui:97
#: resources/ui/adw/doom.ui:47
msgid "Horizontal Scale"
msgstr "Yatay Boyut"
msgstr "Yatay Ölçek"
#: resources/ui/gtk4/doom.ui:114 resources/ui/gtk3/doom.ui:142
#: resources/ui/adw/doom.ui:80
msgid "Vertical Scale"
msgstr "Dikey Boyut"
msgstr "Dikey Ölçek"
#: resources/ui/gtk4/doom.ui:160 resources/ui/gtk4/pixel-wheel.ui:115
#: resources/ui/gtk4/pixel-wipe.ui:69 resources/ui/gtk4/pixelate.ui:115
@@ -545,7 +546,7 @@ msgstr "Pençe Çizik Sayısı"
#: resources/ui/gtk4/trex.ui:161 resources/ui/adw/trex.ui:113
msgid "Warp Effect"
msgstr "Çözgü Etkisi"
msgstr "Bükme Etkisi"
#: resources/ui/gtk4/trex.ui:207 resources/ui/adw/trex.ui:146
msgid "Flash Color"
@@ -559,17 +560,17 @@ msgstr "Parmak Sayısı"
#: resources/ui/gtk4/glide.ui:115 resources/ui/gtk3/glide.ui:149
#: resources/ui/adw/glide.ui:80
msgid "Squish"
msgstr ""
msgstr "Ezmek"
#: resources/ui/gtk4/glide.ui:161 resources/ui/gtk3/glide.ui:194
#: resources/ui/adw/glide.ui:113
msgid "Tilt"
msgstr ""
msgstr "Eğim"
#: resources/ui/gtk4/glide.ui:207 resources/ui/gtk3/glide.ui:239
#: resources/ui/adw/glide.ui:146
msgid "Shift"
msgstr ""
msgstr "Kayma"
#: resources/ui/gtk4/apparition.ui:114 resources/ui/gtk3/apparition.ui:149
#: resources/ui/adw/apparition.ui:81
@@ -589,17 +590,17 @@ msgstr "Emme Gücü"
#: resources/ui/gtk4/portal.ui:69 resources/ui/gtk3/portal.ui:142
#: resources/ui/adw/portal.ui:80
msgid "Whirling"
msgstr ""
msgstr "Dönme"
#: resources/ui/gtk4/portal.ui:115 resources/ui/gtk3/portal.ui:97
#: resources/ui/adw/portal.ui:47
msgid "Rotation Speed"
msgstr ""
msgstr "Dönüş Hızı"
#: resources/ui/gtk4/portal.ui:161 resources/ui/gtk3/portal.ui:187
#: resources/ui/adw/portal.ui:113
msgid "Details"
msgstr ""
msgstr "Ayrıntılar"
#: resources/ui/gtk4/incinerate.ui:115 resources/ui/gtk3/incinerate.ui:135
#: resources/ui/adw/incinerate.ui:80
@@ -634,7 +635,7 @@ msgstr "Işıltı Rengi"
#: resources/ui/gtk4/hexagon.ui:239 resources/ui/gtk3/hexagon.ui:267
#: resources/ui/adw/hexagon.ui:163
msgid "Additive Blending"
msgstr ""
msgstr "Eklemeli Karıştırma"
#: resources/ui/gtk4/hexagon.ui:248 resources/ui/gtk3/hexagon.ui:276
#: resources/ui/adw/hexagon.ui:164
@@ -664,7 +665,7 @@ msgstr "Gradyan"
#: resources/ui/gtk4/prefs.ui:82 resources/ui/gtk3/prefs.ui:124
#: resources/ui/adw/prefs.ui:224
msgid "Effect Settings"
msgstr ""
msgstr "Etki Ayarları"
#: resources/ui/gtk4/prefs.ui:92 resources/ui/gtk3/prefs.ui:134
#: resources/ui/adw/prefs.ui:225
@@ -674,17 +675,17 @@ msgstr "Birden fazla seçilirse, rastgele biri uygulanır."
#: resources/ui/gtk4/prefs.ui:132 resources/ui/gtk3/prefs.ui:172
#: resources/ui/adw/prefs.ui:65
msgid "Effect Profile Constraints"
msgstr ""
msgstr "Etki Profili Kısıtlamaları"
#: resources/ui/gtk4/prefs.ui:142 resources/ui/gtk3/prefs.ui:182
#: resources/ui/adw/prefs.ui:66
msgid "Define when the current effect settings should be used."
msgstr ""
msgstr "Geçerli etki ayarlarının ne zaman kullanılması gerektiğini tanımlayın."
#: resources/ui/gtk4/prefs.ui:166 resources/ui/gtk3/prefs.ui:206
#: resources/ui/adw/prefs.ui:70
msgid "Application"
msgstr ""
msgstr "Uygulama"
#: resources/ui/gtk4/prefs.ui:184 resources/ui/gtk4/prefs.ui:219
#: resources/ui/gtk4/prefs.ui:248 resources/ui/gtk4/prefs.ui:277
@@ -696,47 +697,47 @@ msgstr ""
#: resources/ui/adw/prefs.ui:117 resources/ui/adw/prefs.ui:132
#: resources/ui/adw/prefs.ui:147 resources/ui/adw/prefs.ui:162
msgid "Any"
msgstr ""
msgstr "Herhangi"
#: resources/ui/gtk4/prefs.ui:208 resources/ui/gtk3/prefs.ui:253
#: resources/ui/adw/prefs.ui:98
msgid "Animation Type"
msgstr ""
msgstr "Animasyon Türü"
#: resources/ui/gtk4/prefs.ui:237 resources/ui/gtk3/prefs.ui:282
#: resources/ui/adw/prefs.ui:113
msgid "Window Type"
msgstr ""
msgstr "Pencere Türü"
#: resources/ui/gtk4/prefs.ui:266 resources/ui/gtk3/prefs.ui:311
#: resources/ui/adw/prefs.ui:128
msgid "Color Scheme"
msgstr ""
msgstr "Renk Şeması"
#: resources/ui/gtk4/prefs.ui:295 resources/ui/gtk3/prefs.ui:340
#: resources/ui/adw/prefs.ui:143
msgid "Power Mode"
msgstr ""
msgstr "Güç Kipi"
#: resources/ui/gtk4/prefs.ui:324 resources/ui/gtk3/prefs.ui:369
#: resources/ui/adw/prefs.ui:158
msgid "Power Profile"
msgstr ""
msgstr "Güç Profili"
#: resources/ui/gtk4/prefs.ui:356 resources/ui/gtk3/prefs.ui:401
#: resources/ui/adw/prefs.ui:179
msgid "Advanced Profile Options"
msgstr ""
msgstr "Gelişmiş Profil Seçenekleri"
#: resources/ui/gtk4/prefs.ui:396 resources/ui/gtk3/prefs.ui:441
#: resources/ui/adw/prefs.ui:184
msgid "Use this profile even if there are better matching profiles."
msgstr ""
msgstr "Daha iyi eşleşen profiller olsa bile bu profili kullan."
#: resources/ui/gtk4/prefs.ui:428 resources/ui/gtk3/prefs.ui:473
#: resources/ui/adw/prefs.ui:204
msgid "Delete this Profile..."
msgstr ""
msgstr "Bu Profili Sil..."
#: resources/ui/gtk4/pixelate.ui:69 resources/ui/gtk3/pixelate.ui:90
#: resources/ui/adw/pixelate.ui:47
+148 -46
View File
@@ -394,6 +394,55 @@ var PreferencesDialog = class PreferencesDialog {
});
}
// Count the number of times the user has opened the preferences window. Every now
// and then, we show a dialog asking the user to support the extension. We connect
// to the notify::visible signal to ensure that the dialog can be a modal dialog.
window.connect('notify::visible', (window) => {
// Do not show the dialog when the window is hidden.
if (!window.get_visible()) {
return;
}
// Do not show the dialog when the user has disabled it.
if (!this._settings.get_boolean('show-support-dialog')) {
return;
}
const count = this._settings.get_int('prefs-open-count') + 1;
this._settings.set_int('prefs-open-count', count);
// Show the dialog every 10th time.
if (count % 10 == 0) {
const dialog = this._createMessageDialog(
'❤️ Do you love Burn-My-Windows?',
`Even the smallest donation can have a big impact! If just one of ten Burn-My-Windows users donated $1 per month, I could dedicate myself to creating awesome open-source projects full-time!
Ko-fi: <a href='https://ko-fi.com/schneegans'>https://ko-fi.com/schneegans</a>
GitHub: <a href='https://github.com/sponsors/schneegans'>https://github.com/sponsors/schneegans</a>`,
window, [
{
label: 'Do not show this again!',
destructive: true,
default: false,
action: () => {
this._settings.set_boolean('show-support-dialog', false);
}
},
{
label: 'Remind me later.',
destructive: false,
default: true,
}
]);
if (utils.isGTK4()) {
dialog.show();
} else {
dialog.show_all();
}
}
});
// Populate the menu with actions.
const group = Gio.SimpleActionGroup.new();
window.insert_action_group('prefs', group);
@@ -592,56 +641,38 @@ var PreferencesDialog = class PreferencesDialog {
// This action shows a confirmation dialog. Upon user approval, the currently
// active profile is deleted. We use the more beautiful Adw.MessageDialog if it is
// available (usually on GNOME 43 and beyond).
let deleteProfileDialog;
const dialogTitle = _('Delete this Profile?');
const dialogSubtitle = _(
'The current effect profile with all its effect settings will be permanently lost.');
const deleteProfileDialog = this._createMessageDialog(
_('Delete this Profile?'),
_('The current effect profile with all its effect settings will be permanently lost.'),
window, [
{
label: _('Cancel'),
destructive: false,
default: true,
},
{
label: _('Delete'),
destructive: true,
default: false,
action: () => {
// Stop editing the current profile.
this._builder.get_object('edit-profile-button').active = false;
if (utils.isADW() && Adw.MessageDialog) {
deleteProfileDialog =
new Adw.MessageDialog({heading: dialogTitle, body: dialogSubtitle});
deleteProfileDialog.add_response('cancel', _('Cancel'));
deleteProfileDialog.add_response('delete', _('Delete'));
deleteProfileDialog.set_response_appearance('delete',
Adw.ResponseAppearance.DESTRUCTIVE);
deleteProfileDialog.set_default_response('cancel');
deleteProfileDialog.set_close_response('cancel');
} else {
deleteProfileDialog = new Gtk.MessageDialog({
text: dialogTitle,
secondary_text: dialogSubtitle,
modal: true,
title: '',
buttons: Gtk.ButtonsType.OK_CANCEL
});
}
// Delete the currently active profile.
this._profileManager.deleteProfile(this._activeProfile.path);
if (utils.isGTK4()) {
deleteProfileDialog.set_hide_on_close(true);
}
// Select another one.
this._settings.set_string('active-profile',
this._profileManager.getProfiles()[0].path);
deleteProfileDialog.set_transient_for(window);
deleteProfileDialog.connect('response', (dialog, response) => {
if (response == 'delete' || response == Gtk.ResponseType.OK) {
// Stop editing the current profile.
this._builder.get_object('edit-profile-button').active = false;
// Delete the currently active profile.
this._profileManager.deleteProfile(this._activeProfile.path);
// Select another one.
this._settings.set_string('active-profile',
this._profileManager.getProfiles()[0].path);
// The number of profiles has changed, so we have to update the profile
// selection menu.
this._updateProfileMenu();
}
dialog.hide();
});
// The number of profiles has changed, so we have to update the profile
// selection menu.
this._updateProfileMenu();
}
}
]);
// This action deletes the currently active profile.
const deleteProfileAction = Gio.SimpleAction.new('profile-delete', null);
deleteProfileAction.connect('activate', () => {
deleteProfileDialog.show();
@@ -974,6 +1005,77 @@ var PreferencesDialog = class PreferencesDialog {
window.show_all();
}
}
// Helper function to show a message dialog. The dialog is modal and has a title, a
// message and a list of buttons. Each button is an object with a label, a default flag
// and a destructive flag. Each button object can also have an "action" callback that is
// called when the button is clicked.
// This method works on GTK3, GTK4, and libadwaita.
_createMessageDialog(title, message, window, buttons) {
let dialog;
if (utils.isADW() && Adw.MessageDialog) {
dialog = new Adw.MessageDialog({
heading: title,
body: message,
body_use_markup: true,
modal: true,
});
buttons.forEach((button, i) => {
const response = i.toString();
dialog.add_response(response, button.label);
if (button.default) {
dialog.set_default_response(response);
dialog.set_close_response(response);
}
if (button.destructive) {
dialog.set_response_appearance(response, Adw.ResponseAppearance.DESTRUCTIVE);
}
});
} else {
dialog = new Gtk.MessageDialog({
text: title,
secondary_text: message,
secondary_use_markup: true,
modal: true,
title: '',
});
buttons.forEach((button, i) => {
dialog.add_button(button.label, i);
if (button.default) {
dialog.set_default_response(i);
}
});
}
if (utils.isGTK4()) {
dialog.set_hide_on_close(true);
}
dialog.set_transient_for(window);
// If the dialog is closed or a button is clicked, we hide the dialog and call the
// button's action callback if it exists.
dialog.connect('response', (dialog, response) => {
const i = parseInt(response);
const button = buttons[i];
if (button && button.action) {
button.action();
}
dialog.hide();
});
return dialog;
}
}
// This is used for setting up the translations.
+6 -1
View File
@@ -4,12 +4,17 @@
[
"tcreeper.earth@gmail.com",
"TCr3",
23
24
],
[
"muhaaliss@pm.me",
"Muha Aliss",
52
],
[
"libreajans@gmail.com",
"Sabri \u00dcnal",
70
]
]
},
+1 -1
View File
@@ -5,7 +5,7 @@ SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<interface>
<interface domain="burn-my-windows">
<object class="AdwExpanderRow" id="snap-prefs">
+1 -1
View File
@@ -5,7 +5,7 @@ SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
SPDX-License-Identifier: GPL-3.0-or-later
-->
<interface>
<interface domain="burn-my-windows">
<object class="GtkRevealer" id="snap-prefs">
@@ -43,6 +43,18 @@ SPDX-License-Identifier: CC0-1.0
<description>Used to check whether the extension got updated from the extension side.</description>
</key>
<key name="prefs-open-count" type="i">
<default>0</default>
<summary>Prefs Open Count</summary>
<description>The number of times the settings dialog was openend.</description>
</key>
<key name="show-support-dialog" type="b">
<default>true</default>
<summary>Show Support Dialog</summary>
<description>If set to false, the ask-for-support dialog will never be shown.</description>
</key>
</schema>
</schemalist>
+10
View File
@@ -181,6 +181,16 @@ var Shader = GObject.registerClass(
// the handler. This could still be null if called from the updateAnimation() above.
vfunc_paint_target(...params) {
this.emit('update-animation', this._progress);
// Starting with GNOME 44.2, the alpha channel is not written to by default. We need
// to undo this. It is a pity that we have to do this here, as it is not really
// required to be done each frame. But it's the only place where we can do it.
// https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2650
if (utils.shellVersionIsAtLeast(44, 2)) {
this.get_pipeline().set_blend(
'RGBA = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))');
}
this.set_uniform_float(this._uProgress, 1, [this._progress]);
super.vfunc_paint_target(...params);
}