Ejemplo n.º 1
0
 def preferences(self):
     p = Preferences(self.gui)
     if p.exec_() == p.Accepted:
         for ed in editors.itervalues():
             ed.apply_settings()
         setup_cssutils_serialization()
         self.gui.apply_settings()
Ejemplo n.º 2
0
 def save_state(self):
     tprefs.set('search-panel-visible', self.search_panel.isVisible())
     self.search_panel.save_state()
     for ed in editors.itervalues():
         ed.save_state()
     if self.current_editor is not None:
         self.current_editor.save_state()  # Ensure the current editor saves it state last
Ejemplo n.º 3
0
 def save_state(self):
     tprefs.set('search-panel-visible', self.search_panel.isVisible())
     self.search_panel.save_state()
     for ed in editors.itervalues():
         ed.save_state()
     if self.current_editor is not None:
         self.current_editor.save_state()  # Ensure the current editor saves it state last
Ejemplo n.º 4
0
 def preferences(self):
     p = Preferences(self.gui)
     if p.exec_() == p.Accepted:
         for ed in editors.itervalues():
             ed.apply_settings()
         self.gui.keyboard.finalize()
         setup_cssutils_serialization()
Ejemplo n.º 5
0
 def do_editor_save(self):
     ed = self.gui.central.current_editor
     if ed is None:
         return
     name = None
     for n, x in editors.iteritems():
         if x is ed:
             name = n
             break
     if name is None:
         return
     c = current_container()
     with c.open(name, 'wb') as f:
         f.write(ed.data)
     ed.is_modified = False
     tdir = self.mkdtemp(prefix='save-')
     container = clone_container(c, tdir)
     self.save_manager.schedule(tdir, container)
     is_modified = False
     for ed in editors.itervalues():
         if ed.is_modified:
             is_modified = True
             break
     self.gui.action_save.setEnabled(is_modified)
Ejemplo n.º 6
0
 def toolbar_floated(self, floating):
     if not floating:
         self.save_state()
         for ed in editors.itervalues():
             if ed is not self:
                 ed.restore_state()
Ejemplo n.º 7
0
 def toolbar_floated(self, floating):
     if not floating:
         self.save_state()
         for ed in editors.itervalues():
             if ed is not self:
                 ed.restore_state()
Ejemplo n.º 8
0
 def preferences(self):
     p = Preferences(self.gui)
     if p.exec_() == p.Accepted:
         for ed in editors.itervalues():
             ed.apply_settings()