Removing command line parsing.
This commit is contained in:
parent
c9248027de
commit
6e38cd5b94
@ -102,7 +102,7 @@ sub start($self) {
|
|||||||
Glib::IO::resources_register(
|
Glib::IO::resources_register(
|
||||||
Glib::IO::Resource::load( $self->_gresources_path ) );
|
Glib::IO::Resource::load( $self->_gresources_path ) );
|
||||||
my $app = Adw::Application->new( 'me.sergiotarxz.Exd',
|
my $app = Adw::Application->new( 'me.sergiotarxz.Exd',
|
||||||
[qw/default-flags handles-command-line handles-open/] );
|
[qw/default-flags handles-open/] );
|
||||||
my $bus = Net::DBus->session;
|
my $bus = Net::DBus->session;
|
||||||
my $started = 0;
|
my $started = 0;
|
||||||
eval {
|
eval {
|
||||||
@ -112,21 +112,18 @@ sub start($self) {
|
|||||||
$self->_daemon_runner if !$started;
|
$self->_daemon_runner if !$started;
|
||||||
$self->_app($app);
|
$self->_app($app);
|
||||||
my $arguments = [];
|
my $arguments = [];
|
||||||
$app->signal_connect(
|
|
||||||
command_line => sub( $app, $command_line ) {
|
|
||||||
$arguments = $command_line->get_arguments;
|
|
||||||
my $exd_file = shift @$arguments;
|
|
||||||
$self->_activate($exd_file);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$app->signal_connect(
|
$app->signal_connect(
|
||||||
startup => sub {
|
startup => sub {
|
||||||
$self->_startup;
|
$self->_startup;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
$app->signal_connect(
|
||||||
|
activate => sub {
|
||||||
|
$self->_activate;
|
||||||
|
}
|
||||||
|
);
|
||||||
$app->signal_connect(
|
$app->signal_connect(
|
||||||
open => sub($files, $hint) {
|
open => sub($files, $hint) {
|
||||||
warn 'hola';
|
|
||||||
$self->_activate($files->[0]->get_path);
|
$self->_activate($files->[0]->get_path);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user