Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Basic Updates #18

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading