1 |
/* |
/* |
2 |
Copyright (c) 2014 Christian Schoenebeck |
Copyright (c) 2014 - 2017 Christian Schoenebeck |
3 |
|
|
4 |
This file is part of "gigedit" and released under the terms of the |
This file is part of "gigedit" and released under the terms of the |
5 |
GNU General Public License version 2. |
GNU General Public License version 2. |
111 |
appendNewSlot(script); |
appendNewSlot(script); |
112 |
// drop success |
// drop success |
113 |
context->drop_reply(true, time); |
context->drop_reply(true, time); |
114 |
|
// inform i.e. main window |
115 |
|
script_slots_changed_signal.emit(m_instrument); |
116 |
} else { |
} else { |
117 |
// drop failed |
// drop failed |
118 |
context->drop_reply(false, time); |
context->drop_reply(false, time); |
167 |
if (i != 0) { |
if (i != 0) { |
168 |
m_instrument->SwapScriptSlots(i, i-1); |
m_instrument->SwapScriptSlots(i, i-1); |
169 |
refreshSlots(); |
refreshSlots(); |
170 |
|
script_slots_changed_signal.emit(m_instrument); |
171 |
} |
} |
172 |
break; |
break; |
173 |
} |
} |
180 |
if (i < m_instrument->ScriptSlotCount() - 1) { |
if (i < m_instrument->ScriptSlotCount() - 1) { |
181 |
m_instrument->SwapScriptSlots(i, i+1); |
m_instrument->SwapScriptSlots(i, i+1); |
182 |
refreshSlots(); |
refreshSlots(); |
183 |
|
script_slots_changed_signal.emit(m_instrument); |
184 |
} |
} |
185 |
break; |
break; |
186 |
} |
} |
192 |
if (m_slots[i].id == slotID) { |
if (m_slots[i].id == slotID) { |
193 |
m_instrument->RemoveScriptSlot(i); |
m_instrument->RemoveScriptSlot(i); |
194 |
refreshSlots(); |
refreshSlots(); |
195 |
|
script_slots_changed_signal.emit(m_instrument); |
196 |
break; |
break; |
197 |
} |
} |
198 |
} |
} |
199 |
} |
} |
200 |
|
|
201 |
|
sigc::signal<void, gig::Instrument*>& ScriptSlots::signal_script_slots_changed() { |
202 |
|
return script_slots_changed_signal; |
203 |
|
} |
204 |
|
|
205 |
void ScriptSlots::onButtonClose() { |
void ScriptSlots::onButtonClose() { |
206 |
hide(); |
hide(); |
207 |
} |
} |