changeset 8998:3738d1eac0ad

[gaim-migrate @ 9773] " This patch completes the removal of the Show joins/leaves in chats preferences It also (temporarily?) brings back the UI for the IM/Chat buttons preferences by changing #if 0 to #if 1 so they're still easy to identify to revist later on. The "Individual log file for each buddy's signons" pref became obsolete a while ago and was incorrectly #if'd out with a prefslash04 label. This patch completes it's death. With this patch applied the only prefslash thing that should block release is the custom font/color/size/etc stuff, I think we need to work out what to do there. There's a bit of whitespace cleanup too." --Stu Tomlinson committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 21 May 2004 14:26:31 +0000
parents 8bf2c6122bf1
children 8f838ae3e710
files ChangeLog src/conversation.c src/gaimrc.c src/gtkconv.c src/gtkprefs.c src/prefs.c
diffstat 6 files changed, 64 insertions(+), 81 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 21 12:07:26 2004 +0000
+++ b/ChangeLog	Fri May 21 14:26:31 2004 +0000
@@ -43,7 +43,7 @@
 	* Direct IM for AIM should be slightly less buggy, and may actually
 	  work now, if at least one side isn't behind a NAT or firewall.
 
-	Preference Changes:
+	Preference Changes(Stu Tomlinson):
 	* Added a "none" smiley theme to replace the "Show graphical
 	  smileys" option
 	* Removed "Show logins in window," default to yes
@@ -62,6 +62,8 @@
 	* Removed "Sounds when you log in", default to no
 	* Removed "Seconds before resending autoresponse", default to 600 seconds
 	* Removed "Send autoresponse in active conversations", default to no
+	* Removed "Show people joining in window", default to yes
+	* Removed "Show people leaving in window", default to yes
 	* Added "Conversation placement - By conversation count"
 
 version 0.77 (04/22/2004):
--- a/src/conversation.c	Fri May 21 12:07:26 2004 +0000
+++ b/src/conversation.c	Fri May 21 14:26:31 2004 +0000
@@ -1949,16 +1949,14 @@
 	if (ops != NULL && ops->chat_add_user != NULL)
 		ops->chat_add_user(conv, user);
 
-	if (gaim_prefs_get_bool("/core/conversations/chat/show_join")) {
-		if (extra_msg == NULL)
-			g_snprintf(tmp, sizeof(tmp), _("%s entered the room."), user);
-		else
-			g_snprintf(tmp, sizeof(tmp),
-					   _("%s [<I>%s</I>] entered the room."),
-					   user, extra_msg);
-
-		gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL));
-	}
+	if (extra_msg == NULL)
+		g_snprintf(tmp, sizeof(tmp), _("%s entered the room."), user);
+	else
+		g_snprintf(tmp, sizeof(tmp),
+				   _("%s [<I>%s</I>] entered the room."),
+				   user, extra_msg);
+
+	gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL));
 
 	gaim_signal_emit(gaim_conversations_get_handle(),
 					 "chat-buddy-joined", conv, user);
@@ -2089,15 +2087,13 @@
 
 	/* NOTE: Don't remove them from ignored in case they re-enter. */
 
-	if (gaim_prefs_get_bool("/core/conversations/chat/show_leave")) {
-		if (reason != NULL && *reason != '\0')
-			g_snprintf(tmp, sizeof(tmp),
-					   _("%s left the room (%s)."), user, reason);
-		else
-			g_snprintf(tmp, sizeof(tmp), _("%s left the room."), user);
-
-		gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL));
-	}
+	if (reason != NULL && *reason != '\0')
+		g_snprintf(tmp, sizeof(tmp),
+				   _("%s left the room (%s)."), user, reason);
+	else
+		g_snprintf(tmp, sizeof(tmp), _("%s left the room."), user);
+
+	gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL));
 
 	gaim_signal_emit(gaim_conversations_get_handle(), "chat-buddy-left",
 					 conv, user, reason);
@@ -2149,31 +2145,29 @@
 
 	/* NOTE: Don't remove them from ignored in case they re-enter. */
 
