hilight color tweak, listbox drag fixes, add 10bit to spec
authorGood Guy <good1.2guy@gmail.com>
Wed, 11 Oct 2017 22:46:12 +0000 (16:46 -0600)
committerGood Guy <good1.2guy@gmail.com>
Wed, 11 Oct 2017 22:46:12 +0000 (16:46 -0600)
cinelerra-5.1/cinelerra.spec
cinelerra-5.1/cinelerra/appearanceprefs.C
cinelerra-5.1/cinelerra/preferencesthread.C
cinelerra-5.1/guicast/bclistbox.C

index 8cab2ae5bbf71dc26aeab43e81c369a07835afce..54d57758b2ef4e1d8a898acdb4a85297efa755a3 100644 (file)
@@ -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
index 46badb85276be26b9a0c7e14bdfdcf0bc6b45558..c054e3401d3591a1e29990206e3632a788afba87 100644 (file)
@@ -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;
 }
index dbda188f782fa605f920ad5f76e8d7dd9b4dd7c0..3e4ac56fb2617970d324142d6b7fe469ee65286c 100644 (file)
@@ -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();
        }
index 4d9cba1099974ca1bcc2d2032b0fdb8dacfc257a..394daac60607dd1bf6e82274408076b8fd0be071 100644 (file)
@@ -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<BC_ListBoxItem*> *data,
 void BC_ListBox::move_selection(ArrayList<BC_ListBoxItem*> *dst,
        ArrayList<BC_ListBoxItem*> *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<BC_ListBoxItem*> *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<BC_ListBoxItem*> *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<BC_ListBoxItem*> *src_items =
                                                new ArrayList<BC_ListBoxItem*>[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);