aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-12-07 01:29:59 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-12-07 01:29:59 +0800
commit37751b5ece11dfa79a4175ec87f72670579d18ea (patch)
tree1d7d3b708990ef068e65a86c7c4250893b9b2577
parent1889b79a4a6d292c15b009d04be1f4147dc515dd (diff)
downloadgsoc2013-evolution-37751b5ece11dfa79a4175ec87f72670579d18ea.tar
gsoc2013-evolution-37751b5ece11dfa79a4175ec87f72670579d18ea.tar.gz
gsoc2013-evolution-37751b5ece11dfa79a4175ec87f72670579d18ea.tar.bz2
gsoc2013-evolution-37751b5ece11dfa79a4175ec87f72670579d18ea.tar.lz
gsoc2013-evolution-37751b5ece11dfa79a4175ec87f72670579d18ea.tar.xz
gsoc2013-evolution-37751b5ece11dfa79a4175ec87f72670579d18ea.tar.zst
gsoc2013-evolution-37751b5ece11dfa79a4175ec87f72670579d18ea.zip
#include <string.h>.
* gui/component/e-cardlist-model.c: #include <string.h>. * gui/component/addressbook-storage.c: #include <string.h>, <ctype.h>, <unistd.h>. * gui/component/addressbook-factory.c: Removed. * gui/component/addressbook-component.c: #include <bonobo/bonobo-main.h>, <unistd.h> and <string.h>. (create_view): addressbook_new_control() instead of addressbook_factory_new_control(). * gui/component/select-names/e-select-names.c (e_addressbook_create_ebook_table): Removed unused variable. (e_select_names_add_section): Removed unused variable. * gui/component/select-names/e-select-names-manager.c (focus_in_cb): Use g_source_remove() here instead of gtk_timeout_remove(). * gui/widgets/e-minicard-control.c (e_minicard_control_factory_init): Removed. (e_minicard_control_control_factory): Removed. (e_minicard_control_new): New. * gui/component/e-address-widget.c (e_address_widget_factory_init): Removed. (e_address_widget_new_control): Renamed from e_address_widget_factory_new_control(), made public. (e_address_widget_factory): Removed. * gui/component/e-address-popup.c (e_address_popup_new_control): New. (e_address_popup_factory_new_control): Removed. (e_address_popup_factory): Removed. (e_address_popup_factory_init): Removed. * gui/component/addressbook-config.c (addressbook_config_register_factory): Removed. (addressbook_config_create_control): New. * gui/component/addressbook-component.c (addressbook_component_factory_init): Removed. (addressbook_component_get_object): New. (owner_set_cb): Do not call addressbok_config_register_factory(). * gui/component/addressbook.c (addressbook_factory_init): Removed. (addressbook_new_control): Renamed from addressbook_factory_new_control(). svn path=/trunk/; revision=19041
-rw-r--r--addressbook/ChangeLog54
-rw-r--r--addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in74
-rw-r--r--addressbook/gui/component/Makefile.am16
-rw-r--r--addressbook/gui/component/addressbook-component.c29
-rw-r--r--addressbook/gui/component/addressbook-component.h2
-rw-r--r--addressbook/gui/component/addressbook-config.c42
-rw-r--r--addressbook/gui/component/addressbook-config.h7
-rw-r--r--addressbook/gui/component/addressbook-factory.c76
-rw-r--r--addressbook/gui/component/addressbook-storage.c3
-rw-r--r--addressbook/gui/component/addressbook.c50
-rw-r--r--addressbook/gui/component/addressbook.h3
-rw-r--r--addressbook/gui/component/e-address-popup.c27
-rw-r--r--addressbook/gui/component/e-address-popup.h2
-rw-r--r--addressbook/gui/component/e-address-widget.c26
-rw-r--r--addressbook/gui/component/e-address-widget.h5
-rw-r--r--addressbook/gui/component/e-cardlist-model.c3
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.c4
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c2
-rw-r--r--addressbook/gui/widgets/e-minicard-control.c46
-rw-r--r--addressbook/gui/widgets/e-minicard-control.h2
20 files changed, 146 insertions, 327 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 3ec5dd65c9..a04abd914f 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,57 @@
+2002-12-06 Ettore Perazzoli <ettore@ximian.com>
+
+ * gui/component/e-cardlist-model.c: #include <string.h>.
+
+ * gui/component/addressbook-storage.c: #include <string.h>,
+ <ctype.h>, <unistd.h>.
+
+ * gui/component/addressbook-factory.c: Removed.
+
+ * gui/component/addressbook-component.c: #include
+ <bonobo/bonobo-main.h>, <unistd.h> and <string.h>.
+ (create_view): addressbook_new_control() instead of
+ addressbook_factory_new_control().
+
+ * gui/component/select-names/e-select-names.c
+ (e_addressbook_create_ebook_table): Removed unused variable.
+ (e_select_names_add_section): Removed unused variable.
+
+ * gui/component/select-names/e-select-names-manager.c
+ (focus_in_cb): Use g_source_remove() here instead of
+ gtk_timeout_remove().
+
+ * gui/component/component-factory.c: New.
+
+ * gui/widgets/e-minicard-control.c
+ (e_minicard_control_factory_init): Removed.
+ (e_minicard_control_control_factory): Removed.
+ (e_minicard_control_new): New.
+
+ * gui/component/e-address-widget.c
+ (e_address_widget_factory_init): Removed.
+ (e_address_widget_new_control): Renamed from
+ e_address_widget_factory_new_control(), made public.
+ (e_address_widget_factory): Removed.
+
+ * gui/component/e-address-popup.c (e_address_popup_new_control):
+ New.
+ (e_address_popup_factory_new_control): Removed.
+ (e_address_popup_factory): Removed.
+ (e_address_popup_factory_init): Removed.
+
+ * gui/component/addressbook-config.c
+ (addressbook_config_register_factory): Removed.
+ (addressbook_config_create_control): New.
+
+ * gui/component/addressbook-component.c
+ (addressbook_component_factory_init): Removed.
+ (addressbook_component_get_object): New.
+ (owner_set_cb): Do not call addressbok_config_register_factory().
+
+ * gui/component/addressbook.c (addressbook_factory_init): Removed.
+ (addressbook_new_control): Renamed from
+ addressbook_factory_new_control().
+
2002-12-05 Jeffrey Stedfast <fejj@ximian.com>
* gui/component/select-names/e-select-names.etspec: Use collate
diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
index a859f22c9e..384f89b40d 100644
--- a/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
+++ b/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
@@ -1,21 +1,21 @@
<oaf_info>
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_MiniCard_ControlFactory"
- type="exe"
- location="@LIBEXECDIR@/evolution-addressbook">
+<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Factory"
+ type="shlib"
+ location="@COMPONENTDIR@/libevolution-addressbook.so">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/ObjectFactory:1.0"/>
</oaf_attribute>
<oaf_attribute name="description" type="string"
- _value="Factory for the Addressbook Minicard control"/>
+ _value="Factory for the controls exported by the Evolution Addressbook"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control"
type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_MiniCard_ControlFactory">
+ location="OAFIID:GNOME_Evolution_Addressbook_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Control:1.0"/>
@@ -34,22 +34,9 @@
</oaf_server>
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_ControlFactory"
- type="exe"
- location="@LIBEXECDIR@/evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the sample Addressbook control"/>
-
-</oaf_server>
-
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Control"
type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_ControlFactory">
+ location="OAFIID:GNOME_Evolution_Addressbook_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:BonoboControl/addressbook-control:1.0"/>
@@ -62,8 +49,8 @@
</oaf_server>
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_ShellComponent"
- type="exe"
- location="@LIBEXECDIR@/evolution-addressbook">
+ type="factory"
+ location="OAFIID:GNOME_Evolution_Addressbook_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/Evolution/ShellComponent:1.0"/>
@@ -79,22 +66,9 @@
</oaf_server>
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressWidgetFactory"
- type="exe"
- location="@LIBEXECDIR@/evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Addressbook's address displayer"/>
-
-</oaf_server>
-
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressWidget"
type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_AddressWidgetFactory">
+ location="OAFIID:GNOME_Evolution_Addressbook_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:BonoboControl/address-widget:1.0"/>
@@ -106,22 +80,9 @@
</oaf_server>
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressPopupFactory"
- type="exe"
- location="@LIBEXECDIR@/evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Addressbook's address popup"/>
-
-</oaf_server>
-
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressPopup"
type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_AddressPopupFactory">
+ location="OAFIID:GNOME_Evolution_Addressbook_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:BonoboControl/address-widget:1.0"/>
@@ -133,22 +94,9 @@
</oaf_server>
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_ConfigControlFactory"
- type="exe"
- location="@LIBEXECDIR@/evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/GenericFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the configuration controls for the Evolution Addressbook."/>
-
-</oaf_server>
-
<oaf_server iid="OAFIID:GNOME_Evolution_LDAPStorage_ConfigControl"
type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_ConfigControlFactory">
+ location="OAFIID:GNOME_Evolution_Addressbook_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/Evolution/ConfigControl:1.0"/>
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
index b5ec044cd5..f4e11047b5 100644
--- a/addressbook/gui/component/Makefile.am
+++ b/addressbook/gui/component/Makefile.am
@@ -27,19 +27,19 @@ INCLUDES = \
$(LDAP_CFLAGS) \
$(EVOLUTION_ADDRESSBOOK_CFLAGS)
-libexec_PROGRAMS = \
- evolution-addressbook
+componentdir = $(COMPONENT_DIR)
+component_LTLIBRARIES = libevolution-addressbook.la
-evolution_addressbook_SOURCES = \
+libevolution_addressbook_la_SOURCES = \
addressbook-component.c \
addressbook-component.h \
addressbook-config.c \
addressbook-config.h \
- addressbook-factory.c \
addressbook-storage.c \
addressbook-storage.h \
addressbook.c \
addressbook.h \
+ component-factory.c \
e-cardlist-model.c \
e-cardlist-model.h \
e-address-widget.h \
@@ -47,7 +47,7 @@ evolution_addressbook_SOURCES = \
e-address-popup.h \
e-address-popup.c
-evolution_addressbook_LDADD = \
+libevolution_addressbook_la_LIBADD = \
select-names/libeselectnames.la \
$(top_builddir)/shell/libeshell.la \
$(top_builddir)/addressbook/gui/widgets/libeminicard.a \
@@ -68,6 +68,9 @@ evolution_addressbook_LDADD = \
# not done yet:
# $(top_builddir)/filter/libfilter.la
+
+libevolution_addressbook_la_LDFLAGS = -module -avoid-version
+
# GConf schemas
schemadir = $(GCONF_SCHEMA_FILE_DIR)
@@ -85,7 +88,8 @@ server_in_files = GNOME_Evolution_Addressbook.server.in.in
serverdir = $(libdir)/bonobo/servers
server_DATA = $(server_in_files:.server.in.in=.server)
$(server_in_files:.server.in.in=.server.in): $(server_in_files)
- sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
+ sed -e "s|\@COMPONENTDIR\@|$(componentdir)|" $< > $@
+
@INTLTOOL_SERVER_RULE@
gladedir = $(datadir)/evolution/glade
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index d727e9ac8e..1d9371fdc8 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -33,8 +33,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
+#include <string.h>
+#include <unistd.h>
#include <bonobo/bonobo-generic-factory.h>
+#include <bonobo/bonobo-main.h>
#include "evolution-shell-component.h"
#include "evolution-shell-component-dnd.h"
@@ -96,7 +99,7 @@ create_view (EvolutionShellComponent *shell_component,
if (!IS_CONTACT_TYPE (type))
return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
- control = addressbook_factory_new_control ();
+ control = addressbook_new_control ();
bonobo_control_set_property (control, NULL, "folder_uri", TC_CORBA_string, physical_uri, NULL);
*control_return = control;
@@ -372,8 +375,6 @@ owner_set_cb (EvolutionShellComponent *shell_component,
if (global_shell_client == NULL)
global_shell_client = shell_client;
- addressbook_config_register_factory (evolution_shell_client_corba_objref (shell_client));
-
addressbook_storage_setup (shell_component, evolution_homedir);
}
@@ -620,24 +621,10 @@ ensure_completion_uris_exist()
}
-/* FIXME this should probably be renamed as we don't use factories anymore. */
-void
-addressbook_component_factory_init (void)
+/* FIXME this is wrong. */
+BonoboObject *
+addressbook_component_init (void)
{
- BonoboObject *object;
- int result;
-
- object = create_component ();
-
- /* FIXME: Handle errors better? */
-
- result = bonobo_activation_active_server_register (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID,
- bonobo_object_corba_objref (object));
- if (result == Bonobo_ACTIVATION_REG_ERROR)
- g_error ("Cannot register -- %s", GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID);
-
- /* XXX this could probably go someplace else, but I'll leave
- it here for now since it's a component init time
- operation. */
ensure_completion_uris_exist ();
+ return create_component ();
}
diff --git a/addressbook/gui/component/addressbook-component.h b/addressbook/gui/component/addressbook-component.h
index 9b36873902..4c6f0cdd8b 100644
--- a/addressbook/gui/component/addressbook-component.h
+++ b/addressbook/gui/component/addressbook-component.h
@@ -26,7 +26,7 @@
#include "evolution-shell-component.h"
#include "evolution-storage.h"
-void addressbook_component_factory_init (void);
+BonoboObject *addressbook_component_init (void);
EvolutionShellClient *addressbook_component_get_shell_client (void);
#endif /* _ADDRESSBOOK_COMPONENT_H */
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index 3cf0cd2a62..b30f400250 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -26,6 +26,7 @@
#include <glade/glade.h>
#include "addressbook.h"
+#include "addressbook-component.h"
#include "addressbook-config.h"
#include "addressbook-storage.h"
@@ -1673,45 +1674,16 @@ ldap_config_control_new (GNOME_Evolution_Shell shell)
}
-/* Implementation of the factory for the configuration control. */
-
-static BonoboGenericFactory *factory = NULL;
-
-static BonoboObject *
-config_control_factory_fn (BonoboGenericFactory *factory,
- const char *component_id,
- void *data)
+BonoboControl *
+addressbook_config_control_new (void)
{
GNOME_Evolution_Shell shell;
- EvolutionConfigControl *control;
-
- shell = (GNOME_Evolution_Shell) data;
- if (!strcmp (component_id, LDAP_CONFIG_CONTROL_ID)) {
- control = ldap_config_control_new (shell);
- } else {
- control = NULL;
- g_assert_not_reached ();
- }
-
- return BONOBO_OBJECT (control);
-}
-
-gboolean
-addressbook_config_register_factory (GNOME_Evolution_Shell shell)
-{
- g_return_val_if_fail (shell != CORBA_OBJECT_NIL, FALSE);
-
- factory = bonobo_generic_factory_new (CONFIG_CONTROL_FACTORY_ID,
- config_control_factory_fn,
- shell);
+ shell = BONOBO_OBJREF (addressbook_component_get_shell_client ());
+ if (! shell)
+ return NULL;
- if (factory != NULL) {
- return TRUE;
- } else {
- g_warning ("Cannot register factory %s", CONFIG_CONTROL_FACTORY_ID);
- return FALSE;
- }
+ return BONOBO_CONTROL (ldap_config_control_new (shell));
}
void
diff --git a/addressbook/gui/component/addressbook-config.h b/addressbook/gui/component/addressbook-config.h
index 668c55bbd3..89d3a411a0 100644
--- a/addressbook/gui/component/addressbook-config.h
+++ b/addressbook/gui/component/addressbook-config.h
@@ -27,9 +27,8 @@
#include "addressbook-storage.h"
-void addressbook_config_create_new_source (const char *new_source,
- GtkWidget *parent);
-
-gboolean addressbook_config_register_factory (GNOME_Evolution_Shell shell);
+BonoboControl *addressbook_config_control_new (void);
+void addressbook_config_create_new_source (const char *new_source,
+ GtkWidget *parent);
#endif /* __ADDRESSBOOK_CONFIG_H__ */
diff --git a/addressbook/gui/component/addressbook-factory.c b/addressbook/gui/component/addressbook-factory.c
deleted file mode 100644
index 506a7ebdc5..0000000000
--- a/addressbook/gui/component/addressbook-factory.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * sample-control-factory.c
- *
- * Copyright 1999, Ximian, Inc.
- *
- * Author:
- * Nat Friedman (nat@nat.org)
- *
- */
-
-#include <config.h>
-#include <glib.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <bonobo/bonobo-main.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-cursors.h>
-#include <e-util/e-passwords.h>
-
-#include <camel/camel.h>
-
-#include "addressbook.h"
-#include "addressbook-component.h"
-#include "e-address-widget.h"
-#include "e-address-popup.h"
-#include "addressbook/gui/widgets/e-minicard-control.h"
-#include "select-names/e-select-names-factory.h"
-
-int
-main (int argc, char **argv)
-{
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- free (malloc (5));
-
- gnome_program_init ("evolution-addressbook", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- NULL);
-
- /* FIXME: Messy names here. This file should be `main.c'. `addressbook.c' should
- be `addressbook-control-factory.c' and the functions should be called
- `addressbook_control_factory_something()'. And `addressbook-component.c'
- should be `addressbook-component-factory.c'. */
-
- addressbook_factory_init ();
- addressbook_component_factory_init ();
-
- e_select_names_factory_init ();
-
- e_minicard_control_factory_init ();
-
- e_address_widget_factory_init ();
- e_address_popup_factory_init ();
-
- glade_gnome_init ();
- e_cursors_init();
-
- e_passwords_init("Addressbook");
-
-#if 0
- g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
-#endif
-
- /*g_thread_init (NULL);*/
- camel_type_init ();
-
- gtk_widget_push_visual (gdk_rgb_get_visual ());
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
- g_print ("Evolution Addressbook up and running\n");
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c
index f83ffc4b70..4cf66bca00 100644
--- a/addressbook/gui/component/addressbook-storage.c
+++ b/addressbook/gui/component/addressbook-storage.c
@@ -47,6 +47,9 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
#include <glib.h>
#include <gtk/gtk.h>
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 19c7b9c91a..03f4e432cb 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -1,11 +1,23 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * addressbook.c:
+/* addressbook.c
*
- * Author:
- * Chris Lahey (clahey@ximian.com)
+ * Copyright (C) 2000, 2001, 2002 Ximian, Inc.
*
- * (C) 2000 Ximian, Inc.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Chris Lahey (clahey@ximian.com)
*/
#include <config.h>
@@ -1089,7 +1101,7 @@ connect_master_list_changed (AddressbookView *view)
}
BonoboControl *
-addressbook_factory_new_control (void)
+addressbook_new_control (void)
{
AddressbookView *view;
GtkWidget *frame;
@@ -1174,29 +1186,3 @@ addressbook_factory_new_control (void)
return view->control;
}
-
-static BonoboObject *
-addressbook_factory (BonoboGenericFactory *Factory,
- const char *component_id,
- void *closure)
-{
- return BONOBO_OBJECT (addressbook_factory_new_control ());
-}
-
-void
-addressbook_factory_init (void)
-{
- static BonoboGenericFactory *addressbook_control_factory = NULL;
-
- if (addressbook_control_factory != NULL)
- return;
-
- addressbook_control_factory = bonobo_generic_factory_new (
- "OAFIID:GNOME_Evolution_Addressbook_ControlFactory",
- addressbook_factory, NULL);
-
- if (addressbook_control_factory == NULL) {
- g_error ("I could not register a Addressbook factory.");
- }
-}
-
diff --git a/addressbook/gui/component/addressbook.h b/addressbook/gui/component/addressbook.h
index 4caff70201..3524f24b0c 100644
--- a/addressbook/gui/component/addressbook.h
+++ b/addressbook/gui/component/addressbook.h
@@ -12,7 +12,6 @@
gboolean addressbook_load_uri (EBook *book, const char *uri, EBookCallback cb, gpointer closure);
gboolean addressbook_load_default_book (EBook *book, EBookCallback open_response, gpointer closure);
-BonoboControl *addressbook_factory_new_control (void);
-void addressbook_factory_init (void);
+BonoboControl *addressbook_new_control (void);
#endif /* __ADDRESSBOOK_H__ */
diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c
index a0581c6dcf..b913ef0c0a 100644
--- a/addressbook/gui/component/e-address-popup.c
+++ b/addressbook/gui/component/e-address-popup.c
@@ -1218,8 +1218,8 @@ get_prop (BonoboPropertyBag *bag, BonoboArg *arg, guint arg_id, CORBA_Environmen
}
}
-static BonoboControl *
-e_address_popup_factory_new_control (void)
+BonoboControl *
+e_address_popup_new_control (void)
{
BonoboControl *control;
BonoboPropertyBag *bag;
@@ -1254,26 +1254,3 @@ e_address_popup_factory_new_control (void)
return control;
}
-
-static BonoboObject *
-e_address_popup_factory (BonoboGenericFactory *factory,
- const char *component_id,
- gpointer user_data)
-{
- return BONOBO_OBJECT (e_address_popup_factory_new_control ());
-}
-
-void
-e_address_popup_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Addressbook_AddressPopupFactory",
- e_address_popup_factory, NULL);
-
- if (factory == NULL)
- g_error ("I could not register an AddressPopup factory.");
-}
diff --git a/addressbook/gui/component/e-address-popup.h b/addressbook/gui/component/e-address-popup.h
index 0476e52367..b2519b0ee6 100644
--- a/addressbook/gui/component/e-address-popup.h
+++ b/addressbook/gui/component/e-address-popup.h
@@ -80,7 +80,7 @@ void e_address_popup_set_email (EAddressPopup *, const gchar *email);
void e_address_popup_construct (EAddressPopup *);
GtkWidget *e_address_popup_new (void);
-void e_address_popup_factory_init (void);
+BonoboControl *e_address_popup_new_control (void);
G_END_DECLS
diff --git a/addressbook/gui/component/e-address-widget.c b/addressbook/gui/component/e-address-widget.c
index 61b65f9e4f..c601278807 100644
--- a/addressbook/gui/component/e-address-widget.c
+++ b/addressbook/gui/component/e-address-widget.c
@@ -522,7 +522,7 @@ set_prop (BonoboPropertyBag *bag, const BonoboArg *arg, guint arg_id, CORBA_Envi
}
}
-static BonoboControl *
+BonoboControl *
e_address_widget_factory_new_control (void)
{
BonoboControl *control;
@@ -556,27 +556,3 @@ e_address_widget_factory_new_control (void)
return control;
}
-
-static BonoboObject *
-e_address_widget_factory (BonoboGenericFactory *factory,
- const char *component_id,
- gpointer user_data)
-{
- return BONOBO_OBJECT (e_address_widget_factory_new_control ());
-}
-
-void
-e_address_widget_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Addressbook_AddressWidgetFactory",
- e_address_widget_factory, NULL);
-
- if (factory == NULL)
- g_error ("I could not register an AddressWidget factory.");
-}
-
diff --git a/addressbook/gui/component/e-address-widget.h b/addressbook/gui/component/e-address-widget.h
index 337ecf1609..13e4a417d0 100644
--- a/addressbook/gui/component/e-address-widget.h
+++ b/addressbook/gui/component/e-address-widget.h
@@ -75,10 +75,7 @@ void e_address_widget_set_text (EAddressWidget *, const gchar *text);
void e_address_widget_construct (EAddressWidget *);
GtkWidget *e_address_widget_new (void);
-
-void e_address_widget_factory_init (void);
-
-
+BonoboControl *e_address_widget_new_control (void);
G_END_DECLS
diff --git a/addressbook/gui/component/e-cardlist-model.c b/addressbook/gui/component/e-cardlist-model.c
index 9e522e79f1..5635d25f86 100644
--- a/addressbook/gui/component/e-cardlist-model.c
+++ b/addressbook/gui/component/e-cardlist-model.c
@@ -11,6 +11,9 @@
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
+
+#include <string.h>
+
#include "e-cardlist-model.h"
#define PARENT_TYPE e_table_model_get_type()
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.c b/addressbook/gui/component/select-names/e-select-names-manager.c
index c994bc1c3c..f127532c0a 100644
--- a/addressbook/gui/component/select-names/e-select-names-manager.c
+++ b/addressbook/gui/component/select-names/e-select-names-manager.c
@@ -169,7 +169,7 @@ focus_in_cb (GtkWidget *w, GdkEventFocus *ev, gpointer user_data)
ESelectNamesManagerEntry *entry = user_data;
if (entry->cleaning_tag) {
- gtk_timeout_remove (entry->cleaning_tag);
+ g_source_remove (entry->cleaning_tag);
entry->cleaning_tag = 0;
}
@@ -558,7 +558,7 @@ e_select_names_manager_create_entry (ESelectNamesManager *manager, const char *i
static void
e_select_names_response(ESelectNames *dialog, gint response_id, ESelectNamesManager *manager)
{
- gtk_widget_destroy (GTK_DIALOG (dialog));
+ gtk_widget_destroy (GTK_WIDGET (dialog));
switch(response_id) {
case GTK_RESPONSE_OK:
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
index 54186ee16b..bed94290ae 100644
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ b/addressbook/gui/component/select-names/e-select-names.c
@@ -291,7 +291,6 @@ 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));
@@ -712,7 +711,6 @@ e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, E
GtkTable *table;
char *label_text;
ETable *etable;
- PangoLayout *layout;
GtkWidget *sw;
GtkWidget *recipient_table;
diff --git a/addressbook/gui/widgets/e-minicard-control.c b/addressbook/gui/widgets/e-minicard-control.c
index 278cfa0120..d606cd8f04 100644
--- a/addressbook/gui/widgets/e-minicard-control.c
+++ b/addressbook/gui/widgets/e-minicard-control.c
@@ -2,10 +2,24 @@
/*
* e-minicard-control.c
*
+ * Copyright (C) 1999, 2000, 2001, 2002, Ximian, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
* Authors:
* Chris Lahey <clahey@ximian.com>
- *
- * Copyright 1999, 2000, Ximian, Inc.
*/
#include <config.h>
@@ -26,9 +40,6 @@
#include "e-minicard-widget.h"
#include "e-card-merging.h"
-#define MINICARD_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control"
-#define MINICARD_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_MiniCard_ControlFactory"
-
typedef struct {
EMinicardWidget *minicard;
GList *card_list;
@@ -272,10 +283,8 @@ free_struct (gpointer data, GObject *where_object_was)
g_free (minicard_control);
}
-static BonoboObject *
-e_minicard_control_factory (BonoboGenericFactory *Factory,
- const char *component_id,
- void *closure)
+BonoboControl *
+e_minicard_control_new (void)
{
#if 0
BonoboPropertyBag *pb;
@@ -342,22 +351,5 @@ e_minicard_control_factory (BonoboGenericFactory *Factory,
bonobo_object_add_interface (BONOBO_OBJECT (control),
BONOBO_OBJECT (stream));
- return BONOBO_OBJECT (control);
-}
-
-void
-e_minicard_control_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory =
- bonobo_generic_factory_new (
- MINICARD_CONTROL_FACTORY_ID,
- e_minicard_control_factory, NULL);
-
- if (factory == NULL)
- g_error ("I could not register a EMinicard control factory.");
+ return control;
}
diff --git a/addressbook/gui/widgets/e-minicard-control.h b/addressbook/gui/widgets/e-minicard-control.h
index 4a0da88435..bc0d934384 100644
--- a/addressbook/gui/widgets/e-minicard-control.h
+++ b/addressbook/gui/widgets/e-minicard-control.h
@@ -3,6 +3,6 @@
#include <bonobo/bonobo-control.h>
-void e_minicard_control_factory_init (void);
+BonoboControl *e_minicard_control_new (void);
#endif /* __E_MINICARD_CONTROL_H__ */