diff options
-rw-r--r-- | src/menu.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/menu.cpp b/src/menu.cpp index a1cd18c..12ec3ef 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -261,7 +261,6 @@ private: void add_appointments(GMenu* menu, Profile profile) { - int n = 0; const int MAX_APPTS = 5; std::set<std::string> added; @@ -272,7 +271,7 @@ private: continue; // don't show too many - if (n++ >= MAX_APPTS) + if (g_menu_model_get_n_items (G_MENU_MODEL(menu) >= MAX_APPTS)) break; added.insert(appt.uid); |