-	if (gaim_prefs_get_bool("/core/conversations/chat/show_leave")) {
-		if (reason != NULL && *reason != '\0') {
-			int i;
-			int size = g_list_length(users);
-			int max = MIN(10, size);
-			GList *l;
-
-			*tmp = '\0';
-
-			for (l = users, i = 0; i < max; i++, l = l->next) {
-				g_strlcat(tmp, (char *)l->data, sizeof(tmp));
-
-				if (i < max - 1)
-					g_strlcat(tmp, ", ", sizeof(tmp));
-			}
-
-			if (size > 10)
-				g_snprintf(tmp, sizeof(tmp),
-						   _("(+%d more)"), size - 10);
-
-			g_snprintf(tmp, sizeof(tmp), _(" left the room (%s)."), reason);
-
-			gaim_conversation_write(conv, NULL, tmp,
-									GAIM_MESSAGE_SYSTEM, time(NULL));
+	if (reason != NULL && *reason != '\0') {
+		int i;
+		int size = g_list_length(users);
+		int max = MIN(10, size);
+		GList *l;
+
+		*tmp = '\0';
+
+		for (l = users, i = 0; i < max; i++, l = l->next) {
+			g_strlcat(tmp, (char *)l->data, sizeof(tmp));
+
+			if (i < max - 1)
+				g_strlcat(tmp, ", ", sizeof(tmp));
 		}
+
+		if (size > 10)
+			g_snprintf(tmp, sizeof(tmp),
+					   _("(+%d more)"), size - 10);
+
+		g_snprintf(tmp, sizeof(tmp), _(" left the room (%s)."), reason);
+
+		gaim_conversation_write(conv, NULL, tmp,
+								GAIM_MESSAGE_SYSTEM, time(NULL));
 	}
 }
 
@@ -2644,8 +2638,6 @@
 
 	/* Conversations -> Chat */
 	gaim_prefs_add_none("/core/conversations/chat");
-	gaim_prefs_add_bool("/core/conversations/chat/show_join", TRUE);
-	gaim_prefs_add_bool("/core/conversations/chat/show_leave", TRUE);
 	gaim_prefs_add_bool("/core/conversations/chat/show_nick_change", TRUE);
 
 	/* Conversations -> IM */
--- a/src/gaimrc.c	Fri May 21 12:07:26 2004 +0000
+++ b/src/gaimrc.c	Fri May 21 14:26:31 2004 +0000
@@ -915,8 +915,6 @@
 						 ? GAIM_BUTTON_IMAGE : GAIM_BUTTON_TEXT_IMAGE)
 					 : ((display_options & OPT_DISP_NO_BUTTONS)
 						 ? GAIM_BUTTON_NONE : GAIM_BUTTON_TEXT)));
-			gaim_prefs_set_bool("/core/conversations/chat/show_join",
-					display_options & OPT_DISP_CHAT_LOGON);
 			gaim_prefs_set_int("/gaim/gtk/conversations/im/button_type",
 					((display_options & OPT_DISP_CONV_BUTTON_XPM)
 					 ? ((display_options & OPT_DISP_CONV_BUTTON_TEXT)
@@ -1049,8 +1047,6 @@
 						 ? GAIM_BUTTON_TEXT_IMAGE : GAIM_BUTTON_IMAGE)
 					 : ((chat_options & OPT_CHAT_BUTTON_TEXT)
 						 ? GAIM_BUTTON_TEXT : GAIM_BUTTON_NONE)));
