changeset 10377:a7a4db67040c

[gaim-migrate @ 11602] Removed "Show formatting toolbar," making the conversation menu affect the global pref. Use this and let me know if it makes sense or not. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 15 Dec 2004 02:17:59 +0000
parents 7196933335d9
children 28135f8c226d
files ChangeLog src/gtkconv.c src/gtkprefs.c
diffstat 3 files changed, 14 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Dec 15 01:56:10 2004 +0000
+++ b/ChangeLog	Wed Dec 15 02:17:59 2004 +0000
@@ -43,6 +43,8 @@
 	* Removed conversation buttons
 	* Removed "Raise conversation window" preferences, default to "no"
 	* Removed "Show alias in tabs/titles," default to "Yes".
+	* Removed "Show formatting toolbars," made the option in the
+	  conversation menu affect the global preference.
 
 version 1.0.2 (10/19/2004):
 	Bug Fixes:
--- a/src/gtkconv.c	Wed Dec 15 01:56:10 2004 +0000
+++ b/src/gtkconv.c	Wed Dec 15 02:17:59 2004 +0000
@@ -150,8 +150,7 @@
 {
 	GaimGtkConversation *gtkconv;
 	GaimConvWindow *win = gaim_conversation_get_window(conv);
-	gboolean saveheight;
-
+	
 	if (!GTK_WIDGET_VISIBLE(w))
 		return FALSE;
 
@@ -160,9 +159,6 @@
 
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
 
-	/* we only save the new height if the formatting toolbar visibility matches the pref */
-	saveheight = (gtkconv->show_formatting_toolbar == gaim_prefs_get_bool("/gaim/gtk/conversations/show_formatting_toolbar"));
-
 	/* I find that I resize the window when it has a bunch of conversations in it, mostly so that the tab bar
 	 * will fit, but then I don't want new windows taking up the entire screen.  I check to see if there is only one
 	 * conversation in the window.  This way we'll be setting new windows to the size of the last resized new window. */
@@ -172,8 +168,7 @@
 		if (w == gtkconv->imhtml && (gaim_conv_window_get_conversation_count(win) == 1))
 		{
 			gaim_prefs_set_int("/gaim/gtk/conversations/im/default_width", allocation->width);
-			if (saveheight)
-				gaim_prefs_set_int("/gaim/gtk/conversations/im/default_height", allocation->height);
+			gaim_prefs_set_int("/gaim/gtk/conversations/im/default_height", allocation->height);
 		}
 		if (w == gtkconv->entry)
 			gaim_prefs_set_int("/gaim/gtk/conversations/im/entry_height", allocation->height);
@@ -183,8 +178,7 @@
 		if (w == gtkconv->imhtml && (gaim_conv_window_get_conversation_count(win) == 1))
 		{
 			gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_width", allocation->width);
-			if (saveheight)
-				gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height);
+			gaim_prefs_set_int("/gaim/gtk/conversations/chat/default_height", allocation->height);
 		}
 		if (w == gtkconv->entry)
 			gaim_prefs_set_int("/gaim/gtk/conversations/chat/entry_height", allocation->height);
@@ -1200,13 +1194,8 @@
 
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
 
-	gtkconv->show_formatting_toolbar =
-		gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));
-
-	if (gtkconv->show_formatting_toolbar)
-		gtk_widget_show(gtkconv->toolbar);
-	else
-		gtk_widget_hide(gtkconv->toolbar);
+	gaim_prefs_set_bool("/gaim/gtk/conversations/show_formatting_toolbar",
+			    gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)));
 }
 
 static void
@@ -2855,7 +2844,7 @@
 
 	gtk_check_menu_item_set_active(
 			GTK_CHECK_MENU_ITEM(gtkwin->menu.show_formatting_toolbar),
-			gtkconv->show_formatting_toolbar);
+			gaim_prefs_get_bool("/gaim/gtk/conversations/show_formatting_toolbar"));
 
 	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtkwin->menu.show_timestamps),
 				       gtkconv->show_timestamps);
@@ -3539,7 +3528,7 @@
 	{ N_("/_Options"), NULL, NULL, 0, "<Branch>" },
 	{ N_("/Options/Enable _Logging"), NULL, menu_logging_cb, 0, "<CheckItem>" },
 	{ N_("/Options/Enable _Sounds"), NULL, menu_sounds_cb, 0, "<CheckItem>" },
-	{ N_("/Options/Show Formatting _Toolbar"), NULL, menu_toolbar_cb, 0, "<CheckItem>" },
+	{ N_("/Options/Show Formatting _Toolbars"), NULL, menu_toolbar_cb, 0, "<CheckItem>" },
 	{ N_("/Options/Show T_imestamps"), "F2", menu_timestamps_cb, 0, "<CheckItem>" },
 };
 
@@ -3647,7 +3636,7 @@
 									N_("/Options/Enable Sounds"));
 	gtkwin->menu.show_formatting_toolbar =
 		gtk_item_factory_get_widget(gtkwin->menu.item_factory,
-									N_("/Options/Show Formatting Toolbar"));
+									N_("/Options/Show Formatting Toolbars"));
 	gtkwin->menu.show_timestamps =
 		gtk_item_factory_get_widget(gtkwin->menu.item_factory,
 									N_("/Options/Show Timestamps"));
@@ -4361,10 +4350,7 @@
 
 		gtkconv->make_sound = TRUE;
 
-		gtkconv->show_formatting_toolbar = gaim_prefs_get_bool(
-				"/gaim/gtk/conversations/show_formatting_toolbar");
-
-		if (gtkconv->show_formatting_toolbar)
+		if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_formatting_toolbar"))
 			gtk_widget_show(gtkconv->toolbar);
 		else
 			gtk_widget_hide(gtkconv->toolbar);
@@ -5770,12 +5756,11 @@
 		win     = gaim_conversation_get_window(conv);
 		gtkwin  = GAIM_GTK_WINDOW(win);
 
-		gtkconv->show_formatting_toolbar = (gboolean)GPOINTER_TO_INT(value);
 		gtk_check_menu_item_set_active(
 				GTK_CHECK_MENU_ITEM(gtkwin->menu.show_formatting_toolbar),
-				gtkconv->show_formatting_toolbar);
-
-		if (gtkconv->show_formatting_toolbar)
+				(gboolean)GPOINTER_TO_INT(value));
+
+		if ((gboolean)GPOINTER_TO_INT(value))
 			gtk_widget_show(gtkconv->toolbar);
 		else
 			gtk_widget_hide(gtkconv->toolbar);
--- a/src/gtkprefs.c	Wed Dec 15 01:56:10 2004 +0000
+++ b/src/gtkprefs.c	Wed Dec 15 02:17:59 2004 +0000
@@ -889,8 +889,6 @@
 	gaim_gtk_prefs_checkbox(_("Send unknown \"_slash\" commands as messages"),
 	                        "/gaim/gtk/conversations/passthrough_unknown_commands", vbox);
 
-	gaim_gtk_prefs_checkbox(_("Show _formatting toolbar"),
-				  "/gaim/gtk/conversations/show_formatting_toolbar", vbox);
 	gaim_gtk_prefs_checkbox(_("Show buddy _icons"),
 			"/gaim/gtk/conversations/im/show_buddy_icons", vbox);
 	gaim_gtk_prefs_checkbox(_("Enable buddy ic_on animation"),