changeset 1950:a69396ce5bab

[gaim-migrate @ 1960] more gtk2 stuff. none of this is really necessary. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 02 Jun 2001 00:14:05 +0000
parents 3397860c22e9
children 44eeb8828198
files src/toc.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/toc.c	Fri Jun 01 23:56:52 2001 +0000
+++ b/src/toc.c	Sat Jun 02 00:14:05 2001 +0000
@@ -882,14 +882,16 @@
 {
 	char buf[BUF_LONG];
 	if (!name) {
+		const char *nm;
 		if (!join_chat_entry || !join_chat_spin)
 			return;
-		name = gtk_entry_get_text(GTK_ENTRY(join_chat_entry));
+		nm = gtk_entry_get_text(GTK_ENTRY(join_chat_entry));
 		exchange = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(join_chat_spin));
 		if (!name || !strlen(name))
 			return;
-	}
-	g_snprintf(buf, sizeof(buf) / 2, "toc_chat_join %d \"%s\"", exchange, name);
+		g_snprintf(buf, sizeof(buf) / 2, "toc_chat_join %d \"%s\"", exchange, nm);
+	} else
+		g_snprintf(buf, sizeof(buf) / 2, "toc_chat_join %d \"%s\"", exchange, name);
 	sflap_send(g, buf, -1, TYPE_DATA);
 }
 
@@ -1500,7 +1502,7 @@
 static void toc_send_file(gpointer a, struct file_transfer *old_ft)
 {
 	struct file_transfer *ft;
-	char *dirname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(old_ft->window));
+	const char *dirname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(old_ft->window));
 	int fd;
 	struct aim_user *user;
 	char buf[BUF_LEN * 2];
@@ -1707,7 +1709,7 @@
 static void toc_get_file(gpointer a, struct file_transfer *old_ft)
 {
 	struct file_transfer *ft;
-	char *dirname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(old_ft->window));
+	const char *dirname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(old_ft->window));
 	int fd;
 	struct aim_user *user;
 	char *buf, buf2[BUF_LEN * 2];