Place partition information LVM2 member names in string list (#690542)

Placing the LVM2 member names in a string list enables the member names
to be selected all at once by a user.  This was not possible with
separate label widgets for each LVM2 member name.

Bug 690542 - Partition Information Dialog Warning not readable
This commit is contained in:
Curtis Gedak 2014-04-24 12:53:41 -06:00 committed by Mike Fleetwood
parent 960bb2c6cd
commit c0529abf36
1 changed files with 7 additions and 9 deletions

View File

@ -391,19 +391,17 @@ void Dialog_Partition_Info::Display_Info()
if ( ! vgname .empty() ) if ( ! vgname .empty() )
members = lvm2_pv_info .get_vg_members( vgname ) ; members = lvm2_pv_info .get_vg_members( vgname ) ;
if ( members .empty() ) Glib::ustring members_str = "" ;
table ->attach( * Utils::mk_label( "" ), 2, 3, top++, bottom++, Gtk::FILL ) ; if ( ! members .empty() )
else
{ {
table ->attach( * Utils::mk_label( members [0], true, false, true ), for ( unsigned int i = 0 ; i < members .size() ; i ++ )
2, 3, top++, bottom++, Gtk::FILL ) ;
for ( unsigned int i = 1 ; i < members .size() ; i ++ )
{ {
table ->attach( * Utils::mk_label( "" ), 0, 1, top, bottom, Gtk::FILL) ; if ( i > 0 )
table ->attach( * Utils::mk_label( members [i], true, false, true ), members_str += "\n" ;
2, 3, top++, bottom++, Gtk::FILL ) ; members_str += members[i] ;
} }
} }
table ->attach( * Utils::mk_label( members_str, true, false, true ), 2, 3, top++, bottom++, Gtk::FILL ) ;
} }
//Right field & value pair area //Right field & value pair area