aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/select-names
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component/select-names')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c190
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c589
-rw-r--r--addressbook/gui/component/select-names/e-select-names.h50
-rw-r--r--addressbook/gui/component/select-names/e-simple-card-bonobo.c117
-rw-r--r--addressbook/gui/component/select-names/select-names.glade889
5 files changed, 1030 insertions, 805 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.c b/addressbook/gui/component/select-names/e-select-names-bonobo.c
index 0f18614c1a..411aedf761 100644
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c
@@ -27,18 +27,13 @@
#include "e-select-names-bonobo.h"
#include "e-simple-card-bonobo.h"
-#include <bonobo-activation/bonobo-activation-activate.h>
-
#include <bonobo/bonobo-property-bag.h>
#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-event-source.h>
#include <gal/util/e-util.h>
#include <gal/e-text/e-entry.h>
-#include "evolution-shell-client.h"
-
#include "Evolution-Addressbook-SelectNames.h"
#include "e-select-names-manager.h"
@@ -48,7 +43,7 @@
-#define PARENT_TYPE BONOBO_TYPE_OBJECT
+#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
struct _ESelectNamesBonoboPrivate {
@@ -84,7 +79,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_TEXT:
{
ETextModel *text_model;
- text_model = E_TEXT_MODEL (g_object_get_data (G_OBJECT (w), "select_names_text_model"));
+ text_model = E_TEXT_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_text_model"));
g_assert (text_model != NULL);
BONOBO_ARG_SET_STRING (arg, e_text_model_get_text (text_model));
@@ -96,7 +91,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
ESelectNamesModel *model;
char *text;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
text = e_select_names_model_get_address_text (model, ", ");
@@ -110,7 +105,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
ESelectNamesModel *model;
char *text;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
text = e_select_names_model_export_destinationv (model);
@@ -126,7 +121,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
int i;
GNOME_Evolution_Addressbook_SimpleCardList *card_list;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
count = e_select_names_model_count (model);
@@ -141,7 +136,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
const ECard *card = e_destination_get_card (destination);
ECardSimple *simple = e_card_simple_new ((ECard *) card);
ESimpleCardBonobo *simple_card = e_simple_card_bonobo_new (simple);
- g_object_unref (simple);
+ gtk_object_unref (GTK_OBJECT (simple));
card_list->_buffer[i] = bonobo_object_corba_objref (BONOBO_OBJECT (simple_card));
}
@@ -154,7 +149,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS:
{
ESelectNamesCompletion *comp;
- comp = E_SELECT_NAMES_COMPLETION (g_object_get_data (G_OBJECT (w), "completion_handler"));
+ comp = E_SELECT_NAMES_COMPLETION (gtk_object_get_data (GTK_OBJECT (w), "completion_handler"));
g_assert (comp != NULL);
BONOBO_ARG_SET_BOOLEAN (arg, e_select_names_completion_get_match_contact_lists (comp));
@@ -188,7 +183,7 @@ entry_set_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_ADDRESSES:
{
ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
e_entry_set_text (E_ENTRY (w), BONOBO_ARG_GET_STRING (arg));
@@ -199,7 +194,7 @@ entry_set_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_DESTINATIONS:
{
ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
e_select_names_model_import_destinationv (model, BONOBO_ARG_GET_STRING (arg));
@@ -210,7 +205,7 @@ entry_set_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS:
{
ESelectNamesCompletion *comp;
- comp = E_SELECT_NAMES_COMPLETION (g_object_get_data (G_OBJECT (w), "completion_handler"));
+ comp = E_SELECT_NAMES_COMPLETION (gtk_object_get_data (GTK_OBJECT (w), "completion_handler"));
g_assert (comp != NULL);
e_select_names_completion_set_match_contact_lists (comp, BONOBO_ARG_GET_BOOLEAN (arg));
@@ -218,7 +213,7 @@ entry_set_property_fn (BonoboPropertyBag *bag,
}
case ENTRY_PROPERTY_ID_ENTRY_CHANGED:
- g_object_set_data (G_OBJECT (w), "entry_property_id_changed", GUINT_TO_POINTER (1));
+ gtk_object_set_data (GTK_OBJECT (w), "entry_property_id_changed", GUINT_TO_POINTER (1));
break;
default:
@@ -226,16 +221,46 @@ entry_set_property_fn (BonoboPropertyBag *bag,
}
}
+
+/* CORBA interface implementation. */
+
+static POA_GNOME_Evolution_Addressbook_SelectNames__vepv SelectNames_vepv;
+
+static POA_GNOME_Evolution_Addressbook_SelectNames *
+create_servant (void)
+{
+ POA_GNOME_Evolution_Addressbook_SelectNames *servant;
+ CORBA_Environment ev;
+
+ servant = (POA_GNOME_Evolution_Addressbook_SelectNames *) g_new0 (BonoboObjectServant, 1);
+ servant->vepv = &SelectNames_vepv;
+
+ CORBA_exception_init (&ev);
+
+ POA_GNOME_Evolution_Addressbook_SelectNames__init ((PortableServer_Servant) servant, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_free (servant);
+ CORBA_exception_free (&ev);
+ return NULL;
+ }
+
+ CORBA_exception_free (&ev);
+
+ return servant;
+}
+
static void
impl_SelectNames_add_section (PortableServer_Servant servant,
const CORBA_char *id,
const CORBA_char *title,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
priv = select_names->priv;
e_select_names_manager_add_section (priv->manager, id, title);
@@ -248,10 +273,12 @@ impl_SelectNames_add_section_with_limit (PortableServer_Servant servant,
CORBA_short limit,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
priv = select_names->priv;
e_select_names_manager_add_section_with_limit (priv->manager, id, title, limit);
@@ -260,10 +287,10 @@ impl_SelectNames_add_section_with_limit (PortableServer_Servant servant,
static void
entry_changed (GtkWidget *widget, BonoboControl *control)
{
- gboolean changed = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (widget), "entry_property_id_changed"));
+ gboolean changed = GPOINTER_TO_UINT (gtk_object_get_data (GTK_OBJECT (widget), "entry_property_id_changed"));
if (!changed)
- bonobo_control_set_property (control, NULL, "entry_changed", TC_CORBA_boolean, TRUE, NULL);
+ bonobo_control_set_property (control, "entry_changed", TRUE, NULL);
}
static void
@@ -307,13 +334,15 @@ impl_SelectNames_get_entry_for_section (PortableServer_Servant servant,
const CORBA_char *section_id,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
GtkWidget *entry_widget;
BonoboControl *control;
BonoboPropertyBag *property_bag;
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
priv = select_names->priv;
entry_widget = e_select_names_manager_create_entry (priv->manager, section_id);
@@ -349,10 +378,9 @@ impl_SelectNames_get_entry_for_section (PortableServer_Servant servant,
BONOBO_ARG_BOOLEAN, NULL, NULL,
BONOBO_PROPERTY_WRITEABLE);
- bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (property_bag)), NULL);
- bonobo_object_unref (BONOBO_OBJECT (property_bag));
+ bonobo_control_set_properties (control, property_bag);
- g_signal_connect (entry_widget, "changed", G_CALLBACK (entry_changed), control);
+ gtk_signal_connect (GTK_OBJECT (entry_widget), "changed", GTK_SIGNAL_FUNC (entry_changed), control);
return CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (control)), ev);
}
@@ -362,32 +390,22 @@ impl_SelectNames_activate_dialog (PortableServer_Servant servant,
const CORBA_char *section_id,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
- EvolutionShellClient *shell_client;
- GNOME_Evolution_Shell shell;
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
priv = select_names->priv;
- shell = bonobo_activation_activate_from_id (
- "OAFIID:GNOME_Evolution_Shell",
- Bonobo_ACTIVATION_FLAG_EXISTING_ONLY,
- NULL, ev);
- if (BONOBO_EX (ev))
- return;
-
- shell_client = evolution_shell_client_new (shell);
- e_select_names_manager_activate_dialog (priv->manager, shell_client,
- section_id);
- g_object_unref (shell_client);
+ e_select_names_manager_activate_dialog (priv->manager, section_id);
}
/* GtkObject methods. */
static void
-impl_dispose (GObject *object)
+impl_destroy (GtkObject *object)
{
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
@@ -395,43 +413,55 @@ impl_dispose (GObject *object)
select_names = E_SELECT_NAMES_BONOBO (object);
priv = select_names->priv;
- if (priv) {
- if (priv->manager->names) {
- gtk_widget_destroy (GTK_WIDGET (priv->manager->names));
- priv->manager->names = NULL;
- }
-
- g_object_unref (priv->manager);
-
- g_free (priv);
- select_names->priv = NULL;
+ if (priv->manager->names) {
+ gtk_widget_destroy (GTK_WIDGET (priv->manager->names));
+ priv->manager->names = NULL;
}
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ gtk_object_unref (GTK_OBJECT (priv->manager));
+
+ g_free (priv);
}
static void
-e_select_names_bonobo_class_init (ESelectNamesBonoboClass *klass)
+corba_class_init ()
{
- GObjectClass *object_class;
+ POA_GNOME_Evolution_Addressbook_SelectNames__vepv *vepv;
POA_GNOME_Evolution_Addressbook_SelectNames__epv *epv;
+ PortableServer_ServantBase__epv *base_epv;
- object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
+ base_epv = g_new0 (PortableServer_ServantBase__epv, 1);
+ base_epv->_private = NULL;
+ base_epv->finalize = NULL;
+ base_epv->default_POA = NULL;
- object_class->dispose = impl_dispose;
-
- epv = &klass->epv;
+ epv = g_new0 (POA_GNOME_Evolution_Addressbook_SelectNames__epv, 1);
epv->addSection = impl_SelectNames_add_section;
epv->addSectionWithLimit = impl_SelectNames_add_section_with_limit;
epv->getEntryBySection = impl_SelectNames_get_entry_for_section;
epv->activateDialog = impl_SelectNames_activate_dialog;
+
+ vepv = &SelectNames_vepv;
+ vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
+ vepv->GNOME_Evolution_Addressbook_SelectNames_epv = epv;
+}
+
+static void
+class_init (ESelectNamesBonoboClass *klass)
+{
+ GtkObjectClass *object_class;
+
+ object_class = GTK_OBJECT_CLASS (klass);
+ parent_class = gtk_type_class (bonobo_object_get_type ());
+
+ object_class->destroy = impl_destroy;
+
+ corba_class_init ();
}
static void
-e_select_names_bonobo_init (ESelectNamesBonobo *select_names)
+init (ESelectNamesBonobo *select_names)
{
ESelectNamesBonoboPrivate *priv;
@@ -440,26 +470,29 @@ e_select_names_bonobo_init (ESelectNamesBonobo *select_names)
priv->manager = e_select_names_manager_new ();
priv->event_source = NULL;
- g_signal_connect (priv->manager,
- "changed",
- G_CALLBACK (manager_changed_cb),
- select_names);
+ gtk_signal_connect (GTK_OBJECT (priv->manager),
+ "changed",
+ GTK_SIGNAL_FUNC (manager_changed_cb),
+ select_names);
+
+ gtk_signal_connect (GTK_OBJECT (priv->manager),
+ "ok",
+ GTK_SIGNAL_FUNC (manager_ok_cb),
+ select_names);
- g_signal_connect (priv->manager,
- "ok",
- G_CALLBACK (manager_ok_cb),
- select_names);
-
select_names->priv = priv;
}
-static void
-e_select_names_bonobo_construct (ESelectNamesBonobo *select_names)
+void
+e_select_names_bonobo_construct (ESelectNamesBonobo *select_names,
+ GNOME_Evolution_Addressbook_SelectNames corba_object)
{
g_return_if_fail (select_names != NULL);
g_return_if_fail (E_IS_SELECT_NAMES_BONOBO (select_names));
+ bonobo_object_construct (BONOBO_OBJECT (select_names), corba_object);
+
g_assert (select_names->priv->event_source == NULL);
select_names->priv->event_source = bonobo_event_source_new ();
bonobo_object_add_interface (BONOBO_OBJECT (select_names), BONOBO_OBJECT (select_names->priv->event_source));
@@ -468,18 +501,21 @@ e_select_names_bonobo_construct (ESelectNamesBonobo *select_names)
ESelectNamesBonobo *
e_select_names_bonobo_new (void)
{
+ POA_GNOME_Evolution_Addressbook_SelectNames *servant;
+ GNOME_Evolution_Addressbook_SelectNames corba_object;
ESelectNamesBonobo *select_names;
- select_names = g_object_new (E_TYPE_SELECT_NAMES_BONOBO, NULL);
+ servant = create_servant ();
+ if (servant == NULL)
+ return NULL;
+
+ select_names = gtk_type_new (e_select_names_bonobo_get_type ());
- e_select_names_bonobo_construct (select_names);
+ corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (select_names), servant);
+ e_select_names_bonobo_construct (select_names, corba_object);
return select_names;
}
-BONOBO_TYPE_FUNC_FULL (
- ESelectNamesBonobo,
- GNOME_Evolution_Addressbook_SelectNames,
- PARENT_TYPE,
- e_select_names_bonobo);
+E_MAKE_TYPE (e_select_names_bonobo, "ESelectNamesBonobo", ESelectNamesBonobo, class_init, init, PARENT_TYPE)
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
index a189077c92..7ebd100d67 100644
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ b/addressbook/gui/component/select-names/e-select-names.c
@@ -19,10 +19,12 @@
*/
#include <config.h>
-#include <string.h>
#include <glib.h>
-#include <gtk/gtk.h>
+#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
+#include <libgnomeui/gnome-stock.h>
+#include <libgnomeui/gnome-dialog.h>
+#include <libgnomeui/gnome-dialog-util.h>
#include <gal/e-table/e-table-simple.h>
#include <gal/e-table/e-table-without.h>
@@ -42,21 +44,23 @@
#include "e-select-names.h"
#include <addressbook/backend/ebook/e-card-simple.h>
-#include "e-select-names-table-model.h"
+#include "e-select-names-text-model.h"
#include <gal/widgets/e-categories-master-list-option-menu.h>
+#include <gal/widgets/e-unicode.h>
#include <gal/e-text/e-entry.h>
#include <e-util/e-categories-master-list-wombat.h>
-#include "e-util/e-sexp.h"
-static void e_select_names_init (ESelectNames *names);
+static void e_select_names_init (ESelectNames *card);
static void e_select_names_class_init (ESelectNamesClass *klass);
-static void e_select_names_dispose (GObject *object);
+static void e_select_names_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
+static void e_select_names_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
+static void e_select_names_destroy (GtkObject *object);
static void update_query (GtkWidget *widget, ESelectNames *e_select_names);
-static void sync_table_and_models (ESelectNamesModel *triggering_model, ESelectNames *esl);
+extern EvolutionShellClient *global_shell_client;
-static GtkDialogClass *parent_class = NULL;
-#define PARENT_TYPE gtk_dialog_get_type()
+static GnomeDialogClass *parent_class = NULL;
+#define PARENT_TYPE gnome_dialog_get_type()
/* The arguments we take */
enum {
@@ -64,35 +68,33 @@ enum {
};
typedef struct {
- char *title;
- ESelectNamesModel *source;
- ESelectNamesTableModel *table_model;
- ESelectNames *names;
- GtkWidget *label;
- GtkWidget *button;
- GtkWidget *recipient_table;
- gulong changed_id;
+ char *title;
+ ESelectNamesModel *source;
+ ESelectNamesTextModel *text_model;
+ ESelectNames *names;
+ GtkWidget *label;
+ GtkWidget *button;
} ESelectNamesChild;
-GType
+GtkType
e_select_names_get_type (void)
{
- static GType type = 0;
+ static GtkType type = 0;
if (!type) {
- static const GTypeInfo info = {
- sizeof (ESelectNamesClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_select_names_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ static const GtkTypeInfo info =
+ {
+ "ESelectNames",
sizeof (ESelectNames),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_select_names_init,
+ sizeof (ESelectNamesClass),
+ (GtkClassInitFunc) e_select_names_class_init,
+ (GtkObjectInitFunc) e_select_names_init,
+ /* reserved_1 */ NULL,
+ /* reserved_2 */ NULL,
+ (GtkClassInitFunc) NULL,
};
- type = g_type_register_static (PARENT_TYPE, "ESelectNames", &info, 0);
+ type = gtk_type_unique (PARENT_TYPE, &info);
}
return type;
@@ -101,34 +103,30 @@ e_select_names_get_type (void)
static void
e_select_names_class_init (ESelectNamesClass *klass)
{
- GObjectClass *object_class;
+ GtkObjectClass *object_class;
- object_class = G_OBJECT_CLASS (klass);
+ object_class = (GtkObjectClass*) klass;
- parent_class = g_type_class_peek_parent (klass);
+ parent_class = gtk_type_class (PARENT_TYPE);
- object_class->dispose = e_select_names_dispose;
+ object_class->set_arg = e_select_names_set_arg;
+ object_class->get_arg = e_select_names_get_arg;
+ object_class->destroy = e_select_names_destroy;
}
GtkWidget *e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int num1, int num2);
GtkWidget *e_addressbook_create_folder_selector(char *name, char *string1, char *string2, int num1, int num2);
static void
-search_result (EAddressbookModel *model, EBookViewStatus status, ESelectNames *esn)
-{
- sync_table_and_models (NULL, esn);
-}
-
-static void
set_book(EBook *book, EBookStatus status, ESelectNames *esn)
{
- g_object_set(esn->model,
- "book", book,
- NULL);
+ gtk_object_set(GTK_OBJECT(esn->model),
+ "book", book,
+ NULL);
update_query (NULL, esn);
- g_object_unref(book);
- g_object_unref(esn->model);
- g_object_unref(esn);
+ gtk_object_unref(GTK_OBJECT(book));
+ gtk_object_unref(GTK_OBJECT(esn->model));
+ gtk_object_unref(GTK_OBJECT(esn));
}
static void
@@ -151,8 +149,8 @@ addressbook_model_set_uri(ESelectNames *e_select_names, EAddressbookModel *model
book = e_book_new();
- g_object_ref(e_select_names);
- g_object_ref(model);
+ gtk_object_ref(GTK_OBJECT(e_select_names));
+ gtk_object_ref(GTK_OBJECT(model));
addressbook_load_uri(book, book_uri, (EBookCallback) set_book, e_select_names);
g_free (book_uri);
@@ -221,7 +219,7 @@ real_add_address_cb (int model_row, gpointer closure)
e_select_names_model_append (child->source, dest);
e_select_names_model_clean (child->source, FALSE);
- g_object_unref(card);
+ gtk_object_unref(GTK_OBJECT(card));
}
}
@@ -270,7 +268,7 @@ esn_get_key_fn (ETableModel *source, int row, void *closure)
EAddressbookModel *model = E_ADDRESSBOOK_MODEL (closure);
ECard *card = e_addressbook_model_get_card (model, row);
void *key = card_key (card);
- g_object_unref (card);
+ gtk_object_unref (GTK_OBJECT (card));
return key;
}
@@ -300,13 +298,14 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n
ETableModel *without;
EAddressbookModel *model;
GtkWidget *table;
+ char *spec;
model = e_addressbook_model_new ();
adapter = E_TABLE_MODEL (e_addressbook_table_adapter_new (model));
- g_object_set(model,
- "editable", FALSE,
- NULL);
+ gtk_object_set(GTK_OBJECT(model),
+ "editable", FALSE,
+ NULL);
without = e_table_without_new (adapter,
g_str_hash,
@@ -322,9 +321,9 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n
EVOLUTION_ETSPECDIR "/e-select-names.etspec",
NULL);
- g_object_set_data(G_OBJECT(table), "adapter", adapter);
- g_object_set_data(G_OBJECT(table), "without", without);
- g_object_set_data(G_OBJECT(table), "model", model);
+ gtk_object_set_data(GTK_OBJECT(table), "adapter", adapter);
+ gtk_object_set_data(GTK_OBJECT(table), "without", without);
+ gtk_object_set_data(GTK_OBJECT(table), "model", model);
return table;
}
@@ -332,48 +331,45 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n
GtkWidget *
e_addressbook_create_folder_selector(char *name, char *string1, char *string2, int num1, int num2)
{
- return g_object_new (EVOLUTION_TYPE_FOLDER_SELECTOR_BUTTON, NULL);
+ return (GtkWidget *)gtk_type_new (EVOLUTION_TYPE_FOLDER_SELECTOR_BUTTON);
}
static void
folder_selected (EvolutionFolderSelectorButton *button, GNOME_Evolution_Folder *folder,
ESelectNames *e_select_names)
{
+ Bonobo_ConfigDatabase db;
+
addressbook_model_set_uri(e_select_names, e_select_names->model, folder->physicalUri);
- e_config_listener_set_string (e_book_get_config_database(),
- "/apps/evolution/addressbook/select_names/last_used_uri", folder->physicalUri);
+ db = addressbook_config_database (NULL);
+ bonobo_config_set_string (db, "/Addressbook/select_names_uri", folder->physicalUri, NULL);
}
static void
update_query (GtkWidget *widget, ESelectNames *e_select_names)
{
char *category = "";
- const char *search = "";
+ char *search = "";
char *query;
char *q_array[4];
int i;
- GString *s = g_string_new ("");
-
if (e_select_names->categories) {
category = e_categories_master_list_option_menu_get_category (E_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories));
}
if (e_select_names->select_entry) {
search = gtk_entry_get_text (GTK_ENTRY (e_select_names->select_entry));
}
-
- e_sexp_encode_string (s, search);
-
i = 0;
q_array[i++] = "(contains \"email\" \"\")";
if (category && *category)
q_array[i++] = g_strdup_printf ("(is \"category\" \"%s\")", category);
if (search && *search)
- q_array[i++] = g_strdup_printf ("(or (beginswith \"email\" %s) "
- " (beginswith \"full_name\" %s) "
- " (beginswith \"nickname\" %s)"
- " (beginswith \"file_as\" %s))",
- s->str, s->str, s->str, s->str);
+ q_array[i++] = g_strdup_printf ("(or (beginswith \"email\" \"%s\") "
+ " (beginswith \"full_name\" \"%s\") "
+ " (beginswith \"nickname\" \"%s\")"
+ " (beginswith \"file_as\" \"%s\"))",
+ search, search, search, search);
q_array[i++] = NULL;
if (i > 2) {
char *temp = g_strjoinv (" ", q_array);
@@ -382,27 +378,32 @@ update_query (GtkWidget *widget, ESelectNames *e_select_names)
} else {
query = g_strdup (q_array[0]);
}
- g_object_set (e_select_names->model,
- "query", query,
- NULL);
+ gtk_object_set (GTK_OBJECT (e_select_names->model),
+ "query", query,
+ NULL);
for (i = 1; q_array[i]; i++) {
g_free (q_array[i]);
}
g_free (query);
- g_string_free (s, TRUE);
}
static void
status_message (EAddressbookModel *model, const gchar *message, ESelectNames *e_select_names)
{
- if (message == NULL)
+ if (message == NULL) {
+ if (e_select_names->status_image)
+ gtk_widget_hide (e_select_names->status_image);
gtk_label_set_text (GTK_LABEL (e_select_names->status_message), "");
- else
+ }
+ else {
+ if (e_select_names->status_image)
+ gtk_widget_show (e_select_names->status_image);
gtk_label_set_text (GTK_LABEL (e_select_names->status_message), message);
+ }
}
static void
-categories_changed (GtkWidget *widget, ESelectNames *e_select_names)
+categories_changed (GtkWidget *widget, gint value, ESelectNames *e_select_names)
{
update_query (widget, e_select_names);
}
@@ -411,7 +412,7 @@ static void
select_entry_changed (GtkWidget *widget, ESelectNames *e_select_names)
{
if (e_select_names->select_entry) {
- const char *select_string = gtk_entry_get_text (GTK_ENTRY (e_select_names->select_entry));
+ char *select_string = gtk_entry_get_text (GTK_ENTRY (e_select_names->select_entry));
char *select_strcoll_string = g_utf8_collate_key (select_string, -1);
int count;
ETable *table;
@@ -428,7 +429,7 @@ select_entry_changed (GtkWidget *widget, ESelectNames *e_select_names)
E_CARD_SIMPLE_FIELD_NAME_OR_ORG,
model_row),
-1);
- if (g_utf8_collate (select_strcoll_string, row_strcoll_string) <= 0) {
+ if (strcmp (select_strcoll_string, row_strcoll_string) <= 0) {
g_free (row_strcoll_string);
break;
}
@@ -459,15 +460,15 @@ e_select_names_create_categories (gchar *name,
ecml = e_categories_master_list_wombat_new ();
option_menu = e_categories_master_list_option_menu_new (ecml);
- g_object_unref (ecml);
+ gtk_object_unref (GTK_OBJECT (ecml));
return option_menu;
}
static void
-clear_widget (gpointer data, GObject *where_object_was)
+clear_widget (GtkWidget *w, gpointer user_data)
{
- GtkWidget **widget_ref = data;
+ GtkWidget **widget_ref = user_data;
*widget_ref = NULL;
}
@@ -476,8 +477,14 @@ e_select_names_init (ESelectNames *e_select_names)
{
GladeXML *gui;
GtkWidget *widget, *button;
+ const char *selector_types[] = { "contacts/*", NULL };
+ char *filename;
+ char *contacts_uri;
+ Bonobo_ConfigDatabase db;
+
+ db = addressbook_config_database (NULL);
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/select-names.glade", NULL, NULL);
+ gui = glade_xml_new (EVOLUTION_GLADEDIR "/select-names.glade", NULL);
e_select_names->gui = gui;
e_select_names->children = g_hash_table_new(g_str_hash, g_str_equal);
@@ -489,172 +496,156 @@ e_select_names_init (ESelectNames *e_select_names)
return;
}
gtk_widget_ref(widget);
- gtk_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start(GTK_BOX(GTK_DIALOG(e_select_names)->vbox), widget, TRUE, TRUE, 0);
+ gtk_widget_unparent(widget);
+ gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(e_select_names)->vbox), widget, TRUE, TRUE, 0);
gtk_widget_unref(widget);
- gtk_dialog_add_buttons (GTK_DIALOG (e_select_names),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_dialog_set_default_response (GTK_DIALOG (e_select_names),
- GTK_RESPONSE_OK);
-
- gtk_window_set_modal (GTK_WINDOW (e_select_names), TRUE);
+ gnome_dialog_append_buttons(GNOME_DIALOG(e_select_names),
+ GNOME_STOCK_BUTTON_OK,
+ GNOME_STOCK_BUTTON_CANCEL,
+ NULL);
+ gnome_dialog_set_default(GNOME_DIALOG(e_select_names), 0);
gtk_window_set_title(GTK_WINDOW(e_select_names), _("Select Contacts from Addressbook"));
- gtk_window_set_resizable(GTK_WINDOW(e_select_names), TRUE);
+ gtk_window_set_policy(GTK_WINDOW(e_select_names), FALSE, TRUE, FALSE);
e_select_names->table = E_TABLE_SCROLLED(glade_xml_get_widget(gui, "table-source"));
- e_select_names->model = g_object_get_data(G_OBJECT(e_select_names->table), "model");
- e_select_names->adapter = g_object_get_data(G_OBJECT(e_select_names->table), "adapter");
- e_select_names->without = g_object_get_data(G_OBJECT(e_select_names->table), "without");
- gtk_widget_show (GTK_WIDGET (e_select_names->table));
+ e_select_names->model = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "model");
+ e_select_names->adapter = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "adapter");
+ e_select_names->without = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "without");
e_select_names->status_message = glade_xml_get_widget (gui, "status-message");
if (e_select_names->status_message && !GTK_IS_LABEL (e_select_names->status_message))
e_select_names->status_message = NULL;
if (e_select_names->status_message) {
- e_select_names->status_id = g_signal_connect (e_select_names->model, "status_message",
- G_CALLBACK (status_message), e_select_names);
- g_object_weak_ref (G_OBJECT (e_select_names->status_message), clear_widget, &e_select_names->status_message);
+ gtk_signal_connect (GTK_OBJECT (e_select_names->model), "status_message",
+ GTK_SIGNAL_FUNC (status_message), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->status_message), "destroy",
+ GTK_SIGNAL_FUNC(clear_widget), &e_select_names->status_message);
}
-
- e_select_names->search_id = g_signal_connect (e_select_names->model,
- "search_result", G_CALLBACK (search_result),
- e_select_names);
+ e_select_names->status_image = glade_xml_get_widget (gui, "status-image");
+ gtk_widget_hide (e_select_names->status_image);
e_select_names->categories = glade_xml_get_widget (gui, "custom-categories");
if (e_select_names->categories && !E_IS_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories))
e_select_names->categories = NULL;
if (e_select_names->categories) {
- g_signal_connect(e_select_names->categories, "changed",
- G_CALLBACK(categories_changed), e_select_names);
- g_object_weak_ref (G_OBJECT (e_select_names->categories), clear_widget, &e_select_names->categories);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->categories), "changed",
+ GTK_SIGNAL_FUNC(categories_changed), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->categories), "destroy",
+ GTK_SIGNAL_FUNC(clear_widget), &e_select_names->categories);
}
- gtk_widget_show (e_select_names->categories);
e_select_names->select_entry = glade_xml_get_widget (gui, "entry-select");
if (e_select_names->select_entry && !GTK_IS_ENTRY (e_select_names->select_entry))
e_select_names->select_entry = NULL;
if (e_select_names->select_entry) {
- g_signal_connect(e_select_names->select_entry, "changed",
- G_CALLBACK(select_entry_changed), e_select_names);
- g_signal_connect(e_select_names->select_entry, "activate",
- G_CALLBACK(update_query), e_select_names);
- g_object_weak_ref (G_OBJECT (e_select_names->select_entry), clear_widget, &e_select_names->select_entry);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->select_entry), "changed",
+ GTK_SIGNAL_FUNC(select_entry_changed), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->select_entry), "activate",
+ GTK_SIGNAL_FUNC(update_query), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->select_entry), "destroy",
+ GTK_SIGNAL_FUNC(clear_widget), &e_select_names->select_entry);
}
button = glade_xml_get_widget (gui, "button-find");
if (button && GTK_IS_BUTTON (button))
- g_signal_connect(button, "clicked",
- G_CALLBACK(update_query), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+ GTK_SIGNAL_FUNC(update_query), e_select_names);
+
+ contacts_uri = bonobo_config_get_string_with_default (db, "/Addressbook/select_names_uri",
+ NULL, NULL);
+ if (!contacts_uri) {
+ contacts_uri = bonobo_config_get_string_with_default (db, "/DefaultFolders/contacts_uri",
+ NULL,
+ NULL);
+ }
+ if (!contacts_uri) {
+ filename = gnome_util_prepend_user_home("evolution/local/Contacts");
+ contacts_uri = g_strdup_printf("file://%s", filename);
+ g_free (filename);
+ }
button = glade_xml_get_widget (gui, "folder-selector");
+ evolution_folder_selector_button_construct (EVOLUTION_FOLDER_SELECTOR_BUTTON (button),
+ global_shell_client,
+ _("Find contact in"),
+ contacts_uri,
+ selector_types);
if (button && EVOLUTION_IS_FOLDER_SELECTOR_BUTTON (button))
- g_signal_connect(button, "selected",
- G_CALLBACK(folder_selected), e_select_names);
- gtk_widget_show (button);
-
- g_signal_connect (e_table_scrolled_get_table (e_select_names->table), "double_click",
- G_CALLBACK (add_address), e_select_names);
- g_signal_connect (e_table_scrolled_get_table (e_select_names->table), "selection_change",
- G_CALLBACK (selection_change), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(button), "selected",
+ GTK_SIGNAL_FUNC(folder_selected), e_select_names);
+
+ gtk_signal_connect (GTK_OBJECT (e_table_scrolled_get_table (e_select_names->table)), "double_click",
+ GTK_SIGNAL_FUNC (add_address), e_select_names);
+ gtk_signal_connect (GTK_OBJECT (e_table_scrolled_get_table (e_select_names->table)), "selection_change",
+ GTK_SIGNAL_FUNC (selection_change), e_select_names);
selection_change (e_table_scrolled_get_table (e_select_names->table), e_select_names);
+
+ addressbook_model_set_uri(e_select_names, e_select_names->model, contacts_uri);
+
+ g_free (contacts_uri);
}
static void e_select_names_child_free(char *key, ESelectNamesChild *child, ESelectNames *e_select_names)
{
- g_signal_handler_disconnect(child->source, child->changed_id);
-
+ gtk_signal_disconnect_by_func (GTK_OBJECT (child->source), GTK_SIGNAL_FUNC (sync_table_and_models), e_select_names);
g_free(child->title);
- g_object_unref(child->table_model);
- g_object_unref(child->source);
+ gtk_object_unref(GTK_OBJECT(child->text_model));
+ gtk_object_unref(GTK_OBJECT(child->source));
g_free(key);
g_free(child);
}
static void
-e_select_names_dispose (GObject *object)
+e_select_names_destroy (GtkObject *object)
{
ESelectNames *e_select_names = E_SELECT_NAMES(object);
- printf("eselectnames dispose\n");
-
- if (e_select_names->status_id) {
- g_signal_handler_disconnect(e_select_names->model, e_select_names->status_id);
- e_select_names->status_id = 0;
- }
+ gtk_object_unref(GTK_OBJECT(e_select_names->gui));
+ g_hash_table_foreach(e_select_names->children, (GHFunc) e_select_names_child_free, e_select_names);
+ g_hash_table_destroy(e_select_names->children);
+ gtk_object_unref(GTK_OBJECT(e_select_names->without));
+ gtk_object_unref(GTK_OBJECT(e_select_names->adapter));
+ gtk_object_unref(GTK_OBJECT(e_select_names->model));
- if (e_select_names->search_id) {
- g_signal_handler_disconnect(e_select_names->model, e_select_names->search_id);
- e_select_names->search_id = 0;
- }
+ g_free(e_select_names->def);
- if (e_select_names->gui) {
- g_object_unref(e_select_names->gui);
- e_select_names->gui = NULL;
- }
+ (*(GTK_OBJECT_CLASS(parent_class))->destroy)(object);
+}
- if (e_select_names->children) {
- g_hash_table_foreach(e_select_names->children, (GHFunc) e_select_names_child_free, e_select_names);
- g_hash_table_destroy(e_select_names->children);
- e_select_names->children = NULL;
- }
+GtkWidget*
+e_select_names_new (void)
+{
+ GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_select_names_get_type ()));
+ return widget;
+}
- if (e_select_names->without) {
- g_object_unref(e_select_names->without);
- e_select_names->without = NULL;
- }
- if (e_select_names->adapter) {
- g_object_unref(e_select_names->adapter);
- e_select_names->adapter = NULL;
- }
- if (e_select_names->model) {
- g_object_unref(e_select_names->model);
- e_select_names->model = NULL;
- }
+static void
+e_select_names_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+{
+ ESelectNames *editor;
- if (e_select_names->def) {
- g_free(e_select_names->def);
- e_select_names->def = NULL;
+ editor = E_SELECT_NAMES (o);
+
+ switch (arg_id){
+ default:
+ return;
}
-
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose(object);
}
-GtkWidget*
-e_select_names_new (EvolutionShellClient *shell_client)
+static void
+e_select_names_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
ESelectNames *e_select_names;
- const char *selector_types[] = { "contacts/*", NULL };
- char *contacts_uri;
- GtkWidget *button;
- EConfigListener *db;
-
- e_select_names = g_object_new (E_TYPE_SELECT_NAMES, NULL);
-
- db = e_book_get_config_database ();
- contacts_uri = e_config_listener_get_string_with_default (
- db, "/apps/evolution/addressbook/select_names/last_used_uri",
- NULL, NULL);
- if (!contacts_uri)
- contacts_uri = g_strdup (e_book_get_default_book_uri ());
-
- button = glade_xml_get_widget (e_select_names->gui, "folder-selector");
- evolution_folder_selector_button_construct (EVOLUTION_FOLDER_SELECTOR_BUTTON (button),
- shell_client,
- _("Find contact in"),
- contacts_uri,
- selector_types);
- addressbook_model_set_uri(e_select_names, e_select_names->model, contacts_uri);
-
- g_free (contacts_uri);
+ e_select_names = E_SELECT_NAMES (object);
- return GTK_WIDGET (e_select_names);
+ switch (arg_id) {
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
}
static void
@@ -663,60 +654,85 @@ button_clicked(GtkWidget *button, ESelectNamesChild *child)
real_add_address(child->names, child);
}
+#if 0
static void
remove_address(ETable *table, int row, int col, GdkEvent *event, ESelectNamesChild *child)
{
e_select_names_model_delete (child->source, row);
}
+#endif
struct _RightClickData {
ESelectNamesChild *child;
- int row;
+ int index;
};
typedef struct _RightClickData RightClickData;
+#if 0
+static GSList *selected_rows = NULL;
+
+static void
+etable_selection_foreach_cb (int row, void *data)
+{
+ /* Build a list of rows in reverse order, then remove them,
+ necessary because otherwise it'll start trying to delete
+ rows out of index in ETableModel */
+ selected_rows = g_slist_prepend (selected_rows, GINT_TO_POINTER (row));
+}
+
+static void
+selected_rows_foreach_cb (void *row, void *data)
+{
+ ESelectNamesChild *child = data;
+
+ remove_address (NULL, GPOINTER_TO_INT (row), 0, NULL, child);
+}
+#endif
+
static void
remove_cb (GtkWidget *widget, void *data)
{
RightClickData *rcdata = (RightClickData *)data;
- e_select_names_model_delete (rcdata->child->source, rcdata->row);
+ e_select_names_model_delete (rcdata->child->source, rcdata->index);
/* Free everything we've created */
g_free (rcdata);
}
static void
-section_right_click_cb (ETable *et, int row, int col, GdkEvent *ev, ESelectNamesChild *child)
+section_right_click_cb (EText *text, GdkEventButton *ev, gint pos, ESelectNamesChild *child)
{
- static EPopupMenu right_click_menu[] = {
- E_POPUP_ITEM (N_("Remove"), G_CALLBACK (remove_cb), 0),
+ EPopupMenu right_click_menu[] = {
+ E_POPUP_ITEM (N_("Remove"), GTK_SIGNAL_FUNC (remove_cb), 0),
E_POPUP_TERMINATOR
};
- RightClickData *rcdata = g_new0 (RightClickData, 1);
+ gint index;
- rcdata->row = row;
- rcdata->child = child;
+ e_select_names_model_text_pos (child->source, child->text_model->seplen, pos, &index, NULL, NULL);
- e_popup_menu_run (right_click_menu, (GdkEvent *)ev, 0, 0, rcdata);
+ if (index != -1) {
+ RightClickData *rcdata = g_new0 (RightClickData, 1);
+ rcdata->index = index;
+ rcdata->child = child;
+
+ e_popup_menu_run (right_click_menu, (GdkEvent *)ev, 0, 0, rcdata);
+ }
}
void
-e_select_names_add_section (ESelectNames *e_select_names,
- const char *name, const char *id,
- ESelectNamesModel *source)
+e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, ESelectNamesModel *source)
{
ESelectNamesChild *child;
GtkWidget *button;
- GtkWidget *label;
GtkWidget *alignment;
+ GtkWidget *label;
GtkTable *table;
char *label_text;
ETable *etable;
- ETableExtras *extras;
- ECell *string_cell;
GtkWidget *sw;
+ GtkWidget *recipient_table;
if (g_hash_table_lookup(e_select_names->children, id)) {
return;
@@ -727,34 +743,45 @@ e_select_names_add_section (ESelectNames *e_select_names,
child = g_new(ESelectNamesChild, 1);
child->names = e_select_names;
- child->title = g_strdup (_(name));
+ child->title = e_utf8_from_locale_string(_(name));
- child->table_model = (ESelectNamesTableModel*)e_select_names_table_model_new (source);
+ child->text_model = (ESelectNamesTextModel *) e_select_names_text_model_new (source);
+ e_select_names_text_model_set_separator (child->text_model, "\n");
child->source = source;
- g_object_ref(child->source);
+ gtk_object_ref(GTK_OBJECT(child->source));
e_select_names->child_count++;
alignment = gtk_alignment_new(0, 0, 1, 0);
- label_text = g_strconcat (child->title, " ->", NULL);
-
- label = gtk_label_new ("");
+ button = gtk_button_new ();
- gtk_label_set_markup (GTK_LABEL(label), label_text);
+ label = e_entry_new ();
+ gtk_object_set(GTK_OBJECT(label),
+ "draw_background", FALSE,
+ "draw_borders", FALSE,
+ "draw_button", TRUE,
+ "editable", FALSE,
+ "text", "",
+ "use_ellipsis", FALSE,
+ "justification", GTK_JUSTIFY_CENTER,
+ NULL);
+ label_text = g_strconcat (child->title, " ->", NULL);
+ gtk_object_set (GTK_OBJECT (label),
+ "text", label_text,
+ "emulate_label_resize", TRUE,
+ NULL);
g_free (label_text);
-
- button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), label);
child->label = label;
child->button = button;
gtk_container_add(GTK_CONTAINER(alignment), button);
gtk_widget_show_all(alignment);
- g_signal_connect(button, "clicked",
- G_CALLBACK(button_clicked), child);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+ GTK_SIGNAL_FUNC(button_clicked), child);
gtk_table_attach(table, alignment,
0, 1,
e_select_names->child_count,
@@ -765,37 +792,33 @@ e_select_names_add_section (ESelectNames *e_select_names,
etable = e_table_scrolled_get_table (e_select_names->table);
gtk_widget_set_sensitive (button, e_table_selected_count (etable) > 0);
- extras = e_table_extras_new ();
- string_cell = e_table_extras_get_cell (extras, "string");
-
- g_object_set (string_cell,
- "underline_column", 2,
- NULL);
-
- sw = e_table_scrolled_new_from_spec_file (E_TABLE_MODEL (child->table_model),
- extras,
- EVOLUTION_ETSPECDIR "/e-select-names-section.etspec",
- NULL);
- g_object_unref (extras);
-
- child->recipient_table = GTK_WIDGET (e_table_scrolled_get_table (E_TABLE_SCROLLED (sw)));
-
- g_signal_connect (child->recipient_table,
- "right_click",
- G_CALLBACK (section_right_click_cb),
- child);
-
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- g_signal_connect(child->recipient_table, "double_click",
- G_CALLBACK(remove_address), child);
-
- child->changed_id = g_signal_connect (child->source,
- "changed",
- G_CALLBACK (sync_table_and_models),
- e_select_names);
+ sw = gtk_scrolled_window_new (NULL, NULL);
+ recipient_table = e_entry_new ();
+ gtk_object_set (GTK_OBJECT (recipient_table),
+ "model", child->text_model,
+ "allow_newlines", TRUE,
+ NULL);
+
+ gtk_signal_connect (GTK_OBJECT (recipient_table),
+ "popup",
+ GTK_SIGNAL_FUNC (section_right_click_cb),
+ child);
+
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), recipient_table);
+
+#if 0
+ gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(E_TABLE_SCROLLED(etable))), "right_click",
+ GTK_SIGNAL_FUNC(section_right_click_cb), child);
+ gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(E_TABLE_SCROLLED(etable))), "double_click",
+ GTK_SIGNAL_FUNC(remove_address), child);
+#endif
+
+
+ gtk_signal_connect (GTK_OBJECT (child->source),
+ "changed",
+ GTK_SIGNAL_FUNC (sync_table_and_models),
+ e_select_names);
gtk_widget_show_all (sw);
@@ -811,6 +834,54 @@ e_select_names_add_section (ESelectNames *e_select_names,
sync_table_and_models (child->source, e_select_names);
}
+static void *
+card_copy(const void *value, void *closure)
+{
+ gtk_object_ref(GTK_OBJECT(value));
+ return (void *)value;
+}
+
+static void
+card_free(void *value, void *closure)
+{
+ gtk_object_unref(GTK_OBJECT(value));
+}
+
+EList *
+e_select_names_get_section(ESelectNames *e_select_names, char *id)
+{
+ ESelectNamesChild *child;
+ int i;
+ int rows;
+ EList *list;
+
+ child = g_hash_table_lookup(e_select_names->children, id);
+ if (!child)
+ return NULL;
+ rows = e_select_names_model_count (child->source);
+
+ list = e_list_new(card_copy, card_free, NULL);
+ for (i = 0; i < rows; i++) {
+ ECard *card = e_select_names_model_get_card (child->source, i);
+ e_list_append(list, card);
+ gtk_object_unref(GTK_OBJECT(card));
+ }
+ return list;
+}
+
+ESelectNamesModel *
+e_select_names_get_source(ESelectNames *e_select_names,
+ char *id)
+{
+ ESelectNamesChild *child = g_hash_table_lookup(e_select_names->children, id);
+ if (child) {
+ if (child->source)
+ gtk_object_ref(GTK_OBJECT(child->source));
+ return child->source;
+ } else
+ return NULL;
+}
+
void
e_select_names_set_default (ESelectNames *e_select_names,
const char *id)
@@ -819,12 +890,10 @@ e_select_names_set_default (ESelectNames *e_select_names,
if (e_select_names->def) {
child = g_hash_table_lookup(e_select_names->children, e_select_names->def);
- if (child) {
- GtkWidget *label = child->label;
-
- /* set the previous default to non-bold */
- gtk_label_set_markup (GTK_LABEL (label), child->title);
- }
+ if (child)
+ gtk_object_set (GTK_OBJECT (E_ENTRY (child->label)->item),
+ "bold", FALSE,
+ NULL);
}
g_free(e_select_names->def);
@@ -832,13 +901,9 @@ e_select_names_set_default (ESelectNames *e_select_names,
if (e_select_names->def) {
child = g_hash_table_lookup(e_select_names->children, e_select_names->def);
- if (child) {
- GtkWidget *label = child->label;
- char *markup = g_strconcat ("<b>", child->title, "</b>", NULL);
-
- /* set the new default to bold */
- gtk_label_set_markup (GTK_LABEL (label), markup);
- g_free (markup);
- }
+ if (child)
+ gtk_object_set (GTK_OBJECT (E_ENTRY (child->label)->item),
+ "bold", TRUE,
+ NULL);
}
}
diff --git a/addressbook/gui/component/select-names/e-select-names.h b/addressbook/gui/component/select-names/e-select-names.h
index 8e672da92a..b70655b932 100644
--- a/addressbook/gui/component/select-names/e-select-names.h
+++ b/addressbook/gui/component/select-names/e-select-names.h
@@ -22,15 +22,17 @@
#include <glib.h>
#include <gtk/gtkwidget.h>
-#include <gtk/gtkdialog.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-util.h>
+#include <libgnomeui/gnome-dialog.h>
#include <glade/glade.h>
#include <gal/e-table/e-table.h>
#include <gal/e-table/e-table-scrolled.h>
-#include "evolution-shell-client.h"
-#include "e-addressbook-model.h"
+#include <addressbook/gui/widgets/e-addressbook-model.h>
#include "e-select-names-model.h"
+#include "e-util/e-list.h"
#ifdef __cplusplus
extern "C" {
@@ -45,11 +47,11 @@ extern "C" {
* --------------------------------------------------------------------------------
*/
-#define E_TYPE_SELECT_NAMES (e_select_names_get_type ())
-#define E_SELECT_NAMES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SELECT_NAMES, ESelectNames))
-#define E_SELECT_NAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES, ESelectNamesClass))
-#define E_IS_SELECT_NAMES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SELECT_NAMES))
-#define E_IS_SELECT_NAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_SELECT_NAMES))
+#define E_SELECT_NAMES_TYPE (e_select_names_get_type ())
+#define E_SELECT_NAMES(obj) (GTK_CHECK_CAST ((obj), E_SELECT_NAMES_TYPE, ESelectNames))
+#define E_SELECT_NAMES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SELECT_NAMES_TYPE, ESelectNamesClass))
+#define E_IS_SELECT_NAMES(obj) (GTK_CHECK_TYPE ((obj), E_SELECT_NAMES_TYPE))
+#define E_IS_SELECT_NAMES_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SELECT_NAMES_TYPE))
typedef struct _ESelectNames ESelectNames;
typedef struct _ESelectNamesClass ESelectNamesClass;
@@ -57,7 +59,7 @@ typedef struct _ESelectNamesFolder ESelectNamesFolder;
struct _ESelectNames
{
- GtkDialog parent;
+ GnomeDialog parent;
/* item specific fields */
GladeXML *gui;
@@ -71,29 +73,31 @@ struct _ESelectNames
GtkWidget *categories;
GtkWidget *select_entry;
GtkWidget *status_message;
+ GtkWidget *status_image;
char *def;
ESelectNamesFolder *current_folder;
-
- /* signal handlers */
- gulong status_id;
- gulong search_id;
};
struct _ESelectNamesClass
{
- GtkDialogClass parent_class;
+ GnomeDialogClass parent_class;
};
-GtkWidget *e_select_names_new (EvolutionShellClient *shell_client);
-GType e_select_names_get_type (void);
-
-void e_select_names_add_section (ESelectNames *e_select_names,
- const char *name,
- const char *id,
- ESelectNamesModel *source);
-void e_select_names_set_default (ESelectNames *e_select_names,
- const char *id);
+GtkWidget *e_select_names_new (void);
+GtkType e_select_names_get_type (void);
+
+void e_select_names_add_section (ESelectNames *e_select_names,
+ char *name,
+ char *id,
+ ESelectNamesModel *source);
+ESelectNamesModel *e_select_names_get_source (ESelectNames *e_select_names,
+ char *id);
+void e_select_names_set_default (ESelectNames *e_select_names,
+ const char *id);
+/* Returns a ref counted list of addresses. */
+EList *e_select_names_get_section (ESelectNames *e_select_names,
+ char *id);
#ifdef __cplusplus
}
diff --git a/addressbook/gui/component/select-names/e-simple-card-bonobo.c b/addressbook/gui/component/select-names/e-simple-card-bonobo.c
index 07203618b3..35154b44a6 100644
--- a/addressbook/gui/component/select-names/e-simple-card-bonobo.c
+++ b/addressbook/gui/component/select-names/e-simple-card-bonobo.c
@@ -33,7 +33,7 @@
#include "Evolution-Addressbook-SelectNames.h"
-#define PARENT_TYPE BONOBO_TYPE_OBJECT
+#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
struct _ESimpleCardBonoboPrivate {
@@ -41,17 +41,45 @@ struct _ESimpleCardBonoboPrivate {
};
+/* CORBA interface implementation. */
+
+static POA_GNOME_Evolution_Addressbook_SimpleCard__vepv SimpleCard_vepv;
+
+static POA_GNOME_Evolution_Addressbook_SimpleCard *
+create_servant (void)
+{
+ POA_GNOME_Evolution_Addressbook_SimpleCard *servant;
+ CORBA_Environment ev;
+
+ servant = (POA_GNOME_Evolution_Addressbook_SimpleCard *) g_new0 (BonoboObjectServant, 1);
+ servant->vepv = &SimpleCard_vepv;
+
+ CORBA_exception_init (&ev);
+
+ POA_GNOME_Evolution_Addressbook_SimpleCard__init ((PortableServer_Servant) servant, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_free (servant);
+ CORBA_exception_free (&ev);
+ return NULL;
+ }
+
+ CORBA_exception_free (&ev);
+
+ return servant;
+}
static GNOME_Evolution_Addressbook_SimpleCard_Arbitrary *
impl_SimpleCard_get_arbitrary (PortableServer_Servant servant,
const CORBA_char *key,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
GNOME_Evolution_Addressbook_SimpleCard_Arbitrary *ret_val = GNOME_Evolution_Addressbook_SimpleCard_Arbitrary__alloc ();
- simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object);
priv = simple_card->priv;
if (priv->card_simple) {
@@ -75,10 +103,12 @@ impl_SimpleCard_set_arbitrary (PortableServer_Servant servant,
const CORBA_char *value,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
- simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object);
priv = simple_card->priv;
if (priv->card_simple) {
@@ -91,10 +121,12 @@ impl_SimpleCard_get (PortableServer_Servant servant,
GNOME_Evolution_Addressbook_SimpleCard_Field field,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
- simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object);
priv = simple_card->priv;
if (priv->card_simple) {
@@ -114,11 +146,12 @@ impl_SimpleCard_set (PortableServer_Servant servant,
const CORBA_char *value,
CORBA_Environment *ev)
{
-
+ BonoboObject *bonobo_object;
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
- simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object);
priv = simple_card->priv;
if (priv->card_simple) {
@@ -132,7 +165,7 @@ impl_SimpleCard_set (PortableServer_Servant servant,
/* GtkObject methods. */
static void
-impl_dispose (GObject *object)
+impl_destroy (GtkObject *object)
{
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
@@ -140,40 +173,54 @@ impl_dispose (GObject *object)
simple_card = E_SIMPLE_CARD_BONOBO (object);
priv = simple_card->priv;
- if (priv) {
- if (priv->card_simple) {
- g_object_unref (priv->card_simple);
- }
-
- g_free (priv);
- simple_card->priv = NULL;
+ if (priv->card_simple) {
+ gtk_object_unref (GTK_OBJECT (priv->card_simple));
}
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose(object);
+ g_free (priv);
+
+ simple_card->priv = NULL;
}
static void
-e_simple_card_bonobo_class_init (ESimpleCardBonoboClass *klass)
+corba_class_init ()
{
- GObjectClass *object_class;
+ POA_GNOME_Evolution_Addressbook_SimpleCard__vepv *vepv;
POA_GNOME_Evolution_Addressbook_SimpleCard__epv *epv;
+ PortableServer_ServantBase__epv *base_epv;
- object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_ref (BONOBO_TYPE_OBJECT);
-
- object_class->dispose = impl_dispose;
+ base_epv = g_new0 (PortableServer_ServantBase__epv, 1);
+ base_epv->_private = NULL;
+ base_epv->finalize = NULL;
+ base_epv->default_POA = NULL;
- epv = &klass->epv;
+ epv = g_new0 (POA_GNOME_Evolution_Addressbook_SimpleCard__epv, 1);
epv->getArbitrary = impl_SimpleCard_get_arbitrary;
epv->setArbitrary = impl_SimpleCard_set_arbitrary;
epv->get = impl_SimpleCard_get;
epv->set = impl_SimpleCard_set;
+
+ vepv = &SimpleCard_vepv;
+ vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
+ vepv->GNOME_Evolution_Addressbook_SimpleCard_epv = epv;
+}
+
+static void
+class_init (ESimpleCardBonoboClass *klass)
+{
+ GtkObjectClass *object_class;
+
+ object_class = GTK_OBJECT_CLASS (klass);
+ parent_class = gtk_type_class (bonobo_object_get_type ());
+
+ object_class->destroy = impl_destroy;
+
+ corba_class_init ();
}
static void
-e_simple_card_bonobo_init (ESimpleCardBonobo *simple_card)
+init (ESimpleCardBonobo *simple_card)
{
ESimpleCardBonoboPrivate *priv;
@@ -187,30 +234,36 @@ e_simple_card_bonobo_init (ESimpleCardBonobo *simple_card)
void
e_simple_card_bonobo_construct (ESimpleCardBonobo *simple_card,
+ GNOME_Evolution_Addressbook_SimpleCard corba_object,
ECardSimple *card_simple)
{
g_return_if_fail (simple_card != NULL);
g_return_if_fail (E_IS_SIMPLE_CARD_BONOBO (simple_card));
+ bonobo_object_construct (BONOBO_OBJECT (simple_card), corba_object);
+
simple_card->priv->card_simple = card_simple;
- g_object_ref (card_simple);
+ gtk_object_ref (GTK_OBJECT (card_simple));
}
ESimpleCardBonobo *
e_simple_card_bonobo_new (ECardSimple *card_simple)
{
+ POA_GNOME_Evolution_Addressbook_SimpleCard *servant;
+ GNOME_Evolution_Addressbook_SimpleCard corba_object;
ESimpleCardBonobo *simple_card;
- simple_card = g_object_new (E_TYPE_SIMPLE_CARD_BONOBO, NULL);
+ servant = create_servant ();
+ if (servant == NULL)
+ return NULL;
+
+ simple_card = gtk_type_new (e_simple_card_bonobo_get_type ());
- e_simple_card_bonobo_construct (simple_card, card_simple);
+ corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (simple_card), servant);
+ e_simple_card_bonobo_construct (simple_card, corba_object, card_simple);
return simple_card;
}
-BONOBO_TYPE_FUNC_FULL (
- ESimpleCardBonobo,
- GNOME_Evolution_Addressbook_SimpleCard,
- PARENT_TYPE,
- e_simple_card_bonobo);
+E_MAKE_TYPE (e_simple_card_bonobo, "ESimpleCardBonobo", ESimpleCardBonobo, class_init, init, PARENT_TYPE)
diff --git a/addressbook/gui/component/select-names/select-names.glade b/addressbook/gui/component/select-names/select-names.glade
index 9a6b38f461..6485876fbf 100644
--- a/addressbook/gui/component/select-names/select-names.glade
+++ b/addressbook/gui/component/select-names/select-names.glade
@@ -1,451 +1,518 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+<?xml version="1.0"?>
+<GTK-Interface>
-<glade-interface>
+<project>
+ <name>Select-names</name>
+ <program_name>select-names</program_name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>../../../../art/</pixmaps_directory>
+ <language>C</language>
+ <gnome_support>True</gnome_support>
+ <gettext_support>True</gettext_support>
+ <output_main_file>False</output_main_file>
+ <output_support_files>False</output_support_files>
+ <output_build_files>False</output_build_files>
+</project>
-<widget class="GtkDialog" id="dialog-top">
- <property name="title" translatable="yes">Select Names</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">417</property>
- <property name="default_height">332</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
+<widget>
+ <class>GnomeDialog</class>
+ <name>dialog-top</name>
+ <visible>False</visible>
+ <title>Select Names</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>417</default_width>
+ <default_height>332</default_height>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>False</auto_close>
+ <hide_on_close>False</hide_on_close>
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>dialog-vbox1</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <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>
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>dialog-action_area1</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
+ <widget>
+ <class>GtkButton</class>
+ <name>button4</name>
+ <can_default>True</can_default>
+ <has_default>True</has_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
- <child>
- <widget class="GtkButton" id="button5">
- <property name="visible">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">0</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>
+ <widget>
+ <class>GtkButton</class>
+ <name>button5</name>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+ </widget>
+ </widget>
+ <widget>
+ <class>GtkTable</class>
+ <name>table-top</name>
+ <rows>3</rows>
+ <columns>1</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
<child>
- <widget class="GtkTable" id="table-top">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">1</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child>
- <widget class="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator1</name>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame1</name>
+ <label>Show Contacts</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
- <child>
- <widget class="GtkTable" id="table5">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
+ <widget>
+ <class>GtkTable</class>
+ <name>table5</name>
+ <border_width>3</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
- <child>
- <widget class="GtkLabel" id="label30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Folder:</property>
- <property name="use_underline">True</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">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label30</name>
+ <label>_Folder:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Category:</property>
- <property name="use_underline">True</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">0</property>
- <property name="right_attach">1</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>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label31</name>
+ <label>_Category:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment5</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
- <child>
- <widget class="Custom" id="custom-categories">
- <property name="visible">True</property>
- <property name="creation_function">e_select_names_create_categories</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 19 Feb 2002 23:06:24 GMT</property>
- </widget>
- </child>
- </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="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>Custom</class>
+ <name>custom-categories</name>
+ <creation_function>e_select_names_create_categories</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Tue, 19 Feb 2002 23:06:24 GMT</last_modification_time>
+ </widget>
+ </widget>
- <child>
- <widget class="Custom" id="folder-selector">
- <property name="visible">True</property>
- <property name="creation_function">e_addressbook_create_folder_selector</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Mon, 15 Jul 2002 02:21:32 GMT</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="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
+ <widget>
+ <class>Custom</class>
+ <name>folder-selector</name>
+ <creation_function>e_addressbook_create_folder_selector</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Mon, 15 Jul 2002 02:21:32 GMT</last_modification_time>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox5</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table4</name>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label32</name>
+ <label>Type a name into the entry, or
+select one from the list below:</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table-recipients</name>
+ <rows>5</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label20</name>
+ <label>Selected Contacts:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>True</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Show Contacts</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.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</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">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ </widget>
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment4</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>1</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
- <child>
- <widget class="GtkTable" id="table4">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox6</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
- <child>
- <widget class="GtkLabel" id="label32">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Type a name into the entry, or
-select one from the list below:</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">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox1</name>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-select</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
<child>
- <widget class="GtkTable" id="table-recipients">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selected Contacts:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</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="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </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>
- </packing>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkButton</class>
+ <name>button-find</name>
+ <can_focus>True</can_focus>
+ <label>Find</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
<child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkEntry" id="entry-select">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button-find">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Find</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment3</name>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xscale>1</xscale>
+ <yscale>1</yscale>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child>
- <widget class="Custom" id="table-source">
- <property name="visible">True</property>
- <property name="creation_function">e_addressbook_create_ebook_table</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sat, 10 Jun 2000 22:02:57 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
+ <widget>
+ <class>Custom</class>
+ <name>table-source</name>
+ <creation_function>e_addressbook_create_ebook_table</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Sat, 10 Jun 2000 22:02:57 GMT</last_modification_time>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ </widget>
</widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- </packing>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>status-hbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>Custom</class>
+ <name>status-image</name>
+ <visible>False</visible>
+ <creation_function>e_create_image_widget</creation_function>
+ <string1>evolution-contacts-mini.png</string1>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Thu, 28 Nov 2002 22:26:05 GMT</last_modification_time>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>status-message</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>4.84288e-08</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>3</ypad>
<child>
- <widget class="GtkLabel" id="status-message">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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">3</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ </widget>
</widget>
- </child>
+ </widget>
</widget>
-</glade-interface>
+</GTK-Interface>