+RecordGUIDelaceItem::RecordGUIDelaceItem(RecordGUIDeinterlace *popup,
+ const char *text, int id)
+ : BC_MenuItem(text)
+{
+ this->popup = popup;
+ this->id = id;
+}
+int RecordGUIDelaceItem::handle_event()
+{
+ popup->gui->record->deinterlace = id;
+ popup->update();
+ return 1;
+}
+
+RecordGUIDeinterlace::RecordGUIDeinterlace(RecordGUI *gui, int x, int y)
+ : BC_PopupMenu(x, y, xS(24), "", 1, 0, xS(3))
+{
+ this->gui = gui;
+}
+
+void RecordGUIDeinterlace::create_objects()
+{
+ add_item(new RecordGUIDelaceItem(this, _("None"), RECORD_LACE_NONE));
+ add_item(new RecordGUIDelaceItem(this, _("Even"), RECORD_LACE_EVEN));
+ add_item(new RecordGUIDelaceItem(this, _("Odd"), RECORD_LACE_ODD));
+ update();
+}
+
+void RecordGUIDeinterlace::update()
+{
+ int v = gui->record->deinterlace;
+ for( int i=0,n=total_items(); i<n; ++i ) {
+ RecordGUIDelaceItem *item = (RecordGUIDelaceItem *)get_item(i);
+ item->set_checked(item->id == v);
+ }
+}
+
+