Changeset 1353

Show
Ignore:
Timestamp:
05/23/08 03:39:35 (8 months ago)
Author:
astormont
Message:

Checks to see if in packlist.all before adding to queue, and raises exception otherwise

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wine-doors/trunk/src/packlist.py

    r1152 r1353  
    571571                        return True 
    572572        return False 
     573 
     574    def InAll (self, pack_shortname, version=None ): 
     575        for tmp_pack in self.all: 
     576            if tmp_pack['shortname'] == pack_shortname: 
     577                if not version: 
     578                    return True 
     579                for pack_version in tmp_pack['versions']: 
     580                    [( av_version,  
     581                       wineversion,  
     582                       winevariant,  
     583                       appdb_rating,  
     584                       installersize,  
     585                       installedsize,  
     586                       votes, 
     587                       av_revision, 
     588                       app_pack )] = pack_version 
     589                    if av_version == version: 
     590                        return True 
     591        return False 
    573592             
    574593    def InPacks (self, pack_shortname ): 
  • wine-doors/trunk/src/queue.py

    r1152 r1353  
    2323 
    2424    def Add( self, action, pack=None, version=None, repo=None ): 
     25        if not packlist.InAll( pack, version ): 
     26            raise "QueueError: Attempted to add pack to queue which is not in packlist.all" 
    2527        if not self.IsOnQueue( pack, version, action ): 
    2628            if self.IsOnQueue( pack, version ): 
  • wine-doors/trunk/src/winedoors.glade

    r1352 r1353  
    31703170                <property name="visible">True</property> 
    31713171                <child> 
    3172                   <widget class="GtkProgressBar" id="progressbar1"> 
     3172                  <widget class="GtkProgressBar" id="progressbar"> 
    31733173                    <property name="height_request">25</property> 
    31743174                    <property name="pulse_step">0.10000000149</property> 
     
    33043304        </child> 
    33053305        <child> 
    3306           <widget class="GtkLabel" id="lb_error2"> 
     3306          <widget class="GtkLabel" id="lb_error"> 
    33073307            <property name="xalign">0</property> 
    33083308            <property name="use_markup">True</property>