mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Continue to improve GtkLengthEntry
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10787 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2ce904c93a
commit
37d42d45f3
@ -1,9 +1,13 @@
|
|||||||
|
2006-01-28 John Spray <spray@lyx.org>
|
||||||
|
|
||||||
|
* GtkLengthEntry.[Ch]: implement signal_changed, setup spin limits
|
||||||
|
|
||||||
2006-01-27 Bernhard Reiter <ockham@gmx.net>
|
2006-01-27 Bernhard Reiter <ockham@gmx.net>
|
||||||
|
|
||||||
* GBranch.[Ch], glade/branch.glade: Add the Branches dialog
|
* GBranch.[Ch], glade/branch.glade: Add the Branches dialog
|
||||||
* Dialogs.C, Makefile.am, glade/Makefile.am: Use GBranch
|
* Dialogs.C, Makefile.am, glade/Makefile.am: Use GBranch
|
||||||
* GCitation.C, glade/citation.glade: Add some shortcuts,
|
* GCitation.C, glade/citation.glade: Add some shortcuts,
|
||||||
set shortcut targets correctly plus some minor bc().valid() logic
|
set shortcut targets correctly plus some minor bc().valid() logic
|
||||||
|
|
||||||
2006-01-25 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
2006-01-25 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
|
@ -29,10 +29,8 @@ namespace frontend {
|
|||||||
GtkLengthEntry::GtkLengthEntry(
|
GtkLengthEntry::GtkLengthEntry(
|
||||||
BaseObjectType* cobject,
|
BaseObjectType* cobject,
|
||||||
const Glib::RefPtr<Gnome::Glade::Xml>& refGlade)
|
const Glib::RefPtr<Gnome::Glade::Xml>& refGlade)
|
||||||
: Gtk::HBox(cobject), spin_(0.1, 2)
|
: Gtk::HBox(cobject), adj_(666.0, 0.0, 99999.0, 0.1, 1, 0.0), spin_(adj_, 0.1, 2)
|
||||||
{
|
{
|
||||||
|
|
||||||
spin_.set_range(0.0, 99999.0f);
|
|
||||||
populateUnitCombo (combo_, true);
|
populateUnitCombo (combo_, true);
|
||||||
relative_ = true;
|
relative_ = true;
|
||||||
|
|
||||||
@ -40,6 +38,14 @@ GtkLengthEntry::GtkLengthEntry(
|
|||||||
pack_start (spin_, true, true, 0);
|
pack_start (spin_, true, true, 0);
|
||||||
pack_start (combo_, true, true, 0);
|
pack_start (combo_, true, true, 0);
|
||||||
show_all();
|
show_all();
|
||||||
|
spin_.signal_changed().connect(sigc::mem_fun(changedsignal_, &sigc::signal<void>::emit));
|
||||||
|
combo_.signal_changed().connect(sigc::mem_fun(changedsignal_, &sigc::signal<void>::emit));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sigc::signal< void >& GtkLengthEntry::signal_changed()
|
||||||
|
{
|
||||||
|
return changedsignal_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,10 +38,15 @@ public:
|
|||||||
|
|
||||||
Gtk::SpinButton *get_spin();
|
Gtk::SpinButton *get_spin();
|
||||||
Gtk::ComboBoxText *get_combo();
|
Gtk::ComboBoxText *get_combo();
|
||||||
|
sigc::signal<void> &signal_changed();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// spin_ construction depends on adj_, so it must come first
|
||||||
|
Gtk::Adjustment adj_;
|
||||||
Gtk::SpinButton spin_;
|
Gtk::SpinButton spin_;
|
||||||
Gtk::ComboBoxText combo_;
|
Gtk::ComboBoxText combo_;
|
||||||
|
sigc::signal<void> changedsignal_;
|
||||||
|
void emit_changed();
|
||||||
bool relative_;
|
bool relative_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user