Fixed some little issues related to the Ruby debugger interface and the shell language menu.

Tue, 11 Mar 2014 18:56:38 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 11 Mar 2014 18:56:38 +0100
changeset 3356
22633c0739e2
parent 3354
8d69c9dfb5e2
child 3357
2390df6f42ba

Fixed some little issues related to the Ruby debugger interface and the shell language menu.

Debugger/DebugServer.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfaceRuby.py file | annotate | diff | comparison | revisions
QScintilla/Shell.py file | annotate | diff | comparison | revisions
--- a/Debugger/DebugServer.py	Mon Mar 10 19:22:15 2014 +0100
+++ b/Debugger/DebugServer.py	Tue Mar 11 18:56:38 2014 +0100
@@ -405,17 +405,16 @@
                 self.clientProcess.readyReadStandardOutput.connect(
                     self.__clientProcessOutput)
                 
-                if not isNetworked:
-                    # the client is connected through stdin and stdout
-                    # Perform actions necessary, if client type has changed
-                    if self.lastClientType != self.clientType:
-                        self.lastClientType = self.clientType
-                        self.remoteBanner()
-                    elif self.__autoClearShell:
-                        self.__autoClearShell = False
-                        self.remoteBanner()
-                    
-                    self.debuggerInterface.flush()
+                # Perform actions necessary, if client type has changed
+                if self.lastClientType != self.clientType:
+                    self.lastClientType = self.clientType
+                    self.remoteBanner()
+                elif self.__autoClearShell:
+                    self.__autoClearShell = False
+                    self.remoteBanner()
+            else:
+                if clType and self.lastClientType:
+                    self.__setClientType(self.lastClientType)
         else:
             self.__createDebuggerInterface("None")
 
--- a/Debugger/DebuggerInterfaceRuby.py	Mon Mar 10 19:22:15 2014 +0100
+++ b/Debugger/DebuggerInterfaceRuby.py	Tue Mar 11 18:56:38 2014 +0100
@@ -19,7 +19,6 @@
 
 import Preferences
 import Utilities
-from Globals import isWindowsPlatform
 
 from eric5config import getConfig
 
@@ -40,7 +39,10 @@
     @return list of the following data. Client type (string), client
         capabilities (integer), client type association (list of strings)
     """
-    return ["Ruby", ClientDefaultCapabilities, ClientTypeAssociations]
+    if Preferences.getDebugger("RubyInterpreter"):
+        return ["Ruby", ClientDefaultCapabilities, ClientTypeAssociations]
+    else:
+        return ["", 0, []]
 
 
 class DebuggerInterfaceRuby(QObject):
@@ -143,8 +145,6 @@
             a network connection (boolean)
         """
         interpreter = Preferences.getDebugger("RubyInterpreter")
-        if interpreter == "" and not isWindowsPlatform():
-            interpreter = "/usr/bin/ruby"
         if interpreter == "":
             E5MessageBox.critical(
                 None,
--- a/QScintilla/Shell.py	Mon Mar 10 19:22:15 2014 +0100
+++ b/QScintilla/Shell.py	Tue Mar 11 18:56:38 2014 +0100
@@ -1454,6 +1454,14 @@
                 self.dbs.clientProcessStderr.disconnect(self.__writeStdErr)
             self.__showStdOutErr = showStdOutErr
         
+        # recreate the languages menu
+        self.lmenu.clear()
+        self.clientLanguages = self.dbs.getSupportedLanguages(shellOnly=True)
+        self.clientLanguages.sort()
+        for language in self.clientLanguages:
+            act = self.lmenu.addAction(language)
+            act.setData(language)
+        
     def __showCompletions(self, completions, text):
         """
         Private method to display the possible completions.

eric ide

mercurial