Shortcuts: Add copy-paste shortcuts
This commit is contained in:
parent
15f8c9534f
commit
2fbe8958d9
|
@ -47,6 +47,7 @@ The following is a list of things that have been/still have to be completed.
|
||||||
- Alerting function for errors and issues
|
- Alerting function for errors and issues
|
||||||
- Logging / Debug flag
|
- Logging / Debug flag
|
||||||
- Read input from stdin
|
- Read input from stdin
|
||||||
|
- ~~Shortcut: ability to clone an event into another day~~
|
||||||
|
|
||||||
# Contributions
|
# Contributions
|
||||||
|
|
||||||
|
|
|
@ -167,6 +167,15 @@ bool Engine::input_handle_universal(WINDOW *win, char key) {
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
|
case 'y':
|
||||||
|
this->clipboard_day = this->calendar->get_info();
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
if (this->events_map.find(this->clipboard_day) == this->events_map.end())
|
||||||
|
break;
|
||||||
|
|
||||||
|
this->events_map[this->calendar->get_info()] = this->events_map[this->clipboard_day];
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -45,14 +45,15 @@ class Engine {
|
||||||
bool write_calendar();
|
bool write_calendar();
|
||||||
|
|
||||||
Calendar *calendar;
|
Calendar *calendar;
|
||||||
// std::unordered_map<calendar_information, std::string> events_map;
|
|
||||||
std::map<calendar_information, std::string> events_map;
|
std::map<calendar_information, std::string> events_map;
|
||||||
int active_cell;
|
int active_cell;
|
||||||
|
|
||||||
int padding; // padding
|
int padding; // GUI padding
|
||||||
private:
|
private:
|
||||||
std::fstream calendar_file;
|
std::fstream calendar_file;
|
||||||
char * calendar_file_location;
|
char *calendar_file_location;
|
||||||
|
calendar_information clipboard_day;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user