Browse Source

open history page on double click

PHP-GTK3
yggverse 8 months ago
parent
commit
f8114f57a5
  1. 17
      src/Entity/Tab/History.php

17
src/Entity/Tab/History.php

@ -197,9 +197,11 @@ class History
$this->list $this->list
); );
/* @TODO row-activated
$this->treeview->get_selection()->set_mode( $this->treeview->get_selection()->set_mode(
\GtkSelectionMode::MULTIPLE \GtkSelectionMode::MULTIPLE
); );
*/
// Compose body // Compose body
$this->body = new \GtkBox( $this->body = new \GtkBox(
@ -245,9 +247,20 @@ class History
// Activate events // Activate events
$this->treeview->connect( $this->treeview->connect(
'row-activated', 'row-activated',
function () function ($tree)
{ {
// @TODO list($list, $row) = $tree->get_selection()
->get_selected();
$url = $list->get_value(
$row, 2
);
$page = $this->app->blankPage();
$page->open(
$url
);
} }
); );
} }

Loading…
Cancel
Save