Fixing the about screen again.
This commit is contained in:
parent
5b61dba829
commit
19e2aa9724
|
@ -38,9 +38,10 @@ $app->signal_connect( activate => \&activate );
|
|||
$app->run;
|
||||
|
||||
sub activate {
|
||||
my $display = Gdk::Display::get_default();
|
||||
my $display = Gdk::Display::get_default();
|
||||
my $icon_theme = Gtk4::IconTheme::get_for_display($display);
|
||||
$icon_theme->set_search_path(path(__FILE__)->parent->parent->child('resources/icons')->absolute);
|
||||
$icon_theme->set_search_path(
|
||||
path(__FILE__)->parent->parent->child('resources/icons')->absolute );
|
||||
Gtk4::Window::set_default_icon_name('gemetool');
|
||||
|
||||
my $win;
|
||||
|
@ -86,7 +87,7 @@ sub activate {
|
|||
$win->set_title('GEmeTool');
|
||||
$win->set_show_menubar(1);
|
||||
$win->set_default_size( 600, 600 );
|
||||
$win->set_icon_name('gemetool');
|
||||
$win->set_icon_name('gemetool');
|
||||
$win->set_child($box);
|
||||
$win->present;
|
||||
}
|
||||
|
@ -161,7 +162,7 @@ sub start_editing_file {
|
|||
$scroll->set_property( 'vexpand', 1 );
|
||||
|
||||
my $populate_func = sub {
|
||||
my $box_flags = Gtk4::Box->new( 'vertical', 0 );
|
||||
my $box_flags = Gtk4::Box->new( 'vertical', 0 );
|
||||
for my $rematch_id (
|
||||
sort { $a <=> $b }
|
||||
grep { $_ =~ /^\d+$/ } keys %rematches
|
||||
|
@ -206,9 +207,11 @@ sub start_editing_file {
|
|||
$scroll->set_child($box_flags);
|
||||
};
|
||||
$populate_func->();
|
||||
$entry->signal_connect( activate => sub {
|
||||
$populate_func->();
|
||||
});
|
||||
$entry->signal_connect(
|
||||
activate => sub {
|
||||
$populate_func->();
|
||||
}
|
||||
);
|
||||
$box_app->append($scroll);
|
||||
$win->set_child($box_app);
|
||||
$save_as->set_enabled(1);
|
||||
|
@ -222,11 +225,14 @@ sub activate_about {
|
|||
$about->set_license_type('gpl-3-0');
|
||||
$about->add_credit_section( 'Ideas:', ['SpectreSpecs'] );
|
||||
$about->set_authors( ['Sergio Iglesias'] );
|
||||
my $error;
|
||||
my $texture = Gdk::Texture->new_from_filename(path(__FILE__)->parent->parent->child('resources/icons/hicolor/scalable/apps/gemetool.svg'), \$error);
|
||||
if (!$error && defined $texture) {
|
||||
eval {
|
||||
my $texture = Gdk::Texture->new_from_filename(
|
||||
path(__FILE__)->parent->parent->child(
|
||||
'resources/icons/hicolor/scalable/apps/gemetool.svg'),
|
||||
\$error
|
||||
);
|
||||
$about->set_logo($texture);
|
||||
}
|
||||
};
|
||||
$about->set_website('https://git.owlcode.tech/sergiotarxz/GEmeTool');
|
||||
$about->set_website_label('https://git.owlcode.tech/sergiotarxz/GEmeTool');
|
||||
|
||||
|
|
Loading…
Reference in New Issue