--- contacts-snapshot-0.5.orig/missing +++ contacts-snapshot-0.5/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2006-05-10.23 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -33,6 +33,8 @@ fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +46,7 @@ msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,6 +79,7 @@ aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -106,7 +109,7 @@ # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). -case "$1" in +case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; @@ -135,7 +138,7 @@ # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -164,7 +167,7 @@ test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -192,8 +195,8 @@ You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -214,25 +217,25 @@ in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -244,18 +247,18 @@ in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -267,11 +270,9 @@ \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file @@ -289,11 +290,17 @@ DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -317,13 +324,13 @@ fi firstarg="$1" if shift; then - case "$firstarg" in + case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case "$firstarg" in + case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 --- contacts-snapshot-0.5.orig/hildon/hildon-contacts.c +++ contacts-snapshot-0.5/hildon/hildon-contacts.c @@ -30,6 +30,7 @@ #include "hito-contact-store.h" #include "hito-contact-model-filter.h" #include "hito-contact-preview.h" +#include "hito-contact-edit.h" #include "hito-contact-view.h" #include "hito-group-store.h" #include "hito-group-combo.h" @@ -53,9 +54,16 @@ GtkWidget *scrolled_window; GtkWidget *hpaned; GtkWidget *preview; + GtkWidget *edit; GtkWidget *preview_box; + GtkWidget *hbuttonbox; + GtkWidget *button; + GtkWidget *newbutton; + gboolean editing; } ContactsApp; +static void button_clicked_cb (GtkButton *button, gpointer userdata); + static void book_view_callback (EBook *book, EBookStatus status, EBookView *book_view, gpointer userdata) @@ -107,6 +115,96 @@ } static void +show_edit_pane (EContact *contact, ContactsApp *app) +{ + GtkWidget *alignment; + + app->editing = TRUE; + app->preview_box = gtk_vbox_new (FALSE, 6); + app->hbuttonbox = gtk_hbutton_box_new(); + app->preview = hito_contact_edit_new (); + alignment = gtk_alignment_new (0, 0, 1, 1); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 6, 6, 6); + gtk_container_add (GTK_CONTAINER (alignment), app->preview); + gtk_box_pack_start (GTK_BOX (app->preview_box), alignment, TRUE, TRUE, 2); + gtk_box_pack_start (GTK_BOX (app->preview_box), app->hbuttonbox, FALSE, FALSE, 2); + app->button = gtk_button_new_with_label ("Ok"); + gtk_box_pack_start (GTK_BOX (app->hbuttonbox), app->button, FALSE, FALSE, 2); + g_signal_connect (app->button, "clicked", + G_CALLBACK (button_clicked_cb), app); + gtk_paned_pack2 (GTK_PANED (app->hpaned), app->preview_box, FALSE, FALSE); + hito_contact_edit_set_contact (HITO_CONTACT_EDIT (app->preview), + contact, app->book); +} + +static void +new_contact_cb (GtkButton *button, gpointer userdata) +{ + ContactsApp *app = (ContactsApp *)userdata; + EContact *contact = e_contact_new(); + e_contact_set (contact, E_CONTACT_FULL_NAME, "New Contact"); + e_book_add_contact (app->book, contact, NULL); + gtk_widget_destroy (app->preview_box); + show_edit_pane (contact, userdata); + gtk_widget_show_all (app->main_window); +} + +static void +show_preview_pane (EContact *contact, ContactsApp *app) +{ + GtkWidget *alignment; + + app->editing = FALSE; + + app->preview_box = gtk_vbox_new (FALSE, 6); + app->hbuttonbox = gtk_hbutton_box_new (); + app->preview = hito_contact_preview_new (); + alignment = gtk_alignment_new (0, 0, 1, 1); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 6, 6, 6); + gtk_container_add (GTK_CONTAINER (alignment), app->preview); + gtk_box_pack_start (GTK_BOX (app->preview_box), alignment, TRUE, TRUE, 2); + gtk_box_pack_start (GTK_BOX (app->preview_box), app->hbuttonbox, FALSE, FALSE, 2); + + app->button = gtk_button_new_with_label ("Edit"); + gtk_box_pack_start (GTK_BOX (app->hbuttonbox), app->button, FALSE, FALSE, 2); + + g_signal_connect (app->button, "clicked", + G_CALLBACK (button_clicked_cb), app); + + app->newbutton = gtk_button_new_with_label ("New contact"); + gtk_box_pack_start (GTK_BOX (app->hbuttonbox), app->newbutton, FALSE, FALSE, 2); + + g_signal_connect (app->newbutton, "clicked", + G_CALLBACK (new_contact_cb), app); + + gtk_paned_pack2 (GTK_PANED (app->hpaned), app->preview_box, FALSE, FALSE); + + if (contact) + hito_contact_preview_set_contact (HITO_CONTACT_PREVIEW (app->preview), contact); +} + +static void +button_clicked_cb (GtkButton *button, gpointer userdata) +{ + ContactsApp *app = (ContactsApp *)userdata; + GtkTreeModel *model = NULL; + GtkTreeIter iter; + EContact *contact; + + gtk_widget_destroy (app->preview_box); + + if (gtk_tree_selection_get_selected (app->selection, &model, &iter)) + gtk_tree_model_get (model, &iter, COLUMN_CONTACT, &contact, -1); + + if (app->editing == FALSE) { + show_edit_pane (contact, app); + } else { + show_preview_pane (contact, app); + } + gtk_widget_show_all (app->main_window); +} + +static void tv_selection_changed_cb (GtkTreeSelection *selection, gpointer userdata) { ContactsApp *app = (ContactsApp *)userdata; @@ -119,8 +217,12 @@ gtk_tree_model_get (model, &iter, COLUMN_CONTACT, &contact, -1); /* Set the preview based on this contact */ - hito_contact_preview_set_contact (HITO_CONTACT_PREVIEW (app->preview), - contact); + if (app->editing) + hito_contact_edit_set_contact (HITO_CONTACT_EDIT (app->preview), + contact, app->book); + else + hito_contact_preview_set_contact (HITO_CONTACT_PREVIEW (app->preview), contact); + } } @@ -175,26 +277,35 @@ } } +static void +on_entry_changed (GtkEntry *entry, HitoContactModelFilter *filter) +{ + hito_contact_model_filter_set_text (filter, gtk_entry_get_text (entry)); +} + int main (int argc, char **argv) { ContactsApp *app; GError *error = NULL; - GtkWidget *alignment = NULL; + GtkWidget *alignment, *edit, *left_vbox; + GtkWidget *contact_filter; + GtkWidget *searchbox, *label; #ifdef ENABLE_NLS /* Initialise i18n*/ - bindtextdomain(GETTEXT_PACKAGE, CONTACTS_LOCALE_DIR); - bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); - textdomain(GETTEXT_PACKAGE); + bindtextdomain (GETTEXT_PACKAGE, CONTACTS_LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); #endif - app = g_new0 (ContactsApp, 1); - /* Boring init */ - g_thread_init (NULL); + if (!g_thread_supported ()) + g_thread_init (NULL); gtk_init (&argc, &argv); + app = g_new0 (ContactsApp, 1); + /* * Get addressbook. Do this nice and early. Without this life is a bit * pointless so die. @@ -212,8 +323,7 @@ * * This function returns FALSE on success. */ - if (e_book_async_open (app->book, FALSE, (EBookCallback)book_opened_cb, - app) == TRUE) + if (e_book_async_open (app->book, FALSE, book_opened_cb, app) == TRUE) { g_error ("Error when asking to open address book asynchronously"); } @@ -227,8 +337,8 @@ g_signal_connect (app->main_window, "destroy", gtk_main_quit, NULL); /* - * Create the main model. The view *might* be available. The view *might be - * be available. This function accepts NULL anyway. + * Create the main model. The view *might* be available. This function accepts + * NULL anyway. */ app->contact_store = hito_contact_store_new (app->book_view); @@ -236,32 +346,43 @@ * Hook up some callbacks for faffing with ensuring something useful is * selected */ - g_signal_connect (app->contact_store, "row-inserted", - (GCallback)row_inserted_cb, app); + g_signal_connect (app->contact_store, "row-inserted", + G_CALLBACK (row_inserted_cb), app); g_signal_connect (app->contact_store, "row-deleted", - (GCallback)row_deleted_cb, app); + G_CALLBACK (row_deleted_cb), app); + + contact_filter = hito_contact_model_filter_new (HITO_CONTACT_STORE (app->contact_store)); /* Create the main tree view using this model. */ - app->tv = hito_contact_view_new (HITO_CONTACT_STORE (app->contact_store), NULL); + app->tv = hito_contact_view_new (HITO_CONTACT_STORE (app->contact_store), HITO_CONTACT_MODEL_FILTER (contact_filter)); app->scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (app->scrolled_window), app->tv); /* Get a selection on this tv and setup the changed callback */ app->selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (app->tv)); - g_signal_connect (app->selection, "changed", (GCallback)tv_selection_changed_cb, app); + g_signal_connect (app->selection, "changed", G_CALLBACK (tv_selection_changed_cb), app); + app->editing = FALSE; + app->hpaned = gtk_hpaned_new (); + /* Create the viewer box for the side bar */ - app->preview_box = gtk_vbox_new (FALSE, 6); - app->preview = hito_contact_preview_new (); - alignment = gtk_alignment_new (0, 0, 1, 1); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 6, 6, 6); - gtk_container_add (GTK_CONTAINER (alignment), app->preview); - gtk_box_pack_start (GTK_BOX (app->preview_box), alignment, TRUE, TRUE, 2); + + show_preview_pane (NULL, app); + + edit = gtk_entry_new (); + searchbox = gtk_hbox_new(FALSE, 6); + label = gtk_label_new ("Search"); + g_signal_connect (edit, "changed", G_CALLBACK (on_entry_changed), contact_filter); /* Create the hpaned that we use to separate the two halves */ - app->hpaned = gtk_hpaned_new (); - gtk_paned_pack1 (GTK_PANED (app->hpaned), app->scrolled_window, TRUE, FALSE); - gtk_paned_pack2 (GTK_PANED (app->hpaned), app->preview_box, TRUE, FALSE); + left_vbox = gtk_vbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX(left_vbox), app->scrolled_window, TRUE, TRUE, 2); + gtk_box_pack_start (GTK_BOX(searchbox), label, TRUE, FALSE, 5); + gtk_box_pack_start (GTK_BOX(searchbox), edit, TRUE, FALSE, 5); + gtk_box_pack_start (GTK_BOX(left_vbox), searchbox, FALSE, FALSE, 2); + + gtk_paned_pack1 (GTK_PANED (app->hpaned), left_vbox, FALSE, FALSE); + gtk_paned_pack2 (GTK_PANED (app->hpaned), app->preview_box, FALSE, FALSE); gtk_container_add (GTK_CONTAINER (app->main_window), app->hpaned); gtk_widget_show_all (app->main_window); --- contacts-snapshot-0.5.orig/hildon/Makefile.in +++ contacts-snapshot-0.5/hildon/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +14,11 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -54,17 +50,21 @@ am__DEPENDENCIES_1 = hildon_contacts_DEPENDENCIES = $(top_srcdir)/libhito/libhito.a \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/vanilla +hildon_contacts_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(hildon_contacts_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)/vanilla@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = hildon-contacts.c DIST_SOURCES = hildon-contacts.c ETAGS = etags @@ -72,8 +72,6 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -108,8 +106,6 @@ GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ -GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ -GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -118,10 +114,9 @@ GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ GREP = @GREP@ -HAVE_GCONF_FALSE = @HAVE_GCONF_FALSE@ -HAVE_GCONF_TRUE = @HAVE_GCONF_TRUE@ HILDON_CFLAGS = @HILDON_CFLAGS@ HILDON_LIBS = @HILDON_LIBS@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -158,9 +153,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MOKOUI_CFLAGS = @MOKOUI_CFLAGS@ MOKOUI_LIBS = @MOKOUI_LIBS@ @@ -187,13 +181,13 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -205,6 +199,7 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ contacts_frontend = @contacts_frontend@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -233,8 +228,11 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ INCLUDES = -I$(top_srcdir)/libhito AM_CFLAGS = -Wall -export-dynamic $(CONTACTS_CFLAGS) $(HILDON_CFLAGS) AM_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \ @@ -280,7 +278,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ @@ -308,7 +306,7 @@ done hildon-contacts$(EXEEXT): $(hildon_contacts_OBJECTS) $(hildon_contacts_DEPENDENCIES) @rm -f hildon-contacts$(EXEEXT) - $(LINK) $(hildon_contacts_LDFLAGS) $(hildon_contacts_OBJECTS) $(hildon_contacts_LDADD) $(LIBS) + $(hildon_contacts_LINK) $(hildon_contacts_OBJECTS) $(hildon_contacts_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -319,22 +317,22 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-contacts.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -345,10 +343,6 @@ clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -398,22 +392,21 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -429,7 +422,7 @@ all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -463,7 +456,7 @@ -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -477,12 +470,20 @@ install-data-am: +install-dvi: install-dvi-am + install-exec-am: install-binPROGRAMS +install-html: install-html-am + install-info: install-info-am install-man: +install-pdf: install-pdf-am + +install-ps: install-ps-am + installcheck-am: maintainer-clean: maintainer-clean-am @@ -503,19 +504,23 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-info-am + uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- contacts-snapshot-0.5.orig/depcomp +++ contacts-snapshot-0.5/depcomp @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-07-09.11 +scriptversion=2006-10-15.18 -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -91,7 +92,20 @@ ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -276,6 +290,46 @@ rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -288,13 +342,13 @@ if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is --- contacts-snapshot-0.5.orig/Makefile.in +++ contacts-snapshot-0.5/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,15 +13,11 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -35,17 +31,17 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS config.guess config.sub depcomp \ install-sh ltmain.sh missing mkinstalldirs -subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/vanilla/config.h CONFIG_CLEAN_FILES = @@ -53,10 +49,13 @@ DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -72,8 +71,6 @@ distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -108,8 +105,6 @@ GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ -GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ -GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -118,10 +113,9 @@ GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ GREP = @GREP@ -HAVE_GCONF_FALSE = @HAVE_GCONF_FALSE@ -HAVE_GCONF_TRUE = @HAVE_GCONF_TRUE@ HILDON_CFLAGS = @HILDON_CFLAGS@ HILDON_LIBS = @HILDON_LIBS@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -158,9 +152,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MOKOUI_CFLAGS = @MOKOUI_CFLAGS@ MOKOUI_LIBS = @MOKOUI_LIBS@ @@ -187,13 +180,13 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -205,6 +198,7 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ contacts_frontend = @contacts_frontend@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -233,8 +227,11 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ SUBDIRS = libhito @contacts_frontend@ po data DIST_SUBDIRS = libhito vanilla openmoko hildon po data INTLTOOL_BUILT = \ @@ -290,7 +287,6 @@ distclean-libtool: -rm -f libtool -uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -323,8 +319,7 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: +$(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -426,24 +421,22 @@ distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/po - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -457,7 +450,7 @@ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ @@ -465,6 +458,8 @@ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ @@ -472,7 +467,7 @@ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz @@ -547,7 +542,7 @@ $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -619,12 +614,20 @@ install-data-am: +install-dvi: install-dvi-recursive + install-exec-am: +install-html: install-html-recursive + install-info: install-info-recursive install-man: +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -645,24 +648,26 @@ ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -uninstall-info: uninstall-info-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-libtool clean-recursive \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-libtool distclean-recursive \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-libtool distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am snapshot: --- contacts-snapshot-0.5.orig/install-sh +++ contacts-snapshot-0.5/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-05-14.22 +scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,15 +39,24 @@ # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. + +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" @@ -58,7 +67,13 @@ rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -chmodcmd="$chmodprog 0755" +posix_glob= +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= @@ -95,7 +110,7 @@ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " -while test -n "$1"; do +while test $# -ne 0; do case $1 in -c) shift continue;; @@ -111,9 +126,15 @@ --help) echo "$usage"; exit $?;; - -m) chmodcmd="$chmodprog $2" + -m) mode=$2 shift shift + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac continue;; -o) chowncmd="$chownprog $2" @@ -136,25 +157,33 @@ --version) echo "$0 $scriptversion"; exit $?;; - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done + --) shift break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; esac done -if test -z "$1"; then +if test $# -ne 0 && test -z "$dir_arg$dstarg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done +fi + +if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -164,6 +193,33 @@ exit 0 fi +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + for src do # Protect names starting with `-'. @@ -173,15 +229,11 @@ if test -n "$dir_arg"; then dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -208,53 +260,188 @@ echo "$0: $dstarg: Is a directory" >&2 exit 1 fi - dst=$dst/`basename "$src"` + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? fi fi - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - - # Make sure that the destination directory exists. + obsolete_mkdir_used=false - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - pathcomp= + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix=/ ;; + -*) prefix=./ ;; + *) prefix= ;; + esac + + case $posix_glob in + '') + if (set -f) 2>/dev/null; then + posix_glob=true + else + posix_glob=false + fi ;; + esac + + oIFS=$IFS + IFS=/ + $posix_glob && set -f + set fnord $dstdir shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit + $posix_glob && set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi - pathcomp=$pathcomp/ - done + fi fi if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else - dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -262,10 +449,9 @@ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -276,10 +462,10 @@ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not @@ -291,11 +477,12 @@ # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + if test -f "$dst"; then + $doit $rmcmd -f "$dst" 2>/dev/null \ + || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ + && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else @@ -304,16 +491,13 @@ } && # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + $doit $mvcmd "$dsttmp" "$dst" } - } - fi || { (exit 1); exit 1; } -done + } || exit 1 -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} + trap '' 0 + fi +done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) --- contacts-snapshot-0.5.orig/configure +++ contacts-snapshot-0.5/configure @@ -809,6 +809,7 @@ INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA +am__isrc CYGPATH_W PACKAGE VERSION @@ -2029,7 +2030,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version="1.9" +am__api_version='1.10' + ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then @@ -2212,38 +2214,53 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" else - mkdir_p='$(install_sh) -d' + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" fi fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac for ac_prog in gawk mawk nawk awk do @@ -2326,12 +2343,16 @@ fi rmdir .tst 2>/dev/null -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } + fi fi # test whether we have cygpath @@ -2374,7 +2395,7 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right @@ -2478,7 +2499,7 @@ fi fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -2506,9 +2527,7 @@ { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } - - -if test $USE_MAINTAINER_MODE = yes; then + if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else @@ -2573,9 +2592,7 @@ am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -2584,7 +2601,6 @@ fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3571,6 +3587,7 @@ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -3600,9 +3617,7 @@ echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -4440,6 +4455,7 @@ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -4469,9 +4485,7 @@ echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -5694,7 +5708,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5697 "configure"' > conftest.$ac_ext + echo '#line 5711 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6525,6 +6539,7 @@ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -6554,9 +6569,7 @@ echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= @@ -8032,11 +8045,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8035: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8048: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8039: \$? = $ac_status" >&5 + echo "$as_me:8052: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8322,11 +8335,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8325: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8338: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8329: \$? = $ac_status" >&5 + echo "$as_me:8342: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8426,11 +8439,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8429: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8442: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8433: \$? = $ac_status" >&5 + echo "$as_me:8446: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10788,7 +10801,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13324: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13315: \$? = $ac_status" >&5 + echo "$as_me:13328: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13412,11 +13425,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13415: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13428: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13419: \$? = $ac_status" >&5 + echo "$as_me:13432: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14989,11 +15002,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14992: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15005: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14996: \$? = $ac_status" >&5 + echo "$as_me:15009: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15093,11 +15106,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15096: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15109: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15100: \$? = $ac_status" >&5 + echo "$as_me:15113: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17293,11 +17306,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17296: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17309: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17300: \$? = $ac_status" >&5 + echo "$as_me:17313: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17583,11 +17596,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17586: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17599: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17590: \$? = $ac_status" >&5 + echo "$as_me:17603: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17687,11 +17700,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17690: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17703: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17694: \$? = $ac_status" >&5 + echo "$as_me:17707: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -22780,9 +22793,7 @@ { (exit 1); exit 1; }; } fi fi - - -if test "$want_gconf" = "yes"; then + if test "$want_gconf" = "yes"; then HAVE_GCONF_TRUE= HAVE_GCONF_FALSE='#' else @@ -23084,9 +23095,7 @@ esac fi - - -if test "$enable_schemas_install" != no; then + if test "$enable_schemas_install" != no; then GCONF_SCHEMAS_INSTALL_TRUE= GCONF_SCHEMAS_INSTALL_FALSE='#' else @@ -23611,6 +23620,7 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -23831,6 +23841,7 @@ INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim @@ -23887,7 +23898,6 @@ CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -23929,6 +23939,7 @@ ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim CXXCPP!$CXXCPP$ac_delim @@ -24000,7 +24011,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 70; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -24227,6 +24238,11 @@ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -24280,6 +24296,7 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out @@ -24444,8 +24461,9 @@ # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ --- contacts-snapshot-0.5.orig/aclocal.m4 +++ contacts-snapshot-0.5/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,6 +11,11 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + dnl AM_GCONF_SOURCE_2 dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas dnl (i.e. pass to gconftool-2 @@ -7422,7 +7427,7 @@ fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -7432,14 +7437,29 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -7496,14 +7516,14 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -7512,8 +7532,10 @@ [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -7527,15 +7549,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -7563,6 +7584,7 @@ ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -7628,6 +7650,7 @@ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -7680,7 +7703,8 @@ AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -7705,8 +7729,9 @@ # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -7765,8 +7790,8 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -7789,16 +7814,20 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -7818,6 +7847,9 @@ AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -7853,6 +7885,10 @@ [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) @@ -7888,7 +7924,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -7995,14 +8031,14 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -8018,6 +8054,7 @@ # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then @@ -8028,7 +8065,7 @@ fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8036,60 +8073,23 @@ # AM_PROG_MKDIR_P # --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) +# Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) # Helper functions for option handling. -*- Autoconf -*- @@ -8201,9 +8201,21 @@ if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. --- contacts-snapshot-0.5.orig/data/Makefile.in +++ contacts-snapshot-0.5/data/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +14,11 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -65,8 +61,6 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -101,8 +95,6 @@ GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ -GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ -GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -111,10 +103,9 @@ GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ GREP = @GREP@ -HAVE_GCONF_FALSE = @HAVE_GCONF_FALSE@ -HAVE_GCONF_TRUE = @HAVE_GCONF_TRUE@ HILDON_CFLAGS = @HILDON_CFLAGS@ HILDON_LIBS = @HILDON_LIBS@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -151,9 +142,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MOKOUI_CFLAGS = @MOKOUI_CFLAGS@ MOKOUI_LIBS = @MOKOUI_LIBS@ @@ -180,13 +170,13 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -198,6 +188,7 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ contacts_frontend = @contacts_frontend@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -226,8 +217,11 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ uidir = $(pkgdatadir) desktopdir = $(datadir)/applications desktop_in_files = contacts.desktop.in @@ -279,13 +273,9 @@ clean-libtool: -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ @@ -330,7 +320,7 @@ done install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) - test -z "$(desktopdir)" || $(mkdir_p) "$(DESTDIR)$(desktopdir)" + test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -347,7 +337,7 @@ done install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) - test -z "$(icondir)" || $(mkdir_p) "$(DESTDIR)$(icondir)" + test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -364,7 +354,7 @@ done install-schemaDATA: $(schema_DATA) @$(NORMAL_INSTALL) - test -z "$(schemadir)" || $(mkdir_p) "$(DESTDIR)$(schemadir)" + test -z "$(schemadir)" || $(MKDIR_P) "$(DESTDIR)$(schemadir)" @list='$(schema_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ @@ -387,22 +377,21 @@ distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -418,7 +407,7 @@ all-am: Makefile $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(schemadir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -453,7 +442,7 @@ distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic dvi: dvi-am @@ -470,12 +459,20 @@ @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-am + install-exec-am: +install-html: install-html-am + install-info: install-info-am install-man: install-man1 +install-pdf: install-pdf-am + +install-ps: install-ps-am + installcheck-am: maintainer-clean: maintainer-clean-am @@ -494,23 +491,27 @@ ps-am: -uninstall-am: uninstall-desktopDATA uninstall-iconDATA \ - uninstall-info-am uninstall-man uninstall-schemaDATA +uninstall-am: uninstall-desktopDATA uninstall-iconDATA uninstall-man \ + uninstall-schemaDATA uninstall-man: uninstall-man1 +.MAKE: install-am install-data-am install-strip + .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-hook \ - install-data-local install-desktopDATA install-exec \ - install-exec-am install-iconDATA install-info install-info-am \ - install-man install-man1 install-schemaDATA install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ + install-data-local install-desktopDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-iconDATA install-info install-info-am \ + install-man install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-schemaDATA install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-desktopDATA uninstall-iconDATA uninstall-info-am \ - uninstall-man uninstall-man1 uninstall-schemaDATA + uninstall-desktopDATA uninstall-iconDATA uninstall-man \ + uninstall-man1 uninstall-schemaDATA @INTLTOOL_DESKTOP_RULE@ --- contacts-snapshot-0.5.orig/openmoko/openmoko-contacts-groups.c +++ contacts-snapshot-0.5/openmoko/openmoko-contacts-groups.c @@ -56,7 +56,7 @@ void create_contacts_groups_page (ContactsData *data) { - GtkWidget *w; + GtkWidget *w, *vbox; GtkTreeViewColumn *col; GtkCellRenderer *cell; @@ -69,9 +69,17 @@ data->groups_liststore = hito_group_store_new (); hito_group_store_set_view (HITO_GROUP_STORE (data->groups_liststore), data->view); + vbox = gtk_vbox_new (FALSE, 0); + gtk_container_set_border_width (GTK_CONTAINER (vbox), PADDING); + gtk_box_pack_start (GTK_BOX (data->groups_box), vbox, FALSE, FALSE, 0); + + w = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (w), GTK_SHADOW_IN); + gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0); + data->groups = gtk_tree_view_new_with_model (data->groups_liststore); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (data->groups), FALSE); - gtk_box_pack_start (GTK_BOX (data->groups_box), data->groups, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (w), data->groups); col = gtk_tree_view_column_new (); gtk_tree_view_append_column (GTK_TREE_VIEW (data->groups), col); @@ -90,7 +98,7 @@ w = gtk_button_new_with_label ("Add Group"); gtk_widget_set_name (w, "moko-contacts-add-detail-button"); g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (add_groups_clicked_cb), data); - gtk_box_pack_start (GTK_BOX (data->groups_box), w, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0); } --- contacts-snapshot-0.5.orig/openmoko/openmoko-contacts.h +++ contacts-snapshot-0.5/openmoko/openmoko-contacts.h @@ -19,6 +19,8 @@ #include #include +#define PADDING 6 + enum { LIST_PAGE_NUM, DETAIL_PAGE_NUM, --- contacts-snapshot-0.5.orig/openmoko/Makefile.in +++ contacts-snapshot-0.5/openmoko/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +14,11 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -61,17 +57,21 @@ am__DEPENDENCIES_1 = openmoko_contacts_DEPENDENCIES = $(top_srcdir)/libhito/libhito.a \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/vanilla +openmoko_contacts_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(openmoko_contacts_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(top_builddir)/vanilla@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(openmoko_contacts_SOURCES) DIST_SOURCES = $(openmoko_contacts_SOURCES) ETAGS = etags @@ -79,8 +79,6 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -115,8 +113,6 @@ GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ -GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ -GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -125,10 +121,9 @@ GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ GREP = @GREP@ -HAVE_GCONF_FALSE = @HAVE_GCONF_FALSE@ -HAVE_GCONF_TRUE = @HAVE_GCONF_TRUE@ HILDON_CFLAGS = @HILDON_CFLAGS@ HILDON_LIBS = @HILDON_LIBS@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -165,9 +160,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MOKOUI_CFLAGS = @MOKOUI_CFLAGS@ MOKOUI_LIBS = @MOKOUI_LIBS@ @@ -194,13 +188,13 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -212,6 +206,7 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ contacts_frontend = @contacts_frontend@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -240,8 +235,11 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ INCLUDES = -I$(top_srcdir)/libhito AM_CFLAGS = -Wall -export-dynamic $(CONTACTS_CFLAGS) $(MOKOUI_CFLAGS) AM_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \ @@ -307,7 +305,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ @@ -335,7 +333,7 @@ done openmoko-contacts$(EXEEXT): $(openmoko_contacts_OBJECTS) $(openmoko_contacts_DEPENDENCIES) @rm -f openmoko-contacts$(EXEEXT) - $(LINK) $(openmoko_contacts_LDFLAGS) $(openmoko_contacts_OBJECTS) $(openmoko_contacts_LDADD) $(LIBS) + $(openmoko_contacts_LINK) $(openmoko_contacts_OBJECTS) $(openmoko_contacts_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -354,22 +352,22 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openmoko-contacts.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -380,10 +378,6 @@ clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -433,22 +427,21 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -464,7 +457,7 @@ all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -498,7 +491,7 @@ -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -512,12 +505,20 @@ install-data-am: +install-dvi: install-dvi-am + install-exec-am: install-binPROGRAMS +install-html: install-html-am + install-info: install-info-am install-man: +install-pdf: install-pdf-am + +install-ps: install-ps-am + installcheck-am: maintainer-clean: maintainer-clean-am @@ -538,19 +539,23 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-info-am + uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- contacts-snapshot-0.5.orig/openmoko/openmoko-contacts-list.c +++ contacts-snapshot-0.5/openmoko/openmoko-contacts-list.c @@ -224,7 +224,7 @@ { EContact *contact; contact = e_contact_new (); - e_book_async_add_contact (data->book, contact, ebook_id_callback, data); + e_book_async_add_contact (data->book, contact, (EBookIdCallback) ebook_id_callback, data); } static void --- contacts-snapshot-0.5.orig/openmoko/openmoko-contacts-details.c +++ contacts-snapshot-0.5/openmoko/openmoko-contacts-details.c @@ -33,8 +33,6 @@ #endif -#define PADDING 6 - enum { ATTR_POINTER_COLUMN, ATTR_NAME_COLUMN, @@ -98,14 +96,18 @@ } static void -append_delete_column (GtkTreeView *treeview) +append_delete_column (GtkTreeView *treeview, ContactsData *data) { GtkCellRenderer *renderer; GtkTreeViewColumn *treeview_column; renderer = koto_cell_renderer_pixbuf_new (); - g_signal_connect (G_OBJECT (renderer), "activated", G_CALLBACK (delete_renderer_activated_cb), NULL); g_object_set (G_OBJECT (renderer), "stock-id", GTK_STOCK_DELETE, NULL); + /* we need to know what treeview this renderer is associated with for the + * "activated" callback */ + g_object_set_data (G_OBJECT (renderer), "treeview", treeview); + g_signal_connect (G_OBJECT (renderer), "activated", G_CALLBACK (delete_renderer_activated_cb), data); + treeview_column = gtk_tree_view_column_new_with_attributes ("", renderer, NULL); g_object_set (G_OBJECT (treeview_column), "visible", FALSE, NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (treeview), treeview_column, TREE_DEL_COLUMN); @@ -152,7 +154,7 @@ create_contacts_details_page (ContactsData *data) { - GtkWidget *box, *hbox, *toolbar, *w, *sw, *vbox, *vb, *viewport; + GtkWidget *box, *hbox, *toolbar, *w, *sw, *vb, *viewport, *main_vbox; GtkToolItem *toolitem; GtkListStore *liststore; GtkTreeModel *tel_filter, *email_filter; @@ -179,9 +181,20 @@ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, 2); + main_vbox = gtk_vbox_new (FALSE, PADDING); + gtk_container_set_border_width (GTK_CONTAINER (main_vbox), PADDING); + + sw = moko_finger_scroll_new (); + gtk_box_pack_start (GTK_BOX (box), sw, TRUE, TRUE, PADDING); + + viewport = gtk_viewport_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (sw), viewport); + gtk_container_add (GTK_CONTAINER (viewport), main_vbox); + gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE); + + hbox = gtk_hbox_new (FALSE, PADDING); - gtk_container_set_border_width (GTK_CONTAINER (hbox), PADDING); - gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, PADDING); + gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0); data->photo = gtk_image_new (); gtk_box_pack_start (GTK_BOX (hbox), data->photo, FALSE, FALSE, 0); @@ -207,33 +220,24 @@ g_signal_connect (G_OBJECT (liststore), "row-changed", G_CALLBACK (attribute_store_row_changed_cb), data); data->attribute_liststore = liststore; - sw = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_NONE); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); - gtk_box_pack_start (GTK_BOX (box), sw, TRUE, TRUE, 0); - - vbox = gtk_vbox_new (FALSE, PADDING); - viewport = gtk_viewport_new (NULL, NULL); - gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE); - gtk_container_add (GTK_CONTAINER (viewport), vbox); - gtk_container_add (GTK_CONTAINER (sw), viewport); - gtk_container_set_border_width (GTK_CONTAINER (vbox), PADDING); - - /* telephone entries */ vb = gtk_vbox_new (0, FALSE); - gtk_box_pack_start (GTK_BOX (vbox), vb, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (main_vbox), vb, FALSE, FALSE, 0); tel_filter = gtk_tree_model_filter_new (GTK_TREE_MODEL (liststore), NULL); gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (tel_filter), (GtkTreeModelFilterVisibleFunc) filter_visible_func, EVC_TEL, NULL); + w = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (w), GTK_SHADOW_IN); + gtk_box_pack_start (GTK_BOX (vb), w, FALSE, FALSE, 0); + data->telephone = gtk_tree_view_new_with_model(GTK_TREE_MODEL (tel_filter)); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (data->telephone), FALSE); - gtk_box_pack_start (GTK_BOX (vb), data->telephone, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (w), data->telephone); /* delete option column */ - append_delete_column (GTK_TREE_VIEW (data->telephone)); + append_delete_column (GTK_TREE_VIEW (data->telephone), data); /* type option column */ append_type_column (GTK_TREE_VIEW (data->telephone)); @@ -260,17 +264,21 @@ /* email entries */ vb = gtk_vbox_new (0, FALSE); - gtk_box_pack_start (GTK_BOX (vbox), vb, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (main_vbox), vb, FALSE, FALSE, 0); email_filter = gtk_tree_model_filter_new (GTK_TREE_MODEL (liststore), NULL); gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (email_filter), (GtkTreeModelFilterVisibleFunc) filter_visible_func, EVC_EMAIL, NULL); + w = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (w), GTK_SHADOW_IN); + gtk_box_pack_start (GTK_BOX (vb), w, FALSE, FALSE, 0); + data->email = gtk_tree_view_new_with_model(GTK_TREE_MODEL (email_filter)); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (data->email), FALSE); - gtk_box_pack_start (GTK_BOX (vb), data->email, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (w), data->email); /* delete option column */ - append_delete_column (GTK_TREE_VIEW (data->email)); + append_delete_column (GTK_TREE_VIEW (data->email), data); /* type option column */ append_type_column (GTK_TREE_VIEW (data->email)); @@ -295,6 +303,8 @@ gtk_box_pack_start (GTK_BOX (vb), w, FALSE, FALSE, 0); data->add_email_button = w; + /* make sure everything is in the correct state */ + edit_toggle_toggled_cb (GTK_WIDGET (data->edit_toggle), data); } void @@ -351,7 +361,7 @@ data->detail_page_loading = TRUE; - /* make sure all the widgets are in a consistent state */ + /* ensure the default mode is view, not edit */ contacts_details_page_set_editable (data, FALSE); @@ -422,6 +432,7 @@ edit_toggle_toggled_cb (GtkWidget *button, ContactsData *data) { GtkTreeViewColumn *col; + GtkTreeSelection *sel; GList *list; gboolean editing; @@ -476,6 +487,16 @@ /* add any "hint" values */ entry_focus_out_cb (data->fullname, NULL, attr_names[ATTR_FN].pretty_name); entry_focus_out_cb (data->org, NULL, attr_names[ATTR_ORG].pretty_name); + + /* ensure selection is possible in edit mode - cell editing is not possible + * without it + */ + sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (data->telephone)); + gtk_tree_selection_set_mode (sel, GTK_SELECTION_SINGLE); + + sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (data->email)); + gtk_tree_selection_set_mode (sel, GTK_SELECTION_SINGLE); + } else { @@ -492,6 +513,12 @@ entry_focus_in_cb (data->fullname, NULL, attr_names[ATTR_FN].pretty_name); entry_focus_in_cb (data->org, NULL, attr_names[ATTR_ORG].pretty_name); + /* disable selection when not in editing mode */ + sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (data->telephone)); + gtk_tree_selection_set_mode (sel, GTK_SELECTION_NONE); + + sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (data->email)); + gtk_tree_selection_set_mode (sel, GTK_SELECTION_NONE); } } @@ -531,14 +558,17 @@ gtk_dialog_run (GTK_DIALOG (err_message)); gtk_widget_destroy (err_message); } + else + { + /* return to contact list */ + gtk_notebook_set_current_page (GTK_NOTEBOOK (data->notebook), LIST_PAGE_NUM); + } } else { gtk_widget_destroy (dialog); } - /* return to contact list */ - gtk_notebook_set_current_page (GTK_NOTEBOOK (data->notebook), LIST_PAGE_NUM); } static void @@ -577,9 +607,14 @@ EVCardAttribute *attr; EVCard *card; GtkTreeIter iter, child_iter; - GtkTreeModelFilter *filter = GTK_TREE_MODEL_FILTER (gtk_tree_view_get_model (GTK_TREE_VIEW (data->attribute_liststore))); + GtkTreeModelFilter *filter; GtkTreeModel *model; + GtkTreeView *treeview; + + treeview = g_object_get_data (G_OBJECT (cell), "treeview"); + /* the model on the treeview is a filter */ + filter = GTK_TREE_MODEL_FILTER (gtk_tree_view_get_model (GTK_TREE_VIEW (treeview))); model = gtk_tree_model_filter_get_model (filter); /* remove attribute from contact */ --- contacts-snapshot-0.5.orig/libhito/Makefile.in +++ contacts-snapshot-0.5/libhito/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,15 +15,11 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -58,23 +54,24 @@ hito-no-category-group.$(OBJEXT) \ hito-separator-group.$(OBJEXT) hito-group-store.$(OBJEXT) \ hito-group-combo.$(OBJEXT) hito-contact-preview.$(OBJEXT) \ - hito-vcard-util.$(OBJEXT) + hito-contact-edit.$(OBJEXT) hito-vcard-util.$(OBJEXT) libhito_a_OBJECTS = $(am_libhito_a_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) am_test_widgets_OBJECTS = test-widgets.$(OBJEXT) test_widgets_OBJECTS = $(am_test_widgets_OBJECTS) test_widgets_DEPENDENCIES = ./libhito.a -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/vanilla +DEFAULT_INCLUDES = -I. -I$(top_builddir)/vanilla@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(libhito_a_SOURCES) $(test_widgets_SOURCES) DIST_SOURCES = $(libhito_a_SOURCES) $(test_widgets_SOURCES) ETAGS = etags @@ -82,8 +79,6 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -118,8 +113,6 @@ GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ -GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ -GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -128,10 +121,9 @@ GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ GREP = @GREP@ -HAVE_GCONF_FALSE = @HAVE_GCONF_FALSE@ -HAVE_GCONF_TRUE = @HAVE_GCONF_TRUE@ HILDON_CFLAGS = @HILDON_CFLAGS@ HILDON_LIBS = @HILDON_LIBS@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -168,9 +160,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MOKOUI_CFLAGS = @MOKOUI_CFLAGS@ MOKOUI_LIBS = @MOKOUI_LIBS@ @@ -197,13 +188,13 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -215,6 +206,7 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ contacts_frontend = @contacts_frontend@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -243,8 +235,11 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -DPKGDATADIR=\"$(pkgdatadir)\" $(CONTACTS_CFLAGS) -Wall AM_LDFLAGS = $(CONTACTS_LIBS) noinst_LIBRARIES = libhito.a @@ -260,6 +255,7 @@ hito-group-store.h hito-group-store.c \ hito-group-combo.h hito-group-combo.c \ hito-contact-preview.h hito-contact-preview.c \ + hito-contact-edit.h hito-contact-edit.c \ hito-vcard-util.c hito-vcard-util.h test_widgets_SOURCES = test-widgets.c @@ -313,7 +309,7 @@ done test-widgets$(EXEEXT): $(test_widgets_OBJECTS) $(test_widgets_DEPENDENCIES) @rm -f test-widgets$(EXEEXT) - $(LINK) $(test_widgets_LDFLAGS) $(test_widgets_OBJECTS) $(test_widgets_LDADD) $(LIBS) + $(LINK) $(test_widgets_OBJECTS) $(test_widgets_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -323,6 +319,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hito-all-group.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hito-category-group.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hito-contact-edit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hito-contact-model-filter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hito-contact-preview.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hito-contact-store.Po@am__quote@ @@ -336,22 +333,22 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-widgets.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -362,10 +359,6 @@ clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -415,22 +408,21 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -478,7 +470,7 @@ -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -492,12 +484,20 @@ install-data-am: +install-dvi: install-dvi-am + install-exec-am: +install-html: install-html-am + install-info: install-info-am install-man: +install-pdf: install-pdf-am + +install-ps: install-ps-am + installcheck-am: maintainer-clean: maintainer-clean-am @@ -518,19 +518,23 @@ ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am + tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- contacts-snapshot-0.5.orig/libhito/Makefile.am +++ contacts-snapshot-0.5/libhito/Makefile.am @@ -15,6 +15,7 @@ hito-group-store.h hito-group-store.c \ hito-group-combo.h hito-group-combo.c \ hito-contact-preview.h hito-contact-preview.c \ + hito-contact-edit.h hito-contact-edit.c \ hito-vcard-util.c hito-vcard-util.h noinst_PROGRAMS = test-widgets --- contacts-snapshot-0.5.orig/libhito/hito-contact-edit.h +++ contacts-snapshot-0.5/libhito/hito-contact-edit.h @@ -0,0 +1,57 @@ +#ifndef _HITO_CONTACT_EDIT +#define _HITO_CONTACT_EDIT + +#include +#include +#include + +G_BEGIN_DECLS + +#define HITO_TYPE_CONTACT_EDIT hito_contact_edit_get_type() + +#define HITO_CONTACT_EDIT(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + HITO_TYPE_CONTACT_EDIT, HitoContactEdit)) + +#define HITO_CONTACT_EDIT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), \ + HITO_TYPE_CONTACT_EDIT, HitoContactEditClass)) + +#define HITO_IS_CONTACT_EDIT(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + HITO_TYPE_CONTACT_EDIT)) + +#define HITO_IS_CONTACT_EDIT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), \ + HITO_TYPE_CONTACT_EDIT)) + +#define HITO_CONTACT_EDIT_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + HITO_TYPE_CONTACT_EDIT, HitoContactEditClass)) + +typedef struct { + GtkVBox parent; +} HitoContactEdit; + +typedef struct { + GtkVBoxClass parent_class; +} HitoContactEditClass; + +GType hito_contact_edit_get_type (void); + +GtkWidget* hito_contact_edit_new (void); + +void hito_contact_edit_set_contact (HitoContactEdit *edit, EContact *contact, EBook *book); + +typedef struct { + EContact *contact; + EVCardAttribute *attr; + EVCardAttributeParam *param; + GtkWidget *widget; /* The widget containing the data */ + EBook *book; + gboolean *changed; +} EContactChangeData; + +G_END_DECLS + +#endif /* _HITO_CONTACT_EDIT */ --- contacts-snapshot-0.5.orig/libhito/contacts-edit-pane.h +++ contacts-snapshot-0.5/libhito/contacts-edit-pane.h @@ -0,0 +1,37 @@ +/* + * Contacts - A small libebook-based address book. + * + * Authored By Chris Lord + * + * Copyright (c) 2005 OpenedHand Ltd - http://o-hand.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include "contacts-defs.h" + +void contacts_edit_pane_show (ContactsData *data, gboolean new); + +void contacts_edit_set_focus_cb (GtkWindow *window, GtkWidget *widget, + gpointer user_data); + +void contacts_remove_field_cb (GtkWidget *button, gpointer data); + +GtkWidget *contacts_label_widget_new (EContact *contact, EVCardAttribute *attr, + const gchar *name, gboolean multi_line); + +void contacts_remove_edit_widgets_cb (GtkWidget *widget, gpointer data); + +void contacts_append_to_edit_table (GtkTable *table, GtkWidget *label, + GtkWidget *edit, gboolean do_focus); --- contacts-snapshot-0.5.orig/libhito/contacts-edit-pane.c +++ contacts-snapshot-0.5/libhito/contacts-edit-pane.c @@ -0,0 +1,1236 @@ +/* + * Contacts - A small libebook-based address book. + * + * Authored By Chris Lord + * + * Copyright (c) 2005 OpenedHand Ltd - http://o-hand.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include +#include +#include + +#include "hito-contact-edit.h" +#include "contacts-edit-pane.h" + +typedef struct { + char *vcard_field; /* vCard field */ + char *label; /* Display label, NULL for no label */ + char *icon; /* Icon to display next to label */ + char *markup; /* Formatted markup to display content with, or NULL */ + gboolean multi_line; + int priority; + gboolean unique; +} FieldInfo; + +static const FieldInfo fields[] = { + { EVC_FN, "Name:", NULL, "%s", FALSE, 100, TRUE }, + { EVC_EMAIL, "Email:", "stock_mail", NULL, FALSE, 0, FALSE }, + { EVC_X_JABBER, "Jabber:", NULL, NULL, FALSE, 0, FALSE }, + { EVC_TEL, "Telephone:", NULL, NULL, FALSE, 100, FALSE }, + { EVC_ADR, "Address:", NULL, NULL, TRUE, 100, FALSE }, +}; + +FieldInfo* contacts_get_contacts_field (const ghcar *fieldname) +{ + for (i = 0; i < G_N_ELEMENTS (fields); i++) { + if (g_strcmp (fieldname, fields[i].label) == 0) + return fields[i]; + } + + return NULL; +} + +static EVCardAttribute * +contacts_add_attr (EVCard *contact, const gchar *vcard_field) +{ + const ContactsField *field = contacts_get_contacts_field (vcard_field); + + if (field) { + guint j; + /* Create missing attribute */ + EVCardAttribute *attr = e_vcard_attribute_new ( + "", vcard_field); + /* Initialise values */ + for (j = contacts_get_structured_field_size ( + e_vcard_attribute_get_name (attr)); + j > 0; j--) + e_vcard_attribute_add_value (attr, ""); + /* Add to contact */ + e_vcard_add_attribute (contact, attr); + + return attr; + } + + return NULL; +} + +void +contacts_remove_edit_widgets_cb (GtkWidget *widget, gpointer data) +{ + gtk_container_remove (GTK_CONTAINER (data), widget); +} + +static void +contacts_edit_pane_hide (ContactsData *data) +{ + GtkWidget *widget; + GtkWindow *window; + + /* All changed are instant-apply, so just remove the edit components + * and switch back to main view. + */ + window = GTK_WINDOW (data->ui->main_window); + widget = data->ui->edit_table; + gtk_container_foreach (GTK_CONTAINER (widget), + (GtkCallback)contacts_remove_edit_widgets_cb, + widget); + if ((widget = data->ui->contact_menu)) + gtk_widget_hide (widget); + if ((widget = data->ui->contacts_menu)) + gtk_widget_show (widget); + widget = data->ui->main_notebook; + gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 0); + + contacts_set_available_options (data, TRUE, TRUE, TRUE); + if (data->ui->edit_button) + gtk_window_set_default (window, data->ui->edit_button); + if ((widget = data->ui->search_entry) && GTK_WIDGET_VISIBLE (widget)) + gtk_window_set_focus (window, data->ui->search_entry); +} + +static void +contacts_edit_delete_cb (GtkWidget *button, ContactsData *data) +{ + GtkWidget *dialog, *main_window; + GList *widgets; + + main_window = data->ui->main_window; + dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), + 0, GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + _("Are you sure you want to delete "\ + "this contact?")); + + widgets = contacts_set_widgets_desensitive (main_window); + switch (gtk_dialog_run (GTK_DIALOG (dialog))) { + case GTK_RESPONSE_YES: + e_book_remove_contact (data->book, + e_contact_get_const ( + data->contact, E_CONTACT_UID), NULL); + contacts_set_widgets_sensitive (widgets); + contacts_edit_pane_hide (data); + break; + default: + contacts_set_widgets_sensitive (widgets); + break; + } + gtk_widget_destroy (dialog); +} + +static void +contacts_edit_ok_cb (GtkWidget *button, ContactsData *data) +{ + GError *error = NULL; + + if (data->contact && data->changed) { + /* Clean contact */ + contacts_clean_contact (data->contact); + + /* Commit changes */ + e_book_commit_contact(data->book, data->contact, &error); + if (error) { + GtkWidget *dialog; + GtkWidget *toplevel = gtk_widget_get_toplevel (button); + dialog = gtk_message_dialog_new ( + GTK_WINDOW (toplevel), + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Couldn't update contact") + ); + + gtk_message_dialog_format_secondary_text ( + GTK_MESSAGE_DIALOG (dialog), + _("Information couldn't be updated, error was: %s"), + error->message + ); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + g_warning ("Cannot commit contact: %s", error->message); + g_error_free (error); + } + } + + contacts_edit_pane_hide (data); +} + +static void +contacts_edit_ok_new_cb (GtkWidget *button, ContactsData *data) +{ + if (data->contact) { + /* Clean contact */ + contacts_clean_contact (data->contact); + + /* Commit changes */ + if (contacts_contact_is_empty (data->contact)) { + g_object_unref (data->contact); + } else { + GError *error = NULL; + e_book_add_contact(data->book, data->contact, &error); + if (error) { + GtkWidget *dialog; + GtkWidget *toplevel = gtk_widget_get_toplevel (button); + dialog = gtk_message_dialog_new ( + GTK_WINDOW (toplevel), + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Couldn't add contact") + ); + + gtk_message_dialog_format_secondary_text ( + GTK_MESSAGE_DIALOG (dialog), + _("Cannot add contact: %s"), + error->message + ); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + g_warning ("Cannot add contact: %s", + error->message); + g_error_free (error); + } + } + } + + contacts_edit_pane_hide (data); +} + +static void +contacts_type_entry_changed (GtkWidget *widget, EContactTypeChangeData *data) +{ + GList *v = contacts_entries_get_values (widget, NULL); + + if (v) { + guint i; + const gchar **types = + contacts_get_field_types (data->attr_name); + const gchar *type = (const gchar *)v->data; + gboolean custom_type = TRUE; + + for (i = 0; types[i]; i++) { + if (g_ascii_strcasecmp (type, types[i]) == 0) + custom_type = FALSE; + } + + e_vcard_attribute_param_remove_values (data->param); + /* Prefix a 'X-' to non-standard types, as per vCard spec */ + if (custom_type) { + gchar *new_type = g_strdup_printf ("X-%s", type); + e_vcard_attribute_param_add_value ( + data->param, (const char *)new_type); + g_free (new_type); + } else + e_vcard_attribute_param_add_value ( + data->param, (const char *)v->data); + g_list_foreach (v, (GFunc)g_free, NULL); + g_list_free (v); + *data->changed = TRUE; + } +} + +static void +contacts_entry_changed (GtkWidget *widget, EContactChangeData *data) +{ + GList *v, *values = contacts_entries_get_values (data->widget, NULL); + + e_vcard_attribute_remove_values (data->attr); + /* Note: First element of a structured field is type, so remove it */ + if (g_list_length (values) > 1) { + GList *type = g_list_last (values); + values = g_list_remove_link (values, type); + g_free (type->data); + g_list_free (type); + } + + for (v = g_list_last (values); v; v = v->prev) { + e_vcard_attribute_add_value (data->attr, + (const gchar *)v->data); + } + g_list_foreach (values, (GFunc)g_free, NULL); + g_list_free (values); + *data->changed = TRUE; +} + +static GtkWidget * +contacts_type_edit_widget_new (EVCardAttribute *attr, gboolean multi_line, + gboolean *changed) +{ + const gchar **types; + + types = contacts_get_field_types (e_vcard_attribute_get_name (attr)); + if (types) { + guint i; + GtkWidget *combo = gtk_combo_box_entry_new_text (); + GtkWidget *align; + gchar *first_type = ""; + EVCardAttributeParam *param; + EContactTypeChangeData *data; + /* Retrieve all types, but we only look at the first one + * TODO: A sane way of selecting multiple types, to conform + * with spec? (Almost no other vCard-using apps do this, + * so not high priority) + */ + GList *contact_types = contacts_get_types ( + e_vcard_attribute_get_params (attr)); + + if (contact_types) { + param = (EVCardAttributeParam *)contact_types->data; + GList *values = + e_vcard_attribute_param_get_values (param); + first_type = values ? (gchar *)values->data : ""; + g_list_free (contact_types); + } else { + param = e_vcard_attribute_param_new ("TYPE"); + e_vcard_attribute_add_param_with_value ( + attr, param, ""); + } + data = g_new (EContactTypeChangeData, 1); + data->param = param; + data->attr_name = e_vcard_attribute_get_name (attr); + data->changed = changed; + + for (i = 0; types[i]; i++) { + gtk_combo_box_append_text ( + GTK_COMBO_BOX (combo), types[i]); + /* Note: We use a case-insensitive search here, as + * specified in the spec (as the types are predefined, + * we can use non-locale-friendly strcasecmp) + */ + if (first_type) { + if (g_ascii_strcasecmp (types[i], first_type) == 0) { + first_type = NULL; + gtk_combo_box_set_active ( + GTK_COMBO_BOX (combo), i); + } + } + } + /* Support custom types, as per spec */ + if ((first_type) && (g_ascii_strncasecmp (first_type, "X-", 2) == 0)) { + gtk_entry_set_text ( + GTK_ENTRY (GTK_BIN (combo)->child), + (const gchar *)(first_type+2)); + first_type = NULL; + } + gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Other")); + if (first_type) + gtk_combo_box_set_active (GTK_COMBO_BOX (combo), i); + gtk_widget_show (combo); + if (/*(e_vcard_attribute_is_single_valued (attr)) &&*/ + (multi_line == FALSE)) + align = gtk_alignment_new (0, 0.5, 0, 0); + else + align = gtk_alignment_new (0, 0, 0, 0); + /* TODO: Find something better than this? */ + gtk_widget_set_size_request (combo, 80, -1); + gtk_container_add (GTK_CONTAINER (align), combo); + + /* Connect signal for changes */ + g_signal_connect (G_OBJECT (combo), "changed", + G_CALLBACK (contacts_type_entry_changed), + data); + + /* Free change data structure on destruction */ + g_signal_connect_swapped (G_OBJECT (align), "destroy", + G_CALLBACK (g_free), data); + + return align; + } + + return NULL; +} + +/* This function returns a GtkEntry derived from field_id for a particular + * contact. + * Returns GtkWidget * on success, NULL on failure + */ +GtkWidget * +contacts_label_widget_new (EContact *contact, EVCardAttribute *attr, + const gchar *name, gboolean multi_line, + gboolean *changed) +{ + GtkWidget *label_widget, *type_edit = NULL, *container; + gchar *label_markup; + + /* Create label/button text */ + label_markup = g_strdup_printf ("%s:", name); + + /* Create widget */ + label_widget = gtk_label_new (NULL); + gtk_label_set_use_markup (GTK_LABEL (label_widget), TRUE); + gtk_label_set_markup (GTK_LABEL (label_widget), label_markup); + gtk_label_set_justify (GTK_LABEL (label_widget), GTK_JUSTIFY_RIGHT); + if (/*(e_vcard_attribute_is_single_valued (attr)) &&*/ + (multi_line == FALSE)) + gtk_misc_set_alignment (GTK_MISC (label_widget), 1, 0.5); + else + gtk_misc_set_alignment (GTK_MISC (label_widget), 1, 0); + + g_free (label_markup); + + if (e_vcard_attribute_is_single_valued (attr)) + type_edit = contacts_type_edit_widget_new (attr, multi_line, + changed); + if (type_edit) { + gtk_widget_show (type_edit); + gtk_widget_show (label_widget); + container = gtk_hbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX (container), label_widget, + FALSE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (container), type_edit, + FALSE, FALSE, 0); + label_widget = container; + } + + gtk_widget_set_name (label_widget, e_vcard_attribute_get_name (attr)); + return label_widget; +} + +/* This function returns a GtkEntry derived from field_id for a particular + * contact. + * Returns GtkWidget * on success, NULL on failure + * TODO: Lots of duplicated code here, perhaps add a few bits to utils? + */ +static GtkWidget * +contacts_edit_widget_new (EContact *contact, EVCardAttribute *attr, + gboolean multi_line, gboolean *changed) +{ + GtkWidget *type_edit; + EContactChangeData *data; + const gchar *attr_name = e_vcard_attribute_get_name (attr); + + /* Create data structure for changes */ + data = g_new0 (EContactChangeData, 1); + data->contact = contact; + data->attr = attr; + data->changed = changed; + + /* Create widget */ + if (!e_vcard_attribute_is_single_valued (attr)) { + /* Handle structured fields */ + GtkWidget *adr_table; + guint field; + GList *values = e_vcard_attribute_get_values (attr); + + adr_table = gtk_table_new (1, 2, FALSE); + gtk_table_set_col_spacings (GTK_TABLE (adr_table), 6); + gtk_table_set_row_spacings (GTK_TABLE (adr_table), 6); + gtk_container_set_border_width (GTK_CONTAINER (adr_table), 6); + + /* Set widget that contains attribute data */ + data->widget = adr_table; + + /* Add type editor */ + type_edit = contacts_type_edit_widget_new (attr, multi_line, + changed); + if (type_edit) { + GtkWidget *label = gtk_label_new (NULL); + gtk_label_set_use_markup (GTK_LABEL (label), TRUE); + gtk_label_set_markup (GTK_LABEL (label), + /* TODO: make nicer for i18n */ + _("Type:")); + gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); + gtk_table_attach (GTK_TABLE (adr_table), label, 0, 1, + 0, 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE (adr_table), type_edit, + 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + gtk_widget_show (type_edit); + } + + /* Create sub-fields */ + for (field = 0; values; values = values->next, field++) { + /* If no information exists, assume field is + * single-lined. + * TODO: It may be more intelligent in the future + * to look at the value and search for new-line + * characters. + */ + gboolean multiline = FALSE; + GtkWidget *label = NULL, *entry; + const ContactsStructuredField *sfield = + contacts_get_structured_field (attr_name, field); + const gchar *string = (const gchar *)values->data; + /* If we have the information, label the field */ + if (sfield) { + gchar *label_markup; + + label = gtk_label_new (NULL); + multiline = sfield->multiline; + gtk_label_set_use_markup (GTK_LABEL (label), + TRUE); + label_markup = g_strdup_printf ( + "%s:", + gettext(sfield->subfield_name)); + gtk_label_set_markup (GTK_LABEL (label), + label_markup); + g_free (label_markup); + gtk_label_set_justify (GTK_LABEL (label), + GTK_JUSTIFY_RIGHT); + if (!multiline) + gtk_misc_set_alignment ( + GTK_MISC (label), 1, 0.5); + else + gtk_misc_set_alignment ( + GTK_MISC (label), 1, 0); + gtk_table_attach (GTK_TABLE (adr_table), label, + 0, 1, field + 1, field + 2, + GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + } + /* This code is pretty much a verbatim copy of the + * code below to handle single-valued fields + */ + if (multiline) { + GtkTextBuffer *buffer; + GtkTextView *view; + + view = GTK_TEXT_VIEW (gtk_text_view_new ()); + gtk_widget_set_name (GTK_WIDGET (view), + attr_name); + buffer = gtk_text_view_get_buffer (view); + + gtk_text_buffer_set_text (buffer, string ? + string : "", -1); + gtk_text_view_set_editable (view, TRUE); + + entry = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (entry), + GTK_SHADOW_IN); + gtk_container_add (GTK_CONTAINER (entry), + GTK_WIDGET (view)); + gtk_widget_show (GTK_WIDGET (view)); + + /* Connect signal for changes */ + g_signal_connect (G_OBJECT (buffer), "changed", + G_CALLBACK + (contacts_entry_changed), + data); + } else { + entry = gtk_entry_new (); + gtk_widget_set_name (entry, attr_name); + gtk_entry_set_text (GTK_ENTRY (entry), + string ? string : ""); + + /* Connect signal for changes */ + g_signal_connect (G_OBJECT (entry), "changed", + G_CALLBACK + (contacts_entry_changed), + data); + } + gtk_widget_show (entry); + /* Hide the label when the entry is hidden */ + g_signal_connect_swapped (G_OBJECT (entry), "hide", + G_CALLBACK (gtk_widget_hide), + label); + gtk_table_attach (GTK_TABLE (adr_table), entry, + 1, 2, field + 1, field + 2, + GTK_FILL | GTK_EXPAND, GTK_FILL, + 0, 0); + } + } else if (multi_line) { + /* Handle single-valued fields that span multiple lines */ + gchar *string = e_vcard_attribute_get_value (attr); + + GtkWidget *container = NULL; + GtkTextView *view = GTK_TEXT_VIEW (gtk_text_view_new ()); + GtkTextBuffer *buffer = gtk_text_view_get_buffer (view); + + gtk_widget_set_name (GTK_WIDGET (view), attr_name); + gtk_text_buffer_set_text (buffer, string ? string : "", -1); + gtk_text_view_set_editable (view, TRUE); + g_free (string); + + container = gtk_frame_new (NULL); + gtk_frame_set_shadow_type ( + GTK_FRAME (container), GTK_SHADOW_IN); + gtk_container_add (GTK_CONTAINER (container), + GTK_WIDGET (view)); + gtk_widget_show (GTK_WIDGET (view)); + +/* if (type_edit) { + gtk_widget_show (type_edit); + gtk_widget_show (window); + container = gtk_hbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX (container), type_edit, + FALSE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (container), window, + TRUE, TRUE, 0); + }*/ + + /* Set widget that contains attribute data */ + data->widget = container; + + /* Connect signal for changes */ + g_signal_connect (G_OBJECT (buffer), "changed", G_CALLBACK + (contacts_entry_changed), data); + } else { + /* Handle simple single-valued single-line fields */ + gchar *string = e_vcard_attribute_get_value (attr); + GtkWidget *entry, *container = NULL; + + entry = gtk_entry_new (); + gtk_entry_set_text (GTK_ENTRY (entry), + string ? string : ""); + gtk_widget_set_name (entry, attr_name); + g_free (string); + +/* if (type_edit) { + gtk_widget_show (type_edit); + gtk_widget_show (entry); + container = gtk_hbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX (container), type_edit, + FALSE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (container), entry, + TRUE, TRUE, 0); + }*/ + + /* Set widget that contains attribute data */ + data->widget = container ? container : entry; + + /* Connect signal for changes */ + g_signal_connect (G_OBJECT (entry), "changed", G_CALLBACK + (contacts_entry_changed), data); + } + + /* Free change data structure on destruction */ + g_signal_connect_swapped (G_OBJECT (data->widget), "destroy", + G_CALLBACK (g_free), data); + + gtk_widget_set_name (data->widget, attr_name); + return data->widget; +} + +static gboolean +contacts_edit_focus_in (GtkWidget *widget, GdkEventFocus *event, + gpointer user_data) +{ + GtkWidget *ebox = user_data; +/* GtkWidget *child = gtk_bin_get_child (GTK_BIN (ebox));*/ + + gtk_widget_set_state (ebox, GTK_STATE_SELECTED); + + gtk_widget_set_state (gtk_bin_get_child ( + GTK_BIN (ebox)), GTK_STATE_NORMAL); + +/* if (GTK_IS_EXPANDER (child)) + gtk_widget_set_state (gtk_expander_get_label_widget ( + GTK_EXPANDER (child)), GTK_STATE_SELECTED); + else if (GTK_IS_LABEL (child)) + gtk_widget_set_state (child, GTK_STATE_SELECTED); + else if (GTK_IS_BOX (child)) { + GList *children = + gtk_container_get_children (GTK_CONTAINER (child)); + if (children && GTK_IS_LABEL (children->data)) + gtk_widget_set_state ( + children->data, GTK_STATE_SELECTED); + g_list_free (children); + }*/ + + return FALSE; +} + +static gboolean +contacts_edit_focus_out (GtkWidget *widget, GdkEventFocus *event, + gpointer user_data) +{ + GtkWidget *ebox = user_data; + gtk_widget_set_state (ebox, GTK_STATE_NORMAL); + return FALSE; +} + +static GtkWidget * +contacts_edit_add_focus_events (GtkWidget *widget, GtkWidget *ebox, + GList *widgets) +{ + if (!ebox) { + GtkWidget *align = gtk_alignment_new (0.5, 0.5, 1, 1); + ebox = gtk_event_box_new (); + gtk_container_add (GTK_CONTAINER (align), widget); + gtk_alignment_set_padding (GTK_ALIGNMENT (align), 0, 0, 6, 6); + gtk_container_add (GTK_CONTAINER (ebox), align); + gtk_widget_show (align); + gtk_widget_show (ebox); + gtk_widget_set_name (ebox, gtk_widget_get_name (widget)); + } + + if (!widget) + return ebox; + + if (GTK_IS_CONTAINER (widget) && !GTK_IS_TEXT_VIEW (widget)) { + GList *c, *children = + gtk_container_get_children (GTK_CONTAINER (widget)); + for (c = children; c; c = c->next) { + contacts_edit_add_focus_events (GTK_WIDGET (c->data), + ebox, widgets); + } + g_list_free (children); + } else if (GTK_IS_WIDGET (widget)) { + GList *w; + g_signal_connect (G_OBJECT (widget), "focus-in-event", + G_CALLBACK (contacts_edit_focus_in), ebox); + g_signal_connect (G_OBJECT (widget), "focus-out-event", + G_CALLBACK (contacts_edit_focus_out), ebox); + for (w = widgets; w; w = w->next) { + g_signal_connect (G_OBJECT (widget), "focus-in-event", + G_CALLBACK (contacts_edit_focus_in), w->data); + g_signal_connect (G_OBJECT (widget), "focus-out-event", + G_CALLBACK (contacts_edit_focus_out), w->data); + } + } + + return ebox; +} + +/* Helper function to add contacts label/edit widget pairs to a table, + * with respect for structured field edits. + */ +void +contacts_append_to_edit_table (GtkTable *table, GtkWidget *label, + GtkWidget *edit, gboolean do_focus) +{ + guint rows, cols; + + g_object_get (table, "n-rows", &rows, NULL); + g_object_get (table, "n-columns", &cols, NULL); + + gtk_widget_show (label); + gtk_widget_show (edit); + if (contacts_get_structured_field ( + gtk_widget_get_name (GTK_WIDGET (label)), 0)) { + GtkWidget *expander = gtk_expander_new (NULL); + GtkWidget *viewport = gtk_viewport_new (NULL, NULL); + gtk_expander_set_label_widget (GTK_EXPANDER (expander), label); + gtk_container_add (GTK_CONTAINER (viewport), edit); + gtk_widget_show (viewport); + gtk_container_add (GTK_CONTAINER (expander), viewport); + gtk_expander_set_expanded (GTK_EXPANDER (expander), + TRUE); + gtk_widget_show (expander); + gtk_widget_set_name (expander, gtk_widget_get_name (edit)); + /* Highlight selected field */ + if (do_focus) { + expander = contacts_edit_add_focus_events ( + expander, NULL, NULL); + } + gtk_table_attach (table, + GTK_WIDGET (expander), 0, cols, + rows, rows+1, GTK_FILL | GTK_EXPAND, + GTK_FILL, 0, 0); + } else { + /* Hide the label when the entry is hidden */ + g_signal_connect_swapped (G_OBJECT (edit), "hide", + G_CALLBACK (gtk_widget_hide), + label); + + /* Highlight selected field */ + if (do_focus) { + GList *l; + GtkWidget *box = gtk_event_box_new (); + gtk_container_add (GTK_CONTAINER (box), edit); + gtk_widget_set_name (box, gtk_widget_get_name (edit)); + gtk_widget_show (box); + l = g_list_prepend (NULL, box); + label = contacts_edit_add_focus_events ( + label, NULL, l); + g_list_free (l); + l = g_list_prepend (NULL, label); + edit = contacts_edit_add_focus_events (edit, box, l); + g_list_free (l); + } + + gtk_table_attach (table, label, + 0, 1, rows, rows+1, GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (table, edit, 1, cols, rows, rows+1, + GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); + } +} + +typedef struct { + EVCardAttribute *attr; + ContactsData *contacts_data; +} ContactsGroupChangeData; + +static void +contacts_change_groups_cb (GtkWidget *widget, ContactsGroupChangeData *data) +{ + GList *g, *bools = NULL; + GList *results = NULL; + GList *values = e_vcard_attribute_get_values (data->attr); + + for (g = data->contacts_data->contacts_groups; g; g = g->next) { + if (g_list_find_custom (values, g->data, (GCompareFunc)strcmp)) + bools = g_list_append (bools, GINT_TO_POINTER (TRUE)); + else + bools = g_list_append (bools, GINT_TO_POINTER (FALSE)); + } + + if (contacts_chooser (data->contacts_data, _("Change groups"), _("Choose groups" + ""), data->contacts_data->contacts_groups, bools, TRUE, TRUE, &results)) { + + gchar *new_groups = results ? + contacts_string_list_as_string (results, ", ", FALSE) : + g_strdup ("None"); + g_free (new_groups); + + e_vcard_attribute_remove_values (data->attr); + for (g = results; g; g = g->next) { + e_vcard_attribute_add_value (data->attr, g->data); + if (!g_list_find_custom (data->contacts_data->contacts_groups, g->data, (GCompareFunc) strcmp)) + data->contacts_data->contacts_groups = g_list_prepend (data->contacts_data->contacts_groups, g_strdup (g->data)); + } + data->contacts_data->changed = TRUE; + } +} + +static gint +contacts_find_widget_cb (GtkWidget *widget, const gchar *name) +{ + return strcmp (gtk_widget_get_name (widget), name); +} + +static void +contacts_add_field_cb (GtkWidget *button, ContactsData *data) +{ + GList *fields = NULL; + GHashTable *field_trans; + GList *field, *children; + guint i; + EContact *contact = data->contact; + + children = gtk_container_get_children (GTK_CONTAINER ( + data->ui->edit_table)); + field_trans = g_hash_table_new (g_str_hash, g_str_equal); + for (i = 0; contacts_fields[i].vcard_field; i++) { + /* If a unique field exists, don't give the option to add it */ + if (contacts_fields[i].unique) { + gboolean visible; + GList *unique_field = g_list_find_custom (children, + contacts_fields[i].vcard_field, + (GCompareFunc)contacts_find_widget_cb); + + if (unique_field) { + GObject *f = G_OBJECT (unique_field->data); + g_object_get (f, "visible", &visible, NULL); + if (visible) + continue; + } + } + + const gchar *vcard_field = contacts_fields[i].vcard_field; + const gchar *pretty_name = contacts_field_pretty_name ( + &contacts_fields[i]); + fields = g_list_append (fields, (gpointer)pretty_name); + g_hash_table_insert (field_trans, (gpointer)pretty_name, + (gpointer)vcard_field); + } + g_list_free (children); + + if (contacts_chooser (data, _("Add field"), + /* TODO: make nicer for i18n */ + _("Choose a field"), fields, + NULL, FALSE, FALSE, &field)) { + GtkWidget *label, *edit, *table; + const ContactsField *cfield; + EVCardAttribute *attr; + const gchar *pretty_name; + gchar *vcard_field = g_hash_table_lookup ( + field_trans, (gconstpointer)field->data); + + cfield = contacts_get_contacts_field (vcard_field); + attr = contacts_add_attr (E_VCARD (contact), vcard_field); + pretty_name = contacts_field_pretty_name (cfield); + + label = contacts_label_widget_new (contact, attr, + pretty_name, cfield->multi_line, &data->changed); + edit = contacts_edit_widget_new (contact, attr, + cfield->multi_line, &data->changed); + table = data->ui->edit_table; + + contacts_append_to_edit_table (GTK_TABLE (table), label, edit, + TRUE); + + g_list_foreach (field, (GFunc) g_free, NULL); + g_list_free (field); + } + + g_list_free (fields); + g_hash_table_destroy (field_trans); +} + +/* Helper method to clear the text in a GtkEntry or GtkTextView and hide it */ +static void +contacts_remove_entries (GtkWidget *entry) +{ + if (GTK_IS_ENTRY (entry)) { + if (gtk_widget_get_ancestor (entry, GTK_TYPE_COMBO_BOX_ENTRY)) + return; + + gtk_entry_set_text (GTK_ENTRY (entry), ""); + gtk_widget_hide (entry); + } else if (GTK_IS_TEXT_VIEW (entry)) { + GtkTextBuffer *buffer = + gtk_text_view_get_buffer (GTK_TEXT_VIEW (entry)); + + gtk_text_buffer_set_text (buffer, "", -1); + + entry = gtk_widget_get_ancestor (entry, GTK_TYPE_BIN); + gtk_widget_hide (entry); + } else if (GTK_IS_CONTAINER (entry)) { + GList *c, *children = + gtk_container_get_children (GTK_CONTAINER (entry)); + + for (c = children; c; c = c->next) + contacts_remove_entries (GTK_WIDGET (c->data)); + + gtk_widget_hide (entry); + + g_list_free (children); + } +} + +static gboolean +contacts_widget_is_label (GtkWidget *widget) +{ + if (GTK_IS_LABEL (widget)) + return TRUE; + else if (GTK_IS_EXPANDER (widget)) + return FALSE; + else if (GTK_IS_CONTAINER (widget)) { + GList *c, *children = + gtk_container_get_children (GTK_CONTAINER (widget)); + + for (c = children; c; c = c->next) { + if (contacts_widget_is_label (GTK_WIDGET (c->data))) { + g_list_free (children); + return TRUE; + } + } + + g_list_free (children); + } + + return FALSE; +} + +void +contacts_edit_set_focus_cb (GtkWidget *button, GtkWidget *widget, + GtkWindow *window) +{ + if (widget && (GTK_IS_ENTRY (widget) || GTK_IS_TEXT_VIEW (widget)) && + strcmp ("FN", gtk_widget_get_name (widget)) != 0) + gtk_widget_set_sensitive (button, TRUE); + else + gtk_widget_set_sensitive (button, FALSE); +} + +void +contacts_remove_field_cb (GtkWidget *button, gpointer data) +{ + GtkWidget *window = gtk_widget_get_toplevel (button); + GtkWidget *widget = gtk_window_get_focus (GTK_WINDOW (window)); + GtkWidget *ancestor = gtk_widget_get_ancestor ( + widget, GTK_TYPE_EXPANDER); + + gtk_window_set_focus (GTK_WINDOW (window), NULL); + + if (ancestor) { + contacts_remove_entries (ancestor); + return; + } + + ancestor = gtk_widget_get_ancestor (widget, GTK_TYPE_COMBO_BOX_ENTRY); + if (ancestor) { + const gchar *name; + guint top, left; + GtkWidget *table; + GList *c, *children; + + ancestor = gtk_widget_get_ancestor ( + ancestor, GTK_TYPE_EVENT_BOX); + name = gtk_widget_get_name (ancestor); + table = gtk_widget_get_ancestor (ancestor, GTK_TYPE_TABLE); + gtk_container_child_get (GTK_CONTAINER (table), + ancestor, "left-attach", &left, + "top-attach", &top, NULL); + + children = gtk_container_get_children (GTK_CONTAINER (table)); + for (c = children; c; c = c->next) { + guint ctop, cleft; + gtk_container_child_get (GTK_CONTAINER (table), + GTK_WIDGET (c->data), + "left-attach", &cleft, + "top-attach", &ctop, NULL); + if ((cleft == left+1) && (ctop == top)) { + contacts_remove_entries (GTK_WIDGET (c->data)); + break; + } + } + g_list_free (c); + return; + } + + contacts_remove_entries (widget); +} + +static gint +contacts_widgets_list_sort (GtkWidget *a, GtkWidget *b) +{ + const ContactsField *field1, *field2; + + field1 = contacts_get_contacts_field (gtk_widget_get_name (a)); + field2 = contacts_get_contacts_field (gtk_widget_get_name (b)); + + return field1->priority - field2->priority; +} + +static gint +contacts_widgets_list_find (GtkWidget *a, guint *b) +{ + const ContactsField *field1; + + field1 = contacts_get_contacts_field (gtk_widget_get_name (a)); + + return field1->priority - *b; +} + +static void +contacts_edit_choose_photo (GtkWidget *button, ContactsData *data) +{ + data->changed = TRUE; + contacts_choose_photo (button, data->contact); +} + +void +hito_contact_edit_pane_show (HitoContactEdit *edit, EContact *contact, EBook *book, gboolean new) +{ + GtkWidget *align, *button, *widget/*, *glabel, *gbutton*/; + EVCardAttribute *groups_attr = NULL; + ContactsGroupChangeData *gdata; + guint row, i; + GList *attributes, *c, *d, *label_widgets, *edit_widgets; + + /* remove any widgets in the edit table */ + gtk_container_foreach (GTK_CONTAINER (edit), + (GtkCallback)contacts_remove_edit_widgets_cb, + NULL); + + /* Create edit pane widgets */ + attributes = e_vcard_get_attributes (E_VCARD (contact)); + label_widgets = NULL; + edit_widgets = NULL; + for (c = attributes; c; c = c->next) { + EVCardAttribute *a = (EVCardAttribute*)c->data; + const gchar *name = e_vcard_attribute_get_name (a); + const FieldInfo *field = contacts_get_contacts_field (name); + + if (field) { + GtkWidget *label, *edit; + const gchar *pretty_name = + contacts_field_pretty_name (field); + + label = contacts_label_widget_new (contact, a, + pretty_name, + field->multi_line, + &data->changed); + edit = contacts_edit_widget_new (contact, a, + field->multi_line, + &data->changed); + + if (label && edit) { + label_widgets = g_list_append (label_widgets, + label); + edit_widgets = g_list_append (edit_widgets, + edit); + } + } else if (g_ascii_strcasecmp (name, "CATEGORIES") == 0) { + /* Create categories widget */ +/* GList *values = e_vcard_attribute_get_values (a); + gchar *types = + contacts_string_list_as_string (values, ", "); + gtk_button_set_label (GTK_BUTTON (gbutton), types); + g_free (types);*/ + + groups_attr = a; + } + } + + if (!groups_attr) { + groups_attr = e_vcard_attribute_new (NULL, "CATEGORIES"); + e_vcard_add_attribute (E_VCARD (contact), groups_attr); + } + + /* Add any missing widgets */ + for (i = 0; fields[i].vcard_field != NULL; i++) { + if ((fields[i].priority >= REQUIRED) || + ((!fields[i].unique) && (!new))) + continue; + if (g_list_find_custom (label_widgets, + fields[i].priority, + (GCompareFunc) + contacts_widgets_list_find) == NULL) { + EVCardAttribute *attr = + contacts_add_attr (E_VCARD (contact), + fields[i].vcard_field); + GtkWidget *label, *edit; + const gchar *pretty_name = fields[i].label; + + label = contacts_label_widget_new (contact, attr, + pretty_name, fields[i].multi_line, + &data->changed); + edit = contacts_edit_widget_new (contact, attr, + fields[i].multi_line, + &data->changed); + + if (label && edit) { + label_widgets = g_list_append (label_widgets, + label); + edit_widgets = g_list_append (edit_widgets, + edit); + } + } + } + + /* Sort widgets into order and display */ + widget = data->ui->edit_table; + label_widgets = g_list_sort (label_widgets, + (GCompareFunc)contacts_widgets_list_sort); + edit_widgets = g_list_sort (edit_widgets, + (GCompareFunc)contacts_widgets_list_sort); + g_object_set (widget, "n-rows", 1, NULL); + g_object_set (widget, "n-columns", 2, NULL); + for (c = label_widgets, d = edit_widgets, row = 0; (c) && (d); + c = c->next, d = d->next, row++) { + /* Make sure address entries are displayed beneath photo */ + if (row < 2 && GTK_IS_CONTAINER (d->data)) + row = 2; + + /* Widen panel after photo */ + if (row == 2) { + g_object_set (widget, "n-columns", 3, NULL); + g_object_set (widget, "n-rows", 3, NULL); + } + + contacts_append_to_edit_table (GTK_TABLE (widget), + GTK_WIDGET (c->data), + GTK_WIDGET (d->data), TRUE); + + /* Set focus on first entry */ + if (row == 0) + gtk_window_set_focus (GTK_WINDOW ( + data->ui->main_window), + d->data); + } + + /* Add photo */ + align = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (align); + gtk_container_add (GTK_CONTAINER (align), button); + gtk_alignment_set_padding (GTK_ALIGNMENT (align), 0, 0, 6, 6); + g_object_set (widget, "n-rows", 3, NULL); + g_object_set (widget, "n-columns", 3, NULL); + gtk_table_attach (GTK_TABLE (widget), align, 2, 3, + 1, 3, 0, 0, 0, 0); + /* Add groups-editing button */ +/* contacts_append_to_edit_table (GTK_TABLE (widget), + glabel, gbutton);*/ + + g_list_free (label_widgets); + g_list_free (edit_widgets); + + widget = data->ui->main_window; + + /* Connect add group menu item */ + widget = data->ui->edit_groups; + gdata = g_new (ContactsGroupChangeData, 1); + gdata->contacts_data = data; + gdata->attr = groups_attr; + /* Remove any old signals and replace with new ones with the correct + * user data. + */ + g_signal_handlers_disconnect_matched (G_OBJECT (widget), + G_SIGNAL_MATCH_FUNC, 0, 0, + NULL, contacts_change_groups_cb, + NULL); + g_signal_handlers_disconnect_matched (G_OBJECT (widget), + G_SIGNAL_MATCH_FUNC, 0, 0, + NULL, g_free, + NULL); + g_signal_connect (G_OBJECT (widget), "activate", + G_CALLBACK (contacts_change_groups_cb), gdata); + g_signal_connect_swapped (G_OBJECT (widget), "hide", + G_CALLBACK (g_free), gdata); + if (data->ui->contacts_menu && data->ui->contact_menu) + { + gtk_widget_hide (data->ui->contacts_menu); + gtk_widget_show (widget); + } + if ((widget = data->ui->remove_field_button)) + gtk_widget_set_sensitive (widget, FALSE); + + /* Connect delete menu item */ + widget = data->ui->contact_delete; + g_signal_handlers_disconnect_matched (G_OBJECT (widget), + G_SIGNAL_MATCH_FUNC, 0, 0, + NULL, contacts_edit_delete_cb, + NULL); + g_signal_connect (G_OBJECT (widget), "activate", + G_CALLBACK (contacts_edit_delete_cb), data); + + /* Connect add field button */ + if ((widget = data->ui->add_field_button)) + { + g_signal_handlers_disconnect_matched (G_OBJECT (widget), + G_SIGNAL_MATCH_FUNC, 0, 0, + NULL, contacts_add_field_cb, + NULL); + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (contacts_add_field_cb), data); + } + + /* Connect close button */ + if ((widget = data->ui->edit_done_button)) + { + g_signal_handlers_disconnect_matched (G_OBJECT (widget), + G_SIGNAL_MATCH_FUNC, 0, 0, + NULL, contacts_edit_ok_cb, + NULL); + g_signal_handlers_disconnect_matched (G_OBJECT (widget), + G_SIGNAL_MATCH_FUNC, 0, 0, + NULL, contacts_edit_ok_new_cb, + NULL); + if (new) + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (contacts_edit_ok_new_cb), data); + else + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (contacts_edit_ok_cb), data); + gtk_window_set_default (GTK_WINDOW ( + data->ui->main_window), widget); + } +} --- contacts-snapshot-0.5.orig/libhito/hito-contact-edit.c +++ contacts-snapshot-0.5/libhito/hito-contact-edit.c @@ -0,0 +1,577 @@ +#include +#include "hito-contact-edit.h" + +G_DEFINE_TYPE (HitoContactEdit, hito_contact_edit, GTK_TYPE_VBOX); + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), HITO_TYPE_CONTACT_EDIT, HitoContactEditPrivate)) + +typedef struct _HitoContactEditPrivate HitoContactEditPrivate; + +struct _HitoContactEditPrivate +{ + EContact *contact; +}; + +enum { + PROP_CONTACT = 1 +}; + +typedef struct { + char *vcard_field; /* vCard field */ + char *label; /* Display label, NULL for no label */ + char *icon; /* Icon to display next to label */ + char *markup; /* Formatted markup to display content with, or NULL */ + gint priority; + gboolean multiline; +} FieldInfo; + +static FieldInfo fields[] = { + { EVC_FN, "Name:", NULL, "%s", 10, FALSE }, + { EVC_EMAIL, "Email:", "stock_mail", NULL, 30, FALSE }, + { EVC_X_JABBER, "Jabber:", NULL, NULL, 100, FALSE }, + { EVC_TEL, "Telephone:", NULL, NULL, 20, FALSE }, + { EVC_ADR, "Address:", NULL, NULL, 40, TRUE }, +}; + +FieldInfo *hito_contact_edit_get_field (const gchar *fieldname) { + gint i; + for (i = 0; i < G_N_ELEMENTS (fields); i++) { + if (strcmp (fieldname, fields[i].vcard_field) == 0) + return &fields[i]; + } + return NULL; +} + +static gint +hito_contact_edit_widgets_list_sort (GtkWidget *a, GtkWidget *b) +{ + const FieldInfo *field1, *field2; + + field1 = hito_contact_edit_get_field (gtk_widget_get_name (a)); + field2 = hito_contact_edit_get_field (gtk_widget_get_name (b)); + + return field1->priority - field2->priority; +} + +struct contacts_field_types_def { + char *field; + gchar **types; +}; + +static const struct contacts_field_types_def contacts_field_types[] = { + /* TODO: can these be i18n-ized? */ + { "TEL", (gchar*[]){"Home", "Msg", "Work", "Pref", "Voice", "Fax", + "Cell", "Video", "Pager", "BBS", "Modem", "Car", + "ISDN", "PCS", NULL }}, + { "EMAIL", (gchar*[]){"Internet", "X400", "Pref", NULL}}, + { "ADR", (gchar*[]){"Dom", "Intl", "Postal", "Parcel", "Home", "Work", "Pref", NULL}}, + { NULL, NULL } +}; + +const gchar ** +hito_contact_edit_get_field_types (const gchar *attr_name) +{ + guint i; + + for (i = 0; contacts_field_types[i].field; i++) { + if (strcmp (contacts_field_types[i].field, attr_name) == 0) + return (const gchar **)contacts_field_types[i].types; + } + + return NULL; +} + +typedef struct { + const gchar *attr_name; + guint field; + const gchar *subfield_name; + gboolean multiline; +} ContactsStructuredField; + +static const ContactsStructuredField contacts_sfields[] = { + { "ADR", 0, ("PO Box"), FALSE }, + { "ADR", 1, ("Ext."), TRUE }, + { "ADR", 2, ("Street"), TRUE }, + { "ADR", 3, ("Locality"), FALSE }, + { "ADR", 4, ("Region"), FALSE }, + { "ADR", 5, ("Post Code"), FALSE }, + { "ADR", 6, ("Country"), FALSE }, + { NULL, 0, NULL, FALSE } +}; + +const ContactsStructuredField * +contacts_get_structured_field (const gchar *attr_name, guint field) +{ + guint i; + + for (i = 0; contacts_sfields[i].attr_name; i++) { + if (strcmp (contacts_sfields[i].attr_name, attr_name) == 0) { + if (contacts_sfields[i].field == field) + return &contacts_sfields[i]; + } + } + return NULL; +} + +static guint +hito_contact_edit_get_structured_field_size (const gchar *attr_name) +{ + guint i, size = 1; + + for (i = 0; contacts_sfields[i].attr_name; i++) + if (strcmp (contacts_sfields[i].attr_name, attr_name) == 0) + if (contacts_sfields[i].field+1 > size) + size = contacts_sfields[i].field+1; + return size; +} + +static EVCardAttribute * +hito_contact_edit_add_attr (EVCard *contact, const FieldInfo *field) +{ + guint i; + + EVCardAttribute *attr = e_vcard_attribute_new ("", field->vcard_field); + for (i = hito_contact_edit_get_structured_field_size (field->vcard_field); + i > 0; i--) { + e_vcard_attribute_add_value (attr, ""); + } + + e_vcard_add_attribute (contact, attr); + return attr; +} + + +GList * +hito_contact_edit_get_types (GList *params) +{ + GList *list = NULL; + + for (; params; params = params->next) { + EVCardAttributeParam *p = (EVCardAttributeParam *)params->data; + if (strcmp ("TYPE", e_vcard_attribute_param_get_name (p)) == 0) + list = g_list_append (list, p); + } + + return list; +} + + +static void +hito_contact_edit_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + HitoContactEditPrivate *priv = GET_PRIVATE (object); + + switch (property_id) { + case PROP_CONTACT: + g_value_set_object (value, priv->contact); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +hito_contact_edit_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + hito_contact_edit_set_contact (HITO_CONTACT_EDIT (object), + g_value_get_object (value), NULL); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +hito_contact_edit_dispose (GObject *object) +{ + if (G_OBJECT_CLASS (hito_contact_edit_parent_class)->dispose) + G_OBJECT_CLASS (hito_contact_edit_parent_class)->dispose (object); +} + +static void +hito_contact_edit_finalize (GObject *object) +{ + G_OBJECT_CLASS (hito_contact_edit_parent_class)->finalize (object); +} + +static void +hito_contact_edit_class_init (HitoContactEditClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (HitoContactEditPrivate)); + + object_class->get_property = hito_contact_edit_get_property; + object_class->set_property = hito_contact_edit_set_property; + object_class->dispose = hito_contact_edit_dispose; + object_class->finalize = hito_contact_edit_finalize; + + g_object_class_install_property (object_class, PROP_CONTACT, + g_param_spec_object ("contact", "contact", NULL, + E_TYPE_CONTACT, + G_PARAM_READWRITE | + G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); +} + +static void +hito_contact_edit_init (HitoContactEdit *self) +{ + gtk_box_set_spacing (GTK_BOX (self), 6); +} + +GtkWidget* +hito_contact_edit_new (void) +{ + return g_object_new (HITO_TYPE_CONTACT_EDIT, NULL); +} + +static void +hito_contact_edit_changed (GtkWidget *widget, EContactChangeData *data) +{ + const gchar *value; + + if (GTK_WIDGET_TYPE(data->widget) == GTK_TYPE_ENTRY) { + value = gtk_entry_get_text (GTK_ENTRY(data->widget)); + e_vcard_attribute_remove_values (data->attr); + e_vcard_attribute_add_value (data->attr, value); + } else if (GTK_WIDGET_TYPE(data->widget) == GTK_TYPE_COMBO_BOX_ENTRY) { + value = gtk_combo_box_get_active_text (GTK_COMBO_BOX(data->widget)); + e_vcard_attribute_param_remove_values (data->param); + e_vcard_attribute_param_add_value (data->param, value); + } else if (GTK_WIDGET_TYPE(data->widget) == GTK_TYPE_TABLE) { + GList *child, *children = gtk_container_get_children (GTK_CONTAINER (data->widget)); + e_vcard_attribute_remove_values (data->attr); + children = g_list_reverse (children); + for (child = children; child; child = child->next) { + GtkWidget *w = child->data; + if (GTK_WIDGET_TYPE(w) == GTK_TYPE_COMBO_BOX_ENTRY) { + value = gtk_combo_box_get_active_text (GTK_COMBO_BOX(w)); + e_vcard_attribute_param_remove_values (data->param); + e_vcard_attribute_param_add_value (data->param, value); + } else if (GTK_WIDGET_TYPE(w) == GTK_TYPE_ENTRY) { + value = gtk_entry_get_text (GTK_ENTRY(w)); + e_vcard_attribute_add_value (data->attr, value); + } else if (GTK_WIDGET_TYPE(w) == GTK_TYPE_TEXT_VIEW) { + GtkTextIter start, end; + GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(w)); + gtk_text_buffer_get_iter_at_offset (buffer, &start, 0); + gtk_text_buffer_get_iter_at_offset (buffer, &end, -1); + value = gtk_text_buffer_get_text (buffer, &start, &end, FALSE); + e_vcard_attribute_add_value (data->attr, value); + } + } + } + e_book_commit_contact (data->book, data->contact, NULL); +} + +GtkWidget * +hito_contact_type_edit_widget_new (EContactChangeData *data, EVCardAttribute *attr) +{ + const gchar **types; + types = hito_contact_edit_get_field_types (e_vcard_attribute_get_name (attr)); + if (types) { + guint i; + GtkWidget *combo = gtk_combo_box_entry_new_text (); + gchar *first_type = ""; + EVCardAttributeParam *param; + + GList *contact_types = hito_contact_edit_get_types ( + e_vcard_attribute_get_params (attr)); + if (contact_types) { + param = (EVCardAttributeParam *)contact_types->data; + GList *values = + e_vcard_attribute_param_get_values (param); + first_type = values ? (gchar *)values->data : ""; + g_list_free (contact_types); + } else { + param = e_vcard_attribute_param_new ("TYPE"); + e_vcard_attribute_add_param_with_value ( + attr, param, ""); + } + + data->param = param; + + for (i = 0; types[i]; i++) { + gtk_combo_box_append_text ( + GTK_COMBO_BOX (combo), types[i]); + if (first_type) { + if (g_ascii_strcasecmp (types[i], first_type) == 0) { + first_type = NULL; + gtk_combo_box_set_active (GTK_COMBO_BOX (combo), i); + } + } + } + /* Support custom types, as per spec */ + if ((first_type) && (g_ascii_strncasecmp (first_type, "X-", 2) \ + == 0)) { + gtk_entry_set_text ( + GTK_ENTRY (GTK_BIN (combo)->child), + (const gchar *)(first_type+2)); + first_type = NULL; + } + gtk_combo_box_append_text (GTK_COMBO_BOX (combo), ("Other")); + if (first_type) + gtk_combo_box_set_active (GTK_COMBO_BOX (combo), i); + gtk_widget_show (combo); + + /* TODO: Find something better than this? */ + gtk_widget_set_size_request (combo, 80, -1); + + return combo; + } + return NULL; +} + +GtkWidget * +hito_contact_edit_label_widget_new (EVCardAttribute *attr, const FieldInfo *field, EContact *contact, EBook *book) +{ + GtkWidget *label_widget, *type_edit=NULL, *container; + + EContactChangeData *data = g_new0 (EContactChangeData, 1); + data->contact = contact; + data->attr = attr; + data->book = book; + + label_widget = gtk_label_new (field->label); + + if (e_vcard_attribute_is_single_valued (attr)) + type_edit = hito_contact_type_edit_widget_new (data, attr); + + if (type_edit) { + gtk_widget_show (type_edit); + gtk_widget_show (label_widget); + container = gtk_hbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX (container), label_widget, + FALSE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (container), type_edit, FALSE, FALSE, 0); + label_widget = container; + g_signal_connect (G_OBJECT (type_edit), "changed", G_CALLBACK + (hito_contact_edit_changed), data); + data->widget = type_edit; + } + + gtk_widget_set_name (label_widget, e_vcard_attribute_get_name (attr)); + return label_widget; +} + +GtkWidget * +hito_contact_edit_text_widget_new (EVCardAttribute *attr, const FieldInfo *field, EContact *contact, EBook *book) +{ + GtkWidget *edit = NULL; + gchar *attr_name = e_vcard_attribute_get_name (attr); + if (e_vcard_attribute_is_single_valued (attr)) { + EContactChangeData *data = g_new0 (EContactChangeData, 1); + data->contact = contact; + data->attr = attr; + data->book = book; + gchar *string = e_vcard_attribute_get_value (attr); + + if (field->multiline) { + edit = gtk_text_view_new (); + GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(edit)); + gtk_widget_set_name (edit, attr_name); + gtk_text_buffer_set_text (buffer, string ? string : "", -1); + g_signal_connect (G_OBJECT (buffer), "changed", G_CALLBACK + (hito_contact_edit_changed), data); + + } else { + edit = gtk_entry_new (); + gtk_entry_set_text (GTK_ENTRY (edit), + string ? string : ""); + gtk_widget_set_name (edit, attr_name); + g_signal_connect (G_OBJECT (edit), "changed", G_CALLBACK + (hito_contact_edit_changed), data); + } + data->widget = edit; + g_free (string); + } else { + EContactChangeData *data = g_new0 (EContactChangeData, 1); + GtkWidget *adr_table, *type_edit; + GList *values = e_vcard_attribute_get_values (attr); + guint field; + + data->contact = contact; + data->attr = attr; + data->book = book; + + adr_table = gtk_table_new (1, 2, FALSE); + gtk_table_set_col_spacings (GTK_TABLE (adr_table), 6); + gtk_table_set_row_spacings (GTK_TABLE (adr_table), 6); + gtk_container_set_border_width (GTK_CONTAINER (adr_table), 6); + + data->widget = adr_table; + + type_edit = hito_contact_type_edit_widget_new (data, attr); + if (type_edit) { + GtkWidget *label = gtk_label_new (NULL); + gtk_label_set_use_markup (GTK_LABEL (label), TRUE); + gtk_label_set_markup (GTK_LABEL (label), + /* TODO: make nicer for i18n */ + ("Type:")); + gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); + gtk_table_attach (GTK_TABLE (adr_table), label, 0, 1, + 0, 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE (adr_table), type_edit, + 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + gtk_widget_show (type_edit); + g_signal_connect (G_OBJECT (type_edit), "changed", G_CALLBACK + (hito_contact_edit_changed), data); + } + + /* Create sub-fields */ + for (field = 0; values; values = values->next, field++) { + gboolean multiline = FALSE; + GtkWidget *label = NULL, *entry; + + const ContactsStructuredField *sfield = + contacts_get_structured_field (attr_name, field); + + const gchar *string = (const gchar *)values->data; + + if (sfield) { + gchar *label_markup; + label = gtk_label_new (NULL); + multiline = sfield->multiline; + + gtk_label_set_use_markup (GTK_LABEL (label), + TRUE); + label_markup = g_strdup_printf ( + "%s:", + sfield->subfield_name); + gtk_label_set_markup (GTK_LABEL (label), + label_markup); + g_free (label_markup); + gtk_label_set_justify (GTK_LABEL (label), + GTK_JUSTIFY_RIGHT); + if (!multiline) + gtk_misc_set_alignment ( + GTK_MISC (label), 1, 0.5); + else + gtk_misc_set_alignment ( + GTK_MISC (label), 1, 0); + gtk_table_attach (GTK_TABLE (adr_table), label, + 0, 1, field + 1, field + 2, + GTK_FILL, GTK_FILL, 0, 0); + gtk_widget_show (label); + } + + if (multiline) { + GtkTextBuffer *buffer; + + entry = gtk_text_view_new (); + buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(entry)); + gtk_widget_set_name (entry, attr_name); + gtk_text_buffer_set_text (buffer, string ? string : "", -1); + g_signal_connect (G_OBJECT (buffer), "changed", G_CALLBACK + (hito_contact_edit_changed), data); + + } else { + entry = gtk_entry_new (); + + gtk_entry_set_text (GTK_ENTRY (entry), + string ? string : ""); + gtk_widget_set_name (entry, attr_name); + g_signal_connect (G_OBJECT (entry), "changed", G_CALLBACK + (hito_contact_edit_changed), data); + } + gtk_table_attach (GTK_TABLE (adr_table), entry, + 1, 2, field + 1, field + 2, + GTK_FILL | GTK_EXPAND, GTK_FILL, + 0, 0); + } + gtk_widget_show (adr_table); + edit = adr_table; + } + + gtk_widget_set_name (edit, attr_name); + + return edit; +} + +void +hito_contact_edit_set_contact (HitoContactEdit *edit, EContact *contact, EBook *book) +{ + EVCardAttribute *groups_attr = NULL; + GList *attributes, *c, *d, *label_widgets=NULL, *edit_widgets=NULL; + guint i; + + gtk_container_foreach (GTK_CONTAINER (edit), (GtkCallback)gtk_widget_destroy, NULL); + + if (!contact) + goto done; + + attributes = e_vcard_get_attributes (E_VCARD (contact)); + + for (c = attributes; c!=NULL; c = c->next) { + EVCardAttribute *attr = (EVCardAttribute*)c->data; + const gchar *name = e_vcard_attribute_get_name (attr); + const FieldInfo *field = hito_contact_edit_get_field (name); + + if (field) { + GtkWidget *label, *edit; + + label = hito_contact_edit_label_widget_new (attr, field, contact, book); + edit = hito_contact_edit_text_widget_new (attr, field, contact, book); + if (label && edit) { + label_widgets = g_list_append (label_widgets, + label); + edit_widgets = g_list_append (edit_widgets, + edit); + } + } else if (g_ascii_strcasecmp (name, "CATEGORIES") == 0) { + groups_attr = attr; + } + + if (!groups_attr) { + groups_attr = e_vcard_attribute_new (NULL, "CATEGORIES"); + e_vcard_add_attribute (E_VCARD (contact), groups_attr); + } + + } + + for (i = 0; i < G_N_ELEMENTS (fields); i++) { + if (fields[i].priority >= 100) + continue; + for (d = label_widgets; (d); d = d->next) { + if (strcmp (fields[i].vcard_field, + gtk_widget_get_name (GTK_WIDGET (d->data)))==0) + break; + } + + if (d == NULL) { + GtkWidget *edit, *label; + EVCardAttribute *attr = hito_contact_edit_add_attr (contact, &fields[i]); + + label = hito_contact_edit_label_widget_new (attr, &fields[i], contact, book); + edit = hito_contact_edit_text_widget_new (attr, &fields[i], contact, book); + if (label && edit) { + label_widgets = g_list_append (label_widgets, + label); + edit_widgets = g_list_append (edit_widgets, + edit); + } + } + + } + label_widgets = g_list_sort (label_widgets, + (GCompareFunc)hito_contact_edit_widgets_list_sort); + edit_widgets = g_list_sort (edit_widgets, + (GCompareFunc)hito_contact_edit_widgets_list_sort); + + for (c = label_widgets, d= edit_widgets; (c) && (d); c = c->next, d = d->next) { + GtkWidget *box = gtk_hbox_new (FALSE, 4); + + gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET(c->data), FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET(d->data), FALSE, FALSE, 0); + gtk_widget_show_all (box); + gtk_box_pack_start (GTK_BOX (edit), box, FALSE, FALSE, 0); + } + + done: + g_object_notify (G_OBJECT (edit), "contact"); +} --- contacts-snapshot-0.5.orig/vanilla/Makefile.in +++ contacts-snapshot-0.5/vanilla/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +14,11 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -58,17 +54,21 @@ contacts_OBJECTS = $(am_contacts_OBJECTS) am__DEPENDENCIES_1 = contacts_DEPENDENCIES = $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I. +contacts_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(contacts_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(contacts_SOURCES) DIST_SOURCES = $(contacts_SOURCES) ETAGS = etags @@ -76,8 +76,6 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -112,8 +110,6 @@ GCONFTOOL = @GCONFTOOL@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ -GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ -GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -122,10 +118,9 @@ GNOMEVFS_CFLAGS = @GNOMEVFS_CFLAGS@ GNOMEVFS_LIBS = @GNOMEVFS_LIBS@ GREP = @GREP@ -HAVE_GCONF_FALSE = @HAVE_GCONF_FALSE@ -HAVE_GCONF_TRUE = @HAVE_GCONF_TRUE@ HILDON_CFLAGS = @HILDON_CFLAGS@ HILDON_LIBS = @HILDON_LIBS@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -162,9 +157,8 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MOKOUI_CFLAGS = @MOKOUI_CFLAGS@ MOKOUI_LIBS = @MOKOUI_LIBS@ @@ -191,13 +185,13 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -209,6 +203,7 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ contacts_frontend = @contacts_frontend@ datadir = @datadir@ datarootdir = @datarootdir@ @@ -237,8 +232,11 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ INCLUDES = \ -I$(top_srcdir) @@ -307,7 +305,7 @@ config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @@ -322,7 +320,7 @@ -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ @@ -350,7 +348,7 @@ done contacts$(EXEEXT): $(contacts_OBJECTS) $(contacts_DEPENDENCIES) @rm -f contacts$(EXEEXT) - $(LINK) $(contacts_LDFLAGS) $(contacts_OBJECTS) $(contacts_LDADD) $(LIBS) + $(contacts_LINK) $(contacts_OBJECTS) $(contacts_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -368,22 +366,22 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contacts-utils.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -394,10 +392,6 @@ clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -447,22 +441,21 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -478,7 +471,7 @@ all-am: Makefile $(PROGRAMS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -513,7 +506,7 @@ -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags + distclean-hdr distclean-tags dvi: dvi-am @@ -527,12 +520,20 @@ install-data-am: +install-dvi: install-dvi-am + install-exec-am: install-binPROGRAMS +install-html: install-html-am + install-info: install-info-am install-man: +install-pdf: install-pdf-am + +install-ps: install-ps-am + installcheck-am: maintainer-clean: maintainer-clean-am @@ -553,20 +554,23 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-info-am + tags uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- contacts-snapshot-0.5.orig/mkinstalldirs +++ contacts-snapshot-0.5/mkinstalldirs @@ -1,7 +1,7 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy -scriptversion=2005-06-29.22 +scriptversion=2006-05-11.19 # Original author: Noah Friedman # Created: 1993-05-16 @@ -11,6 +11,9 @@ # bugs to or send patches to # . +nl=' +' +IFS=" "" $nl" errstatus=0 dirmode= --- contacts-snapshot-0.5.orig/ChangeLog +++ contacts-snapshot-0.5/ChangeLog @@ -1,3 +1,8 @@ +2007-09-03 Ross Burton + + * hildon/hildon-contacts.c: + Misc cleanups. + 2007-08-22 Rob Bradford * Makefile.am: --- contacts-snapshot-0.5.orig/debian/control +++ contacts-snapshot-0.5/debian/control @@ -0,0 +1,18 @@ +Source: contacts-snapshot +Section: gnome +Priority: optional +Maintainer: Matthew Garrett +Build-Depends: debhelper (>= 4.1.0), cdbs, intltool, libgtk2.0-dev, libebook1.2-dev (>= 1.8), libgconf2-dev, libhildon-1-dev [lpia], libdbus-glib-1-dev [lpia] +Standards-Version: 3.7.2 + +Package: contacts-snapshot +Architecture: any +Conflicts: contacts +Depends: ${shlibs:Depends}, ${misc:Depends}, evolution-data-server +Description: lightweight addressbook - development version + Contacts is a small, lightweight addressbook that features advanced + vCard field type handling and is designed for use on hand-held + devices, such as the Nokia 770/N800 or the Sharp Zaurus series of + PDAs. + . + This package contains a snapshot of the development version of contacts. \ No newline at end of file --- contacts-snapshot-0.5.orig/debian/menu +++ contacts-snapshot-0.5/debian/menu @@ -0,0 +1,2 @@ +?package(contacts):needs="X11" section="Apps/Tools" \ + title="Contacts" command="/usr/bin/contacts" --- contacts-snapshot-0.5.orig/debian/copyright +++ contacts-snapshot-0.5/debian/copyright @@ -0,0 +1,25 @@ +This package was debianized by Ross Burton on Thu, 23 Feb 2006 +09:47:46 +0000 + +It was downloaded from http://projects.o-hand.com/contacts + +Upstream Author: Chris Lord + +Copyright: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, + USA. + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- contacts-snapshot-0.5.orig/debian/changelog +++ contacts-snapshot-0.5/debian/changelog @@ -0,0 +1,31 @@ +contacts-snapshot (0.5-0ubuntu5) intrepid; urgency=low + + * No-change rebuild for libedataserver1.2-9 -> libedataserver1.2-11 + transistion. + + -- Steve Kowalik Sat, 27 Sep 2008 19:27:45 +1000 + +contacts-snapshot (0.5-0ubuntu4) gutsy; urgency=low + + * Add editing support for LPIA + + -- Matthew Garrett Fri, 28 Sep 2007 17:58:55 +0100 + +contacts-snapshot (0.5-0ubuntu3) gutsy; urgency=low + + * Add missing libdbus-glib-1-dev to Build-Depends for lpia. + + -- Tollef Fog Heen Mon, 27 Aug 2007 22:49:00 +0200 + +contacts-snapshot (0.5-0ubuntu2) gutsy; urgency=low + + * Change devlibhildon-1-dev to libhildon-1-dev in the Build-Depends. + + -- Tollef Fog Heen Mon, 27 Aug 2007 15:33:07 +0200 + +contacts-snapshot (0.5-0ubuntu1) gutsy; urgency=low + + * Initial release + + -- Matthew Garrett Fri, 24 Aug 2007 16:40:11 +0100 + --- contacts-snapshot-0.5.orig/debian/rules +++ contacts-snapshot-0.5/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/gnome.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS="-Wl,-O1 -Wl,--as-needed" +ifeq ($(DEB_BUILD_ARCH),lpia) + DEB_CONFIGURE_EXTRA_FLAGS = --with-frontend=hildon --enable-gconf +else + DEB_CONFIGURE_EXTRA_FLAGS = --enable-gconf +endif --- contacts-snapshot-0.5.orig/debian/compat +++ contacts-snapshot-0.5/debian/compat @@ -0,0 +1 @@ +4