This repository has been archived on 2024-12-19. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-19/src/bitmessageqt/widgets.py
Peter Surda ac348e4e6b
Fixes and refactoring
- fixes errors introduced in the earlier refactoring
- more variables moved to state.py
- path finding functions moved to paths.py
- remembers IPv6 network unreachable (in the future can be used to skip
  IPv6 for a while)
2017-01-11 17:00:00 +01:00

14 lines
412 B
Python

from PyQt4 import uic
import os.path
import paths
import sys
def resource_path(resFile):
baseDir = paths.codePath()
for subDir in ["ui", "bitmessageqt"]:
if os.path.isdir(os.path.join(baseDir, subDir)) and os.path.isfile(os.path.join(baseDir, subDir, resFile)):
return os.path.join(baseDir, subDir, resFile)
def load(resFile, widget):
uic.loadUi(resource_path(resFile), widget)