Fix cyclic reference
This commit is contained in:
parent
80c8e18cea
commit
a417cb396b
|
@ -32,13 +32,7 @@ public class ConversationItemSkeleton : EventBox {
|
||||||
this.get_style_context().add_class("message-box");
|
this.get_style_context().add_class("message-box");
|
||||||
|
|
||||||
item.bind_property("in-edit-mode", this, "item-in-edit-mode");
|
item.bind_property("in-edit-mode", this, "item-in-edit-mode");
|
||||||
this.notify["item-in-edit-mode"].connect(() => {
|
this.notify["item-in-edit-mode"].connect(update_edit_mode);
|
||||||
if (item.in_edit_mode) {
|
|
||||||
this.get_style_context().add_class("edit-mode");
|
|
||||||
} else {
|
|
||||||
this.get_style_context().remove_class("edit-mode");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
widget = item.get_widget(Plugins.WidgetType.GTK) as Widget;
|
widget = item.get_widget(Plugins.WidgetType.GTK) as Widget;
|
||||||
if (widget != null) {
|
if (widget != null) {
|
||||||
|
@ -94,6 +88,14 @@ public class ConversationItemSkeleton : EventBox {
|
||||||
image_content_box.margin_bottom = 4;
|
image_content_box.margin_bottom = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void update_edit_mode() {
|
||||||
|
if (item.in_edit_mode) {
|
||||||
|
this.get_style_context().add_class("edit-mode");
|
||||||
|
} else {
|
||||||
|
this.get_style_context().remove_class("edit-mode");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[GtkTemplate (ui = "/im/dino/Dino/conversation_content_view/item_metadata_header.ui")]
|
[GtkTemplate (ui = "/im/dino/Dino/conversation_content_view/item_metadata_header.ui")]
|
||||||
|
|
Loading…
Reference in a new issue