~ubuntu-branches/ubuntu/raring/unity-greeter/raring

« back to all changes in this revision

Viewing changes to src/greeter-list.vala

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2013-01-04 10:37:29 UTC
  • mfrom: (1.1.20)
  • Revision ID: package-import@ubuntu.com-20130104103729-5mdqaefytmbctsts
Tags: 13.04.0-0ubuntu1
* New upstream release
  - Support timed login
  - Drop OK button in session chooser (LP: #1049243)
  - Various small layout changes (LP: #1049241, LP: #1049242,
    LP: #1056945, LP: #1056949, LP: #1056987, LP: #1059484)
  - Fix orca not closing when disabled
  - Fix display corruption when logging in (LP: #931967)
* debian/patches/close-orca.patch,
  debian/patches/fix-timed-autologin.patch,
  debian/patches/do-not-mention-citrix-support.patch,
  debian/patches/sigterm-onboard.patch:
  - Dropped, included upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
436
436
 
437
437
    protected virtual int get_position_y (double position)
438
438
    {
439
 
        // Most position heights are just the grid height.  Except for the one
440
 
        // right above the greeter box and the greeter box itself.  The greeter
441
 
        // box is some number of grids to start with.  And it is smaller by a
442
 
        // bit, while the one above it is larger by the same amount, in order
443
 
        // to line up names outside the greeter box in the middle of their
444
 
        // grid, while the name inside the box is near the bottom of its first
445
 
        // box.
446
 
        int one_above_height = grid_size + PromptBox.NAME_MARGIN_TOP;
447
 
        int box_height = get_greeter_box_height_grids () * grid_size -
448
 
                         PromptBox.NAME_MARGIN_TOP;
 
439
        // Most position heights are just the grid height.  Except for the
 
440
        // greeter box itself.
 
441
        int box_height = get_greeter_box_height_grids () * grid_size;
449
442
        double offset;
450
443
 
451
 
        if (position < -1)
452
 
            offset = (position + 1) * grid_size - one_above_height;
453
 
        else if (position < 0)
454
 
            offset = position * one_above_height;
 
444
        if (position < 0)
 
445
            offset = position * grid_size;
455
446
        else if (position < 1)
456
447
            offset = position * box_height;
457
448
        else
458
449
            offset = (position - 1) * grid_size + box_height;
459
450
 
460
 
        return get_greeter_box_y () + (int)Math.round(offset);
 
451
        return box_y + (int)Math.round(offset);
461
452
    }
462
453
 
463
454
    private void move_entry (PromptBox entry, double position)
853
844
        background.draw_grid = false;
854
845
        background.queue_draw ();
855
846
 
856
 
        UnityGreeter.singleton.start_session (get_lightdm_session ());
 
847
        UnityGreeter.singleton.start_session (get_lightdm_session (), background);
857
848
    }
858
849
 
859
850
    public void login_complete ()