@@ -825,9 +825,11 @@ var RadioPopupSubMenuMenuItem = class RadioPopupSubMenuMenuItem extends PopupSub
825825
826826 let topMenu = this . _getTopMenu ( ) ;
827827 if ( ! topMenu )
828- return false ;
828+ return false ;
829829 if ( ! topMenu . actor )
830- return false ;
830+ return false ;
831+ if ( ! topMenu . actor . get_layout_manager ( ) )
832+ return false ;
831833 let [ topMinHeight , topNaturalHeight ] = topMenu . actor . get_preferred_height ( - 1 ) ;
832834 let topThemeNode = null ;
833835
@@ -1295,9 +1297,6 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
12951297 // Connect signals:
12961298 this . _connect_signals ( ) ;
12971299
1298- // Shortcuts:
1299- this . onShortcutChanged ( ) ;
1300-
13011300 //title_obj.watch('prop', function(value){
13021301 //this._on_mpv_title_changed();
13031302 ////global.log('wow!',value);
@@ -1927,8 +1926,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
19271926
19281927 try {
19291928 if ( this . titleMonitorId ) {
1930- //this.titleMonitor.cancel();
19311929 this . titleMonitor . disconnect ( this . titleMonitorId ) ;
1930+ this . titleMonitor . cancel ( ) ;
19321931 this . titleMonitor = null ;
19331932 this . titleMonitorId = null ;
19341933 }
@@ -1942,8 +1941,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
19421941
19431942 try {
19441943 if ( this . r30stopMonitorId != null ) {
1945- //this.r30stopMonitor.cancel();
19461944 this . r30stopMonitor . disconnect ( this . r30stopMonitorId ) ;
1945+ this . r30stopMonitor . cancel ( ) ;
19471946 this . r30stopMonitor = null ;
19481947 this . r30stopMonitorId = null ;
19491948 }
@@ -1957,8 +1956,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
19571956
19581957 try {
19591958 if ( this . r30previousMonitorId != null ) {
1960- //this.r30previousMonitor.cancel();
19611959 this . r30previousMonitor . disconnect ( this . r30previousMonitorId ) ;
1960+ this . r30previousMonitor . cancel ( ) ;
19621961 this . r30previousMonitor = null ;
19631962 this . r30previousMonitorId = null ;
19641963 }
@@ -1972,8 +1971,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
19721971
19731972 try {
19741973 if ( this . r30nextMonitorId != null ) {
1975- //this.r30nextMonitor.cancel();
19761974 this . r30nextMonitor . disconnect ( this . r30nextMonitorId ) ;
1975+ this . r30nextMonitor . cancel ( ) ;
19771976 this . r30nextMonitor = null ;
19781977 this . r30nextMonitorId = null ;
19791978 }
@@ -2050,8 +2049,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
20502049
20512050 try {
20522051 if ( this . recMonitorId ) {
2053- //this.recMonitor.cancel();
20542052 this . recMonitor . disconnect ( this . recMonitorId ) ;
2053+ this . recMonitor . cancel ( ) ;
20552054 this . recMonitor = null ;
20562055 this . recMonitorId = null ;
20572056 }
@@ -2091,8 +2090,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
20912090
20922091 try {
20932092 if ( this . jobsMonitorId ) {
2094- //this.jobsMonitor.cancel();
20952093 this . jobsMonitor . disconnect ( this . jobsMonitorId ) ;
2094+ this . jobsMonitor . cancel ( ) ;
20962095 this . jobsMonitor = null ;
20972096 this . jobsMonitorId = null ;
20982097 }
@@ -4090,11 +4089,18 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
40904089 //~ logDebug("Nbr of categories: "+Object.keys(cws).length);
40914090 //~ logDebug("categories_with_stations: \n"+JSON.stringify(this.categories_with_stations, null, 4));
40924091
4093-
40944092 this . _applet_context_menu . removeAll ( ) ;
40954093 this . create_contextmenu_items ( ) ;
40964094 this . setContextMenuVisibilities ( ) ;
40974095
4096+ // Shortcuts:
4097+ let to = setTimeout ( ( ) => {
4098+ this . onShortcutChanged ( ) ;
4099+ clearTimeout ( to ) ;
4100+ } ,
4101+ 300
4102+ ) ;
4103+
40984104 if ( this . desklet_is_activated )
40994105 reloadExtension ( "AlbumArt3.0@claudiux" , Type . DESKLET ) ;
41004106 }
@@ -4474,8 +4480,14 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
44744480 on_option_menu_reload_this_applet_clicked ( ) {
44754481 //log("on_option_menu_reload_this_applet_clicked");
44764482 this . stop_mpv ( false ) ;
4477- // Reload this applet
4478- reloadExtension ( UUID , Type . APPLET ) ;
4483+ this . _applet_context_menu . close ( ) ;
4484+ let to = setTimeout ( ( ) => {
4485+ // Reload this applet
4486+ reloadExtension ( UUID , Type . APPLET ) ;
4487+ clearTimeout ( to ) ;
4488+ } ,
4489+ 300
4490+ ) ;
44794491 }
44804492
44814493 on_switch_on_last_station_at_start_up ( ) {
@@ -5163,6 +5175,8 @@ class WebRadioReceiverAndRecorder extends TextIconApplet {
51635175 this . context_menu_item_showLogo . _switch . setToggleState ( this . show_favicon ) ;
51645176 if ( this . context_menu_item_showDesklet ) {
51655177 this . context_menu_item_showDesklet . actor . visible = true ;
5178+ if ( ! this . _is_desklet_activated ( ) )
5179+ this . show_desklet = false ;
51665180 this . context_menu_item_showDesklet . _switch . setToggleState ( this . show_desklet ) ;
51675181 //~ this.context_menu_item_showDesklet.actor.visible = this._is_desklet_activated();
51685182 }
0 commit comments