Commit 11351025 authored by Jamie McCracken's avatar Jamie McCracken

updates

svn path=/trunk/; revision=503
parent da559a80
......@@ -25,3 +25,5 @@ Dan Nicolaescu <dann at ics uci edu>
Nate Nielsen <nielsen at memberwewbs com>
Saleem Abdulrasool <compnerd at gentoo org>
Tshepang Lekhonkhobe <tshepang@gmail.com>
John Stowers <john.stowers@gmail.com>
Neil Patel <njpatel@gmail.com>
2007-03-01 Jamie McCracken <jamiemcc at gnome org>
* Made configure auto build stuff like libtracker-gtk if dependencies are met
* changed --enable-preferences to --disable-preferences
2007-03-01 patch from Michael Biebl <mbiebl at gmail com>
* Cleaned up libtracker-gtk with John Stowers
2007-03-01 patch from John Stowers <john.stowers@gmail.com>
* Add libtracker-gtk
2007-02-28 Jamie McCracken <jamiemcc at gnome org>
......
......@@ -2,9 +2,14 @@ SUBDIRS = data src filters thumbnailers docs po
pkgconfigdir = $(libdir)/pkgconfig
xdgconfigdir = $(sysconfdir)/xdg/autostart
pkgconfig_DATA = tracker.pc
xdgconfig_DATA = trackerd.desktop
pkgconfig_DATA = tracker.pc
if ENABLE_LIBTRACKERGTK
pkgconfig_DATA += libtracker-gtk.pc
endif
if USING_DESKBAR_APPLET
handlerdir = $(DESKBAR_HANDLER_DIR)
handler_DATA = python/deskbar-handler/tracker-handler.py
......
......@@ -3,7 +3,7 @@
# This file is part of Tracker.
AC_PREREQ(2.57)
AC_INIT([tracker],[0.5.4],[tracker-list@gnome.org])
AC_INIT([tracker],[0.6.0],[tracker-list@gnome.org])
AC_CONFIG_SRCDIR([src/trackerd/trackerd.c])
AM_INIT_AUTOMAKE([dist-bzip2])
......@@ -399,6 +399,35 @@ elif test "$primary_backend" = "fam"; then
AC_SUBST(FAM_LIBS)
fi
##################################################################
# Enable building libtracker-gtk?
##################################################################
LIBTRACKERGTK_GTK_REQUIRED=2.8.20
AC_ARG_ENABLE([libtrackergtk], AC_HELP_STRING([--disable-libtrackergtk], [Disable libtrackergtk]),,[enable_libtrackergtk=yes])
if test "x$enable_libtrackergtk" != "xno" ; then
libtrackergtk_modules="\
glib-2.0 >= $GLIB_REQUIRED, \
gtk+-2.0 >= $LIBTRACKERGTK_GTK_REQUIRED, \
dbus-1 >= $DBUS_REQUIRED, \
dbus-glib-1 >= $DBUS_REQUIRED"
PKG_CHECK_MODULES(LIBTRACKERGTK, [$libtrackergtk_modules],[enable_libtrackergtk=yes] , [enable_libtrackergtk=no])
AC_SUBST([LIBTRACKERGTK_CFLAGS])
AC_SUBST([LIBTRACKERGTK_LIBS])
else
enable-libtrackergtk="no (disabled)"
fi
AM_CONDITIONAL(ENABLE_LIBTRACKERGTK, test "$enable-libtrackergtk" != "no")
##################################################################
# check for GNOME/GTK dependencies to build tracker search tool (Gnome client)
##################################################################
......@@ -439,39 +468,56 @@ if test "x$enable_gui" = "xyes"; then
else
have_gnome="no (disabled)"
fi
# do not build if libtracker-gtk is not being built
if test "x$enable_libtrackergtk" = "yes"; then
have_gnome="no (disabled as libtracker-gtk is not being built)"
fi
AM_CONDITIONAL(HAVE_GNOME, test "$have_gnome" = "yes")
if test "$have_gnome" = "yes"; then
GNOME_COMMON_INIT
fi
##################################################################
# Checks for tracker-preferences
##################################################################
PREFERENCES_GTK_REQUIRED=2.8.0
PREFERENCES_GLIB_REQUIRED=2.10
PREFERENCES_GLADE_REQUIRED=2.6
AC_ARG_ENABLE([preferences],
AC_HELP_STRING([--enable-preferences], [Enable the preferences dialog]),,
[enable_preferences=no])
AC_HELP_STRING([--disable-preferences], [Disable the preferences dialog]),,
[enable_preferences=yes])
if test "x$enable_preferences" != "xno" ; then
PKG_CHECK_MODULES(GTK2, [ gtk+-2.0 >= $PREFERENCES_GTK_REQUIRED ])
AC_SUBST([GTK2_CFLAGS])
AC_SUBST([GTK2_LIBS])
PKG_CHECK_MODULES(GLIB2, [ glib-2.0 >= $PREFERENCES_GLIB_REQUIRED ])
AC_SUBST([GLIB2_CFLAGS])
AC_SUBST([GLIB2_LIBS])
PKG_CHECK_MODULES(GLIB2, [ glib-2.0 >= $PREFERENCES_GLIB_REQUIRED ],[enable_preference=yes] , [enable_preference=no])
AC_SUBST([GLIB2_CFLAGS])
AC_SUBST([GLIB2_LIBS])
PKG_CHECK_MODULES(LIBGLADE, [ libglade-2.0 >= $PREFERENCES_GLADE_REQUIRED ])
AC_SUBST([LIBGLADE_CFLAGS])
AC_SUBST([LIBGLADE_LIBS])
if test "$enable_preferences" = "yes"; then
PKG_CHECK_MODULES(GTK2, [ gtk+-2.0 >= $PREFERENCES_GTK_REQUIRED ],[enable_preference=yes] , [enable_preference=no])
AC_SUBST([GTK2_CFLAGS])
AC_SUBST([GTK2_LIBS])
fi
if test "$enable_preferences" = "yes"; then
PKG_CHECK_MODULES(LIBGLADE, [ libglade-2.0 >= $PREFERENCES_GLADE_REQUIRED ], [enable_preferences=yes], [enable_preferences=no])
AC_SUBST([LIBGLADE_CFLAGS])
AC_SUBST([LIBGLADE_LIBS])
fi
else
enable-preferences="no (disabled)"
fi
AM_CONDITIONAL(ENABLE_PREFERENCES, test "$enable_preferences" != "no")
##################################################################
# check for poppler's glib bingings
##################################################################
......@@ -559,6 +605,7 @@ AC_MSG_RESULT([$ioprio_support])
AC_CONFIG_FILES([
Makefile
tracker.pc
libtracker-gtk.pc
docs/Makefile
data/Makefile
data/languages/Makefile
......@@ -578,6 +625,7 @@ AC_CONFIG_FILES([
src/tracker-thumbnailer/Makefile
src/trackerd/Makefile
src/libtracker/Makefile
src/libtracker-gtk/Makefile
src/tracker-search-tool/Makefile
src/tracker-preferences/Makefile
src/xdgmime/Makefile
......@@ -602,6 +650,7 @@ Tracker-$VERSION:
ioprio support: $ioprio_support
build search tool (GNOME): $have_gnome
build preferences ui: $enable_preferences
build libtracker-gtk: $enable_libtrackergtk
Metadata extractors:
......
......@@ -10,5 +10,9 @@ if ENABLE_PREFERENCES
tracker_preferences_dir = tracker-preferences
endif
SUBDIRS = libstemmer xdgmime $(sqlite_dir) text-filters trackerd libtracker tracker-extract tracker-thumbnailer $(tracker_gui_dir) $(tracker_preferences_dir)
if ENABLE_LIBTRACKERGTK
libtrackergtk_dir = libtracker-gtk
endif
SUBDIRS = libstemmer xdgmime $(sqlite_dir) text-filters trackerd libtracker tracker-extract tracker-thumbnailer $(libtrackergtk_dir) $(tracker_gui_dir) $(tracker_preferences_dir)
......@@ -17,6 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef TRACKER_H
#define TRACKER_H
#include "tracker-client.h"
typedef void (*TrackerArrayReply) (char **result, GError *error, gpointer user_data);
......@@ -198,3 +201,5 @@ void tracker_search_metadata_by_text_async (TrackerClient *client, const cha
void tracker_search_metadata_by_text_and_mime_async (TrackerClient *client, const char *query, const char **mimes, TrackerArrayReply callback, gpointer user_data);
void tracker_search_metadata_by_text_and_mime_and_location_async (TrackerClient *client, const char *query, const char **mimes, const char *location, TrackerArrayReply callback, gpointer user_data);
void tracker_search_metadata_by_text_and_location_async (TrackerClient *client, const char *query, const char *location, TrackerArrayReply callback, gpointer user_data);
#endif /* TRACKER_H */
#@INTLTOOL_DESKTOP_RULE@
bin_PROGRAMS = tracker-preferences
icondir = $(datadir)/pixmaps
......@@ -5,7 +7,7 @@ desktopdir = $(datadir)/applications
desktop_in_files = tracker-preferences.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
icon_DATA = tracker.png
pkgdata_DATA = tracker-preferences.glade
......
......@@ -7,3 +7,4 @@ Exec=tracker-preferences
Terminal=false
Type=Application
Categories=Settings;
StartupNotify=false
......@@ -23,6 +23,9 @@ bin_PROGRAMS = tracker-search-tool
#schema_in_file = tracker-search-tool.schemas.in
#schema_DATA = $(schema_in_file:.schemas.in=.schemas)
if ENABLE_LIBTRACKERGTK
TRACKERGTK_LIBS=$(top_builddir)/src/libtracker-gtk/libtracker-gtk.la
endif
tracker_search_tool_SOURCES = \
tracker-search-tool-support.c \
......@@ -40,6 +43,7 @@ tracker_search_tool_LDADD = \
$(GNOMEVFS_LIBS) \
$(GNOMEDESKTOP_LIBS) \
$(DBUS_LIBS) \
$(TRACKERGTK_LIBS) \
$(top_builddir)/src/libtracker/libtrackerclient.la
#man_MANS = tracker-search-tool.1
......
......@@ -48,6 +48,9 @@
#include "tracker-search-tool.h"
#include "tracker-search-tool-callbacks.h"
#include "tracker-search-tool-support.h"
#ifdef ENABLE_LIBTRACKERGTK
#include "../libtracker-gtk/tracker-metadata-tile.h"
#endif /* ENABLE_LIBTRACKERGTK */
#define SILENT_WINDOW_OPEN_LIMIT 5
......@@ -390,7 +393,48 @@ select_changed_cb (GtkTreeSelection *treeselection, gpointer user_data)
}
#ifdef ENABLE_LIBTRACKERGTK
void
update_metadata_tile (GSearchWindow *gsearch)
{
GtkTreeModel * model;
GList * list;
guint index;
if (gtk_tree_selection_count_selected_rows (GTK_TREE_SELECTION (gsearch->search_results_selection)) == 0) {
return;
}
list = gtk_tree_selection_get_selected_rows (GTK_TREE_SELECTION (gsearch->search_results_selection),
&model);
for (index = 0; index < g_list_length (list); index++) {
gboolean no_files_found = FALSE;
gchar *uri;
gchar *mime;
GdkPixbuf *pixbuf;
GtkTreeIter iter;
gtk_tree_model_get_iter (GTK_TREE_MODEL (gsearch->search_results_list_store), &iter,
g_list_nth (list, index)->data);
gtk_tree_model_get (GTK_TREE_MODEL (gsearch->search_results_list_store), &iter,
COLUMN_ICON, &pixbuf,
COLUMN_URI, &uri,
COLUMN_TYPE, &mime,
COLUMN_NO_FILES_FOUND, &no_files_found,
-1);
tracker_metadata_tile_set_uri (TRACKER_METADATA_TILE (gsearch->metatile), uri, mime, pixbuf);
g_free (uri);
}
g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
g_list_free (list);
}
#endif /* ENABLE_LIBTRACKERGTK */
void
open_file_cb (GtkAction * action,
......@@ -1003,6 +1047,10 @@ file_button_release_event_cb (GtkWidget * widget,
}
}
}
#ifdef ENABLE_LIBTRACKERGTK
update_metadata_tile (gsearch);
#endif /* ENABLE_LIBTRACKERGTK */
return FALSE;
}
......
......@@ -48,6 +48,9 @@
#include "tracker-search-tool-callbacks.h"
#include "tracker-search-tool-support.h"
#include "sexy-icon-entry.h"
#ifdef ENABLE_LIBTRACKERGTK
#include "../libtracker-gtk/tracker-metadata-tile.h"
#endif /* ENABLE_LIBTRACKERGTK */
#define TRACKER_SEARCH_TOOL_DEFAULT_ICON_SIZE 32
#define TRACKER_SEARCH_TOOL_STOCK "panel-searchtool"
......@@ -2668,6 +2671,12 @@ gsearch_app_create (GSearchWindow * gsearch)
gtk_widget_set_sensitive (gsearch->forward_button, FALSE);
gtk_widget_set_sensitive (gsearch->back_button, FALSE);
#ifdef ENABLE_LIBTRACKERGTK
/* metadata_tile */
gsearch->metatile = tracker_metadata_tile_new ();
gtk_widget_show (gsearch->metatile);
gtk_box_pack_start (GTK_BOX (main_container), gsearch->metatile, FALSE, FALSE, 0);
#endif /* ENABLE_LIBTRACKERGTK */
gtk_window_set_focus (GTK_WINDOW (gsearch->window),
GTK_WIDGET (gsearch->search_entry));
......
......@@ -28,6 +28,10 @@
#ifndef _GSEARCHTOOL_H_
#define _GSEARCHTOOL_H_
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef __cplusplus
extern "C" {
#pragma }
......@@ -35,6 +39,12 @@ extern "C" {
#include <gconf/gconf.h>
#include <gconf/gconf-client.h>
#ifdef ENABLE_LIBTRACKERGTK
#include <gnome.h>
#include <libgnomevfs/gnome-vfs-mime.h>
#include <libgnomevfs/gnome-vfs-ops.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#endif /* ENABLE_LIBTRACKERGTK */
#include "../libtracker/tracker.h"
#define MAX_SEARCH_RESULTS 10
......@@ -111,8 +121,9 @@ struct _GSearchWindow {
int current_page;
int type;
service_info_t *current_service;
#ifdef ENABLE_LIBTRACKERGTK
GtkWidget *metatile;
#endif /* ENABLE_LIBTRACKER_GTK */
GtkWidget *no_results_label;
GtkWidget *initial_label;
GtkWidget *count_label;
......
......@@ -95,6 +95,10 @@ void
tracker_db_email_insert_junk (DBConnection *db_con, const char *mbox_uri, guint32 uid)
{
int mbox_id = tracker_db_email_get_mbox_id (db_con, mbox_uri);
if (mbox_id == -1) {
return;
}
char *str_mbox_id = tracker_int_to_str (mbox_id);
char *str_uid = tracker_uint_to_str (uid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment