changeset 7446:064c697cc223

[gaim-migrate @ 8057] The border on the close buttons on inactive tabs are no longer shown, thanks to a fix used by Galeon. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 06 Nov 2003 08:15:11 +0000
parents 6ea4a49b4b51
children 0e7a835e2433
files ChangeLog src/gtkconv.c
diffstat 2 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Nov 06 07:07:22 2003 +0000
+++ b/ChangeLog	Thu Nov 06 08:15:11 2003 +0000
@@ -6,6 +6,8 @@
 		* compatable with old logs
 		* hopefully fixes segfault in viewing logs
 	* Fix several Jabber bugs
+	* The border on the close buttons on inactive tabs are no longer shown,
+	  thanks to a fix used by Galeon.
 	* German translation updated (Bjoern Voigt)
 
 version 0.72 (10/31/2003):
--- a/src/gtkconv.c	Thu Nov 06 07:07:22 2003 +0000
+++ b/src/gtkconv.c	Thu Nov 06 08:15:11 2003 +0000
@@ -279,6 +279,14 @@
 	return TRUE;
 }
 
+/* Courtesy of Galeon! */
+static void
+tab_close_button_state_changed_cb(GtkWidget *widget, GtkStateType prev_state)
+{
+	if (GTK_WIDGET_STATE(widget) == GTK_STATE_ACTIVE)
+		gtk_widget_set_state(widget, GTK_STATE_NORMAL);
+}
+
 static void
 cancel_insert_image_cb(GtkWidget *unused, GaimGtkConversation *gtkconv)
 {
@@ -4140,16 +4148,23 @@
 	/* Close button. */
 	gtkconv->close = gtk_button_new();
 	gtk_widget_set_size_request(GTK_WIDGET(gtkconv->close), 16, 16);
+	gtk_button_set_relief(GTK_BUTTON(gtkconv->close), GTK_RELIEF_NONE);
 	gtk_container_add(GTK_CONTAINER(gtkconv->close),
 			  gtk_image_new_from_stock(GTK_STOCK_CLOSE,
 			  GTK_ICON_SIZE_MENU));
-	gtk_button_set_relief(GTK_BUTTON(gtkconv->close), GTK_RELIEF_NONE);
 	gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->close,
 						 _("Close conversation"), NULL);
 
 	g_signal_connect(G_OBJECT(gtkconv->close), "clicked",
 					 G_CALLBACK(close_conv_cb), conv);
 
+	/*
+	 * I love Galeon. They have a fix for that stupid annoying visible
+	 * border bug. I love you guys! -- ChipX86
+	 */
+	g_signal_connect(G_OBJECT(gtkconv->close), "state_changed",
+					 G_CALLBACK(tab_close_button_state_changed_cb), NULL);
+
 	/* Status icon. */
 	gtkconv->icon = gtk_image_new();
 	gtkconv->menu_icon = gtk_image_new();