summaryrefslogtreecommitdiff
path: root/src/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'src/utilities')
-rw-r--r--src/utilities/bindingManager.vala2
-rw-r--r--src/utilities/config.vala5
-rw-r--r--src/utilities/logger.vala9
-rw-r--r--src/utilities/paths.vala9
4 files changed, 25 insertions, 0 deletions
diff --git a/src/utilities/bindingManager.vala b/src/utilities/bindingManager.vala
index 5a4548e..669c863 100644
--- a/src/utilities/bindingManager.vala
+++ b/src/utilities/bindingManager.vala
@@ -48,9 +48,11 @@ public class BindingManager : GLib.Object {
Gdk.ModifierType.MOD2_MASK,
Gdk.ModifierType.LOCK_MASK,
Gdk.ModifierType.MOD5_MASK,
+
Gdk.ModifierType.MOD2_MASK|Gdk.ModifierType.LOCK_MASK,
Gdk.ModifierType.MOD2_MASK|Gdk.ModifierType.MOD5_MASK,
Gdk.ModifierType.LOCK_MASK|Gdk.ModifierType.MOD5_MASK,
+
Gdk.ModifierType.MOD2_MASK|Gdk.ModifierType.LOCK_MASK|Gdk.ModifierType.MOD5_MASK
};
diff --git a/src/utilities/config.vala b/src/utilities/config.vala
index cc776d5..1d8b714 100644
--- a/src/utilities/config.vala
+++ b/src/utilities/config.vala
@@ -57,6 +57,7 @@ public class Config : GLib.Object {
public bool show_indicator { get; set; default = true; }
public bool show_captions { get; set; default = true; }
public bool auto_start { get; set; default = false; }
+ public int showed_news { get; set; default = 0; }
public Gee.ArrayList<Theme?> themes { get; private set; }
/////////////////////////////////////////////////////////////////////
@@ -72,6 +73,7 @@ public class Config : GLib.Object {
writer.write_attribute("global_scale", global_scale.to_string());
writer.write_attribute("show_indicator", show_indicator ? "true" : "false");
writer.write_attribute("show_captions", show_captions ? "true" : "false");
+ writer.write_attribute("showed_news", showed_news.to_string());
writer.end_element();
writer.end_document();
}
@@ -117,6 +119,9 @@ public class Config : GLib.Object {
case "show_captions":
show_captions = bool.parse(attr_content);
break;
+ case "showed_news":
+ showed_news = int.parse(attr_content);
+ break;
default:
warning("Invalid setting \"" + attr_name + "\" in gnome-pie.conf!");
break;
diff --git a/src/utilities/logger.vala b/src/utilities/logger.vala
index 5334920..116cbcd 100644
--- a/src/utilities/logger.vala
+++ b/src/utilities/logger.vala
@@ -107,6 +107,15 @@ public class Logger {
/// Appends a line to the statistics file
/////////////////////////////////////////////////////////////////////
+ public static int get_statistics_size() {
+ if (stats_length == -1) {
+ var stats = GLib.FileStream.open(Paths.stats, "a");
+ stats_length = (int)stats.tell();
+ }
+
+ return stats_length;
+ }
+
public static void stats(string line) {
var stats = GLib.FileStream.open(Paths.stats, "a");
diff --git a/src/utilities/paths.vala b/src/utilities/paths.vala
index bc3e9b1..fe8897b 100644
--- a/src/utilities/paths.vala
+++ b/src/utilities/paths.vala
@@ -25,6 +25,13 @@ namespace GnomePie {
public class Paths : GLib.Object {
/////////////////////////////////////////////////////////////////////
+ /// The config directory,
+ /// usually ~/.config/gnome-pie/.
+ /////////////////////////////////////////////////////////////////////
+
+ public static string config_directory { get; private set; default=""; }
+
+ /////////////////////////////////////////////////////////////////////
/// The log file,
/// usually ~/.config/gnome-pie/gnome-pie.log.
/////////////////////////////////////////////////////////////////////
@@ -171,6 +178,8 @@ public class Paths : GLib.Object {
}
}
+ config_directory = config_dir.get_path();
+
// create local themes directory if neccasary
var themes_dir = config_dir.get_child("themes");
if(!themes_dir.query_exists()) {