diff options
author | fiaxh <git@lightrise.org> | 2019-01-27 15:24:58 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-02-05 11:50:23 -0600 |
commit | 5a7ffbc1870aeee52fed3c457817010b608e1e52 (patch) | |
tree | 9c035688c99e8c593abf263fa8e3e805f2b14b66 /main/src/ui/conversation_titlebar/view_csd.vala | |
parent | 084653cfc2986cd52ffd42b347f63ca3391e6ece (diff) | |
download | dino-5a7ffbc1870aeee52fed3c457817010b608e1e52.tar.gz dino-5a7ffbc1870aeee52fed3c457817010b608e1e52.zip |
Move app menu into window, make conversation details dialog directly accessible, no-CSD option for main window
Diffstat (limited to 'main/src/ui/conversation_titlebar/view_csd.vala')
-rw-r--r-- | main/src/ui/conversation_titlebar/view_csd.vala | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/main/src/ui/conversation_titlebar/view_csd.vala b/main/src/ui/conversation_titlebar/view_csd.vala new file mode 100644 index 00000000..83a1a474 --- /dev/null +++ b/main/src/ui/conversation_titlebar/view_csd.vala @@ -0,0 +1,38 @@ +using Gtk; +using Gee; + +using Dino.Entities; + +namespace Dino.Ui { + +public class ConversationTitlebarCsd : Gtk.HeaderBar { + + private StreamInteractor stream_interactor; + private Window window; + private Conversation? conversation; + + public ConversationTitlebarCsd(StreamInteractor stream_interactor, Window window) { + this.stream_interactor = stream_interactor; + this.window = window; + + this.get_style_context().add_class("dino-right"); + show_close_button = true; + hexpand = true; + + Application app = GLib.Application.get_default() as Application; + ArrayList<Plugins.ConversationTitlebarWidget> widgets = new ArrayList<Plugins.ConversationTitlebarWidget>(); + foreach(var e in app.plugin_registry.conversation_titlebar_entries) { + Plugins.ConversationTitlebarWidget widget = e.get_widget(Plugins.WidgetType.GTK); + if (widget != null) { + widgets.insert(0, widget); + } + } + foreach (var w in widgets) { + Button gtk_widget = (Gtk.Button)w; + gtk_widget.relief = ReliefStyle.NONE; + this.pack_end(gtk_widget); + } + } +} + +} |