catch markup exceptions cleanups

2006-08-24 Bart Hakvoort <hakvoort@cvs.gnome.org>

* src/OperationDetail.cc: catch markup exceptions
* src/Utils.cc: cleanups
This commit is contained in:
Bart Hakvoort 2006-08-24 19:29:28 +00:00 committed by Bart Hakvoort
parent e58a5f3cf7
commit 5631232ee1
3 changed files with 25 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2006-08-24 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/OperationDetail.cc: catch markup exceptions
* src/Utils.cc: cleanups
2006-08-21 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/Utils.h,

View File

@ -40,20 +40,27 @@ OperationDetail::OperationDetail( const Glib::ustring & description, OperationDe
void OperationDetail::set_description( const Glib::ustring & description, Font font )
{
switch ( font )
try
{
case FONT_NORMAL:
this ->description = Glib::Markup::escape_text( description ) ;
break ;
case FONT_BOLD:
this ->description = "<b>" + Glib::Markup::escape_text( description ) + "</b>" ;
break ;
case FONT_ITALIC:
this ->description = "<i>" + Glib::Markup::escape_text( description ) + "</i>" ;
break ;
case FONT_BOLD_ITALIC:
this ->description = "<b><i>" + Glib::Markup::escape_text( description ) + "</i></b>" ;
break ;
switch ( font )
{
case FONT_NORMAL:
this ->description = Glib::Markup::escape_text( description ) ;
break ;
case FONT_BOLD:
this ->description = "<b>" + Glib::Markup::escape_text( description ) + "</b>" ;
break ;
case FONT_ITALIC:
this ->description = "<i>" + Glib::Markup::escape_text( description ) + "</i>" ;
break ;
case FONT_BOLD_ITALIC:
this ->description = "<b><i>" + Glib::Markup::escape_text( description ) + "</i></b>" ;
break ;
}
}
catch ( Glib::Exception & e )
{
this ->description = e .what() ;
}
on_update( *this ) ;

View File

@ -253,9 +253,6 @@ int Utils::execute_command( const Glib::ustring & command,
{
error = e .what() ;
//spit exceptions to stdout..
std::cout << error << std::endl ;
return -1 ;
}