aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-11-01 18:04:00 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-11-25 01:29:44 +0800
commit6ea436c8b313974d94eb9fe97974edcf4f47e46d (patch)
treea3712e0599afc03b44fa49d4b0614278b3f68257 /libempathy-gtk/empathy-ui-utils.c
parentb15f926089b6b718004467c8bb2ddf6f6cd3a9ac (diff)
downloadgsoc2013-empathy-6ea436c8b313974d94eb9fe97974edcf4f47e46d.tar
gsoc2013-empathy-6ea436c8b313974d94eb9fe97974edcf4f47e46d.tar.gz
gsoc2013-empathy-6ea436c8b313974d94eb9fe97974edcf4f47e46d.tar.bz2
gsoc2013-empathy-6ea436c8b313974d94eb9fe97974edcf4f47e46d.tar.lz
gsoc2013-empathy-6ea436c8b313974d94eb9fe97974edcf4f47e46d.tar.xz
gsoc2013-empathy-6ea436c8b313974d94eb9fe97974edcf4f47e46d.tar.zst
gsoc2013-empathy-6ea436c8b313974d94eb9fe97974edcf4f47e46d.zip
Create API for generic string parser
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 97fd95c1d..376d1f9d8 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1569,3 +1569,17 @@ empathy_receive_file_with_file_chooser (EmpathyFTHandler *handler)
gtk_widget_show (widget);
}
+
+void
+empathy_string_parser_substr (GString *string,
+ const gchar *text,
+ gssize len,
+ EmpathyStringParser *parsers)
+{
+ if (parsers != NULL && parsers[0] != NULL) {
+ parsers[0] (string, text, len, parsers + 1);
+ } else {
+ g_string_append_len (string, text, len);
+ }
+}
+