drag edit contraints relaxed for ripples, cwdw gui/tool deadlock fix, vpatchgui fader...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / awindowgui.C
index 265f31ae33ef61307d136ca586552f50b065bddd..0caedce4747cdfceaa72ad26e3f403f7626e4e3c 100644 (file)
@@ -326,6 +326,7 @@ AssetViewPopup::AssetViewPopup(VIconThread *vt, int draw_mode,
 {
        this->draw_mode = draw_mode;
        this->bar_h = (VIEW_POPUP_BAR_H * h) / 200;
+       dragging = 0;
 }
 
 AssetViewPopup::~AssetViewPopup()
@@ -869,6 +870,9 @@ void AssetPicon::reset()
        vicon_frame = 0;
        in_use = 1;
        comments_time = 0;
+       comments_rate = -1;
+       comments_ffmt = ' ';
+       comments_type = "";
        id = 0;
        persistent = 0;
 }
@@ -1059,6 +1063,10 @@ void AssetPicon::create_objects()
                }
                struct stat st;
                comments_time = !stat(asset->path, &st) ? st.st_mtime : 0;
+               comments_rate = asset->get_frame_rate();
+               comments_ffmt = asset->format == FILE_FFMPEG ? '=' : '-';
+               comments_type = asset->format == FILE_FFMPEG ?
+                               asset->vcodec : File::formattostr(asset->format);
        }
        else
        if( indexable && !indexable->is_asset ) {
@@ -1490,7 +1498,7 @@ void AWindowGUI::create_objects()
                int nw = get_text_width(MEDIUMFONT, _(av_names[i]));
                if( tw < nw )  tw = nw;
        }
-       int pw = BC_PopupMenu::calculate_w(4, tw, 1) + 16;
+       int pw = BC_PopupMenu::calculate_w(16, tw, 1);
        const char *text = _(AVIconDrawing::avicon_names[vicon_drawing]);
        add_subwindow(avicon_drawing = new AVIconDrawing(this, fw, fy, pw, text));
        avicon_drawing->create_objects();
@@ -2082,9 +2090,13 @@ void AWindowGUI::update_asset_list()
                        continue;
                }
                if( picon->indexable && picon->indexable->is_asset ) {
+                       Asset *asset = (Asset *)picon->indexable;
                        struct stat st;
-                       picon->comments_time = !stat(picon->indexable->path, &st) ?
-                               st.st_mtime : 0;
+                       picon->comments_time = !stat(asset->path, &st) ? st.st_mtime : 0;
+                       picon->comments_rate = asset->get_frame_rate();
+                       picon->comments_ffmt = asset->format == FILE_FFMPEG ? '=' : '-';
+                       picon->comments_type = asset->format == FILE_FFMPEG ?
+                               asset->vcodec : File::formattostr(asset->format);
                }
        }
 }
@@ -2270,9 +2282,11 @@ void AWindowGUI::copy_picons(AssetPicon *picon, ArrayList<BC_ListBoxItem*> *src)
                        else if( picon->comments_time ) {
                                char date_time[BCSTRLEN];
                                struct tm stm;  localtime_r(&picon->comments_time, &stm);
-                               sprintf(date_time,"%04d.%02d.%02d %02d:%02d:%02d",
+                               sprintf(date_time,"%04d.%02d.%02d %02d:%02d:%02d @%0.2f %c%s",
                                         stm.tm_year+1900, stm.tm_mon+1, stm.tm_mday,
-                                        stm.tm_hour, stm.tm_min, stm.tm_sec);
+                                        stm.tm_hour, stm.tm_min, stm.tm_sec,
+                                       picon->comments_rate, picon->comments_ffmt,
+                                       picon->comments_type);
                                dst[1].append(item2 = new BC_ListBoxItem(date_time));
                        }
                        else