Skip to content

Commit

Permalink
change Gtk3::ComboBox->new_text to Gtk3::ComboBoxText->new
Browse files Browse the repository at this point in the history
Updates #770
  • Loading branch information
shawnlaffan committed Oct 31, 2020
1 parent e7fa277 commit e2430fc
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions lib/Biodiverse/GUI/BasedataImport.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ sub add_row {
$label->set_use_markup(1);

# Type combo box
my $combo = Gtk3::ComboBox->new_text;
my $combo = Gtk3::ComboBoxText->new;
foreach (@$row_options) {
$combo->append_text($_);
}
Expand All @@ -1729,7 +1729,7 @@ sub add_row {
}

# degrees minutes seconds
my $combo_dms = Gtk3::ComboBox->new_text;
my $combo_dms = Gtk3::ComboBoxText->new;
$combo_dms->set_has_tooltip(1);
$combo_dms->set_tooltip_text($lat_lon_widget_tooltip_text);
foreach my $choice ( '', 'is_lat', 'is_lon' ) {
Expand Down Expand Up @@ -2070,7 +2070,7 @@ sub add_remap_row {
$label->set_use_markup(1);

# Type combo box
my $combo = Gtk3::ComboBox->new_text;
my $combo = Gtk3::ComboBoxText->new;
my @options =
$column_overrides
? @$column_overrides
Expand Down
2 changes: 1 addition & 1 deletion lib/Biodiverse/GUI/MatrixImport.pm
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ sub import_sparse_format {

sub run_combo_sparse_normal {

my $combo = Gtk3::ComboBox->new_text;
my $combo = Gtk3::ComboBoxText->new;
$combo->append_text('normal');
$combo->append_text('sparse');
$combo->set_active(0);
Expand Down
8 changes: 5 additions & 3 deletions lib/Biodiverse/GUI/ParametersTable.pm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ sub fill {
# Add a tooltip
my $tip_text = $param->get_tooltip;
if ($tip_text) {
$tooltip_group->set_text($widget, $tip_text, undef);
#$tooltip_group->set_text($widget, $tip_text, undef);
# Gtk3 shift: this is probably broken?
$tooltip_group->set_text($tip_text);
}

# widgets are sensitive unless explicitly told otherwise
Expand Down Expand Up @@ -272,7 +274,7 @@ sub generate_widget {
sub generate_choice {
my ($self, $param) = @_;

my $combo = Gtk3::ComboBox->new_text;
my $combo = Gtk3::ComboBoxText->new;

# Fill the combo
foreach my $choice (@{$param->{choices}}) {
Expand Down Expand Up @@ -300,7 +302,7 @@ sub generate_choice {
sub generate_choice_index {
my ($self, $param) = @_;

my $combo = Gtk3::ComboBox->new_text;
my $combo = Gtk3::ComboBoxText->new;

# Fill the combo
foreach my $choice (@{$param->{choices}}) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Biodiverse/GUI/RemapGUI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ sub pre_remap_dlg {
####
# The remapee data source selection combo box and its label, as
# well as the controller combo box and its label.
my $remapee_combo = Gtk3::ComboBox->new_text;
my $controller_combo = Gtk3::ComboBox->new_text;
my $remapee_combo = Gtk3::ComboBoxText->new;
my $controller_combo = Gtk3::ComboBoxText->new;

foreach my $option (@remapee_sources) {
$remapee_combo->append_text(
Expand Down
4 changes: 2 additions & 2 deletions lib/Biodiverse/GUI/Tabs/Clustering.pm
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ sub setup_tie_breaker_widgets {
my $j = 2 * $i;
my $k = $j + 1;
my $label = Gtk3::Label->new(" $id: ");
my $index_combo = Gtk3::ComboBox->new_text;
my $index_combo = Gtk3::ComboBoxText->new;
my $l = 0;
my $use_iter;
foreach my $index (qw /none random/, natsort keys %valid_indices) {
Expand All @@ -412,7 +412,7 @@ sub setup_tie_breaker_widgets {

$index_combo->set_active($use_iter // 1); # random by default

my $combo_minmax = Gtk3::ComboBox->new_text;
my $combo_minmax = Gtk3::ComboBoxText->new;
$combo_minmax->append_text ('maximise');
$combo_minmax->append_text ('minimise');
$combo_minmax->set_active (0);
Expand Down
2 changes: 1 addition & 1 deletion lib/Biodiverse/GUI/Tabs/RegionGrower.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ sub new {
my $hbox = $xml_page->get_object('hbox_cluster_metric');

my $label_widget = Gtk3::Label->new('Objective function: ');
my $combo_minmax = Gtk3::ComboBox->new_text();
my $combo_minmax = Gtk3::ComboBoxText->new();
$combo_minmax->append_text('maximise');
$combo_minmax->append_text('minimise');
$combo_minmax->set_active(0);
Expand Down
2 changes: 1 addition & 1 deletion lib/Biodiverse/GUI/Tabs/Spatial.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,7 @@ sub on_add_param {
$table->attach($button, 0, 1, $rows, $rows + 1, [], [], 0, 0);

# Make a combobox and a label to set the parameter
my $combo = Gtk3::ComboBox->new_text;
my $combo = Gtk3::ComboBoxText->new;
my $entry = Gtk3::Entry->new;

$table->attach($combo, 0, 1, $rows - 1, $rows, 'fill', [], 0, 0);
Expand Down

0 comments on commit e2430fc

Please sign in to comment.