| 880 |
880 |
| 881 static void toc_join_chat(struct gaim_connection *g, int exchange, char *name) |
881 static void toc_join_chat(struct gaim_connection *g, int exchange, char *name) |
| 882 { |
882 { |
| 883 char buf[BUF_LONG]; |
883 char buf[BUF_LONG]; |
| 884 if (!name) { |
884 if (!name) { |
| |
885 const char *nm; |
| 885 if (!join_chat_entry || !join_chat_spin) |
886 if (!join_chat_entry || !join_chat_spin) |
| 886 return; |
887 return; |
| 887 name = gtk_entry_get_text(GTK_ENTRY(join_chat_entry)); |
888 nm = gtk_entry_get_text(GTK_ENTRY(join_chat_entry)); |
| 888 exchange = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(join_chat_spin)); |
889 exchange = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(join_chat_spin)); |
| 889 if (!name || !strlen(name)) |
890 if (!name || !strlen(name)) |
| 890 return; |
891 return; |
| 891 } |
892 g_snprintf(buf, sizeof(buf) / 2, "toc_chat_join %d \"%s\"", exchange, nm); |
| 892 g_snprintf(buf, sizeof(buf) / 2, "toc_chat_join %d \"%s\"", exchange, name); |
893 } else |
| |
894 g_snprintf(buf, sizeof(buf) / 2, "toc_chat_join %d \"%s\"", exchange, name); |
| 893 sflap_send(g, buf, -1, TYPE_DATA); |
895 sflap_send(g, buf, -1, TYPE_DATA); |
| 894 } |
896 } |
| 895 |
897 |
| 896 static void toc_chat_invite(struct gaim_connection *g, int id, char *message, char *name) |
898 static void toc_chat_invite(struct gaim_connection *g, int id, char *message, char *name) |
| 897 { |
899 { |
| 1498 } |
1500 } |
| 1499 |
1501 |
| 1500 static void toc_send_file(gpointer a, struct file_transfer *old_ft) |
1502 static void toc_send_file(gpointer a, struct file_transfer *old_ft) |
| 1501 { |
1503 { |
| 1502 struct file_transfer *ft; |
1504 struct file_transfer *ft; |
| 1503 char *dirname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(old_ft->window)); |
1505 const char *dirname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(old_ft->window)); |
| 1504 int fd; |
1506 int fd; |
| 1505 struct aim_user *user; |
1507 struct aim_user *user; |
| 1506 char buf[BUF_LEN * 2]; |
1508 char buf[BUF_LEN * 2]; |
| 1507 |
1509 |
| 1508 if (file_is_dir(dirname, old_ft->window)) |
1510 if (file_is_dir(dirname, old_ft->window)) |
| 1705 } |
1707 } |
| 1706 |
1708 |
| 1707 static void toc_get_file(gpointer a, struct file_transfer *old_ft) |
1709 static void toc_get_file(gpointer a, struct file_transfer *old_ft) |
| 1708 { |
1710 { |
| 1709 struct file_transfer *ft; |
1711 struct file_transfer *ft; |
| 1710 char *dirname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(old_ft->window)); |
1712 const char *dirname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(old_ft->window)); |
| 1711 int fd; |
1713 int fd; |
| 1712 struct aim_user *user; |
1714 struct aim_user *user; |
| 1713 char *buf, buf2[BUF_LEN * 2]; |
1715 char *buf, buf2[BUF_LEN * 2]; |
| 1714 |
1716 |
| 1715 if (file_is_dir(dirname, old_ft->window)) |
1717 if (file_is_dir(dirname, old_ft->window)) |