[gnome-control-center/gnome-3-20] user-accounts: Fix missing records in the history dialog
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-20] user-accounts: Fix missing records in the history dialog
- Date: Wed, 29 Jun 2016 08:34:08 +0000 (UTC)
commit 8b224edf64352f71157c363686e2832a9bf6f5f6
Author: Ondrej Holy <oholy redhat com>
Date: Mon Mar 7 13:54:55 2016 +0100
user-accounts: Fix missing records in the history dialog
"Session Ended" record may miss if "Session Started" isn't in the
same week, which is caused by a wrong order of conditions.
https://bugzilla.gnome.org/show_bug.cgi?id=762346
panels/user-accounts/um-history-dialog.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/panels/user-accounts/um-history-dialog.c b/panels/user-accounts/um-history-dialog.c
index 5bc3cff..2e85533 100644
--- a/panels/user-accounts/um-history-dialog.c
+++ b/panels/user-accounts/um-history-dialog.c
@@ -234,9 +234,6 @@ show_week (UmHistoryDialog *um)
line = 0;
for (;i >= 0; i--) {
history = g_array_index (login_history, UmLoginHistory, i);
- if (history.logout_time > 0 && history.logout_time < from) {
- break;
- }
/* Display only x-session and tty records */
if (!g_str_has_prefix (history.type, ":") &&
@@ -244,6 +241,10 @@ show_week (UmHistoryDialog *um)
continue;
}
+ if (history.logout_time > 0 && history.logout_time < from) {
+ break;
+ }
+
if (history.logout_time > 0 && history.logout_time < to) {
datetime = g_date_time_new_from_unix_local (history.logout_time);
add_record (box, datetime, _("Session Ended"), line);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]