From 7b6e3313aefef1c55f1d8cf65137bee86d376dee Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Thu, 24 Dec 2020 00:07:44 +0000 Subject: [PATCH] MainWindow: remove unused function "has_temporary_files ()"; Fix long line. (#919) --- src/MainWindow.vala | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index c6f228d3a8..89bff6bd53 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -175,7 +175,9 @@ namespace Scratch { var provider = new Gtk.CssProvider (); provider.load_from_resource ("io/elementary/code/Application.css"); - Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + Gtk.StyleContext.add_provider_for_screen ( + Gdk.Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION + ); Hdy.init (); } @@ -562,21 +564,6 @@ namespace Scratch { document_view.close_document (doc); } - public bool has_temporary_files () { - try { - var enumerator = File.new_for_path (app.data_home_folder_unsaved).enumerate_children (FileAttribute.STANDARD_NAME, 0, null); - for (var fileinfo = enumerator.next_file (null); fileinfo != null; fileinfo = enumerator.next_file (null)) { - if (!fileinfo.get_name ().has_suffix ("~")) { - return true; - } - } - } catch (Error e) { - critical (e.message); - } - - return false; - } - // Check if there no unsaved changes private bool check_unsaved_changes () { document_view.is_closing = true;