-			gaim_prefs_set_bool("/core/conversations/chat/show_join",
-					chat_options & OPT_CHAT_LOGON);
 			gaim_prefs_set_bool("/gaim/gtk/conversations/chat/raise_on_events",
 					chat_options & OPT_CHAT_POPUP);
 			gaim_prefs_set_bool("/gaim/gtk/conversations/chat/color_nicks",
--- a/src/gtkconv.c	Fri May 21 12:07:26 2004 +0000
+++ b/src/gtkconv.c	Fri May 21 14:26:31 2004 +0000
@@ -5813,6 +5813,7 @@
 	gaim_prefs_add_bool("/gaim/gtk/conversations/smiley_shortcuts", FALSE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/show_formatting_toolbar", TRUE);
 	gaim_prefs_add_string("/gaim/gtk/conversations/placement", "last");
+	gaim_prefs_add_int("/gaim/gtk/conversations/placement_number", 1);
 	gaim_prefs_add_string("/gaim/gtk/conversations/bgcolor", "#FFFFFF");
 	gaim_prefs_add_string("/gaim/gtk/conversations/fgcolor", "#000000");
 	gaim_prefs_add_string("/gaim/gtk/conversations/font_face", "");
--- a/src/gtkprefs.c	Fri May 21 12:07:26 2004 +0000
+++ b/src/gtkprefs.c	Fri May 21 14:26:31 2004 +0000
@@ -990,7 +990,7 @@
 GtkWidget *im_page() {
 	GtkWidget *ret;
 	GtkWidget *vbox;
-#if 0 /* PREFSLASH04 */
+#if 1 /* PREFSLASH04 */
 	GtkWidget *widge;
 #endif /* PREFSLASH04 */
 	GtkSizeGroup *sg;
@@ -1001,7 +1001,7 @@
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
 
 	vbox = gaim_gtk_make_frame (ret, _("Window"));
-#if 0 /* PREFSLASH04 */
+#if 1 /* PREFSLASH04 */
 	widge = gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT,
 			"/gaim/gtk/conversations/im/button_type",
 			_("Pictures"), GAIM_BUTTON_IMAGE,
@@ -1033,7 +1033,7 @@
 GtkWidget *chat_page() {
 	GtkWidget *ret;
 	GtkWidget *vbox;
-#if 0 /* PREFSLASH04 */
+#if 1 /* PREFSLASH04 */
 	GtkWidget *dd;
 #endif /* PREFSLASH04 */
 	GtkSizeGroup *sg;
@@ -1043,7 +1043,7 @@
 
 	sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 	vbox = gaim_gtk_make_frame (ret, _("Window"));
-#if 0 /* PREFSLASH04 */
+#if 1 /* PREFSLASH04 */
 	dd = gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT,
 			"/gaim/gtk/conversations/chat/button_type",
 			_("Pictures"), GAIM_BUTTON_IMAGE,
@@ -1058,12 +1058,6 @@
 	gaim_gtk_prefs_checkbox(_("_Raise window on events"),
 			"/gaim/gtk/conversations/chat/raise_on_events", vbox);
 	vbox = gaim_gtk_make_frame (ret, _("Display"));
-#if 0 /* PREFSLASH04 */
-	  gaim_gtk_prefs_checkbox(_("_Show people joining in window"),
-			"/core/conversations/chat/show_join", vbox);
-	gaim_gtk_prefs_checkbox(_("_Show people leaving in window"),
-			"/core/conversations/chat/show_leave", vbox);
-#endif /* PREFSLASH04 */
 	gaim_gtk_prefs_checkbox(_("Co_lorize screen names"),
 			"/gaim/gtk/conversations/chat/color_nicks", vbox);
 
@@ -1479,11 +1473,6 @@
 					 G_CALLBACK(gaim_gtk_toggle_sensitive), box);
 	gtk_widget_set_sensitive(box, syslog_enabled);
 
-#if 0 /* PREFSLASH04 */
-	gaim_gtk_prefs_checkbox(_("I_ndividual log file for each buddy's signons"),
-				   "/gaim/gtk/logging/individual_logs", vbox);
-#endif /* PREFSLASH04 */
-
 	gtk_widget_show_all(ret);
 	return ret;
 }
@@ -1670,10 +1659,10 @@
 static GtkWidget *
 protocol_page() {
 	GtkWidget *ret;
-	
+
 	ret = gtk_label_new(NULL);
 	gtk_widget_show(ret);
-	
+
 	return ret;
 }
 
@@ -1690,7 +1679,7 @@
 		return;
 	gtk_tree_model_get_value (model, &iter, 3, &val);
 	plug = g_value_get_pointer(&val);
-	
+
 	pname = g_markup_escape_text(_(plug->info->name), -1);
 	pdesc = g_markup_escape_text(_(plug->info->description), -1);
 	pauth = g_markup_escape_text(_(plug->info->author), -1);
@@ -1794,7 +1783,7 @@
 		}
 
 		if(GAIM_PLUGIN_HAS_PREF_FRAME(plug)) {
-			GtkTreeIter iter;			
+			GtkTreeIter iter;
 			GtkWidget *pref_frame;
 			GaimPluginUiInfo *prefs_info;
 
@@ -1964,27 +1953,27 @@
 							"text", 1,
 							NULL);
 	gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col);
-	
+
 	rendt = gtk_cell_renderer_text_new();
 	col = gtk_tree_view_column_new_with_attributes(_("Summary"),
 							rendt,
 							"text", 2,
 							NULL);
 	gtk_tree_view_append_column(GTK_TREE_VIEW(event_view), col);
-	
+
 	g_object_unref(G_OBJECT(ls));
 	gtk_container_add(GTK_CONTAINER(sw), event_view);
-	
+
 
 	nb = gtk_notebook_new();
 	gtk_notebook_set_tab_pos (GTK_NOTEBOOK(nb), GTK_POS_BOTTOM);
 	gtk_notebook_popup_disable(GTK_NOTEBOOK(nb));
