added set_show_hidden() method to MyFileChooserButton
This commit is contained in:
@@ -1172,7 +1172,7 @@ MyFileChooserButton::MyFileChooserButton(const Glib::ustring &title, Gtk::FileCh
|
||||
title_(title),
|
||||
action_(action),
|
||||
lbl_(""),
|
||||
filename_("")
|
||||
show_hidden_(false)
|
||||
{
|
||||
lbl_.set_ellipsize(Pango::ELLIPSIZE_MIDDLE);
|
||||
lbl_.set_justify(Gtk::JUSTIFY_LEFT);
|
||||
@@ -1207,6 +1207,7 @@ void MyFileChooserButton::show_chooser()
|
||||
if (!current_folder_.empty()) {
|
||||
dlg.set_current_folder(current_folder_);
|
||||
}
|
||||
dlg.set_show_hidden(show_hidden_);
|
||||
int res = dlg.run();
|
||||
if (res == Gtk::RESPONSE_OK) {
|
||||
filename_ = dlg.get_filename();
|
||||
@@ -1273,6 +1274,7 @@ bool MyFileChooserButton::set_filename(const std::string &filename)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void MyFileChooserButton::add_filter(const Glib::RefPtr<Gtk::FileFilter> &filter)
|
||||
{
|
||||
file_filters_.push_back(filter);
|
||||
@@ -1347,6 +1349,12 @@ void MyFileChooserButton::unselect_filename(const std::string &filename)
|
||||
}
|
||||
|
||||
|
||||
void MyFileChooserButton::set_show_hidden(bool yes)
|
||||
{
|
||||
show_hidden_ = yes;
|
||||
}
|
||||
|
||||
|
||||
void MyFileChooserButton::set_none()
|
||||
{
|
||||
lbl_.set_label(Glib::ustring("(") + M("GENERAL_NONE") + ")");
|
||||
|
Reference in New Issue
Block a user