patch: Minor Enhancements
This commit is contained in:
parent
0c450328b3
commit
52fba91dc0
3 changed files with 22 additions and 13 deletions
|
@ -53,7 +53,7 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
|
||||
# Change UI elements
|
||||
self.change_statusbar(f"Using {self.o.name} v{self.o.version}", 5000)
|
||||
self.setWindowTitle(f"{self.name} v{self.version}")
|
||||
self.set_title()
|
||||
self.default_ui_layout()
|
||||
self.define_gui_interaction()
|
||||
|
||||
|
@ -63,6 +63,13 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
self.ui.png_quality_Slider.setVisible(False)
|
||||
self.ui.quality_label_2.setVisible(False)
|
||||
|
||||
def set_title(self):
|
||||
if self.version == "0.0.1":
|
||||
title = f"{self.name} DEV MODE"
|
||||
else:
|
||||
title = self.name
|
||||
self.setWindowTitle(title)
|
||||
|
||||
def define_gui_interaction(self):
|
||||
self.ui.input_folder_button.clicked.connect(self.browse_input_folder)
|
||||
self.ui.output_folder_button.clicked.connect(self.browse_output_folder)
|
||||
|
@ -108,7 +115,7 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
info_text = f"""
|
||||
<h3>{self.name} v{self.version}</h3>
|
||||
<p>(C) 2024-2025 Mr Finchum aka CodeByMrFinchum</p>
|
||||
<p>{self.name} is a GUI for {self.o.name} (v{self.o.version}), enhancing its functionality with a\nuser-friendly interface for efficient image and metadata management.</p>
|
||||
<p>{self.name} is a GUI for {self.o.name} (v{self.o.version}), enhancing its functionality with a user-friendly interface for efficient image and metadata management.</p>
|
||||
|
||||
<h4>Features:</h4>
|
||||
<ul>
|
||||
|
@ -462,6 +469,10 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
elif do == "write":
|
||||
self.u.write_yaml(self.exif_file, self.available_exif_data)
|
||||
|
||||
def closeEvent(self, event):
|
||||
QApplication.closeAllWindows()
|
||||
event.accept()
|
||||
|
||||
class UpdaterWindow(QMainWindow, Ui_Updater_Window):
|
||||
# Mixture of code by me, code/functions refactored by ChatGPT and code directly from ChatGPT
|
||||
def __init__(self, optimalab35_localversion, optima35_localversion):
|
||||
|
@ -490,7 +501,7 @@ class UpdaterWindow(QMainWindow, Ui_Updater_Window):
|
|||
|
||||
def define_gui_interaction(self):
|
||||
"""Setup UI interactions."""
|
||||
if self.optimalab35_localversion == "0.0.2":
|
||||
if self.optimalab35_localversion == "0.0.1":
|
||||
self.dev_mode()
|
||||
return
|
||||
else:
|
||||
|
@ -524,7 +535,7 @@ class UpdaterWindow(QMainWindow, Ui_Updater_Window):
|
|||
# Check OptimaLab35 update
|
||||
is_newer_ol35, latest_version_ol35 = self.ppu_ol35.check_for_update(True)
|
||||
if is_newer_ol35 is None:
|
||||
self.ui.label_optimalab35_latestversion.setText("Error")
|
||||
self.ui.label_optimalab35_latestversion.setText(latest_version_ol35[0:13])
|
||||
else:
|
||||
self.ui.label_optimalab35_latestversion.setText(latest_version_ol35)
|
||||
self.updates_available["OptimaLab35"] = is_newer_ol35
|
||||
|
@ -532,7 +543,7 @@ class UpdaterWindow(QMainWindow, Ui_Updater_Window):
|
|||
# Check optima35 update
|
||||
is_newer_o35, latest_version_o35 = self.ppu_o35.check_for_update(True)
|
||||
if is_newer_o35 is None:
|
||||
self.ui.label_optima35_latestversion.setText("Error")
|
||||
self.ui.label_optima35_latestversion.setText(latest_version_o35[0:13])
|
||||
else:
|
||||
self.ui.label_optima35_latestversion.setText(latest_version_o35)
|
||||
self.updates_available["optima35"] = is_newer_o35
|
||||
|
@ -598,8 +609,6 @@ class UpdaterWindow(QMainWindow, Ui_Updater_Window):
|
|||
python = sys.executable
|
||||
os.execl(python, python, *sys.argv)
|
||||
|
||||
|
||||
|
||||
class PreviewWindow(QMainWindow, Ui_Preview_Window):
|
||||
values_selected = Signal(int, int, bool)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class Ui_Updater_Window(object):
|
|||
if not Updater_Window.objectName():
|
||||
Updater_Window.setObjectName(u"Updater_Window")
|
||||
Updater_Window.setEnabled(True)
|
||||
Updater_Window.resize(372, 224)
|
||||
Updater_Window.resize(372, 251)
|
||||
self.centralwidget = QWidget(Updater_Window)
|
||||
self.centralwidget.setObjectName(u"centralwidget")
|
||||
self.gridLayout_2 = QGridLayout(self.centralwidget)
|
||||
|
@ -128,8 +128,8 @@ class Ui_Updater_Window(object):
|
|||
# setupUi
|
||||
|
||||
def retranslateUi(self, Updater_Window):
|
||||
Updater_Window.setWindowTitle(QCoreApplication.translate("Updater_Window", u"OptimaLab35 - Updater", None))
|
||||
self.label_last_check.setText(QCoreApplication.translate("Updater_Window", u"Last update check ago:", None))
|
||||
Updater_Window.setWindowTitle(QCoreApplication.translate("Updater_Window", u"Updater", None))
|
||||
self.label_last_check.setText(QCoreApplication.translate("Updater_Window", u"Last update check:", None))
|
||||
self.label_last_check_2.setText(QCoreApplication.translate("Updater_Window", u"TextLabel", None))
|
||||
self.label_6.setText(QCoreApplication.translate("Updater_Window", u"Local Version", None))
|
||||
self.label_optimalab35_latestversion.setText(QCoreApplication.translate("Updater_Window", u"unknown", None))
|
||||
|
|
|
@ -10,18 +10,18 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>372</width>
|
||||
<height>224</height>
|
||||
<height>251</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>OptimaLab35 - Updater</string>
|
||||
<string>Updater</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_last_check">
|
||||
<property name="text">
|
||||
<string>Last update check ago:</string>
|
||||
<string>Last update check:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue