[gparted] Use Gtk::Box for Dialog_Base_Partition (!25)
- From: Mike Fleetwood <mfleetwo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Use Gtk::Box for Dialog_Base_Partition (!25)
- Date: Sat, 27 Apr 2019 11:51:38 +0000 (UTC)
commit bfeb123462ea148a64119c1c7593ed1bc607dcb1
Author: Luca Bacci <luca bacci982 gmail com>
Date: Wed Feb 27 16:22:07 2019 +0100
Use Gtk::Box for Dialog_Base_Partition (!25)
Gtk::HBox and Gtk::VBox were deprecated in Gtkmm 3.2. Replace with
plain Gtk::Box.
This commit makes the change for Dialog_Base_Partition.{h,cc}.
Closes !25 - Modern Gtk3 - part 1
include/Dialog_Base_Partition.h | 9 +++++----
src/Dialog_Base_Partition.cc | 16 ++++++++++------
2 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/include/Dialog_Base_Partition.h b/include/Dialog_Base_Partition.h
index 8374cf1f..0d1fa486 100644
--- a/include/Dialog_Base_Partition.h
+++ b/include/Dialog_Base_Partition.h
@@ -69,7 +69,7 @@ protected:
Sector START; //the first sector of the first relevant partition ( this is either current or current
-1 ) needed in Get_Resized_Partition()
Sector total_length ; //total amount of sectors ( this can be up to 3 partitions...)
- Gtk::HBox hbox_main ;
+ Gtk::Box hbox_main;
Gtk::SpinButton spinbutton_before, spinbutton_size, spinbutton_after;
OptionComboBox combo_alignment;
@@ -98,11 +98,12 @@ private:
Dialog_Base_Partition & operator=( const Dialog_Base_Partition & rhs ); // Not implemented copy
assignment operator
void Check_Change( ) ;
-
- Gtk::VBox vbox_resize_move;
+
+ Gtk::Box vbox_resize_move;
Gtk::Label label_minmax ;
Gtk::Table table_resize;
- Gtk::HBox hbox_table, hbox_resizer;
+ Gtk::Box hbox_table;
+ Gtk::Box hbox_resizer;
Gtk::Button button_resize_move ;
};
diff --git a/src/Dialog_Base_Partition.cc b/src/Dialog_Base_Partition.cc
index 27c5c880..f20586b1 100644
--- a/src/Dialog_Base_Partition.cc
+++ b/src/Dialog_Base_Partition.cc
@@ -31,22 +31,26 @@ Dialog_Base_Partition::Dialog_Base_Partition()
this ->set_resizable( false );
ORIG_BEFORE = ORIG_SIZE = ORIG_AFTER = -1 ;
MIN_SPACE_BEFORE_MB = -1 ;
-
- //pack resizer hbox
+
+ // 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 );
-
- //pack hbox_main
+
+ // Pack hbox_main
+ hbox_main.set_orientation(Gtk::ORIENTATION_HORIZONTAL);
this ->get_vbox() ->pack_start( hbox_main, Gtk::PACK_SHRINK );
- //put the vbox with resizer stuff (cool widget and spinbuttons) in the hbox_main
+ // Put the vbox with resizer stuff (cool widget and spinbuttons) in the hbox_main
+ vbox_resize_move.set_orientation(Gtk::ORIENTATION_VERTICAL);
hbox_main .pack_start( vbox_resize_move, Gtk::PACK_EXPAND_PADDING );
//fill table
table_resize .set_border_width( 5 ) ;
table_resize .set_row_spacings( 5 ) ;
+ hbox_table.set_orientation(Gtk::ORIENTATION_HORIZONTAL);
hbox_table.pack_start( table_resize, Gtk::PACK_EXPAND_PADDING ) ;
hbox_table .set_border_width( 5 ) ;
@@ -251,7 +255,7 @@ void Dialog_Base_Partition::Set_Confirm_Button( CONFIRMBUTTON button_type )
case RESIZE_MOVE:
{
Gtk::Image* image_temp = Utils::mk_image(Gtk::Stock::GOTO_LAST,
Gtk::ICON_SIZE_BUTTON);
- Gtk::HBox* hbox_resize_move(manage(new Gtk::HBox()));
+ Gtk::Box* hbox_resize_move(manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)));
hbox_resize_move->pack_start(*image_temp, Gtk::PACK_EXPAND_PADDING);
hbox_resize_move->pack_start(*Utils::mk_label(fixed_start ? _("Resize") :
_("Resize/Move")),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]