[gparted] Use Gtk::Box for Dialog_Partition_Info (!25)
- From: Mike Fleetwood <mfleetwo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Use Gtk::Box for Dialog_Partition_Info (!25)
- Date: Sat, 27 Apr 2019 11:51:43 +0000 (UTC)
commit 363868bf5c5cbc1db4194b82b2d467cbeddafe89
Author: Luca Bacci <luca bacci982 gmail com>
Date: Wed Feb 27 16:26:58 2019 +0100
Use Gtk::Box for Dialog_Partition_Info (!25)
Gtk::HBox and Gtk::VBox were deprecated in Gtkmm 3.2. Replace with
plain Gtk::Box.
This commit makes the change for Dialog_Partition_Info.{h,cc}.
Closes !25 - Modern Gtk3 - part 1
include/Dialog_Partition_Info.h | 4 ++--
src/Dialog_Partition_Info.cc | 11 ++++++-----
2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/include/Dialog_Partition_Info.h b/include/Dialog_Partition_Info.h
index 7be93e2a..eabc6a63 100644
--- a/include/Dialog_Partition_Info.h
+++ b/include/Dialog_Partition_Info.h
@@ -50,10 +50,10 @@ private:
const Partition & partition; // (Alias to element in Win_GParted::display_partitions[] vector).
- Gtk::HBox *hbox ;
+ Gtk::Box *hbox;
Gtk::DrawingArea drawingarea ;
Gtk::Frame *frame ;
- Gtk::VBox info_msg_vbox ;
+ Gtk::Box info_msg_vbox;
Gtk::ScrolledWindow info_scrolled ;
Glib::RefPtr<Pango::Layout> pango_layout;
diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc
index 80cc7255..21c494f7 100644
--- a/src/Dialog_Partition_Info.cc
+++ b/src/Dialog_Partition_Info.cc
@@ -47,11 +47,12 @@ Dialog_Partition_Info::Dialog_Partition_Info( const Partition & partition ) : pa
init_drawingarea() ;
- //place info and optional messages in scrollable window
+ // Place info and optional messages in scrollable window
+ info_msg_vbox.set_orientation(Gtk::ORIENTATION_VERTICAL);
info_msg_vbox .set_border_width( 6 ) ;
info_scrolled .set_policy( Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC ) ;
info_scrolled .add( info_msg_vbox ) ;
- //As Gtk::VBox widget info_msg_vbox doesn't have a native scrolling capability a
+ // As Gtk::Box widget info_msg_vbox doesn't have a native scrolling capability a
// Gtk::Viewport is automatically created to contain it when it is added to the
// Gtk::ScrolledWindow widget info_scrolled. The Viewport widget is created with
// shadow type GTK_SHADOW_IN by default. Change to GTK_SHADOW_NONE.
@@ -74,7 +75,7 @@ Dialog_Partition_Info::Dialog_Partition_Info( const Partition & partition ) : pa
{
Gtk::Image* image = Utils::mk_image(Gtk::Stock::DIALOG_WARNING,
Gtk::ICON_SIZE_BUTTON);
- hbox = manage(new Gtk::HBox());
+ hbox = manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
hbox->pack_start(*image, Gtk::PACK_SHRINK);
}
@@ -105,7 +106,7 @@ Dialog_Partition_Info::Dialog_Partition_Info( const Partition & partition ) : pa
concatenated_messages += "<i>" + messages[i].substr( 0, take ) + "</i>";
}
}
- Gtk::VBox *vbox( manage( new Gtk::VBox() ) ) ;
+ Gtk::Box *vbox = manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
vbox ->set_border_width( 5 ) ;
vbox->pack_start( *Utils::mk_label( concatenated_messages, true, true, true ),
Gtk::PACK_SHRINK );
frame ->add( *vbox ) ;
@@ -169,7 +170,7 @@ void Dialog_Partition_Info::init_drawingarea()
frame ->set_shadow_type( Gtk::SHADOW_ETCHED_OUT ) ;
frame ->set_border_width( 10 ) ;
- hbox = manage( new Gtk::HBox() ) ;
+ 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 ) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]