Remove donation page and icon

gh-2259
This commit is contained in:
Charles Gagnon
2025-03-10 17:30:37 -04:00
parent 28b7efe707
commit 097750f67d
10 changed files with 4 additions and 398 deletions

View File

@@ -1278,39 +1278,6 @@ msgstr "Clic région vide pour fermer Activités"
msgid "Disable show overview on startup" msgid "Disable show overview on startup"
msgstr "Désactiver le démarrage en mode Activités" msgstr "Désactiver le démarrage en mode Activités"
#: ui/SettingsDonation.ui.h:1
msgid "Donation"
msgstr "Don"
#: ui/SettingsDonation.ui.h:2
msgid ""
"<span size=\"large\">Gnome is the best desktop environment. No question. But "
"if you're like me and would never use it without the enhanced workflow that "
"Dash to Panel provides, please support my work by making a donation.</span>"
msgstr ""
"<span size=\"large\">Gnome est le meilleur environnement de bureau. Aucun "
"doute. Mais si vous êtes comme moi et que vous ne l'utiliseriez jamais sans "
"le flux de travail amélioré offert par Dash to Panel, s'il vous plaît, "
"soutenez mon travail en faisant un don.</span>"
#: ui/SettingsDonation.ui.h:3
msgid ""
"I know you're thinking \"I don't have time for this\", but consider that "
"I've poured countless volunteer hours into making Dash to Panel a quality "
"extension that is useful to YOU! :)"
msgstr ""
"Vous vous dites surement « pas le temps pour ça », mais considérez que j'ai "
"investi un nombre incalculable d'heures de bénévolat pour faire de Dash to "
"Panel une extension de qualité qui est utile pour VOUS! :)"
#: ui/SettingsDonation.ui.h:4
msgid ""
"<span size=\"9000\">Thanks for your time!\n"
"If you like, you can now hide the donate icon</span>"
msgstr ""
"<span size=\"9000\">Merci pour votre temps!\n"
"Si vous voulez, vous pouvez cacher l'icône de don</span>"
#: ui/SettingsFineTune.ui.h:1 #: ui/SettingsFineTune.ui.h:1
msgid "Fine-Tune" msgid "Fine-Tune"
msgstr "Personnalisation" msgstr "Personnalisation"

View File

@@ -3041,39 +3041,6 @@ msgstr "Kliknij na pustą przestrzeń, aby zamknąć przegląd"
msgid "Disable show overview on startup" msgid "Disable show overview on startup"
msgstr "Wyłącz pokazywanie przeglądu przy uruchomieniu" msgstr "Wyłącz pokazywanie przeglądu przy uruchomieniu"
#: ui/SettingsDonation.ui:10
msgid "Donation"
msgstr "Darowizna"
#: ui/SettingsDonation.ui:36
msgid ""
"<span size=\"large\">Gnome is the best desktop environment. No question. But "
"if you're like me and would never use it without the enhanced workflow that "
"Dash to Panel provides, please support my work by making a donation.</span>"
msgstr ""
"<span size=\"large\">Gnome to najlepsze środowisko graficzne. Bez dwóch "
"zdań. Ale jeśli jesteś taki jak ja i nigdy byś z niego nie korzystał bez "
"ulepszonego przepływu pracy, jaki zapewnia Dash to Panel, proszę, wesprzyj "
"moją pracę, dokonując darowizny.</span>"
#: ui/SettingsDonation.ui:45
msgid ""
"I know you're thinking \"I don't have time for this\", but consider that "
"I've poured countless volunteer hours into making Dash to Panel a quality "
"extension that is useful to YOU! :)"
msgstr ""
"Wiem, że myślisz \"Nie mam na to czasu\", ale weź pod uwagę, że poświęciłem "
"niezliczone godziny wolontariatu, aby Dash to Panel było wysokiej jakości "
"rozszerzeniem, które jest przydatne DLA CIEBIE! :)"
#: ui/SettingsDonation.ui:151
msgid ""
"<span size=\"9000\">Thanks for your time!\n"
"If you like, you can now hide the donate icon</span>"
msgstr ""
"<span size=\"9000\">Dziękuję za Twój czas!\n"
"Jeśli chcesz, możesz teraz ukryć ikonę darowizny</span>"
#: ui/SettingsFineTune.ui:38 #: ui/SettingsFineTune.ui:38
msgid "Fine-Tune" msgid "Fine-Tune"
msgstr "Dostrajanie" msgstr "Dostrajanie"

