aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog9
-rw-r--r--addressbook/contact-editor/e-contact-editor.c38
-rw-r--r--addressbook/contact-editor/e-contact-editor.h2
-rw-r--r--addressbook/gui/component/addressbook.c76
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c38
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.h2
6 files changed, 76 insertions, 89 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 4b77ecb870..2deb9a0e73 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,12 @@
+2000-10-05 Michael Meeks <michael@helixcode.com>
+
+ * contact-editor/e-contact-editor.c (create_ui): upd.
+ (e_contact_editor_init): upd.
+
+ * gui/component/addressbook.c (control_activate_cb): upd.
+ (control_deactivate): kill.
+ (control_activate): upd.
+
2000-09-22 Michael Meeks <michael@helixcode.com>
* gui/component/addressbook.c (control_activate): update.
diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c
index b41a5e3ae7..abf7f2fe77 100644
--- a/addressbook/contact-editor/e-contact-editor.c
+++ b/addressbook/contact-editor/e-contact-editor.c
@@ -724,13 +724,13 @@ tb_save_and_close_cb (BonoboUIHandler *uih, void *data, const char *path)
static
BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("ContactEditorSave", file_save_cb),
- BONOBO_UI_VERB ("ContactEditorSaveAs", file_save_as_cb),
- BONOBO_UI_VERB ("ContactEditorSaveClose", tb_save_and_close_cb),
- BONOBO_UI_VERB ("ContactEditorDelete", delete_cb),
- BONOBO_UI_VERB ("ContactEditorPrint", print_cb),
- /* BONOBO_UI_VERB ("ContactEditorPageSetup", file_page_setup_menu), */
- BONOBO_UI_VERB ("ContactEditorClose", file_close_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorSave", file_save_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorSaveAs", file_save_as_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorSaveClose", tb_save_and_close_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorDelete", delete_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorPrint", print_cb),
+ /* BONOBO_UI_UNSAFE_VERB ("ContactEditorPageSetup", file_page_setup_menu), */
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorClose", file_close_cb),
BONOBO_UI_VERB_END
};
@@ -738,17 +738,10 @@ BonoboUIVerb verbs [] = {
static void
create_ui (EContactEditor *ce)
{
- BonoboUIComponent *component;
- Bonobo_UIContainer container;
-
- component = bonobo_ui_compat_get_component (ce->uih);
- container = bonobo_ui_compat_get_container (ce->uih);
-
bonobo_ui_component_add_verb_list_with_data (
- component, verbs, ce);
+ ce->uic, verbs, ce);
- bonobo_ui_util_set_ui (component, container,
- EVOLUTION_DATADIR,
+ bonobo_ui_util_set_ui (ce->uic, EVOLUTION_DATADIR,
"evolution-contact-editor.xml",
"evolution-contact-editor");
}
@@ -811,6 +804,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
GtkWidget *widget;
GtkWidget *bonobo_win;
GtkWidget *wants_html;
+ BonoboUIContainer *container;
e_contact_editor->email_info = NULL;
e_contact_editor->phone_info = NULL;
@@ -894,13 +888,17 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
/* Build the menu and toolbar */
- e_contact_editor->uih = bonobo_ui_handler_new ();
- if (!e_contact_editor->uih) {
+ container = bonobo_ui_container_new ();
+ bonobo_ui_container_set_win (container, BONOBO_WIN (e_contact_editor->app));
+
+ e_contact_editor->uic = bonobo_ui_component_new_default ();
+ if (!e_contact_editor->uic) {
g_message ("e_contact_editor_init(): eeeeek, could not create the UI handler!");
return;
}
-
- bonobo_ui_handler_set_app (e_contact_editor->uih, BONOBO_WIN (e_contact_editor->app));
+ bonobo_ui_component_set_container (e_contact_editor->uic,
+ bonobo_object_corba_objref (
+ BONOBO_OBJECT (container)));
create_ui (e_contact_editor);
diff --git a/addressbook/contact-editor/e-contact-editor.h b/addressbook/contact-editor/e-contact-editor.h
index 83ac71fd78..fae6939595 100644
--- a/addressbook/contact-editor/e-contact-editor.h
+++ b/addressbook/contact-editor/e-contact-editor.h
@@ -60,7 +60,7 @@ struct _EContactEditor
ECardSimple *simple;
/* UI handler */
- BonoboUIHandler *uih;
+ BonoboUIComponent *uic;
GladeXML *gui;
GtkWidget *app;
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 1c0aa4ada7..65f4fdca93 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -49,18 +49,6 @@ typedef struct {
static void change_view_type (AddressbookView *view, EAddressbookViewType view_type);
static void
-control_deactivate (BonoboControl *control, BonoboUIHandler *uih)
-{
- Bonobo_UIContainer container = bonobo_ui_compat_get_container (uih);
-
- g_return_if_fail (container != CORBA_OBJECT_NIL);
-
- bonobo_ui_component_rm (
- bonobo_ui_compat_get_component (uih),
- container, "/", NULL);
-}
-
-static void
card_added_cb (EBook* book, EBookStatus status, const char *id,
gpointer user_data)
{
@@ -323,48 +311,42 @@ stop_loading_cb (BonoboUIHandler *uih, void *user_data, const char *path)
}
BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("ContactsPrint", print_cb),
- BONOBO_UI_VERB ("ViewAsTable", toggle_view_as_cb),
- BONOBO_UI_VERB ("ViewNewContact", new_contact_cb),
- BONOBO_UI_VERB ("ToolSearch", search_cb),
-
- BONOBO_UI_VERB ("ContactNew", new_contact_cb),
-/* BONOBO_UI_VERB ("ContactFind", find_contact_cb),*/
- BONOBO_UI_VERB ("ContactDelete", delete_contact_cb),
- BONOBO_UI_VERB ("ContactViewAll", show_all_contacts_cb),
- BONOBO_UI_VERB ("ContactStop", stop_loading_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactsPrint", print_cb),
+ BONOBO_UI_UNSAFE_VERB ("ViewAsTable", toggle_view_as_cb),
+ BONOBO_UI_UNSAFE_VERB ("ViewNewContact", new_contact_cb),
+ BONOBO_UI_UNSAFE_VERB ("ToolSearch", search_cb),
+
+ BONOBO_UI_UNSAFE_VERB ("ContactNew", new_contact_cb),
+/* BONOBO_UI_UNSAFE_VERB ("ContactFind", find_contact_cb),*/
+ BONOBO_UI_UNSAFE_VERB ("ContactDelete", delete_contact_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactViewAll", show_all_contacts_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactStop", stop_loading_cb),
#ifdef HAVE_LDAP
- BONOBO_UI_VERB ("ContactNewServer", new_server_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactNewServer", new_server_cb),
#endif
BONOBO_UI_VERB_END
};
static void
-control_activate (BonoboControl *control, BonoboUIHandler *uih,
- AddressbookView *view)
+control_activate (BonoboControl *control,
+ BonoboUIComponent *uic,
+ AddressbookView *view)
{
- Bonobo_UIContainer remote_uih;
- Bonobo_UIContainer container;
- BonoboUIComponent *component;
+ Bonobo_UIContainer remote_ui_container;
GtkWidget *quick_search_widget;
BonoboControl *search_control;
- remote_uih = bonobo_control_get_remote_ui_handler (control);
- bonobo_ui_handler_set_container (uih, remote_uih);
- bonobo_object_release_unref (remote_uih, NULL);
+ remote_ui_container = bonobo_control_get_remote_ui_container (control);
+ bonobo_ui_component_set_container (uic, remote_ui_container);
+ bonobo_object_release_unref (remote_ui_container, NULL);
- component = bonobo_ui_compat_get_component (uih);
-
bonobo_ui_component_add_verb_list_with_data (
- component, verbs, view);
-
- container = bonobo_ui_compat_get_container (uih);
- g_return_if_fail (container != CORBA_OBJECT_NIL);
+ uic, verbs, view);
- bonobo_ui_container_freeze (container, NULL);
+ bonobo_ui_component_freeze (uic, NULL);
- bonobo_ui_util_set_ui (component, container, EVOLUTION_DATADIR,
+ bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR,
#ifdef HAVE_LDAP
"evolution-addressbook-ldap.xml",
#else
@@ -378,12 +360,12 @@ control_activate (BonoboControl *control, BonoboUIHandler *uih,
gtk_widget_show_all (quick_search_widget);
search_control = bonobo_control_new (quick_search_widget);
- bonobo_ui_container_object_set (
- container, "/Toolbar/QuickSearch",
+ bonobo_ui_component_object_set (
+ uic, "/Toolbar/QuickSearch",
bonobo_object_corba_objref (BONOBO_OBJECT (search_control)),
NULL);
- bonobo_ui_container_thaw (container, NULL);
+ bonobo_ui_component_thaw (uic, NULL);
}
static void
@@ -391,15 +373,15 @@ control_activate_cb (BonoboControl *control,
gboolean activate,
AddressbookView *view)
{
- BonoboUIHandler *uih;
+ BonoboUIComponent *uic;
- uih = bonobo_control_get_ui_handler (control);
- g_assert (uih);
+ uic = bonobo_control_get_ui_component (control);
+ g_assert (uic != NULL);
if (activate)
- control_activate (control, uih, view);
+ control_activate (control, uic, view);
else
- control_deactivate (control, uih);
+ bonobo_ui_component_unset_container (uic);
}
static void
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index b41a5e3ae7..abf7f2fe77 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -724,13 +724,13 @@ tb_save_and_close_cb (BonoboUIHandler *uih, void *data, const char *path)
static
BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("ContactEditorSave", file_save_cb),
- BONOBO_UI_VERB ("ContactEditorSaveAs", file_save_as_cb),
- BONOBO_UI_VERB ("ContactEditorSaveClose", tb_save_and_close_cb),
- BONOBO_UI_VERB ("ContactEditorDelete", delete_cb),
- BONOBO_UI_VERB ("ContactEditorPrint", print_cb),
- /* BONOBO_UI_VERB ("ContactEditorPageSetup", file_page_setup_menu), */
- BONOBO_UI_VERB ("ContactEditorClose", file_close_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorSave", file_save_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorSaveAs", file_save_as_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorSaveClose", tb_save_and_close_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorDelete", delete_cb),
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorPrint", print_cb),
+ /* BONOBO_UI_UNSAFE_VERB ("ContactEditorPageSetup", file_page_setup_menu), */
+ BONOBO_UI_UNSAFE_VERB ("ContactEditorClose", file_close_cb),
BONOBO_UI_VERB_END
};
@@ -738,17 +738,10 @@ BonoboUIVerb verbs [] = {
static void
create_ui (EContactEditor *ce)
{
- BonoboUIComponent *component;
- Bonobo_UIContainer container;
-
- component = bonobo_ui_compat_get_component (ce->uih);
- container = bonobo_ui_compat_get_container (ce->uih);
-
bonobo_ui_component_add_verb_list_with_data (
- component, verbs, ce);
+ ce->uic, verbs, ce);
- bonobo_ui_util_set_ui (component, container,
- EVOLUTION_DATADIR,
+ bonobo_ui_util_set_ui (ce->uic, EVOLUTION_DATADIR,
"evolution-contact-editor.xml",
"evolution-contact-editor");
}
@@ -811,6 +804,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
GtkWidget *widget;
GtkWidget *bonobo_win;
GtkWidget *wants_html;
+ BonoboUIContainer *container;
e_contact_editor->email_info = NULL;
e_contact_editor->phone_info = NULL;
@@ -894,13 +888,17 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
/* Build the menu and toolbar */
- e_contact_editor->uih = bonobo_ui_handler_new ();
- if (!e_contact_editor->uih) {
+ container = bonobo_ui_container_new ();
+ bonobo_ui_container_set_win (container, BONOBO_WIN (e_contact_editor->app));
+
+ e_contact_editor->uic = bonobo_ui_component_new_default ();
+ if (!e_contact_editor->uic) {
g_message ("e_contact_editor_init(): eeeeek, could not create the UI handler!");
return;
}
-
- bonobo_ui_handler_set_app (e_contact_editor->uih, BONOBO_WIN (e_contact_editor->app));
+ bonobo_ui_component_set_container (e_contact_editor->uic,
+ bonobo_object_corba_objref (
+ BONOBO_OBJECT (container)));
create_ui (e_contact_editor);
diff --git a/addressbook/gui/contact-editor/e-contact-editor.h b/addressbook/gui/contact-editor/e-contact-editor.h
index 83ac71fd78..fae6939595 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.h
+++ b/addressbook/gui/contact-editor/e-contact-editor.h
@@ -60,7 +60,7 @@ struct _EContactEditor
ECardSimple *simple;
/* UI handler */
- BonoboUIHandler *uih;
+ BonoboUIComponent *uic;
GladeXML *gui;
GtkWidget *app;