Пример #1
0
 def __init__(self, store, model=None, station=None):
     if station is not None and not isinstance(station, BranchStation):
         raise TypeError("station should be a BranchStation")
     self._device_manager = DeviceManager()
     self.printers_dict = get_supported_printers()
     self._branch_station = station
     # This attribute is set to True when setup_proxies is finished
     self._is_initialized = False
     BaseEditor.__init__(self, store, model)
     self._original_brand = self.model.brand
     self._original_model = self.model.model
Пример #2
0
    def __init__(self, store, model=None):
        self._device_manager = DeviceManager()
        BaseEditor.__init__(self, store, model)
        self.progress_dialog = ProgressDialog()
        self.progress_dialog.connect('cancel',
                                     self._on_progress_dialog__cancel)
        self.progress_dialog.set_transient_for(self.main_dialog)

        if self.edit_mode:
            self.printer.set_sensitive(False)
            self.main_dialog.ok_button.grab_focus()
        else:
            self.edit_constants.hide()
            self.device_serial.hide()
            self.device_serial_label.hide()
            self.is_active.hide()