diff --git a/livesupport/src/products/gLiveSupport/src/LiveModeWindow.cxx b/livesupport/src/products/gLiveSupport/src/LiveModeWindow.cxx index 6ae9f24ad..880f7439b 100644 --- a/livesupport/src/products/gLiveSupport/src/LiveModeWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/LiveModeWindow.cxx @@ -37,6 +37,7 @@ #include #include +#include "LiveSupport/Core/TimeConversion.h" #include "LiveSupport/Widgets/WidgetFactory.h" #include "SchedulePlaylistWindow.h" #include "LiveModeWindow.h" @@ -239,7 +240,8 @@ LiveModeWindow :: addItem(Ptr::Ref playable) throw () infoString->append("\n" "duration: "); - infoString->append(to_simple_string(*playable->getPlaylength())); + infoString->append(*TimeConversion::timeDurationToHhMmSsString( + playable->getPlaylength() )); infoString->append(""); row[modelColumns.infoColumn] = *infoString; diff --git a/livesupport/src/products/gLiveSupport/src/SearchWindow.cxx b/livesupport/src/products/gLiveSupport/src/SearchWindow.cxx index 78183da4a..49a078451 100644 --- a/livesupport/src/products/gLiveSupport/src/SearchWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/SearchWindow.cxx @@ -37,6 +37,7 @@ #include #include +#include "LiveSupport/Core/TimeConversion.h" #include "LiveSupport/Widgets/WidgetFactory.h" #include "LiveSupport/Widgets/ScrolledNotebook.h" #include "LiveSupport/Widgets/Button.h" @@ -244,11 +245,11 @@ SearchWindow :: constructSearchResultsView(void) throw () searchResults->appendColumn(*getResourceUstring("typeColumnLabel"), modelColumns.typeColumn, 20); searchResults->appendColumn(*getResourceUstring("titleColumnLabel"), - modelColumns.titleColumn, 200); + modelColumns.titleColumn, 360); searchResults->appendColumn(*getResourceUstring("creatorColumnLabel"), - modelColumns.creatorColumn, 200); + modelColumns.creatorColumn, 260); searchResults->appendColumn(*getResourceUstring("lengthColumnLabel"), - modelColumns.lengthColumn, 120); + modelColumns.lengthColumn, 50); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; std::exit(1); @@ -377,8 +378,8 @@ SearchWindow :: onSearch(Ptr::Ref criteria) : ""; Ptr::Ref length = playable->getPlaylength(); - row[modelColumns.lengthColumn] = length ? to_simple_string(*length) - : ""; + row[modelColumns.lengthColumn] = length ? + *TimeConversion::timeDurationToHhMmSsString(length) : ""; } } diff --git a/livesupport/src/products/gLiveSupport/src/UploadFileWindow.cxx b/livesupport/src/products/gLiveSupport/src/UploadFileWindow.cxx index 4f0b10d55..75ea6943a 100644 --- a/livesupport/src/products/gLiveSupport/src/UploadFileWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/UploadFileWindow.cxx @@ -327,14 +327,10 @@ UploadFileWindow :: updateFileInfo(void) throw () } // display the new play length - std::ostringstream lengthStr; - lengthStr << std::setfill('0') - << std::setw(2) << playlength->hours() << ":" - << std::setw(2) << playlength->minutes() << ":" - << std::setw(2) << (playlength->fractional_seconds() < 500000 - ? playlength->seconds() - : playlength->seconds() + 1); - lengthValueLabel->set_text(lengthStr.str()); + Ptr::Ref lengthStr + = TimeConversion::timeDurationToHhMmSsString( + playlength); + lengthValueLabel->set_text(*lengthStr); // read the id3 tags Ptr::Ref tempTitle(new const Glib::ustring);