View File

@@ -1265,39 +1265,6 @@ msgstr "Клацання на пустому місці закриває «Ог
msgid "Disable show overview on startup" msgid "Disable show overview on startup"
msgstr "Не показувати «Огляд» під час запуску" msgstr "Не показувати «Огляд» під час запуску"
#: ui/SettingsDonation.ui:10
msgid "Donation"
msgstr "Підтримка"
#: ui/SettingsDonation.ui:36
msgid ""
"<span size=\"large\">Gnome is the best desktop environment. No question. But "
"if you're like me and would never use it without the enhanced workflow that "
"Dash to Panel provides, please support my work by making a donation.</span>"
msgstr ""
"<span size=\"large\">Gnome - це найкраще стільничне середовище. В цьому "
"немає сумнівів. Проте, якщо ви, як і як, ніколи б не використовували його "
"без покращень робочого процесу, що надає Dash to Panel, будь ласка, "
"підтримайте фінансово мою роботу.</span>"
#: ui/SettingsDonation.ui:45
msgid ""
"I know you're thinking \"I don't have time for this\", but consider that "
"I've poured countless volunteer hours into making Dash to Panel a quality "
"extension that is useful to YOU! :)"
msgstr ""
"Я знаю, що ви думаєте \"У мене немає часу на це\", проте зауважте, що я "
"витратив незліченну кількість волонтерських годин задля того, щоб розширення "
"Dash to Panel було якісним та корисним для ВАС! :)"
#: ui/SettingsDonation.ui:170
msgid ""
"<span size=\"9000\">Thanks for your time!\n"
"If you like, you can now hide the donate icon</span>"
msgstr ""
"<span size=\"9000\">Дякую за ваш час!\n"
"Якщо бажаєте, ви можете приховати піктограму фінансової підтримки</span>"
#: ui/SettingsFineTune.ui:38 #: ui/SettingsFineTune.ui:38
msgid "Fine-Tune" msgid "Fine-Tune"
msgstr "Доналаштування" msgstr "Доналаштування"

View File

@@ -1353,10 +1353,6 @@
<default>false</default> <default>false</default>
<summary>Track if the preferences window is opened</summary> <summary>Track if the preferences window is opened</summary>
</key> </key>
<key type="s" name="hide-donate-icon-unixtime">
<default>''</default>
<summary>Unix time when the donate icon was hidden</summary>
</key>
<key type="i" name="extension-version"> <key type="i" name="extension-version">
<default>65</default> <default>65</default>
<summary>Installed extension version</summary> <summary>Installed extension version</summary>

View File

@@ -1957,10 +1957,10 @@ export class TaskbarSecondaryMenu extends AppMenu.AppMenu {
super.setApp(app) super.setApp(app)
// set "App Details" menu item visibility // set "App Details" menu item visibility
this._setAppDetailsVisibility(app) this._setAppDetailsVisibility()
} }
_setAppDetailsVisibility(app) { _setAppDetailsVisibility() {
// This next line sets the app details menu to visible if Gnome Software is // This next line sets the app details menu to visible if Gnome Software is
// installed. If it isn't, no point of showing the menu anyway because // installed. If it isn't, no point of showing the menu anyway because
// its only purpose is to open Gnome Software // its only purpose is to open Gnome Software
@@ -1970,7 +1970,6 @@ export class TaskbarSecondaryMenu extends AppMenu.AppMenu {
this._detailsItem.visible = this._detailsItem.visible =
gnomeSoftwareIsInstalled && gnomeSoftwareIsInstalled &&
!app.hideDetails &&
SETTINGS.get_boolean('secondarymenu-contains-showdetails') SETTINGS.get_boolean('secondarymenu-contains-showdetails')
} }
} }

View File

