From 0b302ee0ce9713a4dcbe73a0b3c030e2ad5ca545 Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Wed, 24 Nov 2004 21:28:48 +0000 Subject: [PATCH] renamed columnheader from 'Type' to 'Filesystem'. Dunno why it was called * src/TreeView_Detail.cc: renamed columnheader from 'Type' to 'Filesystem'. Dunno why it was called 'Type' (maybe some PM legacy =) ) * src/Win_GParted.cc: Made device busy warning a bit more sensible. --- ChangeLog | 5 +++++ src/TreeView_Detail.cc | 2 +- src/Win_GParted.cc | 41 ++++++++++++++--------------------------- 3 files changed, 20 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11e41243..365bc3f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-24 Bart Hakvoort + + * src/TreeView_Detail.cc: renamed columnheader from 'Type' to 'Filesystem'. Dunno why it was called 'Type' (maybe some PM legacy =) ) + * src/Win_GParted.cc: Made device busy warning a bit more sensible. + 2004-11-24 Bart Hakvoort * include/Utils.h, diff --git a/src/TreeView_Detail.cc b/src/TreeView_Detail.cc index f47c2346..ce7c3f69 100644 --- a/src/TreeView_Detail.cc +++ b/src/TreeView_Detail.cc @@ -29,7 +29,7 @@ TreeView_Detail::TreeView_Detail( ) //append columns this->append_column( _("Partition"), treeview_detail_columns.partition ); - this->append_column( _("Type"), treeview_detail_columns.type_square ); + this->append_column( _("Filesystem"), treeview_detail_columns.type_square ); this->append_column( _("Size(MB)"), treeview_detail_columns.size ); this->append_column( _("Used(MB)"), treeview_detail_columns.used ); this->append_column( _("Unused(MB)"), treeview_detail_columns.unused ); diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index ece59987..859e7e4c 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -1145,41 +1145,28 @@ void Win_GParted::activate_apply() thread ->join( ) ; conn .disconnect( ) ; - //make list of involved devices which have at least one busy partition.. - std::vector devicenames ; - for ( unsigned int t = 0; t < devices .size( ); t++ ) + //find out if any of the involved devices is busy + bool any_busy = false ; + for ( unsigned int t = 0; t < devices .size( ) && ! any_busy; t++ ) if ( devices[ t ] .busy ) - for (unsigned int i = 0; i < operations .size( ); i++ ) + for (unsigned int i = 0; i < operations .size( ) && ! any_busy; i++ ) if ( operations[ i ] .device_path == devices[ t ] .path ) - { - devicenames .push_back( devices[ t ] .path ) ; - break ; - } - + any_busy = true ; //show warning if necessary - if ( devicenames .size( ) ) + if ( any_busy ) { - str_temp = "" ; - /*TO TRANSLATORS: after the colon (:) a list of devices will be shown */ - str_temp += _("The kernel was unable to re-read the partition table on:") ; - str_temp += "\n"; - for (unsigned int t=0; t" ; + str_temp += _("At least one operation was applied to a busy device.") ; str_temp += "\n\n" ; - str_temp += _( "This means Linux won't know anything about the modifications you made until you reboot.") ; - str_temp += "\n\n" ; - if ( devicenames .size( ) > 1 ) - str_temp += _( "You should reboot your computer before doing anything with these devices.") ; - else - str_temp += _( "You should reboot your computer before doing anything with this device.") ; - + str_temp += _("A busy device is a device with at least one mounted partition.") ; + str_temp += "\n"; + str_temp += _("Since making changes to a busy device may confuse the kernel it is advisable to reboot your computer.") ; + Gtk::MessageDialog dialog( *this, str_temp, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK, true ); dialog .run( ) ; - } - - + } + //wipe operations... operations.clear( ) ; liststore_operations ->clear( ) ;