Skip to content

Commit

Permalink
Tweak image insert window language
Browse files Browse the repository at this point in the history
  • Loading branch information
Wemmy0 committed Feb 12, 2024
1 parent b29ba19 commit 9d762b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions src/ImageInsert.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@ def __init__(self, url_source, file_source, wikimedia_source, web_source, cache_
self.page.add(self.group)

# region source
self.select_source_row = Adw.ActionRow(title="Select Image Source",
subtitle="Please choose where the image is located")
self.source_dropdown = Gtk.ComboBoxText(valign=Gtk.Align.CENTER)

if url_source: self.source_dropdown.append_text("URL")
if file_source: self.source_dropdown.append_text("Local File")
if wikimedia_source: self.source_dropdown.append_text("Wikimedia")
if web_source: self.source_dropdown.append_text("Web Embed")
self.select_source_row = Adw.ActionRow(title="Image Source",
subtitle="The source of the image")
self.source_dropdown = Gtk.ComboBoxText(valign=Gtk.Align.CENTER, )

if url_source:
self.source_dropdown.append_text("URL")
if file_source:
self.source_dropdown.append_text("Local File")
if wikimedia_source:
self.source_dropdown.append_text("Wikimedia")
if web_source:
self.source_dropdown.append_text("Web Embed")

self.source_dropdown.connect('changed', self.select_source)
self.select_source_row.add_suffix(self.source_dropdown)
self.group.add(self.select_source_row)
# endregion

# region URL Entry
self.url_row = Adw.ActionRow(title="URL of the file",
self.url_row = Adw.ActionRow(title="URL location",
visible=False)
self.url_entry = Gtk.Entry(placeholder_text="http://example.com/image.png",
self.url_entry = Gtk.Entry(placeholder_text="https://example.com/image.png",
valign=Gtk.Align.CENTER)
self.url_row.add_suffix(self.url_entry)
self.group.add(self.url_row)
Expand Down
2 changes: 1 addition & 1 deletion src/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, config, verbose):
self.disabled = False
except mysql.connector.errors.DatabaseError as err:
print(err)
print(f"❌ Unable to reach {config['username']}@{config['database']}, sync disabled")
print(f"❌ Unable to reach {config['username']}@{config['host']}, sync disabled")
self.disabled = True
return
self.cursor = self.connection.cursor()
Expand Down

0 comments on commit 9d762b0

Please sign in to comment.