[fractal] fractal-gtk: Don't call quit on window delete event



commit fabb950060cd608f640480750058a80c254e548a
Author: Daniel GarcĂ­a Moreno <dani danigm net>
Date:   Sat Jul 27 08:24:14 2019 +0200

    fractal-gtk: Don't call quit on window delete event
    
    The quit method of AppOp was called twice because it was called on the
    window delete event closure and also in the app shutdown. This patch
    removes the call in the window delete event so we only left one call.
    
    Fix https://gitlab.gnome.org/GNOME/fractal/issues/506

 fractal-gtk/src/app/mod.rs | 3 ---
 1 file changed, 3 deletions(-)
---
diff --git a/fractal-gtk/src/app/mod.rs b/fractal-gtk/src/app/mod.rs
index d09eb926..365435fb 100644
--- a/fractal-gtk/src/app/mod.rs
+++ b/fractal-gtk/src/app/mod.rs
@@ -224,13 +224,10 @@ impl App {
                 app.op.lock().unwrap().mark_active_room_messages();
             });
 
-        let app_weak = app.downgrade();
         app.main_window.connect_delete_event(move |window, _| {
-            let app = upgrade_weak!(app_weak, Inhibit(false));
             let settings: gio::Settings = gio::Settings::new("org.gnome.Fractal");
             let window_state = WindowState::from_window(window);
             window_state.save_in_gsettings(&settings);
-            app.op.lock().unwrap().quit();
             Inhibit(false)
         });
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]