summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorGlynn Foster <glynn.foster@sun.com>2003-05-05 17:17:02 +0000
committerGlynn Foster <gman@src.gnome.org>2003-05-05 17:17:02 +0000
commit8ff2b32c9eb4b2eb8970a9fa48c4889847c347b1 (patch)
treece428fee7a962be0ad60705f86eb1b4ad81e39ad /src/util.c
parent140539f6264477403d022a87d4dd18b5eba495ca (diff)
Make the list dialog handle stdin - a little bit buggy still. Update
2003-05-05 Glynn Foster <glynn.foster@sun.com> * src/tree.c, src/util.c, src/util.h: Make the list dialog handle stdin - a little bit buggy still. * TODO: Update
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 907b04c..2b3e8dc 100644
--- a/src/util.c
+++ b/src/util.c
@@ -59,6 +59,25 @@ zenity_util_load_glade_file (const gchar *widget_root)
return xml;
}
+gchar*
+zenity_util_strip_newline (gchar *string)
+{
+ gsize len;
+
+ g_return_val_if_fail (string != NULL, NULL);
+
+ len = strlen (string);
+ while (len--)
+ {
+ if (string[len] == '\n')
+ string[len] = '\0';
+ else
+ break;
+ }
+
+ return string;
+}
+
gboolean
zenity_util_fill_file_buffer (GtkTextBuffer *buffer, const gchar *filename)
{