mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-22 11:12:49 +00:00
SNI: Fix pixmap
g_variant_iter_n_children apparently returns 1 instead of 3 (array = child, but I don't know). I inverted the statement, because for empty property, it hasn't any children.
This commit is contained in:
parent
15ed9bfc66
commit
383f25dbe1
1 changed files with 2 additions and 2 deletions
|
@ -90,7 +90,7 @@ namespace SNI
|
||||||
GVariantIter* arrIter = nullptr;
|
GVariantIter* arrIter = nullptr;
|
||||||
g_variant_get(arr, "a(iiay)", &arrIter);
|
g_variant_get(arr, "a(iiay)", &arrIter);
|
||||||
|
|
||||||
if (g_variant_iter_n_children(arrIter) == 3)
|
if (g_variant_iter_n_children(arrIter) != 0)
|
||||||
{
|
{
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
|
@ -125,10 +125,10 @@ namespace SNI
|
||||||
}
|
}
|
||||||
|
|
||||||
g_variant_iter_free(data);
|
g_variant_iter_free(data);
|
||||||
g_variant_iter_free(arrIter);
|
|
||||||
|
|
||||||
hasPixmap = true;
|
hasPixmap = true;
|
||||||
}
|
}
|
||||||
|
g_variant_iter_free(arrIter);
|
||||||
g_variant_unref(arr);
|
g_variant_unref(arr);
|
||||||
g_variant_unref(iconPixmap);
|
g_variant_unref(iconPixmap);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue