X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbclistbox.C;h=df5b6f0f32c2de420208d8dc4f323aba575a3e10;hp=18d93c99668d63042e2621d5603dd01089afce86;hb=eb9df615719cf3afe2bc08035900e5d3451034e1;hpb=6ff8b339d215bb1c2cef589fd7959aa2e1834105 diff --git a/cinelerra-5.1/guicast/bclistbox.C b/cinelerra-5.1/guicast/bclistbox.C index 18d93c99..df5b6f0f 100644 --- a/cinelerra-5.1/guicast/bclistbox.C +++ b/cinelerra-5.1/guicast/bclistbox.C @@ -3485,7 +3485,7 @@ int BC_ListBox::expander_active() int BC_ListBox::keypress_event() { - if( !active ) return 0; + if( !active ) return context_help_check_and_show(); //printf("BC_ListBox::keypress_event %d\n", __LINE__); @@ -3612,6 +3612,9 @@ int BC_ListBox::keypress_event() //printf("BC_ListBox::keypress_event %d\n", __LINE__); } + if( !result ) + result = context_help_check_and_show(); + return result; } @@ -3725,12 +3728,11 @@ int BC_ListBox::draw_items(int flush, int draw_bg) gui->pixmap->draw_vframe(vicon, icon_x, icon_y); else if( item->icon ) gui->pixmap->draw_pixmap(item->icon, icon_x, icon_y); - char item_text[BCTEXTLEN]; - if( display_format == LISTBOX_ICONS_PACKED ) - gui->truncate_text(item_text, item->text, text_w); - else - strcpy(item_text, item->text); + char *item_text = display_format == LISTBOX_ICONS_PACKED ? + get_truncated_text(MEDIUMFONT, item->text, text_w) : + cstrdup(item->text); gui->draw_text(text_x, text_y + get_baseline(item), item_text); + delete [] item_text; } else item->set_in_view(0);