summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2013-02-14 10:29:57 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2013-02-14 10:34:00 +0100
commitc7f388860736968b1a7a3af98fbbe59acd4abac0 (patch)
tree9407c6fedff0672a5b4b2569ec362fae446777e8
parent267bf0fc1c3ef59b232ea60e7ccdede664a667e8 (diff)
downloadcalcurse-c7f388860736968b1a7a3af98fbbe59acd4abac0.tar.gz
calcurse-c7f388860736968b1a7a3af98fbbe59acd4abac0.zip
Rename appointment/event-related UI functions
* Rename "interaction.c" to "ui-day.c" since it no longer contains todo-related UI functions. * Rename appointment/event-related UI functions to ui_day_*(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
-rw-r--r--src/Makefile.am2
-rw-r--r--src/calcurse.c16
-rw-r--r--src/calcurse.h16
-rw-r--r--src/ui-day.c (renamed from src/interaction.c)22
-rw-r--r--src/utils.c2
5 files changed, 29 insertions, 29 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 7c38cd0..438106d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -21,7 +21,6 @@ calcurse_SOURCES = \
getstring.c \
help.c \
ical.c \
- interaction.c \
io.c \
keys.c \
llist.c \
@@ -32,6 +31,7 @@ calcurse_SOURCES = \
sha1.c \
sigs.c \
todo.c \
+ ui-day.c \
ui-todo.c \
utf8.c \
utils.c \
diff --git a/src/calcurse.c b/src/calcurse.c
index 34b93db..a7500ca 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -126,7 +126,7 @@ static inline void key_generic_config_menu(void)
static inline void key_generic_add_appt(void)
{
- interact_day_item_add();
+ ui_day_item_add();
inday = do_storage(1);
wins_update(FLAG_CAL | FLAG_APP | FLAG_STA);
}
@@ -143,7 +143,7 @@ static inline void key_add_item(void)
{
switch (wins_slctd()) {
case APP:
- interact_day_item_add();
+ ui_day_item_add();
inday = do_storage(0);
wins_update(FLAG_CAL | FLAG_APP | FLAG_STA);
break;
@@ -161,7 +161,7 @@ static inline void key_add_item(void)
static inline void key_edit_item(void)
{
if (wins_slctd() == APP && apoint_hilt() != 0) {
- interact_day_item_edit();
+ ui_day_item_edit();
inday = do_storage(0);
wins_update(FLAG_CAL | FLAG_APP | FLAG_STA);
} else if (wins_slctd() == TOD && todo_hilt() != 0) {
@@ -173,7 +173,7 @@ static inline void key_edit_item(void)
static inline void key_del_item(void)
{
if (wins_slctd() == APP && apoint_hilt() != 0) {
- interact_day_item_delete(&inday.nb_events, &inday.nb_apoints, reg);
+ ui_day_item_delete(&inday.nb_events, &inday.nb_apoints, reg);
inday = do_storage(0);
wins_update(FLAG_CAL | FLAG_APP | FLAG_STA);
} else if (wins_slctd() == TOD && todo_hilt() != 0) {
@@ -185,7 +185,7 @@ static inline void key_del_item(void)
static inline void key_generic_copy(void)
{
if (wins_slctd() == APP && apoint_hilt() != 0) {
- interact_day_item_copy(&inday.nb_events, &inday.nb_apoints, reg);
+ ui_day_item_copy(&inday.nb_events, &inday.nb_apoints, reg);
inday = do_storage(0);
wins_update(FLAG_CAL | FLAG_APP);
}
@@ -194,7 +194,7 @@ static inline void key_generic_copy(void)
static inline void key_generic_paste(void)
{
if (wins_slctd() == APP) {
- interact_day_item_paste(&inday.nb_events, &inday.nb_apoints, reg);
+ ui_day_item_paste(&inday.nb_events, &inday.nb_apoints, reg);
inday = do_storage(0);
wins_update(FLAG_CAL | FLAG_APP);
}
@@ -203,7 +203,7 @@ static inline void key_generic_paste(void)
static inline void key_repeat_item(void)
{
if (wins_slctd() == APP && apoint_hilt() != 0)
- interact_day_item_repeat();
+ ui_day_item_repeat();
inday = do_storage(0);
wins_update(FLAG_CAL | FLAG_APP | FLAG_STA);
}
@@ -223,7 +223,7 @@ static inline void key_flag_item(void)
static inline void key_pipe_item(void)
{
if (wins_slctd() == APP && apoint_hilt() != 0)
- interact_day_item_pipe();
+ ui_day_item_pipe();
else if (wins_slctd() == TOD && todo_hilt() != 0)
ui_todo_pipe();
wins_update(FLAG_ALL);
diff --git a/src/calcurse.h b/src/calcurse.h
index 1fb7a47..b140fc9 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -730,14 +730,14 @@ void ical_import_data(FILE *, FILE *, unsigned *, unsigned *, unsigned *,
void ical_export_data(FILE *);
/* interaction.c */
-void interact_day_item_add(void);
-void interact_day_item_delete(unsigned *, unsigned *, unsigned);
-void interact_day_item_edit(void);
-void interact_day_item_pipe(void);
-void interact_day_item_repeat(void);
-void interact_day_item_cut_free(unsigned);
-void interact_day_item_copy(unsigned *, unsigned *, unsigned);
-void interact_day_item_paste(unsigned *, unsigned *, unsigned);
+void ui_day_item_add(void);
+void ui_day_item_delete(unsigned *, unsigned *, unsigned);
+void ui_day_item_edit(void);
+void ui_day_item_pipe(void);
+void ui_day_item_repeat(void);
+void ui_day_item_cut_free(unsigned);
+void ui_day_item_copy(unsigned *, unsigned *, unsigned);
+void ui_day_item_paste(unsigned *, unsigned *, unsigned);
void ui_todo_add(void);
void ui_todo_delete(void);
void ui_todo_edit(void);
diff --git a/src/interaction.c b/src/ui-day.c
index 486ad75..caf272b 100644
--- a/src/interaction.c
+++ b/src/ui-day.c
@@ -271,7 +271,7 @@ static void update_rept(struct rpt **rpt, const long start)
}
/* Edit an already existing item. */
-void interact_day_item_edit(void)
+void ui_day_item_edit(void)
{
struct day_item *p;
struct recur_event *re;
@@ -366,7 +366,7 @@ void interact_day_item_edit(void)
}
/* Pipe an appointment or event to an external program. */
-void interact_day_item_pipe(void)
+void ui_day_item_pipe(void)
{
char cmd[BUFSIZ] = "";
char const *arg[] = { cmd, NULL };
@@ -410,7 +410,7 @@ void interact_day_item_pipe(void)
* Add an item in either the appointment or the event list,
* depending if the start time is entered or not.
*/
-void interact_day_item_add(void)
+void ui_day_item_add(void)
{
#define LTIME 6
#define LDUR 12
@@ -506,7 +506,7 @@ void interact_day_item_add(void)
}
/* Delete an item from the appointment list. */
-void interact_day_item_delete(unsigned *nb_events, unsigned *nb_apoints,
+void ui_day_item_delete(unsigned *nb_events, unsigned *nb_apoints,
unsigned reg)
{
const char *del_app_str = _("Do you really want to delete this item ?");
@@ -563,7 +563,7 @@ void interact_day_item_delete(unsigned *nb_events, unsigned *nb_apoints,
}
}
- interact_day_item_cut_free(reg);
+ ui_day_item_cut_free(reg);
p = day_cut_item(date, apoint_hilt());
day_cut[reg].type = p->type;
day_cut[reg].item = p->item;
@@ -601,7 +601,7 @@ void interact_day_item_delete(unsigned *nb_events, unsigned *nb_apoints,
* o repetition end date
* and then delete the selected item to recreate it as a recurrent one
*/
-void interact_day_item_repeat(void)
+void ui_day_item_repeat(void)
{
struct tm lt;
time_t t;
@@ -728,7 +728,7 @@ void interact_day_item_repeat(void)
/* NOTREACHED */
}
- interact_day_item_cut_free(REG_BLACK_HOLE);
+ ui_day_item_cut_free(REG_BLACK_HOLE);
p = day_cut_item(date, item_nb);
day_cut[REG_BLACK_HOLE].type = p->type;
day_cut[REG_BLACK_HOLE].item = p->item;
@@ -737,7 +737,7 @@ void interact_day_item_repeat(void)
}
/* Free the current cut item, if any. */
-void interact_day_item_cut_free(unsigned reg)
+void ui_day_item_cut_free(unsigned reg)
{
switch (day_cut[reg].type) {
case 0:
@@ -759,7 +759,7 @@ void interact_day_item_cut_free(unsigned reg)
}
/* Copy an item, so that it can be pasted somewhere else later. */
-void interact_day_item_copy(unsigned *nb_events, unsigned *nb_apoints,
+void ui_day_item_copy(unsigned *nb_events, unsigned *nb_apoints,
unsigned reg)
{
const int NBITEMS = *nb_apoints + *nb_events;
@@ -767,12 +767,12 @@ void interact_day_item_copy(unsigned *nb_events, unsigned *nb_apoints,
if (NBITEMS == 0 || reg == REG_BLACK_HOLE)
return;
- interact_day_item_cut_free(reg);
+ ui_day_item_cut_free(reg);
day_item_fork(day_get_item(apoint_hilt()), &day_cut[reg]);
}
/* Paste a previously cut item. */
-void interact_day_item_paste(unsigned *nb_events, unsigned *nb_apoints,
+void ui_day_item_paste(unsigned *nb_events, unsigned *nb_apoints,
unsigned reg)
{
int item_type;
diff --git a/src/utils.c b/src/utils.c
index 76cdba6..1192ed8 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -105,7 +105,7 @@ void free_user_data(void)
recur_apoint_llist_free();
recur_event_llist_free();
for (i = 0; i <= 37; i++)
- interact_day_item_cut_free(i);
+ ui_day_item_cut_free(i);
todo_free_list();
notify_free_app();
}