aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_content
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-05-14 14:45:59 +0200
committerfiaxh <git@lightrise.org>2022-07-27 20:34:20 +0200
commitf44cbe02c17df1f02ad49c63cd784fec0ea02d85 (patch)
tree4cab9b5f84d88769d19b0698e24b318f50b6144e /main/src/ui/conversation_content
parent2b3ce5fc95c63ed7d54e207db0585c8b8bbcd603 (diff)
downloaddino-f44cbe02c17df1f02ad49c63cd784fec0ea02d85.tar.gz
dino-f44cbe02c17df1f02ad49c63cd784fec0ea02d85.zip
Improve Gtk4 port
Diffstat (limited to 'main/src/ui/conversation_content')
-rw-r--r--main/src/ui/conversation_content/conversation_item_factory.vala36
1 files changed, 0 insertions, 36 deletions
diff --git a/main/src/ui/conversation_content/conversation_item_factory.vala b/main/src/ui/conversation_content/conversation_item_factory.vala
deleted file mode 100644
index 29a83785..00000000
--- a/main/src/ui/conversation_content/conversation_item_factory.vala
+++ /dev/null
@@ -1,36 +0,0 @@
-using Gtk;
-
-namespace Dino.Ui {
-
- public static ListItemFactory get_item_factory() {
- SignalListItemFactory item_factory = new SignalListItemFactory();
- item_factory.setup.connect((list_item) => { on_setup(list_item); });
- item_factory.bind.connect((list_item) => { on_bind(list_item); });
- return item_factory;
- }
-
- public static void on_setup(ListItem listitem) {
- listitem.child = new ConversationItemWidget();
- }
-
- public static void on_bind(ListItem listitem) {
- MessageViewModel view_model = (MessageViewModel) listitem.get_item();
- ConversationItemWidget view = (ConversationItemWidget) listitem.get_child();
-
- view_model.bind_property("name", view.name_label, "label", BindingFlags.SYNC_CREATE);
- view_model.bind_property("time", view.time_label, "label", BindingFlags.SYNC_CREATE);
-
- Label? label = view.content_widget as Label;
- if (label == null) {
- label = new Label("") { use_markup=true, xalign=0, selectable=true, wrap=true, wrap_mode=Pango.WrapMode.WORD_CHAR, hexpand=true, vexpand=true };
- view.set_content_widget(label);
- }
- view_model.bind_property("message", label, "label", BindingFlags.SYNC_CREATE);
-
- view_model.bind_property("encryption-icon-name", view.encrypted_image, "icon-name", BindingFlags.SYNC_CREATE);
- view_model.bind_property("encryption-icon-tooltip", view.encrypted_image, "tooltip-text", BindingFlags.SYNC_CREATE);
-
- view_model.bind_property("marked-icon-name", view.marked_image, "icon-name", BindingFlags.SYNC_CREATE);
- view_model.bind_property("marked-icon-tooltip", view.marked_image, "tooltip-text", BindingFlags.SYNC_CREATE);
- }
-} \ No newline at end of file