forked from AuroraMiddleware/gtk
fontchooser: Don't show "No fonts" prematurely
Don't switch to the empty page while we are still busy filtering. Fonts might yet appear.
This commit is contained in:
parent
76b7f0ca1c
commit
a9bf129286
@ -774,7 +774,8 @@ rows_changed_cb (GtkFontChooserWidget *self)
|
||||
{
|
||||
const char *page;
|
||||
|
||||
if (g_list_model_get_n_items (G_LIST_MODEL (self->selection)) == 0)
|
||||
if (g_list_model_get_n_items (G_LIST_MODEL (self->selection)) == 0 &&
|
||||
gtk_filter_list_model_get_pending (GTK_FILTER_LIST_MODEL (self->filter_model)) == 0)
|
||||
page = "empty";
|
||||
else
|
||||
page = "list";
|
||||
|
@ -5,6 +5,7 @@
|
||||
<signal name="items-changed" handler="rows_changed_cb" object="GtkFontChooserWidget" swapped="1" />
|
||||
<property name="model">
|
||||
<object class="GtkFilterListModel" id="filter_model">
|
||||
<signal name="notify::pending" handler="rows_changed_cb" object="GtkFontChooserWidget" swapped="1" />
|
||||
<property name="incremental">1</property>
|
||||
<property name="filter">
|
||||
<object class="GtkEveryFilter">
|
||||
|
Loading…
Reference in New Issue
Block a user