Re: [Tracker] [PATCH] libtracker-gtk (Gtk widgets for tracker)



On 3/1/07, Michael Biebl <mbiebl gmail com> wrote:
2007/2/28, Michael Biebl <mbiebl gmail com>:
> 2007/2/28, John Stowers <john stowers lists gmail com>:
> > On 3/1/07, Michael Biebl <mbiebl gmail com> wrote:
> > > 2007/2/28, John Stowers <john stowers lists gmail com>:
> > > > On 3/1/07, Michael Biebl <mbiebl gmail com> wrote:
> > > > > Interesting work, John. Looks promising!
> > > > >
> > > > > To actually get libtracker-gtk to compile though, I had to apply a
> > > > > little patch against tracker (attached), which guards against multiple
> > > > > inclusions of tracker.h.
> > > >
> > > > Yeah I included this in my patch also. I guess the first time you
> > > > build libtracker-gtk it uses the system tracker.h and not the one in
> > > > the tree.
> > > >
> > > > Can someone with better autotools knowledge look into this?
> > >
> > > I gladly offer my help here, I just have to know first, how exactly
> > > everything is meant to work:
> > >
> > > 1.) Do you want to develop libtracker-gtk as a separate package or do
> > > you want to have it included in the tracker source tree?
> >
> > Jamie suggested that it lives in the Tracker source tree.
>
> ok, jamie also confirmed that on irc.
>
> > > 2.) If the former, you should use #include <tracker.h>
> > > 3.) If the latter, you should include tracker.h via #include
> > > "../trackerd/tracker.h"
> >
> > Ahh yes, that makes sense (except it would be ../libtracker/tracker.h). Thanks
>
> yeah, but I now see the problem: As you install the header files, you
> don't want to have relative paths, but <> instead. See fix below.
>
> > > I'd also propose to *not* move libtracker-gtk files into
> > > src/tracker-search-tool/ then, but instead create a separate
> > > subdirectory src/libtracker-gtk and install it as a separate library
> > > which can be used by 3rd party applications. The compilation of
> > > src/libtracker-gtk would be optional (via a --enable-libtracker-gtk
> > > configure switch).
> >
> > This is the current behaviour is it not?
>
> Sorry, I was looking at njpatel patch first, which put the files into
> src/tracker-search-tool
>
> > > src/tracker-search-tool/Makefile.am would use
> > > ../src/libtracker-gtk/libtracker-gtk.la and the tracker-search-tool
> > > sources would optionally use libtracker-gtk (via #ifdefs).
> >
> > Neil is preparing a patch so that tracker-search-tool uses the
> > libtracker metadata tile instead of a static one like in the original
> > patch [1]. In that situation I imagine that t-s-t will link with
> > ../src/libtracker-gtk.la as you suggest.
>
> After discussing with jamiecc on irc I prepared a patch, based on
> yours: libtracker-gtk.patch.
> Things I've changed:
> 1.) Fix include path, so src/libtracker/tracker.h is used, not system
> /usr/include/tracker.h
> 2.) Update LICENSE header (new address of GPL hq)
> 3.) I took the liberty to change the license of all files to LGPL v2
> or later (you of course have to acknowledge this) to match the license
> of libtrackerclient.
> 4.) Fix includes, improve consistency.
> 5.) Fix pkg-config file, though it still needs a review.
>
> I also started to port t-s-t to use libtracker-gtk.la and I'm
> attaching the patch in the hope to avoid duplicate work. It doesn't
> compile yet, because I based it no njpatel initial work, which uses
> tracker_metadata_tile_set_file whereas libtracker-gtk now uses
> tracker_metadata_tile_set_uri.
>

I polished src/libtracker-gtk a bit (mostly to use the same
indentation style as the current tracker source code) and attached an
updated patch libtracker-gtk-2.patch.
I also updated t-s-t to optinally [1] use libtracker-gtk. It actually
compiles and runs now.

Awesome. Thanks a lot

Jamie, John: do you think this patch can be merged in this state?
This way, john and njpatel could work against the tracker svn which
would make it easier to keep everything in sync.

I tested your modified patch and everything works fine. I tidied up
the package config file to make 3rd party applications compile
successfully against libtracker-gtk

The minor chage was in the Requires line (libtracker is installed as
tracker not tracker-client and its gtk+-2.0 not gtk-2.0). To slightly
more correct line is

Requires: tracker gtk+-2.0 glib-2.0

Anyway, I attach a simple test case for testing libtracker-gtk, this
builds fiine with the following

gcc `pkg-config --cflags --libs libtracker-gtk` -o test-entry test-entry.c

However to run it needs to be called with

LD_LIBRARY_PATH=/usr/local/lib ./test-entry

This might be my setup or some more autotools business with the library. Ideas?

+1 that this patch is now ready to go in

John

p.s. Sorry about the duplicate emails.

Attachment: test-entry.c
Description: Text Data



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