summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1caeb3e)
raw | patch | inline | side by side (parent: 1caeb3e)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 26 Mar 2007 16:26:22 +0000 (16:26 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 26 Mar 2007 16:26:22 +0000 (16:26 +0000) |
src/ui/widget/tolerance-slider.cpp | patch | blob | history | |
src/ui/widget/tolerance-slider.h | patch | blob | history |
index fd98b0a3774dc5e1249eed57006f09d8e43b0eb4..f9a991c245694657771ccda5463a59611cb26684 100644 (file)
@@ -61,11 +61,13 @@ ToleranceSlider::init (const Glib::ustring& label1, const Glib::ustring& label2,
Gtk::Label *theLabel1 = manage (new Gtk::Label (label1));
theLabel1->set_use_underline();
_hbox->add (*theLabel1);
- _hscale = manage (new Gtk::HScale (0.4, 50.1, 0.1));
+ _hscale = manage (new Gtk::HScale (1.0, 51, 1.0));
theLabel1->set_mnemonic_widget (*_hscale);
_hscale->set_draw_value (true);
_hscale->set_value_pos (Gtk::POS_RIGHT);
_hscale->set_size_request (100, -1);
+ _old_val = 10;
+ _hscale->set_value (_old_val);
_tt.set_tip (*_hscale, tip1);
_hbox->add (*_hscale);
_vbox->add (*_hbox);
Gtk::Adjustment *adj = _hscale->get_adjustment();
adj->set_lower (1.0);
- adj->set_upper (50.0);
+ adj->set_upper (51.0);
adj->set_step_increment (1.0);
if (val > 9999.9) // magic value 10000.0
{
if (_button->get_active())
{
+ _old_val = _hscale->get_value();
_hbox->set_sensitive (false);
_hbox->show_all();
setValue (10000.0);
{
_hbox->set_sensitive (true);
_hbox->show_all();
- setValue (50.0);
- update (50.0);
+ setValue (_old_val);
+ update (_old_val);
}
}
repr->setAttribute(_key.c_str(), os.str().c_str());
doc->rroot->setAttribute("sodipodi:modified", "true");
sp_document_set_undo_sensitive (doc, saved);
- sp_document_done (doc, SP_VERB_NONE,
- /* TODO: annotate */ "tolerance-slider.cpp:173");
_wr->setUpdating (false);
}
index 5cca8d64413c37c8181a13586c645c1804fb61bf..e395ede1453a0bc45c111197fd4936f71c58b28c 100644 (file)
Glib::ustring _key;
sigc::connection _scale_changed_connection;
sigc::connection _btn_toggled_connection;
+ double _old_val;
};