diff --git a/LogarithmPlotter/logarithmplotter.py b/LogarithmPlotter/logarithmplotter.py
index 3d98e7b..a1189e4 100644
--- a/LogarithmPlotter/logarithmplotter.py
+++ b/LogarithmPlotter/logarithmplotter.py
@@ -182,7 +182,7 @@ def run():
engine.load(path.realpath(path.join(getcwd(), "qml", "eu", "ad5001", "LogarithmPlotter", "LogarithmPlotter.qml")))
chdir(pwd)
- if len(argv) > 0 and path.exists(argv[-1]) and argv[-1].split('.')[-1] in ['json', 'lgg', 'lpf']:
+ if len(argv) > 0 and path.exists(argv[-1]) and argv[-1].split('.')[-1] in ['lpf']:
engine.rootObjects()[0].loadDiagram(argv[-1])
chdir(path.dirname(path.realpath(__file__)))
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/FileDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/FileDialog.qml
index 3931348..c958f42 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/FileDialog.qml
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/FileDialog.qml
@@ -24,7 +24,7 @@ D.FileDialog {
property bool exportMode: false
title: exportMode ? "Export Logarithm Plot file" : "Import Logarithm Plot file"
- nameFilters: ["Logarithm Plot File (*.lpf *.lgg)", "Old Logarithm Plot Data (*.json)", "All files (*)"]
+ nameFilters: ["Logarithm Plot File (*.lpf)", "All files (*)"]
folder: shortcuts.documents
selectExisting: !exportMode
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml
index 9a7e6b2..bc02881 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml
@@ -162,7 +162,7 @@ ApplicationWindow {
}
function saveDiagram(filename) {
- if(['json', 'lpf', 'lgg'].indexOf(filename.split('.')[filename.split('.').length-1]) == -1)
+ if(['lpf'].indexOf(filename.split('.')[filename.split('.').length-1]) == -1)
filename += '.lpf'
settings.saveFilename = filename
var objs = {}
diff --git a/LogarithmPlotter/update.py b/LogarithmPlotter/update.py
index 5e6748b..afd9ef7 100644
--- a/LogarithmPlotter/update.py
+++ b/LogarithmPlotter/update.py
@@ -54,6 +54,7 @@ class UpdateCheckerRunnable(QRunnable):
update_available = True
else:
show_alert = False
+ msg_text = "No update available."
except HTTPError as e:
msg_text = "Could not fetch update information: Server error " + str(e.code) + "."
diff --git a/linux/x-logarithm-plot.xml b/linux/x-logarithm-plot.xml
index 0d6bb9d..31b5c9d 100644
--- a/linux/x-logarithm-plot.xml
+++ b/linux/x-logarithm-plot.xml
@@ -5,8 +5,6 @@
Fichier Graphe Logarithmique
-
-
diff --git a/win/installer.nsi b/win/installer.nsi
index 93ca0d5..067cd3b 100644
--- a/win/installer.nsi
+++ b/win/installer.nsi
@@ -8,6 +8,7 @@ Unicode True
;--------------------------------
;Definitions
!define APP_NAME "LogarithmPlotter"
+!define PROG_ID "LogarithmPlotter.File.1"
!define DEV_NAME "Ad5001"
!define WEBSITE "https://apps.ad5001.eu/LogarithmPlotter"
!define APP_VERSION "0.1.0.0"
@@ -15,6 +16,9 @@ Unicode True
!define DESCRIPTION "Create graphs with logarithm scales."
!define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\LogarithmPlotter"
+!define REG_APPPATHS "Software\Microsoft\Windows\CurrentVersion\App Paths\logarithmplotter.exe"
+!define REG_LPFCLASS "Software\Classes\${PROG_ID}"
+!define REG_LPFEXT "Software\Classes\.lpf"
;--------------------------------
;General description
@@ -171,7 +175,19 @@ Section ""
WriteRegStr HKLM ${REG_UNINSTALL} "DisplayVersion" "${APP_VERSION}"
WriteRegStr HKLM ${REG_UNINSTALL} "Readme" "$INSTDIR\README.md"
WriteRegStr HKLM ${REG_UNINSTALL} "URLInfoAbout" "${WEBSITE}"
-
+
+ ; Registering application
+ ;WriteRegStr HKLM ${REG_APPPATHS} "" "$INSTDIR\logarithmplotter.exe"
+ ;WriteRegStr HKLM ${REG_APPPATHS} "SupportedProtocols" "file:"
+
+ ; Registering mime type
+ WriteRegStr HKLM ${REG_LPFCLASS} "" "Logarithm Plot File"
+ WriteRegStr HKLM "${REG_LPFCLASS}\DefaultIcon" "" "$INSTDIR\logarithmplotter.exe,0" ; I'd like to put the logplotterfile icon, but this seems far too difficult to do.
+ WriteRegStr HKLM "${REG_LPFCLASS}\shell\open\command" "" "$INSTDIR\logarithmplotter.exe $\"$$1$\""
+ WriteRegStr HKLM "${REG_LPFCLASS}\shell\edit\command" "" "$INSTDIR\logarithmplotter.exe $\"$$1$\""
+ WriteRegStr HKLM ${REG_LPFEXT} "" "${PROG_ID}"
+ WriteRegStr HKLM ${REG_LPFEXT} "Content Type" "application/x-logarithm-plot"
+ WriteRegStr HKLM ${REG_LPFEXT} "PerceivedType" "Application"
SectionEnd
;--------------------------------
@@ -182,7 +198,8 @@ Section "Uninstall"
RMDir /r "$INSTDIR"
Delete "$SMPROGRAMS\LogarithmPlotter.lnk"
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LogarithmPlotter"
+ DeleteRegKey HKLM $[REG_UNINSTALL}
+ DeleteRegKey HKLM $[REG_APPPATHS}
; ;DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
;
SectionEnd