diff --git a/ChangeLog b/ChangeLog index d30677112..65117c9a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,9 @@ * UI/Common/UIxToolbar.m: new "isLastGroup" method to determine within the templates whether a separator should be displayed. + * UI/Common/UIxToolbar.m ([UIxToolbar -hasButtons]): new method + that returns NO if the toolbar is empty. + 2006-07-05 Wolfgang Sourdeau * UI/Templates/UIxPageFrame.wox: replaced central table with a DIV. diff --git a/UI/Common/UIxToolbar.m b/UI/Common/UIxToolbar.m index 42c614581..ae0d37901 100644 --- a/UI/Common/UIxToolbar.m +++ b/UI/Common/UIxToolbar.m @@ -222,4 +222,19 @@ == ([toolbarConfig count] - 1)); } +- (BOOL) hasButtons +{ + id tbConfig; + unsigned int count, max, amount; + + tbConfig = [self toolbarConfig]; + + amount = 0; + max = [tbConfig count]; + for (count = 0; count < max; count++) + amount += [[tbConfig objectAtIndex: count] count]; + + return (amount > 0); +} + @end /* UIxToolbar */ diff --git a/UI/Templates/UIxToolbar.wox b/UI/Templates/UIxToolbar.wox index 7e8c544f4..86571c2d2 100644 --- a/UI/Templates/UIxToolbar.wox +++ b/UI/Templates/UIxToolbar.wox @@ -1,12 +1,12 @@ -
- +
@@ -36,3 +36,4 @@
+