aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-01-24 11:29:24 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-01-24 11:29:24 +0100
commitdb1caf23cdfb98ce99086eebe46660928b43f6e9 (patch)
tree02945abd70ea5892b17dd9bd42c518d607548597 /libindicator
parent088b36be863ed966426754b1505009967254293c (diff)
downloadlibayatana-indicator-db1caf23cdfb98ce99086eebe46660928b43f6e9.tar.gz
libayatana-indicator-db1caf23cdfb98ce99086eebe46660928b43f6e9.tar.bz2
libayatana-indicator-db1caf23cdfb98ce99086eebe46660928b43f6e9.zip
indicator-ng: document error conditions in menu_changed
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-ng.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libindicator/indicator-ng.c b/libindicator/indicator-ng.c
index b7ea334..82af030 100644
--- a/libindicator/indicator-ng.c
+++ b/libindicator/indicator-ng.c
@@ -228,6 +228,10 @@ indicator_ng_menu_changed (GMenuModel *menu,
{
IndicatorNg *self = user_data;
+ /* The menu may only contain one item (the indicator title menu).
+ * Thus, the position is always 0, and there is either exactly one
+ * item added or exactly one item removed.
+ */
g_return_if_fail (position == 0);
g_return_if_fail (added < 2 && removed < 2 && added ^ removed);