Use Vala's 'is' syntax instead of .get_type().name().

This commit is contained in:
Kolan Sh 2014-07-23 18:18:46 +04:00
parent 8b8f9b6f15
commit 592e75d484
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ public class Main : Object {
foreach (var subdoc in doc) {
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;
if (args[3] == "rm0row") {
@ -80,7 +80,7 @@ public class Main : Object {
stdout.printf ("Incorrect operation '%s' specified.\n", args[3]);
return -1;
}
} else if (subdoc.get_type ().name () == "LAviewTableTabular") {
} else if (subdoc is Table.Tabular) {
if (args[3] == "append_row0") {
var tabular = subdoc as Table.Tabular;
var table = tabular.table;