![]() |
#16 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,393
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#17 |
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Got the most recent source, but it didn't work as self.gui. I noticed in the code that device_signals was a global so I used:
from calibre.gui2.device import device_signals device_signals.device_metadata_available.connect(s elf.testconnect1) device_signals.device_connection_changed.connect(s elf.testconnect) And this works. Is this what you intended? It doesn't seem to matter if its in genesis or initialization complete. I didn't even know about initialization complete - should I be using it instead of genesis. |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,276
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah, that's fine, I misremembered. Using genesis is fine. You typically only use initialization_complete if something your plugin does depends on initialization being completed.
|
![]() |
![]() |
![]() |
#19 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,393
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
FYI: the problem before is that signals cannot be declared in mixin classes. Well, they can be declared, but emitting one of them corrupts memory and the application falls over dead. Moving them to a global fixes it. Kovid mentioned that I also could have put them into the outer-level gui class, which would be the only solution if we had multiple gui instances. |
|
![]() |
![]() |
![]() |
#20 |
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Its working well, and quite fun to test
![]() ![]() Many thanks. |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre not detecting device | Bureaucromancer | Kobo Reader | 3 | 09-19-2010 12:16 AM |
Re-detecting a device such as iPad | gandor62 | Calibre | 1 | 06-18-2010 08:21 PM |
Calibre not detecting device prs500 | Miri | Calibre | 10 | 06-13-2010 01:46 PM |
Detecting device | mpetry | Calibre | 3 | 04-16-2010 09:05 PM |
Multi-Device Sync? | Sonist | Calibre | 6 | 02-03-2010 03:49 PM |