Changed the handling of the monospace font usage in the editor, mini editor and shell.

Sat, 16 Nov 2013 18:37:27 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 16 Nov 2013 18:37:27 +0100
changeset 3087
fdbce259929f
parent 3085
4a0f54a64496
child 3090
3d3b4cb0dfc3

Changed the handling of the monospace font usage in the editor, mini editor and shell.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
QScintilla/MiniEditor.py file | annotate | diff | comparison | revisions
QScintilla/Shell.py file | annotate | diff | comparison | revisions
--- a/QScintilla/Editor.py	Sat Nov 16 18:02:43 2013 +0100
+++ b/QScintilla/Editor.py	Sat Nov 16 18:37:27 2013 +0100
@@ -3062,7 +3062,8 @@
         Private slot to handle the Use Monospaced Font context menu entry.
         """
         if self.menuActs["MonospacedFont"].isChecked():
-            self.setMonospaced(True)
+            if not self.lexer_:
+                self.setMonospaced(True)
         else:
             if self.lexer_:
                 self.lexer_.readSettings(
@@ -4624,6 +4625,8 @@
             else:
                 self.menuActs["OpenRejections"].setEnabled(False)
         
+        self.menuActs["MonospacedFont"].setEnabled(self.lexer_ is None)
+        
         self.showMenu.emit("Main", self.menu,  self)
         
     def __showContextMenuAutocompletion(self):
@@ -6138,8 +6141,9 @@
         @param on flag to indicate usage of a monospace font (boolean)
         """
         if on:
-            f = Preferences.getEditorOtherFonts("MonospacedFont")
-            self.monospacedStyles(f)
+            if not self.lexer_:
+                f = Preferences.getEditorOtherFonts("MonospacedFont")
+                self.monospacedStyles(f)
         else:
             if not self.lexer_:
                 self.clearStyles()
--- a/QScintilla/MiniEditor.py	Sat Nov 16 18:02:43 2013 +0100
+++ b/QScintilla/MiniEditor.py	Sat Nov 16 18:37:27 2013 +0100
@@ -2460,8 +2460,9 @@
         @param on flag to indicate usage of a monospace font (boolean)
         """
         if on:
-            f = Preferences.getEditorOtherFonts("MonospacedFont")
-            self.__textEdit.monospacedStyles(f)
+            if not self.lexer_:
+                f = Preferences.getEditorOtherFonts("MonospacedFont")
+                self.__textEdit.monospacedStyles(f)
         else:
             if not self.lexer_:
                 self.__textEdit.clearStyles()
--- a/QScintilla/Shell.py	Sat Nov 16 18:02:43 2013 +0100
+++ b/QScintilla/Shell.py	Sat Nov 16 18:37:27 2013 +0100
@@ -426,8 +426,9 @@
         @param on flag to indicate usage of a monospace font (boolean)
         """
         if on:
-            f = Preferences.getShell("MonospacedFont")
-            self.monospacedStyles(f)
+            if not self.lexer_:
+                f = Preferences.getShell("MonospacedFont")
+                self.monospacedStyles(f)
         else:
             if not self.lexer_:
                 self.clearStyles()

eric ide

mercurial