20static void dsu_fill_details(LiVESWidget *widget, livespointer data);
21static void qslider_changed(LiVESWidget *slid, livespointer data);
26 LiVESWidget *checkbutton;
28 if (!ext) ltext = (
_(
"Let LiVES set the _file extension"));
32 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
37static LiVESWidget *add_deinterlace_checkbox(LiVESBox *for_deint) {
42 (tmp2 = (
_(
"If this is set, frames will be deinterlaced as they are imported."))));
45 if (LIVES_IS_HBOX(for_deint)) {
52 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
61static void pv_sel_changed(LiVESFileChooser *chooser, livespointer user_data) {
63 LiVESWidget *pbutton = (LiVESWidget *)user_data;
64 if (!LIVES_IS_FILE_CHOOSER(chooser))
return;
68 if (!slist || !slist->data || lives_slist_length(slist) > 1 ||
69 !(lives_file_test((
char *)lives_slist_nth_data(slist, 0), LIVES_FILE_TEST_IS_REGULAR))) {
80 char *str_video = (
_(
"Video")), *str_opening;
81 boolean hhr, hvb, hla, hra;
91 tmp = (
_(
"(No video)"));
94 hhr = hvb = hra =
TRUE;
97 hhr = hvb = hla = hra =
FALSE;
105 hhr = hvb = hla = hra =
TRUE;
109 str_opening = (
_(
"[opening...]"));
116 if (sfile->
fps > 0.) {
125 tmp = (
_(
"(Undefined)"));
138 tmp = (
_(
"(No audio)"));
186 if (posx < 0) posx = 0;
187 if (posy < 0) posy = 0;
189 if (which == 0 || which == 2) {
195 if (which == 0 || which == 3) {
201 if (which == 0 || which == 1) {
214 static int last_current_file = -1;
238 cfile->real_pointer_time = x;
242 cfile->pointer_time = x;
246 cfile->aseek_pos = (off64_t)((
double)(
cfile->real_pointer_time *
cfile->arate) *
cfile->achans *
247 (
cfile->asampsize / 8));
267 if (
cfile->frames > 0) {
268 cfile->frameno = frame;
284 return cfile->pointer_time;
297 lives_painter_t *cr = NULL;
303 double y = 0., scalex;
307 int offset_right = 0;
309 int lpos = -9999, pos;
341 if (posx < 0) posx = 0;
342 if (posy < 0) posy = 0;
355 if (offset_left > posx) {
364 if (offset_right > posx) {
365 if (offset_left < posx) offset_left = posx;
366 if (offset_right > posx + xwidth) offset_right = posx + xwidth;
374 if (offset_right < posx + xwidth) {
375 if (posx > offset_right) offset_right = posx;
376 zwidth =
ROUND_I(
cfile->video_time * scalex) - offset_right;
377 if (posx < offset_right) xwidth -= offset_right - posx;
396 if (!
cfile->audio_waveform) {
402 if (!
cfile->audio_waveform[0]) {
404 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(
mainw->
laudio_draw),
"drawn", LIVES_INT_TO_POINTER(0));
405 cfile->audio_waveform[0] = (
float *)
lives_calloc((
int)offset_end,
sizeof(float));
406 start =
cfile->aw_sizes[0] = 0;
407 }
else if (
cfile->aw_sizes[0] != offset_end) {
412 if (
cfile->audio_waveform[0]) {
413 if (start != offset_end) {
414 cfile->aw_sizes[0] = offset_end;
419 for (i = start; i < offset_end; i++) {
424 atime = (double)i / scalex;
434 if (offset_end > posx + xwidth) offset_end = posx + xwidth;
438 for (i = posx; i < offset_left && i < offset_end; i++) {
442 y = bar_height * (1. -
cfile->audio_waveform[0][pos] / 2.);
456 for (; i < offset_right && i < offset_end; i++) {
460 y = bar_height * (1. -
cfile->audio_waveform[0][pos] / 2.);
473 for (; i < offset_end; i++) {
477 y = bar_height * (1. -
cfile->audio_waveform[0][pos] / 2.);
498 if (!
cfile->audio_waveform[1]) {
500 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(
mainw->
raudio_draw),
"drawn", LIVES_INT_TO_POINTER(0));
501 cfile->audio_waveform[1] = (
float *)
lives_calloc((
int)offset_end,
sizeof(float));
502 start =
cfile->aw_sizes[1] = 0;
503 }
else if (
cfile->aw_sizes[1] != offset_end) {
507 cfile->aw_sizes[1] = offset_end;
509 if (
cfile->audio_waveform[1]) {
510 if (start != offset_end) {
511 cfile->aw_sizes[1] = offset_end;
515 for (i = start; i < offset_end; i++) {
520 atime = (double)i / scalex;
532 if (offset_end > posx + xwidth) offset_end = posx + xwidth;
536 for (i = posx; i < offset_left && i < offset_end; i++) {
540 y = bar_height * (1. -
cfile->audio_waveform[1][pos] / 2.);
554 for (; i < offset_right && i < offset_end; i++) {
558 y = bar_height * (1. -
cfile->audio_waveform[1][pos] / 2.);
571 for (; i < offset_end; i++) {
575 y = bar_height * (1. -
cfile->audio_waveform[1][pos] / 2.);
592 if (!
cfile->opening_loc && which == 0) {
629 if (oldx == newx)
return;
634 if (allocwidth == 0)
return;
646static boolean on_fsp_click(LiVESWidget *widget, LiVESXEventButton *event, livespointer user_data) {
652void widget_add_preview(LiVESWidget *widget, LiVESBox *for_preview, LiVESBox *for_button, LiVESBox *for_deint,
654 LiVESWidget *preview_button = NULL;
680 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(
mainw->
fs_playarea),
"pixbuf", NULL);
703 "Image or Audio File"),
725 LIVES_GUI_CALLBACK(on_fsp_click), preview_button);
729 add_deinterlace_checkbox(for_deint);
732 lives_signal_sync_connect(LIVES_GUI_OBJECT(preview_button), LIVES_WIDGET_CLICKED_SIGNAL,
738 lives_signal_sync_connect(LIVES_GUI_OBJECT(widget), LIVES_WIDGET_SELECTION_CHANGED_SIGNAL,
739 LIVES_GUI_CALLBACK(pv_sel_changed), (livespointer)preview_button);
744static void on_dth_cancel_clicked(LiVESButton *button, livespointer user_data) {
753 LiVESWidget *dialog_vbox;
776 lives_snprintf(tmp_label, 256,
"%s...\n", text);
799#ifdef PROGBAR_IS_ENTRY
816 LIVES_RESPONSE_CANCEL);
819 lives_signal_sync_connect(LIVES_GUI_OBJECT(enoughbutton), LIVES_WIDGET_CLICKED_SIGNAL,
820 LIVES_GUI_CALLBACK(on_dth_cancel_clicked), LIVES_INT_TO_POINTER(1));
823 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
827 LIVES_RESPONSE_CANCEL);
831 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
833 lives_signal_sync_connect(LIVES_GUI_OBJECT(procw->
cancel_button), LIVES_WIDGET_CLICKED_SIGNAL,
834 LIVES_GUI_CALLBACK(on_dth_cancel_clicked), LIVES_INT_TO_POINTER(0));
840 *td_had_focus =
TRUE;
841 }
else *td_had_focus =
FALSE;
854 LiVESWidget *dialog_vbox;
889 lives_snprintf(tmp_label, 256,
"%s...\n", text);
915#ifdef PROGBAR_IS_ENTRY
946 if (
cfile->opening_loc
950#ifdef HAVE_PULSE_AUDIO
956 LIVES_RESPONSE_ACCEPT);
961 NULL,
_(
"Paus_e"), LIVES_RESPONSE_ACCEPT);
963 LIVES_RESPONSE_ACCEPT);
967 LIVES_RESPONSE_SHOW_DETAILS);
972 LIVES_RESPONSE_CANCEL);
978 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
981 lives_signal_sync_connect(LIVES_GUI_OBJECT(procw->
stop_button), LIVES_WIDGET_CLICKED_SIGNAL,
984 lives_signal_sync_connect(LIVES_GUI_OBJECT(procw->
pause_button), LIVES_WIDGET_CLICKED_SIGNAL,
988 lives_signal_sync_connect(LIVES_GUI_OBJECT(procw->
preview_button), LIVES_WIDGET_CLICKED_SIGNAL,
991 lives_signal_sync_connect(LIVES_GUI_OBJECT(procw->
preview_button), LIVES_WIDGET_CLICKED_SIGNAL,
995 lives_signal_sync_connect(LIVES_GUI_OBJECT(procw->
cancel_button), LIVES_WIDGET_CLICKED_SIGNAL,
1008static LiVESWidget *vid_text_view_new(
void) {
1009 LiVESWidget *textview;
1029static LiVESWidget *aud_text_view_new(
void) {
1030 LiVESWidget *textview;
1049 LiVESWidget *dialog_vbox;
1052 LiVESWidget *vidframe;
1053 LiVESWidget *laudframe;
1054 LiVESWidget *raudframe;
1055 LiVESWidget *okbutton;
1058 LiVESWidget *layout;
1060 LiVESAccelGroup *accel_group;
1073 title = (
_(
"Multitrack Details"));
1087 if (
cfile->frames > 0 || is_mt) {
1172 if (audio_channels > 0) {
1174 else tmp = (
_(
"Audio"));
1195 (LiVESAttachOptions)(0), (LiVESAttachOptions)(0), 0, 0);
1199 (LiVESAttachOptions)(0), (LiVESAttachOptions)(0), 0, 0);
1208 (LiVESAttachOptions)(0), (LiVESAttachOptions)(0), 0, 0);
1212 (LiVESAttachOptions)(0), (LiVESAttachOptions)(0), 0, 0);
1216 if (audio_channels > 1) {
1238 (LiVESAttachOptions)(0), (LiVESAttachOptions)(0), 0, 0);
1242 (LiVESAttachOptions)(0), (LiVESAttachOptions)(0), 0, 0);
1252 (LiVESAttachOptions)(0), (LiVESAttachOptions)(0), 0, 0);
1256 (LiVESAttachOptions)(0), (LiVESAttachOptions)(0), 0, 0);
1264 lives_signal_sync_connect(LIVES_GUI_OBJECT(okbutton), LIVES_WIDGET_CLICKED_SIGNAL,
1271 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
1279static void on_resizecb_toggled(LiVESToggleButton *t, livespointer user_data) {
1280 LiVESWidget *cb = (LiVESWidget *)user_data;
1293 LiVESWidget *dialog;
1294 LiVESWidget *dialog_vbox;
1295 LiVESWidget *okbutton;
1296 LiVESWidget *checkbutton = NULL;
1297 LiVESWidget *checkbutton2;
1301 char *labeltext, *tmp, *tmp2;
1307 if (text2) labeltext = (
_(
"<------------- (Check the box to re_size as suggested)"));
1308 else labeltext = (
_(
"<------------- (Check the box to use the _size recommendation)"));
1317 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
1327 ((tmp = (
_(
"Use _letterboxing to maintain aspect ratio (optional)"))),
FALSE, LIVES_BOX(hbox),
1328 (tmp2 = (H_(
"Draw black rectangles either above or to the sides of the image, "
1329 "to prevent it from stretching."))));
1337 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton2), LIVES_WIDGET_TOGGLED_SIGNAL,
1341 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
1342 LIVES_GUI_CALLBACK(on_resizecb_toggled), checkbutton2);
1349 LIVES_RESPONSE_CANCEL);
1355 LIVES_RESPONSE_CANCEL);
1369 LiVESWidget **ptextview) {
1370 LiVESWidget *scrolledwindow = NULL;
1385 if (ptextview) *ptextview = textview;
1386 return scrolledwindow;
1391 boolean add_buttons) {
1393 LiVESWidget *dialog_vbox;
1417 if (textbuffer || text)
1432 LIVES_STOCK_SAVE,
_(
"_Save to file"), LIVES_RESPONSE_YES);
1433 lives_signal_sync_connect(LIVES_GUI_OBJECT(savebutton), LIVES_WIDGET_CLICKED_SIGNAL,
1438 LIVES_STOCK_CLOSE,
_(
"_Close Window"), LIVES_RESPONSE_CANCEL);
1442 lives_signal_sync_connect(LIVES_GUI_OBJECT(
textwindow->
button), LIVES_WIDGET_CLICKED_SIGNAL,
1446 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
1448 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
1459 LiVESWidget *dialog_vbox;
1463 LiVESWidget *radiobutton;
1464 LiVESWidget *vseparator;
1465 LiVESWidget *cancelbutton;
1466 LiVESWidget *okbutton;
1469 LiVESSList *radiobutton1_group = NULL;
1470 LiVESSList *radiobutton2_group = NULL;
1494 1., 1., 10000., 1., 10., 0., LIVES_BOX(hbox), NULL);
1504 if (
cfile->frames == 0)
1520 &radiobutton1_group, LIVES_BOX(hbox),
1521 (tmp2 = (
_(
"Insert clipboard before selected frames"))));
1527 (LiVESAttachOptions)(LIVES_FILL),
1528 (LiVESAttachOptions)(0), 0, 0);
1537 &radiobutton1_group, LIVES_BOX(hbox),
1538 (tmp2 = (
_(
"Insert clipboard after selected frames"))));
1541 (LiVESAttachOptions)(LIVES_FILL),
1542 (LiVESAttachOptions)(0), 0, 0);
1552 &radiobutton2_group, LIVES_BOX(hbox), NULL);
1555 &radiobutton2_group, LIVES_BOX(hbox), NULL);
1558 (LiVESAttachOptions)(LIVES_FILL),
1559 (LiVESAttachOptions)(0), 0, 0);
1564 &radiobutton2_group, LIVES_BOX(hbox), NULL);
1570 (LiVESAttachOptions)(LIVES_FILL),
1571 (LiVESAttachOptions)(0), 0, 0);
1575 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
1576 (LiVESAttachOptions)(LIVES_FILL), 0, 0);
1580 (LiVESAttachOptions)(LIVES_FILL),
1581 (LiVESAttachOptions)(LIVES_FILL), 0, 0);
1596 LIVES_RESPONSE_CANCEL);
1602 lives_signal_sync_connect(LIVES_GUI_OBJECT(
insertw->
with_sound), LIVES_WIDGET_TOGGLED_SIGNAL,
1604 lives_signal_sync_connect(LIVES_GUI_OBJECT(radiobutton), LIVES_WIDGET_TOGGLED_SIGNAL,
1606 lives_signal_sync_connect(LIVES_GUI_OBJECT(cancelbutton), LIVES_WIDGET_CLICKED_SIGNAL,
1610 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(
insertw->
spinbutton_times), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
1614 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
1624 LiVESWidget *rb = NULL;
1627 LiVESSList *rb_group = NULL;
1628 LiVESWidget *vbox, *hbox;
1637 LIVES_BOX(vbox), (tmp2 = (H_(
"Send deleted items to filesystem Trash\n"
1638 "instead of erasing them permanently"))));
1642 (tmp2 = (H_(
"Permanently erase items from the disk"))));
1649 lives_signal_sync_connect(LIVES_GUI_OBJECT(rb), LIVES_WIDGET_ACTIVATE_SIGNAL,
1658static LiVESResponseType filtresp;
1659static char *rec_text = NULL, *rem_text = NULL, *leave_text = NULL;
1686static void filt_all_toggled(LiVESWidget *cb, LiVESList *list) {
1689 for (; list && list->data; list = list->next) {
1695static void filt_reset_clicked(LiVESWidget *layout, LiVESWidget *rbut) {
1696 LiVESList *list, *xlist;
1698 (LiVESWidget *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(layout),
"cb");
1704 ptype = LIVES_POINTER_TO_INT(lives_widget_object_get_data(LIVES_WIDGET_OBJECT(layout),
"ptype"));
1705 xlist = list = (LiVESList *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(layout),
"list");
1709 for (; xlist && xlist->data; xlist = xlist->next) {
1718 filt_all_toggled(cb, list);
1724 filt_all_toggled(cb, list);
1730static boolean filtc_response(LiVESWidget *w, LiVESResponseType resp, livespointer data) {
1736static boolean fill_filt_section(LiVESList **listp,
int pass,
int type, LiVESWidget *layout) {
1737 LiVESList *list = (LiVESList *)*listp;
1739 LiVESWidget *dialog = NULL;
1741 LiVESWidget *cb = NULL;
1744 boolean needs_recheck =
FALSE;
1766 if (!rec_text) rec_text = (
_(
"Recover"));
1767 if (!rem_text) rem_text = (
_(
"Delete"));
1768 if (!leave_text) leave_text = (
_(
"Leave"));
1787 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(layout),
"cb", (livespointer)cb);
1810 while (list->data) {
1822 lives_signal_sync_connect(LIVES_GUI_OBJECT(filedets->
widgets[1]), LIVES_WIDGET_TOGGLED_SIGNAL,
1823 LIVES_GUI_CALLBACK(filt_sw_toggled), (livespointer)filedets);
1824 }
else filedets->
widgets[1] = NULL;
1826 lives_signal_sync_connect(LIVES_GUI_OBJECT(filedets->
widgets[0]), LIVES_WIDGET_TOGGLED_SIGNAL,
1827 LIVES_GUI_CALLBACK(filt_cb_toggled), (livespointer)filedets);
1829 filt_cb_toggled(filedets->widgets[0], filedets);
1833 if (txt != filedets->name) {
1845 if (filedets->size == -1) {
1847 if (filedets->widgets[3]) {
1850 }
else filedets->widgets[3] = filedets->widgets[2];
1851 }
else filedets->widgets[3] = filedets->widgets[2];
1855 if (filedets->
size != -1) {
1864 if (filedets->
size == -2) {
1867 if (filedets->
size > 0) {
1873 }
else needs_recheck =
TRUE;
1956 }
else needs_recheck =
TRUE;
1965 }
while (!list->next && filtresp == LIVES_RESPONSE_NONE);
1967 if (filtresp != LIVES_RESPONSE_NONE)
goto ffxdone;
1971 lives_signal_sync_connect(LIVES_GUI_OBJECT(cb), LIVES_WIDGET_TOGGLED_SIGNAL,
1972 LIVES_GUI_CALLBACK(filt_all_toggled), (livespointer)*listp);
1977 return needs_recheck;
1981LiVESResponseType
filter_cleanup(
const char *trashdir, LiVESList **rec_list, LiVESList **rem_list,
1982 LiVESList **left_list) {
1983 LiVESWidget *dialog;
1984 LiVESWidget *layout, *layout_rec, *layout_rem, *layout_leave;
1985 LiVESWidget *top_vbox;
1986 LiVESWidget *scrolledwindow;
1987 LiVESWidget *cancelb;
1988 LiVESWidget *resetb = NULL;
1995 int rec_recheck, rem_recheck, leave_recheck;
2005 filtresp = LIVES_RESPONSE_NONE;
2011 if ((*rec_list && (*rec_list)->data) || (*rem_list && (*rem_list)->data)
2012 || (*left_list && (*left_list)->data)) {
2015 LIVES_STOCK_CANCEL, NULL, LIVES_RESPONSE_CANCEL);
2018 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
2021 LIVES_STOCK_UNDO,
_(
"_Reset"), LIVES_RESPONSE_NONE);
2026 LIVES_STOCK_GO_FORWARD,
_(
"_Accept and Continue"), LIVES_RESPONSE_ACCEPT);
2034 LIVES_STOCK_CLOSE,
_(
"_Close Window"),
2037 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
2041 lives_signal_sync_connect(dialog, LIVES_WIDGET_RESPONSE_SIGNAL,
2042 LIVES_GUI_CALLBACK(filtc_response), NULL);
2073 if (!*rec_list && filtresp == LIVES_RESPONSE_NONE)
lives_nanosleep(1000);
2074 }
while (!*rec_list && filtresp == LIVES_RESPONSE_NONE);
2076 if (filtresp != LIVES_RESPONSE_NONE)
goto harlem_shuffle;
2078 rec_recheck = fill_filt_section(rec_list, pass, 0, layout_rec);
2098 if (!*rem_list && filtresp == LIVES_RESPONSE_NONE)
lives_nanosleep(1000);
2099 }
while (!*rem_list && filtresp == LIVES_RESPONSE_NONE);
2101 if (filtresp != LIVES_RESPONSE_NONE)
goto harlem_shuffle;
2103 rem_recheck = fill_filt_section(rem_list, pass, 1, layout_rem);
2123 if (!*left_list && filtresp == LIVES_RESPONSE_NONE)
lives_nanosleep(1000);
2124 }
while (!*left_list && filtresp == LIVES_RESPONSE_NONE);
2126 if (filtresp != LIVES_RESPONSE_NONE)
goto harlem_shuffle;
2128 leave_recheck = fill_filt_section(left_list, pass, 2, layout_leave);
2135 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(layout_rec),
"list", *rec_list);
2136 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(layout_rec),
"ptype",
2137 LIVES_INT_TO_POINTER(0));
2138 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(layout_rem),
"list", *rem_list);
2139 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(layout_rem),
"ptype",
2140 LIVES_INT_TO_POINTER(1));
2141 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(layout_leave),
"list", *left_list);
2142 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(layout_leave),
"ptype",
2143 LIVES_INT_TO_POINTER(2));
2145 lives_signal_sync_connect_swapped(LIVES_GUI_OBJECT(resetb), LIVES_WIDGET_CLICKED_SIGNAL,
2146 LIVES_GUI_CALLBACK(filt_reset_clicked), layout_rec);
2147 lives_signal_sync_connect_swapped(LIVES_GUI_OBJECT(resetb), LIVES_WIDGET_CLICKED_SIGNAL,
2148 LIVES_GUI_CALLBACK(filt_reset_clicked), layout_rem);
2149 lives_signal_sync_connect_swapped(LIVES_GUI_OBJECT(resetb), LIVES_WIDGET_CLICKED_SIGNAL,
2150 LIVES_GUI_CALLBACK(filt_reset_clicked), layout_leave);
2159 while (filtresp == LIVES_RESPONSE_NONE && (rec_recheck || rem_recheck || leave_recheck)) {
2161 if (rec_recheck) rec_recheck = fill_filt_section(rec_list, pass, 0, layout_rec);
2162 if (rem_recheck) rem_recheck = fill_filt_section(rem_list, pass, 1, layout_rem);
2163 if (leave_recheck) leave_recheck = fill_filt_section(left_list, pass, 2, layout_leave);
2165 if (filtresp == LIVES_RESPONSE_NONE && (rec_recheck || rem_recheck || leave_recheck))
lives_nanosleep(100);
2168 while (filtresp == LIVES_RESPONSE_NONE)
lives_dialog_run(LIVES_DIALOG(dialog));
2172 if (filtresp != LIVES_RESPONSE_CANCEL && filtresp != LIVES_RESPONSE_OK) {
2175 LiVESList *list, *listnext;
2180 for (pass = 0; pass < 3; pass++) {
2181 if (!pass) list = *rec_list;
2182 else if (pass == 1) list = *rem_list;
2183 else list = *left_list;
2184 for (; list && list->data; list = listnext) {
2185 listnext = list->next;
2193 if (!pass || pass == 2) {
2197 if (list->prev) list->prev->next = list->next;
2198 if (list->next) list->next->prev = list->prev;
2200 if (list == *rec_list) *rec_list = list->next;
2201 else if (list == *left_list) *left_list = list->next;
2202 list->next = *rem_list;
2203 (*rem_list)->prev = list;
2211 if (list->prev) list->prev->next = list->next;
2212 if (list->next) list->next->prev = list->prev;
2214 if (list == *rec_list) *rec_list = list->next;
2215 else if (list == *rem_list) *rem_list = list->next;
2216 list->next = *left_list;
2217 (*left_list)->prev = list;
2229 LiVESWidget *opensel_dialog;
2230 LiVESWidget *dialog_vbox;
2234 LiVESWidget *spinbutton;
2235 LiVESWidget *cancelbutton;
2236 LiVESWidget *okbutton;
2240 double tottime = 0.;
2244 if (fps > 0.) tottime = (double)frames / fps;
2264 (LiVESAttachOptions)(LIVES_FILL | LIVES_EXPAND),
2265 (LiVESAttachOptions)(0), 0, 0);
2268 if (frames > 0 && fps > 0.)
2270 else text = lives_strdup(
"");
2275 (LiVESAttachOptions)(LIVES_FILL | LIVES_EXPAND),
2276 (LiVESAttachOptions)(0), 0, 0);
2281 (LiVESAttachOptions)(LIVES_FILL | LIVES_EXPAND),
2282 (LiVESAttachOptions)(0), 0, 0);
2287 else text = lives_strdup(
"");
2293 (LiVESAttachOptions)(LIVES_FILL | LIVES_EXPAND),
2294 (LiVESAttachOptions)(0), 0, 0);
2300 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(spinbutton), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
2302 LIVES_INT_TO_POINTER(1));
2305 (LiVESAttachOptions)(LIVES_FILL),
2311 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(spinbutton), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
2313 LIVES_INT_TO_POINTER(2));
2316 (LiVESAttachOptions)(LIVES_FILL),
2322 LIVES_RESPONSE_CANCEL);
2325 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
2346 return opensel_dialog;
2351 LiVESWidget *dialog_vbox;
2352 LiVESWidget *cancelbutton;
2353 LiVESWidget *okbutton;
2355 LiVESWidget *checkbutton;
2362 char *title, *tmp, *tmp2;
2364 title = (
_(
"Open Location"));
2378 _(
"\n\nTo open a stream, you must make sure that you have the correct libraries "
2379 "compiled in mplayer (or mpv).\n"
2380 "Also make sure you have set your bandwidth in Preferences|Streaming\n\n"));
2396 (tmp2 = (
_(
"Try this setting if you are having problems getting a stream"))));
2402 lives_signal_sync_connect(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
2406 add_deinterlace_checkbox(LIVES_BOX(dialog_vbox));
2409 LIVES_RESPONSE_CANCEL);
2415 lives_signal_sync_connect(LIVES_GUI_OBJECT(cancelbutton), LIVES_WIDGET_CLICKED_SIGNAL,
2418 lives_signal_sync_connect(LIVES_GUI_OBJECT(okbutton), LIVES_WIDGET_CLICKED_SIGNAL,
2422 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
2430static char *mkszlabel(
const char *set, ssize_t size,
int ccount,
int lcount) {
2432 char *szstr, *label, *laystr, *clpstr;
2433 if (size < 0) szstr = lives_strdup(
_(
"Calculating..."));
2435 if (ccount == -1) clpstr = (
_(
"counting..."));
2437 if (lcount == -1) laystr = (
_(
"counting..."));
2439 bit2 =
lives_strdup_printf(
_(
"Total size = %s\tclips: %s\tlayouts: %s"), szstr, clpstr, laystr);
2449 LiVESList *lists[2];
2450 LiVESList **laylist = &lists[0], **clipslist = &lists[1];
2452 *laylist = *clipslist = NULL;
2472 ssize_t totsize = -1;
2474 char *setdir = lives_build_path(
prefs->
workdir, set, NULL);
2478 int lcount = 0, ccount = 0;
2495 txt = mkszlabel(set, totsize, -1, -1);
2521 if (totsize == -1) {
2523 txt = mkszlabel(set, totsize, -1, -1);
2533 txt = mkszlabel(set, totsize, -1, 0);
2554 if (totsize == -1) {
2557 txt = mkszlabel(set, totsize, -1, lcount);
2579 if (totsize == -1) {
2582 txt = mkszlabel(set, totsize, -1, lcount);
2601 if (totsize == -1) {
2604 txt = mkszlabel(set, totsize, lcount, -1);
2639 boolean needs_more =
FALSE;
2645 if (!filedets->
mtime_sec) dtxt = txt = lives_strdup(
"????");
2659 if (filedets->
size == -1) {
2670 if (filedets->
size == -1) {
2674 if (filedets->
size != -1) {
2688 if (filedets->
size == -2) {
2691 if (filedets->
size > 0) {
2741 if (totsize == -1) {
2744 txt = mkszlabel(set, totsize, ccount, lcount);
2754 if (!list->data && needs_more) {
2767 txt = mkszlabel(set, totsize, ccount, lcount);
2782static void close_expander(LiVESWidget * button,
_entryw *
renamew) {
2787static void renamew_entry_changed(LiVESEntry * entry, LiVESWidget * other) {
2805 LiVESWidget *dialog_vbox;
2808 LiVESWidget *checkbutton;
2809 LiVESWidget *set_combo;
2813 char *title = NULL, *workdir, *tmp, *tmp2;
2818 title = (
_(
"Rename Clip"));
2819 }
else if (type == 2 || type == 4 || type == 5) {
2820 title = (
_(
"Enter Set Name to Save as"));
2821 }
else if (type == 3) {
2822 title = (
_(
"Enter a Set Name to Reload"));
2823 }
else if (type == 6) {
2824 title = (
_(
"Choose a Working Directory"));
2825 }
else if (type == 7) {
2826 title = (
_(
"Rename Current Track"));
2827 }
else if (type == 8) {
2828 title = (
_(
"Enter a Name for Your Theme"));
2842 (
_(
"You need to enter a name for the current clip set.\n"
2843 "This will allow you reload the layout with the same clips later.\n"
2844 "Please enter the set name you wish to use.\n"
2845 "LiVES will remind you to save the clip set later when you try to exit.\n"));
2851 (
_(
"In order to export this project, you must enter a name for this clip set.\n"
2852 "This will also be used for the project name.\n"));
2867 (
_(
"This startup wizard will guide you through the\n"
2868 "initial install so that you can get the most from this application."));
2872 (
_(
"First of all you need to choose a working directory for LiVES.\n"
2873 "This should be a directory with plenty of disk space available."));
2879 "working directory will be moved and if applicable added to the new location\n"));
2887 }
else if (type == 2 || type == 4 || type == 5) {
2893 if (type == 1 || type == 7) {
2895 }
else if (type == 2 || type == 3 || type == 4 || type == 5) {
2897 }
else if (type == 8) {
2930 LiVESWidget *dirbutton;
2935 (tmp2 = (
_(
"LiVES working directory."))));
2938 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(dirbutton),
FILESEL_TYPE_KEY,
2946 : type == 7 ? 16 : 128);
2960 LiVESWidget *layout;
2961 LiVESWidget *scrolledwindow;
2978 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(
renamew->
expander), LIVES_WIDGET_ACTIVATE_SIGNAL,
2979 LIVES_GUI_CALLBACK(on_set_exp),
renamew);
2983 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(
renamew->
entry), LIVES_WIDGET_CHANGED_SIGNAL,
2995 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
3003 LIVES_RESPONSE_CANCEL);
3005 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
3012 NULL, LIVES_RESPONSE_OK);
3017 lives_signal_sync_connect(LIVES_GUI_OBJECT(
renamew->
cancelbutton), LIVES_WIDGET_CLICKED_SIGNAL,
3023 lives_signal_sync_connect(LIVES_GUI_OBJECT(
renamew->
cancelbutton), LIVES_WIDGET_CLICKED_SIGNAL,
3024 LIVES_GUI_CALLBACK(close_expander),
renamew);
3027 lives_signal_sync_connect(LIVES_GUI_OBJECT(
renamew->
okbutton), LIVES_WIDGET_CLICKED_SIGNAL,
3028 LIVES_GUI_CALLBACK(close_expander),
renamew);
3033 lives_signal_sync_connect(LIVES_GUI_OBJECT(
renamew->
okbutton), LIVES_WIDGET_CLICKED_SIGNAL,
3038 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
3065static void rb_tvcarddef_toggled(LiVESToggleButton * tbut, livespointer user_data) {
3080static void after_dialog_combo_changed(LiVESWidget * combo, livespointer plist) {
3082 LiVESList *list = (LiVESList *)plist;
3095 LiVESWidget *combo_dialog;
3096 LiVESWidget *dialog_vbox;
3100 char *label_text = NULL, *title = NULL;
3103 title = (
_(
"Select input device"));
3112 label_text = (
_(
"Select input device:"));
3124 lives_signal_sync_connect_after(LIVES_WIDGET_OBJECT(combo), LIVES_WIDGET_CHANGED_SIGNAL,
3125 LIVES_GUI_CALLBACK(after_dialog_combo_changed), list);
3128 add_deinterlace_checkbox(LIVES_BOX(dialog_vbox));
3134 return combo_dialog;
3154 LiVESWidget *cd_dialog;
3155 LiVESWidget *dialog_vbox;
3157 LiVESWidget *spinbutton;
3158 LiVESWidget *cancelbutton;
3159 LiVESWidget *okbutton;
3163 LiVESSList *radiobutton_group = NULL;
3165 char *label_text = NULL, *title;
3170 title = (
_(
"Load CD Track"));
3172 title = (
_(
"Select DVD Title/Chapter"));
3174 title = (
_(
"Select VCD Title"));
3176 title = (
_(
"Change Maximum Visible Tracks"));
3178 title = (
_(
"Device details"));
3195 label_text = (
_(
"DVD Title"));
3197 label_text = (
_(
"VCD Title"));
3199 label_text = (
_(
"Maximum number of tracks to display"));
3201 label_text = (
_(
"Device: /dev/video"));
3203 label_text = (
_(
"Device: fw:"));
3209 1., 256., 1., 10., 0, LIVES_BOX(hbox), NULL);
3212 5., 15., 1., 1., 0, LIVES_BOX(hbox), NULL);
3215 0., 31., 1., 1., 0, LIVES_BOX(hbox), NULL);
3221 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(spinbutton), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
3223 LIVES_INT_TO_POINTER(1));
3233 1., 1024., 1., 10., 0, LIVES_BOX(hbox), NULL);
3236 1., 69., 1., 1., 0, LIVES_BOX(hbox), NULL);
3239 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(spinbutton), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
3249 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(spinbutton), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
3251 LIVES_INT_TO_POINTER(3));
3256 hbox = add_deinterlace_checkbox(LIVES_BOX(dialog_vbox));
3261 LiVESList *dlist = NULL;
3262 LiVESList *olist = NULL;
3270 for (i = 0; (str = tvcardtypes[i]); i++) {
3271 dlist = lives_list_append(dlist, (livespointer)tvcardtypes[i]);
3298 0., 0., 16., 1., 1., 0, LIVES_BOX(hbox), NULL);
3304 &radiobutton_group, LIVES_BOX(hbox), NULL);
3306 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(tvcardw->
radiobuttond), LIVES_WIDGET_TOGGLED_SIGNAL,
3307 LIVES_GUI_CALLBACK(rb_tvcarddef_toggled), (livespointer)tvcardw);
3315 640., 4., 4096., 4., 16., 0, LIVES_BOX(hbox), NULL);
3320 480., 4., 4096., 4., 16., 0, LIVES_BOX(hbox), NULL);
3325 25., 1.,
FPS_MAX, 1., 10., 3, LIVES_BOX(hbox), NULL);
3339 lives_signal_sync_connect(LIVES_GUI_OBJECT(tvcardw->advbutton), LIVES_WIDGET_CLICKED_SIGNAL,
3344 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(cd_dialog),
"tvcard_data", tvcardw);
3350 LIVES_RESPONSE_CANCEL);
3356 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
3359 lives_signal_sync_connect(LIVES_GUI_OBJECT(cancelbutton), LIVES_WIDGET_CLICKED_SIGNAL,
3384static void on_avolch_ok(LiVESButton * button, livespointer data) {
3387 char *tmp = (
_(
"Changing the audio volume"));
3391 d_print(
_(
"Adjusting clip volume..."));
3403 d_print(
_(
"clip volume adjusted by a factor of %.2f\n"),
cfile->vol);
3469 LiVESWidget *new_pb_speed;
3470 LiVESWidget *dialog_vbox;
3473 LiVESWidget *ca_hbox;
3475 LiVESWidget *label2;
3476 LiVESWidget *radiobutton1 = NULL;
3477 LiVESWidget *radiobutton2 = NULL;
3478 LiVESWidget *spinbutton_pb_speed;
3479 LiVESWidget *spinbutton_pb_time = NULL;
3480 LiVESWidget *cancelbutton;
3481 LiVESWidget *change_pb_ok;
3482 LiVESWidget *change_audio_speed;
3484 LiVESAccelGroup *accel_group;
3486 LiVESSList *rbgroup = NULL;
3488 char label_text[256];
3493 title = (
_(
"Change Playback Speed"));
3494 }
else if (type == 2) {
3495 title = (
_(
"Resample Video"));
3497 title = (
_(
"Adjust Clip Volume"));
3514 lives_snprintf(label_text, 256,
3515 _(
"Current playback speed is %.3f frames per second.\n\n"
3516 "Please enter the desired playback speed\nin _frames per second"),
3518 }
else if (type == 2) {
3519 lives_snprintf(label_text, 256,
3520 _(
"Current playback speed is %.3f frames per second.\n\n"
3521 "Please enter the _resampled rate\nin frames per second"),
3523 }
else if (type == 3) {
3524 lives_snprintf(label_text, 256,
3525 _(
"Current volume level for this clip is %.2f.\n\n"
3526 "You may select a new _volume level here.\n\n"
3527 "Please note that the volume can also be varied during playback\n"
3528 "using the %s and %s keys.\nChanging it here will make "
3529 "the adjustment permanent.\n"),
"'<'",
"'>'",
cfile->vol);
3542 }
else if (type == 2) {
3567 (
double)((
int)(
cfile->frames /
cfile->fps * 100.)) / 100.,
3568 1. /
FPS_MAX,
cfile->frames, 1., 10., 2, LIVES_BOX(hbox), NULL);
3580 (
_(
"Change the _audio speed as well"),
FALSE, LIVES_BOX(ca_hbox), NULL);
3590 LIVES_RESPONSE_CANCEL);
3593 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
3618 lives_signal_sync_connect(LIVES_GUI_OBJECT(change_audio_speed), LIVES_WIDGET_TOGGLED_SIGNAL,
3621 lives_signal_sync_connect(LIVES_GUI_OBJECT(cancelbutton), LIVES_WIDGET_CLICKED_SIGNAL,
3624 lives_signal_sync_connect(LIVES_GUI_OBJECT(change_pb_ok), LIVES_WIDGET_CLICKED_SIGNAL,
3626 }
else if (type == 2) {
3630 }
else if (type == 3) {
3631 lives_signal_sync_connect(LIVES_GUI_OBJECT(change_pb_ok), LIVES_WIDGET_CLICKED_SIGNAL,
3632 LIVES_GUI_CALLBACK(on_avolch_ok), NULL);
3635 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(spinbutton_pb_speed), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
3639 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(spinbutton_pb_time), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
3641 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(spinbutton_pb_speed), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
3643 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(spinbutton_pb_time), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
3645 lives_signal_sync_connect(LIVES_GUI_OBJECT(radiobutton2), LIVES_WIDGET_TOGGLED_SIGNAL,
3653static void rb_aud_sel_pressed(LiVESButton * button, livespointer user_data) {
3664 LiVESWidget *dialog_vbox;
3666 LiVESWidget *rb_sel;
3669 char *label_text = NULL, *label_text2 = NULL, *title;
3673 LiVESSList *radiobutton_group = NULL;
3678 title = (
_(
"Fade Audio In"));
3680 title = (
_(
"Fade Audio Out"));
3695 label_text = (
_(
"Fade in over "));
3696 label_text2 = (
_(
"first"));
3697 }
else if (type == 1) {
3698 label_text = (
_(
"Fade out over "));
3699 label_text2 = (
_(
"last"));
3714 max =
cfile->laudio_time;
3719 LIVES_BOX(hbox), NULL);
3734 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(rb_sel), LIVES_WIDGET_TOGGLED_SIGNAL,
3735 LIVES_GUI_CALLBACK(rb_aud_sel_pressed), (livespointer)audd);
3746 LiVESWidget *dialog_vbox;
3751 LiVESWidget *buttond;
3753 char *extrabit, *title;
3757 if (filename) extrabit = (
_(
" (Optional)"));
3758 else extrabit = lives_strdup(
"");
3786 lives_table_attach(LIVES_TABLE(table), label, 0, 1, 0, 1, (LiVESAttachOptions)(LIVES_FILL),
3787 (LiVESAttachOptions)(0), 0, 0);
3792 (LiVESAttachOptions)(LIVES_FILL),
3793 (LiVESAttachOptions)(0), 0, 0);
3798 (LiVESAttachOptions)(LIVES_FILL),
3799 (LiVESAttachOptions)(0), 0, 0);
3804 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
3805 (LiVESAttachOptions)(LIVES_EXPAND), 0, 0);
3810 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
3811 (LiVESAttachOptions)(LIVES_EXPAND), 0, 0);
3816 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
3817 (LiVESAttachOptions)(LIVES_EXPAND), 0, 0);
3841 lives_signal_sync_connect(buttond, LIVES_WIDGET_CLICKED_SIGNAL, LIVES_GUI_CALLBACK(
on_save_subs_activate),
3852 char xfilename[512];
3853 char *osubfname = NULL;
3855 lives_snprintf(xfilename, 512,
"%s", filename);
3884static char last_good_folder[
PATH_MAX];
3886static void chooser_check_dir(LiVESFileChooser * chooser, livespointer user_data) {
3887 char *cwd = lives_get_current_dir();
3891 new_dir = gtk_file_chooser_get_current_folder(chooser);
3894 QFileDialog *qchooser =
static_cast<QFileDialog *
>(chooser);
3895 new_dir = qchooser->directory().path().toLocal8Bit().data();
3906 gtk_file_chooser_set_current_folder(chooser, last_good_folder);
3909 qchooser->setDirectory(last_good_folder);
3915 lives_snprintf(last_good_folder,
PATH_MAX,
"%s", new_dir);
3931 LiVESWidget *tentry = LIVES_WIDGET(user_data);
3934 char *dirname = NULL, *fname, *tmp, *def_dir = NULL;
3935 boolean is_dir =
TRUE, free_def_dir =
FALSE;
3948 is_dir = LIVES_POINTER_TO_INT(lives_widget_object_get_data(LIVES_WIDGET_OBJECT(button),
ISDIR_KEY));
3951 def_dir = (
char *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(button),
DEFDIR_KEY);
3954 filt = (
char **)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(button),
FILTER_KEY);
3957 if (lives_widget_object_get_data(LIVES_WIDGET_OBJECT(button),
FILESEL_TYPE_KEY)) {
3958 filesel_type = LIVES_POINTER_TO_INT(lives_widget_object_get_data(LIVES_WIDGET_OBJECT(button),
FILESEL_TYPE_KEY));
3978 switch (filesel_type) {
3980 if (!is_dir && *fname && (!def_dir || !(*def_dir))) {
3982 free_def_dir =
TRUE;
3985 dirname =
choose_file(is_dir ? fname : def_dir, is_dir ? NULL : fname, filt,
3986 is_dir ? LIVES_FILE_CHOOSER_ACTION_SELECT_FOLDER :
3988 ? LIVES_FILE_CHOOSER_ACTION_SELECT_DEVICE :
3989 LIVES_FILE_CHOOSER_ACTION_OPEN, NULL, NULL);
3993 dirname =
choose_file(fname, NULL, NULL, LIVES_FILE_CHOOSER_ACTION_CREATE_FOLDER, NULL, NULL);
3996 dirname =
choose_file(fname, NULL, NULL, LIVES_FILE_CHOOSER_ACTION_SELECT_FOLDER, NULL, NULL);
3999 dirname =
choose_file(fname, NULL, NULL, LIVES_FILE_CHOOSER_ACTION_CREATE_FOLDER, NULL, NULL);
4001 if (strcmp(dirname, fname)) {
4004 FALSE) == LIVES_RESPONSE_RETRY) {
4006 dirname = lives_strdup(fname);
4013 boolean free_filt =
FALSE;
4015 lives_snprintf(dirnamex,
PATH_MAX,
"%s", fname);
4016 lives_snprintf(fnamex,
PATH_MAX,
"%s", fname);
4021 if (!is_dir && !filt && *fnamex) {
4032 dirname =
choose_file(def_dir ? def_dir : dirnamex, fnamex, filt, LIVES_FILE_CHOOSER_ACTION_SAVE, NULL, NULL);
4050 if (resp == LIVES_RESPONSE_ACCEPT) {
4057 if (fname && fname != def_dir)
lives_free(fname);
4061 if (!dirname)
return;
4065 (tmp = lives_filename_to_utf8(dirname, -1, NULL, NULL, NULL)));
4066 else lives_text_view_set_text(LIVES_TEXT_VIEW(tentry), (tmp = lives_filename_to_utf8(dirname, -1, NULL, NULL, NULL)), -1);
4069 if ((rfx = (
lives_rfx_t *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(tentry),
"rfx")) != NULL) {
4071 int param_number = LIVES_POINTER_TO_INT(lives_widget_object_get_data(LIVES_WIDGET_OBJECT(tentry),
"param_number"));
4080char *
choose_file(
const char *dir,
const char *fname,
char **
const filt, LiVESFileChooserAction act,
4081 const char *title, LiVESWidget * extra_widget) {
4085 LiVESWidget *chooser;
4088 char *filename = NULL;
4094 if (act == LIVES_FILE_CHOOSER_ACTION_SELECT_DEVICE) {
4096 act = LIVES_FILE_CHOOSER_ACTION_OPEN;
4097 }
else if (act == LIVES_FILE_CHOOSER_ACTION_SELECT_FOLDER) {
4105 if (act != LIVES_FILE_CHOOSER_ACTION_SAVE) {
4106 const char *stocklabel;
4107 if (act == LIVES_FILE_CHOOSER_ACTION_OPEN) {
4110 chooser = gtk_file_chooser_dialog_new(mytitle, LIVES_WINDOW(
LIVES_MAIN_WINDOW_WIDGET), (LiVESFileChooserAction)act,
4112 stocklabel, LIVES_RESPONSE_ACCEPT, NULL);
4114 chooser = gtk_file_chooser_dialog_new(mytitle, LIVES_WINDOW(
LIVES_MAIN_WINDOW_WIDGET), (LiVESFileChooserAction)act,
4120 gtk_file_chooser_set_current_folder(LIVES_FILE_CHOOSER(chooser), dir);
4129 gtk_file_chooser_set_local_only(LIVES_FILE_CHOOSER(chooser),
TRUE);
4132 GtkFileFilter *filter = gtk_file_filter_new();
4133 for (i = 0; filt[i]; i++) gtk_file_filter_add_pattern(filter, filt[i]);
4134 gtk_file_chooser_set_filter(LIVES_FILE_CHOOSER(chooser), filter);
4135 if (i == 1 && act == LIVES_FILE_CHOOSER_ACTION_SAVE)
4136 gtk_file_chooser_set_current_name(LIVES_FILE_CHOOSER(chooser), filt[0]);
4140 if (act == LIVES_FILE_CHOOSER_ACTION_SAVE || act == LIVES_FILE_CHOOSER_ACTION_CREATE_FOLDER) {
4141 gtk_file_chooser_set_current_name(LIVES_FILE_CHOOSER(chooser), fname);
4143 char *ffname = lives_build_filename(dir, fname, NULL);
4144 gtk_file_chooser_select_filename(LIVES_FILE_CHOOSER(chooser), ffname);
4180 lives_signal_sync_connect(chooser, LIVES_WIDGET_CURRENT_FOLDER_CHANGED_SIGNAL, LIVES_GUI_CALLBACK(chooser_check_dir), NULL);
4191 gtk_file_chooser_set_current_folder(LIVES_FILE_CHOOSER(chooser), dir);
4192 gtk_file_chooser_add_shortcut_folder(LIVES_FILE_CHOOSER(chooser), dir, NULL);
4196 return (
char *)chooser;
4200 if ((response =
lives_dialog_run(LIVES_DIALOG(chooser))) != LIVES_RESPONSE_CANCEL) {
4203 -1, NULL, NULL, NULL);
4205 }
else filename = NULL;
4207 if (response && filename && act == LIVES_FILE_CHOOSER_ACTION_SAVE) {
4221char *
choose_file_bg(
const char *dir,
const char *fname,
char **
const filt, LiVESFileChooserAction act,
4222 const char *title, LiVESWidget * extra_widget) {
4224 NULL,
"ssvisv", dir, fname, filt, act, title, extra_widget);
4246 LiVESWidget *chooser;
4251 chooser = (LiVESWidget *)
choose_file(dir, NULL, filt, LIVES_FILE_CHOOSER_ACTION_SELECT_FOLDER,
4253 gtk_file_chooser_set_create_folders(LIVES_FILE_CHOOSER(chooser),
TRUE);
4255 chooser = (LiVESWidget *)
choose_file(dir, NULL, filt, LIVES_FILE_CHOOSER_ACTION_SELECT_FOLDER,
4262 gtk_file_chooser_set_select_multiple(LIVES_FILE_CHOOSER(chooser),
TRUE);
4266 switch (filesel_type) {
4295 if (w > scr_width - bx || h > scr_height - by) {
4296 if (w > scr_width - bx || h > scr_height - by) {
4297 int overflowx = w - (scr_width - bx);
4298 int overflowy = h - (scr_height - by);
4303#ifdef DEBUG_OVERFLOW
4304 g_print(
"overflow is %d X %d\n", overflowx, overflowy);
4306 if (overflowx > 0) mywidth -= overflowx;
4307 if (overflowy > 0) myheight -= overflowy;
4311 if (overflowx > 0 || overflowy > 0) {
4317 h = scr_height - by;
4356 LiVESWidget *dialog_vbox;
4357 LiVESWidget *cancelbutton;
4358 LiVESWidget *discardbutton;
4359 LiVESWidget *savebutton = NULL;
4361 LiVESAccelGroup *accel_group;
4363 char *labeltext = NULL;
4371 labeltext = lives_strdup(
4372 _(
"You are about to leave multitrack mode.\n"
4373 "The current layout has not been saved.\nWhat would you like to do ?\n"));
4375 labeltext = lives_strdup(
4376 _(
"You are about to leave multitrack mode.\n"
4377 "The current layout has been changed since the last save.\n"
4378 "What would you like to do ?\n"));
4380 }
else if (type == 1) {
4382 _(
"You are about to exit LiVES.\n"
4383 "The current clip set can be saved.\n"
4384 "What would you like to do ?\n"));
4385 else labeltext = (
_(
"The current clip set has not been saved.\nWhat would you like to do ?\n"));
4386 }
else if (type == 2 || type == 3) {
4389 labeltext = (
_(
"The current layout has not been saved.\nWhat would you like to do ?\n"));
4391 labeltext = lives_strdup(
4392 _(
"The current layout has *NOT BEEN CHANGED* since it was last saved.\n"
4393 "What would you like to do ?\n"));
4395 }
else if (type == 4) {
4396 labeltext = lives_strdup(
4397 _(
"You are about to leave multitrack mode.\n"
4398 "The current layout contains generated frames and cannot be retained.\n"
4399 "What do you wish to do ?"));
4409 LiVESWidget *checkbutton;
4423 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(checkbutton),
"cdsw", (livespointer)cdsw);
4425 lives_signal_sync_connect(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
4438 LIVES_RESPONSE_CANCEL);
4441 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
4444 (type == 2) ? LIVES_RESPONSE_ABORT : LIVES_RESPONSE_RESET);
4446 if ((type == 0 && !*
mainw->
multitrack->layout_name) || type == 3 || type == 4)
4449 else if (type == 1) {
4457 (type == 2) ? LIVES_RESPONSE_RETRY : LIVES_RESPONSE_ACCEPT);
4475static void flip_cdisk_bit(LiVESToggleButton * t, livespointer user_data) {
4476 uint32_t bitmask = LIVES_POINTER_TO_INT(user_data);
4482 LiVESWidget *dialog;
4483 LiVESWidget *dialog_vbox;
4484 LiVESWidget *scrollw;
4487 LiVESWidget *checkbutton;
4488 LiVESWidget *okbutton;
4512 (tmp2 = (H_(
"Enable attempted recovery of potential lost clips before deleting them.\n"
4513 "Can be overriden after disk analysis."))));
4517 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
4518 LIVES_GUI_CALLBACK(flip_cdisk_bit),
4526 (tmp2 = (H_(
"Remove any empty directories within the working directory"))));
4530 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
4531 LIVES_GUI_CALLBACK(flip_cdisk_bit),
4539 (tmp2 = (H_(
"Delete any clips which are not currently loaded or part of a set\n"
4540 "If 'Check for Lost Clips' is set, LiVES will try to recover them first"))));
4544 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
4545 LIVES_GUI_CALLBACK(flip_cdisk_bit),
4554 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
4555 LIVES_GUI_CALLBACK(flip_cdisk_bit),
4564 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
4565 LIVES_GUI_CALLBACK(flip_cdisk_bit),
4570 LIVES_RESPONSE_RETRY);
4581#ifdef GTK_TEXT_VIEW_DRAW_BUG
4585static boolean exposetview(LiVESWidget * widget, lives_painter_t *cr, livespointer user_data) {
4586 LiVESWidgetColor fgcol, bgcol;
4588 LingoLayout *layout = NULL;
4589 lives_painter_surface_t *surface;
4613 if (LINGO_IS_LAYOUT(layout)) {
4614 lingo_painter_show_layout(cr, layout);
4633#ifdef GTK_TEXT_VIEW_DRAW_BUG
4634 expt = lives_signal_sync_connect(LIVES_GUI_OBJECT(textview), LIVES_WIDGET_EXPOSE_EVENT,
4635 LIVES_GUI_CALLBACK(exposetview), NULL);
4638 return LIVES_TEXT_VIEW(textview);
4644static void pair_add(LiVESWidget * table,
const char *key,
const char *meaning) {
4645 LiVESWidget *labelk, *labelm, *align;
4646 double kalign = 0., malign = 0.;
4647 boolean key_all =
FALSE;
4657 pair_add(table, meaning,
"");
4658 pair_add(table, NULL,
"");
4709 (LiVESAttachOptions)(LIVES_FILL),
4710 (LiVESAttachOptions)(0), 0, 0);
4716 (LiVESAttachOptions)(LIVES_EXPAND),
4717 (LiVESAttachOptions)(0), 0, 0);
4720 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
4721 (LiVESAttachOptions)(0), 0, 0);
4730#define ADD_KEYDEF(key, desc) pair_add(textwindow->table, (tmp = lives_strdup(key)), (tmp2 = lives_strdup(desc))); \
4731 lives_free(tmp); lives_free(tmp2)
4734 char *tmp = (
_(
"Show Keys")), *tmp2;
4745 ADD_KEYDEF(
_(
"You can use the following keys during playback to control LiVES:-"), NULL);
4747 ADD_KEYDEF(NULL,
_(
"Recordable keys (press 'r' before playback to make a recording)"));
4748 ADD_KEYDEF(
_(
"ctrl-left"),
_(
"skip / scratch backwards (video only)\nWhen not playing moves the playback cursor"));
4749 ADD_KEYDEF(
_(
"ctrl-right"),
_(
"skip / scratch forwards (video only)\nWhen not playing moves the playback cursor"));
4752 ADD_KEYDEF(
_(
"ctrl-shift-up"),
_(
"background clip play faster"));
4753 ADD_KEYDEF(
_(
"ctrl-shift-down"),
_(
"background clip play slower"));
4754 ADD_KEYDEF(
_(
"ctrl-alt-up"),
_(
"increase effect parameter for keygrabbed effect"));
4755 ADD_KEYDEF(
_(
"ctrl-alt-down"),
_(
"decrease effect parameter for keybrabbed effect"));
4756 ADD_KEYDEF(
_(
"ctrl-enter"),
_(
"reset frame rate / resync audio (foreground clip)"));
4757 ADD_KEYDEF(
_(
"ctrl-shift-enter"),
_(
"reset frame rate (background clip)"));
4758 ADD_KEYDEF(
_(
"ctrl-space"),
_(
"reverse direction (foreground clip)"));
4759 ADD_KEYDEF(
_(
"ctrl-shift-space"),
_(
"reverse direction (background clip)"));
4761 _(
"Loop Lock\n(press once to mark IN point, then again to mark OUT point;\n"
4762 "ctrl-space, ctrl-enter, or switching clips clears)"));
4763 ADD_KEYDEF(
_(
"ctrl-backspace"),
_(
"freeze frame (foreground and background)"));
4764 ADD_KEYDEF(
_(
"ctrl-alt-backspace"),
_(
"freeze frame (background clip only)"));
4766 _(
"audio lock ON: lock audio to the current foreground clip;\nignore video clip switches and rate / direction changes"));
4767 ADD_KEYDEF(
"A",
_(
"audio lock OFF; audio follows the foreground video clip\n(unless overridden in Preferences)"));
4772 ADD_KEYDEF(
_(
"ctrl-1"),
_(
"toggle real-time effect 1"));
4773 ADD_KEYDEF(
_(
"ctrl-2"),
_(
"toggle real-time effect 2"));
4775 ADD_KEYDEF(
_(
"ctrl-9"),
_(
"toggle real-time effect 9"));
4776 ADD_KEYDEF(
_(
"ctrl-0"),
_(
"real-time effects (1 - 9) OFF"));
4777 ADD_KEYDEF(
_(
"ctrl-minus"),
_(
"toggle real-time effect 10 (unaffected by ctrl-0)"));
4778 ADD_KEYDEF(
_(
"ctrl-equals"),
_(
"toggle real-time effect 11 (unaffected by ctrl-0)"));
4779 ADD_KEYDEF(
"x",
_(
"swap background / foreground clips"));
4781 ADD_KEYDEF(
"k",
_(
"grab keyboard for last activated effect key\n(affects m, M, t, tab and ctrl-alt-up, ctrl-alt-down keys)"));
4782 ADD_KEYDEF(
"m",
_(
"next effect mode (for whichever key has keyboard grab)"));
4783 ADD_KEYDEF(
"M",
_(
"previous effect mode (for whichever key has keyboard grab)"));
4784 ADD_KEYDEF(
_(
"ctrl-alt-1"),
_(
"grab keyboard for effect key 1 (similar to k key)"));
4785 ADD_KEYDEF(
_(
"ctrl-alt-2"),
_(
"grab keyboard for effect key 2"));
4787 ADD_KEYDEF(
"t",
_(
"enter text parameter (when effect has keyboard grab)"));
4788 ADD_KEYDEF(
_(
"TAB"),
_(
"leave text parameter (reverse of 't')"));
4789 ADD_KEYDEF(
_(
"F1"),
_(
"store/switch to bookmark 1 (first press stores clip and frame)"));
4792 ADD_KEYDEF(
_(
"F12"),
_(
"clear function keys (bookmarks)"));
4800 ADD_KEYDEF(
"d",
_(
"double sized playarea (only in clip edit mode)"));
4801 ADD_KEYDEF(
"r",
_(
"toggle recording mode (clip edit mode only)"));
4802 ADD_KEYDEF(
"b",
_(
"blank / unblank the interface background (clip editor only)"));
4803 ADD_KEYDEF(
"o",
_(
"activate / deactivate continuous looping"));
4804 ADD_KEYDEF(
"g",
_(
"enable / disable ping pong looping"));
4805 ADD_KEYDEF(
"l",
_(
"enable / disable stop on audio end\n(ignored if continuous loop is active)"));
4806 ADD_KEYDEF(
"<",
_(
"lower the volume of current audio clip"));
4807 ADD_KEYDEF(
">",
_(
"increase the volume of current audio clip"));
4808 ADD_KEYDEF(
"w",
_(
"display a/v sync status (developer mode)"));
4815 char *tmp = (
_(
"Multitrack Keys")), *tmp2;
4825 ADD_KEYDEF(
_(
"You can use the following keys to control the multitrack window:"), NULL);
4827 ADD_KEYDEF(
_(
"ctrl-left-arrow"),
_(
"move timeline cursor left 1 second"));
4828 ADD_KEYDEF(
_(
"ctrl-right-arrow"),
_(
"move timeline cursor right 1 second"));
4829 ADD_KEYDEF(
_(
"shift-left-arrow"),
_(
"move timeline cursor left 1 frame"));
4830 ADD_KEYDEF(
_(
"shift-right-arrow"),
_(
"move timeline cursor right 1 frame"));
4831 ADD_KEYDEF(
_(
"ctrl-up-arrow"),
_(
"move current track up"));
4832 ADD_KEYDEF(
_(
"ctrl-down-arrow"),
_(
"move current track down"));
4833 ADD_KEYDEF(
_(
"ctrl-page-up"),
_(
"select previous clip"));
4834 ADD_KEYDEF(
_(
"ctrl-page-down"),
_(
"select next clip"));
4835 ADD_KEYDEF(
_(
"ctrl-space"),
_(
"select/deselect current track"));
4838 ADD_KEYDEF(
"m",
_(
"make a mark on the timeline (during playback)"));
4841 ADD_KEYDEF(
"",
_(
"For other keys, see the menus.\n"));
4854 LiVESWidget *trigframe;
4855 LiVESWidget *dialog_vbox;
4859 LiVESWidget *radiobutton;
4861 LiVESSList *radiobutton1_group = NULL;
4862 LiVESSList *radiobutton2_group = NULL;
4883 &radiobutton1_group, LIVES_BOX(hbox),
4884 (tmp2 = (
_(
"Trigger a change based on time"))));
4889 1., 10., 0, LIVES_BOX(hbox), NULL);
4894 &radiobutton1_group, LIVES_BOX(hbox),
4895 (tmp2 = (
_(
"Trigger a change based on receiving an OSC message"))));
4917 &radiobutton2_group, LIVES_BOX(hbox),
4918 (tmp2 = (
_(
"Start playback automatically"))));
4923 &radiobutton2_group, LIVES_BOX(hbox),
4924 (tmp2 = (
_(
"Wait for the user to start playback"))));
4932 ((tmp = (
_(
"Mute internal audio during playback"))),
FALSE, LIVES_BOX(hbox),
4933 (tmp2 = (
_(
"Mute the audio in LiVES during playback by setting the audio source to external."))));
4945 ((tmp = (
_(
"Debug mode"))),
FALSE, LIVES_BOX(hbox),
4946 (tmp2 = (
_(
"Show debug output on stderr."))));
4955static boolean special_cleanup_cb(LiVESWidget * widget,
void *userdata) {
4968 aspect_width.
widgets[0] = (LiVESWidget *)sp_width;
4969 aspect_height.
widgets[0] = (LiVESWidget *)sp_height;
4976 lives_signal_sync_connect(LIVES_GUI_OBJECT(sp_width), LIVES_WIDGET_DESTROY_SIGNAL,
4977 LIVES_GUI_CALLBACK(special_cleanup_cb), NULL);
4983LiVESWidget *
add_list_expander(LiVESBox * box,
const char *title,
int width,
int height, LiVESList * xlist) {
4986 LiVESWidget *expander;
4990 LiVESWidget *scrolledwindow =
5014 for (; xlist; xlist = xlist->next) {
5022#ifdef ALLOW_NONFREE_CODECS
5023static void on_freedom_toggled(LiVESToggleButton * togglebutton, livespointer user_data) {
5024 LiVESWidget *label = (LiVESWidget *)user_data;
5030static LiVESWidget *spinbutton_width;
5031static LiVESWidget *spinbutton_height;
5034static void utsense(LiVESToggleButton * togglebutton, livespointer user_data) {
5035 boolean sensitive = (
boolean)LIVES_POINTER_TO_INT(user_data);
5042static void dl_url_changed(LiVESWidget * urlw, livespointer user_data) {
5043 LiVESWidget *namew = (LiVESWidget *)user_data;
5044 static size_t oldlen = 0;
5053static void on_utupinfo_clicked(LiVESWidget * b, livespointer data) {
5054 do_info_dialogf(
_(
"LiVES will only update %s if you have a local user copy installed.\n"
5055 "Otherwise you may need to update it manually when prompted\n\n"
5056 "Checking the button for the first time will cause the program to be copied\n"
5057 "to your home directory.\n"
5058 "After this it can be updated without needing root privileges.\n"),
5072 LiVESWidget *dialog_vbox;
5074 LiVESWidget *ext_label;
5076 LiVESWidget *dialog;
5077 LiVESWidget *url_entry;
5078 LiVESWidget *name_entry;
5079 LiVESWidget *dir_entry;
5080 LiVESWidget *checkbutton_update;
5081 LiVESWidget *cb_debug = NULL;
5082#ifdef ALLOW_NONFREE_CODECS
5083 LiVESWidget *radiobutton_free;
5084 LiVESWidget *radiobutton_nonfree;
5086 LiVESWidget *radiobutton_approx;
5087 LiVESWidget *radiobutton_atleast;
5088 LiVESWidget *radiobutton_atmost;
5089 LiVESWidget *radiobutton_smallest;
5090 LiVESWidget *radiobutton_largest;
5091 LiVESWidget *radiobutton_choose;
5092 LiVESWidget *button;
5094 double width_step = 4.;
5095 double height_step = 4.;
5099#ifdef ALLOW_NONFREE_CODECS
5100 LiVESSList *radiobutton_group = NULL;
5102 LiVESSList *radiobutton_group2 = NULL;
5104 char *title, *tmp, *tmp2, *msg;
5105 char *dfile = NULL, *url = NULL;
5109 uint64_t gflags = 0;
5112 LiVESResponseType response;
5113 boolean only_free =
TRUE;
5114 boolean debug =
FALSE;
5115 static boolean firsttime =
TRUE;
5134 }
else if (firsttime) {
5141#ifdef ALLOW_NONFREE_CODECS
5142 if (req) only_free = !req->
allownf;
5145 if (req) debug = req->
debug;
5147 title = (
_(
"Open Online Clip"));
5157 msg =
lives_strdup_printf(
_(
"To open a clip from Youtube or another video site, LiVES will first download it with %s.\n"),
5173 H_(
"If checked then LiVES will attempt to update\n"
5174 "it to the most recent version\n"
5175 "before attempting the download."));
5182 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
5183 LIVES_GUI_CALLBACK(on_utupinfo_clicked), NULL);
5188 "E.g: http://www.youtube.com/watch?v=WCR6f6WzjP8"));
5207#ifdef ALLOW_NONFREE_CODECS
5214 (tmp2 = (
_(
"Download clip using Free codecs and support the community"))));
5225 lives_signal_sync_connect(LIVES_GUI_OBJECT(url_entry), LIVES_WIDGET_CHANGED_SIGNAL,
5226 LIVES_GUI_CALLBACK(dl_url_changed), name_entry);
5228#ifdef ALLOW_NONFREE_CODECS
5238 &radiobutton_group, LIVES_BOX(hbox),
5239 (tmp2 = (
_(
"Download clip using non-free codecs and support commercial interests"))));
5245 lives_signal_sync_connect(LIVES_GUI_OBJECT(radiobutton_nonfree), LIVES_WIDGET_TOGGLED_SIGNAL,
5246 LIVES_GUI_CALLBACK(on_freedom_toggled), (livespointer)ext_label);
5261 LIVES_BOX(hbox), NULL);
5279 &radiobutton_group2, LIVES_BOX(hbox),
5280 (tmp2 = (
_(
"Download the closest to this size"))));
5284 lives_signal_sync_connect(LIVES_GUI_OBJECT(radiobutton_approx), LIVES_WIDGET_TOGGLED_SIGNAL,
5285 LIVES_GUI_CALLBACK(utsense), LIVES_INT_TO_POINTER(
TRUE));
5289 (tmp2 = (
_(
"Frame size should be at least this size"))));
5292 lives_signal_sync_connect(LIVES_GUI_OBJECT(radiobutton_atleast), LIVES_WIDGET_TOGGLED_SIGNAL,
5293 LIVES_GUI_CALLBACK(utsense), LIVES_INT_TO_POINTER(
TRUE));
5297 (tmp2 = (
_(
"Frame size should be at most this size"))));
5302 lives_signal_sync_connect(LIVES_GUI_OBJECT(radiobutton_atmost), LIVES_WIDGET_TOGGLED_SIGNAL,
5303 LIVES_GUI_CALLBACK(utsense), LIVES_INT_TO_POINTER(
TRUE));
5309 width_step, 100000., width_step, width_step, 0, LIVES_BOX(hbox), NULL);
5316 height_step, 100000., height_step, height_step, 0, LIVES_BOX(hbox), NULL);
5327 LIVES_SPIN_BUTTON(spinbutton_height), LIVES_BOX(hbox));
5328 }
else aspect = NULL;
5340 &radiobutton_group2, LIVES_BOX(hbox),
5341 (tmp2 = (
_(
"Download the lowest resolution available"))));
5345 lives_signal_sync_connect(LIVES_GUI_OBJECT(radiobutton_smallest), LIVES_WIDGET_TOGGLED_SIGNAL,
5346 LIVES_GUI_CALLBACK(utsense), LIVES_INT_TO_POINTER(
FALSE));
5349 &radiobutton_group2, LIVES_BOX(hbox),
5350 (tmp2 = (
_(
"Download the highest resolution available"))));
5354 lives_signal_sync_connect(LIVES_GUI_OBJECT(radiobutton_largest), LIVES_WIDGET_TOGGLED_SIGNAL,
5355 LIVES_GUI_CALLBACK(utsense), LIVES_INT_TO_POINTER(
FALSE));
5361 &radiobutton_group2, LIVES_BOX(hbox),
5362 (tmp2 = (
_(
"Choose the resolution from a list (opens in new window)"))));
5366 lives_signal_sync_connect(LIVES_GUI_OBJECT(radiobutton_choose), LIVES_WIDGET_TOGGLED_SIGNAL,
5367 LIVES_GUI_CALLBACK(utsense), LIVES_INT_TO_POINTER(
FALSE));
5388 if (response == LIVES_RESPONSE_CANCEL) {
5396 do_error_dialog(
_(
"Please enter the name of the file to save the downloaded clip as.\n"));
5412 dfile = lives_build_filename(dirname, fname, NULL);
5430 LIVES_ERROR(
"Could not alloc memory for remote clip request");
5440 d_print(
_(
"Downloading %s to %s..."), url, dfile);
5443 lives_snprintf(req->
URI, 8192,
"%s", url);
5447#ifdef ALLOW_NONFREE_CODECS
5484static boolean on_ebox_click(LiVESWidget * widget, LiVESXEventButton * event, livespointer user_data) {
5486 int val = LIVES_POINTER_TO_INT(user_data);
5487 if (event->type != LIVES_BUTTON_PRESS) {
5497 int numlines, npieces;
5499 int i, j, dbw, pdone;
5507 char **lines, **pieces;
5512 LiVESWidget *dialog, *dialog_vbox, *scrollw, *table;
5513 LiVESWidget *label, *eventbox, *cancelbutton;
5516 LiVESList *allids = NULL;
5522 if (numlines < 2)
return FALSE;
5523 lines = lives_strsplit(
mainw->
msg,
"|", numlines);
5524 if (strcmp(lines[0],
"completed")) {
5525 lives_strfreev(lines);
5533 title = (
_(
"Select Video Format to Download"));
5538 if (LIVES_IS_BOX(abox)) {
5546 LIVES_RESPONSE_CANCEL);
5548 lives_signal_sync_connect(LIVES_GUI_OBJECT(cancelbutton), LIVES_WIDGET_CLICKED_SIGNAL,
5552 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
5568 notes = lives_strdup(
"");
5573 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
5574 (LiVESAttachOptions)(0), 0, 0);
5580 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
5581 (LiVESAttachOptions)(0), 0, 0);
5587 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
5588 (LiVESAttachOptions)(0), 0, 0);
5594 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
5595 (LiVESAttachOptions)(0), 0, 0);
5600 for (i = 1; i < numlines; i++) {
5602 pieces = lives_strsplit(lines[i],
" ", npieces);
5605 for (j = 0; j < npieces; j++) {
5606 if (pdone < 3 && !*pieces[j])
continue;
5617 lives_signal_sync_connect(LIVES_GUI_OBJECT(eventbox), LIVES_WIDGET_BUTTON_PRESS_EVENT,
5618 LIVES_GUI_CALLBACK(on_ebox_click),
5619 LIVES_INT_TO_POINTER(row - 1));
5621 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
5622 (LiVESAttachOptions)(0), 0, 0);
5624 allids = lives_list_append(allids, lives_strdup(pieces[j]));
5638 lives_signal_sync_connect(LIVES_GUI_OBJECT(eventbox), LIVES_WIDGET_BUTTON_PRESS_EVENT,
5639 LIVES_GUI_CALLBACK(on_ebox_click),
5640 LIVES_INT_TO_POINTER(row - 1));
5642 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
5643 (LiVESAttachOptions)(0), 0, 0);
5658 lives_signal_sync_connect(LIVES_GUI_OBJECT(eventbox), LIVES_WIDGET_BUTTON_PRESS_EVENT,
5659 LIVES_GUI_CALLBACK(on_ebox_click),
5660 LIVES_INT_TO_POINTER(row - 1));
5662 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
5663 (LiVESAttachOptions)(0), 0, 0);
5671 lives_strfreev(pieces);
5675 if (slen > 0 && notes[slen - 1] ==
'\n') notes[slen - 1] = 0;
5684 lives_signal_sync_connect(LIVES_GUI_OBJECT(eventbox), LIVES_WIDGET_BUTTON_PRESS_EVENT,
5685 LIVES_GUI_CALLBACK(on_ebox_click),
5686 LIVES_INT_TO_POINTER(row - 1));
5688 (LiVESAttachOptions)(LIVES_EXPAND | LIVES_FILL),
5689 (LiVESAttachOptions)(0), 0, 0);
5691 notes = lives_strdup(
"");
5695 lives_strfreev(lines);
5708 lives_snprintf(req->
vidchoice, 512,
"%s", (
char *)lives_list_nth_data(allids, response));
5716static void lives_show_after(LiVESWidget * button, livespointer data) {
5717 LiVESWidget *showme = (LiVESWidget *)data;
5722static void workdir_query_cb(LiVESWidget * w, LiVESWidget * dlg) {
5741static void cleards_cb(LiVESWidget * w, LiVESWidget * dlg) {
5759static void manclips_del(LiVESWidget * button,
_entryw *
renamew) {
5760 boolean is_curset =
FALSE;
5763 if (!*setname)
return;
5768 fsetname = lives_strdup(
_(
"current set"));
5773 "Are you sure ?"), fsetname)) {
5779 char *setdir = lives_build_path(
prefs->
workdir, setname, NULL);
5781 if (
send_to_trash(setdir) == LIVES_RESPONSE_CANCEL)
goto retry1;
5802static void manclips_reload(LiVESWidget * button,
_entryw *
renamew) {
5804 if (!*setname)
return;
5811 do_info_dialog(
_(
"The current clips must be saved before reloading another set"));
5817 do_info_dialog(
_(
"After reloading the Set you can inspect it and use it as normal.\n"
5818 "Should you decide to delete it or re-save it, click on\nFile | Close/Save all Clips "
5819 "in the menu of the Clip Editor\n"
5820 "You will then be returned to the Manage Sets dialog,\n"
5821 "where you may choose to continue this process further\n"));
5830static void manclips_ok(LiVESWidget * button, LiVESWidget * dialog) {
5845 lives_signal_sync_connect(LIVES_GUI_OBJECT(
renamew->
cancelbutton), LIVES_WIDGET_CLICKED_SIGNAL,
5846 LIVES_GUI_CALLBACK(lives_show_after), dialog);
5852 NULL, LIVES_RESPONSE_RESET);
5854 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
5855 LIVES_GUI_CALLBACK(manclips_del),
renamew);
5859 _(
"_Reload"), LIVES_RESPONSE_YES);
5861 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
5862 LIVES_GUI_CALLBACK(manclips_reload),
renamew);
5867static void manclips_cb(LiVESWidget * w, livespointer data) {
5868 LiVESWidget *parent = (LiVESWidget *)data;
5869 LiVESWidget *dialog;
5870 LiVESWidget *button;
5876 extra = (
_(
" including the current set."));
5877 }
else extra = lives_strdup(
"");
5880 "You may be able to free up some disk space by deleting "
5881 "unwanted ones.\n\n"
5882 "After selecting an existing Set, "
5883 "you will be presented with the options to "
5884 "erase it from the disk\n"
5885 "or to reload it first to inspect the contents\n\n"
5895 _(
"Go back"), LIVES_RESPONSE_CANCEL);
5896 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
5897 LIVES_GUI_CALLBACK(lives_show_after), data);
5900 _(
"Continue"), LIVES_RESPONSE_OK);
5901 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
5902 LIVES_GUI_CALLBACK(manclips_ok), parent);
5911 double scale, xw, offs_x = 0;
5912 lives_painter_t *cr;
5924 if (width <= 0 || height <= 0)
return;
5954 xw = (double)qq / scale;
6004static void dsu_set_toplabel(
void) {
6005 char *ltext = NULL, *dtxt, *dtxt2;
6013 ltext =
lives_strdup_printf(
_(
"<b>ALERT ! FREE SPACE IN %s IS BELOW THE CRITICAL LEVEL OF %s\n"
6014 "YOU SHOULD EXIT LIVES IMMEDIATELY TO AVOID POSSIBLE DATA LOSS</b>"),
6036 "Action should be taken to remedy this"),
6047 ltext =
lives_strdup_printf(
_(
"ATTENTION: LiVES is currently using over %d%% of its assigned quota"), (
int)pcused);
6049 ltext = lives_strdup(
_(
"ATTENTION ! There is insufficient free space on the disk for LiVES' current quota"));
6054 ltext = lives_strdup(
_(
"LiVES can help limit the amount of diskspace used by projects (sets)."));
6065 static boolean set_label =
FALSE;
6090 dsu_fill_details(NULL, NULL);
6091 qslider_changed(dsq->
slider, dsq);
6107static void qslider_changed(LiVESWidget * slid, livespointer data) {
6125 value = 100. * (double)dq / (
double)(max - min);
6126 if (value > 100.) value = 100.;
6175static void dsq_check_toggled(LiVESWidget * cbutt, livespointer data) {
6183 qslider_changed(dsq->
slider, NULL);
6188static boolean mouse_on =
FALSE;
6190static boolean dsu_widget_clicked(LiVESWidget * widget, LiVESXEventButton * event, livespointer is_clickp) {
6192 is_click = LIVES_POINTER_TO_INT(is_clickp);
6193 if (is_click) mouse_on =
TRUE;
6194 else if (!mouse_on)
return TRUE;
6199 if (width <= 0)
return TRUE;
6208 double value = (double)x * scale;
6209 value -= (double)min;
6210 value = 100. * value / (double)(max - min);
6211 if (value < 0.) value = 0.;
6212 if (value > 100.) value = 100.;
6221static boolean dsu_widget_released(LiVESWidget * widget, LiVESXEventButton * event, livespointer is_clickp) {
6226static void dsu_ok_clicked(LiVESWidget * butt, LiVESWidget * toshow) {
6229 lives_show_after(butt, toshow);
6232static void dsu_fill_details(LiVESWidget * widget, livespointer data) {
6235 LiVESWidget *layout2;
6341 txt2 =
lives_strdup_printf(
_(
"Quota is reduced by %s due to free disk space limitations"), txt);
6345 if (qq < over) qq = 0;
6355 pcu = 100. * (1. - pcu);
6385static void changequota_cb(LiVESWidget * butt, livespointer data) {
6386 static char *otxt = NULL;
6397 "in the disk map above,\n"
6398 "or by dragging the slider below</b>"));
6421 dsu_fill_details(NULL, NULL);
6422 qslider_changed(dsq->
slider, dsq);
6426static void resquota_cb(LiVESWidget * butt, livespointer data) {
6436 changequota_cb(dsq->
button, NULL);
6441static void dsu_abort_clicked(LiVESWidget * butt, livespointer data) {
6446 LiVESWidget *dialog, *dialog_vbox;
6447 LiVESWidget *layout;
6450 LiVESWidget *button;
6451 LiVESWidget *hbox, *hbox2;
6453 LiVESWidget *okbutton;
6454 LiVESWidget *rembutton;
6458 LiVESWidgetColor colr;
6481 title = (
_(
"Disk Space Quota"));
6507 H_(
"The directory where LiVES will save projects (sets)"));
6523 LIVES_GUI_CALLBACK(workdir_query_cb), dialog);
6557 lives_signal_sync_connect(LIVES_GUI_OBJECT(
mainw->
dsu_widget), LIVES_WIDGET_BUTTON_PRESS_EVENT,
6558 LIVES_GUI_CALLBACK(dsu_widget_clicked), LIVES_INT_TO_POINTER(
TRUE));
6560 lives_signal_sync_connect(LIVES_GUI_OBJECT(
mainw->
dsu_widget), LIVES_WIDGET_MOTION_NOTIFY_EVENT,
6561 LIVES_GUI_CALLBACK(dsu_widget_clicked), LIVES_INT_TO_POINTER(
FALSE));
6563 lives_signal_sync_connect(LIVES_GUI_OBJECT(
mainw->
dsu_widget), LIVES_WIDGET_BUTTON_RELEASE_EVENT,
6564 LIVES_GUI_CALLBACK(dsu_widget_released), NULL);
6577 colr.red = colr.green = 0.; colr.blue = 1.;
6585 colr.red = 0.; colr.green = colr.blue = 1.;
6593 colr.red = colr.green = 1.; colr.blue = 0.;
6601 colr.red = colr.blue = 0.; colr.green = 1.;
6609 colr.red = 1.; colr.green = .5; colr.blue = 0.;
6617 colr.red = 1.; colr.green = colr.blue = 0.;
6633 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(dsq->
expander), LIVES_WIDGET_ACTIVATE_SIGNAL,
6634 LIVES_GUI_CALLBACK(dsu_fill_details), dsq);
6636 dsu_fill_details(dsq->
expander, dsq);
6650 "</b> not to exceed its quota\n"
6651 "but it can warn you if this is detected.")),
TRUE);
6654 "is set via commandline option.</b>")),
TRUE);
6665 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(dsq->
resbutton), LIVES_WIDGET_CLICKED_SIGNAL,
6666 LIVES_GUI_CALLBACK(resquota_cb), NULL);
6680 lives_signal_sync_connect_after(LIVES_GUI_OBJECT(dsq->
button), LIVES_WIDGET_CLICKED_SIGNAL,
6681 LIVES_GUI_CALLBACK(changequota_cb), NULL);
6694 LIVES_BOX(hbox), NULL);
6699 dsq->
checkfunc = lives_signal_sync_connect_after(LIVES_GUI_OBJECT(dsq->
checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
6700 LIVES_GUI_CALLBACK(dsq_check_toggled), NULL);
6720 dsq->
sliderfunc = lives_signal_sync_connect_after(LIVES_GUI_OBJECT(dsq->
slider), LIVES_WIDGET_VALUE_CHANGED_SIGNAL,
6721 LIVES_GUI_CALLBACK(qslider_changed), NULL);
6746 LIVES_GUI_CALLBACK(cleards_cb), dialog);
6757 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
6758 LIVES_GUI_CALLBACK(manclips_cb), dialog);
6794 (tmp = lives_strdup(H_(
"These settings can also be changed "
6795 "in Preferences / Warnings"))));
6797 lives_signal_sync_connect(LIVES_GUI_OBJECT(rembutton), LIVES_WIDGET_TOGGLED_SIGNAL,
6803 _(
"Abort"), LIVES_RESPONSE_ABORT);
6807 lives_signal_sync_connect(LIVES_GUI_OBJECT(dsq->
abort_button), LIVES_WIDGET_CLICKED_SIGNAL,
6808 LIVES_GUI_CALLBACK(dsu_abort_clicked),
6814 _(
"FINISH"), LIVES_RESPONSE_OK);
6817 _(
"Continue with current values"), LIVES_RESPONSE_OK);
6821 lives_signal_sync_connect(LIVES_GUI_OBJECT(okbutton), LIVES_WIDGET_CLICKED_SIGNAL,
6822 LIVES_GUI_CALLBACK(dsu_ok_clicked),
6830 qslider_changed(dsq->
slider, NULL);
6836 }
else lives_idle_add_simple(
update_dsu, NULL);
6839 manclips_cb(NULL, dialog);
6847static int vmin = -10000000;
6848static int hmin = -10000000;
6849static int reqheight = -1;
6850static int reqwidth = -1;
6856 if (vmin > 0 || hmin > 0)
return TRUE;
6861static boolean msg_area_scroll_to(LiVESWidget * widget,
int msgno,
boolean recompute, LiVESAdjustment * adj) {
6863 LingoLayout *layout;
6867 int height = -1, lh;
6870 static int last_height = -1;
6875 if (!LIVES_IS_WIDGET(widget))
return FALSE;
6880 if (reqwidth != -1) width = reqwidth;
6883 layout = (LingoLayout *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(widget),
"layout");
6885 if (LINGO_IS_LAYOUT(layout)) lingo_layout_set_text(layout,
"", -1);
6888 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(widget),
"layout", NULL);
6892 if (msgno < 0) msgno = 0;
6899 if (!LINGO_IS_LAYOUT(layout) || !layout) {
6903 lingo_layout_get_size(layout, NULL, &lh);
6905 if (height != last_height) recompute =
TRUE;
6906 last_height = height;
6911 double linesize = lh / nlines;
6912 double page_size = (double)((
int)((double)height / linesize));
6914 lives_widget_object_freeze_notify(LIVES_WIDGET_OBJECT(adj));
6919 lives_widget_object_thaw_notify(LIVES_WIDGET_OBJECT(adj));
6927 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(widget),
"layout", layout);
6928 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(widget),
"layout_height", LIVES_INT_TO_POINTER(lh + .5));
6929 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(widget),
"layout_lines", LIVES_INT_TO_POINTER(nlines));
6930 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(widget),
"layout_last", LIVES_INT_TO_POINTER(msgno));
6936static int height, lheight;
6939 static int wiggle_room = 0;
6940 static int last_height = -1;
6941 static int last_textsize = -1;
6943 static int old_scr_width = -1;
6944 static int old_scr_height = -1;
6946 static int last_overflowy = 10000000;
6947 static int last_overflowx = 10000000;
6949 static int gui_posx = 1000000;
6950 static int gui_posy = 1000000;
6952 LingoLayout *layout;
6955 boolean mustret =
FALSE;
6958 int lineheight, llines, llast;
6961 int bx, by, w = -1, h = -1, posx, posy;
6962 int overflowx = 0, overflowy = 0, xoverflowx, xoverflowy;
6963 int ww, hh, vvmin, hhmin;
6964 int paisize = 0, opaisize;
6975 layout = (LingoLayout *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(widget),
"layout");
6982 if (reqwidth != -1) width = reqwidth;
6984 if (reqheight != -1) height = reqheight;
6991 llast = LIVES_POINTER_TO_INT(lives_widget_object_get_data(LIVES_WIDGET_OBJECT(widget),
6994 if (
mainw->
is_ready && (scr_width != old_scr_width || scr_height != old_scr_height)) {
7003 last_overflowy = 10000000;
7004 last_overflowx = 10000000;
7006 old_scr_height = scr_height;
7007 old_scr_width = scr_width;
7008 gui_posx = gui_posy = 1000000;
7017 if (w == -1) w = ww;
7020 if (h == -1) h = hh;
7023 overflowx = ww - (scr_width - bx);
7024 overflowy = hh - (scr_height - by);
7025#ifdef DEBUG_OVERFLOW
7030 xoverflowx = ww - w;
7031 if (xoverflowx > overflowx) {
7032#ifdef DEBUG_OVERFLOW
7033 g_print(
"ADJ B1 %d = %d - %d - %d\n", xoverflowx, rect.
width, w, bx);
7035 overflowx = xoverflowx;
7040 xoverflowy = hh - h;
7041 if (xoverflowy > overflowy) {
7042#ifdef DEBUG_OVERFLOW
7043 g_print(
"ADJ B2 %d = %d - %d - %d\n", xoverflowy, rect.
height, h, by);
7045 overflowy = xoverflowy;
7049 if (
ABS(overflowx) <= hmin) overflowx = 0;
7050 if (
ABS(overflowy) <= vmin) overflowy = 0;
7052#ifdef DEBUG_OVERFLOW
7053 g_print(
"overflow2 is %d : %d %d %d X %d : %d %d %d [%d %d %d]\n", overflowx, w, scr_width, bx, overflowy,
7054 h, scr_height, by, h,
7058 if (overflowx != 0 && w < scr_width && ww <= scr_width && overflowx == last_overflowx) {
7059 int xhmin =
ABS(overflowx);
7060 if (xhmin <
ABS(hmin)) {
7065 last_overflowx = overflowx;
7067#ifdef DEBUG_OVERFLOW
7068 g_print(
"NOW %d %d %d %d %d\n", overflowy, h, scr_height, hh, last_overflowy);
7070 if (overflowy != 0 && h <= scr_height && hh <= scr_height && overflowy == last_overflowy) {
7071 int xvmin =
ABS(overflowy);
7072 if (xvmin <
ABS(vmin)) {
7077 last_overflowy = overflowy;
7079#ifdef DEBUG_OVERFLOW
7080 g_print(
"WIDG SIZE %d X %d, %d,%d and %d %d %d\n", width, height, hmin, vmin, bx, by, mustret);
7083 if (vvmin < by && by - vmin < vmin) vmin = by - vmin;
7086 if (hhmin < bx && bx - hmin < hmin) hmin = bx - hmin;
7094 if (overflowx != 0 || overflowy != 0) {
7095#ifdef DEBUG_OVERFLOW
7096 g_print(
"overflow is %d X %d : %d %d\n", overflowx, overflowy, width, height);
7099 height -= overflowy;
7108 if (width < 0 || height < 0)
return FALSE;
7119#ifdef DEBUG_OVERFLOW
7120 g_print(
"2MOVE to %d X %d\n", posx, posy);
7128 if (overflowx > 0) posx -= overflowx;
7129 else posx = -overflowx;
7130 if (posx < 0) posx = 0;
7131 if (overflowy > 0) posy = overflowy - posy;
7132 if (posy < 0) posy = 0;
7134 if (posx > gui_posx) posx = gui_posx;
7135 if (posy > gui_posy) posy = gui_posy;
7137#ifdef DEBUG_OVERFLOW
7138 g_print(
"MOVE to %d X %d\n", posx, posy);
7146 if (height > 0 && width > 0) {
7181 if (!layout || !LINGO_IS_LAYOUT(layout) || paisize != opaisize) {
7186 layout = (LingoLayout *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(widget),
"layout");
7187 if (!layout || !LINGO_IS_LAYOUT(layout)) {
7195 gui_posx = gui_posy = 1000000;
7198 lheight = LIVES_POINTER_TO_INT(lives_widget_object_get_data(LIVES_WIDGET_OBJECT(widget),
"layout_height"));
7199 if (lheight == 0)
return FALSE;
7201 if (height != last_height) wiggle_room = 0;
7202 last_height = height;
7204#ifdef DEBUG_OVERFLOW
7205 g_print(
"VALS %d, %d %d\n", lheight, height, wiggle_room);
7208 llines = LIVES_POINTER_TO_INT(lives_widget_object_get_data(LIVES_WIDGET_OBJECT(widget),
"layout_lines"));
7209 lineheight =
CEIL(lheight / llines, 1);
7214 else if (height < lineheight)
return FALSE;
7218 if (lheight < height - wiggle_room || prefs->msg_textsize != last_textsize) {
7219#ifdef DEBUG_OVERFLOW
7220 g_print(
"VALS2 %d %d %d : %d %d\n", height / lineheight, llines + 1, llast,
prefs->
msg_textsize, last_textsize);
7222 if ((height / lineheight >= llines + 1 && llast > llines) || (
prefs->
msg_textsize != last_textsize)) {
7223#ifdef DEBUG_OVERFLOW
7224 g_print(
"VALS22 %d %d %d : %d %d\n", height / lineheight, llines + 1, llast,
prefs->
msg_textsize, last_textsize);
7229 layout = (LingoLayout *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(widget),
"layout");
7230 if (!layout || !LINGO_IS_LAYOUT(layout)) {
7233 lheight = LIVES_POINTER_TO_INT(lives_widget_object_get_data(LIVES_WIDGET_OBJECT(widget),
7235 wiggle_room = height - lheight;
7243 lives_painter_t *cr2;
7244 LingoLayout *layout;
7249 if (state & LIVES_WIDGET_STATE_BACKDROP)
return TRUE;
7251 layout = (LingoLayout *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(widget),
"layout");
7253 if (layout && LINGO_IS_LAYOUT(layout)) {
7267 0., 0., 0., height - lheight - 4);
7268 lingo_painter_show_layout(cr2, layout);
7286 LiVESWidget *widget = (LiVESWidget *)userdata;
7289 if (!LIVES_IS_ADJUSTMENT(adj))
return;
7292 if (msg_area_scroll_to(widget, (
int)(val + .5),
FALSE, adj))
7300 LiVESAdjustment *adj = (LiVESAdjustment *)user_data;
LIVES_GLOBAL_INLINE char * get_achannel_name(int totchans, int idx)
float get_float_audio_val_at_time(int fnum, int afd, double secs, int chnum, int chans)
boolean adjust_clip_volume(int fileno, float newvol, boolean make_backup)
LIVES_GLOBAL_INLINE char * lives_get_audio_file_name(int fnum)
#define lives_vol_from_linear(vol)
void on_boolean_toggled(LiVESWidgetObject *obj, livespointer user_data)
void on_effects_paused(LiVESButton *button, livespointer user_data)
void on_save_textview_clicked(LiVESButton *button, livespointer user_data)
void on_save_subs_activate(LiVESMenuItem *menuitem, livespointer user_data)
boolean on_save_set_activate(LiVESWidget *widget, livespointer user_data)
void end_fs_preview(void)
void on_cancel_opensel_clicked(LiVESButton *button, livespointer user_data)
boolean reload_set(const char *set_name)
void on_spin_value_changed(LiVESSpinButton *spinbutton, livespointer user_data)
void on_rename_clip_name(LiVESButton *button, livespointer user_data)
boolean all_expose(LiVESWidget *widget, lives_painter_t *cr, livespointer psurf)
void on_preview_clicked(LiVESButton *button, livespointer user_data)
void on_fs_preview_clicked(LiVESWidget *widget, livespointer user_data)
void on_location_select(LiVESButton *button, livespointer user_data)
void on_load_vcd_ok_clicked(LiVESButton *button, livespointer user_data)
void on_insert_activate(LiVESButton *button, livespointer user_data)
void on_insertwsound_toggled(LiVESToggleButton *togglebutton, livespointer user_data)
void on_quit_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_cleardisk_activate(LiVESWidget *widget, livespointer user_data)
void on_cancel_keep_button_clicked(LiVESButton *button, livespointer user_data)
void on_load_cdtrack_ok_clicked(LiVESButton *button, livespointer user_data)
void on_stop_clicked(LiVESMenuItem *menuitem, livespointer user_data)
void on_opensel_range_ok_clicked(LiVESButton *button, livespointer user_data)
boolean check_for_layout_errors(const char *operation, int fileno, int start, int end, uint32_t *in_mask)
check for layout errors, using in_mask as a guide (mask values are taken from prefs->warn_mask,...
void del_current_set(boolean exit_after)
void on_resample_vid_ok(LiVESButton *, LiVESEntry *entry)
LIVES_GLOBAL_INLINE LiVESWindow * get_transient_full(void)
LIVES_GLOBAL_INLINE LiVESResponseType do_info_dialog(const char *text)
void do_dir_perm_access_error(const char *dir_name)
LIVES_GLOBAL_INLINE LiVESResponseType do_abort_ok_dialog(const char *text)
LIVES_GLOBAL_INLINE void do_shutdown_msg(void)
LIVES_GLOBAL_INLINE char * workdir_ch_warning(void)
LIVES_GLOBAL_INLINE LiVESWidget * create_question_dialog(const char *title, const char *text)
LIVES_GLOBAL_INLINE void do_no_sets_dialog(const char *dir)
char * ds_critical_msg(const char *dir, char **mountpoint, uint64_t dsval)
warn about disk space
LiVESResponseType do_info_dialogf(const char *fmt,...)
boolean do_abort_check(void)
boolean do_warning_dialogf(const char *fmt,...)
LIVES_GLOBAL_INLINE boolean do_please_install_either(const char *exec, const char *exec2)
void add_warn_check(LiVESBox *box, int warn_mask_number)
LIVES_GLOBAL_INLINE LiVESResponseType do_error_dialog(const char *text)
LIVES_GLOBAL_INLINE boolean do_warning_dialog(const char *text)
char * get_menu_name(lives_clip_t *sfile, boolean add_setname)
char * choose_file(const char *dir, const char *fname, char **const filt, LiVESFileChooserAction act, const char *title, LiVESWidget *extra_widget)
LiVESWidget * create_cdtrack_dialog(int type, livespointer user_data)
void draw_dsu_widget(LiVESWidget *dsu_widget)
autolives_window * autolives_pre_dialog(void)
LiVESWidget * create_cleardisk_advanced_dialog(void)
double lives_ce_update_timeline(int frame, double x)
pointer position in timeline
boolean redraw_tl_idle(void *data)
boolean update_dsu(livespointer data)
lives_clipinfo_t * create_clip_info_window(int audio_channels, boolean is_mt)
void do_keys_window(void)
const lives_special_aspect_t * add_aspect_ratio_button(LiVESSpinButton *sp_width, LiVESSpinButton *sp_height, LiVESBox *box)
aud_dialog_t * create_audfade_dialog(int type)
LiVESWidget * create_combo_dialog(int type, LiVESList *list)
void mt_change_disp_tracks_ok(LiVESButton *, livespointer user_data)
LiVESWidget * trash_rb(LiVESButtonBox *parent)
#define ADD_KEYDEF(key, desc)
void create_new_pb_speed(short type)
window change speed from Tools menu
text_window * create_text_window(const char *title, const char *text, LiVESTextBuffer *textbuffer, boolean add_buttons)
LiVESWidget * choose_file_with_preview(const char *dir, const char *title, char **const filt, int filesel_type)
void widget_add_preview(LiVESWidget *widget, LiVESBox *for_preview, LiVESBox *for_button, LiVESBox *for_deint, int preview_type)
for fileselector preview
_entryw * create_rename_dialog(int type)
char * choose_file_bg(const char *dir, const char *fname, char **const filt, LiVESFileChooserAction act, const char *title, LiVESWidget *extra_widget)
LIVES_GLOBAL_INLINE LiVESWidget * make_autoreload_check(LiVESHBox *hbox, boolean is_active)
boolean msg_area_config(LiVESWidget *widget)
void update_timer_bars(int posx, int posy, int width, int height, int which)
draw the timer bars
boolean reshow_msg_area(LiVESWidget *widget, lives_painter_t *cr, livespointer psurf)
boolean on_msg_area_scroll(LiVESWidget *widget, LiVESXEventScroll *event, livespointer user_data)
void add_suffix_check(LiVESBox *box, const char *ext)
LiVESResponseType filter_cleanup(const char *trashdir, LiVESList **rec_list, LiVESList **rem_list, LiVESList **left_list)
void show_playbar_labels(int clipno)
void redraw_timeline(int clipno)
_entryw * create_cds_dialog(int type)
void on_liveinp_advanced_clicked(LiVESButton *button, livespointer user_data)
boolean get_screen_usable_size(int *w, int *h)
LiVESWidget * create_encoder_prep_dialog(const char *text1, const char *text2, boolean opt_resize)
_entryw * create_location_dialog(void)
LiVESWidget * scrolled_textview(const char *text, LiVESTextBuffer *textbuffer, int window_width, LiVESWidget **ptextview)
void run_diskspace_dialog(void)
boolean youtube_select_format(lives_remote_clip_request_t *req)
void on_filesel_button_clicked(LiVESButton *button, livespointer user_data)
callback for lives_standard filesel button same callback is used for dierctory buttons object_data in...
void do_mt_keys_window(void)
void clear_tbar_bgs(int posx, int posy, int width, int height, int which)
_insertw * create_insert_dialog(void)
void redraw_timer_bars(double oldx, double newx, int which)
paint a damage region
boolean run_diskspace_dialog_idle(livespointer data)
xprocess * create_processing(const char *text)
LIVES_LOCAL_INLINE char * dsu_label_notset(void)
_commentsw * create_comments_dialog(lives_clip_t *sfile, char *filename)
lives_remote_clip_request_t * run_youtube_dialog(lives_remote_clip_request_t *req)
void msg_area_scroll(LiVESAdjustment *adj, livespointer userdata)
xprocess * create_threaded_dialog(char *text, boolean has_cancel, boolean *td_had_focus)
void multitrack_preview_clicked(LiVESButton *, livespointer user_data)
LiVESWidget * add_list_expander(LiVESBox *box, const char *title, int width, int height, LiVESList *xlist)
LiVESWidget * create_opensel_dialog(int frames, double fps)
void run_diskspace_dialog_cb(LiVESWidget *w, livespointer data)
LIVES_LOCAL_INLINE char * dsu_label_calculating(void)
LIVES_GLOBAL_INLINE void msg_area_scroll_to_end(LiVESWidget *widget, LiVESAdjustment *adj)
LiVESTextView * create_output_textview(void)
#define LIVES_PREVIEW_TYPE_IMAGE_ONLY
#define LIVES_PREVIEW_TYPE_RANGE
#define LIVES_FILE_SELECTION_UNDEFINED
#define LIVES_DIR_SELECTION_SELECT_FOLDER
#define LIVES_DIR_SELECTION_WORKDIR
#define LIVES_PREVIEW_TYPE_VIDEO_AUDIO
#define LIVES_FILE_SELECTION_OPEN
#define LIVES_FILE_SELECTION_VIDEO_AUDIO_MULTI
#define CE_VIDBAR_HEIGHT
clip edit vid/aud bar height
#define LIVES_DIR_SELECTION_CREATE_FOLDER
#define DEF_AUD_FADE_SECS
default time to offer fade audio in/out for
#define LIVES_PREVIEW_TYPE_AUDIO_ONLY
#define CE_AUDBAR_HEIGHT
clip edit vid/aud bar height
#define LIVES_FILE_SELECTION_SAVE
#define LIVES_FILE_SELECTION_IMAGE_ONLY
#define LIVES_FILE_SELECTION_VIDEO_AUDIO
char * lives_datetime(uint64_t secs, boolean use_local)
LIVES_GLOBAL_INLINE boolean lives_strcmp(const char *st1, const char *st2)
returns FALSE if strings match
LIVES_GLOBAL_INLINE boolean lives_proc_thread_cancel(lives_proc_thread_t tinfo)
off_t get_dir_size(const char *dirname)
weed_plantptr_t lives_proc_thread_t
lives proc_threads API
char * get_mountpoint_for(const char *dir)
boolean activate_x11_window(const char *wid)
LIVES_GLOBAL_INLINE int64_t lives_proc_thread_join_int64(lives_proc_thread_t tinfo)
lives_proc_thread_t disk_monitor_start(const char *dir)
LIVES_GLOBAL_INLINE size_t lives_strlen(const char *s)
void free_fdets_list(LiVESList **listp)
LiVESResponseType send_to_trash(const char *item)
LIVES_GLOBAL_INLINE boolean lives_proc_thread_check(lives_proc_thread_t tinfo)
returns FALSE while the thread is running, TRUE once it has finished
LIVES_GLOBAL_INLINE ticks_t lives_get_current_ticks(void)
int64_t disk_monitor_check_result(const char *dir)
lives_storage_status_t get_storage_status(const char *dir, uint64_t warn_level, int64_t *dsval, int64_t ds_resvd)
char * lives_format_storage_space_string(uint64_t space)
void * main_thread_execute(lives_funcptr_t func, int return_type, void *retval, const char *args_fmt,...)
lives_proc_thread_t dir_to_file_details(LiVESList **listp, const char *dir, const char *orig_loc, uint64_t extra)
create a list from a (sub)directory '.
lives_proc_thread_t lives_proc_thread_create(lives_thread_attr_t attr, lives_funcptr_t func, int return_type, const char *args_fmt,...)
create the specific plant which defines a background task to be run
boolean lives_proc_thread_dontcare(lives_proc_thread_t tinfo)
tell a threead with return value that we no longer need the value so it can free itself
char * lives_datetime_rel(const char *datetime)
lives_proc_thread_t ordfile_to_file_details(LiVESList **listp, const char *ofname, const char *orig_loc, uint64_t extra)
#define EXTRA_DETAILS_CHECK_MISSING
extras we can check for, may consume more time
#define lives_nanosleep(nanosec)
#define EXTRA_DETAILS_CLIPHDR
void *(* lives_funcptr_t)(void *)
#define EXTRA_DETAILS_DIRSIZE
#define LIVES_THRDATTR_NONE
_palette * palette
interface colour settings
void load_preview_image(boolean update_always)
int lives_close_buffered(int fd)
#define CLIP_HAS_VIDEO(clip)
void get_basename(char *filename)
#define CLIP_HAS_AUDIO(clip)
void lives_list_free_all(LiVESList **)
LiVESList * lives_list_sort_alpha(LiVESList *list, boolean fwd)
size_t get_token_count(const char *string, int delim)
void d_print_cancelled(void)
void get_total_time(lives_clip_t *file)
calculate laudio, raudio and video time (may be deprecated and replaced with macros)
double calc_time_from_frame(int clip, int frame)
#define LIVES_GLOBAL_INLINE
int lives_chdir(const char *path, boolean no_error_dlg)
boolean ensure_isdir(char *fname)
@ CANCEL_SOFT
just cancel in GUI (for keep, etc)
void get_dirname(char *filename)
#define NORMAL_CLAMP(a, b)
#define CURRENT_CLIP_TOTAL_TIME
void lives_slist_free_all(LiVESSList **)
void get_filename(char *filename, boolean strip_dir)
#define LIVES_LOCAL_INLINE
void set_undoable(const char *what, boolean sensitive)
char * get_extension(const char *filename)
boolean check_file(const char *file_name, boolean check_exists)
check if file exists
LiVESList * get_set_list(const char *dir, boolean utf8)
#define FPS_MAX
maximum fps we will allow (double)
int lives_open_buffered_rdonly(const char *pathname)
#define CURRENT_CLIP_HAS_VIDEO
char * lives_pad_ellipsize(char *, size_t fixlen, int padlen, LiVESEllipsizeMode mode)
int lives_rmdir(const char *dir, boolean force)
#define IS_VALID_CLIP(clip)
void d_print_failed(void)
#define INSTALL_CANLOCAL
install guidance flags
int lives_list_strcmp_index(LiVESList *list, livesconstpointer data, boolean case_sensitive)
void d_print(const char *fmt,...)
int calc_frame_from_time4(int filenum, double time)
nearest frame, no maximum
boolean check_for_executable(lives_checkstatus_t *cap, const char *exec)
#define CLIP_AUDIO_TIME(clip)
#define CURRENT_CLIP_IS_VALID
void unbuffer_lmap_errors(boolean add)
char * ensure_extension(const char *fname, const char *ext) WARN_UNUSED
boolean lives_freep(void **ptr)
@ CLIP_TYPE_TEMP
temp type, for internal use only
char * get_dir(const char *filename)
#define CLIP_TOTAL_TIME(clip)
@ CANCEL_KEEP
user pressed 'Keep'
@ CANCEL_USER
user pressed stop
#define STYLE_3
style is lightish - allow themeing of widgets with dark text, otherwise use menu bg
#define DEF_FRAME_VSIZE_UNSCALED
#define DEF_BUTTON_HEIGHT
#define LIVES_FILE_EXT_WEBM
#define LIVES_FILE_IS_DIRECTORY(ftype)
#define MIN_MSGBAR_HEIGHT
#define DEF_DIALOG_HEIGHT
#define LIVES_FILE_EXT_SRT
#define LIVES_FILE_EXT_MP4
#define DVD_AUDIO_CHAN_MAX
#define LIVES_IS_INTERACTIVE
#define DEF_FRAME_HSIZE_UNSCALED
#define ENC_DETAILS_WIN_V
#define SCR_HEIGHT_SAFETY
#define LIVES_MAIN_WINDOW_WIDGET
#define DVD_AUDIO_CHAN_MIN
@ LIVES_STRING_CONSTANT_NONE
#define LIVES_TV_CARD_TYPES
#define MAX_SET_NAME_LEN
sets
#define LIVES_FILE_TYPE_FLAG_SPECIAL
#define LIVES_DEF_WORK_NAME
#define MIN_MSGBOX_LLINES
#define STYLE_1
turn on theming if set
#define RFX_WINSIZE_H
size of the fx dialog windows scrollwindow
#define CLIP_ORDER_FILENAME
#define SCR_WIDTH_SAFETY
sepwin/screen size safety margins in pixels
#define LIVES_FILE_EXT_SUB
#define LIVES_FILE_IS_MISSING(ftype)
#define ENC_DETAILS_WIN_H
vertical size in pixels of the encoder output window
#define LIVES_FILE_TYPE_UNKNOWN
#define LIVES_FILE_IS_FILE(ftype)
#define LIVES_FILE_TYPE_MASK
#define GUI_SCREEN_HEIGHT
boolean has_devicemap(int has_this_macro)
LingoLayout * layout_nth_message_at_bottom(int n, int width, int height, LiVESWidget *widget, int *linecount)
LingoLayout * render_text_to_cr(LiVESWidget *widget, lives_painter_t *cr, const char *text, const char *fontname, double size, lives_text_mode_t mode, lives_colRGBA64_t *fg, lives_colRGBA64_t *bg, boolean center, boolean rising, double *top, int *offs_x, int dwidth, int *dheight)
void layout_to_lives_painter(LingoLayout *layout, lives_painter_t *cr, lives_text_mode_t mode, lives_colRGBA64_t *fg, lives_colRGBA64_t *bg, int dwidth, int dheight, double x_bg, double y_bg, double x_text, double y_text)
@ LIVES_TEXT_MODE_FOREGROUND_AND_BACKGROUND
@ LIVES_TEXT_MODE_FOREGROUND_ONLY
void check_for_special(lives_rfx_t *rfx, lives_param_t *param, LiVESBox *pbox)
LIVES_GLOBAL_INLINE void set_aspect_ratio_widgets(lives_param_t *w, lives_param_t *h)
boolean special_cleanup(boolean is_ok)
const lives_special_aspect_t * paramspecial_get_aspect()
LiVESWidget * add_param_label_to_box(LiVESBox *box, boolean do_trans, const char *text)
void after_param_text_changed(LiVESWidget *textwidget, lives_rfx_t *rfx)
boolean pref_factory_int64(const char *prefidx, int64_t newval, boolean permanent)
void toggle_sets_pref(LiVESWidget *widget, livespointer prefidx)
callback to set to make a togglebutton or check_menu_item directly control a boolean pref widget is e...
#define LIVES_CDISK_LEAVE_ORPHAN_SETS
#define PREF_PREF_TRASH
prefer trash to delete
#define LIVES_CDISK_LEAVE_BFILES
#define LIVES_CDISK_REMOVE_ORPHAN_CLIPS
#define WARN_MASK_EXIT_MT
off by default on a fresh install
#define WARN_MASK_LAYOUT_ALTER_AUDIO
off by default on a fresh install
#define LIVES_CDISK_REMOVE_ORPHAN_LAYOUTS
_future_prefs * future_prefs
#define LIVES_CDISK_LEAVE_EMPTY_DIRS
void on_change_speed_ok_clicked(LiVESButton *button, livespointer user_data)
void reorder_leave_back_set(boolean val)
LiVESResponseType check_workdir_valid(char **pdirname, LiVESDialog *dialog, boolean fullcheck)
boolean do_workdir_query(void)
LiVESWidget * abort_button
lives_painter_surface_t * dsu_surface
LiVESWidget * checkbutton
LiVESWidget * clips_layout
LiVESWidget * warn_checkbutton
LiVESWidget * layouts_layout
LiVESWidget * cancelbutton
LiVESWidget * fit_checkbutton
LiVESWidget * spinbutton_times
LiVESWidget * without_sound
LiVESWidget * insert_dialog
LiVESWidgetColor normal_fore
LiVESWidgetColor info_base
LiVESWidgetColor menu_and_bars
LiVESWidgetColor info_text
LiVESWidgetColor normal_back
lives_colRGBA64_t ce_unsel
uint64_t ds_crit_level
diskspace critical level bytes
char ar_clipset_name[128]
locale
char workdir[PATH_MAX]
kept in locale encoding
boolean enc_letterbox
encode with letterbox
char cdplay_device[PATH_MAX]
locale encoding
boolean pref_trash
user prefers trash to delete
boolean ar_clipset
auto-reload
short startup_phase
0 = normal , -1 or 1: fresh install, 2: workdir set, 3: startup tests passed, 4: aud pl chosen,...
uint64_t ds_warn_level
diskspace warn level bytes
LiVESWidget * prefs_dialog
LiVESWidget * mute_button
LiVESWidget * atrigger_spin
LiVESWidget * atrigger_button
LiVESWidget * debug_button
char home_dir[PATH_MAX]
home directory - default location for config file - locale encoding
lives_checkstatus_t has_pip
lives_checkstatus_t has_gio
lives_checkstatus_t has_youtube_dl
lives_checkstatus_t has_youtube_dlc
corresponds to one clip in the GUI
frames_t frames
number of video frames
lives_clip_type_t clip_type
int achans
number of audio channels (0, 1 or 2)
lives_painter_surface_t * raudio_drawable
lives_painter_surface_t * laudio_drawable
LiVESWidget * textview_ltime
LiVESWidget * textview_lrate
LiVESWidget * textview_fsize
LiVESWidget * textview_rrate
LiVESWidget * textview_rtime
LiVESWidget * textview_type
LiVESWidget * textview_fps
LiVESWidget * textview_frames
LiVESWidget * textview_vtime
LiVESWidget * textview_size
LiVESWidget * widgets[16]
intialized to NULL, set to at least ""
char * extra_details
only filled if EXTRA_DETAILS_MD5 is set, otherwis NULL
off_t size
e.g. LIVES_FILE_TYPE_FILE
LiVESXDevice * mouse_device
unused for gtk+ < 3.0.0
LiVESWidget * widgets[MAX_PARAM_WIDGETS]
TODO - change to LiVESWidget **widgets, terminated with a NULL.
lives_size_match_t matchsize
lives_subtitle_type_t type
LiVESWidget * spinbuttonw
LiVESWidget * spinbuttonh
LiVESWidget * radiobuttond
LiVESWidget * spinbuttoni
LiVESWidget * spinbuttonf
LiVESList * set_list
number of sets in workdir (minus the current set), -1 if not checked
boolean only_close
only close clips - do not exit
volatile uint64_t rte
current max for VJ mode == 64 effects on fg clip
LiVESWidget * laudio_draw
lives_clip_t * files[MAX_FILES+1]
+1 for the clipboard
lives_mgeometry_t * mgeom
multi-head support
lives_painter_surface_t * raudio_drawable
char * string_constants[NUM_LIVES_STRING_CONSTANTS]
LiVESIOChannel * iochan
encoder text output
LiVESWidget * fs_playframe
LiVESWidget * fs_playalign
LiVESTextView * optextview
LiVESList * cliplist
hash table of clips in menu order
volatile lives_cancel_t cancelled
char vid_dl_dir[PATH_MAX]
lives_storage_status_t ds_status
boolean show_procd
override showing of "processing..." dialog
lives_cancel_type_t cancel_type
LiVESWidget * message_box
LiVESWidget * play_window
uint64_t next_ds_warn_level
current disk space warning level for the tempdir
LiVESAdjustment * msg_adj
LiVESWidget * spinbutton_pb_fps
LiVESWidget * fs_playarea
for the fileselection preview
boolean recoverable_layout
LiVESWidget * raudio_draw
lives_painter_surface_t * video_drawable
weed_event_t * stored_event_list
stored mt -> clip editor
boolean has_session_workdir
lives_mt * multitrack
holds a pointer to the entire multitrack environment; NULL in Clip Edit mode
lives_proc_thread_t transrend_proc
boolean foreign
for external window capture
boolean stored_event_list_changed
lives_painter_surface_t * laudio_drawable
boolean internal_messaging
internal fx
char * subt_save_file
name of file to save subtitles to
lives_painter_surface_t * msg_surface
LiVESWidget * framecounter
boolean add_trash_rb
these are freed when the clip is switched or closed, or when the source frame changes or is updated
LiVESWidget * scrolledwindow
LiVESWidget * progressbar
LiVESWidget * stop_button
LiVESWidget * cancel_button
LiVESWidget * pause_button
LiVESWidget * preview_button
LiVESWidget * scrolledwindow
#define lives_strdup_printf(fmt,...)