diff --git a/ChangeLog b/ChangeLog index 9b7892e4..e0ee6ba7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-12-15 Bart Hakvoort + + * include/Dialog_Disklabel.h, + src/Dialog_Disklabel.cc: replaced deprecated Gtk::Optionmenu with + Gtk::ComboBoxText + 2005-12-15 Bart Hakvoort * src/GParted_Core.cc: don't wait for node to appear when an extended diff --git a/include/Dialog_Disklabel.h b/include/Dialog_Disklabel.h index 49d587ec..6e3142a3 100644 --- a/include/Dialog_Disklabel.h +++ b/include/Dialog_Disklabel.h @@ -16,19 +16,16 @@ */ - #ifndef DIALOG_DISKLABEL #define DIALOG_DISKLABEL -#include "../include/i18n.h" #include "../include/Utils.h" #include #include #include #include -#include -#include +#include namespace GParted { @@ -36,7 +33,7 @@ namespace GParted class Dialog_Disklabel : public Gtk::Dialog { public: - Dialog_Disklabel( const Glib::ustring & device_path, const std::vector & disklabeltypes ) ; + Dialog_Disklabel( const Glib::ustring & device_path, const std::vector & disklabeltypes ) ; Glib::ustring Get_Disklabel( ) ; @@ -45,11 +42,9 @@ private: Gtk::HBox *hbox ; Gtk::VBox *vbox ; Gtk::Image image ; - Gtk::OptionMenu optionmenu_labeltypes ; - Gtk::Menu menu_labeltypes ; - + Gtk::ComboBoxText combo_labeltypes ; Glib::ustring str_temp ; - std::vector labeltypes ; + std::vector labeltypes ; }; } //GParted diff --git a/src/Dialog_Disklabel.cc b/src/Dialog_Disklabel.cc index 879607bf..393c8235 100644 --- a/src/Dialog_Disklabel.cc +++ b/src/Dialog_Disklabel.cc @@ -68,14 +68,14 @@ Dialog_Disklabel::Dialog_Disklabel( const Glib::ustring & device_path, const std hbox ->pack_start( * Utils::mk_label( str_temp ), Gtk::PACK_SHRINK ); expander_advanced .add( *hbox ) ; - //create and add optionmenu + //create and add combo with labeltypes this ->labeltypes = disklabeltypes ; for ( unsigned int t = 0 ; t < labeltypes .size( ) ; t++ ) - menu_labeltypes .items( ) .push_back( Gtk::Menu_Helpers::MenuElem( labeltypes[ t ] + "\t" ) ) ; + combo_labeltypes .append_text( labeltypes[ t ] ) ; - optionmenu_labeltypes .set_menu( menu_labeltypes ) ; - hbox ->pack_start( optionmenu_labeltypes, Gtk::PACK_SHRINK ) ; + combo_labeltypes .set_active( 0 ) ; + hbox ->pack_start( combo_labeltypes, Gtk::PACK_SHRINK ) ; //standard warning str_temp = "\n " ; @@ -92,7 +92,7 @@ Dialog_Disklabel::Dialog_Disklabel( const Glib::ustring & device_path, const std Glib::ustring Dialog_Disklabel::Get_Disklabel( ) { - return labeltypes[ optionmenu_labeltypes .get_history( ) ] ; + return labeltypes[ combo_labeltypes .get_active_row_number() ] ; } }//GParted