Skip to content

Commit

Permalink
Improved functioning (linuxmint#6739)
Browse files Browse the repository at this point in the history
* Radio3.0 v2.5.11: Improved functioning

* sound150 v7.4.4: Improved functioning
  • Loading branch information
claudiux authored Jan 5, 2025
1 parent da97731 commit 6bdead2
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 19 deletions.
3 changes: 3 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,6 @@
### v2.5.11~20250105
* Improved functioning.

### v2.5.10~20250101
* Better monitoring of files and directories.

Expand Down
42 changes: 28 additions & 14 deletions Radio3.0@claudiux/files/Radio3.0@claudiux/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -825,9 +825,11 @@ var RadioPopupSubMenuMenuItem = class RadioPopupSubMenuMenuItem extends PopupSub

let topMenu = this._getTopMenu();
if(!topMenu)
return false;
return false;
if(!topMenu.actor)
return false;
return false;
if(!topMenu.actor.get_layout_manager())
return false;
let [topMinHeight, topNaturalHeight] = topMenu.actor.get_preferred_height(-1);
let topThemeNode = null;

Expand Down Expand Up @@ -1295,9 +1297,6 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
// Connect signals:
this._connect_signals();

// Shortcuts:
this.onShortcutChanged();

//title_obj.watch('prop', function(value){
//this._on_mpv_title_changed();
////global.log('wow!',value);
Expand Down Expand Up @@ -1927,8 +1926,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {

try {
if (this.titleMonitorId) {
//this.titleMonitor.cancel();
this.titleMonitor.disconnect(this.titleMonitorId);
this.titleMonitor.cancel();
this.titleMonitor = null;
this.titleMonitorId = null;
}
Expand All @@ -1942,8 +1941,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {

try {
if (this.r30stopMonitorId != null) {
//this.r30stopMonitor.cancel();
this.r30stopMonitor.disconnect(this.r30stopMonitorId);
this.r30stopMonitor.cancel();
this.r30stopMonitor = null;
this.r30stopMonitorId = null;
}
Expand All @@ -1957,8 +1956,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {

try {
if (this.r30previousMonitorId != null) {
//this.r30previousMonitor.cancel();
this.r30previousMonitor.disconnect(this.r30previousMonitorId);
this.r30previousMonitor.cancel();
this.r30previousMonitor = null;
this.r30previousMonitorId = null;
}
Expand All @@ -1972,8 +1971,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {

try {
if (this.r30nextMonitorId != null) {
//this.r30nextMonitor.cancel();
this.r30nextMonitor.disconnect(this.r30nextMonitorId);
this.r30nextMonitor.cancel();
this.r30nextMonitor = null;
this.r30nextMonitorId = null;
}
Expand Down Expand Up @@ -2050,8 +2049,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {

try {
if (this.recMonitorId) {
//this.recMonitor.cancel();
this.recMonitor.disconnect(this.recMonitorId);
this.recMonitor.cancel();
this.recMonitor = null;
this.recMonitorId = null;
}
Expand Down Expand Up @@ -2091,8 +2090,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {

try {
if (this.jobsMonitorId) {
//this.jobsMonitor.cancel();
this.jobsMonitor.disconnect(this.jobsMonitorId);
this.jobsMonitor.cancel();
this.jobsMonitor = null;
this.jobsMonitorId = null;
}
Expand Down Expand Up @@ -4090,11 +4089,18 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
//~ logDebug("Nbr of categories: "+Object.keys(cws).length);
//~ logDebug("categories_with_stations: \n"+JSON.stringify(this.categories_with_stations, null, 4));


this._applet_context_menu.removeAll();
this.create_contextmenu_items();
this.setContextMenuVisibilities();

// Shortcuts:
let to = setTimeout( () => {
this.onShortcutChanged();
clearTimeout(to);
},
300
);

if (this.desklet_is_activated)
reloadExtension("AlbumArt3.0@claudiux", Type.DESKLET);
}
Expand Down Expand Up @@ -4474,8 +4480,14 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
on_option_menu_reload_this_applet_clicked() {
//log("on_option_menu_reload_this_applet_clicked");
this.stop_mpv(false);
// Reload this applet
reloadExtension(UUID, Type.APPLET);
this._applet_context_menu.close();
let to = setTimeout( () => {
// Reload this applet
reloadExtension(UUID, Type.APPLET);
clearTimeout(to);
},
300
);
}

on_switch_on_last_station_at_start_up() {
Expand Down Expand Up @@ -5163,6 +5175,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
this.context_menu_item_showLogo._switch.setToggleState(this.show_favicon);
if (this.context_menu_item_showDesklet) {
this.context_menu_item_showDesklet.actor.visible = true;
if (!this._is_desklet_activated())
this.show_desklet = false;
this.context_menu_item_showDesklet._switch.setToggleState(this.show_desklet);
//~ this.context_menu_item_showDesklet.actor.visible = this._is_desklet_activated();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class AlbumArtRadio30 extends Desklet.Desklet {

this.isLooping = false;
this.dir_monitor_loop_is_active = false;
this.dir_monitor.cancel();
this.dir_monitor = null;
}

_scan_dir(dir) {
Expand Down
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.5.10",
"version": "2.5.11",
"uuid": "Radio3.0@claudiux",
"name": "Radio3.0",
"author": "claudiux",
Expand Down
16 changes: 13 additions & 3 deletions sound150@claudiux/files/sound150@claudiux/6.4/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1920,7 +1920,6 @@ class Sound150Applet extends Applet.TextIconApplet {
this.menuManager = new PopupMenu.PopupMenuManager(this);
this.menu = new Applet.AppletPopupMenu(this, orientation);
this.menuManager.addMenu(this.menu);
this._setKeybinding();

this.set_applet_icon_symbolic_name("audio-x-generic");

Expand Down Expand Up @@ -2335,7 +2334,14 @@ class Sound150Applet extends Applet.TextIconApplet {
this._loopArtId = Mainloop.timeout_add_seconds(5, this.loopArt.bind(this));
//~ this.loopArt();

this.volume_near_icon()
this.volume_near_icon();

let to = setTimeout( () => {
this._setKeybinding();
clearTimeout(to);
},
300
);
}

on_applet_reloaded() {
Expand Down Expand Up @@ -3473,7 +3479,11 @@ class Sound150Applet extends Applet.TextIconApplet {
//~ this._applet_context_menu.close();
this.menu.close();
// Reload this applet
Extension.reloadExtension(UUID, Extension.Type.APPLET);
let to = setTimeout( () => {
Extension.reloadExtension(UUID, Extension.Type.APPLET);
clearTimeout(to);
},
300);
}

_onSystemSoundSettingsPressed() {
Expand Down
3 changes: 3 additions & 0 deletions sound150@claudiux/files/sound150@claudiux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### v7.4.4~20250105
* Improved functioning.

### v7.4.3~20250104
* Fixes #6728: Corrects a regression in Cinnamon 6.2.

Expand Down
2 changes: 1 addition & 1 deletion sound150@claudiux/files/sound150@claudiux/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"max-instances": "1",
"description": "Enhanced sound applet",
"hide-configuration": false,
"version": "7.4.3",
"version": "7.4.4",
"cinnamon-version": [
"2.8",
"3.0",
Expand Down

0 comments on commit 6bdead2

Please sign in to comment.