Skip to content

Commit

Permalink
Toggle cursor while waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
ping committed Aug 3, 2023
1 parent 814e35a commit ae53c33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions calibre-plugin/dialog/magazines.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ def add_magazine_btn_clicked(self):
self.overdrive_client, card, title_id
)
self.add_magazine_btn.setEnabled(False)
self.setCursor(Qt.WaitCursor)
self._fetch_library_media_thread.start()

def found_media(self, media, card):
Expand Down Expand Up @@ -436,10 +437,12 @@ def _get_fetch_library_media_thread(

def loaded(media):
self.found_media(media, card)
self.unsetCursor()
self.add_magazine_btn.setEnabled(True)
thread.quit()

def errored_out(err: Exception):
self.unsetCursor()
self.add_magazine_btn.setEnabled(True)
thread.quit()
raise err
Expand Down

0 comments on commit ae53c33

Please sign in to comment.