Skip to content

Conversation

@arne182
Copy link
Contributor

@arne182 arne182 commented Jan 7, 2022

@elelay
Copy link
Member

elelay commented Jan 9, 2022

Thanks for the patch :-)

Testing it I got another fatal error in the extension: missing import ctypes! Is it an issue you encounter as well?

Here is the stack trace:

1641748031.113040 [gpodder.log] ERROR: Uncaught exception: Traceback (most recent call last):
  File "C:\gpodder-3.10.21-portable\data\share\gpodder\extensions\taskbar_progress.py", line 165, in callback
    ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
NameError: name 'ctypes' is not defined

Traceback (most recent call last):
  File "C:\gpodder-3.10.21-portable\data\share\gpodder\extensions\taskbar_progress.py", line 165, in callback
    ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
NameError: name 'ctypes' is not defined

I've fixed it in gPodder master branch a moment ago.

Now, regarding your patch, I get an error on the ActivateTab invocation because in on_load() the window_handle is not registered yet (on_load() is called first, then on_ui_object_available(), then the callback function as verified by running in a cmd and adding print statements). How comes it works on your machine? What version are your running from?

Also on windows 10 I already got the progress in taskbar working without your patch.
Adding self.taskbar.ActivateTab(self.window_handle) in the callback, after setting self.window_handle doesn't result in an error on my side, though. So I'd be ok with adding it you show it's needed for you.

@arne182
Copy link
Contributor Author

arne182 commented Jan 9, 2022

This is untested code. Just used this for another project. Putting it in the callback is fine and adding the different lengths for 64 bit so the asset does not fail would be cool

@arne182 arne182 closed this Jan 9, 2022
@elelay
Copy link
Member

elelay commented Jan 15, 2022

OK, I'll bring it in when I have time to test it

@elelay
Copy link
Member

elelay commented Jan 15, 2022

Closed in favor of #1211

@elelay elelay closed this Jan 15, 2022
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