-	
+
 	/* Description */
 	sw = gtk_scrolled_window_new(NULL, NULL);
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 	plugin_description = gtk_label_new(NULL);
-	
+
 	vp = gtk_viewport_new(NULL, NULL);
 	gtk_viewport_set_shadow_type(GTK_VIEWPORT(vp), GTK_SHADOW_NONE);
 	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_NONE);
@@ -1992,7 +1981,7 @@
 	gtk_container_add(GTK_CONTAINER(vp), plugin_description);
 	gtk_container_add(GTK_CONTAINER(sw), vp);
 
-	gtk_label_set_selectable(GTK_LABEL(plugin_description), TRUE);  
+	gtk_label_set_selectable(GTK_LABEL(plugin_description), TRUE);
 	gtk_label_set_line_wrap(GTK_LABEL(plugin_description), TRUE);
 	gtk_misc_set_alignment(GTK_MISC(plugin_description), 0, 0);
 	gtk_misc_set_padding(GTK_MISC(plugin_description), 6, 6);
@@ -2002,7 +1991,7 @@
 	sw = gtk_scrolled_window_new(NULL, NULL);
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 	plugin_details = gtk_label_new(NULL);
-	
+
 	vp = gtk_viewport_new(NULL, NULL);
 	gtk_viewport_set_shadow_type(GTK_VIEWPORT(vp), GTK_SHADOW_NONE);
 	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_NONE);
@@ -2010,16 +1999,16 @@
 	gtk_container_add(GTK_CONTAINER(vp), plugin_details);
 	gtk_container_add(GTK_CONTAINER(sw), vp);
 
-	gtk_label_set_selectable(GTK_LABEL(plugin_details), TRUE);  
+	gtk_label_set_selectable(GTK_LABEL(plugin_details), TRUE);
 	gtk_label_set_line_wrap(GTK_LABEL(plugin_details), TRUE);
 	gtk_misc_set_alignment(GTK_MISC(plugin_details), 0, 0);
-	gtk_misc_set_padding(GTK_MISC(plugin_details), 6, 6);	
+	gtk_misc_set_padding(GTK_MISC(plugin_details), 6, 6);
 	gtk_notebook_append_page(GTK_NOTEBOOK(nb), sw, gtk_label_new(_("Details")));
 	gtk_box_pack_start(GTK_BOX(ret), nb, TRUE, TRUE, 0);
 
 	g_signal_connect (G_OBJECT (sel), "changed",
 			  G_CALLBACK (prefs_plugin_sel),
-			  NULL); 
+			  NULL);
 	g_signal_connect (G_OBJECT(rend), "toggled",
 			  G_CALLBACK(plugin_load), ls);
 
@@ -2574,7 +2563,7 @@
 								   GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
 	gtk_container_add(GTK_CONTAINER(frame), scrolled_window);
 	gtk_widget_show(scrolled_window);
-								
+
 	/* The tree -- much inspired by the Gimp */
 	prefstree = gtk_tree_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT);
 	tree_v = gtk_tree_view_new_with_model (GTK_TREE_MODEL (prefstree));
@@ -2915,7 +2904,7 @@
 	gaim_prefs_rename("/gaim/gtk/logging/log_ims", "/core/logging/log_ims");
 	gaim_prefs_rename("/gaim/gtk/logging/log_chats", "/core/logging/log_chats");
 	gaim_prefs_rename("/core/conversations/placement",
-					  "/gaim/gtk/conversations/placement");  
+					  "/gaim/gtk/conversations/placement");
 
 	/* Remove some no-longer-used prefs */
 	gaim_prefs_remove("/gaim/gtk/blist/show_group_count");
@@ -2929,4 +2918,5 @@
 	gaim_prefs_remove("/gaim/gtk/conversations/chat/old_tab_complete");
 	gaim_prefs_remove("/gaim/gtk/sound/signon");
 	gaim_prefs_remove("/gaim/gtk/sound/silent_signon");
+	gaim_prefs_remove("/gaim/gtk/logging/individual_logs");
 }
--- a/src/prefs.c	Fri May 21 12:07:26 2004 +0000
+++ b/src/prefs.c	Fri May 21 14:26:31 2004 +0000
@@ -987,4 +987,6 @@
 	gaim_prefs_remove("/core/conversations/away_back_on_send");
 	gaim_prefs_remove("/core/conversations/send_urls_as_links");
 	gaim_prefs_remove("/core/conversations/im/show_login");
+	gaim_prefs_remove("/core/conversations/chat/show_join");
+	gaim_prefs_remove("/core/conversations/chat/show_leave");
 }