aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-04-09 06:10:47 +0800
committerChris Lahey <clahey@src.gnome.org>2000-04-09 06:10:47 +0800
commit58e7df4e0376d1248ced78659d27d61adc1434b9 (patch)
treeedda4073e9e79d89b8bb9a34498049259998718d /addressbook/backend/ebook
parent6beb74f53508f0f92ad5ed0fe7e823b6a5be76f3 (diff)
downloadgsoc2013-evolution-58e7df4e0376d1248ced78659d27d61adc1434b9.tar
gsoc2013-evolution-58e7df4e0376d1248ced78659d27d61adc1434b9.tar.gz
gsoc2013-evolution-58e7df4e0376d1248ced78659d27d61adc1434b9.tar.bz2
gsoc2013-evolution-58e7df4e0376d1248ced78659d27d61adc1434b9.tar.lz
gsoc2013-evolution-58e7df4e0376d1248ced78659d27d61adc1434b9.tar.xz
gsoc2013-evolution-58e7df4e0376d1248ced78659d27d61adc1434b9.tar.zst
gsoc2013-evolution-58e7df4e0376d1248ced78659d27d61adc1434b9.zip
pixmap_DATA isn't defined so don't use it as a variable.
2000-04-08 Christopher James Lahey <clahey@helixcode.com> * art/Makefile.am: pixmap_DATA isn't defined so don't use it as a variable. * addressbook/gui/component/, addressbook/gui/component/.cvsignore, addressbook/gui/Makefile.am, addressbook/gui/component/addressbook-factory.c, addressbook/gui/component/addressbook.c, addressbook/gui/component/addressbook.gnorba, addressbook/gui/component/addressbook.h: New directory to proivde the component for contact management. Simply uses an e-minicard-view. * addressbook/gui/minicard/e-minicard-view.c, addressbook/gui/minicard/e-minicard-view.h: New subclass of e-reflow-sorted that takes an EBook and uses it to compute the card data to display. * addressbook/gui/minicard/e-minicard.c, addressbook/gui/minicard/e-minicard.h: This now backends to a ECard instead of a ETableModel. * addressbook/gui/minicard/e-reflow.c, addressbook/gui/minicard/e-reflow.h: This now has a virtualized add method. * addressbook/gui/minicard/e-reflow-sorted.c, addressbook/gui/minicard/e-reflow-sorted.h: New subclass of e-reflow that allows the data to be sorted on the fly. * addressbook/gui/minicard/test-minicard-view.c: New test to test the new minicard view. * addressbook/gui/minicard/test-reflow.c: Uses the new ECard backend of the e-minicard. * addressbook/gui/minicard/.cvsignore, addressbook/gui/minicard/Makefile.am: Added new test. Fixed dependencies. Added new files. * addressbook/gui/, addressbook/gui/Makefile.am, addressbook/gui/.cvsignore: New directory for addressbook gui bits. Added subdirectories. Created an initial .cvsignore. * addressbook/Makefile.am (SUBDIRS): Removed demo and added gui. * addressbook/backend/pas/pas-backend-file.c: Added code to do notification on bookviews when changes in the backend are made. * addressbook/backend/pas/pas-book-view.c, addressbook/backend/pas/pas-book-view.h: Added helper functions to notify the view about the addition or modification of a single card. Fixed a mistaken extra free. * addressbook/backend/ebook/e-card-list-iterator.h: Fixed incorrect parent class. * addressbook/backend/ebook/test-client.c: Made this accept an optional parameter that specifies the vcard to add. * configure.in: Replaced widgets/e-minicard/Makefile and addressbook/demo/Makefile with addressbook/gui/minicard/Makefile and addressbook/gui/component/Makefile respectively. * widgets/Makefile.am: Removed e-minicard since it's being moved to addressbook/gui/minicard. * widgets/e-text/e-text.c: Fixed the border width around tooltips and made the main tooltip area yellow. From camel/ChangeLog: 2000-04-08 Christopher James Lahey <clahey@helixcode.com> * providers/smtp/.cvsignore: Added a .cvsignore file. From calendar/ChangeLog: 2000-04-08 Christopher James Lahey <clahey@helixcode.com> * gui/Makefile.am: Removed linking with libetable and libeminicard since they weren't being used. svn path=/trunk/; revision=2343
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r--addressbook/backend/ebook/e-card-list-iterator.h4
-rw-r--r--addressbook/backend/ebook/test-client.c38
2 files changed, 37 insertions, 5 deletions
diff --git a/addressbook/backend/ebook/e-card-list-iterator.h b/addressbook/backend/ebook/e-card-list-iterator.h
index cdc7a312b1..67d56cfb9c 100644
--- a/addressbook/backend/ebook/e-card-list-iterator.h
+++ b/addressbook/backend/ebook/e-card-list-iterator.h
@@ -26,14 +26,14 @@ typedef struct _ECardListIterator ECardListIterator;
typedef struct _ECardListIteratorClass ECardListIteratorClass;
struct _ECardListIterator {
- GtkObject object;
+ ECardIterator parent;
ECardList *list;
GList *iterator;
};
struct _ECardListIteratorClass {
- GtkObjectClass parent_class;
+ ECardIteratorClass parent_class;
};
ECardIterator *e_card_list_iterator_new (ECardList *list);
diff --git a/addressbook/backend/ebook/test-client.c b/addressbook/backend/ebook/test-client.c
index f535d2db1a..15c5410146 100644
--- a/addressbook/backend/ebook/test-client.c
+++ b/addressbook/backend/ebook/test-client.c
@@ -30,8 +30,9 @@
"
"
-CORBA_Environment ev;
-CORBA_ORB orb;
+static CORBA_Environment ev;
+static CORBA_ORB orb;
+static char *cardstr;
static void
init_bonobo (int argc, char **argv)
@@ -99,7 +100,7 @@ add_card_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure)
static void
book_open_cb (EBook *book, EBookStatus status, gpointer closure)
{
- e_book_add_vcard(book, TEST_VCARD, add_card_cb, NULL);
+ e_book_add_vcard(book, cardstr, add_card_cb, NULL);
}
static guint
@@ -125,6 +126,30 @@ ebook_create (void)
return FALSE;
}
+static char *
+read_file (char *name)
+{
+ int len;
+ char buff[65536];
+ char line[1024];
+ FILE *f;
+
+ f = fopen (name, "r");
+ if (f == NULL)
+ g_error ("Unable to open %s!\n", name);
+
+ len = 0;
+ while (fgets (line, sizeof (line), f) != NULL) {
+ strcpy (buff + len, line);
+ len += strlen (line);
+ }
+
+ fclose (f);
+
+ return g_strdup (buff);
+}
+
+
int
main (int argc, char **argv)
{
@@ -132,6 +157,13 @@ main (int argc, char **argv)
CORBA_exception_init (&ev);
init_bonobo (argc, argv);
+ cardstr = NULL;
+ if (argc == 2)
+ cardstr = read_file (argv [1]);
+
+ if (cardstr == NULL)
+ cardstr = TEST_VCARD;
+
gtk_idle_add ((GtkFunction) ebook_create, NULL);
bonobo_main ();