According to valadoc, a package called gstreamer-player-1
exists. However, I can't find a corresponding package in the
ubuntu package search.
I need to make an application in Vala, using Gtk, that supports keyboard accelerators that can be changed by the user.
First, I add an entry to the global Gtk.AccelMap and then set the accel_path for the Gtk.MenuItems. But, it doesn't work. The accels don't appear in the items of the menubar. To clear what I'm trying to do, here is a sample code:
// main.vala
public class MyWindow: Gtk.Window {
public MyWindow() {
this.set_default_size(500, 500);
var main_box = new Gtk.VBox(false, 0);
this.add(main_box);
// Menubar
var menubar = new Gtk.MenuBar();
main_box.pack_start(menubar, false, false, 0);
var file = new Gtk.MenuItem.with_label("File");
menubar.add(file);
var file_menu = new Gtk.Menu();
file.set_submenu(file_menu);
var quit_mi = new Gtk.MenuItem.with_label("Quit");
file_menu.append(quit_mi);
// Register a new accelerator with the global accelerator map
Gtk.AccelMap.add_entry("<MyWindow>/File/Quit", 'Q', Gdk.ModifierType.CONTROL_MASK);
quit_mi.set_accel_path("<MyWindow>/File/Quit");
// Connect signals
quit_mi.activate.connect(Gtk.main_quit);
// Label
var label = new Gtk.Label("My Window");
main_box.pack_start(label, true, true, 0);
this.destroy.connect(Gtk.main_quit);
}
}
int main(string[] args) {
Gtk.init(ref args);
var win = new MyWindow();
win.show_all();
Gtk.main();
return 0;
}
I use:
valac main.vala -o main --pkg gtk+-3.0
to compile the source code.
So, the question is: what's missing in the code? I think I need to do something else, but I don't know what.
On Launchpad.net, most projects list the programming language(s) their software uses:
It would be useful if there was a way to get a list of all the projects that use "X" programming language, in my case Vala. Does Launchpad provide this functionality? Are there any 3rd party tools that can do this?
Are there plans to develop a Vala template for Quickly? Would be interesting because I think, Vala will be the next gen programming language for Gnome.
I think the title explains it already...