diff --git a/ChangeLog b/ChangeLog index 7a100a25..f5b8264f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-12-03 Curtis Gedak + * 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, src/Utils.cc: Added text selectable parameter to mk_label() diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc index 71ac0906..e0275695 100644 --- a/src/Dialog_Partition_Info.cc +++ b/src/Dialog_Partition_Info.cc @@ -152,7 +152,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top++, bottom++, Gtk::FILL ) ; @@ -162,7 +162,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top++, bottom++, Gtk::FILL ) ; @@ -178,7 +178,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top, bottom, Gtk::FILL ) ; @@ -192,7 +192,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top, bottom, Gtk::FILL ) ; @@ -209,7 +209,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top++, bottom++, Gtk::FILL ) ; @@ -228,7 +228,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top++, bottom++, Gtk::FILL ) ; @@ -256,7 +256,7 @@ void Dialog_Partition_Info::Display_Info() else 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 @@ -266,7 +266,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top++, bottom++, Gtk::FILL) ; @@ -279,7 +279,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top++, bottom++, Gtk::FILL) ; @@ -293,7 +293,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top++, bottom++, Gtk::FILL ) ; @@ -303,7 +303,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top++, bottom++, Gtk::FILL ) ; @@ -313,7 +313,7 @@ void Dialog_Partition_Info::Display_Info() 0, 1, top, bottom, 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, top++, bottom++, Gtk::FILL ) ; diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 90483c38..318091e3 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -427,7 +427,7 @@ void Win_GParted::init_device_info() 0, 1, top, bottom, 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 ) ; //size @@ -435,7 +435,7 @@ void Win_GParted::init_device_info() 0, 1, top, bottom, 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 ) ; //path @@ -446,7 +446,7 @@ void Win_GParted::init_device_info() 0, 1, top, bottom, 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 ) ; vbox_info .pack_start( *table, Gtk::PACK_SHRINK ); @@ -464,7 +464,7 @@ void Win_GParted::init_device_info() 0, 1, top, bottom, 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 ) ; //heads @@ -472,7 +472,7 @@ void Win_GParted::init_device_info() 0, 1, top, bottom, 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 ) ; //sectors/track @@ -480,7 +480,7 @@ void Win_GParted::init_device_info() 0, 1, top, bottom, 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 ); //cylinders @@ -488,7 +488,7 @@ void Win_GParted::init_device_info() 0, 1, top, bottom, 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 ) ; //total sectors @@ -496,7 +496,7 @@ void Win_GParted::init_device_info() 0, 1, top, bottom, 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 ) ; vbox_info .pack_start( *table, Gtk::PACK_SHRINK );