Re: FileChooser notification



Thanks, Kjell, that's exactly what I need.

On 12/24/2012 01:31 AM, Kjell Ahlstedt wrote:
2012-12-24 00:39, Ian Martin skrev:
On 24/12/12 06:31, Phil Wolff wrote:
Does Gtk::FileChooser emit a signal that tells me when the user changes the filter selection?
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Hi,
You mean like
Glib::SignalProxy0 <cid:part1.02010902.04080004@vodafone.co.nz>< void > signal_selection_changed <cid:part2.04070909.08080901@vodafone.co.nz> () in the function list at the reference docs? <http://developer.gnome.org/gtkmm/3.5/classGtk_1_1FileChooser.html>

Gtk::FileChooser::signal_selection_changed() is emitted when there is a change in the set of selected files, but Phil wants to know when the user of his program selects another file filter. I can't find such a signal directly in Gtk::FileChooser, but there is the property Gtk::FileChooser::property_filter(). Every property has a signal_changed() which is emitted when the value of the property changes. So I suppose you can use something like

m_FileChooser->property_filter().signal_changed().connect(sigc::mem_fun(*this, &MyClass::on_filter_changed));


--
Nothing spoils a good story like the arrival of an eyewitness.
    -- Mark Twain


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