changeset 3532:369d419c8a29

[gaim-migrate @ 3606] log viewer works on chats now. neat. Thanks javabsp. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 17 Sep 2002 16:44:00 +0000
parents 84d2cd1d0ec9
children 6c32036050cf
files src/conversation.c src/dialogs.c src/ui.h
diffstat 3 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Tue Sep 17 16:01:55 2002 +0000
+++ b/src/conversation.c	Tue Sep 17 16:44:00 2002 +0000
@@ -2281,10 +2281,16 @@
 		gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(wood), FALSE);
 	state_lock = 0;
 
-	viewer = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
-							NULL, _("Show Log Viewer"), _("Viewer"),
-              viewer_p, GTK_SIGNAL_FUNC(conv_show_log), GINT_TO_POINTER(c->name));
-
+	if (c->is_chat) {
+		viewer = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
+		            			NULL, _("Show Log Viewer"), _("Viewer"),
+						viewer_p, GTK_SIGNAL_FUNC(conv_show_log), GINT_TO_POINTER(c->name));
+	} else {
+		viewer = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
+						NULL, _("Show Log Viewer"), _("Viewer"),
+        					viewer_p, GTK_SIGNAL_FUNC(chat_show_log), GINT_TO_POINTER(c->name));
+	}
+	
 	save = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
 				       NULL, _("Save Conversation"),
 				       _("Save"), save_p, GTK_SIGNAL_FUNC(save_convo), c);
--- a/src/dialogs.c	Tue Sep 17 16:01:55 2002 +0000
+++ b/src/dialogs.c	Tue Sep 17 16:44:00 2002 +0000
@@ -4107,6 +4107,13 @@
 	g_free(name);
 }
 
+void chat_show_log(GtkWidget *w, gpointer data)
+{
+	char *name = g_strdup_printf("%s.chat", data);
+	show_log(name);
+	g_free(name);
+}
+
 void show_log(char *nm)
 {
 	gchar filename[256];
--- a/src/ui.h	Tue Sep 17 16:01:55 2002 +0000
+++ b/src/ui.h	Tue Sep 17 16:44:00 2002 +0000
@@ -430,6 +430,7 @@
 extern void show_export_dialog();
 extern void show_new_bp(char *, struct gaim_connection *, int, int, struct buddy_pounce *);
 extern void conv_show_log(GtkWidget *, gpointer);
+extern void chat_show_log(GtkWidget *, gpointer);
 extern void show_log(char *);
 extern void show_log_dialog(struct conversation *);
 extern void show_fgcolor_dialog(struct conversation *c, GtkWidget *color);