Mercurial > pidgin.yaz
changeset 13788:ef95bcc62330
[gaim-migrate @ 16200]
Reverting the tab close button code from Epiphany. It clearly isn't working properly either, though I thought it was before. Perhaps the Ubuntu folks changed the icon again? Anyway, clearly this code isn't any better, so, out it goes.
It's sounding like the Ubuntu folks might revert the change and then figure out how to fix these things for real for the next release.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 29 May 2006 17:11:53 +0000 |
parents | a679f7700ff0 |
children | 99688ab310c8 |
files | src/gtkconv.c |
diffstat | 1 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconv.c Sat May 27 06:38:06 2006 +0000 +++ b/src/gtkconv.c Mon May 29 17:11:53 2006 +0000 @@ -7533,7 +7533,7 @@ GtkWidget *close_image; GaimConversationType conv_type; const gchar *tmp_lab; - GtkRcStyle *rcstyle; + gint close_button_width, close_button_height, focus_width, focus_pad; gboolean tabs_side = FALSE; gint angle = 0; @@ -7559,15 +7559,20 @@ /* Close button. */ gtkconv->close = gtk_button_new(); - - gtk_button_set_focus_on_click(GTK_BUTTON(gtkconv->close), FALSE); + gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &close_button_width, &close_button_height); + if (gtk_check_version(2, 4, 2) == NULL) { + /* Need to account for extra padding around the gtkbutton */ + gtk_widget_style_get(GTK_WIDGET(gtkconv->close), + "focus-line-width", &focus_width, + "focus-padding", &focus_pad, + NULL); + close_button_width += (focus_width + focus_pad) * 2; + close_button_height += (focus_width + focus_pad) * 2; + } + gtk_widget_set_size_request(GTK_WIDGET(gtkconv->close), + close_button_width, close_button_height); + gtk_button_set_relief(GTK_BUTTON(gtkconv->close), GTK_RELIEF_NONE); - - rcstyle = gtk_rc_style_new (); - rcstyle->xthickness = rcstyle->ythickness = 0; - gtk_widget_modify_style(gtkconv->close, rcstyle); - gtk_rc_style_unref(rcstyle); - close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); gtk_widget_show(close_image); gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image);