Ticket #5576: readonlybootprompt.patch

File readonlybootprompt.patch, 928 bytes (added by idefix, 14 years ago)

(patch) Scroll to selection in Language list and perform the initial scrolling after the window is shown.

  • src/apps/readonlybootprompt/BootPromptWindow.cpp

     
    130130        )
    131131    );
    132132
    133     // This call in the first _PopulateKeymaps had no effect yet, since the
    134     // list wasn't attatched to the window yet.
     133    CenterOnScreen();
     134    Show();
     135    Lock();
     136
     137    // This call in the first _PopulateLanguages/Keymaps had no effect yet,
     138    // since the list wasn't attached to the window yet.
     139    fLanguagesListView->ScrollToSelection();
    135140    fKeymapsListView->ScrollToSelection();
    136141
    137     CenterOnScreen();
    138     Show();
     142    Unlock();
    139143}
    140144
    141145
     
    298302        }
    299303    }
    300304
     305    fLanguagesListView->ScrollToSelection();
     306
    301307    // Re-enable sending the selection message.
    302308    fLanguagesListView->SetSelectionMessage(
    303309        new BMessage(MSG_LANGUAGE_SELECTED));