removed color_string replaced color_string with Get_Color from Utils.h

* include/Partition.h,
  src/Partition.cc: removed color_string
* src/VBox_VisualDisk.cc,
  src/TreeView_Detail.cc: replaced color_string with Get_Color from Utils.h
This commit is contained in:
Bart Hakvoort 2004-10-31 12:06:02 +00:00
parent dd1f3d8b42
commit 4caae3dc85
5 changed files with 10 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2004-10-31 Bart Hakvoort <gparted@users.sf.net>
* include/Partition.h,
src/Partition.cc: removed color_string
* src/VBox_VisualDisk.cc,
src/TreeView_Detail.cc: replaced color_string with Get_Color from Utils.h
2004-10-30 Bart Hakvoort <gparted@users.sf.net>
* configure.in: added checks for libuuid and libdl. Also refined libparted check a bit.

View File

@ -68,11 +68,8 @@ public:
void Set_Used( Sector used ) ;
void Set_Unallocated( Sector sector_start, Sector sector_end, bool inside_extended );
//get color associated with filesystem
//update partition number (used when a logical partition is deleted)
void Update_Number( int new_number );
@ -91,7 +88,6 @@ public:
Sector sectors_used;
Sector sectors_unused;
Gdk::Color color;
Glib::ustring color_string;
bool inside_extended;//used to check wether partition resides inside extended partition or not.
bool busy;
Glib::ustring error;

View File

@ -27,7 +27,7 @@ Partition::Partition( )
void Partition::Reset( )
{
partition = filesystem = error = flags = color_string = "" ;
partition = filesystem = error = flags = "" ;
status = GParted::STAT_REAL ;
type = GParted::UNALLOCATED ;
partition_number = sector_start = sector_end = sectors_used = sectors_unused = -1;
@ -51,7 +51,6 @@ void Partition::Set( const Glib::ustring & partition,
this ->sector_start = sector_start;
this ->sector_end = sector_end;
this ->color.set( Get_Color( filesystem ) );
this ->color_string = Get_Color( filesystem );
this ->inside_extended = inside_extended;
this ->busy = busy;
}

View File

@ -134,7 +134,7 @@ void TreeView_Detail::Create_Row( const Gtk::TreeRow & treerow, Partition & part
treerow[treeview_detail_columns.status_icon] = render_icon(Gtk::Stock::DIALOG_WARNING, Gtk::ICON_SIZE_BUTTON);
treerow[treeview_detail_columns.partition] = partition.partition;
treerow[treeview_detail_columns.color] = partition.color_string;
treerow[treeview_detail_columns.color] = Get_Color( partition .filesystem ) ;
partition .type == GParted::UNALLOCATED ? treerow[treeview_detail_columns.text_color] = "darkgrey" : treerow[treeview_detail_columns.text_color] = "black" ;
treerow[treeview_detail_columns.type] = partition.filesystem ;

View File

@ -185,7 +185,7 @@ void VBox_VisualDisk::Build_Legend( )
else
hbox_legend ->pack_start( * mk_label( " " ), Gtk::PACK_SHRINK );
hbox_legend ->pack_start( * mk_label( "██ ", false, false, false, partitions[i] .color_string ), Gtk::PACK_SHRINK );
hbox_legend ->pack_start( * mk_label( "██ ", false, false, false, Get_Color( partitions[i] .filesystem ) ), Gtk::PACK_SHRINK );
hbox_legend ->pack_start( * mk_label( partitions[i] .filesystem + " " ), Gtk::PACK_SHRINK );
//make sure this color isn't added to the legend again.