! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
gtksourceview warnings/errors
Status:
RESOLVED: FIXED
Product:
Mousepad
Component:
General

Comments

Description Yves-Alexis Perez editbugs 2015-03-08 22:08:58 CET
Hi,

the 0.4.0 release shows some errors on stderr:

(mousepad:16337): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:16337): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:16337): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:16337): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:16337): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(this is loading a python file, not sure if it's relevant or not). I've selected the Tango scheme.
Comment 1 Matthew Brush editbugs 2015-03-08 22:35:12 CET
Weird, I can't reproduce here. How is your Mousepad build configured and which version of GtkSourceView are you linking against?
Comment 2 Yves-Alexis Perez editbugs 2015-03-08 22:38:34 CET
(In reply to Matthew Brush from comment #1)
> Weird, I can't reproduce here. How is your Mousepad build configured and
> which version of GtkSourceView are you linking against?

Default options, gtksourceview is 2.10.5-2
Comment 3 Andre Miranda editbugs 2015-03-09 02:02:41 CET
Mousepad 0.4.0 from repo(Arch):
no warnings

Build from git w/ GTK3(lots of deprecation warnings during build):
** (mousepad:6860): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

(mousepad:6860): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 61 and height -3


Build from git w/ GTK2(no warning during build):
no warnings

gtksourceview2 2.10.5-3
gtksourceview3 3.14.3-1
Comment 4 Evangelos Foutras 2015-03-14 22:51:01 CET
I get these warnings when "Colour scheme" is set to "None".
Comment 5 Andre Miranda editbugs 2015-03-21 03:12:33 CET
Bug 11678, related or duplicate?
Now I can reproduce this bug when no theme is selected(None) and when opening a file with root(endless warnings).
Comment 6 Matthew Brush editbugs 2015-07-09 06:07:01 CEST
This should be fixed with: http://git.xfce.org/apps/mousepad/commit/?id=73c93369f7708ab89c46e67e7933b835aafa6811

Please re-open if not.
Comment 7 Andre Miranda editbugs 2015-07-09 14:14:13 CEST
I've just cloned and built the source with GTK3, but whenever I change the theme to None, this warning comes up:
(mousepad:16351): GtkSourceView-CRITICAL **: _gtk_source_style_scheme_apply: assertion 'GTK_SOURCE_IS_STYLE_SCHEME (scheme)' failed
Comment 8 Matthew Brush editbugs 2015-07-09 14:56:17 CEST
(In reply to André Miranda from comment #7)
> I've just cloned and built the source with GTK3, but whenever I change the
> theme to None, this warning comes up:
> (mousepad:16351): GtkSourceView-CRITICAL **: _gtk_source_style_scheme_apply:
> assertion 'GTK_SOURCE_IS_STYLE_SCHEME (scheme)' failed

I see it too. It seems to stem from a call to `gtk_source_buffer_set_style_scheme()` (mousepad-view.c:262) passing a NULL scheme, which is supposed to be allowed according to the docs, in order to use no scheme. The actual assertion seems to be triggered indirectly after GSV changes its style-scheme property on GtkSourceBuffer.
Comment 9 Matthew Brush editbugs 2015-07-09 15:15:34 CEST
(In reply to Matthew Brush from comment #8)
> (In reply to André Miranda from comment #7)
> > I've just cloned and built the source with GTK3, but whenever I change the
> > theme to None, this warning comes up:
> > (mousepad:16351): GtkSourceView-CRITICAL **: _gtk_source_style_scheme_apply:
> > assertion 'GTK_SOURCE_IS_STYLE_SCHEME (scheme)' failed
> 
> I see it too. It seems to stem from a call to
> `gtk_source_buffer_set_style_scheme()` (mousepad-view.c:262) passing a NULL
> scheme, which is supposed to be allowed according to the docs, in order to
> use no scheme. The actual assertion seems to be triggered indirectly after
> GSV changes its style-scheme property on GtkSourceBuffer.

Yeah, all the code paths leading up to `_gtk_source_style_scheme_apply()` support using a NULL scheme, that is, they do:

    g_return_if_fail(GTK_SOURCE_IS_STYLE_SCHEME(scheme) || scheme == NULL);

And then when they eventually pass the NULL scheme to `_gtk_source_style_scheme_apply()` it does this kind of assertion:

https://git.gnome.org/browse/gtksourceview/tree/gtksourceview/gtksourcestylescheme.c?id=8f31c660dd66fe279a812d753ed45bf026ad7004#n740
Comment 10 Andre Miranda editbugs 2015-07-09 16:12:01 CEST
So, is it a GtkSourceView bug? If so, are going to file a bug report?
Comment 11 Matthew Brush editbugs 2015-07-10 01:47:43 CEST
(In reply to André Miranda from comment #10)
> So, is it a GtkSourceView bug? If so, are going to file a bug report?

I think, but am not 100% sure. I tried to reproduce with Gedit but it seems to not allow to completely disable highlighting (maybe mousepad should do this too?). I asked on IRC and sent the back trace to one GSV devs, if he doesn't respond by tomorrow, I'll try and remember to file a bug.
Comment 12 Matthew Brush editbugs 2015-07-10 03:38:17 CEST
*** Bug 11678 has been marked as a duplicate of this bug. ***
Comment 13 Charles Williams 2015-10-06 19:01:41 CEST
This is not fixed.  I am not sure why it says RESOLVED FIXED.  Error loop when signed in as root still causes this issue and makes MousePad unusable.  

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

(mousepad:8926): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:8926): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:8926): dconf-WARNING **: failed to commit changes to dconf: The connection is closed

Keeps going and going.
Comment 14 Matthew Brush editbugs 2015-10-07 01:38:39 CEST
*** Bug 12245 has been marked as a duplicate of this bug. ***
Comment 15 Bernhard Landauer 2016-01-06 00:57:18 CET
Created attachment 6575 
fix default color-scheme

Empty color scheme produces errors. You can easily verify with dconf-editor when you set color-scheme in org.xfce.mousepad.preferences.view to default.
The fix will not be effective on existing installs immediately, because dconf needs to be rewritten for the user, unfortunately...
Comment 16 Bernhard Landauer 2016-01-06 01:01:03 CET
Workaround for existing installs is to simply set color scheme  in Edit > Preferences > View to anything other than 'None'.
Comment 17 Matthew Brush editbugs 2016-01-06 04:48:03 CET
(In reply to Bernhard Landauer from comment #15)
> Created attachment 6575 
> fix default color-scheme
> 
> Empty color scheme produces errors. You can easily verify with dconf-editor
> when you set color-scheme in org.xfce.mousepad.preferences.view to default.
> The fix will not be effective on existing installs immediately, because
> dconf needs to be rewritten for the user, unfortunately...

The problem with this patch/workaround, is that it's intentional that no colour scheme be active by default. I would really like to find a solution that allows the colour scheme to be set to None (and by default).
Comment 18 Andre Miranda editbugs 2016-01-06 05:06:42 CET
(In reply to Matthew Brush from comment #17)
> (In reply to Bernhard Landauer from comment #15)
> > Created attachment 6575 
> > fix default color-scheme
> > 
> > Empty color scheme produces errors. You can easily verify with dconf-editor
> > when you set color-scheme in org.xfce.mousepad.preferences.view to default.
> > The fix will not be effective on existing installs immediately, because
> > dconf needs to be rewritten for the user, unfortunately...
> 
> The problem with this patch/workaround, is that it's intentional that no
> colour scheme be active by default. I would really like to find a solution
> that allows the colour scheme to be set to None (and by default).

But it seems like the gtk guys have made this choice for us. Besides dropping the 'None' schema in favor of 'Classic' as default the other solution I can think of is (warning: kludge ahead) to create a theme called 'none.xml', install it in /<prefix>/share/mousepad and then use gtk_source_style_scheme_manager_append_search_path to find it.
Comment 19 Matthew Brush editbugs 2016-01-06 05:32:59 CET
(In reply to André Miranda from comment #18)
> (In reply to Matthew Brush from comment #17)
> > (In reply to Bernhard Landauer from comment #15)
> > > Created attachment 6575 
> > > fix default color-scheme
> > > 
> > > Empty color scheme produces errors. You can easily verify with dconf-editor
> > > when you set color-scheme in org.xfce.mousepad.preferences.view to default.
> > > The fix will not be effective on existing installs immediately, because
> > > dconf needs to be rewritten for the user, unfortunately...
> > 
> > The problem with this patch/workaround, is that it's intentional that no
> > colour scheme be active by default. I would really like to find a solution
> > that allows the colour scheme to be set to None (and by default).
> 
> But it seems like the gtk guys have made this choice for us. Besides
> dropping the 'None' schema in favor of 'Classic' as default the other
> solution I can think of is (warning: kludge ahead) to create a theme called
> 'none.xml', install it in /<prefix>/share/mousepad and then use
> gtk_source_style_scheme_manager_append_search_path to find it.

Oh, I didn't realize it was an intentional change upstream.

If that's the case, then putting Classic as the default would be OK I guess. Seems silly that GtkSourceView devs would intentionally limit the usefulness of the library like that (forcing people to use highlighting even if they only wanted to use other features that don't exist in GtkTextView). I guess I should stop scratching my head over crazy GNOMEy decisions, I will drive myself mad :)
Comment 20 Andre Miranda editbugs 2016-01-06 05:48:13 CET
(In reply to Matthew Brush from comment #19)
> Oh, I didn't realize it was an intentional change upstream.
> 
> If that's the case, then putting Classic as the default would be OK I guess.
> Seems silly that GtkSourceView devs would intentionally limit the usefulness
> of the library like that (forcing people to use highlighting even if they
> only wanted to use other features that don't exist in GtkTextView). I guess
> I should stop scratching my head over crazy GNOMEy decisions, I will drive
> myself mad :)

I have no evidence that it was intentional, perhaps I should have written my sentence as "... it seems to me...". It was more a rant than an affirmation, just asking the devs to be sure, although I really don't believe it wasn't a deliberate move considering the latest stance of gtk only focusing on gnome and ignoring the community.
Comment 21 Bernhard Landauer 2016-01-06 13:28:39 CET
kludge or not, I think having a none.xml is an excellent idea! And it will even fix the errors on existing installs with their current dconf settings :)
Comment 22 Andre Miranda editbugs 2016-01-22 13:28:31 CET
Created attachment 6584 
Patch to add none.xml style(WIP)

Here's the patch implementing my proposed workaround. It works but it's far from elegant.
I've filed a bug on GSV's bugzilla[1], I hope there's a cleaner way to disable highlighting.

1 - https://bugzilla.gnome.org/show_bug.cgi?id=760984
Comment 23 Andre Miranda editbugs 2016-06-17 03:36:15 CEST
Hello folks,
The guys over gtksourceview have fixed the problem recently.
As suggested by Sébastien Wilmet, here is the fix necessary for mousepad:
https://github.com/andreldm/mousepad/commit/63ccbaaaefeb7ea1814c72b12b58e2f2239ebd27

The fix works with gtksourceview 3.20 but there's a small glitch as discussed on upstream bug. Using gtksourceview from git completely solves the problem here.
Comment 24 Matthew Brush editbugs 2016-06-17 04:18:20 CEST
(In reply to André Miranda from comment #23)
> Hello folks,
> The guys over gtksourceview have fixed the problem recently.

Thanks for the update.

> As suggested by Sébastien Wilmet, here is the fix necessary for mousepad:
> https://github.com/andreldm/mousepad/commit/
> 63ccbaaaefeb7ea1814c72b12b58e2f2239ebd27
> 

It looks good to me.

> The fix works with gtksourceview 3.20 but there's a small glitch as
> discussed on upstream bug. Using gtksourceview from git completely solves
> the problem here.

Maybe the patch you made could be guarded with `#if GTK_SOURCE_CHECK_VERSION(...)` so that until whichever is the next GtkSourceView release version, it won't kick-in. IMO, terminal spamming is better than glitchy syntax highlighting.
Comment 25 Andre Miranda editbugs 2016-06-18 20:37:52 CEST
(In reply to Matthew Brush from comment #24)
> Maybe the patch you made could be guarded with `#if
> GTK_SOURCE_CHECK_VERSION(...)` so that until whichever is the next
> GtkSourceView release version, it won't kick-in. IMO, terminal spamming is
> better than glitchy syntax highlighting.

I agree, but GTK_SOURCE_CHECK_VERSION[1] is only available since version 3.20.

1 - https://github.com/GNOME/gtksourceview/blob/master/gtksourceview/gtksourceversion.h.in#L76
Comment 26 Matthew Brush editbugs 2016-06-18 22:06:57 CEST
(In reply to André Miranda from comment #25)
> (In reply to Matthew Brush from comment #24)
> > Maybe the patch you made could be guarded with `#if
> > GTK_SOURCE_CHECK_VERSION(...)` so that until whichever is the next
> > GtkSourceView release version, it won't kick-in. IMO, terminal spamming is
> > better than glitchy syntax highlighting.
> 
> I agree, but GTK_SOURCE_CHECK_VERSION[1] is only available since version
> 3.20.
> 
> 1 -
> https://github.com/GNOME/gtksourceview/blob/master/gtksourceview/
> gtksourceversion.h.in#L76

Oh, bummer. We could use Autotools to give the version and define something so the code knows, maybe like (untested pseudo-code):

PKG_CHECK_MODULES([GSV], [gtksourceview-3.0 >= 3.20], [
  CPPFLAGS="$CPPFLAGS -DMOUSEPAD_GSV_320"
], [
  PKG_CHECK_MODULES([GSV], [gtksourceview-3.0])
])
Comment 27 Matthew Brush editbugs 2016-06-18 22:08:45 CEST
(In reply to Matthew Brush from comment #26)
> (In reply to André Miranda from comment #25)
> > (In reply to Matthew Brush from comment #24)
> > > Maybe the patch you made could be guarded with `#if
> > > GTK_SOURCE_CHECK_VERSION(...)` so that until whichever is the next
> > > GtkSourceView release version, it won't kick-in. IMO, terminal spamming is
> > > better than glitchy syntax highlighting.
> > 
> > I agree, but GTK_SOURCE_CHECK_VERSION[1] is only available since version
> > 3.20.
> > 
> > 1 -
> > https://github.com/GNOME/gtksourceview/blob/master/gtksourceview/
> > gtksourceversion.h.in#L76
> 
> Oh, bummer. We could use Autotools to give the version and define something
> so the code knows, maybe like (untested pseudo-code):
> 
> PKG_CHECK_MODULES([GSV], [gtksourceview-3.0 >= 3.20], [
>   CPPFLAGS="$CPPFLAGS -DMOUSEPAD_GSV_320"
> ], [
>   PKG_CHECK_MODULES([GSV], [gtksourceview-3.0])
> ])

Or less stupidly, in C code:

#ifdef GTK_SOURCE_VIEW_CHECK_VERSION
// ... that code ...
#else
// ... old code ...
#endif
Comment 28 Andre Miranda editbugs 2016-07-26 04:35:04 CEST
Matt, sorry for the long delay, here is what I able to put together:
https://github.com/andreldm/mousepad/commit/770d28edddd13838ab578c40c20627bdebb3dd2c

I have tested with GtkSourceView 3.21.3(Manjaro), 3.20.4(Arch Linux) and 3.16.1 (Xubuntu), nevertheless please give it a try before we push to master.
Comment 29 Yaron Shahrabani 2018-05-21 12:30:51 CEST
This is what I'm experiencing with Manjaro 17.1.10 (Hakoila):

$ mousepad

(mousepad:16013): Gtk-WARNING **: 13:24:49.044: Theme parsing error: <data>:2:29: The style property GtkButton:default-border is deprecated and shouldn't be used anymore. It will be removed in a future version

(mousepad:16013): Gtk-WARNING **: 13:24:49.044: Theme parsing error: <data>:3:37: The style property GtkButton:default-outside-border is deprecated and shouldn't be used anymore. It will be removed in a future version

(mousepad:16013): Gtk-WARNING **: 13:24:49.044: Theme parsing error: <data>:4:27: The style property GtkButton:inner-border is deprecated and shouldn't be used anymore. It will be removed in a future version

(mousepad:16013): Gtk-WARNING **: 13:24:49.044: Theme parsing error: <data>:5:31: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version

(mousepad:16013): Gtk-WARNING **: 13:24:49.044: Theme parsing error: <data>:6:28: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version

Mousepad version 0.4.0
XFCE version 4.12
gtksourceview2 2.10.5-3
gtksourceview3 3.24.7-1

Is the discussed patch released? How can I get the fixed version?
Comment 30 Andre Miranda editbugs 2018-05-23 02:53:40 CEST
No, that patch hasn't been merged yet...
If Matthew agrees I can push to master.
Comment 31 Git Bot editbugs 2019-04-25 02:23:58 CEST
Andre Miranda referenced this bugreport in commit 9eca13db68144c9f4e57f08e711e4d2963fa4c4c

Fix gtksourceview warnings/errors (Bug 11663)

https://git.xfce.org/apps/mousepad/commit?id=9eca13db68144c9f4e57f08e711e4d2963fa4c4c

Bug #11663

Reported by:
Yves-Alexis Perez
Reported on: 2015-03-08
Last modified on: 2019-04-25
Duplicates (2):
  • 11678 Mousepad 0.4.0 Terminal Error
  • 12245 Mousepad cannot be ran as root - Error loop

People

Assignee:
Matthew Brush
CC List:
8 users

Version

Version:
Unspecified
Target Milestone:
Mousepad 0.2.x

Attachments

fix default color-scheme (615 bytes, patch)
2016-01-06 00:57 CET , Bernhard Landauer
no flags
Patch to add none.xml style(WIP) (4.17 KB, patch)
2016-01-22 13:28 CET , Andre Miranda
no flags

Additional information