denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] The thumbnailer


From: Éloi Rivard
Subject: Re: [Denemo-devel] The thumbnailer
Date: Wed, 15 Jan 2014 10:03:15 +0100

To fit the MVC (this is very basic software design) I believe it is not a good idea to use anything that directly depends on Gtk in the model (i.e. in structures present in include/*.h). Simply to keep the principle of separating GUI and real data, and because in the case we need to use Denemo without a GUI it becomes problematic.

I did not deeply looked at this part of the code, so I am not sure. Don't you think Denemo.textbuffer can be transformed as a gchar*, and be synchronized with a GtkTextBuffer (or GtkSourceView) that would be internal to exportlilypond.c ?


2014/1/14 Richard Shann <address@hidden>
On Tue, 2014-01-14 at 17:34 +0100, Éloi Rivard wrote:
> Do you know why Denemo.textbuffer is a GtkTextBuffer and not a simple
> gchar* ?

See:

src/exportlilypond.c:   gtk_text_view_set_buffer (GTK_TEXT_VIEW
(Denemo.textview), Denemo.textbuffer);

and much else ... it just *is* a GtkTextBuffer for all the reasons that
a GtkTextView requires. What would be an interesting project is to merge
this as a GtkSourceView so that the LilyPond code could benefit from
syntax highlighting, line numbering etc. There could be serious problems
though with the GtkAnchors embedded to navigate from PDF to Denemo.

Richard


>
> 2014/1/14 Éloi Rivard <address@hidden>
>         Ok I did not know that. I get those warnings with this
>         command:
>         src/denemo -n --verbose -a "(d-CreateThumbnail #f)(d-Exit)"
>         tests/integration-data/blank.denemo
>
>
>
>         2014/1/14 Richard Shann <address@hidden>
>                 On Tue, 2014-01-14 at 16:27 +0100, Éloi Rivard wrote:
>                 > 2014/1/14 Richard Shann <address@hidden>
>                 >         The thumbnailer (run on exit from denemo) is
>                 now throwing up a
>                 >         warning
>                 >         dialog saying "No text buffer" when it runs.
>                 > Do you mean it is ran each time you quit denemo ?
>
>
>                 It should run every time you close a file which does
>                 not have an
>                 up-to-date thumbnail. I haven't checked that this is
>                 still working, but
>                 as thumbnails haven't been working for a while nearly
>                 every file I close
>                 provokes this.
>
>                 Richard
>
>
>
>
>
>
>
>         --
>         Éloi Rivard - address@hidden
>
>         « On perd plus à être indécis qu'à se tromper. »
>
>
>
>
> --
> Éloi Rivard - address@hidden
>
> « On perd plus à être indécis qu'à se tromper. »
>





--
Éloi Rivard - address@hidden
       
« On perd plus à être indécis qu'à se tromper. »

reply via email to

[Prev in Thread] Current Thread [Next in Thread]