aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/contact-editor/e-contact-editor.h
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-06-09 01:12:12 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-06-09 01:12:12 +0800
commit227fab86efce103776af0364cbfd3f1959f9d269 (patch)
tree195524b2ea72d5b012ca9345a3f164000b09b61c /addressbook/contact-editor/e-contact-editor.h
parent1396db5dc3fd395059d4bbe6cd0d8422110d0b81 (diff)
downloadgsoc2013-evolution-227fab86efce103776af0364cbfd3f1959f9d269.tar
gsoc2013-evolution-227fab86efce103776af0364cbfd3f1959f9d269.tar.gz
gsoc2013-evolution-227fab86efce103776af0364cbfd3f1959f9d269.tar.bz2
gsoc2013-evolution-227fab86efce103776af0364cbfd3f1959f9d269.tar.lz
gsoc2013-evolution-227fab86efce103776af0364cbfd3f1959f9d269.tar.xz
gsoc2013-evolution-227fab86efce103776af0364cbfd3f1959f9d269.tar.zst
gsoc2013-evolution-227fab86efce103776af0364cbfd3f1959f9d269.zip
Now this derives from GtkObject. It follows the same strategy as the
2000-06-08 Federico Mena Quintero <federico@helixcode.com> * contact-editor/e-contact-editor.h (EContactEditor): Now this derives from GtkObject. It follows the same strategy as the EventEditor in the calendar. (EContactEditor): Added an is_new_card field so that we can know whether to add() or commit() the card. * contact-editor/e-contact-editor.c (e_contact_editor_get_type): Derive from GtkObject. (e_contact_editor_class_init): Likewise. (e_contact_editor_class_init): Added an "is_new_card" argument. (e_contact_editor_set_arg): Handle ARG_IS_NEW_CARD. (e_contact_editor_get_arg): Likewise. (e_contact_editor_new): Take in an is_new_arg argument and set it on the object. (e_contact_editor_init): Load the app widget into the app field of the EContactEditor structure. Create its UIHandler as well. (e_contact_editor_class_init): New "add_card", "commit_card", and "editor_closed" signals. * contact-editor/test-editor.c (main): Modified for the new API. (editor_closed_cb): Tweaked for the new API. Since this test program does not use Bonobo, it doesn't work, though. * gui/component/addressbook.c (new_contact_cb): Use the new contact editor API. (table_double_click): Ditto. * gui/minicard/e-minicard-view.c (e_minicard_view_event): Use the new contact editor API. * gui/minicard/e-minicard.c (e_minicard_event): Use the new contact editor API. svn path=/trunk/; revision=3479
Diffstat (limited to 'addressbook/contact-editor/e-contact-editor.h')
-rw-r--r--addressbook/contact-editor/e-contact-editor.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/addressbook/contact-editor/e-contact-editor.h b/addressbook/contact-editor/e-contact-editor.h
index 288cec1db0..8eae2bf1b5 100644
--- a/addressbook/contact-editor/e-contact-editor.h
+++ b/addressbook/contact-editor/e-contact-editor.h
@@ -23,6 +23,7 @@
#include <gnome.h>
#include <glade/glade.h>
+#include <bonobo.h>
#include <ebook/e-card.h>
#include <ebook/e-card-simple.h>
@@ -52,13 +53,17 @@ typedef struct _EContactEditorClass EContactEditorClass;
struct _EContactEditor
{
- GtkVBox parent;
+ GtkObject object;
/* item specific fields */
ECard *card;
ECardSimple *simple;
+
+ /* UI handler */
+ BonoboUIHandler *uih;
GladeXML *gui;
+ GtkWidget *app;
GnomeUIInfo *email_info;
GnomeUIInfo *phone_info;
GnomeUIInfo *address_info;
@@ -77,15 +82,24 @@ struct _EContactEditor
ECardSimpleAddressId address_choice;
GList *arbitrary_fields;
+
+ /* Whether we are editing a new card or an existing one */
+ guint is_new_card : 1;
};
struct _EContactEditorClass
{
- GtkVBoxClass parent_class;
+ GtkObjectClass parent_class;
+
+ /* Notification signals */
+
+ void (* add_card) (EContactEditor *ce, ECard *card);
+ void (* commit_card) (EContactEditor *ce, ECard *card);
+ void (* editor_closed) (EContactEditor *ce);
};
-GtkWidget *e_contact_editor_new(ECard *card);
+EContactEditor *e_contact_editor_new (ECard *card, gboolean is_new_card);
GtkType e_contact_editor_get_type (void);
#ifdef __cplusplus