summaryrefslogtreecommitdiff
path: root/src/components/chatinput.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-12-15 01:16:11 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2023-12-15 01:16:11 -0500
commit4bce7b7523caa26023b1a2f5e02e6646ed29f5e0 (patch)
tree1c029a16d83ba64209511fd05b9276251821e051 /src/components/chatinput.hpp
parent23bf237e4e7dd008df8ff32da31878d1b990f5bf (diff)
downloadabaddon-portaudio-4bce7b7523caa26023b1a2f5e02e6646ed29f5e0.tar.gz
abaddon-portaudio-4bce7b7523caa26023b1a2f5e02e6646ed29f5e0.zip
add ability to set image alt text (closes #253)
Diffstat (limited to 'src/components/chatinput.hpp')
-rw-r--r--src/components/chatinput.hpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/components/chatinput.hpp b/src/components/chatinput.hpp
index a3c9742..be8c141 100644
--- a/src/components/chatinput.hpp
+++ b/src/components/chatinput.hpp
@@ -7,10 +7,13 @@ public:
ChatInputAttachmentItem(const Glib::RefPtr<Gio::File> &file);
ChatInputAttachmentItem(const Glib::RefPtr<Gio::File> &file, const Glib::RefPtr<Gdk::Pixbuf> &pb, bool is_extant = false);
- [[nodiscard]] Glib::RefPtr<Gio::File> GetFile() const;
- [[nodiscard]] ChatSubmitParams::AttachmentType GetType() const;
- [[nodiscard]] std::string GetFilename() const;
- [[nodiscard]] bool IsTemp() const noexcept;
+ Glib::RefPtr<Gio::File> GetFile() const;
+ ChatSubmitParams::AttachmentType GetType() const;
+ std::string GetFilename() const;
+ std::optional<std::string> GetDescription() const;
+ bool IsTemp() const noexcept;
+ bool IsImage() const noexcept;
+
void RemoveIfTemp();
private:
@@ -21,6 +24,7 @@ private:
Gtk::Menu m_menu;
Gtk::MenuItem m_menu_remove;
Gtk::MenuItem m_menu_set_filename;
+ Gtk::MenuItem m_menu_set_alt_text;
Gtk::Box m_box;
Gtk::Label m_label;
@@ -29,6 +33,8 @@ private:
Glib::RefPtr<Gio::File> m_file;
ChatSubmitParams::AttachmentType m_type;
std::string m_filename;
+ std::string m_description;
+ bool m_is_image = false;
private:
using type_signal_item_removed = sigc::signal<void>;