Fix some typos in variable names (#1016)

* Fix WelcomePlaceholder typo

* Fix DEFAULT_TABLE_NAME typo
This commit is contained in:
Sergey 2021-03-09 19:04:43 +03:00 committed by GitHub
parent 64237a83a4
commit f4eba18ff6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 29 deletions

View file

@ -13,7 +13,7 @@ public class MainWindow : Gtk.Window {
public new string? title { get; set; } public new string? title { get; set; }
public string? subtitle { get; set; } public string? subtitle { get; set; }
public WelcomePlceholder welcome_placeholder = new WelcomePlceholder() { visible=true }; public WelcomePlaceholder welcome_placeholder = new WelcomePlaceholder() { visible=true };
public NoAccountsPlaceholder accounts_placeholder = new NoAccountsPlaceholder() { visible=true }; public NoAccountsPlaceholder accounts_placeholder = new NoAccountsPlaceholder() { visible=true };
public ConversationView conversation_view; public ConversationView conversation_view;
public ConversationSelector conversation_selector; public ConversationSelector conversation_selector;
@ -193,8 +193,8 @@ public class MainWindow : Gtk.Window {
} }
} }
public class WelcomePlceholder : MainWindowPlaceholder { public class WelcomePlaceholder : MainWindowPlaceholder {
public WelcomePlceholder() { public WelcomePlaceholder() {
title_label.label = _("Welcome to Dino!"); title_label.label = _("Welcome to Dino!");
label.label = _("Sign in or create an account to get started."); label.label = _("Sign in or create an account to get started.");
primary_button.label = _("Set up account"); primary_button.label = _("Set up account");

View file

@ -3,7 +3,7 @@ using Sqlite;
namespace Qlite { namespace Qlite {
public abstract class Column<T> { public abstract class Column<T> {
public const string DEFALT_TABLE_NAME = ""; public const string DEFAULT_TABLE_NAME = "";
public string name { get; private set; } public string name { get; private set; }
public string? default { get; set; } public string? default { get; set; }
@ -16,9 +16,9 @@ public abstract class Column<T> {
public long max_version { get; set; default = long.MAX; } public long max_version { get; set; default = long.MAX; }
internal Table table { get; set; } internal Table table { get; set; }
public abstract T get(Row row, string? table_name = DEFALT_TABLE_NAME); public abstract T get(Row row, string? table_name = DEFAULT_TABLE_NAME);
public virtual bool is_null(Row row, string? table_name = DEFALT_TABLE_NAME) { public virtual bool is_null(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return false; return false;
} }
@ -65,12 +65,12 @@ public abstract class Column<T> {
base(name, INTEGER); base(name, INTEGER);
} }
public override int get(Row row, string? table_name = DEFALT_TABLE_NAME) { public override int get(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return (int) row.get_integer(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); return (int) row.get_integer(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name);
} }
public override bool is_null(Row row, string? table_name = DEFALT_TABLE_NAME) { public override bool is_null(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return !row.has_integer(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); return !row.has_integer(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name);
} }
internal override void bind(Statement stmt, int index, int value) { internal override void bind(Statement stmt, int index, int value) {
@ -83,12 +83,12 @@ public abstract class Column<T> {
base(name, INTEGER); base(name, INTEGER);
} }
public override long get(Row row, string? table_name = DEFALT_TABLE_NAME) { public override long get(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return (long) row.get_integer(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); return (long) row.get_integer(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name);
} }
public override bool is_null(Row row, string? table_name = DEFALT_TABLE_NAME) { public override bool is_null(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return !row.has_integer(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); return !row.has_integer(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name);
} }
internal override void bind(Statement stmt, int index, long value) { internal override void bind(Statement stmt, int index, long value) {
@ -103,12 +103,12 @@ public abstract class Column<T> {
public override bool not_null { get { return false; } set {} } public override bool not_null { get { return false; } set {} }
public override double? get(Row row, string? table_name = DEFALT_TABLE_NAME) { public override double? get(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return row.get_real(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); return row.get_real(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name);
} }
public override bool is_null(Row row, string? table_name = DEFALT_TABLE_NAME) { public override bool is_null(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return !row.has_real(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); return !row.has_real(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name);
} }
internal override void bind(Statement stmt, int index, double? value) { internal override void bind(Statement stmt, int index, double? value) {
@ -121,12 +121,12 @@ public abstract class Column<T> {
base(name, TEXT); base(name, TEXT);
} }
public override string? get(Row row, string? table_name = DEFALT_TABLE_NAME) { public override string? get(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return row.get_text(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); return row.get_text(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name);
} }
public override bool is_null(Row row, string? table_name = DEFALT_TABLE_NAME) { public override bool is_null(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return get(row, table_name == DEFALT_TABLE_NAME ? table.name : table_name) == null; return get(row, table_name == DEFAULT_TABLE_NAME ? table.name : table_name) == null;
} }
internal override void bind(Statement stmt, int index, string? value) { internal override void bind(Statement stmt, int index, string? value) {
@ -145,11 +145,11 @@ public abstract class Column<T> {
public override bool not_null { get { return true; } set {} } public override bool not_null { get { return true; } set {} }
public override string get(Row row, string? table_name = DEFALT_TABLE_NAME) { public override string get(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return (!)row.get_text(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name); return (!)row.get_text(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name);
} }
public override bool is_null(Row row, string? table_name = DEFALT_TABLE_NAME) { public override bool is_null(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return false; return false;
} }
@ -163,8 +163,8 @@ public abstract class Column<T> {
base(name, TEXT); base(name, TEXT);
} }
public override bool get(Row row, string? table_name = DEFALT_TABLE_NAME) { public override bool get(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return row.get_text(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name) == "1"; return row.get_text(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name) == "1";
} }
internal override void bind(Statement stmt, int index, bool value) { internal override void bind(Statement stmt, int index, bool value) {
@ -177,8 +177,8 @@ public abstract class Column<T> {
base(name, INTEGER); base(name, INTEGER);
} }
public override bool get(Row row, string? table_name = DEFALT_TABLE_NAME) { public override bool get(Row row, string? table_name = DEFAULT_TABLE_NAME) {
return row.get_integer(name, table_name == DEFALT_TABLE_NAME ? table.name : table_name) == 1; return row.get_integer(name, table_name == DEFAULT_TABLE_NAME ? table.name : table_name) == 1;
} }
internal override void bind(Statement stmt, int index, bool value) { internal override void bind(Statement stmt, int index, bool value) {