VCS/ProjectBrowserHelper.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3349
2a034a7f1f54
child 3591
2f2a4a76dd22
--- a/VCS/ProjectBrowserHelper.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/VCS/ProjectBrowserHelper.py	Thu Apr 03 23:05:31 2014 +0200
@@ -270,8 +270,8 @@
             
             dlg = DeleteFilesConfirmationDialog(
                 self.parent(),
-                self.trUtf8("Remove from repository (and disk)"),
-                self.trUtf8(
+                self.tr("Remove from repository (and disk)"),
+                self.tr(
                     "Do you really want to remove these translation files from"
                     " the repository (and disk)?"),
                 names)
@@ -290,8 +290,8 @@
             
             dlg = DeleteFilesConfirmationDialog(
                 self.parent(),
-                self.trUtf8("Remove from repository (and disk)"),
-                self.trUtf8(
+                self.tr("Remove from repository (and disk)"),
+                self.tr(
                     "Do you really want to remove these files/directories"
                     " from the repository (and disk)?"),
                 files)
@@ -316,6 +316,20 @@
         except AttributeError:
             fn = itm.dirName()
         self.vcs.vcsLog(fn)
+    
+    def _VCSLogBrowser(self):
+        """
+        Protected slot called by the context menu to show the log browser for a
+        file.
+        """
+        itm = self.browser.currentItem()
+        try:
+            fn = itm.fileName()
+            isFile = True
+        except AttributeError:
+            fn = itm.dirName()
+            isFile = False
+        self.vcs.vcsLogBrowser(fn, isFile=isFile)
         
     def _VCSDiff(self):
         """

eric ide

mercurial