Exemplo n.º 1
0
	def __setstate__(self, state):
		bytes = state.pop('_ns_print_info', None)
		if bytes:
			data = NSData.dataWithBytes_length_(bytes, len(bytes))
			self._ns_print_info = NSKeyedArchiver.unarchiveObjectWithData_(data)
		else:
			GPageSetup.__setstate__(self, state)
Exemplo n.º 2
0
 def __setstate__(self, state):
     bytes = state.pop('_ns_print_info', None)
     if bytes:
         data = NSData.dataWithBytes_length_(bytes, len(bytes))
         self._ns_print_info = NSKeyedArchiver.unarchiveObjectWithData_(data)
     else:
         GPageSetup.__setstate__(self, state)
Exemplo n.º 3
0
 def __setstate__(self, state):
     gtk_setup = gtk_default_page_setup()
     self._gtk_page_setup = gtk_setup
     gtk_state = state.pop('_gtk_page_setup', None)
     if gtk_state:
         set_gtk_state(gtk_setup, gtk_state)
         self.margins = state['margins']
         self.printer_name = state['printer_name']
     else:
         GPageSetup.__setstate__(state)
Exemplo n.º 4
0
 def __setstate__(self, state):
     psd = self._win_psd
     dm = state.pop('_win_devmode', None)
     dn = state.pop('_win_devnames', None)
     GPageSetup.__setstate__(self, state)
     if dm:
         wps.GlobalFree(psd.hDevMode)
         psd.hDevMode = handle_with_contents(dm)
     if dn:
         wps.GlobalFree(psd.hDevNames)
         psd.hDevNames = handle_with_contents(dn)
Exemplo n.º 5
0
 def __setstate__(self, state):
     psd = self._win_psd
     dm = state.pop('_win_devmode', None)
     dn = state.pop('_win_devnames', None)
     GPageSetup.__setstate__(self, state)
     if dm:
         wps.GlobalFree(psd.hDevMode)
         psd.hDevMode = handle_with_contents(dm)
     if dn:
         wps.GlobalFree(psd.hDevNames)
         psd.hDevNames = handle_with_contents(dn)