Revision: 29229
          http://sourceforge.net/p/bibdesk/svn/29229
Author:   hofman
Date:     2025-04-28 18:35:07 +0000 (Mon, 28 Apr 2025)
Log Message:
-----------
Select syntax in popup casse insensitively

Modified Paths:
--------------
    trunk/bibdesk/BDSKSearchGroupSheetController.m

Modified: trunk/bibdesk/BDSKSearchGroupSheetController.m
===================================================================
--- trunk/bibdesk/BDSKSearchGroupSheetController.m      2025-04-28 09:32:22 UTC 
(rev 29228)
+++ trunk/bibdesk/BDSKSearchGroupSheetController.m      2025-04-28 18:35:07 UTC 
(rev 29229)
@@ -112,9 +112,16 @@
     if (value == nil) {
         [syntaxPopup selectItemAtIndex:0];
     } else {
-        if ([syntaxPopup itemWithTitle:value] == nil)
+        NSMenuItem *item = nil;
+        for (item in [syntaxPopup itemArray]) {
+            if ([[item title] isCaseInsensitiveEqual:value])
+                break;
+        }
+        if (item == nil) {
             [syntaxPopup addItemWithTitle:value];
-        [syntaxPopup selectItemWithTitle:value];
+            item = [syntaxPopup lastItem];
+        }
+        [syntaxPopup selectItem:item];
     }
 }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to