Skip to content

Commit 53e2480

Browse files
authored
Merge pull request #34 from seowings/main
GUI Improvements
2 parents a034d5a + ba5f370 commit 53e2480

File tree

8 files changed

+31
-16
lines changed

8 files changed

+31
-16
lines changed

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@
9292
long_description_content_type="text/markdown",
9393
author="Faisal Shahzad",
9494
author_email="info@serpwings.com",
95-
url="https://github.com/serpwings/staticwordpress",
96-
download_url="https://github.com/serpwings/staticwordpress/releases/v%s.tar.gz"
95+
url="https://github.com/serpwings/static-wordpress",
96+
download_url="https://github.com/serpwings/static-wordpress/releases/v%s.tar.gz"
9797
% __version__,
9898
license="GPLv3+",
9999
keywords=[

src/staticwordpress/core/constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
VERSION_MAJOR = 0
4040
VERSION_MINOR = 0
41-
VERSION_REVISION = 2
41+
VERSION_REVISION = 3
4242
VERISON = f"{VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_REVISION}" # -pre-alpha"
4343

4444
SHARE_FOLDER_PATH = Path(

src/staticwordpress/gui/config.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757

5858
from ..core.constants import (
5959
LANGUAGES,
60-
HOST,
6160
REDIRECTS,
6261
USER_AGENT,
6362
CONFIGS,
@@ -344,20 +343,23 @@ def __init__(self):
344343
self.tab_robots_txt.setLayout(vbox_layout_robots_format)
345344
self.tabswidget_configs.addTab(self.tab_robots_txt, "Robots.txt")
346345

347-
dialog_button_box = QDialogButtonBox(
346+
button_box_dialog = QDialogButtonBox(
348347
QDialogButtonBox.Ok | QDialogButtonBox.Cancel
349348
)
350-
dialog_button_box.accepted.connect(self.accept)
351-
dialog_button_box.rejected.connect(self.reject)
349+
pushbutton_ok_cancel = button_box_dialog.buttons()
350+
pushbutton_ok_cancel[0].setIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/ok.svg"))
351+
pushbutton_ok_cancel[1].setIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/cancel.svg"))
352+
button_box_dialog.accepted.connect(self.accept)
353+
button_box_dialog.rejected.connect(self.reject)
352354

353355
self.layout = QVBoxLayout(self)
354356
self.layout.setSpacing(3)
355357
self.layout.setContentsMargins(1, 3, 3, 3)
356358

357359
self.layout.addWidget(self.tabswidget_configs)
358-
self.layout.addWidget(dialog_button_box)
360+
self.layout.addWidget(button_box_dialog)
359361
self.setLayout(self.layout)
360-
self.setFixedSize(QSize(620, 480))
362+
self.setFixedWidth(620)
361363
self.setWindowTitle("Default Configurations")
362364
self.setWindowIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/static-wordpress.svg"))
363365

src/staticwordpress/gui/mainwindow.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def about(self):
557557
msgBox.setText(
558558
f"Copyright {date.today().year} - SERP Wings"
559559
f"<br><br>{CONFIGS['APPLICATION_NAME']} Version - {VERISON}"
560-
"<br><br>This work is an opensource project under GNU General Public License v3 or later (GPLv3+)"
560+
"<br><br>This work is an opensource project under <br>GNU General Public License v3 or later (GPLv3+)"
561561
f"<br>More Information at <a href='https://{CONFIGS['ORGANIZATION_DOMAIN']}/'>{CONFIGS['ORGANIZATION_NAME']}</a>"
562562
)
563563
msgBox.setWindowIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/static-wordpress.svg"))

src/staticwordpress/gui/rawtext.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,19 @@ def __init__(self, src_url: str, dest_url: str):
6666
form_layout_raw_text.addRow(QLabel("Search Url:"), self.lineedit_dest_url)
6767
form_layout_raw_text.addRow(QLabel("Replace Url:"), self.linedit_src_url)
6868

69-
dialog_button_box = QDialogButtonBox(
69+
button_box_dialog = QDialogButtonBox(
7070
QDialogButtonBox.Ok | QDialogButtonBox.Cancel
7171
)
72-
dialog_button_box.accepted.connect(self.accept)
73-
dialog_button_box.rejected.connect(self.reject)
72+
73+
pushbutton_ok_cancel = button_box_dialog.buttons()
74+
pushbutton_ok_cancel[0].setIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/ok.svg"))
75+
pushbutton_ok_cancel[1].setIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/cancel.svg"))
76+
button_box_dialog.accepted.connect(self.accept)
77+
button_box_dialog.rejected.connect(self.reject)
7478

7579
vertical_layout_main = QVBoxLayout()
7680
vertical_layout_main.addLayout(form_layout_raw_text)
77-
vertical_layout_main.addWidget(dialog_button_box)
81+
vertical_layout_main.addWidget(button_box_dialog)
7882
self.setLayout(vertical_layout_main)
7983
self.setMinimumWidth(400)
8084
self.setWindowTitle("Processing Raw Text")
Loading
+1
Loading

src/staticwordpress/share/icons/static-wordpress.svg

+9-2
Loading

0 commit comments

Comments
 (0)