Preferences/ToolConfigurationDialog.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3190
a9a94491c4fd
child 3656
441956d8fce5
--- a/Preferences/ToolConfigurationDialog.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/Preferences/ToolConfigurationDialog.py	Thu Apr 03 23:05:31 2014 +0200
@@ -18,7 +18,9 @@
 from E5Gui import E5MessageBox, E5FileDialog
 
 from .Ui_ToolConfigurationDialog import Ui_ToolConfigurationDialog
+
 import Utilities
+import UI.PixmapCache
 
 
 class ToolConfigurationDialog(QDialog, Ui_ToolConfigurationDialog):
@@ -35,15 +37,18 @@
         super(ToolConfigurationDialog, self).__init__(parent)
         self.setupUi(self)
         
+        self.iconButton.setIcon(UI.PixmapCache.getIcon("open.png"))
+        self.executableButton.setIcon(UI.PixmapCache.getIcon("open.png"))
+        
         self.iconCompleter = E5FileCompleter(self.iconEdit)
         self.executableCompleter = E5FileCompleter(self.executableEdit)
         
         self.redirectionModes = [
-            ("no", self.trUtf8("no redirection")),
-            ("show", self.trUtf8("show output")),
-            ("insert", self.trUtf8("insert into current editor")),
+            ("no", self.tr("no redirection")),
+            ("show", self.tr("show output")),
+            ("insert", self.tr("insert into current editor")),
             ("replaceSelection",
-             self.trUtf8("replace selection of current editor")),
+             self.tr("replace selection of current editor")),
         ]
         
         self.toollist = copy.deepcopy(toollist)
@@ -101,8 +106,8 @@
         if not executable:
             E5MessageBox.critical(
                 self,
-                self.trUtf8("Add tool entry"),
-                self.trUtf8(
+                self.tr("Add tool entry"),
+                self.tr(
                     "You have to set an executable to add to the"
                     " Tools-Menu first."))
             return
@@ -110,8 +115,8 @@
         if not menutext:
             E5MessageBox.critical(
                 self,
-                self.trUtf8("Add tool entry"),
-                self.trUtf8(
+                self.tr("Add tool entry"),
+                self.tr(
                     "You have to insert a menuentry text to add the"
                     " selected program to the Tools-Menu first."))
             return
@@ -119,8 +124,8 @@
         if not Utilities.isinpath(executable):
             E5MessageBox.critical(
                 self,
-                self.trUtf8("Add tool entry"),
-                self.trUtf8(
+                self.tr("Add tool entry"),
+                self.tr(
                     "The selected file could not be found or"
                     " is not an executable."
                     " Please choose an executable filename."))
@@ -130,8 +135,8 @@
                 menutext, Qt.MatchFlags(Qt.MatchExactly))):
             E5MessageBox.critical(
                 self,
-                self.trUtf8("Add tool entry"),
-                self.trUtf8("An entry for the menu text {0} already exists.")
+                self.tr("Add tool entry"),
+                self.tr("An entry for the menu text {0} already exists.")
                 .format(menutext))
             return
         
@@ -163,8 +168,8 @@
         if not executable:
             E5MessageBox.critical(
                 self,
-                self.trUtf8("Change tool entry"),
-                self.trUtf8(
+                self.tr("Change tool entry"),
+                self.tr(
                     "You have to set an executable to change the"
                     " Tools-Menu entry."))
             return
@@ -172,8 +177,8 @@
         if not menutext:
             E5MessageBox.critical(
                 self,
-                self.trUtf8("Change tool entry"),
-                self.trUtf8(
+                self.tr("Change tool entry"),
+                self.tr(
                     "You have to insert a menuentry text to change the"
                     " selected Tools-Menu entry."))
             return
@@ -181,8 +186,8 @@
         if not Utilities.isinpath(executable):
             E5MessageBox.critical(
                 self,
-                self.trUtf8("Change tool entry"),
-                self.trUtf8(
+                self.tr("Change tool entry"),
+                self.tr(
                     "The selected file could not be found or"
                     " is not an executable."
                     " Please choose an existing executable filename."))
@@ -268,7 +273,7 @@
         """
         execfile = E5FileDialog.getOpenFileName(
             self,
-            self.trUtf8("Select executable"),
+            self.tr("Select executable"),
             self.executableEdit.text(),
             "")
         if execfile:
@@ -276,8 +281,8 @@
             if not Utilities.isinpath(execfile):
                 E5MessageBox.critical(
                     self,
-                    self.trUtf8("Select executable"),
-                    self.trUtf8(
+                    self.tr("Select executable"),
+                    self.tr(
                         "The selected file is not an executable."
                         " Please choose an executable filename."))
                 return
@@ -291,9 +296,9 @@
         """
         icon = E5FileDialog.getOpenFileName(
             self,
-            self.trUtf8("Select icon file"),
+            self.tr("Select icon file"),
             self.iconEdit.text(),
-            self.trUtf8("Icon files (*.png)"))
+            self.tr("Icon files (*.png)"))
         if icon:
             self.iconEdit.setText(icon)
     

eric ide

mercurial