unable to connect a handler to Gtk::FileChooserButton's "file-activated"
- From: "Mirco \"MacSlow\"" Müller <macslow bangang de>
- To: gtkmm-list gnome org
- Subject: unable to connect a handler to Gtk::FileChooserButton's "file-activated"
- Date: Tue, 27 Sep 2005 20:18:43 +0200
Greetings everybody!
In my program I'm using a Gtk::FileChooserButton to retrieve a filename
from the user. But connecting a signal-handler for the signal
"file-activated" doesn't cause the handler-function to be executed when
the user actually selects a different file via the
Gtk::FileChooserButton.
Here is the setting up of the Gtk::FileChooserButton (UI loaded from
a .glade file using libglademm):
refXml->get_widget ("fileChooserButton", pFileChooserButton);
if (pFileChooserButton)
{
pFileChooserButton->set_filename (m_strSvgFileName.c_str ());
Gtk::FileFilter svgFilter;
svgFilter.set_name ("SVG Drawings");
svgFilter.add_pattern ("*.svg");
svgFilter.add_pattern ("*.SVG");
pFileChooserButton->add_filter (svgFilter);
pFileChooserButton->set_filter (svgFilter);
pFileChooserButton->signal_file_activated ().connect (sigc::ptr_fun
(on_file_activated));
}
This is what my callback looks like:
void on_file_activated ()
{
std::cout << "file-name = "<< pFileChooserButton->get_filename()
}
I'm using gtkmm-2.8.0 and gtk+-2.8.3. What am I missing here. Other
connected signal-handlers do get properly triggered (e.g. Gtk::ComboBox,
Gtk::Entry).
Thanks in advance for your time an kind advice!
Best regards...
MacSlow
--
Mirco "MacSlow" M�<macslow bangang de>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]