run.py 988 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # GPL3 or any later version
  2. import os
  3. from modules import wallet_selector
  4. from modules import main_window
  5. from modules import images
  6. # Selecting a wallet to work with
  7. wallet = wallet_selector.select_wallet()
  8. # If selected, launching a main window with the selected wallet.
  9. if wallet:
  10. main_window.show_main_window(wallet)
  11. # Making a Desktop Entry ( an applications menu entry ).
  12. desktop = """[Desktop Entry]
  13. Name=J.Y.Transactions
  14. GenericName=Finance
  15. Path="""+os.getcwd()+"""
  16. Exec=python3 run.py
  17. Icon="""+os.getcwd()+"""/icon_small.png
  18. Terminal=false
  19. Type=Application
  20. Categories=Finance;Office;
  21. """
  22. if os.path.exists(os.environ['HOME']+"/.local/share/applications") \
  23. and not os.path.exists(os.environ['HOME']+"/.local/share/applications/JYTRANSACTIONS.desktop"):
  24. o = open(os.environ['HOME']+"/.local/share/applications/JYTRANSACTIONS.desktop", "w")
  25. o.write(desktop)
  26. o.close()
  27. print("Desktop Made!")
  28. # Cleaning unessesary searched images.
  29. images.clear()