X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Frecordbatches.C;h=e3dc12ac82abb333a53326030491b9b0bcff00bc;hb=33758f9c7af61e85cc5934a22a5ca300703b233a;hp=0fe7d76b2f87919bc33d9b39effd83db26ba75bc;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/recordbatches.C b/cinelerra-5.1/cinelerra/recordbatches.C index 0fe7d76b..e3dc12ac 100644 --- a/cinelerra-5.1/cinelerra/recordbatches.C +++ b/cinelerra-5.1/cinelerra/recordbatches.C @@ -1,3 +1,23 @@ +/* + * CINELERRA + * Copyright (C) 2016-2020 William Morrow + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + #include #include #include @@ -39,7 +59,7 @@ load_defaults(ChannelDB * channeldb, Record * record) for(int i = 0; i < BATCH_COLUMNS; i++) { batch_titles[i] = _(default_batch_titles[i]); sprintf(string, "BATCH_COLUMNWIDTH_%d", i); - column_widths[i] = defaults->get(string, default_columnwidth[i]); + column_widths[i] = defaults->get(string, xS(default_columnwidth[i])); } int total_batches = defaults->get("TOTAL_BATCHES", 1); if(total_batches < 1) total_batches = 1; @@ -335,7 +355,7 @@ set_row_color(int row, int color) RecordBatchesGUI::Dir:: Dir(RecordBatches &batches, const char *dir, int x, int y) - : BC_TextBox(x, y, 200, 1, dir), + : BC_TextBox(x, y, xS(200), 1, dir), batches(batches), directory(batches.default_directory) { @@ -355,7 +375,8 @@ RecordBatchesGUI::Dir:: int RecordBatchesGUI::Dir:: handle_event() { - char *path = FileSystem::basepath(directory); + char *path = FileSystem::basepath(get_text()); + strcpy(directory, path); load_dirs(path); calculate_suggestions(dir_entries); delete [] path; @@ -379,7 +400,7 @@ load_dirs(const char *dir) RecordBatchesGUI::Path:: Path(RecordBatches &batches, int x, int y) - : BC_TextBox(x, y, 200, 1, batches.get_editing_batch()->asset->path), + : BC_TextBox(x, y, xS(200), 1, batches.get_editing_batch()->asset->path), batches(batches) { } @@ -436,7 +457,7 @@ RecordBatchesGUI::Source:: Source(BC_Window *win, RecordBatches &batches, int x, int y) : BC_PopupTextBox(win, &sources, batches.get_editing_batch()->get_source_text(), - x, y, 200, 200), + x, y, xS(200), yS(200)), batches(batches) { } @@ -451,7 +472,7 @@ handle_event() RecordBatchesGUI::News:: News(RecordBatches &batches, int x, int y) - : BC_TextBox(x, y, 200, 1, batches.get_editing_batch()->news), + : BC_TextBox(x, y, xS(200), 1, batches.get_editing_batch()->news), batches(batches) { }