Skip to content

Conversation

@auouymous
Copy link
Member

Items in the Episode menu were not disabled when the progess tab was opened. This consolidates the enabling and disabling of buttons in the toolbar and items in the Episodes menu, and fixes that issue.

It also changes the label and icon for the toolbar play button to be Open, Play, Preview or Stream.

I haven't yet figured out how, but if possible, this new function could change the Play menu item label as well, and no longer need the Open menu item.

Items in the Episode menu were not disabled when the progess tab was
opened. This consolidates the enabling and disabling of buttons in the
toolbar and items in the Episodes menu, and fixes that issue.

It also changes the label and icon for the toolbar play button to be
Open, Play, Preview or Stream.
@elelay
Copy link
Member

elelay commented Mar 16, 2022

Good!

Still a minor bug when

  1. selecting an episode
  2. choosing download (then the CANCEL action and tool button are enabled),
  3. switching to the progress tab
  4. expected: both menu item and button are disabled
  5. actual: only the menu item is disabled
  6. clicking the tool button has no effect, but it's not the bug I'm concerned with

@auouymous
Copy link
Member Author

The cancel button is disabled when opening progress tab, but it then gets turned back on each time a task updates. Switching back and forth turns it off each time progress tab is opened, and the following code is what causes it.

    def play_or_download(self, current_page=None):
        if current_page is None:
            current_page = self.wNotebook.get_current_page()
        if current_page > 0:
            self.toolCancel.set_sensitive(True)
            return (False,) * 6

on_item_cancel_download_activate() has code to cancel the selected task in progress tab. So play_or_download() and on_wNotebook_switch_page() need to check for a selected task and toggle the cancel button to the correct state using set_episode_actions() so the episode menu and ^C can also cancel tasks. And a future PR could enable the download and pause buttons to resume and pause selected tasks.

@elelay
Copy link
Member

elelay commented Mar 16, 2022

So, nothing to fix within current PR then.
Thanks for the investigation and you're welcome to a fix 👍

@elelay elelay merged commit a35e81f into gpodder:master Mar 16, 2022
@auouymous auouymous deleted the set-episode-toolbar-menu-actions branch March 16, 2022 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants