|
|
@ -13,6 +13,7 @@ class Open |
|
|
|
|
|
|
|
|
|
|
|
// Defaults |
|
|
|
// Defaults |
|
|
|
private string $_label = 'Open'; |
|
|
|
private string $_label = 'Open'; |
|
|
|
|
|
|
|
private bool $_multiple = true; |
|
|
|
|
|
|
|
|
|
|
|
public function __construct( |
|
|
|
public function __construct( |
|
|
|
\Yggverse\Yoda\Entity\Browser\Menu\File $file |
|
|
|
\Yggverse\Yoda\Entity\Browser\Menu\File $file |
|
|
@ -48,15 +49,22 @@ class Open |
|
|
|
/* @TODO keep last path |
|
|
|
/* @TODO keep last path |
|
|
|
$dialog->set_current_folder();*/ |
|
|
|
$dialog->set_current_folder();*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$dialog->set_select_multiple( |
|
|
|
|
|
|
|
$this->_multiple |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (\GtkResponseType::OK == $dialog->run()) |
|
|
|
if (\GtkResponseType::OK == $dialog->run()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach ($dialog->get_filenames() as $filename) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->file->menu->browser->container->tab->append( |
|
|
|
$this->file->menu->browser->container->tab->append( |
|
|
|
sprintf( |
|
|
|
sprintf( |
|
|
|
'file://%s', |
|
|
|
'file://%s', |
|
|
|
$dialog->get_filename() |
|
|
|
$filename |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$dialog->destroy(); |
|
|
|
$dialog->destroy(); |
|
|
|
} |
|
|
|
} |
|
|
|