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 650246 - changing color scheme with multiple documents open in gedit
changing color scheme with multiple documents open in gedit
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-15 19:25 UTC by Edward Sheldrake
Modified: 2011-07-01 16:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of gedit after changing from cobalt to classic color scheme (31.07 KB, image/png)
2011-05-15 19:25 UTC, Edward Sheldrake
  Details
possible fix (2.80 KB, patch)
2011-05-15 19:32 UTC, Edward Sheldrake
none Details | Review

Description Edward Sheldrake 2011-05-15 19:25:39 UTC
Created attachment 187861 [details]
screenshot of gedit after changing from cobalt to classic color scheme

Changing the color scheme in gedit does not work properly when multiple documents are open. The problem can be seen when changing from a dark theme to a light theme e.g. from Cobalt to Classic or from Oblivion to Tango. The dark background and light text remain, but the line numbers and current line highlight color change.

gedit 3.0.2
gtksourceview 3.0.1

Steps to reproduce:
1. Open more than one tab in gedit
2. Change color scheme to Cobalt
3. Change color scheme to Classic
Comment 1 Edward Sheldrake 2011-05-15 19:32:45 UTC
Created attachment 187863 [details] [review]
possible fix

Here is my attempt it a fix. It separates creating the GtkCssProvider from applying it to widgets, and uses some reference counting and g_object_add_weak_pointer, so that the same GtkCssProvider object can be properly applied and removed from all the widgets.
Comment 2 Edward Sheldrake 2011-07-01 16:07:05 UTC
Fixed a different way in gtksourceview 3.0.5.
Comment 3 Ignacio Casal Quinteiro (nacho) 2011-07-01 16:32:37 UTC
Thanks for reporting. :)