1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 01:53:02 +01:00

small fixes

This commit is contained in:
Jfreegman 2013-11-17 15:45:26 -05:00
parent 677f57699f
commit cf0840b80d
3 changed files with 4 additions and 5 deletions

View File

@ -182,7 +182,6 @@ static void delete_friend(Tox *m, ToxWindow *self, int f_num, wint_t key)
sort_friendlist_index(); sort_friendlist_index();
store_data(m, DATA_FILE); store_data(m, DATA_FILE);
select_friend(m, KEY_DOWN);
} }
static void friendlist_onKey(ToxWindow *self, Tox *m, wint_t key) static void friendlist_onKey(ToxWindow *self, Tox *m, wint_t key)

View File

@ -57,7 +57,7 @@ int init_groupchat_win(ToxWindow *prompt, Tox *m, int groupnum)
static void close_groupchatwin(Tox *m, int groupnum) static void close_groupchatwin(Tox *m, int groupnum)
{ {
tox_del_groupchat(m, groupnum); tox_del_groupchat(m, groupnum);
memset(&(groupchats[groupnum]), 0, sizeof(GroupChat)); memset(&groupchats[groupnum], 0, sizeof(GroupChat));
int i; int i;

View File

@ -348,7 +348,7 @@ static void load_data(Tox *m, char *path)
} }
} }
static void close_file_sender(Tox *m, int i) static void close_file_sender(int i)
{ {
fclose(file_senders[i].file); fclose(file_senders[i].file);
memset(&file_senders[i], 0, sizeof(FileSender)); memset(&file_senders[i], 0, sizeof(FileSender));
@ -385,7 +385,7 @@ static void do_file_senders(Tox *m)
wprintw(file_senders[i].chatwin, "File transfer for '%s' timed out.\n", wprintw(file_senders[i].chatwin, "File transfer for '%s' timed out.\n",
pathname); pathname);
tox_file_sendcontrol(m, friendnum, 0, filenum, TOX_FILECONTROL_KILL, 0, 0); tox_file_sendcontrol(m, friendnum, 0, filenum, TOX_FILECONTROL_KILL, 0, 0);
close_file_sender(m, i); close_file_sender(i);
} }
break; break;
@ -398,7 +398,7 @@ static void do_file_senders(Tox *m)
if (file_senders[i].piecelen == 0) { if (file_senders[i].piecelen == 0) {
wprintw(file_senders[i].chatwin, "File '%s' successfuly sent.\n", pathname); wprintw(file_senders[i].chatwin, "File '%s' successfuly sent.\n", pathname);
tox_file_sendcontrol(m, friendnum, 0, filenum, TOX_FILECONTROL_FINISHED, 0, 0); tox_file_sendcontrol(m, friendnum, 0, filenum, TOX_FILECONTROL_FINISHED, 0, 0);
close_file_sender(m, i); close_file_sender(i);
break; break;
} }
} }