From e11cb2d3b1e469b4249c3edc5114bf667b00650c Mon Sep 17 00:00:00 2001 From: Faisal Shahzad <84210709+seowings@users.noreply.github.com> Date: Sun, 24 Sep 2023 18:54:04 +0200 Subject: [PATCH 1/3] updated sveral icons --- src/staticwordpress/gui/config.py | 14 ++++++++------ src/staticwordpress/gui/mainwindow.py | 2 +- src/staticwordpress/gui/rawtext.py | 12 ++++++++---- src/staticwordpress/share/icons/cancel.svg | 1 + src/staticwordpress/share/icons/ok.svg | 1 + .../share/icons/static-wordpress.svg | 11 +++++++++-- 6 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 src/staticwordpress/share/icons/cancel.svg create mode 100644 src/staticwordpress/share/icons/ok.svg diff --git a/src/staticwordpress/gui/config.py b/src/staticwordpress/gui/config.py index 05d574e..e088d27 100644 --- a/src/staticwordpress/gui/config.py +++ b/src/staticwordpress/gui/config.py @@ -57,7 +57,6 @@ from ..core.constants import ( LANGUAGES, - HOST, REDIRECTS, USER_AGENT, CONFIGS, @@ -344,20 +343,23 @@ def __init__(self): self.tab_robots_txt.setLayout(vbox_layout_robots_format) self.tabswidget_configs.addTab(self.tab_robots_txt, "Robots.txt") - dialog_button_box = QDialogButtonBox( + button_box_dialog = QDialogButtonBox( QDialogButtonBox.Ok | QDialogButtonBox.Cancel ) - dialog_button_box.accepted.connect(self.accept) - dialog_button_box.rejected.connect(self.reject) + pushbutton_ok_cancel = button_box_dialog.buttons() + pushbutton_ok_cancel[0].setIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/ok.svg")) + pushbutton_ok_cancel[1].setIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/cancel.svg")) + button_box_dialog.accepted.connect(self.accept) + button_box_dialog.rejected.connect(self.reject) self.layout = QVBoxLayout(self) self.layout.setSpacing(3) self.layout.setContentsMargins(1, 3, 3, 3) self.layout.addWidget(self.tabswidget_configs) - self.layout.addWidget(dialog_button_box) + self.layout.addWidget(button_box_dialog) self.setLayout(self.layout) - self.setFixedSize(QSize(620, 480)) + self.setFixedWidth(620) self.setWindowTitle("Default Configurations") self.setWindowIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/static-wordpress.svg")) diff --git a/src/staticwordpress/gui/mainwindow.py b/src/staticwordpress/gui/mainwindow.py index ed2ffba..1c64298 100644 --- a/src/staticwordpress/gui/mainwindow.py +++ b/src/staticwordpress/gui/mainwindow.py @@ -557,7 +557,7 @@ def about(self): msgBox.setText( f"Copyright {date.today().year} - SERP Wings" f"

{CONFIGS['APPLICATION_NAME']} Version - {VERISON}" - "

This work is an opensource project under GNU General Public License v3 or later (GPLv3+)" + "

This work is an opensource project under
GNU General Public License v3 or later (GPLv3+)" f"
More Information at {CONFIGS['ORGANIZATION_NAME']}" ) msgBox.setWindowIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/static-wordpress.svg")) diff --git a/src/staticwordpress/gui/rawtext.py b/src/staticwordpress/gui/rawtext.py index 154ee76..a24f6ad 100644 --- a/src/staticwordpress/gui/rawtext.py +++ b/src/staticwordpress/gui/rawtext.py @@ -66,15 +66,19 @@ def __init__(self, src_url: str, dest_url: str): form_layout_raw_text.addRow(QLabel("Search Url:"), self.lineedit_dest_url) form_layout_raw_text.addRow(QLabel("Replace Url:"), self.linedit_src_url) - dialog_button_box = QDialogButtonBox( + button_box_dialog = QDialogButtonBox( QDialogButtonBox.Ok | QDialogButtonBox.Cancel ) - dialog_button_box.accepted.connect(self.accept) - dialog_button_box.rejected.connect(self.reject) + + pushbutton_ok_cancel = button_box_dialog.buttons() + pushbutton_ok_cancel[0].setIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/ok.svg")) + pushbutton_ok_cancel[1].setIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/cancel.svg")) + button_box_dialog.accepted.connect(self.accept) + button_box_dialog.rejected.connect(self.reject) vertical_layout_main = QVBoxLayout() vertical_layout_main.addLayout(form_layout_raw_text) - vertical_layout_main.addWidget(dialog_button_box) + vertical_layout_main.addWidget(button_box_dialog) self.setLayout(vertical_layout_main) self.setMinimumWidth(400) self.setWindowTitle("Processing Raw Text") diff --git a/src/staticwordpress/share/icons/cancel.svg b/src/staticwordpress/share/icons/cancel.svg new file mode 100644 index 0000000..5a60c58 --- /dev/null +++ b/src/staticwordpress/share/icons/cancel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/staticwordpress/share/icons/ok.svg b/src/staticwordpress/share/icons/ok.svg new file mode 100644 index 0000000..1655d12 --- /dev/null +++ b/src/staticwordpress/share/icons/ok.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/staticwordpress/share/icons/static-wordpress.svg b/src/staticwordpress/share/icons/static-wordpress.svg index c608a91..ff43699 100644 --- a/src/staticwordpress/share/icons/static-wordpress.svg +++ b/src/staticwordpress/share/icons/static-wordpress.svg @@ -35,9 +35,16 @@ id="defs1" /> Date: Sun, 24 Sep 2023 18:58:21 +0200 Subject: [PATCH 2/3] fix repo link for pypi #27 --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 176a58d..e5bbcea 100644 --- a/setup.py +++ b/setup.py @@ -92,8 +92,8 @@ long_description_content_type="text/markdown", author="Faisal Shahzad", author_email="info@serpwings.com", - url="https://github.com/serpwings/staticwordpress", - download_url="https://github.com/serpwings/staticwordpress/releases/v%s.tar.gz" + url="https://github.com/serpwings/static-wordpress", + download_url="https://github.com/serpwings/static-wordpress/releases/v%s.tar.gz" % __version__, license="GPLv3+", keywords=[ From ba5f3704ace2c265b1064453717a424f76d4d19b Mon Sep 17 00:00:00 2001 From: Faisal Shahzad <84210709+seowings@users.noreply.github.com> Date: Sun, 24 Sep 2023 19:36:22 +0200 Subject: [PATCH 3/3] updated version for pypi release #27 --- src/staticwordpress/core/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/staticwordpress/core/constants.py b/src/staticwordpress/core/constants.py index 4e795ed..15a369c 100644 --- a/src/staticwordpress/core/constants.py +++ b/src/staticwordpress/core/constants.py @@ -38,7 +38,7 @@ VERSION_MAJOR = 0 VERSION_MINOR = 0 -VERSION_REVISION = 2 +VERSION_REVISION = 3 VERISON = f"{VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_REVISION}" # -pre-alpha" SHARE_FOLDER_PATH = Path(