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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
 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)
Beispiel #6
0
 def __getstate__(self):
     state = GPageSetup.__getstate__(self)
     state['_gtk_page_setup'] = get_gtk_state(self._gtk_page_setup)
     return state
Beispiel #7
0
 def __getstate__(self):
     psd = self._win_psd
     state = GPageSetup.__getstate__(self)
     state['_win_devmode'] = wps.get_handle_contents(psd.hDevMode)
     state['_win_devnames'] = wps.get_handle_contents(psd.hDevNames)
     return state
Beispiel #8
0
 def __new__(cls):
     self = GPageSetup.__new__(cls)
     self._win_psd = wps.get_defaults()
     return self
Beispiel #9
0
 def __getstate__(self):
     state = GPageSetup.__getstate__(self)
     data = NSKeyedArchiver.archivedDataWithRootObject_(self._ns_print_info)
     state['_ns_print_info'] = data.bytes()
     return state
 def __getstate__(self):
     state = GPageSetup.__getstate__(self)
     data = NSKeyedArchiver.archivedDataWithRootObject_(self._ns_print_info)
     state['_ns_print_info'] = data.bytes()
     return state
 def __new__(cls):
     self = GPageSetup.__new__(cls)
     self._win_psd = wps.get_defaults()
     return self
 def __getstate__(self):
     psd = self._win_psd
     state = GPageSetup.__getstate__(self)
     state['_win_devmode'] = wps.get_handle_contents(psd.hDevMode)
     state['_win_devnames'] = wps.get_handle_contents(psd.hDevNames)
     return state