Skip to content
  • Mikhail Zolotukhin's avatar
    Rewrite GTK KCM · 1ebf620d
    Mikhail Zolotukhin authored
    Summary:
    After several changes, GTK Applications settings are now in
    sync with KDE equivalent ones, so that GTK KCM now controls only the
    theme of the GTK applications. But GTK KCM was written with the thought
    that it controls entire GTK apps appearance in mind. Its code structure
    is now redundant and needs to be either rewritten or purged in favour of
    new one, that will be present in Application Style KCM code base.
    
    The last approach is preferable, because of the goal of removing GTK KCM
    to simplify System Settings structure. However, there are some points to
    be noted:
    
    # The consensus of where exactly to put the GTK applications settings
       in App Style KCM is not yet reached.
    # A couple of changes to the kded settings sync daemon are needed, to
       provide functionality, that is left in GTK KCM (Themes
       Installation/Deletion, Preview etc) without depending on GTK libs
    # There are some bugs in KCM, that are present in the moment, that
       could only be fixed with architecture changes (for example: not
       working previews, when the xsettingsd daemon is running; broken icons
       in the previews; gtk themes do not applying for flatpak apps)
    
    Given the points above I decided to rewrite GTK KCM, so that complex
    design task (1) would be solved after changes (2) are made. And also
    in the process some bugs (3) will be fixed.
    
    Now, GTK KCM is not responsible for managing GTK configs, the one who
    does is the kded module, that is asked through DBus, when it is needed
    to do so.
    The stuff, that is managed by kded module:
    
    # Setting selected GTK2 and GTK3 themes for applications
    # Getting current GTK2 and GTK3 themes for applications
    # Previewing GTK2 and GTK3 applications for selected themes
    
    Technically 2 and 3 could be done in KCM directly, because they do not
    depend on GTK libs, but I thought, that it would be logically related to
    the stuff, that is done via kded module. If you think, that that
    approach is not right, feel free to criticise.
    
    The stuff, that is done in KCM directly:
    
    # Getting the list of installed GTK themes
    # Installing and removing the GTK theme
    
    Also there are some visual changes:
    
    # Theme deletion is now done via button near GTK theme combo, instead
       of separate dialog
    # Theme installation from file is now done via button at the bottom,
       as in the other similar KCMs
    # Preview button now has a title with an ellipsis to indicate, that
       it launches GTK app in a pop up window
    
    BUG: 405405
    
    Test Plan:
    {F7847441}
    # Relaunch kded5
    # Open GTK KCM
    # Check if gtk themes changing works
    # Check if the previews are working
    # Check if the local themes deletion works
    # Check if theme installation from archive works
    # Check if GHNS theme installation works
    
    Reviewers: apol, #vdg, ngraham, cblack
    
    Reviewed By: #vdg, ngraham, cblack
    
    Subscribers: cblack, baberts, ngraham, plasma-devel
    
    Tags: #plasma
    
    Maniphest Tasks: T10611
    
    Differential Revision: https://phabricator.kde.org/D26261
    1ebf620d