Skip to content

Commit 8547a13

Browse files
committed
minor changes
1 parent 320020c commit 8547a13

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

database/SQL/CREATE_DATA.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ INSERT INTO "Alerts" (AlertsType, StandardSound, OwnSound) VALUES ('Off', '\Soun
33
INSERT INTO "Autorun" (EnableProgram, EnableMic, MicStatus, WalkieStatus) VALUES (1, 0, 1, 0);
44
INSERT INTO "Hotkey" (HotkeyMic, HotkeyWalkie) VALUES ('Scroll_lock', 'Pause');
55
INSERT INTO "Settings" (LanguageCode, NightTheme, PrivacyStatus) VALUES ('ru', 1, 0);
6-
INSERT INTO "About" (ProgramVersion, WebSite, Email, Copyright, UrlPrivacyPolicy) VALUES ('v.2022.10.05', 'controlmictray.pp.ua', 'i@controlmictray.pp.ua', 'Copyright © 2022\nSimonovskiy & Lastivka\nAll rights reserved', 'https://controlmictray.pp.ua/PrivacyPolicy.html');
6+
INSERT INTO "About" (ProgramVersion, WebSite, Email, Copyright, UrlPrivacyPolicy) VALUES ('v.2022.10.06', 'https://controlmictray.pp.ua', 'i@controlmictray.pp.ua', 'Copyright © 2022\nSymonovskyi & Lastivka\nAll rights reserved', 'https://controlmictray.pp.ua/PrivacyPolicy.html');

database/SQL/UPDATE_ABOUT_DATA.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
-- Update data in the ABOUT table.
22
UPDATE "About"
3-
SET (ProgramVersion, WebSite, Email, Copyright, UrlPrivacyPolicy)
4-
= ('v.2022.04.18', 'controlmictray.pp.ua', 'i@controlmictray.pp.ua', 'Copyright © 2022\nSimonovskiy & Lastivka\nAll rights reserved', 'https://controlmictray.pp.ua/PrivacyPolicy.html');
3+
SET (ProgramVersion, WebSite, Email, Copyright, UrlPrivacyPolicy) = ('v.2022.10.06', 'https://controlmictray.pp.ua', 'i@controlmictray.pp.ua', 'Copyright © 2022\nSymonovskyi & Lastivka\nAll rights reserved', 'https://controlmictray.pp.ua/PrivacyPolicy.html');

database/databaseController.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ def __checkDatabaseForExistence(self):
3030
cursor.executescript(sql_data.read())
3131
sql_data.close()
3232

33+
db.commit()
34+
db.close()
35+
elif path.exists(self.__db_name):
36+
with connect(self.__db_name) as db:
37+
cursor = db.cursor()
38+
39+
about_data = open(loadFile("database/SQL/UPDATE_ABOUT_DATA.sql"))
40+
cursor.executescript(about_data.read())
41+
about_data.close()
42+
3343
db.commit()
3444
db.close()
3545

logic/aboutWindow.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from webbrowser import WindowsDefault
33
from ui.ui.AboutWindowUI import Ui_AboutWindow as AboutUI
44
from database.databaseController import DatabaseController
5+
from absolutePath import loadFile
56

67
# 'pip install' modules.
78
from PyQt6.QtWidgets import QWidget
@@ -34,7 +35,7 @@ def setup_ui(self):
3435
'''
3536
Sets icon and title of window. Also connects signals to slots.
3637
'''
37-
self.setWindowIcon(QIcon('ui/resources/Microphone_dark.svg'))
38+
self.setWindowIcon(QIcon(loadFile('ui/resources/Microphone_dark.svg')))
3839

3940
self.about_UI.ProgramVersion.setText(self.db.program_version)
4041
self.about_UI.WebSite.clicked.connect(self.open_site)
@@ -45,6 +46,7 @@ def open_site(self):
4546
'''
4647
Opens releases on github in new tab using default system browser.
4748
'''
49+
print(self.db.web_site)
4850
WindowsDefault().open_new_tab(self.db.web_site)
4951

5052
def open_email(self):

0 commit comments

Comments
 (0)