[opendemo-cvs] CVS: opendemo/tools/odcut OdGui.pm,1.6,1.7
Status: Beta
Brought to you by:
girlich
From: Uwe G. <gi...@us...> - 2005-02-09 20:19:43
|
Update of /cvsroot/opendemo/opendemo/tools/odcut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25002 Modified Files: OdGui.pm Log Message: Implement File Open Button Close File Button now removes cut list entries too. Index: OdGui.pm =================================================================== RCS file: /cvsroot/opendemo/opendemo/tools/odcut/OdGui.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OdGui.pm 9 Feb 2005 19:44:45 -0000 1.6 --- OdGui.pm 9 Feb 2005 20:19:33 -0000 1.7 *************** *** 49,52 **** --- 49,53 ---- EVT_BUTTON($self,$self->{fileToCutList},\&OnFileToCutList); + EVT_BUTTON($self,$self->{fileOpen},\&OnFileOpen); EVT_BUTTON($self,$self->{fileClose},\&OnFileClose); EVT_GRID_SELECT_CELL($self->{gridFiles},\&OnSelectFileCell); *************** *** 285,288 **** --- 286,301 ---- # close the desired file $self->do_command(odcommand->new("c " . $file)); + my $gridCut = $self->{gridCut}; + my $remove = 0; + do { + $remove = 0; + for (my $row=0;$row<$gridCut->GetNumberRows();$row++) { + if ($gridCut->GetCellValue($row,0) eq $file) { + $gridCut->DeleteRows($row,1,1); + $remove = 1; + last; + } + } + } while ($remove); } $self->UpdateGUI(); |