mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-04 03:38:26 +02:00
added Help menu to access the wiki or the discord
This commit is contained in:
parent
426961197a
commit
aa341a9746
2 changed files with 12 additions and 2 deletions
|
@ -1,15 +1,17 @@
|
||||||
from distutils.version import StrictVersion
|
from distutils.version import StrictVersion
|
||||||
from tkinter import filedialog, ttk, messagebox
|
from tkinter import filedialog, ttk, messagebox
|
||||||
from tkinter import *
|
from tkinter import *
|
||||||
|
import webbrowser
|
||||||
import traceback
|
import traceback
|
||||||
import requests
|
import requests
|
||||||
import zipfile
|
import zipfile
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
|
|
||||||
from source.Game import Game, RomAlreadyPatched, InvalidGamePath, InvalidFormat, in_thread, VERSION_FILE_URL
|
from source.Game import Game, RomAlreadyPatched, InvalidGamePath, InvalidFormat
|
||||||
from source.Option import Option
|
from source.Option import Option
|
||||||
|
|
||||||
|
from .definition import *
|
||||||
|
|
||||||
|
|
||||||
with open("./translation.json", encoding="utf-8") as f:
|
with open("./translation.json", encoding="utf-8") as f:
|
||||||
translation_dict = json.load(f)
|
translation_dict = json.load(f)
|
||||||
|
@ -132,6 +134,12 @@ class Gui:
|
||||||
|
|
||||||
add_menu_mystuff_command(self.stringvar_mystuff_folder, "MyStuff")
|
add_menu_mystuff_command(self.stringvar_mystuff_folder, "MyStuff")
|
||||||
|
|
||||||
|
# HELP MENU
|
||||||
|
self.menu_help = Menu(self.menu_bar, tearoff=0)
|
||||||
|
self.menu_bar.add_cascade(label=self.translate("Help"), menu=self.menu_help)
|
||||||
|
self.menu_help.add_command(label="Github Wiki", command=lambda: webbrowser.open(GITHUB_HELP_PAGE_URL))
|
||||||
|
self.menu_help.add_command(label="Discord", command=lambda: webbrowser.open(DISCORD_URL))
|
||||||
|
|
||||||
# GUI
|
# GUI
|
||||||
self.frame_language = Frame(self.root)
|
self.frame_language = Frame(self.root)
|
||||||
self.frame_language.grid(row=1, column=1, sticky="E")
|
self.frame_language.grid(row=1, column=1, sticky="E")
|
||||||
|
|
|
@ -9,6 +9,8 @@ GITHUB_DEV_BRANCH = f"https://raw.githubusercontent.com/{GITHUB_REPOSITORY}/dev/
|
||||||
ZIPBALL_MASTER_BRANCH = f"https://github.com/{GITHUB_REPOSITORY}/zipball/master/"
|
ZIPBALL_MASTER_BRANCH = f"https://github.com/{GITHUB_REPOSITORY}/zipball/master/"
|
||||||
ZIPBALL_DEV_BRANCH = f"https://github.com/{GITHUB_REPOSITORY}/zipball/dev/"
|
ZIPBALL_DEV_BRANCH = f"https://github.com/{GITHUB_REPOSITORY}/zipball/dev/"
|
||||||
VERSION_FILE_URL = GITHUB_MASTER_BRANCH + "version"
|
VERSION_FILE_URL = GITHUB_MASTER_BRANCH + "version"
|
||||||
|
GITHUB_HELP_PAGE_URL = f"https://github.com/{GITHUB_REPOSITORY}/wiki/help"
|
||||||
|
DISCORD_URL = "https://discord.gg/HEYW5v8ZCd"
|
||||||
|
|
||||||
CHUNK_SIZE: int = 524288 # chunk size used to download file
|
CHUNK_SIZE: int = 524288 # chunk size used to download file
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue