Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed statistics stuff

  • Loading branch information...
commit b4d3f24acaadabd8b12f1e2c7366c881661b93e1 1 parent 8043454
@Simmesimme authored
View
13 src/deamon.vala
@@ -100,8 +100,6 @@ public class Deamon : GLib.Object {
message("Removed file \"%s\"", Paths.pie_config);
if (GLib.FileUtils.remove(Paths.settings) == 0)
message("Removed file \"%s\"", Paths.settings);
-
- Logger.stats("LAUNCH RESET");
return;
}
@@ -121,16 +119,12 @@ public class Deamon : GLib.Object {
data.set_text(open_pie, open_pie.length);
app.send_message(Unique.Command.ACTIVATE, data);
- Logger.stats("LAUNCH PIE " + open_pie);
-
return;
}
message("Gnome-Pie is already running. Sending request to open config menu.");
app.send_message(Unique.Command.ACTIVATE, null);
- Logger.stats("LAUNCH CONFIG");
-
return;
}
@@ -170,17 +164,10 @@ public class Deamon : GLib.Object {
// finished loading... so run the prog!
message("Started happily...");
- Logger.stats("LAUNCH " + version);
// open pie if neccessary
if (open_pie != null)
PieManager.open_pie(open_pie);
- else if (Config.global.showed_news < NewsWindow.news_count
- && Logger.get_statistics_size() > 10000) {
-
- var b = new NewsWindow();
- b.show();
- }
Gtk.main();
View
24 src/gui/newsWindow.vala
@@ -23,7 +23,7 @@ namespace GnomePie {
public class NewsWindow: Gtk.Dialog {
- public static const int news_count = 1;
+ public static const int news_count = 2;
/////////////////////////////////////////////////////////////////////
///
@@ -42,27 +42,7 @@ public class NewsWindow: Gtk.Dialog {
var news = new Gtk.Label("");
news.wrap = true;
news.set_width_chars(75);
- news.set_markup("<b>Gnome-Pie needs your help!</b>\n\n" +
-
- "Hey, this is Simon, developer of Gnome-Pie. I’m going to " +
- "write my Bachelor thesis on pie menus! In order to improve " +
- "Gnome-Pie to the limits, I need some information on how " +
- "you use Gnome-Pie.\n\n" +
-
- "<b>So please help improving this software by sending the " +
- "file 'gnome-pie.stats' located in <a href='file:" +
- Paths.config_directory + "'>" + Paths.config_directory +
- "</a> by email to <a href='mailto:pie-stats@simonschneegans.de?subject=statistics'>" +
- "pie-stats@simonschneegans.de</a>!</b>\n\n" +
-
- "There is no personal information in this file. Only " +
- "information on your usage frequency, how fast you use " +
- "Gnome-Pie and how many Pies with how many Slices you " +
- "have configured. If you have any questions regarding " +
- "this topic please send an email to " +
- "<a href='mailto:code@simonschneegans.de'>code@simonschneegans.de</a>!\n\n" +
-
- "Thank you so much! It’s going to be exciting!");
+ news.set_markup("<b>Thank you!</b>\n\n");
box.pack_start(news, false, false);
View
6 src/gui/settingsWindow.vala
@@ -138,12 +138,6 @@ public class SettingsWindow : GLib.Object {
private void on_close_button_clicked() {
this.window.hide();
-
- Logger.stats("SETTINGS " + Config.global.theme.name +
- (this.indicator.active ? " INDICATOR" : "") +
- (this.autostart.active ? " AUTOSTART" : "") +
- (this.captions.active ? " CAPTIONS" : "") +
- " %f".printf(Config.global.global_scale));
}
/////////////////////////////////////////////////////////////////////
View
1  src/pies/pieManager.vala
@@ -86,7 +86,6 @@ public class PieManager : GLib.Object {
Pie? pie = all_pies[id];
if (pie != null) {
- Logger.stats("OPEN " + id);
a_pie_is_active = true;
View
7 src/pies/save.vala
@@ -32,9 +32,6 @@ namespace Pies {
public void save() {
message("Saving Pies to \"" + Paths.pie_config + "\".");
- // log pie statistics
- string pie_line = "PIES";
-
// initializes the XML-Writer
var writer = new Xml.TextWriter.filename(Paths.pie_config);
writer.set_indent(true);
@@ -82,14 +79,10 @@ namespace Pies {
}
}
writer.end_element();
-
- pie_line += " " + pie.id + "(%d)".printf(slice_count);
}
}
writer.end_element();
writer.end_document();
-
- Logger.stats(pie_line);
}
}
View
9 src/renderers/pieRenderer.vala
@@ -132,13 +132,6 @@ public class PieRenderer : GLib.Object {
public void activate() {
if (this.active_slice >= 0 && this.active_slice < this.slices.size) {
slices[active_slice].activate();
-
- if (this.active_slice == this.quickaction)
- Logger.stats("ACTIVATE QUICKACTION %d".printf(this.active_slice));
- else
- Logger.stats("ACTIVATE %d".printf(this.active_slice));
- } else {
- Logger.stats("CANCEL");
}
foreach (var slice in this.slices)
@@ -156,8 +149,6 @@ public class PieRenderer : GLib.Object {
slice.fade_out();
center.fade_out();
-
- Logger.stats("CANCEL");
}
/////////////////////////////////////////////////////////////////////
View
2  src/utilities/bindingManager.vala
@@ -228,7 +228,7 @@ public class BindingManager : GLib.Object {
private Gdk.FilterReturn event_filter(Gdk.XEvent gdk_xevent, Gdk.Event gdk_event) {
- #if VALA_0_16
+ #if VALA_0_16 || VALA_0_17
X.Event* xevent = (X.Event*) gdk_xevent;
#else
void* pointer = &gdk_xevent;
View
2  src/utilities/focusGrabber.vala
@@ -53,7 +53,7 @@ public class FocusGrabber : GLib.Object {
var display = Gdk.Display.get_default();
var manager = display.get_device_manager();
- #if VALA_0_16
+ #if VALA_0_16 || VALA_0_17
GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER);
#else
unowned GLib.List<weak Gdk.Device?> list = manager.list_devices(Gdk.DeviceType.MASTER);
View
43 src/utilities/logger.vala
@@ -68,10 +68,8 @@ public class Logger {
/////////////////////////////////////////////////////////////////////
private static const int max_log_length = 1000000;
- private static const int max_stats_length = 1000000;
private static int log_length;
- private static int stats_length;
/////////////////////////////////////////////////////////////////////
/// Possible terminal colors.
@@ -94,7 +92,6 @@ public class Logger {
public static void init() {
log_length = -1;
- stats_length = -1;
try {
regex = new Regex("""(.*)\.vala(:\d+): (.*)""");
@@ -104,46 +101,6 @@ 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");
-
- if (stats != null)
- stats_length = (int)stats.tell();
- }
-
- return stats_length;
- }
-
- public static void stats(string line) {
- var stats = GLib.FileStream.open(Paths.stats, "a");
-
- if (stats != null) {
- if (stats_length == -1)
- stats_length = (int)stats.tell();
-
- string final_line = "[" + get_time() + "] " + line + "\n";
- stats.puts(final_line);
- stats_length += final_line.length;
- }
-
- if (stats_length > max_stats_length) {
- string content = "";
-
- try {
- GLib.FileUtils.get_contents(Paths.stats, out content);
- int split_index = content.index_of_char('\n', stats_length - (int)(max_stats_length*0.9));
- GLib.FileUtils.set_contents(Paths.stats, content.substring(split_index+1));
-
- stats_length -= (split_index+1);
- } catch (GLib.FileError e) {}
- }
- }
-
- /////////////////////////////////////////////////////////////////////
/// Appends a line to the log file
/////////////////////////////////////////////////////////////////////
Please sign in to comment.
Something went wrong with that request. Please try again.