quick 'fix' for crashers in some locales (#157871) basicly the same +

* compose/ucompose.hpp: quick 'fix' for crashers in some locales (#157871)
* include/Utils.h: basicly the same + minor cleanups
* src/GParted_Core.cc: replaced C-style cast with static_cast..
This commit is contained in:
Bart Hakvoort 2005-08-31 02:30:25 +00:00
parent e5f96698f8
commit a98126d69b
4 changed files with 19 additions and 14 deletions

View File

@ -1,3 +1,9 @@
2005-08-30 Bart Hakvoort <hakvoort@cvs.gnome.org>
* compose/ucompose.hpp: quick 'fix' for crashers in some locales (#157871)
* include/Utils.h: basicly the same + minor cleanups
* src/GParted_Core.cc: replaced C-style cast with static_cast..
2005-07-31 Ilkka Tuohela <hile@iki.fi>
* configure.in: Added 'fi' to ALL_LINGUAS.

View File

@ -179,7 +179,8 @@ namespace UStringPrivate
: arg_no(1)
{
#if __GNUC__ >= 3
os.imbue(std::locale("")); // use the user's locale for the stream
//plors: i've uncommented this one since it caused a crasher at line 124 for some locales (e.g. nl_BE)
//os.imbue(std::locale("")); // use the user's locale for the stream
#endif
std::string::size_type b = 0, i = 0;

View File

@ -55,8 +55,7 @@ struct FS
FS( )
{
read = create = grow = shrink = move = check = copy = false ;
MIN = 0 ;
MAX = 0 ;
MIN = MAX = 0 ;
}
};
@ -99,10 +98,9 @@ inline Gtk::Label * mk_label( const Glib::ustring & text, bool use_markup = true
inline Glib::ustring num_to_str( Sector number )
{
std::ostringstream os;
os .imbue( std::locale( "" ) );
os << number ;
return os .str( ) ;
std::stringstream ss;
ss << number ;
return ss .str( ) ;
}
//use http://developer.gnome.org/projects/gup/hig/2.0/design.html#Palette as a starting point..

View File

@ -80,7 +80,7 @@ void GParted_Core::get_devices( std::vector<Device> & devices )
//in certain cases (e.g. when there's a cd in the cdrom-drive) ped_device_probe_all will find a 'ghost' device that has no name or contains
//random garbage. Those 2 checks try to prevent such a ghostdevice from being initialized.. (tested over a 1000 times with and without cd)
while ( device && strlen( device ->path ) > 6 && ( (Glib::ustring) device ->path ) .is_ascii( ) )
while ( device && strlen( device ->path ) > 6 && static_cast<Glib::ustring>( device ->path ) .is_ascii( ) )
{
if ( open_device( device ->path, device ) )
device_paths .push_back( get_sym_path( device ->path ) ) ;