[gparted] Replace deprecated get_vbox() with get_content_area() (!25)
- From: Mike Fleetwood <mfleetwo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Replace deprecated get_vbox() with get_content_area() (!25)
- Date: Sat, 27 Apr 2019 11:52:58 +0000 (UTC)
commit ad6d2b38904fe18d1aebed0d701618642fe85221
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Wed May 9 09:21:26 2018 +0100
Replace deprecated get_vbox() with get_content_area() (!25)
get_vbox() was deprecated in gtkmm 3.1.6 [1][2]. Switch to the
get_content_area() replacement. Note that GParted already requires
gtkmm >= 3.4 as set in configure.ac.
[1] Gtkmm 3.1.6 NEWS
https://gitlab.gnome.org/GNOME/gtkmm/blob/3.1.6/NEWS
"Dialog: Deprecate get_vbox(), replacing with get_content_area(),
to match the C function name."
[2] Gtkmm commit from 2011-06-13:
Dialog: Deprecate get_vbox(), replacing with get_content_area().
https://git.gnome.org/browse/gtkmm/commit/?id=5ccc289fa8e9b046c07f5ea234f5ced8c6356fc1
Closes !25 - Modern Gtk3 - part 1
src/DialogFeatures.cc | 4 ++--
src/DialogManageFlags.cc | 6 +++---
src/Dialog_Base_Partition.cc | 10 +++++-----
src/Dialog_Disklabel.cc | 2 +-
src/Dialog_FileSystem_Label.cc | 2 +-
src/Dialog_Partition_Info.cc | 8 ++++----
src/Dialog_Partition_Name.cc | 2 +-
src/Dialog_Progress.cc | 2 +-
src/Dialog_Rescue_Data.cc | 10 +++++-----
9 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/src/DialogFeatures.cc b/src/DialogFeatures.cc
index 1c4347d0..94c431a4 100644
--- a/src/DialogFeatures.cc
+++ b/src/DialogFeatures.cc
@@ -78,7 +78,7 @@ DialogFeatures::DialogFeatures()
Gtk::Box *filesystems_hbox(manage( new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)));
filesystems_hbox ->set_border_width( 6 ) ;
filesystems_hbox ->pack_start( filesystems_scrolled ) ;
- this ->get_vbox() ->pack_start( *filesystems_hbox ) ;
+ this->get_content_area()->pack_start(*filesystems_hbox);
// File system support legend
Gtk::Box *legend_hbox(manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 6)));
@@ -154,7 +154,7 @@ DialogFeatures::DialogFeatures()
legend_frame .set_label_widget( *Utils::mk_label( str_temp ) ) ;
legend_frame .set_shadow_type( Gtk::SHADOW_NONE ) ;
legend_frame .add( *legend_hbox ) ;
- this ->get_vbox() ->pack_start( legend_frame, Gtk::PACK_SHRINK ) ;
+ this->get_content_area()->pack_start(legend_frame, Gtk::PACK_SHRINK);
/*TO TRANSLATORS: This is a button that will search for the software tools installed and then refresh
the screen with the file system actions supported. */
add_button( _("Rescan For Supported Actions"), Gtk::RESPONSE_OK );
diff --git a/src/DialogManageFlags.cc b/src/DialogManageFlags.cc
index ec51be1c..a8d643a0 100644
--- a/src/DialogManageFlags.cc
+++ b/src/DialogManageFlags.cc
@@ -35,8 +35,8 @@ DialogManageFlags::DialogManageFlags( const Partition & partition, std::map<Glib
Glib::ustring str_temp = "<span weight=\"bold\" size=\"larger\">" ;
str_temp += Glib::ustring::compose( _("Manage flags on %1"), partition .get_path() ) ;
str_temp += "</span>\n" ;
- get_vbox() ->pack_start( * Utils::mk_label( str_temp ), Gtk::PACK_SHRINK );
-
+ get_content_area()->pack_start(*Utils::mk_label(str_temp), Gtk::PACK_SHRINK);
+
//setup treeview
liststore_flags = Gtk::ListStore::create( treeview_flags_columns ) ;
treeview_flags .set_model( liststore_flags ) ;
@@ -50,7 +50,7 @@ DialogManageFlags::DialogManageFlags( const Partition & partition, std::map<Glib
->signal_toggled() .connect( sigc::mem_fun( *this, &DialogManageFlags::on_flag_toggled ) ) ;
treeview_flags .set_size_request( 300, -1 ) ;
- get_vbox() ->pack_start( treeview_flags, Gtk::PACK_SHRINK ) ;
+ get_content_area()->pack_start(treeview_flags, Gtk::PACK_SHRINK);
this ->flag_info = flag_info ;
diff --git a/src/Dialog_Base_Partition.cc b/src/Dialog_Base_Partition.cc
index 9b042a64..37a6bc53 100644
--- a/src/Dialog_Base_Partition.cc
+++ b/src/Dialog_Base_Partition.cc
@@ -36,14 +36,14 @@ Dialog_Base_Partition::Dialog_Base_Partition()
// Pack resizer hbox
hbox_resizer.set_orientation(Gtk::ORIENTATION_HORIZONTAL);
- this ->get_vbox() ->pack_start( hbox_resizer, Gtk::PACK_SHRINK );
-
- //add label_minmax
- this ->get_vbox() ->pack_start( label_minmax, Gtk::PACK_SHRINK );
+ this->get_content_area()->pack_start(hbox_resizer, Gtk::PACK_SHRINK);
+
+ // Add label_minmax
+ this->get_content_area()->pack_start(label_minmax, Gtk::PACK_SHRINK);
// Pack hbox_main
hbox_main.set_orientation(Gtk::ORIENTATION_HORIZONTAL);
- this ->get_vbox() ->pack_start( hbox_main, Gtk::PACK_SHRINK );
+ this->get_content_area()->pack_start(hbox_main, Gtk::PACK_SHRINK);
// Put the vbox with resizer stuff (cool widget and spinbuttons) in the hbox_main
vbox_resize_move.set_orientation(Gtk::ORIENTATION_VERTICAL);
diff --git a/src/Dialog_Disklabel.cc b/src/Dialog_Disklabel.cc
index 09926ffe..1bb3c04a 100644
--- a/src/Dialog_Disklabel.cc
+++ b/src/Dialog_Disklabel.cc
@@ -34,7 +34,7 @@ Dialog_Disklabel::Dialog_Disklabel( const Device & device )
{
Gtk::Box *hbox(manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)));
- get_vbox()->pack_start(*hbox, Gtk::PACK_SHRINK);
+ get_content_area()->pack_start(*hbox, Gtk::PACK_SHRINK);
Gtk::Box *vbox(manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)));
diff --git a/src/Dialog_FileSystem_Label.cc b/src/Dialog_FileSystem_Label.cc
index b9f64cdf..3ecb7d7f 100644
--- a/src/Dialog_FileSystem_Label.cc
+++ b/src/Dialog_FileSystem_Label.cc
@@ -37,7 +37,7 @@ Dialog_FileSystem_Label::Dialog_FileSystem_Label( const Partition & partition )
Gtk::Box *hbox(manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)));
hbox->set_border_width( 5 );
hbox->set_spacing( 10 );
- get_vbox()->pack_start( *hbox, Gtk::PACK_SHRINK );
+ get_content_area()->pack_start(*hbox, Gtk::PACK_SHRINK);
// Only line: "Label: [EXISTINGLABEL ]"
hbox->pack_start( *Utils::mk_label("<b>" + Glib::ustring( _("Label:") ) + "</b>"),
diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc
index b11e40a8..af13e702 100644
--- a/src/Dialog_Partition_Info.cc
+++ b/src/Dialog_Partition_Info.cc
@@ -63,7 +63,7 @@ Dialog_Partition_Info::Dialog_Partition_Info( const Partition & partition ) : pa
//horizontally center the information scrolled window to match partition graphic
Gtk::Alignment * center_widget = manage( new Gtk::Alignment(0.5, 0.5, 0.0, 1.0) ) ;
center_widget ->add( info_scrolled ) ;
- this ->get_vbox() ->pack_start( *center_widget ) ;
+ this->get_content_area()->pack_start(*center_widget);
//add label for detail and fill with relevant info
Display_Info() ;
@@ -173,9 +173,9 @@ void Dialog_Partition_Info::init_drawingarea()
frame ->set_border_width( 10 ) ;
hbox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
hbox ->pack_start( *frame, Gtk::PACK_EXPAND_PADDING ) ;
-
- this ->get_vbox() ->pack_start( *hbox, Gtk::PACK_SHRINK ) ;
-
+
+ this->get_content_area()->pack_start(*hbox, Gtk::PACK_SHRINK);
+
//calculate proportional width of used, unused and unallocated
if (partition.type == TYPE_EXTENDED)
{
diff --git a/src/Dialog_Partition_Name.cc b/src/Dialog_Partition_Name.cc
index 3cdfa74b..d606cb3b 100644
--- a/src/Dialog_Partition_Name.cc
+++ b/src/Dialog_Partition_Name.cc
@@ -37,7 +37,7 @@ Dialog_Partition_Name::Dialog_Partition_Name( const Partition & partition, int m
Gtk::Box *hbox(manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)));
hbox->set_border_width( 5 );
hbox->set_spacing( 10 );
- get_vbox()->pack_start( *hbox, Gtk::PACK_SHRINK );
+ get_content_area()->pack_start(*hbox, Gtk::PACK_SHRINK);
// Only line: "Name: [EXISTINGNAME ]"
hbox->pack_start( *Utils::mk_label( "<b>" + Glib::ustring(_("Name:")) + "</b>" ),
diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc
index e7b69303..aab13a7b 100644
--- a/src/Dialog_Progress.cc
+++ b/src/Dialog_Progress.cc
@@ -52,7 +52,7 @@ Dialog_Progress::Dialog_Progress(const std::vector<Device>& devices, const std::
Gtk::Box *vbox(manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)));
vbox->set_border_width(10);
- this->get_vbox()->pack_start(*vbox, Gtk::PACK_EXPAND_WIDGET);
+ this->get_content_area()->pack_start(*vbox, Gtk::PACK_EXPAND_WIDGET);
Glib::ustring str_temp(_("Depending on the number and type of operations this might take a
long time."));
str_temp += "\n";
diff --git a/src/Dialog_Rescue_Data.cc b/src/Dialog_Rescue_Data.cc
index fa941214..f4755bb5 100644
--- a/src/Dialog_Rescue_Data.cc
+++ b/src/Dialog_Rescue_Data.cc
@@ -70,14 +70,14 @@ void Dialog_Rescue_Data::draw_dialog()
Gtk::Label *inconsis_label=manage(Utils::mk_label(msg_label));
inconsis_label->override_color(Gdk::RGBA("red"), Gtk::STATE_FLAG_NORMAL);
- this->get_vbox()->pack_end(*inconsis_label, Gtk::PACK_SHRINK, 5);
+ this->get_content_area()->pack_end(*inconsis_label, Gtk::PACK_SHRINK, 5);
}
message->append("</b></big>");
- this->get_vbox()->set_spacing(5);
+ this->get_content_area()->set_spacing(5);
Gtk::Label *msgLbl=Utils::mk_label(*message);
- this->get_vbox()->pack_start(*msgLbl, Gtk::PACK_SHRINK);
+ this->get_content_area()->pack_start(*msgLbl, Gtk::PACK_SHRINK);
this->create_list_of_fs();
@@ -92,7 +92,7 @@ void Dialog_Rescue_Data::draw_dialog()
infoBox->pack_start(*infoImg, Gtk::PACK_SHRINK, 5);
infoBox->pack_start(*infoLabel, Gtk::PACK_SHRINK);
- this->get_vbox()->pack_start(*infoBox, Gtk::PACK_SHRINK);
+ this->get_content_area()->pack_start(*infoBox, Gtk::PACK_SHRINK);
this->show_all_children();
@@ -146,7 +146,7 @@ void Dialog_Rescue_Data::create_list_of_fs()
vb->pack_start(*hb, Gtk::PACK_SHRINK);
}
- this->get_vbox()->pack_start(*this->frm, Gtk::PACK_SHRINK);
+ this->get_content_area()->pack_start(*this->frm, Gtk::PACK_SHRINK);
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]