[gtkada] Problem with Gtk_About_Dialog

Michael González Harbour mgh at unican.es
Mon Apr 14 10:38:54 CEST 2014


OK, thank you very much.

El 11/04/2014 17:22, Emmanuel Briot escribió:
>> I am using a Gtk_About_Dialog under version gtkada-3.4.2-gpl in Linux. When I click on the "License" button I get the following error message:
>>
>> (testgtk:3413): GLib-GObject-WARNING **: g_object_set_valist: object class 'GtkTextTag' has no property named 'font-scale'
>>
>> (testgtk:3413): Gtk-CRITICAL **: gtk_text_buffer_apply_tag: assertion 'tag->priv->table == buffer->priv->tag_table' failed
>>
>> The same happens in testgtk. Is this a known problem?
> Not a known problem, but I can indeed reproduce it with the current development version
> of testgtk.
>
> Looking at the gtk+ source, it seems this might have been fixed on Jul 8, 2013 with the
> following patch:
>
>
>
> commit 50c3eb9accf7665e51820f7f95870f6280777dde
> Author: Matthias Clasen <mclasen at redhat.com>
> Date:   Mon Jul 8 21:46:43 2013 -0400
>
>      Fix the small text for text in GtkAboutDialog
>
>      The conversion from gtk_widget_override_font to a GtkTextTag
>      in fbbb66ae7d19516b7a99de3d8b0a96164fb3ead2 was defective.
>
>      https://bugzilla.gnome.org/show_bug.cgi?id=701119
>
> diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
> index 514719c..992b868 100644
> --- a/gtk/gtkaboutdialog.c
> +++ b/gtk/gtkaboutdialog.c
> @@ -2036,12 +2036,6 @@ text_buffer_new (GtkAboutDialog  *about,
>
>     buffer = gtk_text_buffer_new (NULL);
>
> -  gtk_text_buffer_get_start_iter (buffer, &start_iter);
> -  gtk_text_buffer_get_start_iter (buffer, &end_iter);
> -  tag = gtk_text_tag_new (NULL);
> -  g_object_set (tag, "font-scale", PANGO_SCALE_SMALL, NULL);
> -  gtk_text_buffer_apply_tag (buffer, tag, &start_iter, &end_iter);
> -
>     for (p = strings; *p; p++)
>       {
>         q0  = *p;
> @@ -2128,6 +2122,14 @@ text_buffer_new (GtkAboutDialog  *about,
>           gtk_text_buffer_insert_at_cursor (buffer, "\n", 1);
>       }
>
> +  tag = gtk_text_buffer_create_tag (buffer, NULL,
> +                                    "scale", PANGO_SCALE_SMALL,
> +                                    NULL);
> +
> +  gtk_text_buffer_get_start_iter (buffer, &start_iter);
> +  gtk_text_buffer_get_end_iter (buffer, &end_iter);
> +  gtk_text_buffer_apply_tag (buffer, tag, &start_iter, &end_iter);
> +
>     return buffer;
>   }
>
>
> Emmanuel
> _______________________________________________
> gtkada mailing list
> gtkada at lists.adacore.com
> http://lists.adacore.com/mailman/listinfo/gtkada


-- 
-----------------------------------------------------------------------
Michael Gonzalez Harbour                  E-mail: mgh at unican.es
Grupo de Computadores y Tiempo Real       URL: http://www.ctr.unican.es
Facultad de Ciencias                      Phone : +34-942-201483
Universidad de Cantabria                  Fax   : +34-942-201402
Avda. de los Castros s/n
E-39005 Santander
SPAIN
-----------------------------------------------------------------------



More information about the gtkada mailing list