@@ -85,11 +85,6 @@ export default class DashToPanelExtension extends Extension {
// To remove later, try to map settings using monitor indexes to monitor ids // To remove later, try to map settings using monitor indexes to monitor ids
PanelSettings.adjustMonitorSettings(SETTINGS) PanelSettings.adjustMonitorSettings(SETTINGS)
// show the donate icon every 360 days (31104000000 milliseconds)
let donateIconUnixtime = SETTINGS.get_string('hide-donate-icon-unixtime')
if (donateIconUnixtime && donateIconUnixtime < Date.now() - 31104000000)
SETTINGS.set_string('hide-donate-icon-unixtime', '')
// if new version, display a notification linking to release notes // if new version, display a notification linking to release notes
if (this.metadata.version != SETTINGS.get_int('extension-version')) { if (this.metadata.version != SETTINGS.get_int('extension-version')) {
Utils.notify( Utils.notify(

View File

@@ -213,10 +213,7 @@ export const Overview = class {
let apps = [] let apps = []
this.taskbar._getAppIcons().forEach((appIcon) => { this.taskbar._getAppIcons().forEach((appIcon) => {
if ( if (!seenApps[appIcon.app] || this.taskbar.allowSplitApps) {
(!appIcon.app.hideDetails && !seenApps[appIcon.app]) ||
this.taskbar.allowSplitApps
) {
apps.push(appIcon) apps.push(appIcon)
} }

View File

@@ -213,10 +213,6 @@ const Preferences = class {
let pageFineTune = this._builder.get_object('finetune') let pageFineTune = this._builder.get_object('finetune')
window.add(pageFineTune) window.add(pageFineTune)
this._builder.add_from_file(this._path + '/ui/SettingsDonation.ui')
let pageDonation = this._builder.get_object('donation')
window.add(pageDonation)
this._builder.add_from_file(this._path + '/ui/SettingsAbout.ui') this._builder.add_from_file(this._path + '/ui/SettingsAbout.ui')
let pageAbout = this._builder.get_object('about') let pageAbout = this._builder.get_object('about')
window.add(pageAbout) window.add(pageAbout)
@@ -3645,35 +3641,6 @@ const Preferences = class {
}, },
) )
}) })
// Donation panel
let donationIconSwitch = this._builder.get_object('donation_icon_switch')
let hiddenDonateIcon = !!this._settings.get_string(
'hide-donate-icon-unixtime',
)
this._builder
.get_object('donation_logo')
.set_from_file(`${this._path}/img/dash-to-panel-logo-light.svg`)
this._builder
.get_object('paypal_logo')
.set_from_file(`${this._path}/img/paypal.png`)
this._builder
.get_object('stripe_logo')
.set_from_file(`${this._path}/img/stripe.png`)
this._builder
.get_object('kofi_logo')
.set_from_file(`${this._path}/img/kofi.png`)
donationIconSwitch.set_active(hiddenDonateIcon)
donationIconSwitch.connect('notify::active', (widget) =>
this._settings.set_string(
'hide-donate-icon-unixtime',
widget.get_active() ? Date.now().toString() : '',
),
)
} }
_setPreviewTitlePosition() { _setPreviewTitlePosition() {

View File

@@ -34,7 +34,6 @@ import * as Dash from 'resource:///org/gnome/shell/ui/dash.js'
import * as DND from 'resource:///org/gnome/shell/ui/dnd.js' import * as DND from 'resource:///org/gnome/shell/ui/dnd.js'
import * as Main from 'resource:///org/gnome/shell/ui/main.js' import * as Main from 'resource:///org/gnome/shell/ui/main.js'
import { EventEmitter } from 'resource:///org/gnome/shell/misc/signals.js' import { EventEmitter } from 'resource:///org/gnome/shell/misc/signals.js'
import { gettext as _ } from 'resource:///org/gnome/shell/extensions/extension.js'
import * as AppIcons from './appIcons.js' import * as AppIcons from './appIcons.js'
import * as PanelManager from './panelManager.js' import * as PanelManager from './panelManager.js'
@@ -42,7 +41,7 @@ import * as PanelSettings from './panelSettings.js'
import * as Pos from './panelPositions.js' import * as Pos from './panelPositions.js'
import * as Utils from './utils.js' import * as Utils from './utils.js'
import * as WindowPreview from './windowPreview.js' import * as WindowPreview from './windowPreview.js'
import { DTP_EXTENSION, SETTINGS, tracker } from './extension.js' import { SETTINGS, tracker } from './extension.js'
const SearchController = Main.overview.searchController const SearchController = Main.overview.searchController
@@ -55,68 +54,6 @@ export const MIN_ICON_SIZE = 4
const T1 = 'ensureAppIconVisibilityTimeout' const T1 = 'ensureAppIconVisibilityTimeout'
const T2 = 'showLabelTimeout' const T2 = 'showLabelTimeout'
const T3 = 'resetHoverTimeout' const T3 = 'resetHoverTimeout'
const T4 = 'donateAppTimeout'
let donateDummyApp = {
hideDetails: true,
app_info: {
should_show: () => false,
list_actions: () => ['opts'],
get_action_name: (action) =>
action == 'opts' ? _('Hide and donation options') : '',
},
connect: () => [],
disconnect: () => false,
connectObject: () => [],
get_id: () => 'dtp_donate',
get_windows: () => [],
can_open_new_window: () => false,
is_window_backed: () => false,
launch_action: function (action) {
action == 'opts' ? this.activate() : null
},
get_name: function () {
return this.isActive() ? _('Thank you!') : _('Please donate :)')
},
create_icon_texture: function (size) {
let iconParams = {
icon_name: this.isActive()
? 'face-smile-big-symbolic'
: 'emote-love-symbolic',
icon_size: size,
}
if (SETTINGS.get_string('appicon-style') !== 'SYMBOLIC')
iconParams.style = `color: ${this.isActive() ? '#FFC730' : '#C71807'}`
return new St.Icon(iconParams)
},
activate: function () {
SETTINGS.set_string('target-prefs-page', 'donation')
DTP_EXTENSION.openPreferences()
if (this.isActive()) return
this._taskbar._timeoutsHandler.add([T4, 5000, this.forceRefresh.bind(this)])
this.forceRefresh()
},
forceRefresh: function () {
setDonateApp.call(this._taskbar)
this._taskbar._queueRedisplay()
},
isActive: function () {
return !!this._taskbar._timeoutsHandler.getId(T4)
},
}
function setDonateApp() {
delete this._donateApp
if (!SETTINGS.get_string('hide-donate-icon-unixtime')) {
this._donateApp = Object.create(donateDummyApp)
this._donateApp._taskbar = this
}
}
/** /**
* Extend DashItemContainer * Extend DashItemContainer
@@ -452,7 +389,6 @@ export const Taskbar = class extends EventEmitter {
'changed::show-favorites', 'changed::show-favorites',
'changed::show-running-apps', 'changed::show-running-apps',
'changed::show-favorites-all-monitors', 'changed::show-favorites-all-monitors',
'changed::hide-donate-icon-unixtime',
], ],
() => { () => {
setAttributes() setAttributes()
@@ -497,8 +433,6 @@ export const Taskbar = class extends EventEmitter {
this.showRunningApps = SETTINGS.get_boolean('show-running-apps') this.showRunningApps = SETTINGS.get_boolean('show-running-apps')
this.allowSplitApps = this.allowSplitApps =
this.usingLaunchers || (!this.isGroupApps && !this.showFavorites) this.usingLaunchers || (!this.isGroupApps && !this.showFavorites)
setDonateApp.call(this)
} }
setAttributes() setAttributes()
@@ -1097,16 +1031,6 @@ export const Taskbar = class extends EventEmitter {
) )
} }
if (this._donateApp)
appInfos = [
...appInfos,
{
app: this._donateApp,
isLauncher: true,
windows: [],
},
]
return appInfos return appInfos
} }
@@ -1296,8 +1220,6 @@ export const Taskbar = class extends EventEmitter {
if (this.dtpPanel.isPrimary) hotkeyAppNumbers = {} if (this.dtpPanel.isPrimary) hotkeyAppNumbers = {}
this._getAppIcons().forEach((icon) => { this._getAppIcons().forEach((icon) => {
if (icon.app == this._donateApp) return
if ( if (
this.dtpPanel.isPrimary && this.dtpPanel.isPrimary &&
(!hotkeyAppNumbers[icon.app] || this.allowSplitApps) (!hotkeyAppNumbers[icon.app] || this.allowSplitApps)

View File

@@ -1,171 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<interface>
<!-- interface-name SettingsDonation.ui -->
<requires lib="gtk" version="4.12"/>
<requires lib="libadwaita" version="1.6"/>
<object class="AdwPreferencesPage" id="donation">
<property name="hexpand-set">True</property>
<property name="icon-name">emote-love-symbolic</property>
<property name="name">donation</property>
<property name="title" translatable="yes">Donation</property>
<child>
<object class="AdwPreferencesGroup" id="donation_group">
<child>
<object class="GtkBox">
<property name="halign">center</property>
<property name="margin-bottom">50</property>
<property name="margin-top">50</property>
<property name="spacing">16</property>
<child>
<object class="GtkImage" id="donation_title_icon">
<property name="css-classes">error</property>
<property name="icon-name">emote-love-symbolic</property>
<property name="pixel-size">48</property>
</object>
</child>
<child>
<object class="GtkImage" id="donation_logo">
<property name="pixel-size">96</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="donation_label_1">
<property name="justify">center</property>
<property name="label" translatable="yes">&lt;span size="large"&gt;Gnome is the best desktop environment. No question. But if you're like me and would never use it without the enhanced workflow that Dash to Panel provides, please support my work by making a donation.&lt;/span&gt;</property>
<property name="margin-bottom">40</property>
<property name="use-markup">True</property>
<property name="wrap">True</property>
</object>
</child>
<child>
<object class="GtkLabel" id="donation_label_2">
<property name="justify">center</property>
<property name="label" translatable="yes">I know you're thinking "I don't have time for this", but consider that I've poured countless volunteer hours into making Dash to Panel a quality extension that is useful to YOU! :)</property>
<property name="margin-bottom">60</property>
<property name="use-markup">True</property>
<property name="wrap">True</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="halign">center</property>
<property name="margin-bottom">60</property>
<property name="spacing">40</property>
<property name="valign">center</property>
<child>
<object class="GtkLinkButton">
<property name="child">
<object class="GtkBox">
<property name="halign">center</property>
<property name="spacing">6</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="paypal_logo">
<property name="margin-bottom">2</property>
<property name="margin-end">2</property>
<property name="margin-top">2</property>
<property name="pixel-size">24</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Paypal</property>
<property name="margin-end">6</property>
</object>
</child>
</object>
</property>
<property name="css-classes">button</property>
<property name="uri">https://www.paypal.com/donate/?hosted_button_id=5DCVELP7BSAVQ</property>
</object>
</child>
<child>
<object class="GtkLinkButton">
<property name="child">
<object class="GtkBox">
<property name="halign">center</property>
<property name="spacing">6</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="stripe_logo">
<property name="margin-bottom">2</property>
<property name="margin-end">2</property>
<property name="margin-top">2</property>
<property name="pixel-size">24</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Stripe</property>
<property name="margin-end">6</property>
</object>
</child>
</object>
</property>
<property name="css-classes">button</property>
<property name="uri">https://donate.stripe.com/9AQg1g8sA5EY1y07ss</property>
</object>
</child>
<child>
<object class="GtkLinkButton">
<property name="child">
<object class="GtkBox">
<property name="halign">center</property>
<property name="spacing">6</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="kofi_logo">
<property name="margin-bottom">2</property>
<property name="margin-end">2</property>
<property name="margin-top">2</property>
<property name="pixel-size">24</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Ko-fi</property>
<property name="margin-end">6</property>
</object>
</child>
</object>
</property>
<property name="css-classes">button</property>
<property name="uri">https://ko-fi.com/charlesgagnon</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="halign">center</property>
<property name="spacing">4</property>
<child>
<object class="GtkBox">
<property name="halign">center</property>
<property name="valign">start</property>
<child>
<object class="GtkLabel">
<property name="halign">start</property>
<property name="label" translatable="yes">&lt;span size="9000"&gt;Thanks for your time!
If you like, you can now hide the donate icon&lt;/span&gt;</property>
<property name="margin-end">10</property>
<property name="use-markup">True</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="donation_icon_switch">
<property name="halign">end</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>