Use Vala's 'is' syntax instead of .get_type().name().
This commit is contained in:
parent
8b8f9b6f15
commit
592e75d484
|
@ -44,7 +44,7 @@ public class Main : Object {
|
||||||
foreach (var subdoc in doc) {
|
foreach (var subdoc in doc) {
|
||||||
stdout.printf ("%s\n", subdoc.get_type ().name ());
|
stdout.printf ("%s\n", subdoc.get_type ().name ());
|
||||||
|
|
||||||
if (subdoc.get_type ().name () == "LAviewTableLongtable") {
|
if (subdoc is Table.Longtable) {
|
||||||
var ltable = subdoc as Table.Longtable;
|
var ltable = subdoc as Table.Longtable;
|
||||||
|
|
||||||
if (args[3] == "rm0row") {
|
if (args[3] == "rm0row") {
|
||||||
|
@ -80,7 +80,7 @@ public class Main : Object {
|
||||||
stdout.printf ("Incorrect operation '%s' specified.\n", args[3]);
|
stdout.printf ("Incorrect operation '%s' specified.\n", args[3]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else if (subdoc.get_type ().name () == "LAviewTableTabular") {
|
} else if (subdoc is Table.Tabular) {
|
||||||
if (args[3] == "append_row0") {
|
if (args[3] == "append_row0") {
|
||||||
var tabular = subdoc as Table.Tabular;
|
var tabular = subdoc as Table.Tabular;
|
||||||
var table = tabular.table;
|
var table = tabular.table;
|
||||||
|
|
Loading…
Reference in New Issue