~jaap.karssenberg/zim/pyzim-gtk3

« back to all changes in this revision

Viewing changes to zim/config/manager.py

  • Committer: Jaap Karssenberg
  • Date: 2014-01-31 11:06:27 UTC
  • mto: (668.1.49 pyzim-refactor)
  • mto: This revision was merged to the branch mainline in revision 676.
  • Revision ID: jaap.karssenberg@gmail.com-20140131110627-t7wyjr801qk6lkqa
Fixed issue with autosaving pages and autosaving versions
Removed zim.async and make it more explicit depent on threading

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
                                else:
302
302
                                        return []
303
303
 
304
 
        # Not implemented: read_async and readlines_async
305
 
 
306
304
        def write(self, text):
307
305
                '''Write base file, see L{File.write()}'''
308
306
                self.file.write(text)
311
309
                '''Write base file, see L{File.writelines()}'''
312
310
                self.file.writelines(lines)
313
311
 
314
 
        def write_async(self, text, callback=None, data=None):
315
 
                '''Write base file async, see L{File.write_async()}'''
316
 
                return self.file.write_async(text, callback=callback, data=data)
317
 
 
318
 
        def writelines_async(self, lines, callback=None, data=None):
319
 
                '''Write base file async, see L{File.writelines_async()}'''
320
 
                return self.file.writelines_async(lines, callback=callback, data=data)
321
 
 
322
312
        def remove(self):
323
313
                '''Remove user file, leaves default files in place'''
324
314
                if self.file.exists():
391
381
        def writelines(self, lines):
392
382
                self._data[self._key] = ''.join(lines) or ''
393
383
 
394
 
        def write_async(self, text, callback=None, data=None):
395
 
                self.write(text)
396
 
 
397
 
        def writelines_async(self, lines, callback=None, data=None):
398
 
                self.writelines(lines)
399
 
 
400
384
        def remove(self):
401
385
                del self._data[self._key]
402
386