After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 570939 - Changing GtkSourceStyle properties
Changing GtkSourceStyle properties
Status: RESOLVED OBSOLETE
Product: gtksourceview
Classification: Platform
Component: General
git master
Other Linux
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-08 09:44 UTC by jessevdk@gmail.com
Modified: 2021-07-05 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jessevdk@gmail.com 2009-02-08 09:44:52 UTC
At the moment GtkSourceStyle properties are construct only, which makes it impossible to override styles with user configurable settings. Am I correct in understanding that at the moment there is no way of changing a style (or style scheme for that matter) programmatically?
Comment 1 Yevgen Muntyan 2009-02-08 19:34:29 UTC
Yes, they are made construct only intentionally. Moreover, they are actually broken so you can't really use them at all, even for construction.
Comment 2 jessevdk@gmail.com 2009-02-08 20:21:44 UTC
So how can this problem be resolved. I need a way to alter styles programmatically.
Comment 3 Paolo Borelli 2009-02-08 23:45:59 UTC
if gtksourcestyle are immutables the right place to programmatically change the style looks like gtksourcestylescheme... I guess we need a way to set a style on a stylescheme and maybe even one to introspect the current styles set on a scheme
Comment 4 jessevdk@gmail.com 2009-02-09 10:22:34 UTC
To me it doesn't make much sense to 'set' a style, wouldn't this involve creating a whole new object, setting all the properties, and calling some API on the scheme to apply this new style? If these GtkSourceStyle objects are already broken, shouldn't we fix them? What exactly is the problem here...
Comment 5 Paolo Borelli 2009-02-09 13:06:48 UTC
you have to think of a style as "blue" or "green" (well, only slightly more complicated becuse it can be "blue+bold+whitebackground" etc): you cannot change blue into green, but you can say that a particular context should be "blue" or "green", that's what I meant by saying that we miss an api to set the style that shuould be associated to a context.
Comment 6 jessevdk@gmail.com 2009-02-09 14:39:27 UTC
Ok, that might be useful for some things, but it is not what I want. What you describe is more about changing the language file imho, and not about changing the style scheme.
Comment 7 jessevdk@gmail.com 2009-02-09 14:46:17 UTC
After some more thinking, such an API would allow me to solve the issue I'm having now, but I do think that we should be able to do both.
Comment 8 Ignacio Casal Quinteiro (nacho) 2011-04-14 09:09:49 UTC
Jesse what about this?
Comment 9 jessevdk@gmail.com 2011-04-15 09:25:27 UTC
I don't know. I don't know enough about the issue of GtkSourceStyle to tell what will be a good solution. I still think we should make it such that we can dynamically alter a style object without any problems.
Comment 10 GNOME Infrastructure Team 2021-07-05 10:59:58 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/

Thank you for your understanding and your help.