File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,17 @@ impl Window {
317317 this. page_switched( tab_view) ;
318318 } ) ,
319319 ) ;
320+ imp. tab_view . connect_close_page (
321+ clone ! ( @weak self as this => @default -panic, move |tab_view, page| {
322+ tab_view. close_page_finish( page, !page. is_pinned( ) ) ;
323+
324+ if tab_view. n_pages( ) == 0 {
325+ this. close( ) ;
326+ } ;
327+
328+ true
329+ } ) ,
330+ ) ;
320331 imp. tab_overview . connect_create_tab (
321332 clone ! ( @weak self as this => @default -panic, move |_| {
322333 this. new_tab( ) ;
@@ -571,9 +582,6 @@ impl Window {
571582 let imp = self . imp ( ) ;
572583 imp. tab_view
573584 . close_page ( & imp. tab_view . page ( & self . current_tab ( ) ) ) ;
574- if imp. tab_view . n_pages ( ) == 0 {
575- std:: process:: exit ( 0 ) ; // TODO: maybe there's a better way for gtk apps...
576- }
577585 }
578586
579587 fn focus_url_bar ( & self ) {
You can’t perform that action at this time.
0 commit comments