• Debarshi Ray's avatar
    Don't freeze the UI when launching Settings -> Online Accounts · 924fb4ec
    Debarshi Ray authored
    The UI freezes for a moment when launching Settings -> Online Accounts
    because g_application_register does slow I/O. After creating the
    GApplication's GDBusActionGroup, it queries the list of remote actions
    from the primary application instance over D-Bus to populate it.
    Fortunately, it's not necessary to fill in the GDBusActionGroup for
    activating a GAction. Therefore, this can be solved by directly using
    a GDBusActionGroup instead of going via a launcher GApplication.
    This does lose the platform data that the launcher GApplication would
    have passed when invoking the remote GAction, but hopefully that
    won't prove crucial.
    The loss of error handling doesn't matter. g_application_register was
    the only fallible step, and it could have only failed while querying
    the list of actions from the primary, something that's not needed
    anyway. If anything, it simplifies the code.
    Fallout from 556a9f30
photos-empty-results-box.c 8.88 KB