|
Lines 53-67
Link Here
|
| 53 |
|
53 |
|
| 54 |
std::list<Gtk::TargetEntry> drop_types; |
54 |
std::list<Gtk::TargetEntry> drop_types; |
| 55 |
|
55 |
|
| 56 |
drop_types.push_back(Gtk::TargetEntry("text/uri-list", 0, TARGET_URI_LIST)); |
56 |
drop_types.push_back(Gtk::TargetEntry("text/uri-list", Gtk::TargetFlags(0), TARGET_URI_LIST)); |
| 57 |
|
57 |
|
| 58 |
drag_dest_set(drop_types, |
58 |
drag_dest_set(drop_types, |
| 59 |
Gtk::DEST_DEFAULT_MOTION | |
59 |
Gtk::DEST_DEFAULT_MOTION | |
| 60 |
Gtk::DEST_DEFAULT_HIGHLIGHT | |
60 |
Gtk::DEST_DEFAULT_HIGHLIGHT | |
| 61 |
Gtk::DEST_DEFAULT_DROP); |
61 |
Gtk::DEST_DEFAULT_DROP); |
| 62 |
|
62 |
#if 0 |
| 63 |
signal_drag_data_received().connect(slot(*this, &AudioCDView::drag_data_received_cb)); |
63 |
signal_drag_data_received().connect(mem_fun(*this, &AudioCDView::drag_data_received_cb)); |
| 64 |
|
64 |
#endif |
| 65 |
sampleDisplay_ = new SampleDisplay; |
65 |
sampleDisplay_ = new SampleDisplay; |
| 66 |
sampleDisplay_->setTocEdit(child->tocEdit()); |
66 |
sampleDisplay_->setTocEdit(child->tocEdit()); |
| 67 |
|
67 |
|
|
Lines 85-91
Link Here
|
| 85 |
markerPos_ = new Gtk::Entry; |
85 |
markerPos_ = new Gtk::Entry; |
| 86 |
markerPos_->set_editable(true); |
86 |
markerPos_->set_editable(true); |
| 87 |
markerPos_->set_size_request(entry_width, -1); |
87 |
markerPos_->set_size_request(entry_width, -1); |
| 88 |
markerPos_->signal_activate().connect(slot(*this, &AudioCDView::markerSet)); |
88 |
markerPos_->signal_activate().connect(mem_fun(*this, &AudioCDView::markerSet)); |
| 89 |
|
89 |
|
| 90 |
cursorPos_ = new Gtk::Label; |
90 |
cursorPos_ = new Gtk::Label; |
| 91 |
cursorPos_->set_size_request(entry_width, -1); |
91 |
cursorPos_->set_size_request(entry_width, -1); |
|
Lines 94-106
Link Here
|
| 94 |
selectionStartPos_->set_editable(true); |
94 |
selectionStartPos_->set_editable(true); |
| 95 |
selectionStartPos_->set_size_request(entry_width, -1); |
95 |
selectionStartPos_->set_size_request(entry_width, -1); |
| 96 |
selectionStartPos_->signal_activate(). |
96 |
selectionStartPos_->signal_activate(). |
| 97 |
connect(slot(*this, &AudioCDView::selectionSet)); |
97 |
connect(mem_fun(*this, &AudioCDView::selectionSet)); |
| 98 |
|
98 |
|
| 99 |
selectionEndPos_ = new Gtk::Entry; |
99 |
selectionEndPos_ = new Gtk::Entry; |
| 100 |
selectionEndPos_->set_editable(true); |
100 |
selectionEndPos_->set_editable(true); |
| 101 |
selectionEndPos_->set_size_request(entry_width, -1); |
101 |
selectionEndPos_->set_size_request(entry_width, -1); |
| 102 |
selectionEndPos_->signal_activate(). |
102 |
selectionEndPos_->signal_activate(). |
| 103 |
connect(slot(*this, &AudioCDView::selectionSet)); |
103 |
connect(mem_fun(*this, &AudioCDView::selectionSet)); |
| 104 |
|
104 |
|
| 105 |
label = new Gtk::Label(_("Cursor: ")); |
105 |
label = new Gtk::Label(_("Cursor: ")); |
| 106 |
selectionInfoBox->pack_start(*label, FALSE, FALSE); |
106 |
selectionInfoBox->pack_start(*label, FALSE, FALSE); |
|
Lines 136-154
Link Here
|
| 136 |
|
136 |
|
| 137 |
setMode(SELECT); |
137 |
setMode(SELECT); |
| 138 |
|
138 |
|
| 139 |
sampleDisplay_->markerSet.connect(slot(*this, |
139 |
sampleDisplay_->markerSet.connect(mem_fun(*this, |
| 140 |
&AudioCDView::markerSetCallback)); |
140 |
&AudioCDView::markerSetCallback)); |
| 141 |
sampleDisplay_->selectionSet.connect(slot(*this, |
141 |
sampleDisplay_->selectionSet.connect(mem_fun(*this, |
| 142 |
&AudioCDView::selectionSetCallback)); |
142 |
&AudioCDView::selectionSetCallback)); |
| 143 |
sampleDisplay_->selectionCleared.connect(slot(*this, |
143 |
sampleDisplay_->selectionCleared.connect(mem_fun(*this, |
| 144 |
&AudioCDView::selectionClearedCallback)); |
144 |
&AudioCDView::selectionClearedCallback)); |
| 145 |
sampleDisplay_->cursorMoved.connect(slot(*this, |
145 |
sampleDisplay_->cursorMoved.connect(mem_fun(*this, |
| 146 |
&AudioCDView::cursorMovedCallback)); |
146 |
&AudioCDView::cursorMovedCallback)); |
| 147 |
sampleDisplay_->trackMarkSelected.connect(slot(*this, |
147 |
sampleDisplay_->trackMarkSelected.connect(mem_fun(*this, |
| 148 |
&AudioCDView::trackMarkSelectedCallback)); |
148 |
&AudioCDView::trackMarkSelectedCallback)); |
| 149 |
sampleDisplay_->trackMarkMoved.connect(slot(*this, |
149 |
sampleDisplay_->trackMarkMoved.connect(mem_fun(*this, |
| 150 |
&AudioCDView::trackMarkMovedCallback)); |
150 |
&AudioCDView::trackMarkMovedCallback)); |
| 151 |
sampleDisplay_->viewModified.connect(slot(*this, |
151 |
sampleDisplay_->viewModified.connect(mem_fun(*this, |
| 152 |
&AudioCDView::viewModifiedCallback)); |
152 |
&AudioCDView::viewModifiedCallback)); |
| 153 |
|
153 |
|
| 154 |
tocEditView_->sampleViewFull(); |
154 |
tocEditView_->sampleViewFull(); |
|
Lines 162-240
Link Here
|
| 162 |
|
162 |
|
| 163 |
menus.push_back(Item(Icon(Gtk::StockID(Gtk::Stock::PROPERTIES)), |
163 |
menus.push_back(Item(Icon(Gtk::StockID(Gtk::Stock::PROPERTIES)), |
| 164 |
_("Track Info..."), |
164 |
_("Track Info..."), |
| 165 |
slot(*this, &AudioCDView::trackInfo), |
165 |
mem_fun(*this, &AudioCDView::trackInfo), |
| 166 |
_("Edit track data"))); |
166 |
_("Edit track data"))); |
| 167 |
|
167 |
|
| 168 |
menus.push_back(Separator()); |
168 |
menus.push_back(Separator()); |
| 169 |
|
169 |
|
| 170 |
info = Item(Icon(Gtk::StockID(Gtk::Stock::CUT)), |
170 |
info = Item(Icon(Gtk::StockID(Gtk::Stock::CUT)), |
| 171 |
_("Cut"), |
171 |
_("Cut"), |
| 172 |
slot(*this, &AudioCDView::cutTrackData), |
172 |
mem_fun(*this, &AudioCDView::cutTrackData), |
| 173 |
_("Cut out selected samples")); |
173 |
_("Cut out selected samples")); |
| 174 |
info.set_accel(Gtk::Menu::AccelKey("<control>x")); |
174 |
info.set_accel(Gtk::AccelKey("<control>x")); |
| 175 |
menus.push_back(info); |
175 |
menus.push_back(info); |
| 176 |
|
176 |
|
| 177 |
info = Item(Icon(Gtk::StockID(Gtk::Stock::PASTE)), |
177 |
info = Item(Icon(Gtk::StockID(Gtk::Stock::PASTE)), |
| 178 |
_("Paste"), |
178 |
_("Paste"), |
| 179 |
slot(*this, &AudioCDView::pasteTrackData), |
179 |
mem_fun(*this, &AudioCDView::pasteTrackData), |
| 180 |
_("Paste previously cut samples")); |
180 |
_("Paste previously cut samples")); |
| 181 |
info.set_accel(Gtk::Menu::AccelKey("<control>v")); |
181 |
info.set_accel(Gtk::AccelKey("<control>v")); |
| 182 |
menus.push_back(info); |
182 |
menus.push_back(info); |
| 183 |
|
183 |
|
| 184 |
menus.push_back(Separator()); |
184 |
menus.push_back(Separator()); |
| 185 |
|
185 |
|
| 186 |
info = Item(_("Add Track Mark"), |
186 |
info = Item(_("Add Track Mark"), |
| 187 |
slot(*this, &AudioCDView::addTrackMark), |
187 |
mem_fun(*this, &AudioCDView::addTrackMark), |
| 188 |
_("Add track marker at current marker position")); |
188 |
_("Add track marker at current marker position")); |
| 189 |
info.set_accel(Gtk::Menu::AccelKey("T")); |
189 |
info.set_accel(Gtk::AccelKey("T")); |
| 190 |
menus.push_back(info); |
190 |
menus.push_back(info); |
| 191 |
|
191 |
|
| 192 |
info = Item(_("Add Index Mark"), |
192 |
info = Item(_("Add Index Mark"), |
| 193 |
slot(*this, &AudioCDView::addIndexMark), |
193 |
mem_fun(*this, &AudioCDView::addIndexMark), |
| 194 |
_("Add index marker at current marker position")); |
194 |
_("Add index marker at current marker position")); |
| 195 |
info.set_accel(Gtk::Menu::AccelKey("I")); |
195 |
info.set_accel(Gtk::AccelKey("I")); |
| 196 |
menus.push_back(info); |
196 |
menus.push_back(info); |
| 197 |
|
197 |
|
| 198 |
info = Item(_("Add Pre-Gap"), |
198 |
info = Item(_("Add Pre-Gap"), |
| 199 |
slot(*this, &AudioCDView::addPregap), |
199 |
mem_fun(*this, &AudioCDView::addPregap), |
| 200 |
_("Add pre-gap at current marker position")); |
200 |
_("Add pre-gap at current marker position")); |
| 201 |
info.set_accel(Gtk::Menu::AccelKey("P")); |
201 |
info.set_accel(Gtk::AccelKey("P")); |
| 202 |
menus.push_back(info); |
202 |
menus.push_back(info); |
| 203 |
|
203 |
|
| 204 |
info = Item(_("Remove Track Mark"), |
204 |
info = Item(_("Remove Track Mark"), |
| 205 |
slot(*this, &AudioCDView::removeTrackMark), |
205 |
mem_fun(*this, &AudioCDView::removeTrackMark), |
| 206 |
_("Remove selected track/index marker or pre-gap")); |
206 |
_("Remove selected track/index marker or pre-gap")); |
| 207 |
info.set_accel(Gtk::Menu::AccelKey("<control>D")); |
207 |
info.set_accel(Gtk::AccelKey("<control>D")); |
| 208 |
menus.push_back(info); |
208 |
menus.push_back(info); |
| 209 |
|
209 |
|
| 210 |
menus.push_back(Separator()); |
210 |
menus.push_back(Separator()); |
| 211 |
|
211 |
|
| 212 |
info = Item(_("Append Track"), |
212 |
info = Item(_("Append Track"), |
| 213 |
slot(*this, &AudioCDView::appendTrack), |
213 |
mem_fun(*this, &AudioCDView::appendTrack), |
| 214 |
_("Append track with data from audio file")); |
214 |
_("Append track with data from audio file")); |
| 215 |
info.set_accel(Gtk::Menu::AccelKey("<control>T")); |
215 |
info.set_accel(Gtk::AccelKey("<control>T")); |
| 216 |
menus.push_back(info); |
216 |
menus.push_back(info); |
| 217 |
|
217 |
|
| 218 |
info = Item(_("Append File"), |
218 |
info = Item(_("Append File"), |
| 219 |
slot(*this, &AudioCDView::appendFile), |
219 |
mem_fun(*this, &AudioCDView::appendFile), |
| 220 |
_("Append data from audio file to last track")); |
220 |
_("Append data from audio file to last track")); |
| 221 |
info.set_accel(Gtk::Menu::AccelKey("<control>F")); |
221 |
info.set_accel(Gtk::AccelKey("<control>F")); |
| 222 |
menus.push_back(info); |
222 |
menus.push_back(info); |
| 223 |
|
223 |
|
| 224 |
info = Item(_("Insert File"), |
224 |
info = Item(_("Insert File"), |
| 225 |
slot(*this, &AudioCDView::insertFile), |
225 |
mem_fun(*this, &AudioCDView::insertFile), |
| 226 |
_("Insert data from audio file at current marker position")); |
226 |
_("Insert data from audio file at current marker position")); |
| 227 |
info.set_accel(Gtk::Menu::AccelKey("<control>I")); |
227 |
info.set_accel(Gtk::AccelKey("<control>I")); |
| 228 |
menus.push_back(info); |
228 |
menus.push_back(info); |
| 229 |
|
229 |
|
| 230 |
menus.push_back(Separator()); |
230 |
menus.push_back(Separator()); |
| 231 |
|
231 |
|
| 232 |
menus.push_back(Item(_("Append Silence"), |
232 |
menus.push_back(Item(_("Append Silence"), |
| 233 |
slot(*this, &AudioCDView::appendSilence), |
233 |
mem_fun(*this, &AudioCDView::appendSilence), |
| 234 |
_("Append silence to last track"))); |
234 |
_("Append silence to last track"))); |
| 235 |
|
235 |
|
| 236 |
menus.push_back(Item(_("Insert Silence"), |
236 |
menus.push_back(Item(_("Insert Silence"), |
| 237 |
slot(*this, &AudioCDView::insertSilence), |
237 |
mem_fun(*this, &AudioCDView::insertSilence), |
| 238 |
_("Insert silence at current marker position"))); |
238 |
_("Insert silence at current marker position"))); |
| 239 |
|
239 |
|
| 240 |
Array<Info>& arrayInfo = project->insert_menus(_("Edit/CD-TEXT..."), |
240 |
Array<Info>& arrayInfo = project->insert_menus(_("Edit/CD-TEXT..."), |
|
Lines 475-485
Link Here
|
| 475 |
guiUpdate(); |
475 |
guiUpdate(); |
| 476 |
} |
476 |
} |
| 477 |
|
477 |
|
| 478 |
void |
478 |
void |
| 479 |
AudioCDView::drag_data_received_cb(const |
479 |
AudioCDView::drag_data_received_cb(const Glib::RefPtr<Gdk::DragContext>& context, |
| 480 |
Glib::RefPtr<Gdk::DragContext>& context, |
|
|
| 481 |
gint x, gint y, |
480 |
gint x, gint y, |
| 482 |
GtkSelectionData *selection_data, |
481 |
const GtkSelectionData *selection_data, |
| 483 |
guint info, guint time) |
482 |
guint info, guint time) |
| 484 |
{ |
483 |
{ |
| 485 |
GList *names = NULL; |
484 |
GList *names = NULL; |