denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] The thumbnailer


From: Richard Shann
Subject: Re: [Denemo-devel] The thumbnailer
Date: Wed, 15 Jan 2014 18:41:02 +0000

On Wed, 2014-01-15 at 19:03 +0100, Éloi Rivard wrote:
> My separation makes sense: everything that is related to Gtk should
> NOT be part of the model. Else you could not use your model without
> initializing Gtk, and that would mean that separation between the
> model and the view is not correctly done.

I think you need to investigate whether initializing Gtk is necessarily
crossing the line between model and view. As I say, the GtkTextBuffer
object has an entirely independent semantic (independent of using it to
show things to a user that is). Is it a requirement of gtk_init() that a
display exists? I hope not.

> 
> Now I understand this is not how Denemo is built, I saw that for
> example when I replaced several gtk_tree_view by some g_hash_table. 
> If we can use GtkTextBuffer without initializing Gtk, we can probably
> do something here.
> But if GtkTextBuffer needs gtk to be initialized, we are facing a
> problem here, because non interactive mode just don't initialize Gtk.
> I can see several solutions :
> 
> - Initialize Gtk even in non interactive mode. A bad idea I think,
> because it would mean that we get rid of travis, and it would prevent
> denemo to be used to do some batch processing in machines that don't
> have graphic interface.
> 
> - Make thumbnail generation a special case where Gtk is actually
> initalized, but the graphical interface is not.
> 
> - Use an Gtk independant structure to store the lilypond code. I think
> that would be the cleaner way.

but would require copying data and the code to do that and to define the
stucture read it and write it. It is only cleaner if GtkTextBuffer not
simply an abstract data structure with access functions having nothing
to with the user's view of the data.

Richard







reply via email to

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