replaced deprecated Gtk::Optionmenu with Gtk::ComboBoxText
* include/Dialog_Disklabel.h, src/Dialog_Disklabel.cc: replaced deprecated Gtk::Optionmenu with Gtk::ComboBoxText
This commit is contained in:
parent
488063371b
commit
52f1c4899f
|
@ -1,3 +1,9 @@
|
|||
2005-12-15 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||
|
||||
* include/Dialog_Disklabel.h,
|
||||
src/Dialog_Disklabel.cc: replaced deprecated Gtk::Optionmenu with
|
||||
Gtk::ComboBoxText
|
||||
|
||||
2005-12-15 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||
|
||||
* src/GParted_Core.cc: don't wait for node to appear when an extended
|
||||
|
|
|
@ -16,19 +16,16 @@
|
|||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef DIALOG_DISKLABEL
|
||||
#define DIALOG_DISKLABEL
|
||||
|
||||
#include "../include/i18n.h"
|
||||
#include "../include/Utils.h"
|
||||
|
||||
#include <gtkmm/dialog.h>
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/stock.h>
|
||||
#include <gtkmm/expander.h>
|
||||
#include <gtkmm/optionmenu.h>
|
||||
#include <gtkmm/menu.h>
|
||||
#include <gtkmm/comboboxtext.h>
|
||||
|
||||
namespace GParted
|
||||
{
|
||||
|
@ -45,9 +42,7 @@ 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<Glib::ustring> labeltypes ;
|
||||
};
|
||||
|
|
|
@ -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 <i>" ;
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue