|
|
|
@ -75,8 +75,8 @@ class Tab
@@ -75,8 +75,8 @@ class Tab
|
|
|
|
|
?\GtkWidget $child, |
|
|
|
|
int $page_num |
|
|
|
|
) { |
|
|
|
|
$this->closePage( |
|
|
|
|
$page_num |
|
|
|
|
$this->reorderPage( |
|
|
|
|
null // all |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
@ -88,7 +88,9 @@ class Tab
@@ -88,7 +88,9 @@ class Tab
|
|
|
|
|
?\GtkWidget $child, |
|
|
|
|
int $page_num |
|
|
|
|
) { |
|
|
|
|
$this->reorderPage(); |
|
|
|
|
$this->reorderPage( |
|
|
|
|
null // all |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
@ -168,30 +170,17 @@ class Tab
@@ -168,30 +170,17 @@ class Tab
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function closePage( |
|
|
|
|
int $page_num |
|
|
|
|
?int $page_num = null |
|
|
|
|
): void |
|
|
|
|
{ |
|
|
|
|
// Validate page index exists |
|
|
|
|
if (empty($this->_page[$page_num])) |
|
|
|
|
if ($page = $this->getPage($page_num)) |
|
|
|
|
{ |
|
|
|
|
throw new \Exception; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Remove GTK node |
|
|
|
|
$this->gtk->remove_page( |
|
|
|
|
$page_num |
|
|
|
|
); |
|
|
|
|
/* |
|
|
|
|
// Free memory |
|
|
|
|
$this->_page[$page_num] = null; |
|
|
|
|
|
|
|
|
|
// Cleanup internal record |
|
|
|
|
unset( |
|
|
|
|
$this->_page[$page_num] |
|
|
|
|
$this->gtk->page_num( |
|
|
|
|
$page->gtk |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
*/ |
|
|
|
|
// Reorder |
|
|
|
|
$this->reorderPage(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function reorderPage( |
|
|
|
|