Solve a few compiler warnings
This commit is contained in:
parent
3c819a19e1
commit
65a12021bc
|
@ -196,10 +196,15 @@ public class Database : Qlite.Database {
|
||||||
|
|
||||||
public override void migrate(long oldVersion) {
|
public override void migrate(long oldVersion) {
|
||||||
if(oldVersion == 1) {
|
if(oldVersion == 1) {
|
||||||
exec("DROP INDEX identity_meta_idx");
|
try {
|
||||||
exec("DROP INDEX identity_meta_list_idx");
|
exec("DROP INDEX identity_meta_idx");
|
||||||
exec("CREATE UNIQUE INDEX identity_meta_idx ON identity_meta (identity_id, address_name, device_id)");
|
exec("DROP INDEX identity_meta_list_idx");
|
||||||
exec("CREATE INDEX identity_meta_list_idx ON identity_meta (identity_id, address_name)");
|
exec("CREATE UNIQUE INDEX identity_meta_idx ON identity_meta (identity_id, address_name, device_id)");
|
||||||
|
exec("CREATE INDEX identity_meta_list_idx ON identity_meta (identity_id, address_name)");
|
||||||
|
} catch (Error e) {
|
||||||
|
stderr.printf("Failed to migrate OMEMO database\n");
|
||||||
|
Process.exit(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,16 +11,13 @@ public class ManageKeyDialog : Gtk.Dialog {
|
||||||
[GtkChild] private Button cancel_button;
|
[GtkChild] private Button cancel_button;
|
||||||
[GtkChild] private Button ok_button;
|
[GtkChild] private Button ok_button;
|
||||||
|
|
||||||
[GtkChild] private Box main_screen;
|
|
||||||
[GtkChild] private Label main_desc_label;
|
[GtkChild] private Label main_desc_label;
|
||||||
[GtkChild] private ListBox main_action_list;
|
[GtkChild] private ListBox main_action_list;
|
||||||
|
|
||||||
[GtkChild] private Box confirm_screen;
|
|
||||||
[GtkChild] private Image confirm_image;
|
[GtkChild] private Image confirm_image;
|
||||||
[GtkChild] private Label confirm_title_label;
|
[GtkChild] private Label confirm_title_label;
|
||||||
[GtkChild] private Label confirm_desc_label;
|
[GtkChild] private Label confirm_desc_label;
|
||||||
|
|
||||||
[GtkChild] private Box verify_screen;
|
|
||||||
[GtkChild] private Label verify_label;
|
[GtkChild] private Label verify_label;
|
||||||
[GtkChild] private Button verify_yes_button;
|
[GtkChild] private Button verify_yes_button;
|
||||||
[GtkChild] private Button verify_no_button;
|
[GtkChild] private Button verify_no_button;
|
||||||
|
@ -104,27 +101,6 @@ public class ManageKeyDialog : Gtk.Dialog {
|
||||||
return box;
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Box make_trust_screen(string icon_name, string title, string desc) {
|
|
||||||
Box box = new Box(Orientation.VERTICAL, 12) { margin = 12, spacing = 12 };
|
|
||||||
Image icon = new Image.from_icon_name(icon_name, IconSize.DIALOG) { visible = true };
|
|
||||||
box.add(icon);
|
|
||||||
Label lbl_title = new Label(title) { visible = true };
|
|
||||||
Label lbl_desc = new Label(desc) { visible = true, use_markup = true, max_width_chars = 1, wrap = true, justify = Justification.CENTER };
|
|
||||||
|
|
||||||
Pango.AttrList title_attrs = new Pango.AttrList();
|
|
||||||
title_attrs.insert(Pango.attr_scale_new(1.1));
|
|
||||||
lbl_title.attributes = title_attrs;
|
|
||||||
Pango.AttrList desc_attrs = new Pango.AttrList();
|
|
||||||
desc_attrs.insert(Pango.attr_scale_new(0.8));
|
|
||||||
lbl_desc.attributes = desc_attrs;
|
|
||||||
lbl_desc.get_style_context().add_class("dim-label");
|
|
||||||
|
|
||||||
box.add(lbl_title);
|
|
||||||
box.add(lbl_desc);
|
|
||||||
|
|
||||||
return box;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setup_main_screen() {
|
private void setup_main_screen() {
|
||||||
main_action_list.set_header_func((row, before_row) => {
|
main_action_list.set_header_func((row, before_row) => {
|
||||||
if (row.get_header() == null && before_row != null) {
|
if (row.get_header() == null && before_row != null) {
|
||||||
|
|
Loading…
Reference in a new issue