diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-06-20 19:29:16 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-06-20 19:29:16 +0000 |
commit | 4b47bcb3a98a8478407ff9d1c642ab7983c386e9 (patch) | |
tree | 015918f5862a36788bbaa979d29a2c8c08b0cd36 /gtk/gtktext.c | |
parent | 49be7176d9ac55b2babed0cfacda36a803e06cda (diff) | |
download | gdk-pixbuf-4b47bcb3a98a8478407ff9d1c642ab7983c386e9.tar.gz |
Get rid of gtk_style_get_font_for_display(), make gtk_style_get_font()
Thu Jun 20 15:17:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.[ch]: Get rid of gtk_style_get_font_for_display(),
make gtk_style_get_font() warn for multihead if called
on an unattached style.
* gtk/gtktext.c: Remove use of gtk_style_get_font_for_display();
this makes gtktext not multihead safe, but it doesn't matter;
it's ENABLE_BROKEN anyways.
* gtk/gtkmain.c gtk/gtkdebug.h: Add GTK_NOTE(MULTIHEAD,[])
Diffstat (limited to 'gtk/gtktext.c')
-rw-r--r-- | gtk/gtktext.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gtk/gtktext.c b/gtk/gtktext.c index b9eff7539..4d17b791d 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -73,8 +73,7 @@ #define MARK_CURRENT_FONT(text, mark) \ ((MARK_CURRENT_PROPERTY(mark)->flags & PROPERTY_FONT) ? \ MARK_CURRENT_PROPERTY(mark)->font->gdk_font : \ - gtk_style_get_font_for_display (gtk_widget_get_display (GTK_WIDGET (text)), \ - GTK_WIDGET (text)->style)) + gtk_style_get_font (GTK_WIDGET (text)->style)) #define MARK_CURRENT_FORE(text, mark) \ ((MARK_CURRENT_PROPERTY(mark)->flags & PROPERTY_FOREGROUND) ? \ &MARK_CURRENT_PROPERTY(mark)->fore_color : \ @@ -1000,7 +999,7 @@ gtk_text_insert (GtkText *text, gtk_widget_ensure_style (widget); if ((widget->style) && - (gtk_style_get_font_for_display (gtk_widget_get_display (widget), widget->style)->type == GDK_FONT_FONTSET)) + (gtk_style_get_font (widget->style)->type == GDK_FONT_FONTSET)) { text->use_wchar = TRUE; g_free (text->text.ch); @@ -1410,7 +1409,7 @@ gtk_text_style_set (GtkWidget *widget, if (text->current_font) text_font_unref (text->current_font); - text->current_font = get_text_font (gtk_style_get_font_for_display (gtk_widget_get_display (widget), widget->style)); + text->current_font = get_text_font (gtk_style_get_font (widget->style)); } static void @@ -1574,8 +1573,7 @@ gtk_text_size_request (GtkWidget *widget, xthickness = widget->style->xthickness + TEXT_BORDER_ROOM; ythickness = widget->style->ythickness + TEXT_BORDER_ROOM; - font = gtk_style_get_font_for_display (gtk_widget_get_display (widget), - widget->style); + font = gtk_style_get_font (widget->style); char_height = MIN_TEXT_HEIGHT_LINES * (font->ascent + font->descent); |