[geary/mjog/email-plugins: 53/61] Components.InfoBarStack: Use GObject style ctor
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/email-plugins: 53/61] Components.InfoBarStack: Use GObject style ctor
- Date: Mon, 30 Mar 2020 10:08:02 +0000 (UTC)
commit a7c06a3fc5eca4b46c2bb9221fbcc98d5e3f72ec
Author: Michael Gratton <mike vee net>
Date: Sun Mar 22 23:48:50 2020 +1100
Components.InfoBarStack: Use GObject style ctor
This makes it possible to use these widgets in GTK builder files.
src/client/application/application-main-window.vala | 8 +++++---
src/client/components/components-info-bar-stack.vala | 13 +++----------
2 files changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/src/client/application/application-main-window.vala
b/src/client/application/application-main-window.vala
index 373be3ea..cafb5e24 100644
--- a/src/client/application/application-main-window.vala
+++ b/src/client/application/application-main-window.vala
@@ -283,7 +283,7 @@ public class Application.MainWindow :
public ConversationViewer conversation_viewer { get; private set; }
public Components.InfoBarStack conversation_list_info_bars {
- get; private set; default = new Components.InfoBarStack.exclusive();
+ get; private set; default = new Components.InfoBarStack();
}
public StatusBar status_bar { get; private set; default = new StatusBar(); }
@@ -333,8 +333,7 @@ public class Application.MainWindow :
[GtkChild]
private Gtk.Overlay overlay;
- private Components.InfoBarStack info_bars =
- new Components.InfoBarStack.exclusive();
+ private Components.InfoBarStack info_bars = new Components.InfoBarStack();
private Gtk.InfoBar offline_infobar;
@@ -491,6 +490,9 @@ public class Application.MainWindow :
this.get_style_context().add_class("devel");
}
+ this.info_bars.shadow_type = IN;
+ this.conversation_list_info_bars.shadow_type = IN;
+
// Edit actions
this.edit_actions.add_action_entries(EDIT_ACTIONS, this);
insert_action_group(Action.Edit.GROUP_NAME, this.edit_actions);
diff --git a/src/client/components/components-info-bar-stack.vala
b/src/client/components/components-info-bar-stack.vala
index 3328418d..bd91fbf0 100644
--- a/src/client/components/components-info-bar-stack.vala
+++ b/src/client/components/components-info-bar-stack.vala
@@ -98,18 +98,11 @@ public class Components.InfoBarStack : Gtk.Frame, Geary.BaseInterface {
get { return get_child() as Gtk.InfoBar; }
}
- private Gee.Queue<Gtk.InfoBar> available;
+ private Gee.Queue<Gtk.InfoBar> available = new SingletonQueue();
- /**
- * Constructs a stack that shows the most recently added info bar.
- */
- public InfoBarStack.exclusive() {
- this.shadow_type = IN;
- this.visible = false;
- get_style_context().add_class("geary-info-bar-frame");
-
- this.available = new SingletonQueue();
+ construct {
+ get_style_context().add_class("geary-info-bar-stack");
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]