<commit_before>#include "uiFilterFrame.h"


uiFilterFrame::uiFilterFrame(const Glib::RefPtr<Gtk::Builder>& refGlade)
	: m_refGlade(refGlade),
	  m_adjMinFiles(5, 1, 20, 1, 3, 0)
{
	/*
	 * Load the VBox
	 */
	m_refGlade->get_widget("VBoxFilter", mp_VBoxFilter);


	/*
	 * Spin button to select minimum number of files.
	 */
	m_refGlade->get_widget("sbMinFiles", mp_sbMinFiles);
	mp_sbMinFiles->set_adjustment(m_adjMinFiles);
	m_adjMinFiles.signal_value_changed().connect(
			sigc::mem_fun(*this, &uiFilterFrame::on_adjMinFiles_changed)
	);
	

	/*
	 * ComboBox to select the X-Variable 
	 */
	m_XVar.append_text("All");
	m_XVar.append_text("Freq");
	m_XVar.append_text("Dur");
	m_XVar.append_text("Onset");
	m_XVar.append_text("Atten");
	m_XVar.set_active(0);
	m_XVar.signal_changed().connect(
		sigc::mem_fun(*this, &uiFilterFrame::on_XVar_changed)
	);
	mp_VBoxFilter->pack_start(m_XVar, false, false, 0);

	/*
	 * Tag filter
	 */
	Gtk::Label *tagLabel = Gtk::manage(new Gtk::Label("Tag Filter"));
	mp_VBoxFilter->pack_start(*tagLabel, false, false, 0);
	mp_VBoxFilter->pack_start(m_tag, false, false, 0);
	Glib::RefPtr<Gtk::EntryCompletion> mrp_tagCompletion = Gtk::EntryCompletion::create();
	m_tag.set_completion(mrp_tagCompletion);
	mrp_CompletionModel = Gtk::ListStore::create(m_tagColumns);
	mrp_tagCompletion->set_model(mrp_CompletionModel);
	mrp_tagCompletion->set_text_column(m_tagColumns.m_col_name);

	m_tag.signal_changed().connect(
			sigc::mem_fun(*this, &uiFilterFrame::on_tag_changed)
	);

	m_timer.start();
	Glib::signal_timeout().connect(sigc::mem_fun(*this, &uiFilterFrame::check_change_queue), 5);

	/*
	 * Hidden file checkbox
	 */
	mp_cbHidden = Gtk::manage(new Gtk::CheckButton("Show hidden files"));
	mp_VBoxFilter->pack_start(*mp_cbHidden, false, false, 0);
	mp_cbHidden->signal_toggled().connect(
		sigc::mem_fun(*this, &uiFilterFrame::on_hidden_toggled)
			);
}

uiFilterFrame::~uiFilterFrame()
{
	delete mp_sbMinFiles;
	delete mp_VBoxFilter;
}
<commit_msg>Ensure hidden files are hidden by default.<commit_after>#include "uiFilterFrame.h"


uiFilterFrame::uiFilterFrame(const Glib::RefPtr<Gtk::Builder>& refGlade)
	: m_refGlade(refGlade),
	  m_adjMinFiles(5, 1, 20, 1, 3, 0)
{
	/*
	 * Load the VBox
	 */
	m_refGlade->get_widget("VBoxFilter", mp_VBoxFilter);


	/*
	 * Spin button to select minimum number of files.
	 */
	m_refGlade->get_widget("sbMinFiles", mp_sbMinFiles);
	mp_sbMinFiles->set_adjustment(m_adjMinFiles);
	m_adjMinFiles.signal_value_changed().connect(
			sigc::mem_fun(*this, &uiFilterFrame::on_adjMinFiles_changed)
	);
	

	/*
	 * ComboBox to select the X-Variable 
	 */
	m_XVar.append_text("All");
	m_XVar.append_text("Freq");
	m_XVar.append_text("Dur");
	m_XVar.append_text("Onset");
	m_XVar.append_text("Atten");
	m_XVar.set_active(0);
	m_XVar.signal_changed().connect(
		sigc::mem_fun(*this, &uiFilterFrame::on_XVar_changed)
	);
	mp_VBoxFilter->pack_start(m_XVar, false, false, 0);

	/*
	 * Tag filter
	 */
	Gtk::Label *tagLabel = Gtk::manage(new Gtk::Label("Tag Filter"));
	mp_VBoxFilter->pack_start(*tagLabel, false, false, 0);
	mp_VBoxFilter->pack_start(m_tag, false, false, 0);
	Glib::RefPtr<Gtk::EntryCompletion> mrp_tagCompletion = Gtk::EntryCompletion::create();
	m_tag.set_completion(mrp_tagCompletion);
	mrp_CompletionModel = Gtk::ListStore::create(m_tagColumns);
	mrp_tagCompletion->set_model(mrp_CompletionModel);
	mrp_tagCompletion->set_text_column(m_tagColumns.m_col_name);

	m_tag.signal_changed().connect(
			sigc::mem_fun(*this, &uiFilterFrame::on_tag_changed)
	);

	m_timer.start();
	Glib::signal_timeout().connect(sigc::mem_fun(*this, &uiFilterFrame::check_change_queue), 5);

	/*
	 * Hidden file checkbox
	 */
	mp_cbHidden = Gtk::manage(new Gtk::CheckButton("Show hidden files"));
	mp_cbHidden->set_active(false);
	mp_VBoxFilter->pack_start(*mp_cbHidden, false, false, 0);
	mp_cbHidden->signal_toggled().connect(
		sigc::mem_fun(*this, &uiFilterFrame::on_hidden_toggled)
			);
}

uiFilterFrame::~uiFilterFrame()
{
	delete mp_sbMinFiles;
	delete mp_VBoxFilter;
}

{'fraction_non_alphanumeric': 0.15392254220456802, 'fraction_numerical': 0.006454816285998014, 'mean_word_length': 6.793036750483559, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6305798', 'n_tokens_mistral': 1647, 'n_tokens_neox': 1553, 'n_words': 205}