changeset 11698:a647f92e1d57

[gaim-migrate @ 13989] Change the pref "Enable system log" to "Log all status changes" and remove: * Log when buddies log in/log out * Log when buddies become idle/un-idle * Log when buddies go away/come back * Log your own signons/idleness/awayness If the status change log is enable, then the above 4 things will all be logged committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 20 Oct 2005 04:04:06 +0000
parents 186d2d293ef4
children 95cc6e1e9388
files src/connection.c src/gtkprefs.c src/log.c src/prefs.c src/status.c
diffstat 5 files changed, 16 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/src/connection.c	Thu Oct 20 03:48:22 2005 +0000
+++ b/src/connection.c	Thu Oct 20 04:04:06 2005 +0000
@@ -280,8 +280,8 @@
 		/* Set the time the account came online */
 		time(&gc->login_time);
 
-		if (gaim_prefs_get_bool("/core/logging/log_system") &&
-		   gaim_prefs_get_bool("/core/logging/log_own_states")){
+		if (gaim_prefs_get_bool("/core/logging/log_system"))
+		{
 			GaimLog *log = gaim_account_get_log(account);
 			char *msg = g_strdup_printf("+++ %s signed on",
 										gaim_account_get_username(account));
@@ -328,8 +328,8 @@
 	else if (gc->state == GAIM_DISCONNECTED) {
 		GaimAccount *account = gaim_connection_get_account(gc);
 
-		if(gaim_prefs_get_bool("/core/logging/log_system") &&
-		   gaim_prefs_get_bool("/core/logging/log_own_states")){
+		if (gaim_prefs_get_bool("/core/logging/log_system"))
+		{
 			GaimLog *log = gaim_account_get_log(account);
 			char *msg = g_strdup_printf("+++ %s signed off",
 										gaim_account_get_username(account));
--- a/src/gtkprefs.c	Thu Oct 20 03:48:22 2005 +0000
+++ b/src/gtkprefs.c	Thu Oct 20 04:04:06 2005 +0000
@@ -1386,15 +1386,11 @@
 	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, GAIM_HIG_CAT_SPACE);
 	gtk_container_set_border_width (GTK_CONTAINER (ret), GAIM_HIG_BORDER);
 
-	vbox = gaim_gtk_make_frame (ret, _("Message Logs"));
+	vbox = gaim_gtk_make_frame (ret, _("Logging"));
 	names = gaim_log_logger_get_options();
 
 	gaim_gtk_prefs_dropdown_from_list(vbox, _("Log _Format:"), GAIM_PREF_STRING,
@@ -1402,41 +1398,15 @@
 
 	g_list_free(names);
 
-	gaim_gtk_prefs_checkbox(_("_Log all instant messages"),
+	gaim_gtk_prefs_checkbox(_("Log all _instant messages"),
 				  "/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"));
-
-	sys_box = gaim_gtk_prefs_checkbox(_("_Enable system log"),
-									  "/core/logging/log_system", vbox);
-
-	box = gaim_gtk_prefs_checkbox(_("Log when buddies log in/log _out"),
-								  "/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(_("Log all _status changes"),
+				  "/core/logging/log_system", vbox);
 
 	gtk_widget_show_all(ret);
+
 	return ret;
 }
 
--- a/src/log.c	Thu Oct 20 03:48:22 2005 +0000
+++ b/src/log.c	Thu Oct 20 04:04:06 2005 +0000
@@ -491,10 +491,6 @@
 	gaim_prefs_add_bool("/core/logging/log_ims", FALSE);
 	gaim_prefs_add_bool("/core/logging/log_chats", FALSE);
 	gaim_prefs_add_bool("/core/logging/log_system", FALSE);
-	gaim_prefs_add_bool("/core/logging/log_signon_signoff", FALSE);
-	gaim_prefs_add_bool("/core/logging/log_idle_state", FALSE);
-	gaim_prefs_add_bool("/core/logging/log_away_state", FALSE);
-	gaim_prefs_add_bool("/core/logging/log_own_states", FALSE);
 
 	gaim_prefs_add_string("/core/logging/format", "txt");
 
--- a/src/prefs.c	Thu Oct 20 03:48:22 2005 +0000
+++ b/src/prefs.c	Thu Oct 20 04:04:06 2005 +0000
@@ -1061,6 +1061,10 @@
 	gaim_prefs_remove("/core/conversations/chat/show_leave");
 	gaim_prefs_remove("/core/conversations/combine_chat_im");
 	gaim_prefs_remove("/core/conversations/use_alias_for_title");
+	gaim_prefs_remove("/core/logging/log_signon_signoff");
+	gaim_prefs_remove("/core/logging/log_idle_state");
+	gaim_prefs_remove("/core/logging/log_away_state");
+	gaim_prefs_remove("/core/logging/log_own_states");
 }
 
 void *
--- a/src/status.c	Thu Oct 20 03:48:22 2005 +0000
+++ b/src/status.c	Thu Oct 20 04:04:06 2005 +0000
@@ -609,8 +609,7 @@
 {
 	GaimBlistUiOps *ops = gaim_blist_get_ui_ops();
 
-	if (gaim_prefs_get_bool("/core/logging/log_system") &&
-		gaim_prefs_get_bool("/core/logging/log_away_state"))
+	if (gaim_prefs_get_bool("/core/logging/log_system"))
 	{
 		time_t current_time = time(NULL);
 		const char *buddy_alias = gaim_buddy_get_alias(buddy);
@@ -1303,8 +1302,7 @@
 	{
 		gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle", buddy);
 
-		if (gaim_prefs_get_bool("/core/logging/log_system") &&
-				gaim_prefs_get_bool("/core/logging/log_idle_state"))
+		if (gaim_prefs_get_bool("/core/logging/log_system"))
 		{
 			GaimLog *log = gaim_account_get_log(buddy->account);
 			char *tmp = g_strdup_printf(_("%s became idle"),
@@ -1319,8 +1317,7 @@
 	{
 		gaim_signal_emit(gaim_blist_get_handle(), "buddy-unidle", buddy);
 
-		if (gaim_prefs_get_bool("/core/logging/log_system") &&
-				gaim_prefs_get_bool("/core/logging/log_idle_state"))
+		if (gaim_prefs_get_bool("/core/logging/log_system"))
 		{
 			GaimLog *log = gaim_account_get_log(buddy->account);
 			char *tmp = g_strdup_printf(_("%s became unidle"),