mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-08-27 19:50:23 +00:00
Made text by field labels selectable.
Useful for copy/paste of UUID or volume label. svn path=/trunk/; revision=997
This commit is contained in:
parent
4370af8779
commit
165da328fb
|
@ -1,5 +1,9 @@
|
||||||
2008-12-03 Curtis Gedak <gedakc@gmail.com>
|
2008-12-03 Curtis Gedak <gedakc@gmail.com>
|
||||||
|
|
||||||
|
* src/Dialog_Partition_Info.cc,
|
||||||
|
src/Win_GParted.cc: Made text by field labels selectable.
|
||||||
|
- Useful for copy/paste of UUID or volume label
|
||||||
|
|
||||||
* include/Utils.h,
|
* include/Utils.h,
|
||||||
src/Utils.cc: Added text selectable parameter to mk_label()
|
src/Utils.cc: Added text selectable parameter to mk_label()
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
table ->attach( * Utils::mk_label( Utils::get_filesystem_string( partition .filesystem ) ),
|
table ->attach( * Utils::mk_label( Utils::get_filesystem_string( partition .filesystem ), true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top++, bottom++,
|
top++, bottom++,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
|
@ -162,7 +162,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL) ;
|
Gtk::FILL) ;
|
||||||
table ->attach( * Utils::mk_label( Utils::format_size( partition .get_length() ) ),
|
table ->attach( * Utils::mk_label( Utils::format_size( partition .get_length() ), true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top++, bottom++,
|
top++, bottom++,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
|
@ -178,7 +178,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
table ->attach( * Utils::mk_label( Utils::format_size( partition .sectors_used ) ),
|
table ->attach( * Utils::mk_label( Utils::format_size( partition .sectors_used ), true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
|
@ -192,7 +192,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
table ->attach( * Utils::mk_label( Utils::format_size( partition .sectors_unused ) ),
|
table ->attach( * Utils::mk_label( Utils::format_size( partition .sectors_unused ), true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
|
@ -209,7 +209,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
table ->attach( * Utils::mk_label( Glib::build_path( ", ", partition .flags ) ),
|
table ->attach( * Utils::mk_label( Glib::build_path( ", ", partition .flags ), true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top++, bottom++,
|
top++, bottom++,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
|
@ -228,7 +228,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
table ->attach( * Utils::mk_label( Glib::build_path( "\n", partition .get_paths() ) ),
|
table ->attach( * Utils::mk_label( Glib::build_path( "\n", partition .get_paths() ), true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top++, bottom++,
|
top++, bottom++,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
|
@ -256,7 +256,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
else
|
else
|
||||||
str_temp = _("Not mounted") ;
|
str_temp = _("Not mounted") ;
|
||||||
|
|
||||||
table ->attach( * Utils::mk_label( str_temp ), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
table ->attach( * Utils::mk_label( str_temp, true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//label
|
//label
|
||||||
|
@ -266,7 +266,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL) ;
|
Gtk::FILL) ;
|
||||||
table ->attach( * Utils::mk_label( partition .label ),
|
table ->attach( * Utils::mk_label( partition .label, true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top++, bottom++,
|
top++, bottom++,
|
||||||
Gtk::FILL) ;
|
Gtk::FILL) ;
|
||||||
|
@ -279,7 +279,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL) ;
|
Gtk::FILL) ;
|
||||||
table ->attach( * Utils::mk_label( partition .uuid ),
|
table ->attach( * Utils::mk_label( partition .uuid, true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top++, bottom++,
|
top++, bottom++,
|
||||||
Gtk::FILL) ;
|
Gtk::FILL) ;
|
||||||
|
@ -293,7 +293,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
table ->attach( * Utils::mk_label( Utils::num_to_str( partition .sector_start ) ),
|
table ->attach( * Utils::mk_label( Utils::num_to_str( partition .sector_start ), true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top++, bottom++,
|
top++, bottom++,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
|
@ -303,7 +303,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
table ->attach( * Utils::mk_label( Utils::num_to_str( partition.sector_end ) ),
|
table ->attach( * Utils::mk_label( Utils::num_to_str( partition.sector_end ), true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top++, bottom++,
|
top++, bottom++,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
|
@ -313,7 +313,7 @@ void Dialog_Partition_Info::Display_Info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
table ->attach( * Utils::mk_label( Utils::num_to_str( partition .get_length() ) ),
|
table ->attach( * Utils::mk_label( Utils::num_to_str( partition .get_length() ), true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ),
|
||||||
1, 2,
|
1, 2,
|
||||||
top++, bottom++,
|
top++, bottom++,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
|
|
|
@ -427,7 +427,7 @@ void Win_GParted::init_device_info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
device_info .push_back( Utils::mk_label( "" ) ) ;
|
device_info .push_back( Utils::mk_label( "", true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ) ) ;
|
||||||
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
||||||
|
|
||||||
//size
|
//size
|
||||||
|
@ -435,7 +435,7 @@ void Win_GParted::init_device_info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
device_info .push_back( Utils::mk_label( "" ) ) ;
|
device_info .push_back( Utils::mk_label( "", true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ) ) ;
|
||||||
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
||||||
|
|
||||||
//path
|
//path
|
||||||
|
@ -446,7 +446,7 @@ void Win_GParted::init_device_info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
device_info .push_back( Utils::mk_label( "" ) ) ;
|
device_info .push_back( Utils::mk_label( "", true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ) ) ;
|
||||||
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
||||||
|
|
||||||
vbox_info .pack_start( *table, Gtk::PACK_SHRINK );
|
vbox_info .pack_start( *table, Gtk::PACK_SHRINK );
|
||||||
|
@ -464,7 +464,7 @@ void Win_GParted::init_device_info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL );
|
Gtk::FILL );
|
||||||
device_info .push_back( Utils::mk_label( "" ) ) ;
|
device_info .push_back( Utils::mk_label( "", true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ) ) ;
|
||||||
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
||||||
|
|
||||||
//heads
|
//heads
|
||||||
|
@ -472,7 +472,7 @@ void Win_GParted::init_device_info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
device_info .push_back( Utils::mk_label( "" ) ) ;
|
device_info .push_back( Utils::mk_label( "", true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ) ) ;
|
||||||
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
||||||
|
|
||||||
//sectors/track
|
//sectors/track
|
||||||
|
@ -480,7 +480,7 @@ void Win_GParted::init_device_info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
device_info .push_back( Utils::mk_label( "" ) ) ;
|
device_info .push_back( Utils::mk_label( "", true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ) ) ;
|
||||||
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL );
|
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL );
|
||||||
|
|
||||||
//cylinders
|
//cylinders
|
||||||
|
@ -488,7 +488,7 @@ void Win_GParted::init_device_info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL ) ;
|
Gtk::FILL ) ;
|
||||||
device_info .push_back( Utils::mk_label( "" ) ) ;
|
device_info .push_back( Utils::mk_label( "", true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ) ) ;
|
||||||
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
||||||
|
|
||||||
//total sectors
|
//total sectors
|
||||||
|
@ -496,7 +496,7 @@ void Win_GParted::init_device_info()
|
||||||
0, 1,
|
0, 1,
|
||||||
top, bottom,
|
top, bottom,
|
||||||
Gtk::FILL );
|
Gtk::FILL );
|
||||||
device_info .push_back( Utils::mk_label( "" ) ) ;
|
device_info .push_back( Utils::mk_label( "", true, Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, false, true ) ) ;
|
||||||
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
table ->attach( * device_info .back(), 1, 2, top++, bottom++, Gtk::FILL ) ;
|
||||||
|
|
||||||
vbox_info .pack_start( *table, Gtk::PACK_SHRINK );
|
vbox_info .pack_start( *table, Gtk::PACK_SHRINK );
|
||||||
|
|
Loading…
Reference in a new issue