[gparted] Stop using deprecated method free_colors() (#652044)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Stop using deprecated method free_colors() (#652044)
- Date: Tue, 15 Oct 2013 16:35:27 +0000 (UTC)
commit 7f5ac07c3a5e7de3b900056122f8892f48735931
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Fri Oct 11 10:16:49 2013 +0100
Stop using deprecated method free_colors() (#652044)
Gtkmm releases 2.7.1 in July 2005 and 2.8 in September 2005 deprecated
Gdk::Colormap::free_colors() and replaced it with
Gdk::Colormap::free_color(). The oldest distribution currently
supported is RHEL / CentOS 5.9 with gtkmm 2.10 so just unconditionally
replace.
ANNOUNCE: gtkmm 2.7.1
https://mail.gnome.org/archives/gnome-announce-list/2005-July/msg00025.html
ANNOUNCE: gtkmm and glibmm 2.8
https://mail.gnome.org/archives/gnome-announce-list/2005-September/msg00026.html
Bug #652044 - uses deprecated APIs
src/Dialog_Partition_Info.cc | 8 ++++----
src/DrawingAreaVisualDisk.cc | 10 +++++-----
src/Frame_Resizer_Base.cc | 16 ++++++++--------
3 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc
index 919a456..069b2fd 100644
--- a/src/Dialog_Partition_Info.cc
+++ b/src/Dialog_Partition_Info.cc
@@ -483,10 +483,10 @@ void Dialog_Partition_Info::Display_Info()
Dialog_Partition_Info::~Dialog_Partition_Info()
{
- this ->get_colormap() ->free_colors( color_used, 1 ) ;
- this ->get_colormap() ->free_colors( color_unused, 1 ) ;
- this ->get_colormap() ->free_colors( color_text, 1 ) ;
- this ->get_colormap() ->free_colors( color_partition, 1 ) ;
+ this ->get_colormap() ->free_color( color_used ) ;
+ this ->get_colormap() ->free_color( color_unused ) ;
+ this ->get_colormap() ->free_color( color_text ) ;
+ this ->get_colormap() ->free_color( color_partition ) ;
}
} //GParted
diff --git a/src/DrawingAreaVisualDisk.cc b/src/DrawingAreaVisualDisk.cc
index 1ec500b..47034fa 100644
--- a/src/DrawingAreaVisualDisk.cc
+++ b/src/DrawingAreaVisualDisk.cc
@@ -441,7 +441,7 @@ void DrawingAreaVisualDisk::free_colors( std::vector<visual_partition> & visual_
{
for ( unsigned int t = 0 ; t < visual_partitions .size() ; t++ )
{
- get_colormap() ->free_colors( visual_partitions[ t ] .color, 1 ) ;
+ get_colormap() ->free_color( visual_partitions[ t ] .color ) ;
if ( visual_partitions[ t ] .logicals .size() > 0 )
free_colors( visual_partitions[ t ] .logicals ) ;
@@ -453,10 +453,10 @@ DrawingAreaVisualDisk::~DrawingAreaVisualDisk()
clear() ;
//free the allocated colors
- get_colormap() ->free_colors( color_used, 1 ) ;
- get_colormap() ->free_colors( color_unused, 1 ) ;
- get_colormap() ->free_colors( color_unallocated, 1 ) ;
- get_colormap() ->free_colors( color_text, 1 ) ;
+ get_colormap() ->free_color( color_used ) ;
+ get_colormap() ->free_color( color_unused ) ;
+ get_colormap() ->free_color( color_unallocated ) ;
+ get_colormap() ->free_color( color_text ) ;
}
} //GParted
diff --git a/src/Frame_Resizer_Base.cc b/src/Frame_Resizer_Base.cc
index 746e55d..18d8002 100644
--- a/src/Frame_Resizer_Base.cc
+++ b/src/Frame_Resizer_Base.cc
@@ -70,14 +70,14 @@ void Frame_Resizer_Base::init()
void Frame_Resizer_Base::set_rgb_partition_color( const Gdk::Color & color )
{
- this ->get_colormap() ->free_colors( color_partition, 1 ) ;
+ this ->get_colormap() ->free_color( color_partition ) ;
this ->color_partition = color ;
this ->get_colormap() ->alloc_color( color_partition ) ;
}
void Frame_Resizer_Base::override_default_rgb_unused_color( const Gdk::Color & color )
{
- this ->get_colormap() ->free_colors( color_unused, 1 ) ;
+ this ->get_colormap() ->free_color( color_unused ) ;
this ->color_unused = color ;
this ->get_colormap() ->alloc_color( color_unused ) ;
}
@@ -428,12 +428,12 @@ void Frame_Resizer_Base::Draw_Resize_Grip( ArrowType arrow_type )
Frame_Resizer_Base::~Frame_Resizer_Base()
{
- this ->get_colormap() ->free_colors( color_used, 1 ) ;
- this ->get_colormap() ->free_colors( color_unused, 1 ) ;
- this ->get_colormap() ->free_colors( color_arrow, 1 ) ;
- this ->get_colormap() ->free_colors( color_background, 1 ) ;
- this ->get_colormap() ->free_colors( color_partition, 1 ) ;
- this ->get_colormap() ->free_colors( color_arrow_rectangle, 1 ) ;
+ this ->get_colormap() ->free_color( color_used ) ;
+ this ->get_colormap() ->free_color( color_unused ) ;
+ this ->get_colormap() ->free_color( color_arrow ) ;
+ this ->get_colormap() ->free_color( color_background ) ;
+ this ->get_colormap() ->free_color( color_partition ) ;
+ this ->get_colormap() ->free_color( color_arrow_rectangle ) ;
delete cursor_resize;
delete cursor_move;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]