use explicit button to show the protocol editor; users reported they did not see the double-click text. maybe this will help?
This commit is contained in:
parent
6389c52d3c
commit
e1064701a5
@ -1295,18 +1295,29 @@ public:
|
|||||||
|
|
||||||
_box->pack_start (_view, false, false);
|
_box->pack_start (_view, false, false);
|
||||||
|
|
||||||
Label* label = manage (new Label);
|
Gtk::HBox* edit_box = manage (new Gtk::HBox);
|
||||||
label->set_markup (string_compose (X_("<i>%1</i>"), _("Double-click on a name to edit settings for an enabled protocol")));
|
edit_box->set_spacing(3);
|
||||||
|
_box->pack_start (*edit_box, false, false);
|
||||||
|
edit_box->show ();
|
||||||
|
|
||||||
_box->pack_start (*label, false, false);
|
Label* label = manage (new Label);
|
||||||
|
label->set_text (_("Click to edit the settings for selected protocol ( it must be ENABLED first ):"));
|
||||||
|
edit_box->pack_start (*label, false, false);
|
||||||
label->show ();
|
label->show ();
|
||||||
|
|
||||||
|
edit_button = manage (new Button(_("Show Protocol Settings")));
|
||||||
|
edit_button->signal_clicked().connect (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_btn_clicked));
|
||||||
|
edit_box->pack_start (*edit_button, true, true);
|
||||||
|
edit_button->set_sensitive (false);
|
||||||
|
edit_button->show ();
|
||||||
|
|
||||||
ControlProtocolManager& m = ControlProtocolManager::instance ();
|
ControlProtocolManager& m = ControlProtocolManager::instance ();
|
||||||
m.ProtocolStatusChange.connect (protocol_status_connection, MISSING_INVALIDATOR,
|
m.ProtocolStatusChange.connect (protocol_status_connection, MISSING_INVALIDATOR,
|
||||||
boost::bind (&ControlSurfacesOptions::protocol_status_changed, this, _1), gui_context());
|
boost::bind (&ControlSurfacesOptions::protocol_status_changed, this, _1), gui_context());
|
||||||
|
|
||||||
_store->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::view_changed));
|
_store->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::view_changed));
|
||||||
_view.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked));
|
_view.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked));
|
||||||
|
_view.get_selection()->signal_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::selection_changed));
|
||||||
}
|
}
|
||||||
|
|
||||||
void parameter_changed (std::string const &)
|
void parameter_changed (std::string const &)
|
||||||
@ -1349,6 +1360,16 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void selection_changed ()
|
||||||
|
{
|
||||||
|
//enable the Edit button when a row is selected for editing
|
||||||
|
TreeModel::Row row = *(_view.get_selection()->get_selected());
|
||||||
|
if (row && row[_model.enabled])
|
||||||
|
edit_button->set_sensitive (true);
|
||||||
|
else
|
||||||
|
edit_button->set_sensitive (false);
|
||||||
|
}
|
||||||
|
|
||||||
void view_changed (TreeModel::Path const &, TreeModel::iterator const & i)
|
void view_changed (TreeModel::Path const &, TreeModel::iterator const & i)
|
||||||
{
|
{
|
||||||
TreeModel::Row r = *i;
|
TreeModel::Row r = *i;
|
||||||
@ -1383,12 +1404,8 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void edit_clicked (GdkEventButton* ev)
|
void edit_btn_clicked ()
|
||||||
{
|
{
|
||||||
if (ev->type != GDK_2BUTTON_PRESS) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
ControlProtocolInfo* cpi;
|
ControlProtocolInfo* cpi;
|
||||||
TreeModel::Row row;
|
TreeModel::Row row;
|
||||||
@ -1423,6 +1440,15 @@ private:
|
|||||||
win->present ();
|
win->present ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void edit_clicked (GdkEventButton* ev)
|
||||||
|
{
|
||||||
|
if (ev->type != GDK_2BUTTON_PRESS) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
edit_btn_clicked();
|
||||||
|
}
|
||||||
|
|
||||||
class ControlSurfacesModelColumns : public TreeModelColumnRecord
|
class ControlSurfacesModelColumns : public TreeModelColumnRecord
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -1447,6 +1473,7 @@ private:
|
|||||||
Gtk::Window& _parent;
|
Gtk::Window& _parent;
|
||||||
PBD::ScopedConnection protocol_status_connection;
|
PBD::ScopedConnection protocol_status_connection;
|
||||||
uint32_t _ignore_view_change;
|
uint32_t _ignore_view_change;
|
||||||
|
Gtk::Button* edit_button;
|
||||||
};
|
};
|
||||||
|
|
||||||
class VideoTimelineOptions : public OptionEditorBox
|
class VideoTimelineOptions : public OptionEditorBox
|
||||||
|
Loading…
Reference in New Issue
Block a user