diff options
Diffstat (limited to 'addressbook/gui/merging')
-rw-r--r-- | addressbook/gui/merging/.cvsignore | 7 | ||||
-rw-r--r-- | addressbook/gui/merging/Makefile.am | 25 | ||||
-rw-r--r-- | addressbook/gui/merging/e-card-duplicate-detected.glade | 210 | ||||
-rw-r--r-- | addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade | 210 | ||||
-rw-r--r-- | addressbook/gui/merging/e-card-merging.c | 170 | ||||
-rw-r--r-- | addressbook/gui/merging/e-card-merging.h | 29 |
6 files changed, 0 insertions, 651 deletions
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 67536bf7cf..0000000000 --- a/addressbook/gui/merging/e-card-duplicate-detected.glade +++ /dev/null @@ -1,210 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> - -<widget class="GtkDialog" id="dialog-duplicate-contact"> - <property name="visible">True</property> - <property name="title" translatable="yes">Duplicate Contact Detected</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">True</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">8</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="button3"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Add Anyway</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">0</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="button4"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">1</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table1"> - <property name="visible">True</property> - <property name="n_rows">5</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="Custom" id="custom-old-card"> - <property name="visible">True</property> - <property name="creation_function">e_card_merging_create_old_card</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Fri, 08 Jun 2001 01:33:22 GMT</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes">The name or email address of this contact already exists -in this folder. Would you like to add it anyway?</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Original Contact:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes">New Contact:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="Custom" id="custom-new-card"> - <property name="visible">True</property> - <property name="creation_function">e_card_merging_create_old_card</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Fri, 08 Jun 2001 01:33:22 GMT</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - </packing> - </child> - - <child> - <widget class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0</property> - <property name="xscale">1</property> - <property name="yscale">0</property> - - <child> - <widget class="Custom" id="custom2"> - <property name="visible">True</property> - <property name="creation_function">e_create_image_widget</property> - <property name="string1">malehead.png</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> 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 89599a3f7c..0000000000 --- a/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade +++ /dev/null @@ -1,210 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> - -<widget class="GtkDialog" id="dialog-duplicate-contact"> - <property name="visible">True</property> - <property name="title" translatable="yes">Duplicate Contact Detected</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">True</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">8</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="button3"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Change Anyway</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">0</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="button4"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">1</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table1"> - <property name="visible">True</property> - <property name="n_rows">5</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="Custom" id="custom-old-card"> - <property name="visible">True</property> - <property name="creation_function">e_card_merging_create_old_card</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Fri, 08 Jun 2001 01:33:22 GMT</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes">The changed email or name of this contact already -exists in this folder. Would you like to add it anyway?</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Conflicting Contact:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Changed Contact:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="Custom" id="custom-new-card"> - <property name="visible">True</property> - <property name="creation_function">e_card_merging_create_old_card</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Fri, 08 Jun 2001 01:33:22 GMT</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - </packing> - </child> - - <child> - <widget class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0</property> - <property name="xscale">1</property> - <property name="yscale">0</property> - - <child> - <widget class="Custom" id="custom2"> - <property name="visible">True</property> - <property name="creation_function">e_create_image_widget</property> - <property name="string1">malehead.png</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/addressbook/gui/merging/e-card-merging.c b/addressbook/gui/merging/e-card-merging.c deleted file mode 100644 index 1b3da3e063..0000000000 --- a/addressbook/gui/merging/e-card-merging.c +++ /dev/null @@ -1,170 +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 <clahey@ximian.com> - * - * Copyright 2001, Ximian, Inc. - */ - -#include <config.h> - -#include "e-card-merging.h" -#include <ebook/e-card-compare.h> -#include <glade/glade.h> -#include <gtk/gtksignal.h> -#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 -doit (ECardMergingLookup *lookup) -{ - if (lookup->op == E_CARD_MERGING_ADD) - e_book_add_card (lookup->book, lookup->card, lookup->id_cb, lookup->closure); - else if (lookup->op == E_CARD_MERGING_COMMIT) - e_book_commit_card (lookup->book, lookup->card, lookup->cb, lookup->closure); -} - -static void -cancelit (ECardMergingLookup *lookup) -{ - if (lookup->op == E_CARD_MERGING_ADD) { - if (lookup->id_cb) - lookup->id_cb (lookup->book, E_BOOK_STATUS_CANCELLED, NULL, lookup->closure); - } else if (lookup->op == E_CARD_MERGING_COMMIT) { - if (lookup->cb) - lookup->cb (lookup->book, E_BOOK_STATUS_CANCELLED, lookup->closure); - } -} - -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; - } - g_free (lookup); -} - -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); - g_free (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); - g_free (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 = book; - lookup->card = 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 = book; - lookup->card = 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 <clahey@ximian.com> - * - * Copyright 2001, Ximian, Inc. - */ - -#ifndef __E_CARD_MERGING_H__ -#define __E_CARD_MERGING_H__ - -#include <addressbook/backend/ebook/e-book.h> - -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__ */ |