aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter/itip-view.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2005-01-04 03:00:02 +0800
committerJP Rosevear <jpr@src.gnome.org>2005-01-04 03:00:02 +0800
commit89441016f3d9e975f1a336b44240b54b0ae93e2b (patch)
tree8e95640a75583365384ac2ee3bc44a6b570070bb /plugins/itip-formatter/itip-view.c
parenta7e7ed91764d6b16f6e85f06d42fb0d68a1d2ee7 (diff)
downloadgsoc2013-evolution-89441016f3d9e975f1a336b44240b54b0ae93e2b.tar
gsoc2013-evolution-89441016f3d9e975f1a336b44240b54b0ae93e2b.tar.gz
gsoc2013-evolution-89441016f3d9e975f1a336b44240b54b0ae93e2b.tar.bz2
gsoc2013-evolution-89441016f3d9e975f1a336b44240b54b0ae93e2b.tar.lz
gsoc2013-evolution-89441016f3d9e975f1a336b44240b54b0ae93e2b.tar.xz
gsoc2013-evolution-89441016f3d9e975f1a336b44240b54b0ae93e2b.tar.zst
gsoc2013-evolution-89441016f3d9e975f1a336b44240b54b0ae93e2b.zip
utility routine to make it easier to add info items
2005-01-03 JP Rosevear <jpr@novell.com> * itip-view.c (itip_view_add_upper_info_item_printf): utility routine to make it easier to add info items (itip_view_add_lower_info_item_printf): ditto * itip-view.h: new protos * itip-formatter.c: use new printf routines everyhwere it makes sense svn path=/trunk/; revision=28220
Diffstat (limited to 'plugins/itip-formatter/itip-view.c')
-rw-r--r--plugins/itip-formatter/itip-view.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c
index 3734b74d92..a8a8a1e979 100644
--- a/plugins/itip-formatter/itip-view.c
+++ b/plugins/itip-formatter/itip-view.c
@@ -1048,6 +1048,29 @@ itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const
return item->id;
}
+guint
+itip_view_add_upper_info_item_printf (ItipView *view, ItipViewInfoItemType type, const char *format, ...)
+{
+ ItipViewPrivate *priv;
+ va_list args;
+ char *message;
+ guint id;
+
+ g_return_val_if_fail (view != NULL, 0);
+ g_return_val_if_fail (ITIP_IS_VIEW (view), 0);
+
+ priv = view->priv;
+
+ va_start (args, format);
+ message = g_strdup_vprintf (format, args);
+ va_end (args);
+
+ id = itip_view_add_upper_info_item (view, type, message);
+ g_free (message);
+
+ return id;
+}
+
void
itip_view_remove_upper_info_item (ItipView *view, guint id)
{
@@ -1123,6 +1146,29 @@ itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const
return item->id;
}
+guint
+itip_view_add_lower_info_item_printf (ItipView *view, ItipViewInfoItemType type, const char *format, ...)
+{
+ ItipViewPrivate *priv;
+ va_list args;
+ char *message;
+ guint id;
+
+ g_return_val_if_fail (view != NULL, 0);
+ g_return_val_if_fail (ITIP_IS_VIEW (view), 0);
+
+ priv = view->priv;
+
+ va_start (args, format);
+ message = g_strdup_vprintf (format, args);
+ va_end (args);
+
+ id = itip_view_add_lower_info_item (view, type, message);
+ g_free (message);
+
+ return id;
+}
+
void
itip_view_remove_lower_info_item (ItipView *view, guint id)
{