From: Good Guy Date: Wed, 11 Oct 2017 22:46:12 +0000 (-0600) Subject: hilight color tweak, listbox drag fixes, add 10bit to spec X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=61d95f04b83c2f7f1fa6b44ff64ed9c83a7d8abb;p=goodguy%2Fhistory.git hilight color tweak, listbox drag fixes, add 10bit to spec --- diff --git a/cinelerra-5.1/cinelerra.spec b/cinelerra-5.1/cinelerra.spec index 8cab2ae5..54d57758 100644 --- a/cinelerra-5.1/cinelerra.spec +++ b/cinelerra-5.1/cinelerra.spec @@ -1,6 +1,13 @@ -%define ver 20170930 +%define ver 20171011 +%define cin cinelerra Summary: Multimedia Editing and construction -Name: cinelerra + +%if 0%{?hidepth} +%define xbit 10bit +%define xcfg --enable-x265_hidepth --with-exec-name=cinx +%endif + +Name: %{cin}%{xbit} Version: 5.1 Release: %{ver} License: GPL @@ -9,7 +16,7 @@ URL: http://cinelerra-cv.org/ # Obtained from : # git clone git://git.cinelerra.org/goodguy/cinelerra.git cinelerra5 -Source0: cinelerra-%{version}-%{ver}.tar.bz2 +Source0: %{cin}-%{version}-%{ver}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if 0%{?fedora}%{?centos} @@ -58,10 +65,11 @@ BuildRequires: zlib-devel Multimedia editing and construction %prep -%setup +%define _buildsubdir %{cin}-%{version} +%setup -q -n %{cin}-%{version} %build ./autogen.sh -%configure +%configure %{xcfg} %{__make} %install diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.C b/cinelerra-5.1/cinelerra/appearanceprefs.C index 46badb85..c054e340 100644 --- a/cinelerra-5.1/cinelerra/appearanceprefs.C +++ b/cinelerra-5.1/cinelerra/appearanceprefs.C @@ -516,7 +516,12 @@ HighlightInverseColor::HighlightInverseColor(PreferencesWindow *pwindow, int x, int HighlightInverseColor::handle_event() { int inverse_color = strtoul(get_text(),0,16); - inverse_color &= 0xffffff; + if( (inverse_color &= 0xffffff) == 0 ) { + inverse_color = 0xffffff; + char string[BCSTRLEN]; + sprintf(string,"%06x", inverse_color); + update(string); + } pwindow->thread->preferences->highlight_inverse = inverse_color; return 1; } diff --git a/cinelerra-5.1/cinelerra/preferencesthread.C b/cinelerra-5.1/cinelerra/preferencesthread.C index dbda188f..3e4ac56f 100644 --- a/cinelerra-5.1/cinelerra/preferencesthread.C +++ b/cinelerra-5.1/cinelerra/preferencesthread.C @@ -211,6 +211,13 @@ int PreferencesThread::apply_settings() (*this_aconfig != *aconfig) || (*this_vconfig != *vconfig) || !preferences->brender_asset->equivalent(*mwindow->preferences->brender_asset, 0, 1, edl); + if( preferences->highlight_inverse != mwindow->preferences->highlight_inverse ) { + mwindow->gui->lock_window("PreferencesThread::apply_settings 0"); + mwindow->gui->hide_cursor(0); + mwindow->gui->unlock_window(); + redraw_overlays = 1; + } + if( strcmp(preferences->theme, mwindow->preferences->theme) != 0 ) mwindow->restart_status = -1; // reload, need new bcresources if( strcmp(preferences->plugin_icons, mwindow->preferences->plugin_icons) != 0 ) @@ -292,6 +299,7 @@ int PreferencesThread::apply_settings() if(redraw_overlays) { mwindow->gui->lock_window("PreferencesThread::apply_settings 2"); + mwindow->gui->show_cursor(0); mwindow->gui->draw_overlays(1); mwindow->gui->unlock_window(); } diff --git a/cinelerra-5.1/guicast/bclistbox.C b/cinelerra-5.1/guicast/bclistbox.C index 4d9cba10..394daac6 100644 --- a/cinelerra-5.1/guicast/bclistbox.C +++ b/cinelerra-5.1/guicast/bclistbox.C @@ -1791,7 +1791,11 @@ int BC_ListBox::select_next(int skip, void BC_ListBox::clamp_positions() { items_w = get_items_width(); + if( xscroll_orientation & SCROLL_STRETCH ) + items_w += view_w / 4; items_h = get_items_height(data, columns); + if( yscroll_orientation & SCROLL_STRETCH ) + items_h += view_h / 4; if(yposition < 0) yposition = 0; else @@ -2230,7 +2234,7 @@ int BC_ListBox::reposition_item(ArrayList *data, void BC_ListBox::move_selection(ArrayList *dst, ArrayList *src) { - for(int i = 0; i < src[master_column].total; i++) + for(int i = 0; i < src[master_column].total; ) { BC_ListBoxItem *item = src[master_column].values[i]; @@ -2242,14 +2246,15 @@ void BC_ListBox::move_selection(ArrayList *dst, dst[j].append(src[j].values[i]); src[j].remove_number(i); } + continue; } - else // Descend into sublist if(item->get_sublist()) { move_selection(dst, item->get_sublist()); } + ++i; } } @@ -2261,7 +2266,7 @@ int BC_ListBox::put_selection(ArrayList *data, int temp = -1; if(!counter) counter = &temp; - if(destination < 0) + if(destination < 0 || destination >= data[master_column].total) { for(int j = 0; j < columns; j++) { @@ -2451,6 +2456,7 @@ int BC_ListBox::repeat_event(int64_t duration) return rectangle_scroll_event(); break; + case DRAG_ITEM: case SELECT: if(duration == get_resources()->scroll_repeat) return select_scroll_event(); @@ -3708,6 +3714,7 @@ int BC_ListBox::drag_start_event() } current_operation = DRAG_ITEM; + set_repeat(get_resources()->scroll_repeat); return 1; } } @@ -3785,6 +3792,7 @@ int BC_ListBox::drag_stop_event() switch(current_operation) { case DRAG_ITEM: + unset_repeat(get_resources()->scroll_repeat); // Inside window boundary if(top_level->cursor_x > 0 && top_level->cursor_x < gui->get_w() - drag_popup->get_w() / 2 && @@ -3813,22 +3821,15 @@ int BC_ListBox::drag_stop_event() // Move rows if(process_drag) { -// Get destination - int destination = highlighted_item = item_to_index(data, - highlighted_ptr); -//printf("BC_ListBox::drag_stop_event 1 %p %d\n", highlighted_ptr, destination); - // Move selected items from data to temporary ArrayList *src_items = new ArrayList[columns]; - move_selection(src_items, data); - +// Get destination + int destination = highlighted_item = item_to_index(data, + highlighted_ptr); // Insert items from temporary to data - put_selection(data, - src_items, - destination); - + put_selection(data, src_items, destination); delete [] src_items; set_autoplacement(data, 0, 1);