diff --git a/ChangeLog b/ChangeLog index 895f95e2..43f1b33b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-04-02 Bart Hakvoort + + * include/Utils.h, + src/Utils.cc: added convenience function + * src/DialogManageFlags.cc, + src/Win_GParted.cc: cleanups + 2006-04-02 Bart Hakvoort * include/DialogManageFlags.h, diff --git a/include/Utils.h b/include/Utils.h index 582c326e..b06a02fd 100644 --- a/include/Utils.h +++ b/include/Utils.h @@ -124,6 +124,7 @@ public: static Glib::ustring get_filesystem_string( FILESYSTEM filesystem ) ; static Glib::ustring format_size( Sector size ) ; static double sector_to_unit( Sector sectors, SIZE_UNIT size_unit ) ; + static int execute_command( const Glib::ustring & command ) ; static int execute_command( const Glib::ustring & command, Glib::ustring & output, Glib::ustring & error, diff --git a/src/DialogManageFlags.cc b/src/DialogManageFlags.cc index 8ac22d6f..ad579123 100644 --- a/src/DialogManageFlags.cc +++ b/src/DialogManageFlags.cc @@ -30,8 +30,8 @@ DialogManageFlags::DialogManageFlags( const Partition & partition, std::map" ; str_temp += String::ucompose( _("Manage flags on %1"), partition .get_path() ) ; str_temp += "\n" ; @@ -49,7 +49,6 @@ DialogManageFlags::DialogManageFlags( const Partition & partition, std::map( treeview_flags .get_column_cell_renderer( 0 ) ) ->signal_toggled() .connect( sigc::mem_fun( *this, &DialogManageFlags::on_flag_toggled ) ) ; - treeview_flags .set_size_request( 300, -1 ) ; get_vbox() ->pack_start( treeview_flags, Gtk::PACK_SHRINK ) ; this ->partition = partition ; diff --git a/src/Utils.cc b/src/Utils.cc index d1dde6db..b50183e7 100644 --- a/src/Utils.cc +++ b/src/Utils.cc @@ -184,6 +184,12 @@ double Utils::sector_to_unit( Sector sectors, SIZE_UNIT size_unit ) return sectors ; } } + +int Utils::execute_command( const Glib::ustring & command ) +{ + Glib::ustring dummy ; + return execute_command( command, dummy, dummy ) ; +} int Utils::execute_command( const Glib::ustring & command, Glib::ustring & output, diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 8f85fe11..66e70db5 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -1532,9 +1532,13 @@ void Win_GParted::thread_toggle_swap( bool * succes, Glib::ustring * error ) Glib::ustring dummy ; if ( selected_partition .busy ) - *succes = ! Utils::execute_command( "swapoff -v " + selected_partition .get_path() + " && sync", dummy, *error ) ; + *succes = ! Utils::execute_command( "swapoff -v " + selected_partition .get_path() + " && sync", + dummy, + *error ) ; else - *succes = ! Utils::execute_command( "swapon -v " + selected_partition .get_path() + " && sync", dummy, *error ) ; + *succes = ! Utils::execute_command( "swapon -v " + selected_partition .get_path() + " && sync", + dummy, + *error ) ; pulse = false ; }