#32 ✓resolved
onyxfish

Pull scanner properties out into ScannerModel separate from MainModel.

Reported by onyxfish | March 5th, 2009 @ 10:21 PM | in 0.5

Scanner properties should be migrated into a ScannerModel, which is managed by MainModel in the same way that PageModel is managed by DocumentModel. Individual scanners will each have a ScannerModel and the one being observed (the 'active_scanner') will be switched on by the MainController.

This will allow for much cleaner and more natural setting of property states on the hardware and hopefully eliminate some of the cruft in the MainModel's property setters.

(Keep in mind that the active scanner will need to be explicitly opened in closed if the device is to remain available to other applications while not in use by NoStaples.)

Comments and changes to this ticket

  • onyxfish

    onyxfish March 5th, 2009 @ 10:21 PM

    • State changed from “new” to “open”
  • onyxfish

    onyxfish March 6th, 2009 @ 09:14 PM

    • State changed from “open” to “resolved”

    On further review, this doesn't turn out to be sensible. SANE's notion of a scanner is something which only maintains state when it is open. Each time a fresh device list is queried all previous device states are lost. The fallout of this is that any attempt to wrap devices is going to require a huge amount of arm-twisting to keep the state objects in sync with the SANE objects. Rather than deal with this, I've elected to stick with the "one state for all devices" model and I've cleaned up the logic in MainModel so that I can mor easily trace the process of selecting devices.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A PyGTK-based desktop scanning application with an emphasis on low-volume document archival for small businesses and home offices.

People watching this ticket

Pages