Questions tagged [vala]

Vala is an object-oriented programming language that allows modern programming techniques to be used to write applications that run on the GNOME runtime libraries, particularly GLib and GObject. Vala is syntactically similar to C#, and is compiled to C which is then compiled to a native binary using the C compiler of the platform.

Vala is an object-oriented programming language that allows modern programming techniques to be used to write applications that run on the runtime libraries, particularly and . Vala is syntactically similar to , and is compiled to which is then compiled to a native binary using the C compiler of the platform.

Some Linux distributions adopt, officially, Vala as the main development applications' language such as , as noted in the get started guide for developers.

#Useful links

997 questions
10
votes
1 answer

Vala different type of constructors

Why, and what does the three vala constructors ? class construct construct method with class name and more specific, why the 3rd construct is never called when using it from a Gtk.Builder file?
Victor Aurélio
  • 2,355
  • 2
  • 24
  • 48
10
votes
4 answers

Is there a terminal tool to automatically generate autoconf/automake makefiles for a Vala project?

I am trying to create a Vala project to see how i like developing with the language as a possible replacement for Mono. I think that the automake stuff can be used to generate a project template with all the necessary files (sans my .vala code). Any…
Ronaldo Nascimento
  • 1,571
  • 3
  • 21
  • 40
9
votes
2 answers

Shrink window in GTK+ dynamically when content shrinks?

I have a window in a Vala application and an image inside it. This image is changed sometimes by img.set_from_pixbuf(imgdata); and so it's size changes as well. It's embedded in a Gtk.Box. box = new…
muxamilian
  • 342
  • 2
  • 11
9
votes
2 answers

Cast to int vs Math.floor

Is it save to use cast to int instead of Math.floor to convert float / double values to integers? var scale = 1.5; int foo1 = (int)scale; int foo2 = Math.floor(scale);
Peter Uithoven
  • 705
  • 1
  • 6
  • 17
9
votes
1 answer

Vala. How do you delete all the children of a GTK container?

Solved. See the reply for examples. I have a container with children. I need to delete all the children. This is easy in C. Vala does not work. The following code produces an error missing type argument for collection. var a_box = new Box…
user4845927
9
votes
1 answer

Vala GUI and logic in C++

I have a drawing program that uses SDL, written in C++. I would like to create a graphical interface only in Vala and use it to call functions from a program (functions are ready to use and I only want to call them from the GUI). I was looking for…
Ocelpers
  • 319
  • 2
  • 9
9
votes
1 answer

Are Vala and Genie production ready?

I am working with some legacy C code which I need to refactor and generally clean up, to remove spaghetti type programming, adhere to the DRY principle etc. I was thinking of rewriting using C++, but I don't want to go that far, and would like to…
Homunculus Reticulli
  • 65,167
  • 81
  • 216
  • 341
8
votes
1 answer

GTK: Infinite lazy list of widgets

I need to display a virtually infinite scrollabe list of interactive widgets and add/remove them as necessary when new data is added or the user scrolls into an uncached area. A TreeView (as asked about here) is no option, because, I need full…
pascal
  • 2,623
  • 2
  • 20
  • 30
8
votes
3 answers

Where can I find instructions on how to install Vala on my Mac?

I'm looking into learn the Vala programming language where can I find somewhere to show me how to install it on my Mac?
user180825
8
votes
4 answers

Gtk HeaderBar ActionBar pack_start pack_end within UI xml file

We are trialing Gtk3/Vala/Genie for the development of application user interfaces using Gnome-Builder/Meson/Glade/Flatpak. While there are many examples of Gtk.HeaderBar.pack_start( ... ) and Gtk.ActionBar.pack_start( ... ) within the Vala and…
AsymLabs
  • 933
  • 9
  • 15
8
votes
2 answers

How to set max width of GtkLabel properly?

I am writing a Vala application and using GtkLabels' in it. Problem is, I made my main window not resizable and when I'm adding labels with a long text to it, the window gets very big (when the window was resizable, all labels were fitting…
serge1peshcoff
  • 4,342
  • 11
  • 45
  • 76
8
votes
3 answers

Updated Bluez DBUS-API document?

I just tried to run a vala bluez example (found in the DbusClientSamples page) and I got this error: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Method "DiscoverDevices" with signature "" on interface "org.bluez.Adapter" doesn't exist Is…
knocte
  • 16,941
  • 11
  • 79
  • 125
8
votes
2 answers

Multiple shortcuts for one action in GTK

What is the best way to bind multiple keyboard shortcuts to one action in GTK+ 3? I have been searching for an answer to this for a few days and have come up with naught. The function gtk_accelerator_parse does not support comma-deliminated…
Oz.
  • 5,299
  • 2
  • 23
  • 30
7
votes
1 answer

Generic function in Vala

I wrote a maximum() generic function in Vala. However, it does not compile. Here it is: T maximum(T a, T b) { return a > b ? a : b; } void main() { stdout.printf("%d\n", maximum(10, 2)); } I got the following…
antoyo
  • 11,097
  • 7
  • 51
  • 82
7
votes
1 answer

Vala: reducing the size of dependencies

I am developing small command line utilities using Vala on win32. Programs compiled using vala depend on the following DLLs libgobject-2.0-0.dll libgthread-2.0-0.dll libglib-2.0-0.dll They are taking up 1500 kbyes of space. Is there a way to…
George
  • 385
  • 3
  • 12
1
2
3
66 67