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 742862 - Replace GbSourceStyleSchemeButton with GtkSourceStyleSchemeChooserButton
Replace GbSourceStyleSchemeButton with GtkSourceStyleSchemeChooserButton
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: preferences
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-13 14:56 UTC by Dimitris Zenios
Modified: 2015-01-13 21:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
replace GbSourceStyleSchemeButton with GtkSourceStyleSchemeChooserButton (31.54 KB, patch)
2015-01-13 15:08 UTC, Dimitris Zenios
committed Details | Review

Description Dimitris Zenios 2015-01-13 14:56:21 UTC
Now that GtkSourceView has support for a style scheme chooser widget we can replace our own implementation (GbSourceStyleSchemeButton) with GtkSourceView implementation (GtkSourceStyleSchemeChooserButton)
Comment 1 Igor Gnatenko 2015-01-13 14:57:59 UTC
I agree with this.
Comment 2 Dimitris Zenios 2015-01-13 15:08:18 UTC
Created attachment 294439 [details] [review]
replace GbSourceStyleSchemeButton with GtkSourceStyleSchemeChooserButton

GtkSourceStyleSchemeChooserButton does not have a "style-scheme-name" property to bind directly to our gsettings like our previous implementation.For this reason I had to use g_signal_connect with "notify::style-scheme" signal and set the key "style-scheme-name" on gsettings manually.
Comment 3 Igor Gnatenko 2015-01-13 15:16:07 UTC
Review of attachment 294439 [details] [review]:

Other looks good. Let's wait what Christian will say.

::: src/preferences/gb-preferences-page-editor.c
@@ +65,3 @@
+  scheme = gtk_source_style_scheme_chooser_get_style_scheme (chooser);
+  scheme_id = gtk_source_style_scheme_get_id (scheme);
+  g_settings_set_string (settings,"style-scheme-name", scheme_id);

missed space after ','
Comment 4 Christian Hergert 2015-01-13 21:17:38 UTC
Thanks!