diff --git a/ChangeLog b/ChangeLog index aa8304aa..22ff7a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-26 Bart Hakvoort + + * include/Dialog_Progress.h, + src/Dialog_Progress.cc, + src/Win_GParted.cc: made some changes to progressdialog behaviour. + 2006-01-26 Bart Hakvoort * gparted.desktop.in, diff --git a/include/Dialog_Progress.h b/include/Dialog_Progress.h index 1de8a8cd..91cdb88c 100644 --- a/include/Dialog_Progress.h +++ b/include/Dialog_Progress.h @@ -43,6 +43,7 @@ public: private: void update_operation_details( const Gtk::TreeRow & treerow, const OperationDetails & operation_details ) ; void on_signal_show() ; + void on_expander_changed() ; static void *static_pthread_apply_operation( void * p_dialog_progress ) ; void on_response( int response_id ) ; diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc index 3924f0b2..b16b1987 100644 --- a/src/Dialog_Progress.cc +++ b/src/Dialog_Progress.cc @@ -26,6 +26,7 @@ namespace GParted Dialog_Progress::Dialog_Progress( const std::vector & operations ) { + this ->set_resizable( false ) ; this ->set_has_separator( false ) ; this ->set_title( _("Applying pending operations") ) ; this ->operations = operations ; @@ -52,7 +53,6 @@ Dialog_Progress::Dialog_Progress( const std::vector & operations ) this ->get_vbox() ->pack_start( label_current, Gtk::PACK_SHRINK ); this ->get_vbox() ->pack_start( * Utils::mk_label( "" + static_cast( _("Completed Operations:") ) + "" ), Gtk::PACK_SHRINK ); - progressbar_all .set_size_request( 500, -1 ) ; this ->get_vbox() ->pack_start( progressbar_all, Gtk::PACK_SHRINK ); //create some icons here, instead of recreating them every time @@ -87,6 +87,8 @@ Dialog_Progress::Dialog_Progress( const std::vector & operations ) expander_details .set_label( "" + static_cast( _("Details") ) + "" ) ; expander_details .set_use_markup( true ) ; + expander_details .property_expanded() .signal_changed() .connect( + sigc::mem_fun(*this, &Dialog_Progress::on_expander_changed) ); expander_details .add( scrolledwindow ) ; this ->get_vbox() ->pack_start( expander_details, Gtk::PACK_EXPAND_WIDGET ) ; @@ -231,7 +233,12 @@ void Dialog_Progress::on_signal_show() dialog .set_secondary_text( str_temp, true ) ; dialog .run() ; } - } + } +} + +void Dialog_Progress::on_expander_changed() +{ + this ->set_resizable( expander_details .get_expanded() ) ; } void * Dialog_Progress::static_pthread_apply_operation( void * p_dialog_progress ) diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 95f191a9..72cc1f50 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -1384,6 +1384,7 @@ void Win_GParted::activate_apply( ) dialog .hide() ; //hide confirmationdialog Dialog_Progress dialog_progress( operations ) ; + dialog_progress .set_transient_for( *this ) ; dialog_progress .signal_apply_operation .connect( sigc::mem_fun(gparted_core, &GParted_Core::apply_operation_to_disk) ) ;