gtk+-2.10 seems to return the last valid iterator if get_iter is executed

* src/Dialog_Progress.cc: gtk+-2.10 seems to return the last valid
  iterator if get_iter is executed with an invalid treepath. This is
  different from gtk+-2.8 and gave some problems in the
  operationdetails. I added a check to make it work in both
  situations.
This commit is contained in:
Bart Hakvoort 2006-10-22 18:19:23 +00:00
parent f792de2059
commit c4dab9e55d
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2006-10-22 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/Dialog_Progress.cc: gtk+-2.10 seems to return the last valid
iterator if get_iter is executed with an invalid treepath. This is
different from gtk+-2.8 and gave some problems in the
operationdetails. I added a check to make it work in both
situations.
2006-10-01 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/GParted_Core.cc: only add mountpoints and paths if they exist

View File

@ -117,7 +117,8 @@ void Dialog_Progress::on_signal_update( const OperationDetail & operationdetail
{
Gtk::TreeModel::iterator iter = treestore_operations ->get_iter( operationdetail .get_treepath() ) ;
if ( iter )
//i added the second check after get_iter() in gtk+-2.10 seems to behave differently from gtk+-2.8
if ( iter && treestore_operations ->get_string( iter ) == operationdetail .get_treepath() )
{
Gtk::TreeRow treerow = *iter ;