After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643370 - gtk_style_context_get_font return NULL
gtk_style_context_get_font return NULL
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
3.0.x
Other All
: Normal normal
: ---
Assigned To: Carlos Garnacho
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-02-26 16:48 UTC by czk
Modified: 2011-03-04 00:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description czk 2011-02-26 16:48:42 UTC
gtk+'s configure.ac  m4_define([pango_required_version], [1.20])

when using pango less than 1.22.4. the following programs print a warning message:
----------------------------
#include <gtk/gtk.h>

int main(int argc, char *argv[])
{
  GtkWidget *window;
  GtkWidget *entry;

  gtk_init (&argc, &argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  
  entry = gtk_entry_new ();

  gtk_container_add (GTK_CONTAINER(window), entry);

  gtk_widget_show_all (window);

  gtk_main ();

  return 0;
}
---------------------------
I read gtk+ source code, just find gtk_entry_get_preferred_width call gtk_style_context_get_font. But gtk_style_context_get_font return NULL.
And pango less then 1.22.4, pango_context_get_metrics not allow desc is NULL.

fix gtk_style_context_get_font or fix gtk+'s configure.ac?
Comment 1 Matthias Clasen 2011-03-04 00:25:15 UTC
I've bumped the pango dep