Mercurial > pidgin
comparison src/gtkconv.c @ 10449:0349cb9aa5a4
[gaim-migrate @ 11714]
sf patch #1045370, from Nathan Fredrickson
Make the X on conversation tabs not get cut off with gtk 2.4.2 and newer
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 29 Dec 2004 23:42:54 +0000 |
parents | b6ca0e1b19d0 |
children | d23802800eeb |
comparison
equal
deleted
inserted
replaced
10448:6a20307ef8dc | 10449:0349cb9aa5a4 |
---|---|
4266 GtkWidget *tabby, *menu_tabby; | 4266 GtkWidget *tabby, *menu_tabby; |
4267 GtkWidget *close_image; | 4267 GtkWidget *close_image; |
4268 gboolean new_ui; | 4268 gboolean new_ui; |
4269 GaimConversationType conv_type; | 4269 GaimConversationType conv_type; |
4270 const char *name; | 4270 const char *name; |
4271 gint close_button_width, close_button_height, focus_width, focus_pad; | |
4271 | 4272 |
4272 name = gaim_conversation_get_name(conv); | 4273 name = gaim_conversation_get_name(conv); |
4273 conv_type = gaim_conversation_get_type(conv); | 4274 conv_type = gaim_conversation_get_type(conv); |
4274 gtkwin = GAIM_GTK_WINDOW(win); | 4275 gtkwin = GAIM_GTK_WINDOW(win); |
4275 | 4276 |
4362 gtkconv->tabby = tabby = gtk_hbox_new(FALSE, 6); | 4363 gtkconv->tabby = tabby = gtk_hbox_new(FALSE, 6); |
4363 gtkconv->menu_tabby = menu_tabby = gtk_hbox_new(FALSE, 6); | 4364 gtkconv->menu_tabby = menu_tabby = gtk_hbox_new(FALSE, 6); |
4364 | 4365 |
4365 /* Close button. */ | 4366 /* Close button. */ |
4366 gtkconv->close = gtk_button_new(); | 4367 gtkconv->close = gtk_button_new(); |
4367 gtk_widget_set_size_request(GTK_WIDGET(gtkconv->close), 16, 16); | 4368 gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &close_button_width, &close_button_height); |
4369 if (gtk_check_version(2, 4, 2) == NULL) | |
4370 { | |
4371 /* Need to account for extra padding around the gtkbutton */ | |
4372 gtk_widget_style_get(GTK_WIDGET(gtkconv->close), | |
4373 "focus-line-width", &focus_width, | |
4374 "focus-padding", &focus_pad, | |
4375 NULL); | |
4376 close_button_width += (focus_width + focus_pad) * 2; | |
4377 close_button_height += (focus_width + focus_pad) * 2; | |
4378 } | |
4379 gtk_widget_set_size_request(GTK_WIDGET(gtkconv->close), | |
4380 close_button_width, close_button_height); | |
4381 | |
4368 gtk_button_set_relief(GTK_BUTTON(gtkconv->close), GTK_RELIEF_NONE); | 4382 gtk_button_set_relief(GTK_BUTTON(gtkconv->close), GTK_RELIEF_NONE); |
4369 close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); | 4383 close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); |
4370 gtk_widget_show(close_image); | 4384 gtk_widget_show(close_image); |
4371 gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image); | 4385 gtk_container_add(GTK_CONTAINER(gtkconv->close), close_image); |
4372 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->close, | 4386 gtk_tooltips_set_tip(gtkconv->tooltips, gtkconv->close, |