textbox/suggestion fixups, update to lossless, canvas scaling
[goodguy/history.git] / cinelerra-5.1 / cinelerra / formattools.C
index 1f3fc3caac80295bdcb64ce3d5e25e58376cd6e7..d3d5ca29e6ec0fae5e83a8225a81310f1ad68c16 100644 (file)
@@ -68,7 +68,6 @@ FormatTools::FormatTools(MWindow *mwindow,
        channels_title = 0;
        channels_button = 0;
        multiple_files = 0;
-       file_entries = 0;
        w = window->get_w();
 
        recording = 0;
@@ -104,12 +103,6 @@ SET_TRACE
        if(vparams_thread) delete vparams_thread;
 SET_TRACE
        if(channels_tumbler) delete channels_tumbler;
-SET_TRACE
-       if(file_entries)
-       {
-               file_entries->remove_all_objects();
-               delete file_entries;
-       }
 }
 
 void FormatTools::create_objects(int &init_x,
@@ -141,19 +134,6 @@ void FormatTools::create_objects(int &init_x,
        this->prompt_video_compression = prompt_video_compression;
        this->strategy = strategy;
 
-
-       file_entries = new ArrayList<BC_ListBoxItem*>;
-       FileSystem fs;
-       char string[BCTEXTLEN];
-// Load current directory
-       fs.update(getcwd(string, BCTEXTLEN));
-       for(int i = 0; i < fs.total_files(); i++)
-       {
-               file_entries->append(
-                       new BC_ListBoxItem(
-                               fs.get_entry(i)->get_name()));
-       }
-
 //printf("FormatTools::create_objects 1\n");
 
 // Modify strategy depending on render farm
@@ -188,7 +168,7 @@ void FormatTools::create_objects(int &init_x,
                path_recent->load_items(File::formattostr(asset->format));
                px += path_recent->get_w() + 8;
                window->add_subwindow(path_button = new BrowseButton(
-                       mwindow, window, path_textbox, px, y, asset->path,
+                       mwindow->theme, window, path_textbox, px, y, asset->path,
                        _("Output to file"), _("Select a file to write to:"), 0));
 
 // Set w for user.
@@ -204,17 +184,17 @@ void FormatTools::create_objects(int &init_x,
        x = init_x;
        window->add_subwindow(format_title = new BC_Title(x, y, _("File Format:")));
        x += 90;
-       window->add_subwindow(format_text = new BC_TextBox(x, y, 180, 1,
+       window->add_subwindow(format_text = new BC_TextBox(x, y, 160, 1,
                File::formattostr(asset->format)));
        x += format_text->get_w();
 //printf("FormatTools::create_objects %d %p\n", __LINE__, window);
        window->add_subwindow(format_button = new FormatFormat(x, y, this));
        format_button->create_objects();
        x += format_button->get_w() + 5;
-       window->add_subwindow(ffmpeg_type = new FFMpegType(x, y+5, 50, 1, asset->fformat));
+       window->add_subwindow(ffmpeg_type = new FFMpegType(x, y, 64, 1, asset->fformat));
        FFMPEG::set_asset_format(asset, asset->fformat);
        x += ffmpeg_type->get_w();
-       window->add_subwindow(format_ffmpeg = new FormatFFMPEG(x, y+5, this));
+       window->add_subwindow(format_ffmpeg = new FormatFFMPEG(x, y, this));
        format_ffmpeg->create_objects();
        x = init_x;
        y += format_button->get_h() + 10;
@@ -319,8 +299,6 @@ void FormatTools::update_driver(int driver)
 
                case CAPTURE_IEC61883:
                case CAPTURE_FIREWIRE:
-               case CAPTURE_LML:
-               case CAPTURE_BUZ:
                case VIDEO4LINUX2JPEG:
                case CAPTURE_JPEG_WEBCAM:
                        asset->format = FILE_FFMPEG;
@@ -332,8 +310,6 @@ void FormatTools::update_driver(int driver)
                                locked_compressor = (char*)CODEC_TAG_DVSD;
                                break;
 
-                       case CAPTURE_BUZ:
-                       case CAPTURE_LML:
                        case VIDEO4LINUX2JPEG:
                                locked_compressor = (char*)CODEC_TAG_MJPEG;
                                break;
@@ -753,11 +729,7 @@ FormatPathText::~FormatPathText()
 }
 int FormatPathText::handle_event()
 {
-// Suggestions
-       calculate_suggestions(format->file_entries);
-
-
-
+       calculate_suggestions();
        strcpy(format->asset->path, get_text());
        format->handle_event();
        return 1;