10 import contextlib |
10 import contextlib |
11 import os |
11 import os |
12 |
12 |
13 from PyQt6.QtCore import QByteArray, QCoreApplication, QObject |
13 from PyQt6.QtCore import QByteArray, QCoreApplication, QObject |
14 |
14 |
15 from eric7 import Preferences, Utilities |
15 from eric7 import Preferences |
16 from eric7.EricWidgets.EricApplication import ericApp |
16 from eric7.EricWidgets.EricApplication import ericApp |
17 from eric7.Plugins.VcsPlugins.vcsGit.GitUtilities import getConfigPath |
17 from eric7.Plugins.VcsPlugins.vcsGit.GitUtilities import getConfigPath |
18 from eric7.Preferences.Shortcuts import readShortcuts |
18 from eric7.Preferences.Shortcuts import readShortcuts |
|
19 from eric7.SystemUtilities import FileSystemUtilities, OSUtilities |
19 from eric7.UI import Info |
20 from eric7.UI import Info |
20 |
21 |
21 # Start-Of-Header |
22 # Start-Of-Header |
22 name = "Git Plugin" |
23 name = "Git Plugin" |
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
24 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
69 (string) and vcs display string (string) |
70 (string) and vcs display string (string) |
70 """ |
71 """ |
71 global pluginTypename |
72 global pluginTypename |
72 data = {} |
73 data = {} |
73 exe = "git" |
74 exe = "git" |
74 if Utilities.isWindowsPlatform(): |
75 if OSUtilities.isWindowsPlatform(): |
75 exe += ".exe" |
76 exe += ".exe" |
76 if Utilities.isinpath(exe): |
77 if FileSystemUtilities.isinpath(exe): |
77 data[".git"] = (pluginTypename, displayString()) |
78 data[".git"] = (pluginTypename, displayString()) |
78 data["_git"] = (pluginTypename, displayString()) |
79 data["_git"] = (pluginTypename, displayString()) |
79 return data |
80 return data |
80 |
81 |
81 |
82 |
84 Public function to get the display string. |
85 Public function to get the display string. |
85 |
86 |
86 @return display string (string) |
87 @return display string (string) |
87 """ |
88 """ |
88 exe = "git" |
89 exe = "git" |
89 if Utilities.isWindowsPlatform(): |
90 if OSUtilities.isWindowsPlatform(): |
90 exe += ".exe" |
91 exe += ".exe" |
91 if Utilities.isinpath(exe): |
92 if FileSystemUtilities.isinpath(exe): |
92 return QCoreApplication.translate("VcsGitPlugin", "Git") |
93 return QCoreApplication.translate("VcsGitPlugin", "Git") |
93 else: |
94 else: |
94 return "" |
95 return "" |
95 |
96 |
96 |
97 |