Skip to content

Commit

Permalink
tooltips: set_tip := set_text
Browse files Browse the repository at this point in the history
Updates #770
  • Loading branch information
shawnlaffan committed Oct 31, 2020
1 parent 5dcf163 commit e7fa277
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/Biodiverse/GUI/DeleteElementProperties.pm
Original file line number Diff line number Diff line change
Expand Up @@ -433,5 +433,5 @@ sub add_header_and_tooltip_to_treeview_column {
$column->set_widget($header);

my $tooltip = Gtk3::Tooltip->new();
$tooltip->set_tip( $header, $args{tooltip_text} );
$tooltip->set_text( $header, $args{tooltip_text} );
}
8 changes: 4 additions & 4 deletions lib/Biodiverse/GUI/GUIManager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2309,11 +2309,11 @@ sub show_index_dialog {
$table->set( 'n-rows' => $rows );
my $incr_button = Gtk3::Button->new_with_label('Increment all');
$table->attach( $incr_button, 0, 1, $rows, $rows + 1, 'shrink', [], 0, 0 );
$tooltip_group->set_tip( $incr_button,
$tooltip_group->set_text( $incr_button,
'Increase all the axes by their default increments', undef, );
my $decr_button = Gtk3::Button->new_with_label('Decrement all');
$table->attach( $decr_button, 1, 2, $rows, $rows + 1, 'shrink', [], 0, 0 );
$tooltip_group->set_tip( $decr_button,
$tooltip_group->set_text( $decr_button,
'Decrease all the axes by their default increments', undef, );

my $i = 0;
Expand Down Expand Up @@ -2386,8 +2386,8 @@ sub show_index_dialog {
}
}

$tooltip_group->set_tip( $widget, $tip_text, undef );
$tooltip_group->set_tip( $label, $tip_text, undef );
$tooltip_group->set_text( $widget, $tip_text, undef );
$tooltip_group->set_text( $label, $tip_text, undef );

if ($is_text_axis) {
$widget->set_sensitive(0);
Expand Down
16 changes: 8 additions & 8 deletions lib/Biodiverse/GUI/Manager/BaseDatas.pm
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,11 @@ sub get_resolution_table_widget {

my $incr_button = Gtk3::Button->new_with_label('Increment all');
$table->attach( $incr_button, 0, 1, $rows, $rows + 1, 'shrink', [], 0, 0 );
$tooltip_group->set_tip( $incr_button,
$tooltip_group->set_text( $incr_button,
'Increase all the axes by their default increments', undef, );
my $decr_button = Gtk3::Button->new_with_label('Decrement all');
$table->attach( $decr_button, 1, 2, $rows, $rows + 1, 'shrink', [], 0, 0 );
$tooltip_group->set_tip( $decr_button,
$tooltip_group->set_text( $decr_button,
'Decrease all the axes by their default increments', undef, );

my $i = -1;
Expand Down Expand Up @@ -603,8 +603,8 @@ sub get_resolution_table_widget {
}
}

$tooltip_group->set_tip( $widget, $tip_text, undef );
$tooltip_group->set_tip( $label, $tip_text, undef );
$tooltip_group->set_text( $widget, $tip_text, undef );
$tooltip_group->set_text( $label, $tip_text, undef );

if ($is_text_axis) {
$widget->set_sensitive(0);
Expand Down Expand Up @@ -680,11 +680,11 @@ sub get_origin_table_widget {

my $incr_button = Gtk3::Button->new_with_label('Increment all');
$table->attach( $incr_button, 0, 1, $rows, $rows + 1, 'shrink', [], 0, 0 );
$tooltip_group->set_tip( $incr_button,
$tooltip_group->set_text( $incr_button,
'Increase all the axes by their default increments', undef, );
my $decr_button = Gtk3::Button->new_with_label('Decrement all');
$table->attach( $decr_button, 1, 2, $rows, $rows + 1, 'shrink', [], 0, 0 );
$tooltip_group->set_tip( $decr_button,
$tooltip_group->set_text( $decr_button,
'Decrease all the axes by their default increments', undef, );

my $i = -1;
Expand Down Expand Up @@ -759,8 +759,8 @@ sub get_origin_table_widget {
}
}

$tooltip_group->set_tip( $widget, $tip_text, undef );
$tooltip_group->set_tip( $label, $tip_text, undef );
$tooltip_group->set_text( $widget, $tip_text, undef );
$tooltip_group->set_text( $label, $tip_text, undef );

if ($is_text_axis) {
$widget->set_sensitive(0);
Expand Down
2 changes: 1 addition & 1 deletion lib/Biodiverse/GUI/ParametersTable.pm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ sub fill {
# Add a tooltip
my $tip_text = $param->get_tooltip;
if ($tip_text) {
$tooltip_group->set_tip($widget, $tip_text, undef);
$tooltip_group->set_text($widget, $tip_text, undef);
}

# widgets are sensitive unless explicitly told otherwise
Expand Down
2 changes: 1 addition & 1 deletion lib/Biodiverse/GUI/RemapGUI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ sub add_header_and_tooltip_to_treeview_column {
$column->set_widget($header);

my $tooltip = Gtk3::Tooltip->new();
$tooltip->set_tip( $header, $args{tooltip_text} );
$tooltip->set_text( $header, $args{tooltip_text} );
}


Expand Down

0 comments on commit e7fa277

Please sign in to comment.