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 569635 - fontchooser should reload list of families/styles on theme change
fontchooser should reload list of families/styles on theme change
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-01-29 08:24 UTC by Behdad Esfahbod
Modified: 2009-02-01 05:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (40.41 KB, patch)
2009-02-01 00:58 UTC, Behdad Esfahbod
needs-work Details | Review

Description Behdad Esfahbod 2009-01-29 08:24:21 UTC
That's for online font installation to work better.
Comment 1 Matthias Clasen 2009-01-31 03:11:54 UTC
Does a font installation incur a theme change ?
Comment 2 Behdad Esfahbod 2009-01-31 05:20:50 UTC
(In reply to comment #1)
> Does a font installation incur a theme change ?

That's the signal gtk sends to widgets, isn't it?

    case PROP_FONTCONFIG_TIMESTAMP:
      if (settings_update_fontconfig (settings))
        gtk_rc_reset_styles (GTK_SETTINGS (object));
Comment 3 Matthias Clasen 2009-01-31 05:31:09 UTC
Ah, yes.
Comment 4 Matthias Clasen 2009-01-31 19:50:38 UTC
Can you provide a patch for this, Behdad ?
Comment 5 Behdad Esfahbod 2009-02-01 00:58:37 UTC
Created attachment 127677 [details] [review]
Patch

Works like a charm.
Comment 6 Matthias Clasen 2009-02-01 04:43:27 UTC
Should just use a style_set class handler, instead of connecting to the signal (compare e.g. gtkimage.c). Other than that, looks good.
Comment 7 Behdad Esfahbod 2009-02-01 05:08:27 UTC
Doh.  Thought there should be one.  Didn't really check.  Just copied from what vte's doing.

BTW, you know how hard this stuff is to find in the docs? :)
Comment 8 Behdad Esfahbod 2009-02-01 05:26:59 UTC
2009-02-01  Behdad Esfahbod  <behdad@gnome.org>

        Bug 569635 – fontchooser should reload list of families/styles on
        theme change

        * gtk/gtkfontsel.c (gtk_font_selection_class_init),
        (gtk_font_selection_init), (gtk_font_selection_finalize),
        (gtk_font_selection_ref_family), (gtk_font_selection_ref_face),
        (gtk_font_selection_reload_fonts),
        (gtk_font_selection_screen_changed),
        (gtk_font_selection_style_set),
        (gtk_font_selection_scroll_to_selection),
        (gtk_font_selection_scroll_on_map),
        (gtk_font_selection_select_font),
        (gtk_font_selection_show_available_fonts),
        (gtk_font_selection_show_available_styles),
        (gtk_font_selection_select_style),
        (gtk_font_selection_select_font_desc),
        (gtk_font_selection_set_font_name):
        Reload Pango families and faces in style_set.  Installing/uninstalling
        fonts shows up immediately in an open font chooser now.