[gnome-power-manager] Add new 6 hours period in power history stats
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Add new 6 hours period in power history stats
- Date: Sat, 29 May 2010 13:00:06 +0000 (UTC)
commit 1745a1b95e0857c1b26cc5a0f91bf8f2deebe9c4
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 84a4301..b723e23 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
@@ -1375,6 +1377,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)
@@ -1719,6 +1723,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]