04-19-2011, 01:12 PM | #16 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
04-19-2011, 01:21 PM | #17 |
Sigil developer
Posts: 1,275
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 | |
|
04-19-2011, 01:22 PM | #18 |
creator of calibre
Posts: 43,860
Karma: 22666666
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.
|
04-19-2011, 01:25 PM | #19 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
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. |
|
04-19-2011, 03:27 PM | #20 |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Its working well, and quite fun to test Maybe I should go back to 7.55 to give me more time to check before metadata is read
Many thanks. |
Advert | |
|
|
Similar Threads | ||||
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 |