diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/ephy-notebook.c | 14 |
2 files changed, 16 insertions, 7 deletions
@@ -1,3 +1,12 @@ +2005-09-26 Christian Persch <chpe@cvs.gnome.org> + + * src/ephy-notebook.c: (tab_label_style_set_cb), + (build_tab_label): + + Use the tab label's outer hbox for the size calculation instead + of the label itself. Fixes size oscillations with the Tab States + extension. + 2005-09-26 Jean-François Rameau <jframeau@cvs.gnome.org> * src/ephy-lockdown.c: (update_window): diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index af2b43689..55e458b5a 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -1036,23 +1036,23 @@ close_button_clicked_cb (GtkWidget *widget, GtkWidget *tab) } static void -tab_label_style_set_cb (GtkWidget *label, +tab_label_style_set_cb (GtkWidget *hbox, GtkStyle *previous_style, - GtkWidget *hbox) + gpointer user_data) { PangoFontMetrics *metrics; PangoContext *context; int char_width, h, w; - context = gtk_widget_get_pango_context (label); + context = gtk_widget_get_pango_context (hbox); metrics = pango_context_get_metrics (context, - label->style->font_desc, + hbox->style->font_desc, pango_context_get_language (context)); char_width = pango_font_metrics_get_approximate_digit_width (metrics); pango_font_metrics_unref (metrics); - gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (label), + gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (hbox), GTK_ICON_SIZE_MENU, &w, &h); gtk_widget_set_size_request @@ -1114,8 +1114,8 @@ build_tab_label (EphyNotebook *nb, EphyTab *tab) gtk_box_pack_start (GTK_BOX (label_hbox), label, TRUE, TRUE, 0); /* Set minimal size */ - g_signal_connect (label, "style-set", - G_CALLBACK (tab_label_style_set_cb), hbox); + g_signal_connect (hbox, "style-set", + G_CALLBACK (tab_label_style_set_cb), NULL); gtk_widget_show (hbox); gtk_widget_show (label_ebox); |