@@ -64,7 +64,7 @@ async def update_appmenus(self, vm):
6464 if not guivm .is_running ():
6565 self .log .warning ("GUI VM for '%s' is not running, queueing menu update" , vm .name )
6666 # please no async code between those two calls
67- current_queue = guivm .features .get ('menu-update-pending-for' , '' ).split (' ' )
67+ current_queue = guivm .features .get ('menu-update-pending-for' , '' ).split ()
6868 if vm .name not in current_queue :
6969 guivm .features ['menu-update-pending-for' ] = ' ' .join (current_queue + [vm .name ])
7070 return
@@ -90,7 +90,7 @@ async def remove_appmenus(self, vm_name, guivm):
9090 if not guivm .is_running ():
9191 self .log .warning ("GUI VM for '%s' is not running, queueing menu removal" , vm_name )
9292 # please no async code between those two calls
93- current_queue = guivm .features .get ('menu-remove-pending-for' , '' ).split (' ' )
93+ current_queue = guivm .features .get ('menu-remove-pending-for' , '' ).split ()
9494 if vm_name not in current_queue :
9595 guivm .features ['menu-remove-pending-for' ] = ' ' .join (current_queue + [vm_name ])
9696 return
@@ -226,16 +226,18 @@ def on_feature_set_internal(self, vm, event, feature, value,
226226 self .vm_tasks [vm .name ].append (
227227 asyncio .ensure_future (self .remove_appmenus (vm .name , vm .guivm )))
228228
229- @qubes .ext .handler ('domains -start' )
229+ @qubes .ext .handler ('domain -start' )
230230 async def on_domain_start (self , vm , event , ** kwargs ):
231231 """Process queued menu updates"""
232- pending_update = vm .features .get ('menu-update -pending-for' , '' ).split (' ' )
233- pending_remove = vm .features .get ('menu-remove -pending-for' , '' ).split (' ' )
234- if pending_update or pending_remove :
235- vm .log .info ("Processing pending menu updates " )
232+ pending_remove = vm .features .get ('menu-remove -pending-for' , '' ).split ()
233+ pending_update = vm .features .get ('menu-update -pending-for' , '' ).split ()
234+ if pending_remove :
235+ vm .log .info ("Processing pending menu removals " )
236236 for to_remove in pending_remove :
237237 await self .remove_appmenus (to_remove , guivm = vm )
238- del vm .features ['menu-update-pending-for' ]
238+ del vm .features ['menu-remove-pending-for' ]
239+ if pending_update :
240+ vm .log .info ("Processing pending menu updates" )
239241 for to_update in pending_update :
240242 if to_update not in vm .app .domains :
241243 # removed in the meantime, and should be handled
0 commit comments