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

Fix misc null and deprecation build warnings

See merge request GNOME/geary!337
This commit is contained in:
Michael Gratton 2019-10-10 20:51:58 +00:00
commit a0977b8525
4 changed files with 14 additions and 27 deletions

View file

@ -35,10 +35,16 @@ public class Application.PluginManager : GLib.Object {
"context", this.notifications
);
this.notification_extensions.extension_added.connect((info, extension) => {
(extension as Plugin.Notification).activate();
Plugin.Notification? plugin = extension as Plugin.Notification;
if (plugin != null) {
plugin.activate();
}
});
this.notification_extensions.extension_removed.connect((info, extension) => {
(extension as Plugin.Notification).deactivate(this.is_shutdown);
Plugin.Notification? plugin = extension as Plugin.Notification;
if (plugin != null) {
plugin.deactivate(this.is_shutdown);
}
});
// Load built-in plugins by default

View file

@ -250,9 +250,6 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
private string body_html = "";
[GtkChild]
private Gtk.Box composer_container;
[GtkChild]
internal Gtk.Grid editor_container;
@ -307,9 +304,6 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
[GtkChild]
private Gtk.Box header_area;
[GtkChild]
private Gtk.Box composer_toolbar;
[GtkChild]
private Gtk.Box insert_buttons;
[GtkChild]
private Gtk.Box font_style_buttons;
@ -326,9 +320,6 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
[GtkChild]
private Gtk.Label info_label;
[GtkChild]
private Gtk.Box message_area;
private SimpleActionGroup composer_actions = new SimpleActionGroup();
private SimpleActionGroup editor_actions = new SimpleActionGroup();
@ -539,16 +530,6 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
this.editor.mouse_target_changed.connect(on_mouse_target_changed);
this.editor.selection_changed.connect(on_selection_changed);
// Place the message area before the compose toolbar in the focus chain, so that
// the user can tab directly from the Subject: field to the message area.
// TODO: after bumping the min. GTK+ version to 3.16, we can/should do this in the UI file.
List<Gtk.Widget> chain = new List<Gtk.Widget>();
chain.append(this.hidden_on_attachment_drag_over);
chain.append(this.message_area);
chain.append(this.composer_toolbar);
chain.append(this.attachments_box);
this.composer_container.set_focus_chain(chain);
update_composer_view();
load_entry_completions();
}

View file

@ -83,7 +83,7 @@ public class ConversationListView : Gtk.TreeView, Geary.BaseInterface {
}
public new ConversationListStore? get_model() {
return (this as Gtk.TreeView).get_model() as ConversationListStore;
return base.get_model() as ConversationListStore;
}
public new void set_model(ConversationListStore? new_store) {
@ -117,7 +117,7 @@ public class ConversationListView : Gtk.TreeView, Geary.BaseInterface {
// fire selection signals while changing the model.
Gtk.TreeSelection selection = get_selection();
selection.changed.disconnect(on_selection_changed);
(this as Gtk.TreeView).set_model(new_store);
base.set_model(new_store);
this.selected.clear();
selection.changed.connect(on_selection_changed);
}

View file

@ -128,11 +128,11 @@ namespace Migrate {
if (oldSettingsSchema != null) {
Settings oldSettings = new Settings.full(oldSettingsSchema, null, null);
string[] oldKeys = oldSettings.list_keys();
foreach (string key in newSettings.list_keys())
if (key in oldKeys)
foreach (string key in newSettings.settings_schema.list_keys()) {
if (oldSettingsSchema.has_key(key)) {
newSettings.set_value(key, oldSettings.get_value(key));
}
}
}
newSettings.set_boolean(MIGRATED_CONFIG_KEY, true);