diff options
| author | Arslaan Pathan <[email protected]> | 2026-03-28 09:33:50 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-03-28 09:33:50 +1300 |
| commit | 75d932dcdb70be5cc7c2756d7f042ff1df594cb1 (patch) | |
| tree | f065e9c74e684a512b3079c2b41297f1d06efa94 /main.c | |
| parent | a1a34c7fb00aba61666b1cec9adac901f82673df (diff) | |
| download | cinnamon-browser-75d932dcdb70be5cc7c2756d7f042ff1df594cb1.tar.xz cinnamon-browser-75d932dcdb70be5cc7c2756d7f042ff1df594cb1.zip | |
Some stuff (i have no idea what to put on the commit message)
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -108,8 +108,24 @@ void tabopen(Cinnamon* cinnamon) { gtk_notebook_set_current_page(GTK_NOTEBOOK(cinnamon->notebook), -1); } +void tabclose(Cinnamon* cinnamon) { + int page = gtk_notebook_get_current_page(GTK_NOTEBOOK(cinnamon->notebook)); + + /* dont close last tab */ + if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(cinnamon->notebook)) > 1) { + gtk_notebook_remove_page(GTK_NOTEBOOK(cinnamon->notebook), page); + } else { +#ifdef NO_QUIT_ON_CLOSE_LAST_TAB + tabopen(cinnamon); + gtk_notebook_remove_page(GTK_NOTEBOOK(cinnamon->notebook), page); + return; +#endif + gtk_main_quit(); + } +} + int main(int argc, char *argv[]) { -#ifndef ObamaPrism +#ifndef CINNAMON_ENABLED return 1; #endif gtk_init(&argc, &argv); |
