• Maxim Monastirsky's avatar
    Introduce generic sub toolbar controller · 2aea9e37
    Maxim Monastirsky yazdı
    Currently many toolbar controllers are basically doing the
    same thing - show some docked toolbar. So the idea here is
    to have one generic controller that will handle all these
    cases in a unified way. It will get the name of the toolbar
    that it's supposed to show from the configuration, based on
    the command it was registered for.
    
    Right now it can handle both simple (i.e. with DROPDOWNONLY
    bits) and split (i.e. with DROPDOWN bits) scenarios, where
    for split kind it replaces the function (and the image) of
    the main part of the button, with the last selected function,
    for easy reusing. A button is considered to be a split one,
    if the name of the initial default command was passed along
    with the sub toolbar name, otherwise it will be a simple
    button.
    
    The core change is in framework/. Other parts are a usage
    example, in form of converting the custom shapes buttons
    to this new controller.
    
    Change-Id: I087cc58c3db1889ca69a26546d4f00fe07e2a58d
    Reviewed-on: https://gerrit.libreoffice.org/16967Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
    2aea9e37
sddll.cxx 12.7 KB