diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-10-22 15:21:09 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-10-22 15:21:09 +0000 |
| commit | e6919ea013dc0c926e049a1e7b1188829060baac (patch) | |
| tree | 3fac0bccfb5b4f26c0b8a7a1e33b33e8f85ad13f | |
| parent | Preferences: fix inputs not properly expanding horizontally (diff) | |
| download | inkscape-e6919ea013dc0c926e049a1e7b1188829060baac.tar.gz inkscape-e6919ea013dc0c926e049a1e7b1188829060baac.zip | |
Preferences: Simplify code from 9f2c9d85b73ff773e6181d700678f28757714992
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index ae013a27b..bd4f5c75e 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -1930,12 +1930,7 @@ void InkscapePreferences::initPageSpellcheck() static void appendList( Glib::ustring& tmp, const gchar* const*listing ) { - bool first = true; for (const gchar* const* ptr = listing; *ptr; ptr++) { - if (!first) { - tmp += " "; - } - first = false; tmp += *ptr; tmp += "\n"; } @@ -2000,22 +1995,12 @@ void InkscapePreferences::initPageSystem() _sys_systemdata_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); _page_system.add_line(true, _("System data: "), _sys_systemdata_scroll, "", _("Locations of system data"), true); - { - tmp = ""; - gchar** paths = 0; - gint count = 0; - gtk_icon_theme_get_search_path(gtk_icon_theme_get_default(), &paths, &count); - if (count > 0) { - tmp += paths[0]; - tmp += "\n"; - for (int i = 1; i < count; i++) { - tmp += " "; - tmp += paths[i]; - tmp += "\n"; - } - } - } - + tmp = ""; + gchar** paths = 0; + gint count = 0; + gtk_icon_theme_get_search_path(gtk_icon_theme_get_default(), &paths, &count); + appendList( tmp, paths ); + g_strfreev(paths); _sys_icon.get_buffer()->insert(_sys_icon.get_buffer()->end(), tmp); } _sys_icon.set_editable(false); |
