Commit a102c269 authored by Michael Gratton's avatar Michael Gratton
Browse files

Merge branch 'mjog/fix-build-warnings' into 'mainline'

Fix build warnings

See merge request GNOME/geary!659
parents c4bd8c2b 72499c18
......@@ -35,38 +35,27 @@ internal class Accounts.EditorAddPane : Gtk.Grid, EditorPane {
private Geary.Engine engine;
[GtkChild]
private Gtk.HeaderBar header;
[GtkChild] private unowned Gtk.HeaderBar header;
[GtkChild]
private Gtk.Grid pane_content;
[GtkChild] private unowned Gtk.Grid pane_content;
[GtkChild]
private Gtk.Adjustment pane_adjustment;
[GtkChild] private unowned Gtk.Adjustment pane_adjustment;
[GtkChild]
private Gtk.ListBox details_list;
[GtkChild] private unowned Gtk.ListBox details_list;
[GtkChild]
private Gtk.Grid receiving_panel;
[GtkChild] private unowned Gtk.Grid receiving_panel;
[GtkChild]
private Gtk.ListBox receiving_list;
[GtkChild] private unowned Gtk.ListBox receiving_list;
[GtkChild]
private Gtk.Grid sending_panel;
[GtkChild] private unowned Gtk.Grid sending_panel;
[GtkChild]
private Gtk.ListBox sending_list;
[GtkChild] private unowned Gtk.ListBox sending_list;
[GtkChild]
private Gtk.Button create_button;
[GtkChild] private unowned Gtk.Button create_button;
[GtkChild]
private Gtk.Button back_button;
[GtkChild] private unowned Gtk.Button back_button;
[GtkChild]
private Gtk.Spinner create_spinner;
[GtkChild] private unowned Gtk.Spinner create_spinner;
private NameRow real_name;
private EmailRow email = new EmailRow();
......
......@@ -37,35 +37,26 @@ internal class Accounts.EditorEditPane :
/** {@inheritDoc} */
protected weak Accounts.Editor editor { get; set; }
[GtkChild]
private Gtk.HeaderBar header;
[GtkChild] private unowned Gtk.HeaderBar header;
[GtkChild]
private Gtk.Grid pane_content;
[GtkChild] private unowned Gtk.Grid pane_content;
[GtkChild]
private Gtk.Adjustment pane_adjustment;
[GtkChild] private unowned Gtk.Adjustment pane_adjustment;
[GtkChild]
private Gtk.ListBox details_list;
[GtkChild] private unowned Gtk.ListBox details_list;
[GtkChild]
private Gtk.ListBox senders_list;
[GtkChild] private unowned Gtk.ListBox senders_list;
[GtkChild]
private Gtk.Frame signature_frame;
[GtkChild] private unowned Gtk.Frame signature_frame;
private SignatureWebView signature_preview;
private bool signature_changed = false;
[GtkChild]
private Gtk.ListBox settings_list;
[GtkChild] private unowned Gtk.ListBox settings_list;
[GtkChild]
private Gtk.Button undo_button;
[GtkChild] private unowned Gtk.Button undo_button;
[GtkChild]
private Gtk.Button remove_button;
[GtkChild] private unowned Gtk.Button remove_button;
public EditorEditPane(Editor editor, Geary.AccountInformation account) {
......
......@@ -59,32 +59,23 @@ internal class Accounts.EditorListPane : Gtk.Grid, EditorPane, CommandPane {
}
}
[GtkChild]
private Gtk.HeaderBar header;
[GtkChild] private unowned Gtk.HeaderBar header;
[GtkChild]
private Gtk.Grid pane_content;
[GtkChild] private unowned Gtk.Grid pane_content;
[GtkChild]
private Gtk.Adjustment pane_adjustment;
[GtkChild] private unowned Gtk.Adjustment pane_adjustment;
[GtkChild]
private Gtk.Grid welcome_panel;
[GtkChild] private unowned Gtk.Grid welcome_panel;
[GtkChild]
private Gtk.Image welcome_icon;
[GtkChild] private unowned Gtk.Image welcome_icon;
[GtkChild]
private Gtk.ListBox accounts_list;
[GtkChild] private unowned Gtk.ListBox accounts_list;
[GtkChild]
private Gtk.Frame accounts_list_frame;
[GtkChild] private unowned Gtk.Frame accounts_list_frame;
[GtkChild]
private Gtk.Label add_service_label;
[GtkChild] private unowned Gtk.Label add_service_label;
[GtkChild]
private Gtk.ListBox service_list;
[GtkChild] private unowned Gtk.ListBox service_list;
private Gee.Map<Geary.AccountInformation,EditorEditPane> edit_pane_cache =
new Gee.HashMap<Geary.AccountInformation,EditorEditPane>();
......
......@@ -52,29 +52,21 @@ internal class Accounts.EditorServersPane :
new Gee.LinkedList<Components.Validator>();
[GtkChild]
private Gtk.HeaderBar header;
[GtkChild] private unowned Gtk.HeaderBar header;
[GtkChild]
private Gtk.Grid pane_content;
[GtkChild] private unowned Gtk.Grid pane_content;
[GtkChild]
private Gtk.Adjustment pane_adjustment;
[GtkChild] private unowned Gtk.Adjustment pane_adjustment;
[GtkChild]
private Gtk.ListBox details_list;
[GtkChild] private unowned Gtk.ListBox details_list;
[GtkChild]
private Gtk.ListBox receiving_list;
[GtkChild] private unowned Gtk.ListBox receiving_list;
[GtkChild]
private Gtk.ListBox sending_list;
[GtkChild] private unowned Gtk.ListBox sending_list;
[GtkChild]
private Gtk.Button apply_button;
[GtkChild] private unowned Gtk.Button apply_button;
[GtkChild]
private Gtk.Spinner apply_spinner;
[GtkChild] private unowned Gtk.Spinner apply_spinner;
private SaveDraftsRow save_drafts;
private SaveSentRow save_sent;
......
......@@ -48,11 +48,9 @@ public class Accounts.Editor : Gtk.Dialog {
private GLib.SimpleActionGroup edit_actions = new GLib.SimpleActionGroup();
[GtkChild]
private Gtk.Overlay notifications_pane;
[GtkChild] private unowned Gtk.Overlay notifications_pane;
[GtkChild]
private Gtk.Stack editor_panes;
[GtkChild] private unowned Gtk.Stack editor_panes;
private EditorListPane editor_list_pane;
......
......@@ -195,7 +195,7 @@ internal class Application.Controller :
// Commit e8061379 mistakenly used config_dir for cert manager
// above, so remove it if found. This can be pulled out post
// v40.
Geary.Files.recursive_delete_async(
yield Geary.Files.recursive_delete_async(
config_dir.get_child("pinned-certs")
);
......
......@@ -329,41 +329,24 @@ public class Application.MainWindow :
private int64 update_ui_last = 0;
[GtkChild]
private Gtk.Box main_layout;
[GtkChild]
private Hdy.Leaflet main_leaflet;
[GtkChild]
private Hdy.Leaflet conversations_leaflet;
[GtkChild]
private Gtk.Box folder_box;
[GtkChild]
private Gtk.ScrolledWindow folder_list_scrolled;
[GtkChild]
private Gtk.Box conversation_list_box;
[GtkChild]
private Gtk.ScrolledWindow conversation_list_scrolled;
[GtkChild]
private Gtk.Box conversation_viewer_box;
[GtkChild]
private Components.ConversationActionBar conversation_viewer_action_bar;
[GtkChild]
private Gtk.SizeGroup folder_size_group;
[GtkChild]
private Gtk.SizeGroup folder_separator_size_group;
[GtkChild]
private Gtk.SizeGroup conversations_size_group;
[GtkChild]
private Gtk.SizeGroup conversations_separator_size_group;
[GtkChild]
private Gtk.SizeGroup conversation_size_group;
[GtkChild]
private Hdy.SwipeGroup conversations_swipe_group;
[GtkChild]
private Hdy.SwipeGroup conversation_swipe_group;
[GtkChild]
private Gtk.Overlay overlay;
[GtkChild] private unowned Gtk.Box main_layout;
[GtkChild] private unowned Hdy.Leaflet main_leaflet;
[GtkChild] private unowned Hdy.Leaflet conversations_leaflet;
[GtkChild] private unowned Gtk.Box folder_box;
[GtkChild] private unowned Gtk.ScrolledWindow folder_list_scrolled;
[GtkChild] private unowned Gtk.Box conversation_list_box;
[GtkChild] private unowned Gtk.ScrolledWindow conversation_list_scrolled;
[GtkChild] private unowned Gtk.Box conversation_viewer_box;
[GtkChild] private unowned Components.ConversationActionBar conversation_viewer_action_bar;
[GtkChild] private unowned Gtk.SizeGroup folder_size_group;
[GtkChild] private unowned Gtk.SizeGroup folder_separator_size_group;
[GtkChild] private unowned Gtk.SizeGroup conversations_size_group;
[GtkChild] private unowned Gtk.SizeGroup conversations_separator_size_group;
[GtkChild] private unowned Gtk.SizeGroup conversation_size_group;
[GtkChild] private unowned Hdy.SwipeGroup conversations_swipe_group;
[GtkChild] private unowned Hdy.SwipeGroup conversation_swipe_group;
[GtkChild] private unowned Gtk.Overlay overlay;
private Components.ConversationActionBar action_bar;
......
......@@ -64,14 +64,11 @@ public class Components.AttachmentPane : Gtk.Grid {
public Geary.Attachment attachment { get; private set; }
[GtkChild]
private Gtk.Image icon;
[GtkChild] private unowned Gtk.Image icon;
[GtkChild]
private Gtk.Label filename;
[GtkChild] private unowned Gtk.Label filename;
[GtkChild]
private Gtk.Label description;
[GtkChild] private unowned Gtk.Label description;
private string gio_content_type;
......@@ -208,14 +205,11 @@ public class Components.AttachmentPane : Gtk.Grid {
private GLib.SimpleActionGroup actions = new GLib.SimpleActionGroup();
[GtkChild]
private Gtk.Grid attachments_container;
[GtkChild] private unowned Gtk.Grid attachments_container;
[GtkChild]
private Gtk.Button save_button;
[GtkChild] private unowned Gtk.Button save_button;
[GtkChild]
private Gtk.Button remove_button;
[GtkChild] private unowned Gtk.Button remove_button;
private FlowBox attachments_view;
......
......@@ -9,13 +9,12 @@
// Draws the conversation action bar.
[GtkTemplate (ui = "/org/gnome/Geary/components-conversation-action-bar.ui")]
public class Components.ConversationActionBar : Gtk.Revealer {
private ulong owner_notify;
[GtkChild]
public Gtk.Box action_box;
public ConversationActionBar() {
}
[GtkChild] public unowned Gtk.Box action_box { get; }
private ulong owner_notify;
/**
* This takes ownership of the ConversationActions and places some of
......
......@@ -15,11 +15,9 @@ public class Components.InAppNotification : Gtk.Revealer {
/** Default length of time to show the notification. */
public const uint DEFAULT_DURATION = 5;
[GtkChild]
private Gtk.Label message_label;
[GtkChild] private unowned Gtk.Label message_label;
[GtkChild]
private Gtk.Button action_button;
[GtkChild] private unowned Gtk.Button action_button;
private uint duration;
......
......@@ -42,17 +42,13 @@ public class Components.InfoBar : Gtk.Box {
private string? plugin_action_group_name = null;
private Gtk.Button? plugin_primary_button = null;
[GtkChild]
private Gtk.Revealer revealer;
[GtkChild] private unowned Gtk.Revealer revealer;
[GtkChild]
private Gtk.Box action_area;
[GtkChild] private unowned Gtk.Box action_area;
[GtkChild]
private Gtk.Box content_area;
[GtkChild] private unowned Gtk.Box content_area;
[GtkChild]
private Gtk.Button close_button;
[GtkChild] private unowned Gtk.Button close_button;
static construct {
set_css_name("infobar");
......
......@@ -12,8 +12,7 @@
public class Components.InspectorErrorView : Gtk.Grid {
[GtkChild]
private Gtk.TextView problem_text;
[GtkChild] private unowned Gtk.TextView problem_text;
private Geary.ErrorContext error;
private Geary.AccountInformation? account;
......
......@@ -65,23 +65,17 @@ public class Components.InspectorLogView : Gtk.Grid {
set { this.search_bar.search_mode_enabled = value; }
}
[GtkChild]
private Hdy.SearchBar search_bar;
[GtkChild] private unowned Hdy.SearchBar search_bar;
[GtkChild]
private Gtk.SearchEntry search_entry;
[GtkChild] private unowned Gtk.SearchEntry search_entry;
[GtkChild]
private Gtk.ListBox sidebar;
[GtkChild] private unowned Gtk.ListBox sidebar;
[GtkChild]
private Gtk.ScrolledWindow logs_scroller;
[GtkChild] private unowned Gtk.ScrolledWindow logs_scroller;
[GtkChild]
private Gtk.TreeView logs_view;
[GtkChild] private unowned Gtk.TreeView logs_view;
[GtkChild]
private Gtk.CellRendererText log_renderer;
[GtkChild] private unowned Gtk.CellRendererText log_renderer;
private Gtk.ListStore logs_store = new Gtk.ListStore.newv({
typeof(string),
......
......@@ -57,8 +57,7 @@ public class Components.InspectorSystemView : Gtk.Grid {
}
[GtkChild]
private Gtk.ListBox system_list;
[GtkChild] private unowned Gtk.ListBox system_list;
private Gee.Collection<Application.Client.RuntimeDetail?> details;
......
......@@ -48,26 +48,19 @@ public class Components.Inspector : Gtk.ApplicationWindow {
}
[GtkChild]
private Gtk.HeaderBar header_bar;
[GtkChild] private unowned Gtk.HeaderBar header_bar;
[GtkChild]
private Gtk.Stack stack;
[GtkChild] private unowned Gtk.Stack stack;
[GtkChild]
private Gtk.Button copy_button;
[GtkChild] private unowned Gtk.Button copy_button;
[GtkChild]
private Gtk.ToggleButton play_button;
[GtkChild] private unowned Gtk.ToggleButton play_button;
[GtkChild]
private Gtk.Button mark_button;
[GtkChild] private unowned Gtk.Button mark_button;
[GtkChild]
private Gtk.ToggleButton search_button;
[GtkChild] private unowned Gtk.ToggleButton search_button;
[GtkChild]
private Gtk.Button clear_button;
[GtkChild] private unowned Gtk.Button clear_button;
private InspectorLogView log_pane;
private InspectorSystemView system_pane;
......
......@@ -39,14 +39,11 @@ public class Components.PlaceholderPane : Gtk.Grid {
}
}
[GtkChild]
private Gtk.Image placeholder_image;
[GtkChild] private unowned Gtk.Image placeholder_image;
[GtkChild]
private Gtk.Label title_label;
[GtkChild] private unowned Gtk.Label title_label;
[GtkChild]
private Gtk.Label subtitle_label;
[GtkChild] private unowned Gtk.Label subtitle_label;
private void update() {
......
......@@ -7,10 +7,8 @@
[GtkTemplate (ui = "/org/gnome/Geary/folder-popover.ui")]
public class FolderPopover : Gtk.Popover {
[GtkChild]
private Gtk.SearchEntry search_entry;
[GtkChild]
private Gtk.ListBox list_box;
[GtkChild] private unowned Gtk.SearchEntry search_entry;
[GtkChild] private unowned Gtk.ListBox list_box;
private int filtered_folder_count = 0;
......
......@@ -19,33 +19,24 @@ public class MainToolbar : Hdy.Leaflet {
private Components.ConversationActionBar conversation_viewer_action_bar;
[GtkChild]
private Hdy.Leaflet conversations_leaflet;
[GtkChild] private unowned Hdy.Leaflet conversations_leaflet;
// Folder header elements
[GtkChild]
private Hdy.HeaderBar folder_header;
[GtkChild]
private Gtk.MenuButton main_menu_button;
[GtkChild] private unowned Hdy.HeaderBar folder_header;
[GtkChild] private unowned Gtk.MenuButton main_menu_button;
[GtkChild]
private Gtk.Separator folder_separator;
[GtkChild] private unowned Gtk.Separator folder_separator;
// Conversations header elements
[GtkChild]
private Hdy.HeaderBar conversations_header;
[GtkChild]
private Gtk.ToggleButton search_conversations_button;
[GtkChild] private unowned Hdy.HeaderBar conversations_header;
[GtkChild] private unowned Gtk.ToggleButton search_conversations_button;
[GtkChild]
private Gtk.Separator conversations_separator;
[GtkChild] private unowned Gtk.Separator conversations_separator;
// Conversation header elements
[GtkChild]
private Components.ConversationHeaderBar conversation_header;
[GtkChild] private unowned Components.ConversationHeaderBar conversation_header;
[GtkChild]
private Hdy.HeaderGroup header_group;
[GtkChild] private unowned Hdy.HeaderGroup header_group;
Gtk.SizeGroup conversation_group;
......
......@@ -107,8 +107,8 @@ public class Composer.Editor : Gtk.Grid, Geary.BaseInterface {
internal GLib.SimpleActionGroup actions = new GLib.SimpleActionGroup();
[GtkChild] internal Gtk.Button new_message_attach_button;
[GtkChild] internal Gtk.Box conversation_attach_buttons;
[GtkChild] internal unowned Gtk.Button new_message_attach_button;
[GtkChild] internal unowned Gtk.Box conversation_attach_buttons;
private Application.Configuration config;
......@@ -127,25 +127,25 @@ public class Composer.Editor : Gtk.Grid, Geary.BaseInterface {
private Menu context_menu_webkit_text_entry;
private Menu context_menu_inspector;
[GtkChild] private Gtk.Grid body_container;
[GtkChild] private unowned Gtk.Grid body_container;
[GtkChild] private Gtk.Label message_overlay_label;
[GtkChild] private unowned Gtk.Label message_overlay_label;
[GtkChild] private Gtk.Box action_bar_box;
[GtkChild] private unowned Gtk.Box action_bar_box;
[GtkChild] private Gtk.Button insert_link_button;
[GtkChild] private Gtk.MenuButton select_dictionary_button;
[GtkChild] private unowned Gtk.Button insert_link_button;
[GtkChild] private unowned Gtk.MenuButton select_dictionary_button;
[GtkChild] private Gtk.Label info_label;
[GtkChild] private unowned Gtk.Label info_label;
[GtkChild] private Gtk.ProgressBar background_progress;
[GtkChild] private unowned Gtk.ProgressBar background_progress;
[GtkChild] private Gtk.Revealer formatting;
[GtkChild] private Gtk.MenuButton font_button;
[GtkChild] private Gtk.Stack font_button_stack;
[GtkChild] private Gtk.MenuButton font_size_button;
[GtkChild] private Gtk.Image font_color_icon;
[GtkChild] private Gtk.MenuButton more_options_button;
[GtkChild] private unowned Gtk.Revealer formatting;
[GtkChild] private unowned Gtk.MenuButton font_button;
[GtkChild] private unowned Gtk.Stack font_button_stack;
[GtkChild] private unowned Gtk.MenuButton font_size_button;
[GtkChild] private unowned Gtk.Image font_color_icon;
[GtkChild] private unowned Gtk.MenuButton more_options_button;
internal signal void insert_image(bool from_clipboard);
......
......@@ -22,19 +22,13 @@ public class Composer.Headerbar : Gtk.HeaderBar {
private bool is_attached = true;
[GtkChild]
private Gtk.Box detach_start;
[GtkChild]
private Gtk.Box detach_end;
[GtkChild]
private Gtk.Button recipients_button;
[GtkChild]
private Gtk.Label recipients_label;
[GtkChild]
private Gtk.Button save_and_close_button;
[GtkChild]
private Gtk.Button send_button;