Skip to content

Commit

Permalink
Merge pull request #18 from strubium/smeagle
Browse files Browse the repository at this point in the history
Some Basic Updates
  • Loading branch information
strubium authored Aug 13, 2024
2 parents f037c47 + 08d47db commit d383e82
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion QtPyHammer/ops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


filename_filters = ["Valve Map Format (*.vmf)",
"QtPyHammer file (*.qph)",
"All files (*.*)"]

# TODO: write a common function for detecting if files / folders exist
Expand Down
12 changes: 5 additions & 7 deletions QtPyHammer/ui/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class MainWindow(QtWidgets.QMainWindow):
def __init__(self, parent=None):
super(QtWidgets.QMainWindow, self).__init__(parent)
global current_dir
self.setWindowIcon(QtGui.QIcon('HammerLogo.png'))
self.setWindowTitle("QtPyHammer - Fork")
self.setMinimumSize(640, 480)
self.setTabPosition(QtCore.Qt.TopDockWidgetArea, QtWidgets.QTabWidget.North)
Expand Down Expand Up @@ -387,10 +386,9 @@ def open(self, filename): # allows loading via drag & drop
short_filename = os.path.basename(filename)
if extension == ".vmf":
tab = workspace.VmfTab(filename, new=False, parent=self)
elif extension == ".qph":
raise NotImplementedError("No .qph viewport tabs yet")
# tab = workspace.QphTab(filename, new=False, parent=self)
self.tabs.addTab(tab, short_filename)
self.tabs.setCurrentIndex(self.tabs.count() - 1)
else:
raise RuntimeError(f"{filename} is not a .vmf file")
self.tabs.addTab(tab, short_filename)
self.tabs.setCurrentIndex(self.tabs.count() - 1)
not_vmf_popup = popup.browser(parent=self, popuptext="Error", msgtext=f"{filename} is not a .vmf file")
not_vmf_popup.show()
pass
6 changes: 3 additions & 3 deletions QtPyHammer/utilities/lang.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def setLanguage(language):
def langFile(language=usingLanguage):
match(language):
case "english":
return "File"
return "&File"
case "spanish":
return "Archivo"
case "russian":
Expand All @@ -19,7 +19,7 @@ def langFile(language=usingLanguage):
def langEdit(language=usingLanguage):
match(language):
case "english":
return "Edit"
return "&Edit"
case "spanish":
return "Editar"
case "russian":
Expand All @@ -30,7 +30,7 @@ def langEdit(language=usingLanguage):
def langTools(language=usingLanguage):
match(language):
case "english":
return "Tools"
return "&Tools"
case "spanish":
return "Herramientas"
case "russian":
Expand Down
3 changes: 2 additions & 1 deletion hammer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys

import valvefgd
from PyQt5 import QtCore, QtWidgets
from PyQt5 import QtCore, QtGui, QtWidgets

from QtPyHammer.ui.core import MainWindow
from QtPyHammer.ui.user_preferences.theme import load_theme
Expand All @@ -22,6 +22,7 @@ class QtPyHammerApp(QtWidgets.QApplication):
# -- QtWidgets.QApplication.instance()
def __init__(self, argv):
super(QtWidgets.QApplication, self).__init__(argv)
self.setWindowIcon(QtGui.QIcon('HammerLogo.png'))
self.folder = os.path.dirname(__file__)
self.preferences = load_ini("configs/preferences.ini")
game = self.preferences.value("Game", "Team Fortress 2")
Expand Down

0 comments on commit d383e82

Please sign in to comment.