2929# Modules used for overriding AllSettingsWindow
3030import logging
3131
32- PLUGIN_MANAGER_VERSION = "1.1.0 "
32+ PLUGIN_MANAGER_VERSION = "1.1.1 "
3333REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
3434# Current tag can be changed to "staging" or any other branch in
3535# plugin manager repo for testing purpose.
@@ -1746,21 +1746,26 @@ def __init__(self, transition: str = "in_right", origin_widget: bui.Widget = Non
17461746 parent = self ._root_widget ,
17471747 position = (- 5 , loading_pos_y ),
17481748 size = (self ._width , 25 ),
1749- text = "Loading " ,
1749+ text = "" ,
17501750 color = bui .app .ui_v1 .title_color ,
17511751 scale = 0.7 ,
17521752 h_align = "center" ,
17531753 v_align = "center" ,
17541754 maxwidth = 400 ,
17551755 )
1756- self ._dot_timer = babase .AppTimer (0.5 , self ._update_dots , repeat = True )
1756+ self ._loading_spinner = bui .spinnerwidget (
1757+ parent = self ._root_widget ,
1758+ position = (self ._width * 0.5 , loading_pos_y ),
1759+ style = 'bomb' ,
1760+ size = 48 ,
1761+ )
17571762
17581763 @contextlib .contextmanager
17591764 def exception_handler (self ):
17601765 try :
17611766 yield
17621767 except urllib .error .URLError :
1763- self ._dot_timer = None
1768+ bui . spinnerwidget ( edit = self ._loading_spinner , visible = False )
17641769 try :
17651770 bui .textwidget (
17661771 edit = self ._plugin_manager_status_text ,
@@ -1773,22 +1778,13 @@ def exception_handler(self):
17731778 # User probably went back before a bui.Window could finish loading.
17741779 pass
17751780 except Exception as e :
1776- self ._dot_timer = None
1781+ bui . spinnerwidget ( edit = self ._loading_spinner , visible = False )
17771782 try :
17781783 bui .textwidget (edit = self ._plugin_manager_status_text , text = str (e ))
17791784 except :
17801785 pass
17811786 raise
17821787
1783- def _update_dots (self ):
1784- try :
1785- text = cast (str , bui .textwidget (query = self ._plugin_manager_status_text ))
1786- if text .endswith ('....' ):
1787- text = text [0 :len (text )- 4 ]
1788- bui .textwidget (edit = self ._plugin_manager_status_text , text = (text + '.' ))
1789- except :
1790- pass
1791-
17921788 async def draw_index (self ):
17931789 self .draw_search_bar ()
17941790 self .draw_plugins_scroll_bar ()
@@ -1798,7 +1794,7 @@ async def draw_index(self):
17981794 with self .exception_handler ():
17991795 await self .plugin_manager .setup_changelog ()
18001796 await self .plugin_manager .setup_index ()
1801- self ._dot_timer = None
1797+ bui . spinnerwidget ( edit = self ._loading_spinner , visible = False )
18021798 try :
18031799 bui .textwidget (edit = self ._plugin_manager_status_text , text = "" )
18041800 except :
@@ -2115,18 +2111,18 @@ def cleanup(self):
21152111
21162112 async def refresh (self ):
21172113 self .cleanup ()
2118- try :
2119- bui .textwidget (edit = self ._plugin_manager_status_text , text = "Refreshing" )
2120- except :
2121- pass
2122- if self . _dot_timer is None :
2123- self . _dot_timer = babase . AppTimer ( 0.5 , self ._update_dots , repeat = True )
2114+ # try:
2115+ # bui.textwidget(edit=self._plugin_manager_status_text, text="Refreshing")
2116+ # except:
2117+ # pass
2118+
2119+ bui . spinnerwidget ( edit = self ._loading_spinner , visible = True )
21242120
21252121 with self .exception_handler ():
21262122 await self .plugin_manager .refresh ()
21272123 await self .plugin_manager .setup_changelog ()
21282124 await self .plugin_manager .setup_index ()
2129- self ._dot_timer = None
2125+ bui . spinnerwidget ( edit = self ._loading_spinner , visible = False )
21302126 try :
21312127 bui .textwidget (edit = self ._plugin_manager_status_text , text = "" )
21322128 except :
0 commit comments