Skip to content

Commit

Permalink
feat(Investigator): replace classic xorg version with xorg server ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
omgitsaheadcrab authored and atareao committed Aug 30, 2021
1 parent 78fd9ec commit 5b00853
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions po/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ msgid "Uptime"
msgstr "Temps en marcha"

#: src/cpug.py:607
msgid "Xorg version"
msgstr "Versió Xorg"
msgid "Xorg Server version"
msgstr "Versió Xorg Server"

#: src/cpug.py:618
msgid "Resolution"
Expand Down
4 changes: 2 additions & 2 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ msgid "Uptime"
msgstr "Tiempo en marcha"

#: src/cpug.py:607
msgid "Xorg version"
msgstr "Versión Xorg"
msgid "Xorg Server version"
msgstr "Versión Xorg Server"

#: src/cpug.py:618
msgid "Resolution"
Expand Down
4 changes: 2 additions & 2 deletions po/eu_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ msgid "Uptime"
msgstr "Aktibitate denbora"

#: src/cpug.py:607
msgid "Xorg version"
msgstr "Xorg bertsioa"
msgid "Xorg Server version"
msgstr "Xorg Server bertsioa"

#: src/cpug.py:618
msgid "Resolution"
Expand Down
2 changes: 1 addition & 1 deletion po/po.pot
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ msgid "Uptime"
msgstr ""

#: src/cpug.py:607
msgid "Xorg version"
msgid "Xorg Server Version"
msgstr ""

#: src/cpug.py:618
Expand Down
Binary file modified screenshots/cpu-g-system.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/cpug.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,14 @@ def __init__(self):
xoptions=Gtk.AttachOptions.FILL,
yoptions=Gtk.AttachOptions.FILL,
xpadding=5, ypadding=5)
label = Gtk.Label(_('Xorg version'))
label = Gtk.Label(_('Xorg Server version'))
label.set_alignment(0, 0.5)
table41.attach(label, 0, 1, 5, 6,
xoptions=Gtk.AttachOptions.FILL,
yoptions=Gtk.AttachOptions.FILL,
xpadding=5, ypadding=5)
self.xorg_version = Gtk.Entry()
table41.attach(self.xorg_version, 1, 2, 5, 6,
self.xorg_server_version = Gtk.Entry()
table41.attach(self.xorg_server_version, 1, 2, 5, 6,
xoptions=Gtk.AttachOptions.FILL,
yoptions=Gtk.AttachOptions.FILL,
xpadding=5, ypadding=5)
Expand Down Expand Up @@ -1169,7 +1169,7 @@ def update_info(self):
self.hostname.set_text(os.uname()[1])
self.architecture.set_text(os.uname()[4])
self.kernel.set_text(os.uname()[2])
self.xorg_version.set_text(inv.xver())
self.xorg_server_version.set_text(inv.x_server_version())
self.screen_resolution.set_text(inv.resolution())
self.desktop_environment.set_text(inv.desktop_environment())
self.window_manager.set_text(inv.get_window_manager())
Expand Down
12 changes: 5 additions & 7 deletions src/investigator.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def desktop_environment(self):
return "kde"
return "unknown"

@staticmethod
def convert2int(value):
try:
return int(value)
Expand Down Expand Up @@ -325,12 +326,9 @@ def gccver(self):
gcc_version = _('N/A')
return gcc_version

def xver(self):
try:
xver_version = self.execute('/usr/bin/apt-cache show xorg')
except FileNotFoundError:
xver_version = ""
ans = re.findall("Version: 1:(.*)\+", xver_version)
def x_server_version(self):
xver_version = self.execute('cat /var/log/Xorg.0.log | head')
ans = re.findall("X Server (.*)", xver_version)
if ans:
return ans[0]
return _('N/A')
Expand Down Expand Up @@ -486,7 +484,7 @@ def execute(self, command, parser=None):
print(inv.mobo('chassis_type'))
print(inv.raminfo())
print(inv.distro())
print(inv.xver())
print(inv.x_server_version())
print(inv.gccver())
print(inv.disksinfo())
print(inv.get_window_manager())
Expand Down

0 comments on commit 5b00853

Please sign in to comment.