@@ -337,6 +337,27 @@ def __init__(
337337
338338 self .confirm_box .setStyleSheet (self .styleSheet ())
339339
340+
341+ ## Init UI Spinner
342+
343+ self .ui .login .setVisible (False )
344+ self .ui .password .setVisible (False )
345+ # self.ui.message.setText("Retrieving the site information...")
346+ self .__refresh_movie_icon = QtGui .QMovie (
347+ os .path .join (
348+ os .path .dirname (__file__ ),
349+ "resources" ,
350+ "spinning-wheel_40x40.gif" ,
351+ )
352+ )
353+ if self .__refresh_movie_icon .loopCount () != - 1 :
354+ self .__refresh_movie_icon .finished .connect (self .__refresh_movie_icon .start )
355+
356+ # movie.setLoopCount(-1) # Loop forever
357+ self .ui .message .setMovie (self .__refresh_movie_icon ) # TODO create another widget for the spinner
358+ self .__refresh_movie_icon .start ()
359+
360+
340361 def __del__ (self ):
341362 """
342363 Destructor.
@@ -472,6 +493,7 @@ def _link_activated(self, site=None):
472493 )
473494
474495 def _toggle_web (self , method_selected = None ):
496+ return
475497 """
476498 Sets up the dialog GUI according to the use of web login or not.
477499 """
@@ -701,13 +723,16 @@ def result(self):
701723
702724 return self ._sso_saml2 .get_session_data ()
703725
704- # We want to wait until we know what is supported by the site, to avoid
705- # flickering GUI.
706- if not self ._query_task .wait (THREAD_WAIT_TIMEOUT_MS ):
707- logger .warning (
708- "Timed out awaiting requesting information: %s"
709- % self ._get_current_site ()
710- )
726+ # # We want to wait until we know what is supported by the site, to avoid
727+ # # flickering GUI.
728+ # if not self._query_task.wait(THREAD_WAIT_TIMEOUT_MS):
729+ # logger.warning(
730+ # "Timed out awaiting requesting information: %s"
731+ # % self._get_current_site()
732+ # )
733+
734+ # Configure the GUI according to what we know: site and user preferences
735+ # TODO -> self._toggle_web....
711736
712737 res = self .exec_ ()
713738 if res != QtGui .QDialog .Accepted :
0 commit comments