mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-16 02:53:03 +01:00
stderr redirect doesn't work as intended, add invalid command message when no sound
This commit is contained in:
parent
53663a7832
commit
3fc7c90630
@ -168,7 +168,9 @@ void execute(WINDOW *w, ToxWindow *self, Tox *m, const char *input, int mode)
|
||||
if (do_command(w, self, m, num_args, GLOBAL_NUM_COMMANDS, global_commands, args) == 0)
|
||||
return;
|
||||
|
||||
/* Just play sound instead */
|
||||
/*line_info_add(self, NULL, NULL, NULL, "Invalid command.", SYS_MSG, 0, 0);*/
|
||||
sound_notify(self, error, 0, NULL);
|
||||
#ifdef _SOUND_NOTIFY
|
||||
sound_notify(self, error, 0, NULL);
|
||||
#else
|
||||
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Invalid command.");
|
||||
#endif
|
||||
}
|
||||
|
@ -41,8 +41,6 @@
|
||||
#define PACKAGE_DATADIR "."
|
||||
#endif
|
||||
|
||||
#define NO_SOUND "silent"
|
||||
|
||||
const struct _ui_strings {
|
||||
const char* self;
|
||||
const char* timestamps;
|
||||
|
@ -23,6 +23,8 @@
|
||||
#ifndef _settings_h
|
||||
#define _settings_h
|
||||
|
||||
#define NO_SOUND "silent"
|
||||
|
||||
/* holds user setting values */
|
||||
struct user_settings {
|
||||
int autolog; /* boolean */
|
||||
|
@ -705,12 +705,6 @@ int main(int argc, char *argv[])
|
||||
useconds_t msleepval = 40000;
|
||||
uint64_t loopcount = 0;
|
||||
|
||||
|
||||
/* Redirect stdout to /dev/null
|
||||
* NOTE: Might not be best solution
|
||||
*/
|
||||
freopen("/dev/null", "w", stderr);
|
||||
|
||||
while (true) {
|
||||
update_unix_time();
|
||||
do_toxic(m, prompt);
|
||||
|
Loading…
Reference in New Issue
Block a user