diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp index 7413c657676101ef7e27ad41cd1164b9b40248e7..04c95a9a9cda4406300d25c4b746bda733a9b756 100644 --- a/src/libnrtype/font-lister.cpp +++ b/src/libnrtype/font-lister.cpp @@ -1206,8 +1206,9 @@ void font_lister_cell_data_func2(GtkCellLayout * /*cell_layout*/, } Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + static bool first = true; int show_sample = prefs->getInt("/tools/text/show_sample_in_list", 1); - if (show_sample) { + if (show_sample && !first) { Glib::ustring sample = prefs->getString("/tools/text/font_sample"); gchar* sample_escaped = g_markup_escape_text(sample.data(), -1); @@ -1219,6 +1220,10 @@ void font_lister_cell_data_func2(GtkCellLayout * /*cell_layout*/, markup += ""; g_free(sample_escaped); } + auto iter_copy = *iter; + if (show_sample && first && !gtk_tree_model_iter_next (model, &iter_copy)) { + first = false; + } g_object_set(G_OBJECT(cell), "markup", markup.c_str(), NULL); g_free(family); diff --git a/src/ui/widget/combo-box-entry-tool-item.cpp b/src/ui/widget/combo-box-entry-tool-item.cpp index c4f546ac9678c6d75f350ef315aa87cc58b60066..601854ab83c10f6ef2c6767656730f8378f22887 100644 --- a/src/ui/widget/combo-box-entry-tool-item.cpp +++ b/src/ui/widget/combo-box-entry-tool-item.cpp @@ -106,10 +106,6 @@ ComboBoxEntryToolItem::ComboBoxEntryToolItem(Glib::ustring name, nullptr, nullptr ); } - // FIXME: once gtk3 migration is done this can be removed - // https://bugzilla.gnome.org/show_bug.cgi?id=734915 - gtk_widget_show_all (comboBoxEntry); - // Optionally add formatting... if( _cell_data_func != nullptr ) { GtkCellRenderer *cell = gtk_cell_renderer_text_new();