mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-06 16:34:13 +00:00
require closing page number argument
This commit is contained in:
parent
ff592df8b5
commit
fa52a8fa70
@ -44,7 +44,9 @@ void Main::tab_append()
|
|||||||
|
|
||||||
void Main::tab_close()
|
void Main::tab_close()
|
||||||
{
|
{
|
||||||
tab->close();
|
tab->close(
|
||||||
|
-1 // active
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
void Main::tab_close_left()
|
void Main::tab_close_left()
|
||||||
|
@ -63,10 +63,11 @@ void Tab::append(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void Tab::close()
|
void Tab::close(
|
||||||
{
|
int number
|
||||||
|
) {
|
||||||
remove_page(
|
remove_page(
|
||||||
get_current_page()
|
number
|
||||||
);
|
);
|
||||||
|
|
||||||
// @TODO clean memory
|
// @TODO clean memory
|
||||||
@ -83,7 +84,9 @@ void Tab::close_all()
|
|||||||
{
|
{
|
||||||
while (0 <= get_current_page())
|
while (0 <= get_current_page())
|
||||||
{
|
{
|
||||||
close();
|
close(
|
||||||
|
-1 // active
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +97,8 @@ void Tab::on_label_click(
|
|||||||
) {
|
) {
|
||||||
if (n == 2) // double click
|
if (n == 2) // double click
|
||||||
{
|
{
|
||||||
close();
|
close(
|
||||||
|
-1 // active
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -49,7 +49,10 @@ namespace app::browser::main
|
|||||||
bool focus
|
bool focus
|
||||||
);
|
);
|
||||||
|
|
||||||
void close();
|
void close(
|
||||||
|
int number
|
||||||
|
);
|
||||||
|
|
||||||
void close_left();
|
void close_left();
|
||||||
void close_right();
|
void close_right();
|
||||||
void close_all();
|
void close_all();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user