[gnome-power-manager/gnome-2-32] Add new 6 hours period in power history stats



commit 8c68282d8e4efa8d58b70773cc42836b375959ee
Author: RafaÅ? Rosiak <szafarz box43 pl>
Date:   Sat May 29 12:12:31 2010 +0200

    Add new 6 hours period in power history stats
    
    New missing `6 hours` period added between `2 hours` and `1 day` periods in power statistics history.
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 src/gpm-statistics.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index 0b7058d..155222c 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -89,11 +89,13 @@ enum {
 
 #define GPM_HISTORY_MINUTE_TEXT			_("10 minutes")
 #define GPM_HISTORY_HOUR_TEXT			_("2 hours")
+#define GPM_HISTORY_HOURS_TEXT			_("6 hours")
 #define GPM_HISTORY_DAY_TEXT			_("1 day")
 #define GPM_HISTORY_WEEK_TEXT			_("1 week")
 
 #define GPM_HISTORY_MINUTE_VALUE		10*60
 #define GPM_HISTORY_HOUR_VALUE			2*60*60
+#define GPM_HISTORY_HOURS_VALUE			6*60*60
 #define GPM_HISTORY_DAY_VALUE			24*60*60
 #define GPM_HISTORY_WEEK_VALUE			7*24*60*60
 
@@ -1344,6 +1346,8 @@ gpm_stats_range_combo_changed (GtkWidget *widget, gpointer data)
 		history_time = GPM_HISTORY_MINUTE_VALUE;
 	else if (g_strcmp0 (value, GPM_HISTORY_HOUR_TEXT) == 0)
 		history_time = GPM_HISTORY_HOUR_VALUE;
+	else if (g_strcmp0 (value, GPM_HISTORY_HOURS_TEXT) == 0)
+		history_time = GPM_HISTORY_HOURS_VALUE;
 	else if (g_strcmp0 (value, GPM_HISTORY_DAY_TEXT) == 0)
 		history_time = GPM_HISTORY_DAY_VALUE;
 	else if (g_strcmp0 (value, GPM_HISTORY_WEEK_TEXT) == 0)
@@ -1688,6 +1692,7 @@ main (int argc, char *argv[])
 	gpm_stats_set_combo_simple_text (widget);
 	gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_MINUTE_TEXT);
 	gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_HOUR_TEXT);
+	gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_HOURS_TEXT);
 	gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_DAY_TEXT);
 	gtk_combo_box_append_text (GTK_COMBO_BOX (widget), GPM_HISTORY_WEEK_TEXT);
 	gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]