update retinexadd with master 4d6833c

This commit is contained in:
Desmis
2016-01-03 15:48:22 +01:00
parent c9a6f74efa
commit 4e229fe928
58 changed files with 7810 additions and 533 deletions

View File

@@ -21,6 +21,8 @@
#include "popupbutton.h"
#include <gtkmm/box.h>
/*
* PopUpButton::PopUpButton (const Glib::ustring& label, bool imgRight)
*
@@ -28,8 +30,14 @@
*
* Parameters:
* label = label displayed in the button
* nextOnClicked = selects the next entry if the button is clicked
*/
PopUpButton::PopUpButton (const Glib::ustring& label) : Gtk::Button(), PopUpCommon(this, label) { }
PopUpButton::PopUpButton (const Glib::ustring& label, bool nextOnClicked)
: Gtk::Button ()
, PopUpCommon (this, label)
, nextOnClicked(nextOnClicked)
{
}
void PopUpButton::show()
{
@@ -39,3 +47,27 @@ void PopUpButton::set_tooltip_text (const Glib::ustring &text)
{
PopUpCommon::set_tooltip_text (text);
}
void PopUpButton::set_sensitive (bool isSensitive)
{
buttonGroup->set_sensitive(isSensitive);
}
bool PopUpButton::on_button_release_event (GdkEventButton* event)
{
if (nextOnClicked && getEntryCount () > 1)
{
const int last = getEntryCount () - 1;
int next = getSelected ();
if (event->state & GDK_SHIFT_MASK) {
next = next > 0 ? next - 1 : last;
} else {
next = next < last ? next + 1 : 0;
}
entrySelected (next);
}
return Gtk::Button::on_button_release_event(event);
}