Skip to content

Commit

Permalink
Applets Cinnamon 6.4 improvements (linuxmint#6753)
Browse files Browse the repository at this point in the history
* sound150 v7.5.0: Improved management of loops for Cinnamon 6.4

* Radio3.0 v2.7.1: Improved management of loops and desklet for Cinnamon 6.4

* SpicesUpdate v7.5.0: Improved management of loops

* VPN-Sentinel v2.3.1: Minor change in FileInfo.js
  • Loading branch information
claudiux authored Jan 11, 2025
1 parent 8289530 commit 5ce5c6d
Show file tree
Hide file tree
Showing 18 changed files with 325 additions and 210 deletions.
4 changes: 4 additions & 0 deletions Radio3.0@claudiux/files/Radio3.0@claudiux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v2.7.1~20250111
* Improved management of loops.
* Improved management of desklet.

### v2.7.0~20250107
* You can choose the Quality of the downloaded album cover.
* Desklet AlbumArt3.0: New option in context menu to display the Album Art at full size. Middle-clicking on the desklet does the same.
Expand Down
303 changes: 175 additions & 128 deletions Radio3.0@claudiux/files/Radio3.0@claudiux/applet.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,24 @@ const Util = imports.misc.util;
const Settings = imports.ui.settings;
const Gettext = imports.gettext;

Gettext.bindtextdomain("Radio3.0@claudiux", GLib.get_home_dir() + "/.local/share/locale")
const APPLET_UUID = "Radio3.0@claudiux";
const DESKLET_UUID = "AlbumArt3.0@claudiux";
Gettext.bindtextdomain(APPLET_UUID, GLib.get_home_dir() + "/.local/share/locale");
Gettext.bindtextdomain("cinnamon", "/usr/share/locale");

function _(str) {
let customTrans = Gettext.dgettext(APPLET_UUID, str);
if (customTrans !== str && customTrans.length > 0)
return customTrans;

customTrans = Gettext.dgettext("cinnamon", str);
if (customTrans !== str && customTrans.length > 0)
return customTrans;

return Gettext.gettext(str);
}


class AlbumArtRadio30 extends Desklet.Desklet {
constructor(metadata, desklet_id) {
super(metadata, desklet_id);
Expand All @@ -32,7 +47,10 @@ class AlbumArtRadio30 extends Desklet.Desklet {
this.delay = 3;
//this.fade_delay = 0;
this.effect = "";
this.settings = new Settings.DeskletSettings(this, this.metadata.uuid, this.instance_id);

this._updateDecoration();

this.settings = new Settings.DeskletSettings(this, DESKLET_UUID, this.instance_id);
this.settings.bind('height', 'height', this.on_setting_changed);
this.settings.bind('width', 'width', this.on_setting_changed);
this.settings.bind('fade-delay', 'fade_delay', this.on_setting_changed);
Expand All @@ -45,6 +63,7 @@ class AlbumArtRadio30 extends Desklet.Desklet {
this.setHeader(_("Radio3.0 Album Art"));
this._setup_dir_monitor();
this.setup_display();
this._updateDecoration(); // once again?
}

on_setting_changed() {
Expand Down
17 changes: 17 additions & 0 deletions Radio3.0@claudiux/files/Radio3.0@claudiux/lib/sourceExists.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const GLib = imports.gi.GLib;

function source_exists(id) {
let _id = id;
if (!_id) return false;
return (GLib.MainContext.default().find_source_by_id(_id) != null);
}

function timeout_exists(id) {
if (!id) return false;
if (!id.source_id) return false;
return (GLib.MainContext.default().find_source_by_id(id.source_id) != null);
}

function interval_exists(id) {
return timeout_exists(id);
}
2 changes: 1 addition & 1 deletion Radio3.0@claudiux/files/Radio3.0@claudiux/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"description": "The Ultimate Internet Radio Receiver & Recorder for Cinnamon",
"max-instances": 1,
"version": "2.7.0",
"version": "2.7.1",
"uuid": "Radio3.0@claudiux",
"name": "Radio3.0",
"author": "claudiux",
Expand Down
4 changes: 2 additions & 2 deletions Radio3.0@claudiux/files/Radio3.0@claudiux/po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/"
"issues\n"
"POT-Creation-Date: 2025-01-07 20:17+0100\n"
"PO-Revision-Date: 2025-01-07 20:20+0100\n"
"PO-Revision-Date: 2025-01-08 20:40+0100\n"
"Last-Translator: claudiux\n"
"Language-Team: \n"
"Language: fr_FR\n"
Expand All @@ -26,7 +26,7 @@ msgstr "non attribué"

#. applet.js:244 desklet/AlbumArt3.0@claudiux/desklet.js:273
msgid "Display Album Art at full size"
msgstr ""
msgstr "Afficher en taille réelle la Pochette de l'album"

#. applet.js:348
msgid "This is your own list of Categories and Radio Stations."
Expand Down
37 changes: 5 additions & 32 deletions Radio3.0@claudiux/files/Radio3.0@claudiux/settings-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
"sectionBehaviorNotifications",
"sectionBehaviorBitrate",
"sectionBehaviorSymbolicIconColor",
"sectionBehaviorHorizontalPanel",
"sectionBehaviorAlbumArtDesklet"
"sectionBehaviorHorizontalPanel"
]
},
"pageRecording": {
Expand Down Expand Up @@ -304,14 +303,6 @@
"horizontal-max-title-length"
]
},
"sectionBehaviorAlbumArtDesklet": {
"type": "section",
"title": "Album Art desklet",
"keys": [
"desklet-show-on-desktop",
"desklet-open-settings-button"
]
},
"sectionNetworkQuality": {
"type": "section",
"title": "Quality",
Expand Down Expand Up @@ -1922,28 +1913,6 @@
"type": "generic",
"default": false
},
"desklet-activate-button": {
"type": "button",
"dependency": "!desklet-is-activated",
"description": "Activate desklet displaying the Radio3.0 Album Art",
"callback": "on_button_activate_desklet_clicked"
},
"desklet-activated-label": {
"type": "label",
"dependency": "desklet-is-activated",
"description": "The desklet displaying the Radio3.0 Album Art is activated"
},
"desklet-show-on-desktop" : {
"type": "switch",
"default": false,
"description": "Show Album Art on desktop"
},
"desklet-open-settings-button": {
"type": "button",
"dependency": "desklet-show-on-desktop",
"description": "Album Art desklet settings",
"callback": "on_desklet_open_settings_button_clicked"
},
"radiopp-is-here": {
"type": "generic",
"default": false
Expand All @@ -1955,5 +1924,9 @@
"desklet-y": {
"type": "generic",
"default": -1
},
"desklet-dbus-id": {
"type": "generic",
"default": -1
}
}
Loading

0 comments on commit 5ce5c6d

Please sign in to comment.