Skip to content

Commit

Permalink
Fix startup
Browse files Browse the repository at this point in the history
  • Loading branch information
otseng committed Nov 1, 2024
1 parent 6950d25 commit bead7fe
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 32 deletions.
53 changes: 27 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,38 @@ myTranslation.py
UniqueBible.code-workspace
**.log
**.log.**
htmlResources/bible_map.html
htmlResources/main.html
htmlResources/study.html
htmlResources/css/custom.css
htmlResources/js/custom.js
htmlResources/*.pdf
UniqueBible.app.pdf
uniquebible/htmlResources/bible_map.html
uniquebible/htmlResources/main.html
uniquebible/htmlResources/study.html
uniquebible/htmlResources/css/custom.css
uniquebible/htmlResources/js/custom.js
uniquebible/htmlResources/*.pdf
UniqueBibleApp.docx
WordDocument_NEW.docx
UniqueBible.app.pdf
thirdParty/dictionaries/*
shortcut*.py
shortcut_*
BibleVerseParser.py.old
UniqueBibleApp.desktop
UniqueBibleApp.sh
morphology.sqlite
htmlResources/fonts/*
htmlResources/images/[A-Z]*/*
htmlResources/images/qrcode.png
uniquebible/htmlResources/fonts/*
uniquebible/htmlResources/images/[A-Z]*/*
uniquebible/htmlResources/images/qrcode.png
**/.DS_Store
nohup.out
/Perimeter\ Worship\ Songs
/Personal
htmlResources/main-*.html
htmlResources/lib/pdfjs-2.7.570-dist/web/*.pdf
htmlResources/lib/bibi-v1.2.0/bibi-bookshelf/*.epub
htmlResources/popover.html
uniquebible/htmlResources/main-*.html
uniquebible/htmlResources/lib/pdfjs-2.7.570-dist/web/*.pdf
uniquebible/htmlResources/lib/bibi-v1.2.0/bibi-bookshelf/*.epub
uniquebible/htmlResources/popover.html
/snippets/**
credentials_*
uba_*.py
htmlResources/material/.DS_Store
htmlResources/material/**
uniquebible/htmlResources/material/.DS_Store
uniquebible/htmlResources/material/**
*.color
*.colour
*.filter
Expand All @@ -82,20 +82,18 @@ temp/*
webstorage/*
workspace/**
uba.sh
util/GitHubCustomRepoCache.py
/ip_blacklist.txt
/ip_whitelist.txt
secrets/github/*.txt
uniquebible/util/GitHubCustomRepoCache.py
uniquebible/secrets/github/*.txt
config.ini
disabled_modules.txt
.swp
nano.*
config.py.save
terminal_history/*
terminal_mode/developers/*.py
terminal_mode/Unique_Bible_App.html
htmlResources/bar_chart.png
htmlResources/pie_chart.png
uniquebible/terminal_history/*
uniquebible/terminal_mode/developers/*.py
uniquebible/terminal_mode/Unique_Bible_App.html
uniquebible/htmlResources/bar_chart.png
uniquebible/htmlResources/pie_chart.png
portable_python
uba_gui_*.sh
uba_terminal_*.sh
Expand Down Expand Up @@ -128,4 +126,7 @@ uniquebible/htmlResources/images/exlbl_largeHD/
uniquebible/venv*/
uniquebible/marvelData/
uniquebible/marvelData_*/
uniquebible/macros/
uniquebible/macros/
uniquebible/plugins/menu
uniquebible/ip_blacklist.txt
uniquebible/ip_whitelist.txt
11 changes: 6 additions & 5 deletions uniquebible/gui/MainWindow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os, signal, sys, re, base64, webbrowser, platform, subprocess, requests, update, logging, zipfile, glob
import os, signal, sys, re, base64, webbrowser, platform, subprocess, requests, logging, zipfile, glob
from uniquebible import config
import markdown, time
#from distutils import util
Expand All @@ -24,6 +24,7 @@
from qtpy.QtGui import QClipboard
from qtpy.QtMultimedia import QMediaPlayer, QMediaContent
from qtpy.QtMultimediaWidgets import QVideoWidget
from uniquebible import update
from uniquebible.gui.PlaylistUI import PlaylistUI
from uniquebible.gui.WorkSpace import Workspace
from uniquebible.db.DevotionalSqlite import DevotionalSqlite
Expand Down Expand Up @@ -4783,10 +4784,10 @@ def switchLandscapeMode(self):
self.centralWidget.switchLandscapeMode()
self.resizeCentral()

"""def setLandscapeMode(self, mode):
config.landscapeMode = bool(util.strtobool(mode))
def setLandscapeMode(self, mode):
config.landscapeMode = TextUtil.strtobool(mode)
self.centralWidget.switchLandscapeMode()
self.resizeCentral()"""
self.resizeCentral()

def resizeCentral(self):
self.centralWidget.resizeMe()
Expand Down Expand Up @@ -5361,7 +5362,7 @@ def loadRunMacrosMenu(self, run_macro_menu):
run_macro_menu.addAction(action)
count += 1

def runMacro(self, file=""):
def runMacro(self, file="", extra=""):
if config.enableMacros and len(file) > 0:
if not ".ubam" in file:
file += ".ubam"
Expand Down
2 changes: 1 addition & 1 deletion uniquebible/util/LanguageUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def determineDefaultLanguage():

@staticmethod
def loadTranslation(lang):
file = "lang.language_{0}".format(lang)
file = "uniquebible.lang.language_{0}".format(lang)
module = importlib.import_module(file)
trans = importlib.reload(module)
return trans.translation
Expand Down
6 changes: 6 additions & 0 deletions uniquebible/util/TextUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,12 @@ def removeSpecialCharacters(text):
text = re.sub(search, replace, text)
return text

@staticmethod
def strtobool(value: str) -> bool:
value = value.lower()
if value in ("y", "yes", "on", "1", "true", "t"):
return True
return False

if __name__ == '__main__':

Expand Down

0 comments on commit bead7fe

Please sign in to comment.