~elementary-apps/pantheon-files/trunk

« back to all changes in this revision

Viewing changes to src/Application.vala

Merge trunk to r2319

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        return application_singleton;
75
75
    }
76
76
 
77
 
    /* Using ~Application () here does not work */
78
 
    void before_app_exit () {
79
 
        Notify.uninit ();
80
 
    }
81
 
 
82
77
    public override void startup () {
83
78
        base.startup ();
84
79
 
93
88
            Marlin.IconInfo.clear_caches ();
94
89
        });
95
90
 
96
 
        Notify.init (Config.GETTEXT_PACKAGE);
97
 
 
98
 
        progress_handler = new Marlin.Progress.UIHandler ();
 
91
        progress_handler = new Marlin.Progress.UIHandler (this);
99
92
 
100
93
        this.clipboard = Marlin.ClipboardManager.get_for_display ();
101
94
        this.thumbnailer = Marlin.Thumbnailer.get ();
117
110
        this.window_added.connect_after (() => {window_count++;});
118
111
        this.window_removed.connect (() => {
119
112
            window_count--;
120
 
            /* If there are active file operations, these will hold the application running */
121
 
            if (get_windows () == null && progress_handler.get_active_info_count () == 0) {
122
 
                /* Otherwise perform final cleanup */
123
 
                before_app_exit ();
124
 
            }
125
113
        });
126
114
    }
127
115
 
229
217
        warning ("Quitting mainloop");
230
218
        Marlin.IconInfo.clear_caches ();
231
219
 
232
 
        before_app_exit ();
233
220
        base.quit_mainloop ();
234
221
    }
235
222