summaryrefslogtreecommitdiff
path: root/tikzit/src/gtk/gtkhelpers.h
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@cs.ox.ac.uk>2013-02-04 18:08:38 +0000
committerAlex Merry <alex.merry@cs.ox.ac.uk>2013-02-04 18:08:38 +0000
commitdc720cc5d5e3f5b2f3d8119947a9dd8c69f4b2df (patch)
tree7b3eeeaca920b37f45d3c762ea6dc6c625760780 /tikzit/src/gtk/gtkhelpers.h
parent0f2452356ae718b73e9467e388092c8af6752a8f (diff)
GTK: prevent the user from creating invalid tikz
The free-form entry fields (graph element properties and node labels) are a potential source of invalid tikz code. Since we quote any dodgy-looking text with { and }, we just need to make sure there are no unmatched curly braces entered in those fields. This will turn the entry widgets red when there are unmatched braces, and refuse to make use of any such values.
Diffstat (limited to 'tikzit/src/gtk/gtkhelpers.h')
-rw-r--r--tikzit/src/gtk/gtkhelpers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tikzit/src/gtk/gtkhelpers.h b/tikzit/src/gtk/gtkhelpers.h
index a28b127..abc2f4f 100644
--- a/tikzit/src/gtk/gtkhelpers.h
+++ b/tikzit/src/gtk/gtkhelpers.h
@@ -50,4 +50,7 @@ void tz_restore_window (GtkWindow *window, gint x, gint y, gint w, gint h);
void label_set_bold (GtkLabel *label);
+void widget_set_error (GtkWidget *widget);
+void widget_clear_error (GtkWidget *widget);
+
// vim:ft=objc:sts=2:sw=2:et