aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-config.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-10-20 15:42:49 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-10-20 15:42:49 +0800
commit691f1886c3988f89d6830e7d8901c37b2e8e8284 (patch)
treee40ce6ccd27c0f4c4737fe6c1395049ff0b9464b /e-util/e-config.c
parent10a951b6660b9a1aa8d7e709a3a7c67435873da0 (diff)
downloadgsoc2013-evolution-691f1886c3988f89d6830e7d8901c37b2e8e8284.tar.gz
gsoc2013-evolution-691f1886c3988f89d6830e7d8901c37b2e8e8284.tar.zst
gsoc2013-evolution-691f1886c3988f89d6830e7d8901c37b2e8e8284.zip
check for empty trailing sections/pages after we exit the main loop.
2004-10-20 Not Zed <NotZed@Ximian.com> * e-config.c (ec_rebuild): check for empty trailing sections/pages after we exit the main loop. * e-plugin.c (e_plugin_get_type): make ~/.eplugins the default eplugin location, not ~/.eplug. 2004-10-18 Not Zed <NotZed@Ximian.com> * e-config.h: fix some forward decls. svn path=/trunk/; revision=27644
Diffstat (limited to 'e-util/e-config.c')
-rw-r--r--e-util/e-config.c20
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) {