Ignore:
Timestamp:
Dec 12, 2009, 10:20:29 PM (14 years ago)
Author:
ronosman
Message:

Feature 1320 added : add privacy level in photo properties.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm

    r4467 r4476  
    111111                  upload_hd
    112112                  eng_upload_hd
     113                  privacy_level
    113114      /
    114115);
     
    303304        }
    304305    );
     306       
     307        # hard coded because the piwigo api to read custom privacy level is not yet available
     308        $self->privacy_level(
     309            [
     310                    'everybody',
     311                        'contacts',
     312                        'friends',
     313                        'family',
     314                        'admins'
     315                ]
     316        );
     317
     318       
     319}
     320
     321# display privacy level list in a pyramid way :
     322# ['everybody', 'contacts', friends, family, admins] -> [everybody, 'contacts, friends, family, admins', 'friends, family, admins', 'family, admins', 'admins only' ]
     323sub privacy_level_choices{
     324    my ( $self ) = @_;
     325
     326    my $pl = $self->privacy_level;     
     327    my $n = scalar @$pl - 1;
     328    my $list = [ gettext($pl->[0]) ];
     329    my $i=0;
     330    while(++$i<$n){   
     331        push @$list, join(
     332                    ', ',
     333                        map{ gettext($_) }
     334                        @$pl[$i..$n]
     335                );
     336    }
     337    push @$list, gettext($pl->[$n]);
     338       
     339        $list;
    305340}
    306341
     
    429464            Wx::LogMessage(
    430465                gettext("An error has occured. Can not read %s\n%s"),
    431                 $self->storable_file,
     466                $self->storable_file, 
    432467                $@
    433468            );
Note: See TracChangeset for help on using the changeset viewer.