diff options
Diffstat (limited to 'e-util/e-config.c')
-rw-r--r-- | e-util/e-config.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/e-util/e-config.c b/e-util/e-config.c index 2e0f47ddeb..d1c5611a40 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -707,6 +707,26 @@ ec_rebuild(EConfig *emp) } } + /* If the last section doesn't contain anything, hide it */ + if (sectionnode != NULL) { + if ( (sectionnode->empty = itemno == 0) ) { + gtk_widget_hide(sectionnode->frame); + sectionno--; + } else + gtk_widget_show(sectionnode->frame); + printf("%s section '%s' [sections=%d]\n", sectionnode->empty?"hiding":"showing", sectionnode->item->path, sectionno); + } + + /* If the last page doesn't contain anything, hide it */ + if (pagenode != NULL) { + if ( (pagenode->empty = sectionno == 0) ) { + gtk_widget_hide(pagenode->frame); + pageno--; + } else + gtk_widget_show(pagenode->frame); + printf("%s page '%s' [section=%d]\n", pagenode->empty?"hiding":"showing", pagenode->item->path, pageno); + } + if (book) { /* make this depend on flags?? */ if (gtk_notebook_get_n_pages((GtkNotebook *)book) == 1) { |