This commit is contained in:
Hombre57
2017-08-19 15:12:24 +02:00
parent 1cb222efbd
commit 7394aa3806
5 changed files with 18 additions and 7 deletions

View File

@@ -189,7 +189,7 @@ button {
}
/* Curve mode buttons and drop-downs */
button:checked.Left, button:checked.Left + button {
button:checked.Left {
background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
background-color: #585858;
}

View File

@@ -217,7 +217,7 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd
curveType->set_tooltip_text(M("CURVEEDITOR_TYPE"));
// TODO: Does this signal have to be blocked when on curve type change ?
curveType->signal_toggled().connect ( sigc::mem_fun(*this, &CurveEditor::curveTypeToggled) );
typeconn = curveType->signal_changed().connect (sigc::mem_fun(*this, &CurveEditor::typeSelectionChanged) );
typeconn = curveType->signal_item_selected().connect (sigc::mem_fun(*this, &CurveEditor::typeSelectionChanged) );
}
void CurveEditor::setCurve (const std::vector<double>& p)

View File

@@ -194,7 +194,7 @@ void CurveEditorGroup::curveListComplete()
*/
void CurveEditorGroup::typeSelectionChanged (CurveEditor* ce, int n)
{
// Same type : do nothing
// Same curve and same type : do nothing
if (ce == displayedCurve && n == (int)ce->selected) {
return;
}

View File

@@ -100,9 +100,12 @@ bool PopUpCommon::addEntry (const Glib::ustring& fileName, const Glib::ustring&
void PopUpCommon::entrySelected (int i)
{
// Emit a a signal if the selected item has changed
// Emit a signal if the selected item has changed
if (setSelected (i))
message (selected);
messageChanged (selected);
// Emit a signal in all case (i.e. propagate the signal_activate event)
messageItemSelected (selected);
}
void PopUpCommon::setItemSensitivity (int index, bool isSensitive) {

View File

@@ -42,7 +42,9 @@ class PopUpCommon
public:
typedef sigc::signal<void, int> type_signal_changed;
typedef sigc::signal<void, int> type_signal_item_selected;
type_signal_changed signal_changed();
type_signal_item_selected signal_item_selected();
Gtk::Grid* buttonGroup; // this is the widget to be packed
PopUpCommon (Gtk::Button* button, const Glib::ustring& label = "");
@@ -57,7 +59,8 @@ public:
void setItemSensitivity (int i, bool isSensitive);
private:
type_signal_changed message;
type_signal_changed messageChanged;
type_signal_item_selected messageItemSelected;
std::vector<Glib::ustring> imageFilenames;
std::vector<const RTImage*> images;
@@ -78,7 +81,12 @@ protected:
inline PopUpCommon::type_signal_changed PopUpCommon::signal_changed ()
{
return message;
return messageChanged;
}
inline PopUpCommon::type_signal_item_selected PopUpCommon::signal_item_selected ()
{
return messageItemSelected;
}
inline int PopUpCommon::getEntryCount () const