diff src/preferences.c @ 227:41fc4bfc8b25

Add a debug level spinner at the end of Preferences > Advanced. One can now enable debug mode without restarting geeqie. A possibility to disable all debugging code and related options at compile time was added.
author zas_
date Thu, 03 Apr 2008 17:15:49 +0000
parents 3c89da4aef95
children 4b2fbfafa511
line wrap: on
line diff
--- a/src/preferences.c	Thu Apr 03 14:35:03 2008 +0000
+++ b/src/preferences.c	Thu Apr 03 17:15:49 2008 +0000
@@ -130,6 +130,10 @@
 
 static gint dupe_custom_threshold_c;
 
+#ifdef DEBUG
+static gint debug_c;
+#endif
+
 static GtkWidget *configwindow = NULL;
 static GtkWidget *startup_path_entry;
 static GtkListStore *filter_store = NULL;
@@ -317,6 +321,9 @@
 	dupe_custom_threshold = dupe_custom_threshold_c;
 
 	tree_descend_subdirs = tree_descend_subdirs_c;
+#ifdef DEBUG
+	debug = debug_c;
+#endif
 
 #ifdef HAVE_LCMS
 	for (i = 0; i < COLOR_PROFILE_INPUTS; i++)
@@ -1474,6 +1481,13 @@
 			 GTK_FILL | GTK_EXPAND, 0, 0, 0);
 	gtk_widget_show(tabcomp);
 
+#ifdef DEBUG
+	group = pref_group_new(vbox, FALSE, _("Debugging"), GTK_ORIENTATION_VERTICAL);
+
+	pref_spin_new_int(group, _("Debug level:"), NULL,
+			  0, 9, 1, debug, &debug_c);
+#endif
+
 	gtk_widget_show(notebook);
 
 	gtk_widget_show(configwindow);