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;
}
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
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();
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());
{
this->agui = agui;
original = 0;
+ modify_edl = 0;
folder = 0;
}
{
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;
}
delete folder; folder = 0;
original = 0;
- agui->mwindow->edl->remove_user();
+ modify_edl->remove_user();
}
void ModifyFolderThread::handle_close_event(int result)