From c13e7b0f873e4857f1ce7924c0a72609df3ddca2 Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Fri, 24 Jul 2020 01:08:02 +0530 Subject: platform independent library and image paths, flake8 compliant --- src/frontEnd/Workspace.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/frontEnd/Workspace.py') diff --git a/src/frontEnd/Workspace.py b/src/frontEnd/Workspace.py index 6940da59..ee3a49f3 100644 --- a/src/frontEnd/Workspace.py +++ b/src/frontEnd/Workspace.py @@ -13,7 +13,7 @@ # MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in # ORGANIZATION: eSim team at FOSSEE, IIT Bombay. # CREATED: Wednesday 05 February 2015 -# REVISION: Friday 14 February 2020 +# REVISION: Friday 24 July 2020 # ========================================================================= from PyQt4 import QtCore, QtGui @@ -82,7 +82,12 @@ class Workspace(QtGui.QWidget): self.setWindowTitle("eSim") self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) self.note.setReadOnly(True) - self.setWindowIcon(QtGui.QIcon('images/logo.png')) + + init_path = '../../' + if os.name == 'nt': + init_path = '' + + self.setWindowIcon(QtGui.QIcon(init_path + 'images/logo.png')) self.setLayout(self.grid) def defaultWorkspace(self): -- cgit