diff src/gtkprefs.c @ 8573:7dcd6f26e4a7

[gaim-migrate @ 9321] " This patch reimplements the system log. It writes system log to ~/.gaim/logs/<protocol>/<username>/.system/<timestamp>.(txt|html), where <timestamp> is the time that the account <username> with <protocol> signs on. Nathan (faceprint) and LSchiere suggested this logging scheme. No code is currently written to read the old system logs. Note that if you change the logging format, you need to re-login the accounts for the change to take effect." --Ka-Hing (javabsp) Cheung who continues: "Now this one applies, also contains a rider patch that, if you enable sound for "Someone says your name in chat", it will not play a sound if the message is a system message, like if jabber chat tells you that "*** becomes available" and *** is you, it won't play a sound." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 03 Apr 2004 18:34:29 +0000
parents 8a1421dcef60
children 599d6ac9bbfe
line wrap: on
line diff
--- a/src/gtkprefs.c	Sat Apr 03 18:01:58 2004 +0000
+++ b/src/gtkprefs.c	Sat Apr 03 18:34:29 2004 +0000
@@ -1433,6 +1433,10 @@
 	GtkWidget *ret;
 	GtkWidget *vbox;
 	GList *names;
+	GtkWidget *sys_box;
+	GtkWidget *box;
+	int syslog_enabled = gaim_prefs_get_bool("/core/logging/log_system");
+
 	ret = gtk_vbox_new(FALSE, 18);
 	gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
 
@@ -1446,19 +1450,41 @@
 				  "/core/logging/log_ims", vbox);
 	gaim_gtk_prefs_checkbox(_("Log all c_hats"),
 				  "/core/logging/log_chats", vbox);
-/*
+
 	vbox = gaim_gtk_make_frame (ret, _("System Logs"));
-	gaim_gtk_prefs_checkbox(_("Log when buddies _sign on/sign off"),
-				   "/gaim/gtk/logging/log_signon_signoff", vbox);
-	gaim_gtk_prefs_checkbox(_("Log when buddies become _idle/un-idle"),
-				   "/gaim/gtk/logging/log_idle_state", vbox);
-	gaim_gtk_prefs_checkbox(_("Log when buddies go away/come _back"),
-				   "/gaim/gtk/logging/log_away_state", vbox);
-	gaim_gtk_prefs_checkbox(_("Log your _own signons/idleness/awayness"),
-				   "/gaim/gtk/logging/log_own_states", vbox);
+
+	sys_box = gaim_gtk_prefs_checkbox(_("_Enable system log"),
+									  "/core/logging/log_system", vbox);
+
+	box = gaim_gtk_prefs_checkbox(_("Log when buddies _sign on/sign off"),
+								  "/core/logging/log_signon_signoff", vbox);
+	g_signal_connect(G_OBJECT(sys_box), "clicked",
+					 G_CALLBACK(gaim_gtk_toggle_sensitive), box);
+	gtk_widget_set_sensitive(box, syslog_enabled);
+
+	box = gaim_gtk_prefs_checkbox(_("Log when buddies become _idle/un-idle"),
+								  "/core/logging/log_idle_state", vbox);
+	g_signal_connect(G_OBJECT(sys_box), "clicked",
+					 G_CALLBACK(gaim_gtk_toggle_sensitive), box);
+	gtk_widget_set_sensitive(box, syslog_enabled);
+
+	box = gaim_gtk_prefs_checkbox(_("Log when buddies go away/come _back"),
+								  "/core/logging/log_away_state", vbox);
+	g_signal_connect(G_OBJECT(sys_box), "clicked",
+					 G_CALLBACK(gaim_gtk_toggle_sensitive), box);
+	gtk_widget_set_sensitive(box, syslog_enabled);
+
+	box = gaim_gtk_prefs_checkbox(_("Log your _own signons/idleness/awayness"),
+								  "/core/logging/log_own_states", vbox);
+	g_signal_connect(G_OBJECT(sys_box), "clicked",
+					 G_CALLBACK(gaim_gtk_toggle_sensitive), box);
+	gtk_widget_set_sensitive(box, syslog_enabled);
+
+/*
 	gaim_gtk_prefs_checkbox(_("I_ndividual log file for each buddy's signons"),
 				   "/gaim/gtk/logging/individual_logs", vbox);
 */
+
 	gtk_widget_show_all(ret);
 	return ret;
 }