From 78df46c6a5f301ed1edcd6ea048d9b523938fc6e Mon Sep 17 00:00:00 2001 From: nobody Date: Sat, 28 Jun 2003 16:20:00 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'GNOME_VFS_2_5_1'. svn path=/tags/GNOME_VFS_2_5_1/; revision=21653 --- addressbook/gui/merging/.cvsignore | 7 - addressbook/gui/merging/Makefile.am | 25 --- .../gui/merging/e-card-duplicate-detected.glade | 212 --------------------- ...rd-merging-book-commit-duplicate-detected.glade | 212 --------------------- addressbook/gui/merging/e-card-merging.c | 198 ------------------- addressbook/gui/merging/e-card-merging.h | 29 --- 6 files changed, 683 deletions(-) delete mode 100644 addressbook/gui/merging/.cvsignore delete mode 100644 addressbook/gui/merging/Makefile.am delete mode 100644 addressbook/gui/merging/e-card-duplicate-detected.glade delete mode 100644 addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade delete mode 100644 addressbook/gui/merging/e-card-merging.c delete mode 100644 addressbook/gui/merging/e-card-merging.h (limited to 'addressbook/gui/merging') diff --git a/addressbook/gui/merging/.cvsignore b/addressbook/gui/merging/.cvsignore deleted file mode 100644 index d6c55c7345..0000000000 --- a/addressbook/gui/merging/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.lo -*.la diff --git a/addressbook/gui/merging/Makefile.am b/addressbook/gui/merging/Makefile.am deleted file mode 100644 index f30edd5745..0000000000 --- a/addressbook/gui/merging/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -INCLUDES = \ - -DG_LOG_DOMAIN=\"e-card-gui\" \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/addressbook/backend \ - -I$(top_builddir)/addressbook/backend \ - -DG_DISABLE_DEPRECATED \ - -DGTK_DISABLE_DEPRECATED \ - -DLIBGNOME_DISABLE_DEPRECATED \ - -DLIBGNOMEUI_DISABLE_DEPRECATED \ - $(EVOLUTION_ADDRESSBOOK_CFLAGS) - -noinst_LTLIBRARIES = \ - libecardmerging.la - -libecardmerging_la_SOURCES = \ - e-card-merging.c \ - e-card-merging.h - - -glade_DATA = e-card-duplicate-detected.glade \ - e-card-merging-book-commit-duplicate-detected.glade - -EXTRA_DIST = \ - $(glade_DATA) diff --git a/addressbook/gui/merging/e-card-duplicate-detected.glade b/addressbook/gui/merging/e-card-duplicate-detected.glade deleted file mode 100644 index 5c287cd163..0000000000 --- a/addressbook/gui/merging/e-card-duplicate-detected.glade +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - 6 - True - Duplicate Contact Detected - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - - - - True - False - 6 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - 1 - - - - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - 0 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - 5 - 2 - False - 6 - 6 - - - - True - e_card_merging_create_old_card - 0 - 0 - Fri, 08 Jun 2001 01:33:22 GMT - - - 1 - 2 - 4 - 5 - - - - - - True - The name or email address of this contact already exists -in this folder. Would you like to add it anyway? - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 0 - 1 - fill - - - - - - True - Original Contact: - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 3 - 4 - fill - - - - - - True - New Contact: - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - e_card_merging_create_old_card - 0 - 0 - Fri, 08 Jun 2001 01:33:22 GMT - - - 1 - 2 - 2 - 3 - - - - - - True - 0.5 - 0 - 1 - 0 - - - - True - e_create_image_widget - malehead.png - 0 - 0 - Fri, 08 Jun 2001 00:18:39 GMT - - - - - 0 - 1 - 0 - 5 - fill - fill - - - - - 0 - True - True - - - - - - - diff --git a/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade b/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade deleted file mode 100644 index f7cfd259e5..0000000000 --- a/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - 6 - True - Duplicate Contact Detected - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - - - - True - False - 6 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - 1 - - - - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - 0 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - 5 - 2 - False - 6 - 6 - - - - True - e_card_merging_create_old_card - 0 - 0 - Fri, 08 Jun 2001 01:33:22 GMT - - - 1 - 2 - 4 - 5 - - - - - - True - The changed email or name of this contact already -exists in this folder. Would you like to add it anyway? - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 0 - 1 - fill - - - - - - True - Conflicting Contact: - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 3 - 4 - fill - - - - - - True - Changed Contact: - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - e_card_merging_create_old_card - 0 - 0 - Fri, 08 Jun 2001 01:33:22 GMT - - - 1 - 2 - 2 - 3 - - - - - - True - 0.5 - 0 - 1 - 0 - - - - True - e_create_image_widget - malehead.png - 0 - 0 - Fri, 08 Jun 2001 00:18:39 GMT - - - - - 0 - 1 - 0 - 5 - fill - fill - - - - - 0 - True - True - - - - - - - diff --git a/addressbook/gui/merging/e-card-merging.c b/addressbook/gui/merging/e-card-merging.c deleted file mode 100644 index f2322e772c..0000000000 --- a/addressbook/gui/merging/e-card-merging.c +++ /dev/null @@ -1,198 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Code for checking for duplicates when doing ECard work. - * - * Author: - * Christopher James Lahey - * - * Copyright 2001, Ximian, Inc. - */ - -#include - -#include "e-card-merging.h" -#include -#include -#include -#include "addressbook/gui/widgets/e-minicard-widget.h" - -typedef enum { - E_CARD_MERGING_ADD, - E_CARD_MERGING_COMMIT -} ECardMergingOpType; - -typedef struct { - ECardMergingOpType op; - EBook *book; - ECard *card; - EBookIdCallback id_cb; - EBookCallback cb; - gpointer closure; -} ECardMergingLookup; - -static void -free_lookup (ECardMergingLookup *lookup) -{ - g_object_unref (lookup->book); - g_object_unref (lookup->card); - - g_free (lookup); -} - -static void -final_id_cb (EBook *book, EBookStatus status, const char *id, gpointer closure) -{ - ECardMergingLookup *lookup = closure; - - if (lookup->id_cb) - lookup->id_cb (lookup->book, status, id, lookup->closure); - - free_lookup (lookup); -} - -static void -final_cb (EBook *book, EBookStatus status, gpointer closure) -{ - ECardMergingLookup *lookup = closure; - - if (lookup->cb) - lookup->cb (lookup->book, status, lookup->closure); - - free_lookup (lookup); -} - -static void -doit (ECardMergingLookup *lookup) -{ - if (lookup->op == E_CARD_MERGING_ADD) - e_book_add_card (lookup->book, lookup->card, final_id_cb, lookup); - else if (lookup->op == E_CARD_MERGING_COMMIT) - e_book_commit_card (lookup->book, lookup->card, final_cb, lookup); -} - -static void -cancelit (ECardMergingLookup *lookup) -{ - if (lookup->op == E_CARD_MERGING_ADD) { - if (lookup->id_cb) - final_id_cb (lookup->book, E_BOOK_STATUS_CANCELLED, NULL, lookup); - } else if (lookup->op == E_CARD_MERGING_COMMIT) { - if (lookup->cb) - final_cb (lookup->book, E_BOOK_STATUS_CANCELLED, lookup); - } -} - -static void -response (GtkWidget *dialog, int response, ECardMergingLookup *lookup) -{ - gtk_widget_destroy (dialog); - - switch (response) { - case 0: - doit (lookup); - break; - case 1: - cancelit (lookup); - break; - } -} - -static void -match_query_callback (ECard *card, ECard *match, ECardMatchType type, gpointer closure) -{ - ECardMergingLookup *lookup = closure; - - if ((gint) type <= (gint) E_CARD_MATCH_VAGUE) { - doit (lookup); - } else { - GladeXML *ui; - - GtkWidget *widget; - - if (lookup->op == E_CARD_MERGING_ADD) - ui = glade_xml_new (EVOLUTION_GLADEDIR "/e-card-duplicate-detected.glade", NULL, NULL); - else if (lookup->op == E_CARD_MERGING_COMMIT) - ui = glade_xml_new (EVOLUTION_GLADEDIR "/e-card-merging-book-commit-duplicate-detected.glade", NULL, NULL); - else { - doit (lookup); - return; - } - - widget = glade_xml_get_widget (ui, "custom-old-card"); - g_object_set (widget, - "card", match, - NULL); - - widget = glade_xml_get_widget (ui, "custom-new-card"); - g_object_set (widget, - "card", card, - NULL); - - widget = glade_xml_get_widget (ui, "dialog-duplicate-contact"); - - g_signal_connect (widget, "response", - G_CALLBACK (response), lookup); - - gtk_widget_show_all (widget); - } -} - -gboolean -e_card_merging_book_add_card (EBook *book, - ECard *card, - EBookIdCallback cb, - gpointer closure) -{ - ECardMergingLookup *lookup; - - lookup = g_new (ECardMergingLookup, 1); - - lookup->op = E_CARD_MERGING_ADD; - lookup->book = g_object_ref (book); - lookup->card = g_object_ref (card); - lookup->id_cb = cb; - lookup->closure = closure; - - e_card_locate_match_full (book, card, NULL, match_query_callback, lookup); - - return TRUE; -} - -gboolean -e_card_merging_book_commit_card (EBook *book, - ECard *card, - EBookCallback cb, - gpointer closure) -{ - ECardMergingLookup *lookup; - GList *avoid; - - lookup = g_new (ECardMergingLookup, 1); - - lookup->op = E_CARD_MERGING_COMMIT; - lookup->book = g_object_ref (book); - lookup->card = g_object_ref (card); - lookup->cb = cb; - lookup->closure = closure; - - avoid = g_list_append (NULL, card); - - e_card_locate_match_full (book, card, avoid, match_query_callback, lookup); - - g_list_free (avoid); - - return TRUE; -} - -GtkWidget * -e_card_merging_create_old_card(gchar *name, - gchar *string1, gchar *string2, - gint int1, gint int2); - -GtkWidget * -e_card_merging_create_old_card(gchar *name, - gchar *string1, gchar *string2, - gint int1, gint int2) -{ - return e_minicard_widget_new (); -} diff --git a/addressbook/gui/merging/e-card-merging.h b/addressbook/gui/merging/e-card-merging.h deleted file mode 100644 index 8ea1f9f018..0000000000 --- a/addressbook/gui/merging/e-card-merging.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * The Evolution addressbook client object. - * - * Author: - * Christopher James Lahey - * - * Copyright 2001, Ximian, Inc. - */ - -#ifndef __E_CARD_MERGING_H__ -#define __E_CARD_MERGING_H__ - -#include - -G_BEGIN_DECLS - -gboolean e_card_merging_book_add_card (EBook *book, - ECard *card, - EBookIdCallback cb, - gpointer closure); -gboolean e_card_merging_book_commit_card (EBook *book, - ECard *card, - EBookCallback cb, - gpointer closure); - -G_END_DECLS - -#endif /* ! __E_CARD_MERGING_H__ */ -- cgit v1.2.3