Skip to content

Commit

Permalink
Merge pull request #34 from seowings/main
Browse files Browse the repository at this point in the history
GUI Improvements
  • Loading branch information
seowings authored Sep 24, 2023
2 parents a034d5a + ba5f370 commit 53e2480
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 16 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
long_description_content_type="text/markdown",
author="Faisal Shahzad",
author_email="[email protected]",
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=[
Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
14 changes: 8 additions & 6 deletions src/staticwordpress/gui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@

from ..core.constants import (
LANGUAGES,
HOST,
REDIRECTS,
USER_AGENT,
CONFIGS,
Expand Down Expand Up @@ -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"))

Expand Down
2 changes: 1 addition & 1 deletion src/staticwordpress/gui/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def about(self):
msgBox.setText(
f"Copyright {date.today().year} - SERP Wings"
f"<br><br>{CONFIGS['APPLICATION_NAME']} Version - {VERISON}"
"<br><br>This work is an opensource project under GNU General Public License v3 or later (GPLv3+)"
"<br><br>This work is an opensource project under <br>GNU General Public License v3 or later (GPLv3+)"
f"<br>More Information at <a href='https://{CONFIGS['ORGANIZATION_DOMAIN']}/'>{CONFIGS['ORGANIZATION_NAME']}</a>"
)
msgBox.setWindowIcon(QIcon(f"{SHARE_FOLDER_PATH}/icons/static-wordpress.svg"))
Expand Down
12 changes: 8 additions & 4 deletions src/staticwordpress/gui/rawtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions src/staticwordpress/share/icons/cancel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/staticwordpress/share/icons/ok.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions src/staticwordpress/share/icons/static-wordpress.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 53e2480

Please sign in to comment.