• Colomban Wendling's avatar
    Fix our custom styles under KDE and for people using gtk-chtheme · 232290aa
    Colomban Wendling yazdı
    We have a custom RC file defining various styles we need, and we want
    the user to be able to override them (e.g. if they want -- or need --
    other colors).  Fair enough, one would simply call gtk_rc_parse() with
    the appropriate filename.  However, the styling rules applies in the
    order they are loaded, then if we load our styles after GTK has loaded
    the user's ones we'd override them.
    
    There are 2 solutions to fix this:
    1) set our styles' priority to something with lower than "user"
       (actually "theme" priority because rules precedence are first
       calculated depending on the priority no matter of how precise the
       rules is, so we need to override the theme).
    2) prepend our custom style to GTK's list while keeping priority to
       user (which is the default), so it gets loaded before real user's
       ones and so gets overridden by them.
    
    One would normally go for 1 because it's ways simpler and requires less
    code: you just have to add the priorities to your styles, which is a
    matter of adding a few ":theme" in the RC file.  However, KDE being a
    bitch it doesn't set the gtk-theme-name but rather directly includes
    the style to use in a user gtkrc file, which makes the theme have
    "user" priority, hence overriding our styles.  So, we cannot set
    priorities in the RC file if we want to support running under KDE,
    which pretty much leave us with no choice but to go with solution 2,
    which unfortunately requires writing ugly code since GTK don't have a
    gtk_rc_prepend_default_file() function.  Thank you very much KDE.
    
    Though, as a side benefit it also makes the code work with people using
    gtk-chtheme, which also found it funny to include the theme in the user
    RC file.
    232290aa
Adı
Son kayıt (commit)
Son güncelleme
..
Makefile.am Loading commit data...
about.c Loading commit data...
about.h Loading commit data...
build.c Loading commit data...
build.h Loading commit data...
callbacks.c Loading commit data...
callbacks.h Loading commit data...
dialogs.c Loading commit data...
dialogs.h Loading commit data...
document.c Loading commit data...
document.h Loading commit data...
documentprivate.h Loading commit data...
editor.c Loading commit data...
editor.h Loading commit data...
encodings.c Loading commit data...
encodings.h Loading commit data...
filetypes.c Loading commit data...
filetypes.h Loading commit data...
filetypesprivate.h Loading commit data...
gb.c Loading commit data...
geany.h Loading commit data...
geanyentryaction.c Loading commit data...
geanyentryaction.h Loading commit data...
geanymenubuttonaction.c Loading commit data...
geanymenubuttonaction.h Loading commit data...
geanyobject.c Loading commit data...
geanyobject.h Loading commit data...
geanywraplabel.c Loading commit data...
geanywraplabel.h Loading commit data...
gtkcompat.h Loading commit data...
highlighting.c Loading commit data...
highlighting.h Loading commit data...
highlightingmappings.h Loading commit data...
keybindings.c Loading commit data...
keybindings.h Loading commit data...
keyfile.c Loading commit data...
keyfile.h Loading commit data...
log.c Loading commit data...
log.h Loading commit data...
main.c Loading commit data...
main.h Loading commit data...
makefile.win32 Loading commit data...
msgwindow.c Loading commit data...
msgwindow.h Loading commit data...
navqueue.c Loading commit data...
navqueue.h Loading commit data...
notebook.c Loading commit data...
notebook.h Loading commit data...
plugindata.h Loading commit data...
pluginprivate.h Loading commit data...
plugins.c Loading commit data...
plugins.h Loading commit data...
pluginutils.c Loading commit data...
pluginutils.h Loading commit data...
prefix.c Loading commit data...
prefix.h Loading commit data...
prefs.c Loading commit data...
prefs.h Loading commit data...
printing.c Loading commit data...
printing.h Loading commit data...
project.c Loading commit data...
project.h Loading commit data...
projectprivate.h Loading commit data...
sciwrappers.c Loading commit data...
sciwrappers.h Loading commit data...
search.c Loading commit data...
search.h Loading commit data...
sidebar.c Loading commit data...
sidebar.h Loading commit data...
socket.c Loading commit data...
socket.h Loading commit data...
stash.c Loading commit data...
stash.h Loading commit data...
support.h Loading commit data...
symbols.c Loading commit data...
symbols.h Loading commit data...
templates.c Loading commit data...
templates.h Loading commit data...
toolbar.c Loading commit data...
toolbar.h Loading commit data...
tools.c Loading commit data...
tools.h Loading commit data...
ui_utils.c Loading commit data...
ui_utils.h Loading commit data...
utils.c Loading commit data...
utils.h Loading commit data...
vte.c Loading commit data...
vte.h Loading commit data...
win32.c Loading commit data...
win32.h Loading commit data...