X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fawindowgui.C;h=0caedce4747cdfceaa72ad26e3f403f7626e4e3c;hp=a88acce6cc95473fa02a2da27cf60d092e69651a;hb=686bc04a488847170d80ec603f8c33962a7aa928;hpb=05a3780d6edd6a792f0dde46ed69e4b740af5a51 diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index a88acce6..0caedce4 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -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 *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 @@ -3335,7 +3349,7 @@ int AVIconDrawingItem::handle_event() int AVIconDrawing::draw_face(int dx, int color) { int ret = BC_PopupMenu::draw_face(dx, color); - if( agui->play_off ) { + if( agui->play_off && agui->vicon_drawing != AVICON_NO_PLAY ) { int lx = get_margin(), ly = get_h()/2; draw_line(lx,ly, get_w()-2*lx,ly); } @@ -3343,7 +3357,7 @@ int AVIconDrawing::draw_face(int dx, int color) } AVIconDrawing::AVIconDrawing(AWindowGUI *agui, int x, int y, int w, const char *text) - : BC_PopupMenu(x-w, y, w, text, -1, 0, 4) + : BC_PopupMenu(x-w, y, w, text, 1, 0, 4) { this->agui = agui; }