예제 #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)
예제 #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)
예제 #3
0
파일: Printing.py 프로젝트: tomihasa/pygui
 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)
예제 #4
0
파일: Printing.py 프로젝트: mnabeelp/PyGUI
 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)
예제 #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)
예제 #6
0
파일: Printing.py 프로젝트: tomihasa/pygui
 def __getstate__(self):
     state = GPageSetup.__getstate__(self)
     state['_gtk_page_setup'] = get_gtk_state(self._gtk_page_setup)
     return state
예제 #7
0
파일: Printing.py 프로젝트: mnabeelp/PyGUI
 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
예제 #8
0
파일: Printing.py 프로젝트: mnabeelp/PyGUI
 def __new__(cls):
     self = GPageSetup.__new__(cls)
     self._win_psd = wps.get_defaults()
     return self
예제 #9
0
 def __getstate__(self):
     state = GPageSetup.__getstate__(self)
     data = NSKeyedArchiver.archivedDataWithRootObject_(self._ns_print_info)
     state['_ns_print_info'] = data.bytes()
     return state
예제 #10
0
 def __getstate__(self):
     state = GPageSetup.__getstate__(self)
     data = NSKeyedArchiver.archivedDataWithRootObject_(self._ns_print_info)
     state['_ns_print_info'] = data.bytes()
     return state
예제 #11
0
 def __new__(cls):
     self = GPageSetup.__new__(cls)
     self._win_psd = wps.get_defaults()
     return self
예제 #12
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