Re: [Vala] Gtk.FileChooserButton



Hi Sascha,

FileChooserButton implements the FileChooser interface, so I believe the
method you want to use is get_current_foler_file:

https://valadoc.org/gtk+-3.0/Gtk.FileChooser.get_current_folder_file.html

Cheers
Chris D

2017-04-10 10:34 GMT-07:00 Sascha Manns <Sascha Manns mailbox org>:

Hello list,

i tried out to get a special folder from a Gtk.FileChooserButton.

In Mono/Gtk-Sharp i used:

public string RevUpdFolder { get; set; }
[Builder.Object] private FileChooserButton FileChooserRevUpd;
protected void OnFileChooserRevUpdFileSet(object sender, EventArgs e)
{
RevUpdFolder = FileChooserRevUpd.CurrentFolder;
}

In Vala i tried to port it:

public string revupdfolder { get; set; }
[Gtk.Child] private Gtk.FileChooserButton fileChooserRevUpd;
private void on_fileChooserRevUpd_file_set () {
    revupdfolder = fileChooserRevUpd.current_folder;
}

But it looks like there is no way to get the current folder like
Gtk-Sharp it does, or?

--
Sascha Manns
Maifeldstraße 10
56727 Mayen

P: +49-2651-4014045
W: http://saigkill.tuxfamily.org



_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list




-- 
Chris Daley
Pacific Northwest

e: chebizarro gmail com
w: http://chrisdaley.biz
m: +1-971-703-9251
s: chebizarro
tw: chebizarro
tz: PDT


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]