Ignore:
Timestamp:
11/06/12 11:01:14 (18 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Using 'sys.maxint - 1' as the default category priority ('sys.maxint' is used for prototypes).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/registry/description.py

    r11157 r11171  
    365365    project_name : str 
    366366        A project name providing the category. 
    367  
    368367    priority : int 
    369368        Priority (order in the GUI). 
     
    437436        keywords = getattr(package, "KEYWORDS", None) 
    438437        widgets = getattr(package, "WIDGETS", None) 
    439         priority = getattr(package, "PRIORITY", sys.maxint) 
     438        priority = getattr(package, "PRIORITY", sys.maxint - 1) 
    440439        icon = getattr(package, "ICON", None) 
    441440        background = getattr(package, "BACKGROUND", None) 
     441 
     442        if priority == sys.maxint - 1 and name.lower() == "prototypes": 
     443            priority = sys.maxint 
    442444 
    443445        return CategoryDescription( 
Note: See TracChangeset for help on using the changeset viewer.