Respond to font button selection

git-svn-id: file:///home/vcs/svn/jsweeper/trunk@15 6611ac79-6612-48ef-a1e9-b906f853523e
master
petern 2009-11-29 08:52:20 +00:00
parent c406cf7962
commit 969c520ef0
2 changed files with 10 additions and 0 deletions

View File

@ -296,6 +296,7 @@ Preferences::Preferences(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builde
check_activate_aliases->signal_clicked().connect(sigc::mem_fun(*this, &Preferences::on_check_activate_aliases_click));
fontbutton_font->signal_font_set().connect(sigc::mem_fun(*this, &Preferences::on_fontbutton_font_click));
spin_cell_padding->signal_value_changed().connect(sigc::mem_fun(*this, &Preferences::on_spin_cell_padding_click));
}
@ -341,6 +342,14 @@ void Preferences::on_check_activate_aliases_click()
Refresh();
}
void Preferences::on_fontbutton_font_click()
{
std::string font = fontbutton_font->get_font_name();
cfg.FontFace = font.substr(0, font.find_last_of(' '));
cfg.FontSize = ss_conv_to<int>(font.substr(font.find_last_of(' ') + 1));
g->Refresh();
}
void Preferences::on_spin_cell_padding_click()
{
cfg.CellPadding = spin_cell_padding->get_value();

View File

@ -104,6 +104,7 @@ protected:
void on_check_activate_aliases_click();
void on_fontbutton_font_click();
void on_spin_cell_padding_click();
class ModelColumns : public Gtk::TreeModel::ColumnRecord