Re: Sharing widgets between GNOME 3 applications



Hey Debarshi,

On Mon, 2012-05-07 at 13:45 +0000, Debarshi Ray wrote:

> We may benefit from having a way to share these widgets among the
> applications.  Currently, what I have been doing, for gnome-photos, is
> to copy-paste the *.c/*.h files from the gnome-documents tree.
> 
> One downside of doing this is that the gnome-photos binary has some
> dead code which will never be executed. For example the code path that
> implements the "list view" for Documents, which is not necessary for
> Photos. So all the classes implementing it need to be copied over into
> the gnome-photos tree to avoid maintaining a fork of the GdMainView
> widget.
> 
> Currently it is not so much of a practical problem, but I am curious
> to know if people have better ideas about this.

Yeah, I agree we could do better. I don't think another shared library
would be the best solution though; maybe a better approach could be
splitting these common bits in a separate git module and have projects
import it using git submodule [1] (or git subtree? [2]).
This way, maintenance of the common bits could still be managed in a
single place, and different projects could even depend on different
revisions of the shared code if they want (I believe if we use git
subtree this could go as far as even maintaining an additional patchset
on top of the shared tree).
What do you think?

[1] http://git-scm.com/book/en/Git-Tools-Submodules
[2] http://git-scm.com/book/en/Git-Tools-Subtree-Merging



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