gnome-power-manager r3086 - in trunk: . libdevkit-power src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-power-manager r3086 - in trunk: . libdevkit-power src
- Date: Wed, 12 Nov 2008 16:19:14 +0000 (UTC)
Author: rhughes
Date: Wed Nov 12 16:19:14 2008
New Revision: 3086
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3086&view=rev
Log:
2008-11-12 Richard Hughes <richard hughsie com>
* libdevkit-power/dkp-client.c: (dkp_client_ensure_properties),
(dkp_client_get_daemon_version), (dkp_client_can_hibernate),
(dkp_client_can_suspend), (dkp_client_on_battery),
(dkp_client_on_low_battery), (dkp_client_device_added_cb),
(dkp_client_device_changed_cb), (dkp_client_device_removed_cb),
(dkp_client_changed_cb), (dkp_client_class_init),
(dkp_client_init), (dkp_client_finalize):
* libdevkit-power/dkp-client.h:
* libdevkit-power/dkp-enum.c:
* libdevkit-power/dkp-enum.h:
* src/gpm-ac-adapter.c: (gpm_ac_adapter_is_present):
Use new DeviceKit-power 002 API.
* src/gpm-graph-widget.c: (gpm_get_axis_label):
Allow days as a graph widget entry.
* src/gpm-statistics.c: (gpm_update_range_combo_changed), (main):
Allow '1 Week' as a time value.
Modified:
trunk/ChangeLog
trunk/libdevkit-power/dkp-client.c
trunk/libdevkit-power/dkp-client.h
trunk/libdevkit-power/dkp-enum.c
trunk/libdevkit-power/dkp-enum.h
trunk/src/gpm-ac-adapter.c
trunk/src/gpm-graph-widget.c
trunk/src/gpm-statistics.c
Modified: trunk/libdevkit-power/dkp-client.c
==============================================================================
--- trunk/libdevkit-power/dkp-client.c (original)
+++ trunk/libdevkit-power/dkp-client.c Wed Nov 12 16:19:14 2008
@@ -40,16 +40,24 @@
{
DBusGConnection *bus;
DBusGProxy *proxy;
+ DBusGProxy *prop_proxy;
GHashTable *hash;
GPtrArray *array;
+
+ gboolean have_properties;
+
+ char *daemon_version;
+ gboolean can_suspend;
+ gboolean can_hibernate;
+ gboolean on_battery;
+ gboolean on_low_battery;
};
enum {
- DKP_CLIENT_ADDED,
+ DKP_CLIENT_DEVICE_ADDED,
+ DKP_CLIENT_DEVICE_CHANGED,
+ DKP_CLIENT_DEVICE_REMOVED,
DKP_CLIENT_CHANGED,
- DKP_CLIENT_REMOVED,
- DKP_CLIENT_ON_BATTERY_CHANGED,
- DKP_CLIENT_LOW_BATTERY_CHANGED,
DKP_CLIENT_LAST_SIGNAL
};
@@ -94,91 +102,130 @@
}
/**
- * dkp_client_get_on_battery
+ * dkp_client_ensure_properties:
**/
-gboolean
-dkp_client_get_on_battery (DkpClient *client, gboolean *on_battery, GError **error)
+static void
+dkp_client_ensure_properties (DkpClient *client)
{
gboolean ret;
- GError *error_local = NULL;
+ GError *error;
+ GHashTable *props;
+ GValue *value;
+
+ props = NULL;
- ret = dbus_g_proxy_call (client->priv->proxy, "GetOnBattery", &error_local,
+ if (client->priv->have_properties)
+ goto out;
+
+ error = NULL;
+ ret = dbus_g_proxy_call (client->priv->prop_proxy, "GetAll", &error,
+ G_TYPE_STRING, "org.freedesktop.DeviceKit.Power",
G_TYPE_INVALID,
- G_TYPE_BOOLEAN, &on_battery,
+ dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), &props,
G_TYPE_INVALID);
if (!ret) {
- egg_warning ("Couldn't get battery status: %s", error_local->message);
- if (error != NULL)
- *error = g_error_new (1, 0, "%s", error_local->message);
- g_error_free (error_local);
+ g_warning ("Error invoking GetAll() to get properties: %s", error->message);
+ g_error_free (error);
+ goto out;
+ }
+
+
+ value = g_hash_table_lookup (props, "daemon-version");
+ if (value == NULL) {
+ g_warning ("No 'daemon-version' property");
+ goto out;
+ }
+ client->priv->daemon_version = g_strdup (g_value_get_string (value));
+
+ value = g_hash_table_lookup (props, "can-suspend");
+ if (value == NULL) {
+ g_warning ("No 'can-suspend' property");
+ goto out;
+ }
+ client->priv->can_suspend = g_value_get_boolean (value);
+
+ value = g_hash_table_lookup (props, "can-hibernate");
+ if (value == NULL) {
+ g_warning ("No 'can-hibernate' property");
+ goto out;
}
- return ret;
+ client->priv->can_hibernate = g_value_get_boolean (value);
+
+ value = g_hash_table_lookup (props, "on-battery");
+ if (value == NULL) {
+ g_warning ("No 'on-battery' property");
+ goto out;
+ }
+ client->priv->on_battery = g_value_get_boolean (value);
+
+ value = g_hash_table_lookup (props, "on-low-battery");
+ if (value == NULL) {
+ g_warning ("No 'on-low-battery' property");
+ goto out;
+ }
+ client->priv->on_low_battery = g_value_get_boolean (value);
+
+ /* cached */
+ client->priv->have_properties = TRUE;
+
+ out:
+ if (props != NULL)
+ g_hash_table_unref (props);
}
/**
- * dkp_client_get_low_battery
+ * dkp_client_get_daemon_version:
**/
-gboolean
-dkp_client_get_low_battery (DkpClient *client, gboolean *low_battery, GError **error)
+const gchar *
+dkp_client_get_daemon_version (DkpClient *client)
{
- gboolean ret;
- GError *error_local = NULL;
-
- ret = dbus_g_proxy_call (client->priv->proxy, "GetLowBattery", &error_local,
- G_TYPE_INVALID,
- G_TYPE_BOOLEAN, &low_battery,
- G_TYPE_INVALID);
- if (!ret) {
- egg_warning ("Couldn't get low battery status: %s", error_local->message);
- if (error != NULL)
- *error = g_error_new (1, 0, "%s", error_local->message);
- g_error_free (error_local);
- }
- return ret;
+ g_return_val_if_fail (DKP_IS_CLIENT (client), NULL);
+ dkp_client_ensure_properties (client);
+ return client->priv->daemon_version;
}
/**
- * dkp_client_can_suspend
+ * dkp_client_can_hibernate:
**/
gboolean
-dkp_client_can_suspend (DkpClient *client, gboolean interactive, gboolean *can_suspend, GError **error)
+dkp_client_can_hibernate (DkpClient *client)
{
- gboolean ret;
- GError *error_local = NULL;
+ g_return_val_if_fail (DKP_IS_CLIENT (client), FALSE);
+ dkp_client_ensure_properties (client);
+ return client->priv->can_hibernate;
+}
- ret = dbus_g_proxy_call (client->priv->proxy, "CanSuspend", &error_local,
- G_TYPE_INVALID,
- G_TYPE_BOOLEAN, &can_suspend,
- G_TYPE_INVALID);
- if (!ret) {
- egg_warning ("Couldn't get suspend status: %s", error_local->message);
- if (error != NULL)
- *error = g_error_new (1, 0, "%s", error_local->message);
- g_error_free (error_local);
- }
- return ret;
+/**
+ * dkp_client_can_suspend:
+ **/
+gboolean
+dkp_client_can_suspend (DkpClient *client)
+{
+ g_return_val_if_fail (DKP_IS_CLIENT (client), FALSE);
+ dkp_client_ensure_properties (client);
+ return client->priv->can_suspend;
}
/**
- * dkp_client_can_hibernate
+ * dkp_client_on_battery:
**/
gboolean
-dkp_client_can_hibernate (DkpClient *client, gboolean interactive, gboolean *can_hibernate, GError **error)
+dkp_client_on_battery (DkpClient *client)
{
- gboolean ret;
- GError *error_local = NULL;
+ g_return_val_if_fail (DKP_IS_CLIENT (client), FALSE);
+ dkp_client_ensure_properties (client);
+ return client->priv->on_battery;
+}
- ret = dbus_g_proxy_call (client->priv->proxy, "CanHibernate", &error_local,
- G_TYPE_INVALID,
- G_TYPE_BOOLEAN, &can_hibernate,
- G_TYPE_INVALID);
- if (!ret) {
- egg_warning ("Couldn't get hibernate status: %s", error_local->message);
- if (error != NULL)
- *error = g_error_new (1, 0, "%s", error_local->message);
- g_error_free (error_local);
- }
- return ret;
+/**
+ * dkp_client_on_low_battery:
+ **/
+gboolean
+dkp_client_on_low_battery (DkpClient *client)
+{
+ g_return_val_if_fail (DKP_IS_CLIENT (client), FALSE);
+ dkp_client_ensure_properties (client);
+ return client->priv->on_low_battery;
}
/**
@@ -216,56 +263,48 @@
* dkp_client_added_cb:
**/
static void
-dkp_client_added_cb (DBusGProxy *proxy, const gchar *object_path, DkpClient *client)
+dkp_client_device_added_cb (DBusGProxy *proxy, const gchar *object_path, DkpClient *client)
{
DkpClientDevice *device;
/* create new device */
device = dkp_client_add (client, object_path);
- g_signal_emit (client, signals [DKP_CLIENT_ADDED], 0, device);
+ g_signal_emit (client, signals [DKP_CLIENT_DEVICE_ADDED], 0, device);
}
/**
* dkp_client_changed_cb:
**/
static void
-dkp_client_changed_cb (DBusGProxy *proxy, const gchar *object_path, DkpClient *client)
+dkp_client_device_changed_cb (DBusGProxy *proxy, const gchar *object_path, DkpClient *client)
{
DkpClientDevice *device;
device = dkp_client_get_device (client, object_path);
if (device != NULL)
- g_signal_emit (client, signals [DKP_CLIENT_CHANGED], 0, device);
+ g_signal_emit (client, signals [DKP_CLIENT_DEVICE_CHANGED], 0, device);
}
/**
* dkp_client_removed_cb:
**/
static void
-dkp_client_removed_cb (DBusGProxy *proxy, const gchar *object_path, DkpClient *client)
+dkp_client_device_removed_cb (DBusGProxy *proxy, const gchar *object_path, DkpClient *client)
{
DkpClientDevice *device;
device = dkp_client_get_device (client, object_path);
if (device != NULL)
- g_signal_emit (client, signals [DKP_CLIENT_REMOVED], 0, device);
+ g_signal_emit (client, signals [DKP_CLIENT_DEVICE_REMOVED], 0, device);
dkp_client_remove (client, device);
}
/**
- * dkp_client_on_battery_changed_cb:
- **/
-static void
-dkp_client_on_battery_changed_cb (DBusGProxy *proxy, gboolean on_battery, DkpClient *client)
-{
- g_signal_emit (client, signals [DKP_CLIENT_ON_BATTERY_CHANGED], 0, on_battery);
-}
-
-/**
- * dkp_client_low_battery_changed_cb:
+ * dkp_client_changed_cb:
**/
static void
-dkp_client_low_battery_changed_cb (DBusGProxy *proxy, gboolean low_battery, DkpClient *client)
+dkp_client_changed_cb (DBusGProxy *proxy, DkpClient *client)
{
- g_signal_emit (client, signals [DKP_CLIENT_LOW_BATTERY_CHANGED], 0, low_battery);
+ client->priv->have_properties = FALSE;
+ g_signal_emit (client, signals [DKP_CLIENT_CHANGED], 0);
}
/**
@@ -278,36 +317,30 @@
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = dkp_client_finalize;
- signals [DKP_CLIENT_ADDED] =
- g_signal_new ("added",
+ signals [DKP_CLIENT_DEVICE_ADDED] =
+ g_signal_new ("device-added",
G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DkpClientClass, added),
+ G_STRUCT_OFFSET (DkpClientClass, device_added),
NULL, NULL, g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
- signals [DKP_CLIENT_REMOVED] =
- g_signal_new ("removed",
+ signals [DKP_CLIENT_DEVICE_REMOVED] =
+ g_signal_new ("device-removed",
G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DkpClientClass, removed),
+ G_STRUCT_OFFSET (DkpClientClass, device_removed),
NULL, NULL, g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
- signals [DKP_CLIENT_CHANGED] =
- g_signal_new ("changed",
+ signals [DKP_CLIENT_DEVICE_CHANGED] =
+ g_signal_new ("device-changed",
G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DkpClientClass, changed),
+ G_STRUCT_OFFSET (DkpClientClass, device_changed),
NULL, NULL, g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
- signals [DKP_CLIENT_ON_BATTERY_CHANGED] =
- g_signal_new ("on-battery-changed",
- G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DkpClientClass, changed),
- NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
- signals [DKP_CLIENT_LOW_BATTERY_CHANGED] =
- g_signal_new ("low-battery-changed",
+ signals [DKP_CLIENT_CHANGED] =
+ g_signal_new ("changed",
G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (DkpClientClass, changed),
- NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
+ NULL, NULL, g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
g_type_class_add_private (klass, sizeof (DkpClientPrivate));
}
@@ -337,30 +370,38 @@
}
/* connect to main interface */
- client->priv->proxy = dbus_g_proxy_new_for_name (client->priv->bus, "org.freedesktop.DeviceKit.Power",
- "/", "org.freedesktop.DeviceKit.Power");
+ client->priv->proxy = dbus_g_proxy_new_for_name (client->priv->bus,
+ "org.freedesktop.DeviceKit.Power",
+ "/org/freedesktop/DeviceKit/Power",
+ "org.freedesktop.DeviceKit.Power");
if (client->priv->proxy == NULL) {
egg_warning ("Couldn't connect to proxy");
goto out;
}
+ client->priv->prop_proxy = dbus_g_proxy_new_for_name (client->priv->bus,
+ "org.freedesktop.DeviceKit.Power",
+ "/org/freedesktop/DeviceKit/Power",
+ "org.freedesktop.DBus.Properties");
+ if (client->priv->prop_proxy == NULL) {
+ egg_warning ("Couldn't connect to proxy");
+ goto out;
+ }
+
dbus_g_proxy_add_signal (client->priv->proxy, "DeviceAdded", G_TYPE_STRING, G_TYPE_INVALID);
dbus_g_proxy_add_signal (client->priv->proxy, "DeviceRemoved", G_TYPE_STRING, G_TYPE_INVALID);
dbus_g_proxy_add_signal (client->priv->proxy, "DeviceChanged", G_TYPE_STRING, G_TYPE_INVALID);
- dbus_g_proxy_add_signal (client->priv->proxy, "OnBatteryChanged", G_TYPE_BOOLEAN, G_TYPE_INVALID);
- dbus_g_proxy_add_signal (client->priv->proxy, "LowBatteryChanged", G_TYPE_BOOLEAN, G_TYPE_INVALID);
+ dbus_g_proxy_add_signal (client->priv->proxy, "Changed", G_TYPE_INVALID);
/* all callbacks */
dbus_g_proxy_connect_signal (client->priv->proxy, "DeviceAdded",
- G_CALLBACK (dkp_client_added_cb), client, NULL);
+ G_CALLBACK (dkp_client_device_added_cb), client, NULL);
dbus_g_proxy_connect_signal (client->priv->proxy, "DeviceRemoved",
- G_CALLBACK (dkp_client_removed_cb), client, NULL);
+ G_CALLBACK (dkp_client_device_removed_cb), client, NULL);
dbus_g_proxy_connect_signal (client->priv->proxy, "DeviceChanged",
+ G_CALLBACK (dkp_client_device_changed_cb), client, NULL);
+ dbus_g_proxy_connect_signal (client->priv->proxy, "Changed",
G_CALLBACK (dkp_client_changed_cb), client, NULL);
- dbus_g_proxy_connect_signal (client->priv->proxy, "OnBatteryChanged",
- G_CALLBACK (dkp_client_on_battery_changed_cb), client, NULL);
- dbus_g_proxy_connect_signal (client->priv->proxy, "LowBatteryChanged",
- G_CALLBACK (dkp_client_low_battery_changed_cb), client, NULL);
/* coldplug */
devices = dkp_client_enumerate_devices (client, NULL);
@@ -399,6 +440,14 @@
g_hash_table_unref (client->priv->hash);
dbus_g_connection_unref (client->priv->bus);
+ if (client->priv->proxy != NULL)
+ g_object_unref (client->priv->proxy);
+
+ if (client->priv->prop_proxy != NULL)
+ g_object_unref (client->priv->prop_proxy);
+
+ g_free (client->priv->daemon_version);
+
G_OBJECT_CLASS (dkp_client_parent_class)->finalize (object);
}
Modified: trunk/libdevkit-power/dkp-client.h
==============================================================================
--- trunk/libdevkit-power/dkp-client.h (original)
+++ trunk/libdevkit-power/dkp-client.h Wed Nov 12 16:19:14 2008
@@ -48,36 +48,26 @@
typedef struct
{
GObjectClass parent_class;
- void (*added) (DkpClient *client,
+ void (*device_added) (DkpClient *client,
const DkpClientDevice *device);
- void (*changed) (DkpClient *client,
+ void (*device_changed) (DkpClient *client,
const DkpClientDevice *device);
- void (*removed) (DkpClient *client,
+ void (*device_removed) (DkpClient *client,
const DkpClientDevice *device);
- void (*on_battery_changed) (DkpClient *client,
+ void (*changed) (DkpClient *client,
gboolean on_battery);
- void (*low_battery_changed) (DkpClient *client,
- gboolean low_battery);
} DkpClientClass;
GType dkp_client_get_type (void) G_GNUC_CONST;
DkpClient *dkp_client_new (void);
GPtrArray *dkp_client_enumerate_devices (DkpClient *client,
GError **error);
-gboolean dkp_client_get_on_battery (DkpClient *client,
- gboolean *on_battery,
- GError **error);
-gboolean dkp_client_get_low_battery (DkpClient *client,
- gboolean *low_battery,
- GError **error);
-gboolean dkp_client_can_suspend (DkpClient *client,
- gboolean interactive,
- gboolean *can_suspend,
- GError **error);
-gboolean dkp_client_can_hibernate (DkpClient *client,
- gboolean interactive,
- gboolean *can_hibernate,
- GError **error);
+
+const gchar *dkp_client_get_daemon_version (DkpClient *client);
+gboolean dkp_client_can_hibernate (DkpClient *client);
+gboolean dkp_client_can_suspend (DkpClient *client);
+gboolean dkp_client_on_battery (DkpClient *client);
+gboolean dkp_client_on_low_battery (DkpClient *client);
G_END_DECLS
Modified: trunk/libdevkit-power/dkp-enum.c
==============================================================================
--- trunk/libdevkit-power/dkp-enum.c (original)
+++ trunk/libdevkit-power/dkp-enum.c Wed Nov 12 16:19:14 2008
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
- * Copyright (C) 2008 David Zeuthen <david fubar dk>
+ * Copyright (C) 2008 David Zeuthen <davidz redhat com>
* Copyright (C) 2008 Richard Hughes <richard hughsie com>
*
* This program is free software; you can redistribute it and/or modify
Modified: trunk/libdevkit-power/dkp-enum.h
==============================================================================
--- trunk/libdevkit-power/dkp-enum.h (original)
+++ trunk/libdevkit-power/dkp-enum.h Wed Nov 12 16:19:14 2008
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
- * Copyright (C) 2008 David Zeuthen <david fubar dk>
+ * Copyright (C) 2008 David Zeuthen <davidz redhat com>
* Copyright (C) 2008 Richard Hughes <richard hughsie com>
*
* This program is free software; you can redistribute it and/or modify
Modified: trunk/src/gpm-ac-adapter.c
==============================================================================
--- trunk/src/gpm-ac-adapter.c (original)
+++ trunk/src/gpm-ac-adapter.c Wed Nov 12 16:19:14 2008
@@ -99,9 +99,10 @@
g_error_free (error);
}
#else
- dkp_client_get_on_battery (ac_adapter->priv->device, &is_on_ac, NULL);
+ gboolean on_battery;
+ on_battery = dkp_client_on_battery (ac_adapter->priv->device);
/* battery -> not AC */
- is_on_ac = !is_on_ac;
+ is_on_ac = !on_battery;
#endif
return is_on_ac;
}
Modified: trunk/src/gpm-graph-widget.c
==============================================================================
--- trunk/src/gpm-graph-widget.c (original)
+++ trunk/src/gpm-graph-widget.c Wed Nov 12 16:19:14 2008
@@ -272,14 +272,24 @@
gint minutes = time / 60;
gint seconds = time - (minutes * 60);
gint hours = minutes / 60;
- minutes = minutes - (hours * 60);
- if (hours > 0) {
+ gint days = hours / 24;
+ minutes = minutes - (hours * 60);
+ hours = hours - (days * 24);
+ if (days > 0) {
+ if (hours == 0) {
+ /*Translators: This is %i days*/
+ text = g_strdup_printf (_("%id"), days);
+ } else {
+ /*Translators: This is %i days %02i hours*/
+ text = g_strdup_printf (_("%id%02ih"), days, hours);
+ }
+ } else if (hours > 0) {
if (minutes == 0) {
/*Translators: This is %i hours*/
text = g_strdup_printf (_("%ih"), hours);
} else {
/*Translators: This is %i hours %02i minutes*/
- text = g_strdup_printf (_("%ih%02i"), hours, minutes);
+ text = g_strdup_printf (_("%ih%02im"), hours, minutes);
}
} else if (minutes > 0) {
if (seconds == 0) {
Modified: trunk/src/gpm-statistics.c
==============================================================================
--- trunk/src/gpm-statistics.c (original)
+++ trunk/src/gpm-statistics.c Wed Nov 12 16:19:14 2008
@@ -83,10 +83,12 @@
#define GPM_HISTORY_MINUTE_TEXT _("10 minutes")
#define GPM_HISTORY_HOUR_TEXT _("2 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_DAY_VALUE 24*60*60
+#define GPM_HISTORY_WEEK_VALUE 7*24*60*60
#define GPM_STATS_CHARGE_DATA_TEXT _("Charge profile")
#define GPM_STATS_CHARGE_ACCURACY_TEXT _("Charge accuracy")
@@ -852,6 +854,8 @@
history_time = GPM_HISTORY_HOUR_VALUE;
else if (strcmp (value, GPM_HISTORY_DAY_TEXT) == 0)
history_time = GPM_HISTORY_DAY_VALUE;
+ else if (strcmp (value, GPM_HISTORY_WEEK_TEXT) == 0)
+ history_time = GPM_HISTORY_WEEK_VALUE;
else
g_assert (FALSE);
@@ -1069,6 +1073,7 @@
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_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);
if (history_time == GPM_HISTORY_MINUTE_VALUE)
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]