summaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-25 12:54:28 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-30 14:34:34 +0200
commit75d0c4dc17d6b984199f14b7f75e42d64d1e2dd2 (patch)
treeedcb2bf453d01e0287f2a3bec6723e9a6bfde9ee /src/utils.c
parent920875d7cb2615c2095883e2e4e4974d031cdd42 (diff)
downloadcalcurse-75d0c4dc17d6b984199f14b7f75e42d64d1e2dd2.zip
Remove the need for the "day_saved_item" struct
Do not store the currently selected item in day_write_pad() -- use day_get_item() and apoint_hilt() in day_popup_item() instead. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index 14de867..a4780b5 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -492,8 +492,8 @@ draw_scrollbar(WINDOW * win, int y, int x, int length,
* long to fit in its corresponding panel window.
*/
void
-item_in_popup(const char *saved_a_start, const char *saved_a_end,
- const char *msg, const char *pop_title)
+item_in_popup(const char *a_start, const char *a_end, const char *msg,
+ const char *pop_title)
{
WINDOW *popup_win, *pad;
const int margin_left = 4, margin_top = 4;
@@ -502,9 +502,9 @@ item_in_popup(const char *saved_a_start, const char *saved_a_end,
pad = newpad(padl, padw);
popup_win = popup(winl, winw, 1, 2, pop_title, NULL, 1);
- if (strcmp(pop_title, _("Appointment")) == 0) {
- mvwprintw(popup_win, margin_top, margin_left, "- %s -> %s",
- saved_a_start, saved_a_end);
+ if (a_start && a_end) {
+ mvwprintw(popup_win, margin_top, margin_left, "- %s -> %s", a_start,
+ a_end);
}
mvwaddstr(pad, 0, margin_left, msg);
wmove(win[STA].p, 0, 0);