mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2026-10-29 01:26:15 +03:00
Update button which sends you to the releases page
This commit is contained in:
1 parent
331de1c3f8
commit
8a643d545d
3 files changed
+13
-4
No files matched your search
@@ -2,6 +2,10 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 1.2.1
|
||||
|
||||
- Added update button which opens the releases page
|
||||
|
||||
## 1.2.0
|
||||
|
||||
- Added "Clear route" button
|
||||
|
||||
@@ -8,13 +8,14 @@ import os
|
||||
from monitor import monitor
|
||||
import urllib
|
||||
import json
|
||||
import webbrowser
|
||||
|
||||
if sys.platform.startswith('linux'):
|
||||
import subprocess
|
||||
|
||||
|
||||
this = sys.modules[__name__]
|
||||
this.plugin_version = "1.2.0"
|
||||
this.plugin_version = "1.2.1"
|
||||
this.update_available = False
|
||||
this.next_stop = "No route planned"
|
||||
this.route = []
|
||||
@@ -192,6 +193,10 @@ def journal_entry(cmdr, is_beta, system, station, entry, state):
|
||||
update_route()
|
||||
|
||||
|
||||
def goto_update_page(self=None):
|
||||
webbrowser.open('https://github.com/CMDR-Kiel42/EDMC_SpanshRouter/releases')
|
||||
|
||||
|
||||
def plugin_app(parent):
|
||||
this.parent = parent
|
||||
this.frame = tk.Frame(parent)
|
||||
@@ -220,8 +225,8 @@ def plugin_app(parent):
|
||||
this.clear_route_btn.grid_remove()
|
||||
|
||||
if this.update_available:
|
||||
this.update_lbl = tk.Label(this.frame, text="SpanshRouter update available for download!")
|
||||
this.update_lbl.grid(row=5, pady=5, columnspan=2)
|
||||
this.update_btn = tk.Button(this.frame, text="SpanshRouter update available for download!", command=goto_update_page)
|
||||
this.update_btn.grid(row=5, pady=5, columnspan=2)
|
||||
|
||||
update_gui()
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.2.0
|
||||
1.2.1
|
||||
Reference in new issue
Block a user