From: Good Guy Date: Fri, 30 Mar 2018 22:41:45 +0000 (-0600) Subject: fix for undo compression bug, fix for 'o' in recsources win, titler alias=smooth X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=e21b91bb19b37efa7644445f6137ee926d685795;p=goodguy%2Fhistory.git fix for undo compression bug, fix for 'o' in recsources win, titler alias=smooth --- diff --git a/cinelerra-5.1/cinelerra/undostack.C b/cinelerra-5.1/cinelerra/undostack.C index 4adef936..59eadada 100644 --- a/cinelerra-5.1/cinelerra/undostack.C +++ b/cinelerra-5.1/cinelerra/undostack.C @@ -257,9 +257,9 @@ UndoHash *UndoHashTable::add(char *txt, int len) return hp; } -UndoLine::UndoLine(UndoHash *hash) +UndoLine::UndoLine(UndoHash *hash, char *tp) { - this->txt = 0; this->len = 0; + this->txt = tp; this->len = 0; this->hash = hash; hash->occurs[va] = hash->occurs[vb] = 1; } @@ -280,7 +280,6 @@ int UndoLine::eq(UndoLine *ln) void UndoVersion::scan_lines(UndoHashTable *hash, char *sp, char *ep) { - append(new UndoLine(hash->bof)); for( int line=1; sphash->occurs[ver]; append(ln); } - append(new UndoLine(hash->eof)); } @@ -334,13 +332,21 @@ void UndoStackItem::set_data(char *data) UndoVersion alines(va), blines(vb); char *asp = data, *aep = asp + data_size-1; char *bsp = prev, *bep = bsp + prev_size-1; + alines.append(new UndoLine(hash.bof, asp)); + blines.append(new UndoLine(hash.bof, bsp)); alines.scan_lines(&hash, asp, aep); blines.scan_lines(&hash, bsp, bep); -// trim suffix int asz = alines.size(), bsz = blines.size(); +// trim matching suffix while( asz > 0 && bsz > 0 && alines[asz-1]->eq(blines[bsz-1]) ) { - --asz; --bsz; + aep = alines[--asz]->txt; alines.remove_object(); + bep = blines[--bsz]->txt; blines.remove_object(); } +// include for matching last item + alines.append(new UndoLine(hash.eof, aep)); + blines.append(new UndoLine(hash.eof, bep)); + hash.eof->line[va] = asz++; + hash.eof->line[vb] = bsz++; int ai = 0, bi = 0; while( ai < asz || bi < bsz ) { diff --git a/cinelerra-5.1/cinelerra/undostack.h b/cinelerra-5.1/cinelerra/undostack.h index 17bf1284..8c39d8be 100644 --- a/cinelerra-5.1/cinelerra/undostack.h +++ b/cinelerra-5.1/cinelerra/undostack.h @@ -63,7 +63,7 @@ public: class UndoLine { public: - UndoLine(UndoHash *hash); + UndoLine(UndoHash *hash, char *tp); UndoLine(UndoHashTable *hash, char *txt, int len); ~UndoLine(); int eq(UndoLine *ln); diff --git a/cinelerra-5.1/guicast/bclistbox.C b/cinelerra-5.1/guicast/bclistbox.C index 7c032b6a..23c4e185 100644 --- a/cinelerra-5.1/guicast/bclistbox.C +++ b/cinelerra-5.1/guicast/bclistbox.C @@ -3505,7 +3505,7 @@ int BC_ListBox::keypress_event() break; default: - if( !ctrl_down() ) { + if( show_query && !ctrl_down() ) { int query_len = strlen(query); if( query_len < (int)sizeof(query)-1 && top_level->get_keypress() > 30 && @@ -3519,12 +3519,10 @@ int BC_ListBox::keypress_event() if( query_len > 0 ) query[--query_len] = 0; new_selection = query_list(); } - if( show_query ) { - if( query_len > 0 ) - show_tooltip(query); - else - hide_tooltip(); - } + if( query_len > 0 ) + show_tooltip(query); + else + hide_tooltip(); redraw = 1; result = 1; } diff --git a/cinelerra-5.1/plugins/titler/titler.h b/cinelerra-5.1/plugins/titler/titler.h index e1d30ac8..5835f8e5 100644 --- a/cinelerra-5.1/plugins/titler/titler.h +++ b/cinelerra-5.1/plugins/titler/titler.h @@ -34,7 +34,7 @@ #define KW_UL _("ul") #define KW_BLINK _("blink") #define KW_FIXED _("fixed") -#define KW_ALIAS _("alias") +#define KW_ALIAS _("smooth") #define KW_SUP _("sup") #define KW_PNG _("png") diff --git a/cinelerra-5.1/plugins/titler/titlerwindow.C b/cinelerra-5.1/plugins/titler/titlerwindow.C index d3f20d2a..f03f8a08 100644 --- a/cinelerra-5.1/plugins/titler/titlerwindow.C +++ b/cinelerra-5.1/plugins/titler/titlerwindow.C @@ -270,7 +270,7 @@ void TitleWindow::create_objects() if( alias->get_w() > w1 ) w1 = drag->get_w(); x += w1 + margin; - add_tool(justify_title = new BC_Title(x, y, _("Justify:"))); + add_tool(justify_title = new BC_Title(x+50, y, _("Justify:"))); add_tool(left = new TitleLeft(client, this, x, y + 20)); w1 = left->get_w(); add_tool(center = new TitleCenter(client, this, x, y + 50)); @@ -847,7 +847,7 @@ int TitleSizeTumble::handle_down_event() } TitleAlias::TitleAlias(TitleMain *client, TitleWindow *window, int x, int y) - : BC_CheckBox(x, y, client->config.style & FONT_ALIAS, _("Alias")) + : BC_CheckBox(x, y, client->config.style & FONT_ALIAS, _("Smooth")) { this->client = client; this->window = window;