mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +00:00
Fixed a bug in NSPopUpButtonCell - see the ChangeLog for details.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17418 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f70d520320
commit
c758727ee0
2 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2003-08-02 Ludovic Marcotte <ludovic@Sophos.ca
|
||||||
|
|
||||||
|
* Modified NSPopUpButtonCell: -insertItemWithTitle: atIndex:
|
||||||
|
so that we get our item count after removing a potential
|
||||||
|
duplicated item value.
|
||||||
|
|
||||||
|
|
||||||
2003-08-01 Adam Fedor <fedor@gnu.org>
|
2003-08-01 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* Documentation/GNUmakefile.postamble (after-install): Install
|
* Documentation/GNUmakefile.postamble (after-install): Install
|
||||||
|
|
|
@ -200,14 +200,17 @@ static NSImage *_pbc_image[2];
|
||||||
- (void) insertItemWithTitle: (NSString *)title atIndex: (int)index
|
- (void) insertItemWithTitle: (NSString *)title atIndex: (int)index
|
||||||
{
|
{
|
||||||
id <NSMenuItem> anItem;
|
id <NSMenuItem> anItem;
|
||||||
int count = [_menu numberOfItems];
|
int i, count;
|
||||||
int i = [self indexOfItemWithTitle: title];
|
|
||||||
|
i = [self indexOfItemWithTitle: title];
|
||||||
|
|
||||||
if (-1 != i)
|
if (-1 != i)
|
||||||
{
|
{
|
||||||
[self removeItemAtIndex: i];
|
[self removeItemAtIndex: i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
count = [_menu numberOfItems];
|
||||||
|
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
index = 0;
|
index = 0;
|
||||||
if (index > count)
|
if (index > count)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue