update position in timebar drag label
[goodguy/history.git] / cinelerra-5.1 / cinelerra / binfolder.C
index 32fd02aa82fb41a632de925d9d488b66619cb240..9082f42c267028b5461eb5338456d27a536b4847 100644 (file)
@@ -239,7 +239,6 @@ static int64_t scan_date(const char *cp, char *&bp)
        struct tm ttm;  memset(&ttm, 0, sizeof(ttm));
        ttm.tm_year = year-1900;  ttm.tm_mon = mon-1;  ttm.tm_mday = day;
        ttm.tm_hour = hour;       ttm.tm_min = min;    ttm.tm_sec = secs;
-       ttm.tm_wday = ttm.tm_yday = 0;  ttm.tm_isdst = daylight; /* tzset in main */
        time_t t = mktime(&ttm);
        return (int64_t)t;
 }
@@ -539,9 +538,9 @@ void BinFolderFilters::copy_from(BinFolderFilters *that)
 
 double BinFolderOp::around(double v, double a)
 {
-       if( type != FOLDER_OP_AROUND || a <= 0 ) return v;
-       if( (v=fabs(v)) > a ) return -1;
-       return v / a;
+       if( type != FOLDER_OP_AROUND ) return v;
+       v = fabs(v);
+       return a>0 ? v/a : v;
 }
 
 // string theory: Feynman, Einstein and Schrodinger string compare
@@ -1773,7 +1772,7 @@ void ModifyFolderGUI::create_objects()
        add_subwindow(text_box = new BC_TextBox(x, y, 300, 1, thread->folder->title));
        y += text_box->get_h() + 10;
        int lh = get_h() - y - BC_OKButton::calculate_h() - 30;
-       int lw = get_w() - x - 120;
+       int lw = get_w() - x - 160;
        add_subwindow(folder_list =
                new BinFolderList(thread->folder, thread->agui->mwindow, this, x, y, lw, lh));
        folder_list->create_objects();
@@ -1800,7 +1799,7 @@ int ModifyFolderGUI::resize_event(int w, int h)
        int lx = folder_list->get_x();
        int ly = folder_list->get_y();
        int lh = h - ly - BC_OKButton::calculate_h() - 30;
-       int lw = w - lx - 120;
+       int lw = w - lx - 160;
        folder_list->reposition_window(lx, ly, lw, lh);
        int x1 = lx + lw + 15;
        add_filter->reposition_window(x1, add_filter->get_y());
@@ -1827,6 +1826,7 @@ ModifyFolderThread::ModifyFolderThread(AWindowGUI *agui)
 {
        this->agui = agui;
        original = 0;
+       modify_edl = 0;
        folder = 0;
 }
 
@@ -1840,7 +1840,8 @@ void ModifyFolderThread::start(BinFolder *folder, int x, int y, int w, int h)
 {
        close_window();
        this->original = folder;
-       agui->mwindow->edl->add_user();
+       this->modify_edl = agui->mwindow->edl;
+       this->modify_edl->add_user();
        this->folder = new BinFolder(*folder);
        this->wx = x;  this->wy = y;
        this->ww = w;  this->wh = h;
@@ -1873,7 +1874,7 @@ void ModifyFolderThread::handle_done_event(int result)
        }
        delete folder;  folder = 0;
        original = 0;
-       agui->mwindow->edl->remove_user();
+       modify_edl->remove_user();
 }
 
 void ModifyFolderThread::handle_close_event(int result)