aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-03-18 10:17:55 -0500
committerRobert Tari <robert@tari.in>2021-07-05 00:44:01 +0200
commite47d49aca4da2d97c06acccc967abdf5698b044d (patch)
treed3edead4a7396f959706242fed978f6bc0a9c238 /include
parent179bbad3a5c1c12abb36dc1c3702cb50b6be8f2e (diff)
downloadayatana-indicator-datetime-e47d49aca4da2d97c06acccc967abdf5698b044d.tar.gz
ayatana-indicator-datetime-e47d49aca4da2d97c06acccc967abdf5698b044d.tar.bz2
ayatana-indicator-datetime-e47d49aca4da2d97c06acccc967abdf5698b044d.zip
get event selection up-to-date with the spec, including showing in-progress events. add unit tests to cover event priority and display order.
Diffstat (limited to 'include')
-rw-r--r--include/datetime/date-time.h2
-rw-r--r--include/datetime/menu.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/include/datetime/date-time.h b/include/datetime/date-time.h
index fc83388..845716d 100644
--- a/include/datetime/date-time.h
+++ b/include/datetime/date-time.h
@@ -68,7 +68,9 @@ public:
int64_t to_unix() const;
bool operator<(const DateTime& that) const;
+ bool operator>(const DateTime& that) const;
bool operator<=(const DateTime& that) const;
+ bool operator>=(const DateTime& that) const;
bool operator!=(const DateTime& that) const;
bool operator==(const DateTime& that) const;
int64_t operator- (const DateTime& that) const;
diff --git a/include/datetime/menu.h b/include/datetime/menu.h
index acd9ed8..0074ea5 100644
--- a/include/datetime/menu.h
+++ b/include/datetime/menu.h
@@ -21,6 +21,7 @@
#define INDICATOR_DATETIME_MENU_H
#include <datetime/actions.h>
+#include <datetime/appointment.h>
#include <datetime/state.h>
#include <memory> // std::shared_ptr
@@ -49,6 +50,11 @@ public:
Profile profile() const;
GMenuModel* menu_model();
+ static std::vector<Appointment> get_display_appointments(
+ const std::vector<Appointment>&,
+ const DateTime& start,
+ unsigned int max_items=5);
+
protected:
Menu (Profile profile_in, const std::string& name_in);
virtual ~Menu() =default;