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:
parent
e5f96698f8
commit
a98126d69b
|
@ -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>
|
2005-07-31 Ilkka Tuohela <hile@iki.fi>
|
||||||
|
|
||||||
* configure.in: Added 'fi' to ALL_LINGUAS.
|
* configure.in: Added 'fi' to ALL_LINGUAS.
|
||||||
|
|
|
@ -179,7 +179,8 @@ namespace UStringPrivate
|
||||||
: arg_no(1)
|
: arg_no(1)
|
||||||
{
|
{
|
||||||
#if __GNUC__ >= 3
|
#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
|
#endif
|
||||||
std::string::size_type b = 0, i = 0;
|
std::string::size_type b = 0, i = 0;
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,7 @@ struct FS
|
||||||
FS( )
|
FS( )
|
||||||
{
|
{
|
||||||
read = create = grow = shrink = move = check = copy = false ;
|
read = create = grow = shrink = move = check = copy = false ;
|
||||||
MIN = 0 ;
|
MIN = MAX = 0 ;
|
||||||
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 )
|
inline Glib::ustring num_to_str( Sector number )
|
||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::stringstream ss;
|
||||||
os .imbue( std::locale( "" ) );
|
ss << number ;
|
||||||
os << number ;
|
return ss .str( ) ;
|
||||||
return os .str( ) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//use http://developer.gnome.org/projects/gup/hig/2.0/design.html#Palette as a starting point..
|
//use http://developer.gnome.org/projects/gup/hig/2.0/design.html#Palette as a starting point..
|
||||||
|
|
|
@ -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
|
//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)
|
//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 ) )
|
if ( open_device( device ->path, device ) )
|
||||||
device_paths .push_back( get_sym_path( device ->path ) ) ;
|
device_paths .push_back( get_sym_path( device ->path ) ) ;
|
||||||
|
|
Loading…
Reference in New Issue