summaryrefslogtreecommitdiff
path: root/src/utilities
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-10-04 13:00:55 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-10-04 13:00:55 +0200
commite9b06dcd5df3f22bc3a7acd5c57a4bfdf4ef38f5 (patch)
tree6e9494073395f49fb3eec61d2c5ae40f5f3de2af /src/utilities
parent19fe9cfe9a84ba453271d8d8e32f4aa9fe2be14e (diff)
parent7556967bf57453d412a8f18633599f38806f8620 (diff)
Merge tag 'upstream/0.6.7'
Upstream version 0.6.7
Diffstat (limited to 'src/utilities')
-rw-r--r--src/utilities/config.vala2
-rw-r--r--src/utilities/paths.vala22
2 files changed, 23 insertions, 1 deletions
diff --git a/src/utilities/config.vala b/src/utilities/config.vala
index 5dedddb..74bbcbb 100644
--- a/src/utilities/config.vala
+++ b/src/utilities/config.vala
@@ -57,7 +57,7 @@ public class Config : GLib.Object {
public int activation_range { get; set; default = 200; }
public int max_visible_slices { get; set; default = 24; }
public bool show_indicator { get; set; default = true; }
- public bool show_captions { get; set; default = true; }
+ public bool show_captions { get; set; default = false; }
public bool search_by_string { get; set; default = true; }
public bool auto_start { get; set; default = false; }
public int showed_news { get; set; default = 0; }
diff --git a/src/utilities/paths.vala b/src/utilities/paths.vala
index 96bce0a..7bdd642 100644
--- a/src/utilities/paths.vala
+++ b/src/utilities/paths.vala
@@ -108,6 +108,28 @@ public class Paths : GLib.Object {
public static string executable { get; private set; default=""; }
/////////////////////////////////////////////////////////////////////
+ /// Deletes a directory recursively from disk. Use with care :)
+ /////////////////////////////////////////////////////////////////////
+
+ public static void delete_directory(string directory) {
+ try {
+ var d = Dir.open(directory);
+ string name;
+ while ((name = d.read_name()) != null) {
+ string path = Path.build_filename(directory, name);
+ if (FileUtils.test(path, FileTest.IS_DIR)) {
+ delete_directory(path);
+ } else {
+ FileUtils.remove(path);
+ }
+ }
+ DirUtils.remove(directory);
+ } catch (Error e) {
+ warning (e.message);
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////
/// Initializes all values above.
/////////////////////////////////////////////////////////////////////