From 4caae3dc85001b343166857ea7890a7832565274 Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Sun, 31 Oct 2004 12:06:02 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ include/Partition.h | 4 ---- src/Partition.cc | 3 +-- src/TreeView_Detail.cc | 2 +- src/VBox_VisualDisk.cc | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1e398d4..1b498d3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-10-31 Bart Hakvoort + + * 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 * configure.in: added checks for libuuid and libdl. Also refined libparted check a bit. diff --git a/include/Partition.h b/include/Partition.h index 1dfddf35..284599b5 100644 --- a/include/Partition.h +++ b/include/Partition.h @@ -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; diff --git a/src/Partition.cc b/src/Partition.cc index 2786c457..083e3844 100644 --- a/src/Partition.cc +++ b/src/Partition.cc @@ -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; } diff --git a/src/TreeView_Detail.cc b/src/TreeView_Detail.cc index a1c868f8..db9cb772 100644 --- a/src/TreeView_Detail.cc +++ b/src/TreeView_Detail.cc @@ -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 ; diff --git a/src/VBox_VisualDisk.cc b/src/VBox_VisualDisk.cc index 81b7d8bb..1c1f9ef0 100644 --- a/src/VBox_VisualDisk.cc +++ b/src/VBox_VisualDisk.cc @@ -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.