Changeset 463
- Timestamp:
- 01/09/07 01:02:51 (2 years ago)
- Files:
-
- sweep/branches/sweep-info-panel/src/edit.c (modified) (3 diffs)
- sweep/branches/sweep-info-panel/src/info-panel.c (modified) (4 diffs)
- sweep/branches/sweep-info-panel/src/interface.c (modified) (1 diff)
- sweep/branches/sweep-info-panel/src/sample-display.c (modified) (17 diffs)
- sweep/branches/sweep-info-panel/src/samplerate.c (modified) (1 diff)
- sweep/branches/sweep-info-panel/src/sweep_app.h (modified) (3 diffs)
- sweep/branches/sweep-info-panel/src/sweep_marker.c (modified) (10 diffs)
- sweep/branches/sweep-info-panel/src/sweep_sample.c (modified) (14 diffs)
- sweep/branches/sweep-info-panel/src/sweep_selection.c (modified) (1 diff)
- sweep/branches/sweep-info-panel/src/sweep_sounddata.c (modified) (5 diffs)
- sweep/branches/sweep-info-panel/src/sweep_undo.c (modified) (1 diff)
- sweep/branches/sweep-info-panel/src/undo_dialog.c (modified) (1 diff)
- sweep/branches/sweep-info-panel/src/view.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sweep/branches/sweep-info-panel/src/edit.c
r455 r463 405 405 406 406 sounddata_add_selection_1 (s->sounddata, er->start - start, 407 er->end - start );407 er->end - start, NULL); 408 408 409 409 #ifdef DEBUG … … 617 617 if (er->start > sounddata->nr_frames) break; 618 618 619 sounddata_add_selection_1 (sounddata, er->start, MIN(er->end, sounddata->nr_frames) );619 sounddata_add_selection_1 (sounddata, er->start, MIN(er->end, sounddata->nr_frames), NULL); 620 620 } 621 621 } … … 1049 1049 /* Select the copied in portion of the sounddata */ 1050 1050 sounddata_set_selection_1 (sounddata, paste_offset, 1051 paste_offset + paste_length );1051 paste_offset + paste_length, NULL); 1052 1052 1053 1053 /* Move offset markers */ sweep/branches/sweep-info-panel/src/info-panel.c
r459 r463 51 51 * - show/edit sample type (ogg, mp3, wav, etc.) 52 52 * - treeview doesn't catch all keyboards signals, so editing cells is almost useless 53 * - so temporary disabled accels 53 54 * - implement: 54 55 * - changing sampling rate … … 61 62 typedef struct _PopupData PopupData; 62 63 typedef struct _SelectionData SelectionData; 64 typedef struct _MarkerData MarkerData; 63 65 64 66 struct _PopupData … … 72 74 sw_sel sel_data; 73 75 sw_sel * sel_modify; 76 }; 77 78 struct _MarkerData 79 { 80 sw_mark mark_data; 81 sw_mark * mark_modify; 74 82 }; 75 83 … … 1291 1299 #else 1292 1300 1293 void info_panel_add_markers_cb (GtkWidget * menuitem, sw_view * view)1301 static sw_sample * info_panel_marker_add (sw_sample * s, sw_param_set unused, sw_view * view) 1294 1302 { 1295 1303 sw_mark * mark; 1296 1304 1297 mark = mark_new (0, SWEEP_MARK_TYPE_SIMPLE, NULL); 1305 g_mutex_lock (s->sounddata->marks_mutex); 1306 1307 mark = mark_new ((view->end - view->start) / 2 + view->start, SWEEP_MARK_TYPE_SIMPLE, NULL); 1298 1308 1299 1309 view->sample->sounddata->marks = marks_add_marker (view->sample->sounddata->marks, mark); 1300 1310 1311 g_mutex_unlock (s->sounddata->marks_mutex); 1312 1301 1313 sample_refresh_views (view->sample); 1314 1315 return s; 1316 } 1317 1318 void info_panel_add_markers_cb (GtkWidget *menuitem, sw_view * view) 1319 { 1320 perform_marker_op (view->sample, _("Add Time marker"), (SweepFilter)info_panel_marker_add, NULL, view); 1302 1321 } 1303 1322 #endif sweep/branches/sweep-info-panel/src/interface.c
r279 r463 51 51 GtkStyle * style_dark_grey; 52 52 GtkStyle * style_red; 53 54 55 56 53 57 54 sweep/branches/sweep-info-panel/src/sample-display.c
r459 r463 35 35 #include <gtk/gtk.h> 36 36 37 #include <sweep/sweep_marker.h> 37 38 #include <sweep/sweep_i18n.h> 38 39 … … 45 46 #include "edit.h" 46 47 #include "undo_dialog.h" 48 #include "info-panel.h" 47 49 48 50 /*#define DEBUG*/ … … 143 145 0, 0, 0, /* tmp_sel_text */ 144 146 255, 255, 255, /* sel_text */ 145 240, 240, 240, /* mark_text */147 0, 0, 0, /* mark_text */ 146 148 }; 147 149 … … 170 172 0, 0, 0, /* tmp_sel_text */ 171 173 255, 255, 255, /* sel_text */ 172 240, 240, 240,/* mark_text */174 0, 0, 0, /* mark_text */ 173 175 }; 174 176 #endif … … 286 288 sample_display_get_mouse_offset (SampleDisplay * s) 287 289 { 288 int x, y;290 gint x, y; 289 291 GdkModifierType state; 290 292 … … 421 423 sample_display_refresh_sels (SampleDisplay * s) 422 424 { 423 int x, x2;425 gint x, x2; 424 426 sw_sample * sample; 425 427 GList * gl; … … 484 486 sample_display_refresh_marks (SampleDisplay * s) 485 487 { 486 int x, x2;488 //int x, x2; 487 489 sw_sample * sample; 488 490 GList * gl; … … 1341 1343 /* draw the selection */ 1342 1344 sample_display_draw_sel_box (win, s->sel_gc, 1343 s, xs, xe - xs - 1,1344 l_end, r_end /* draw_ends */);1345 s, xs, xe - xs - 1, 1346 l_end, r_end /* draw_ends */); 1345 1347 1346 1348 if ( sel->name != NULL ){ … … 1450 1452 1451 1453 if ( mark->name != NULL ){ 1452 gdk_draw_layout (win, s-> fg_gc,1454 gdk_draw_layout (win, s->mark_text_gc, 1453 1455 x2 + 2, 0, 1454 1456 layout); 1455 /*1456 gtk_paint_layout (GTK_WIDGET(s)->style,1457 win, GTK_WIDGET_STATE (GTK_WIDGET(s)),1458 FALSE, NULL,1459 GTK_WIDGET(s), NULL,1460 x2 + 2, 0,1461 layout);1462 */1463 1457 } 1464 1458 } … … 2118 2112 } 2119 2113 2114 #if 0 2115 typedef struct _MarkerData MarkerData; 2116 struct _MarkerData 2117 { 2118 sw_framecount_t offset; 2119 sw_mark * mark_modify; 2120 }; 2121 2122 static void 2123 sample_display_mod_marker (sw_sample * s, sw_param_set unused, MarkerData * markdata) 2124 { 2125 /* pointer into moving marker */ 2126 s->tmp_mark = markdata->mark_modify; 2127 2128 /* modify data */ 2129 s->tmp_mark->frame = markdata->offset; 2130 2131 g_free(markdata); 2132 } 2133 #endif 2134 2120 2135 static void 2121 2136 sample_display_handle_marker_motion (SampleDisplay * s, int x, int y) … … 2123 2138 sw_mark * mark; 2124 2139 GList * gl; 2140 sw_sample * sample = s->view->sample; 2125 2141 sw_framecount_t offset, off1, off2; 2126 2142 gboolean mod = FALSE; 2143 //MarkerData * markdata; 2127 2144 2128 2145 offset = XPOS_TO_OFFSET(x); … … 2130 2147 off2 = XPOS_TO_OFFSET(x + 5); 2131 2148 2132 g_mutex_lock (s ->view->sample->sounddata->marks_mutex);2133 2134 if (s ->view->sample->tmp_mark){2135 2136 s ->view->sample->tmp_mark->frame = offset;2149 g_mutex_lock (sample->sounddata->marks_mutex); 2150 2151 if (sample->tmp_mark){ 2152 2153 sample->tmp_mark->frame = offset; 2137 2154 mod = TRUE; 2138 2155 2139 2156 } else { 2140 for ( gl = s ->view->sample->sounddata->marks; gl; gl = gl->next){2157 for ( gl = sample->sounddata->marks; gl; gl = gl->next){ 2141 2158 2142 2159 mark = (sw_mark *)gl->data; 2143 2160 2144 2161 if ( (mark->frame >= off1) && (mark->frame <= off2) ){ 2162 /* pointer into moving marker */ 2163 sample->tmp_mark = mark; 2164 2165 /* modify data */ 2166 mark->frame = offset; 2167 #if 0 2168 markdata = g_malloc0 ( sizeof (MarkerData) ); 2145 2169 2146 s->view->sample->tmp_mark = mark; 2147 mark->frame = offset; 2148 2170 markdata->offset = offset; 2171 markdata->mark_modify = mark; 2172 2173 /* register modification */ 2174 perform_marker_immediate_op (sample, _("Modify Time marker"), (SweepFilter)sample_display_mod_marker, NULL, markdata); 2175 #endif 2149 2176 mod = TRUE; 2150 2151 2177 break; 2152 2178 } … … 2455 2481 case TOOL_MARKER: 2456 2482 s->selecting = SELECTING_MARKER; 2457 // s->view->hand_offset = x;2458 // SET_CURSOR(widget, HAND_CLOSE);2459 2483 sample_display_handle_marker_motion (s, x, y); 2460 2484 break; … … 2546 2570 } 2547 2571 2572 static sw_sample * sample_display_marker_mod (sw_sample * s, sw_param_set unused, sw_view * view) 2573 { 2574 2575 2576 2577 } 2578 2548 2579 static gint 2549 2580 sample_display_button_release (GtkWidget *widget, … … 2565 2596 case TOOL_SELECT: 2566 2597 2567 /* If the user has released the button they were selecting with, 2598 /* 2599 * If the user has released the button they were selecting with, 2568 2600 * sink this sample's temporary selection. 2569 2601 */ … … 2579 2611 } 2580 2612 2581 /* If the user has released the button in a sweep window different 2613 /* 2614 * If the user has released the button in a sweep window different 2582 2615 * to that used for selection, then sink the appropriate temporary 2583 2616 * selection. … … 2602 2635 s->view->hand_offset = -1; 2603 2636 break; 2637 2604 2638 case TOOL_MARKER: 2605 2639 s->view->sample->tmp_mark = NULL; 2640 2641 s->view->sample->sounddata->marks = 2642 marks_resort(s->view->sample->sounddata->marks); 2643 2644 perform_marker_op (s->view->sample, _("Modify Time marker"), (SweepFilter)sample_display_marker_mod, NULL, s->view); 2645 2646 info_panel_markers_info_update (s->view->sample); 2647 2606 2648 break; 2649 2607 2650 case TOOL_MOVE: 2608 2651 break; sweep/branches/sweep-info-panel/src/samplerate.c
r444 r463 132 132 133 133 sounddata_add_selection_1 (new_sounddata, sel->sel_start * src_ratio, 134 sel->sel_end * src_ratio );134 sel->sel_end * src_ratio, NULL); 135 135 } 136 136 g_mutex_unlock (sample->ops_mutex); sweep/branches/sweep-info-panel/src/sweep_app.h
r458 r463 105 105 sw_framecount_t start, end; /* bounds of visible frames */ 106 106 sw_audio_t vlow, vhigh; /* bounds of vertical zoom */ 107 /* gfloat gain;*/108 /* gfloat rate;*/107 /* gfloat gain; */ 108 /* gfloat rate; */ 109 109 110 110 sw_tool_t current_tool; … … 154 154 GtkObject * gain_adj; 155 155 GtkObject * rate_adj; 156 157 GtkAccelGroup * accel_group; 156 158 157 159 GtkWidget * db_rulers_vbox; … … 246 248 gpointer file_info; /* parameters of original file or last save */ 247 249 248 sw_sel * tmp_sel; /* Temporary selection, used while selecting */250 sw_sel * tmp_sel; /* Temporary selection, used while selecting */ 249 251 sw_mark * tmp_mark; /* Temp marker, used while moving */ 250 252 sweep/branches/sweep-info-panel/src/sweep_marker.c
r459 r463 39 39 #include "sample-display.h" 40 40 #include "driver.h" 41 #include "sweep_app.h" 42 #include "undo_dialog.h" 41 43 42 44 #define MARKER_IMG_NUMBER 11 … … 122 124 return; 123 125 124 g_free( mark->name ); 126 /* free optional marker name */ 127 if (!mark->name) 128 g_free( mark->name ); 129 125 130 g_free( mark ); 131 } 132 133 void 134 marks_destroy (GList * marks) 135 { 136 GList * gl; 137 sw_mark * mark; 138 139 for (gl = marks; gl; gl = gl->next){ 140 mark = (sw_mark*)gl->data; 141 mark_free (mark); 142 } 143 144 g_list_free (marks); 126 145 } 127 146 … … 150 169 return 0; 151 170 } 152 153 #if 0154 static void155 dump_marks (GList * marks, char * desc)156 {157 #ifdef DEBUG158 GList * gl;159 sw_mark * mark;160 161 printf ("<dump %s (%p)>\n", desc, marks);162 for (gl = marks; gl; gl = gl->next) {163 mark = (sw_mark *)gl->data;164 printf ("\t[%ld - %ld]\n", mark->mark_start, mark->mark_end);165 }166 printf ("</dump>\n");167 #endif168 }169 #endif170 171 171 172 /* … … 196 197 197 198 GList * 199 marks_resort (GList * marks) 200 { 201 return g_list_sort (marks, (GCompareFunc)mark_cmp); 202 } 203 204 GList * 198 205 marks_add_marker_1 (GList * marks, sw_framecount_t frame, sw_mark_type_t type, gchar * name) 199 206 { … … 230 237 mark_replace_data_destroy (mark_replace_data * s) 231 238 { 232 g_list_free (s->marks); 233 g_free (s); 239 if (s){ 240 if (s->marks) 241 marks_destroy (s->marks); 242 243 g_free (s); 244 } 234 245 } 235 246 … … 237 248 do_by_mark_replace (sw_sample * s, mark_replace_data * sr) 238 249 { 239 // dump_marks (sr->marks, "at replace action");240 250 sample_set_markers (s, sr->marks); 241 242 /* sample_refresh_views (s);*/243 251 } 244 252 … … 255 263 GList * marks; 256 264 265 /* marks, "copied for undo data" */ 257 266 marks = marks_copy (sample->sounddata->marks); 258 // dump_marks (marks, "copied for undo data");259 267 inst->undo_data = mark_replace_data_new (marks); 260 268 set_active_op (sample, inst); … … 263 271 264 272 if (sample->edit_state == SWEEP_EDIT_STATE_BUSY) { 273 /* marks, "copied for redo data" */ 265 274 marks = marks_copy (sample->sounddata->marks); 266 // dump_marks (marks, "copied for redo data");267 275 inst->redo_data = mark_replace_data_new (marks); 268 276 269 277 register_operation (sample, inst); 270 278 } 271 272 #if 0273 sample_set_edit_state (sample, SWEEP_EDIT_STATE_DONE);274 #endif275 279 } 276 280 … … 286 290 287 291 sw_op_instance * 288 perform_marker_op (sw_sample * sample, char * desc, SweepFilter func,292 perform_marker_op (sw_sample * sample, gchar * desc, SweepFilter func, 289 293 sw_param_set pset, gpointer custom_data) 290 294 { … … 299 303 return NULL; 300 304 } 305 306 /* 307 * function preform immediate operation, so no threading, no asynchronous 308 * operations, clean and easy. 309 */ 310 void 311 perform_marker_immediate_op (sw_sample * sample, gchar * desc, SweepFilter func, 312 sw_param_set pset, gpointer custom_data) 313 { 314 sw_op_instance * inst; 315 GList * marks; 316 317 inst = sw_op_instance_new (sample, desc, &marker_op); 318 inst->do_data = custom_data; 319 320 /* marks, "copied for undo data" */ 321 marks = marks_copy (sample->sounddata->marks); 322 inst->undo_data = mark_replace_data_new (marks); 323 set_active_op (sample, inst); 324 325 func (sample, pset, custom_data); 326 327 /* marks, "copied for redo data" */ 328 marks = marks_copy (sample->sounddata->marks); 329 inst->redo_data = mark_replace_data_new (marks); 330 331 register_operation (sample, inst); 332 333 undo_dialog_refresh_history (sample); 334 } 335 sweep/branches/sweep-info-panel/src/sweep_sample.c
r458 r463 1378 1378 } 1379 1379 1380 void 1381 sample_clear_markers (sw_sample * s) 1382 { 1383 sounddata_clear_markers (s->sounddata); 1384 } 1385 1380 1386 static void 1381 1387 sample_normalise_selection (sw_sample * s) … … 1394 1400 1395 1401 sw_sel * 1396 sample_add_selection_1 (sw_sample * s, sw_framecount_t start, sw_framecount_t end )1397 { 1398 return sounddata_add_selection_1 (s->sounddata, start, end );1402 sample_add_selection_1 (sw_sample * s, sw_framecount_t start, sw_framecount_t end, gchar * name) 1403 { 1404 return sounddata_add_selection_1 (s->sounddata, start, end, name); 1399 1405 } 1400 1406 … … 1408 1414 1409 1415 sw_sel * 1410 sample_set_selection_1 (sw_sample * s, sw_framecount_t start, sw_framecount_t end) 1411 { 1412 return sounddata_set_selection_1 (s->sounddata, start, end); 1413 } 1414 1415 void 1416 sample_selection_modify (sw_sample * s, sw_sel * sel, 1417 sw_framecount_t new_start, sw_framecount_t new_end) 1416 sample_set_selection_1 (sw_sample * s, sw_framecount_t start, 1417 sw_framecount_t end, gchar * name) 1418 { 1419 return sounddata_set_selection_1 (s->sounddata, start, end, name); 1420 } 1421 1422 void 1423 sample_selection_modify (sw_sample * s, sw_sel * sel, sw_framecount_t new_start, 1424 sw_framecount_t new_end, gchar * name) 1418 1425 { 1419 1426 sel->sel_start = new_start; 1420 1427 sel->sel_end = new_end; 1428 if (!name){ 1429 if (!sel->name) 1430 g_free(sel->name); 1431 1432 sel->name = g_strdup(name); 1433 } 1421 1434 1422 1435 sample_normalise_selection (s); … … 1434 1447 1435 1448 #if 0 1449 1436 1450 sounddata->sels = sels_invert (sounddata->sels, sounddata->nr_frames); 1437 1451 … … 1439 1453 1440 1454 if (!sounddata->sels) { 1441 sounddata_set_selection_1 (sounddata, 0, sounddata->nr_frames );1455 sounddata_set_selection_1 (sounddata, 0, sounddata->nr_frames, NULL); 1442 1456 goto out; 1443 1457 } … … 1448 1462 sel = osel = (sw_sel *)gl->data; 1449 1463 if (osel->sel_start > 0) { 1450 sounddata_add_selection_1 (sounddata, 0, osel->sel_start - 1 );1464 sounddata_add_selection_1 (sounddata, 0, osel->sel_start - 1, NULL); 1451 1465 } 1452 1466 … … 1455 1469 for (; gl; gl = gl->next) { 1456 1470 sel = (sw_sel *)gl->data; 1457 sounddata_add_selection_1 (sounddata, osel->sel_end, sel->sel_start - 1 );1471 sounddata_add_selection_1 (sounddata, osel->sel_end, sel->sel_start - 1, NULL); 1458 1472 osel = sel; 1459 1473 } 1460 1474 1461 1475 if (sel->sel_end != sounddata->nr_frames) { 1462 sounddata_add_selection_1 (sounddata, sel->sel_end, sounddata->nr_frames); 1463 } 1464 1476 sounddata_add_selection_1 (sounddata, sel->sel_end, sounddata->nr_frames, NULL); 1477 } 1478 1479 /* XXX: memory leakage */ 1465 1480 g_list_free (osels); 1466 1481 … … 1486 1501 g_mutex_lock (sounddata->sels_mutex); 1487 1502 1488 sounddata_set_selection_1 (sounddata, 0, sounddata->nr_frames );1503 sounddata_set_selection_1 (sounddata, 0, sounddata->nr_frames, NULL); 1489 1504 1490 1505 g_mutex_unlock (sounddata->sels_mutex); … … 1703 1718 n += snprintf (buf+n, BUF_LEN-n, "]"); 1704 1719 */ 1705 n = snprintf (buf, BUF_LEN, _("Insert selection")); 1706 1707 // g_mutex_lock (s->sounddata->sels_mutex); 1720 n = snprintf (buf, BUF_LEN, _("Insert selection")); 1708 1721 1709 1722 sel = sel_copy (s->tmp_sel); … … 1713 1726 // last_tmp_view = NULL; 1714 1727 1715 // g_mutex_unlock (s->sounddata->sels_mutex);1716 1717 1728 perform_selection_op (s, buf, ssits, NULL, sel); 1718 1729 #undef BUF_LEN … … 1759 1770 n += snprintf (buf+n, BUF_LEN-n, "]"); 1760 1771 1761 // g_mutex_lock (s->sounddata->sels_mutex);1762 1763 1772 sel = sel_copy (s->tmp_sel); 1764 1773 … … 1767 1776 // last_tmp_view = NULL; 1768 1777 1769 // g_mutex_unlock (s->sounddata->sels_mutex);1770 1771 1778 perform_selection_op (s, buf, sssts, NULL, sel); 1772 1779 } … … 1806 1813 n += snprintf (buf+n, BUF_LEN-n, "]"); 1807 1814 */ 1808 n = snprintf (buf, BUF_LEN, _("Set selection"));1815 n = snprintf (buf, BUF_LEN, _("Set selection")); 1809 1816 1810 1817 g_mutex_lock (s->sounddata->sels_mutex); … … 1818 1825 1819 1826 perform_selection_op (s, buf, ssrwts, NULL, sel); 1820 } 1821 1827 #undef BUF_LEN 1828 } 1822 1829 1823 1830 void 1824 1831 sample_set_markers (sw_sample * s, GList * gl) 1825 1832 { 1826 /*XXX: Implement1827 *1828 1833 sample_clear_markers(s); 1829 */1830 1834 1831 1835 s->sounddata->marks = marks_copy (gl); 1832 1836 } 1833 1834 1837 1835 1838 /* Sample info dialog */ sweep/branches/sweep-info-panel/src/sweep_selection.c
r457 r463 63 63 return; 64 64 65 g_free(sel->name); 65 /* free optional selection name */ 66 if (!sel->name) 67 g_free(sel->name); 68 66 69 g_free(sel); 70 } 71 72 void 73 sels_destroy (GList * sels) 74 { 75 GList * gl; 76 sw_sel * sel; 77 78 for (gl = sels; gl; gl = gl->next){ 79 sel = (sw_sel*)gl->data; 80 sel_free (sel); 81 } 82 83 g_list_free (sels); 67 84 } 68 85 sweep/branches/sweep-info-panel/src/sweep_sounddata.c
r456 r463 35 35 #include <sweep/sweep_typeconvert.h> 36 36 #include <sweep/sweep_selection.h> 37 #include <sweep/sweep_selection.h> 38 #include <sweep/sweep_marker.h> 37 39 #include <sweep/sweep_undo.h> 38 40 … … 102 104 sounddata_clear_selection (sw_sounddata * sounddata) 103 105 { 104 g_list_free(sounddata->sels); 106 /* 107 GList * gl; 108 sw_sel * sel; 109 110 for (gl = sounddata->sels; gl; gl = gl->next){ 111 sel = (sw_sel*)gl->data; 112 sel_free (sel); 113 } 114 115 g_list_free (sounddata->sels); 116 */ 117 sels_destroy (sounddata->sels); 105 118 106 119 sounddata->sels = NULL; 120 }; 121 122 void 123 sounddata_clear_markers (sw_sounddata * sounddata) 124 { 125 /* 126 GList * gl; 127 sw_mark * mark; 128 129 for (gl = sounddata->marks; gl; gl = gl->next){ 130 mark = (sw_mark*)gl->data; 131 mark_free (mark); 132 } 133 134 g_list_free (sounddata->marks); 135 */ 136 marks_destroy (sounddata->marks); 137 138 sounddata->marks = NULL; 107 139 }; 108 140 … … 247 279 248 280 /* Clear the old selection */ 249 g_list_free (sounddata->sels);281 sounddata_clear_selection (sounddata); 250 282 251 283 /* Set the newly created (normalised) selection */ … … 257 289 sounddata_add_selection (sw_sounddata * sounddata, sw_sel * sel) 258 290 { 259 sounddata->sels = 260 g_list_insert_sorted(sounddata->sels, sel, (GCompareFunc)sel_cmp);291 sounddata->sels = sels_add_selection (sounddata->sels, sel); 292 // g_list_insert_sorted(sounddata->sels, sel, (GCompareFunc)sel_cmp); 261 293 } 262 294 263 295 sw_sel * 264 sounddata_add_selection_1 (sw_sounddata * sounddata, sw_framecount_t start, sw_framecount_t end )265 { 266 sw_sel * sel; 267 268 sel = sel_new (start, end, NULL);296 sounddata_add_selection_1 (sw_sounddata * sounddata, sw_framecount_t start, sw_framecount_t end, gchar * name) 297 { 298 sw_sel * sel; 299 300 sel = sel_new (start, end, name); 269 301 270 302 sounddata_add_selection(sounddata, sel); … … 274 306 275 307 sw_sel * 276 sounddata_set_selection_1 (sw_sounddata * sounddata, sw_framecount_t start, sw_framecount_t end )308 sounddata_set_selection_1 (sw_sounddata * sounddata, sw_framecount_t start, sw_framecount_t end, gchar * name) 277 309 { 278 310 sounddata_clear_selection (sounddata); 279 311 280 return sounddata_add_selection_1 (sounddata, start, end );312 return sounddata_add_selection_1 (sounddata, start, end, name); 281 313 } 282 314 sweep/branches/sweep-info-panel/src/sweep_undo.c
r245 r463 173 173 174 174 if (sample->ops_thread == (pthread_t) -1) { 175 /* TODO: GLib'ing threading */ 175 176 pthread_create (&sample->ops_thread, NULL, (void *) (*op_main), sample); 176 177 } sweep/branches/sweep-info-panel/src/undo_dialog.c
r450 r463 193 193 undo_dialog_refresh_history (sw_sample * sample) 194 194 { 195 info_panel_undos_info_update(sample);195 info_panel_undos_info_update(sample); 196 196 197 197 if (sample != ud_sample) sweep/branches/sweep-info-panel/src/view.c
r458 r463 2932 2932 view->menu = gtk_menu_new (); 2933 2933 accel_group = create_view_menu (view, view->menu); 2934 // gtk_window_add_accel_group (GTK_WINDOW(view->window), accel_group); 2935 2934 /* 2935 * XXX: I can remember accel_group and remove it just before start editing 2936 * info-panel treeview data, but there is no "before-edit" signal, so i have to 2937 * implement my own 2938 * 2939 gtk_window_add_accel_group (GTK_WINDOW(view->window), accel_group); 2940 view->accel_group = accel_group; 2941 g_print("gtk_window_add_accel_group(2): %p\n", accel_group); 2942 */ 2936 2943 create_view_menu (view, view->menubar); 2937 2944
