How do you cast a Double to an an Int in Vala?
How do you cast a Double to an an Int in Vala?
I'm working on Vattery, a battery meter for the systray, which is written in Vala. It seems that the Double class in Vala lacks a to_int() method, so to cast a double to an int I've been using Double.to_string().to_int(). Surely there's a better way? The Vala reference manual is woefully incomplete.
Maybe you can help me with another Vala problem.
When I compile with Vala I get this error:
The correct code for our version of Gtk is 'gtk_status_icon_set_tooltip'. I've been killing the build script halfway though so I can fix the generated C code, and then finishing the build by hand.
Is there a permanent way to fix this?
When I compile with Vala I get this error:
Code: Select all
/root/vattery/vattery-retro-jemimah-patches/main.vala:309: undefined reference to `gtk_status_icon_set_tooltip_text'
Is there a permanent way to fix this?
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
. . . for those wondering with valour 'bout Vala
http://puppylinux.org/wikka/ValaGenieintro
http://puppylinux.org/wikka/ValaGenieintro