#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
This commit is contained in:
@ -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>
|
2002-12-05 Jeffrey Stedfast <fejj@ximian.com>
|
||||||
|
|
||||||
* gui/component/select-names/e-select-names.etspec: Use collate
|
* gui/component/select-names/e-select-names.etspec: Use collate
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
<oaf_info>
|
<oaf_info>
|
||||||
|
|
||||||
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_MiniCard_ControlFactory"
|
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Factory"
|
||||||
type="exe"
|
type="shlib"
|
||||||
location="@LIBEXECDIR@/evolution-addressbook">
|
location="@COMPONENTDIR@/libevolution-addressbook.so">
|
||||||
|
|
||||||
<oaf_attribute name="repo_ids" type="stringv">
|
<oaf_attribute name="repo_ids" type="stringv">
|
||||||
<item value="IDL:GNOME/ObjectFactory:1.0"/>
|
<item value="IDL:GNOME/ObjectFactory:1.0"/>
|
||||||
</oaf_attribute>
|
</oaf_attribute>
|
||||||
|
|
||||||
<oaf_attribute name="description" type="string"
|
<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>
|
||||||
|
|
||||||
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control"
|
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control"
|
||||||
type="factory"
|
type="factory"
|
||||||
location="OAFIID:GNOME_Evolution_Addressbook_MiniCard_ControlFactory">
|
location="OAFIID:GNOME_Evolution_Addressbook_Factory">
|
||||||
|
|
||||||
<oaf_attribute name="repo_ids" type="stringv">
|
<oaf_attribute name="repo_ids" type="stringv">
|
||||||
<item value="IDL:Bonobo/Control:1.0"/>
|
<item value="IDL:Bonobo/Control:1.0"/>
|
||||||
@ -34,22 +34,9 @@
|
|||||||
|
|
||||||
</oaf_server>
|
</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"
|
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Control"
|
||||||
type="factory"
|
type="factory"
|
||||||
location="OAFIID:GNOME_Evolution_Addressbook_ControlFactory">
|
location="OAFIID:GNOME_Evolution_Addressbook_Factory">
|
||||||
|
|
||||||
<oaf_attribute name="repo_ids" type="stringv">
|
<oaf_attribute name="repo_ids" type="stringv">
|
||||||
<item value="IDL:BonoboControl/addressbook-control:1.0"/>
|
<item value="IDL:BonoboControl/addressbook-control:1.0"/>
|
||||||
@ -62,8 +49,8 @@
|
|||||||
</oaf_server>
|
</oaf_server>
|
||||||
|
|
||||||
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_ShellComponent"
|
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_ShellComponent"
|
||||||
type="exe"
|
type="factory"
|
||||||
location="@LIBEXECDIR@/evolution-addressbook">
|
location="OAFIID:GNOME_Evolution_Addressbook_Factory">
|
||||||
|
|
||||||
<oaf_attribute name="repo_ids" type="stringv">
|
<oaf_attribute name="repo_ids" type="stringv">
|
||||||
<item value="IDL:GNOME/Evolution/ShellComponent:1.0"/>
|
<item value="IDL:GNOME/Evolution/ShellComponent:1.0"/>
|
||||||
@ -79,22 +66,9 @@
|
|||||||
|
|
||||||
</oaf_server>
|
</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"
|
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressWidget"
|
||||||
type="factory"
|
type="factory"
|
||||||
location="OAFIID:GNOME_Evolution_Addressbook_AddressWidgetFactory">
|
location="OAFIID:GNOME_Evolution_Addressbook_Factory">
|
||||||
|
|
||||||
<oaf_attribute name="repo_ids" type="stringv">
|
<oaf_attribute name="repo_ids" type="stringv">
|
||||||
<item value="IDL:BonoboControl/address-widget:1.0"/>
|
<item value="IDL:BonoboControl/address-widget:1.0"/>
|
||||||
@ -106,22 +80,9 @@
|
|||||||
|
|
||||||
</oaf_server>
|
</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"
|
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressPopup"
|
||||||
type="factory"
|
type="factory"
|
||||||
location="OAFIID:GNOME_Evolution_Addressbook_AddressPopupFactory">
|
location="OAFIID:GNOME_Evolution_Addressbook_Factory">
|
||||||
|
|
||||||
<oaf_attribute name="repo_ids" type="stringv">
|
<oaf_attribute name="repo_ids" type="stringv">
|
||||||
<item value="IDL:BonoboControl/address-widget:1.0"/>
|
<item value="IDL:BonoboControl/address-widget:1.0"/>
|
||||||
@ -133,22 +94,9 @@
|
|||||||
|
|
||||||
</oaf_server>
|
</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"
|
<oaf_server iid="OAFIID:GNOME_Evolution_LDAPStorage_ConfigControl"
|
||||||
type="factory"
|
type="factory"
|
||||||
location="OAFIID:GNOME_Evolution_Addressbook_ConfigControlFactory">
|
location="OAFIID:GNOME_Evolution_Addressbook_Factory">
|
||||||
|
|
||||||
<oaf_attribute name="repo_ids" type="stringv">
|
<oaf_attribute name="repo_ids" type="stringv">
|
||||||
<item value="IDL:GNOME/Evolution/ConfigControl:1.0"/>
|
<item value="IDL:GNOME/Evolution/ConfigControl:1.0"/>
|
||||||
|
@ -27,19 +27,19 @@ INCLUDES = \
|
|||||||
$(LDAP_CFLAGS) \
|
$(LDAP_CFLAGS) \
|
||||||
$(EVOLUTION_ADDRESSBOOK_CFLAGS)
|
$(EVOLUTION_ADDRESSBOOK_CFLAGS)
|
||||||
|
|
||||||
libexec_PROGRAMS = \
|
componentdir = $(COMPONENT_DIR)
|
||||||
evolution-addressbook
|
component_LTLIBRARIES = libevolution-addressbook.la
|
||||||
|
|
||||||
evolution_addressbook_SOURCES = \
|
libevolution_addressbook_la_SOURCES = \
|
||||||
addressbook-component.c \
|
addressbook-component.c \
|
||||||
addressbook-component.h \
|
addressbook-component.h \
|
||||||
addressbook-config.c \
|
addressbook-config.c \
|
||||||
addressbook-config.h \
|
addressbook-config.h \
|
||||||
addressbook-factory.c \
|
|
||||||
addressbook-storage.c \
|
addressbook-storage.c \
|
||||||
addressbook-storage.h \
|
addressbook-storage.h \
|
||||||
addressbook.c \
|
addressbook.c \
|
||||||
addressbook.h \
|
addressbook.h \
|
||||||
|
component-factory.c \
|
||||||
e-cardlist-model.c \
|
e-cardlist-model.c \
|
||||||
e-cardlist-model.h \
|
e-cardlist-model.h \
|
||||||
e-address-widget.h \
|
e-address-widget.h \
|
||||||
@ -47,7 +47,7 @@ evolution_addressbook_SOURCES = \
|
|||||||
e-address-popup.h \
|
e-address-popup.h \
|
||||||
e-address-popup.c
|
e-address-popup.c
|
||||||
|
|
||||||
evolution_addressbook_LDADD = \
|
libevolution_addressbook_la_LIBADD = \
|
||||||
select-names/libeselectnames.la \
|
select-names/libeselectnames.la \
|
||||||
$(top_builddir)/shell/libeshell.la \
|
$(top_builddir)/shell/libeshell.la \
|
||||||
$(top_builddir)/addressbook/gui/widgets/libeminicard.a \
|
$(top_builddir)/addressbook/gui/widgets/libeminicard.a \
|
||||||
@ -68,6 +68,9 @@ evolution_addressbook_LDADD = \
|
|||||||
# not done yet:
|
# not done yet:
|
||||||
# $(top_builddir)/filter/libfilter.la
|
# $(top_builddir)/filter/libfilter.la
|
||||||
|
|
||||||
|
|
||||||
|
libevolution_addressbook_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
# GConf schemas
|
# GConf schemas
|
||||||
|
|
||||||
schemadir = $(GCONF_SCHEMA_FILE_DIR)
|
schemadir = $(GCONF_SCHEMA_FILE_DIR)
|
||||||
@ -85,7 +88,8 @@ server_in_files = GNOME_Evolution_Addressbook.server.in.in
|
|||||||
serverdir = $(libdir)/bonobo/servers
|
serverdir = $(libdir)/bonobo/servers
|
||||||
server_DATA = $(server_in_files:.server.in.in=.server)
|
server_DATA = $(server_in_files:.server.in.in=.server)
|
||||||
$(server_in_files:.server.in.in=.server.in): $(server_in_files)
|
$(server_in_files:.server.in.in=.server.in): $(server_in_files)
|
||||||
sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@
|
sed -e "s|\@COMPONENTDIR\@|$(componentdir)|" $< > $@
|
||||||
|
|
||||||
@INTLTOOL_SERVER_RULE@
|
@INTLTOOL_SERVER_RULE@
|
||||||
|
|
||||||
gladedir = $(datadir)/evolution/glade
|
gladedir = $(datadir)/evolution/glade
|
||||||
|
@ -33,8 +33,11 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <bonobo/bonobo-generic-factory.h>
|
#include <bonobo/bonobo-generic-factory.h>
|
||||||
|
#include <bonobo/bonobo-main.h>
|
||||||
|
|
||||||
#include "evolution-shell-component.h"
|
#include "evolution-shell-component.h"
|
||||||
#include "evolution-shell-component-dnd.h"
|
#include "evolution-shell-component-dnd.h"
|
||||||
@ -96,7 +99,7 @@ create_view (EvolutionShellComponent *shell_component,
|
|||||||
if (!IS_CONTACT_TYPE (type))
|
if (!IS_CONTACT_TYPE (type))
|
||||||
return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
|
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);
|
bonobo_control_set_property (control, NULL, "folder_uri", TC_CORBA_string, physical_uri, NULL);
|
||||||
|
|
||||||
*control_return = control;
|
*control_return = control;
|
||||||
@ -372,8 +375,6 @@ owner_set_cb (EvolutionShellComponent *shell_component,
|
|||||||
if (global_shell_client == NULL)
|
if (global_shell_client == NULL)
|
||||||
global_shell_client = shell_client;
|
global_shell_client = shell_client;
|
||||||
|
|
||||||
addressbook_config_register_factory (evolution_shell_client_corba_objref (shell_client));
|
|
||||||
|
|
||||||
addressbook_storage_setup (shell_component, evolution_homedir);
|
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. */
|
/* FIXME this is wrong. */
|
||||||
void
|
BonoboObject *
|
||||||
addressbook_component_factory_init (void)
|
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 ();
|
ensure_completion_uris_exist ();
|
||||||
|
return create_component ();
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "evolution-shell-component.h"
|
#include "evolution-shell-component.h"
|
||||||
#include "evolution-storage.h"
|
#include "evolution-storage.h"
|
||||||
|
|
||||||
void addressbook_component_factory_init (void);
|
BonoboObject *addressbook_component_init (void);
|
||||||
EvolutionShellClient *addressbook_component_get_shell_client (void);
|
EvolutionShellClient *addressbook_component_get_shell_client (void);
|
||||||
|
|
||||||
#endif /* _ADDRESSBOOK_COMPONENT_H */
|
#endif /* _ADDRESSBOOK_COMPONENT_H */
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <glade/glade.h>
|
#include <glade/glade.h>
|
||||||
|
|
||||||
#include "addressbook.h"
|
#include "addressbook.h"
|
||||||
|
#include "addressbook-component.h"
|
||||||
#include "addressbook-config.h"
|
#include "addressbook-config.h"
|
||||||
#include "addressbook-storage.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. */
|
BonoboControl *
|
||||||
|
addressbook_config_control_new (void)
|
||||||
static BonoboGenericFactory *factory = NULL;
|
|
||||||
|
|
||||||
static BonoboObject *
|
|
||||||
config_control_factory_fn (BonoboGenericFactory *factory,
|
|
||||||
const char *component_id,
|
|
||||||
void *data)
|
|
||||||
{
|
{
|
||||||
GNOME_Evolution_Shell shell;
|
GNOME_Evolution_Shell shell;
|
||||||
EvolutionConfigControl *control;
|
|
||||||
|
|
||||||
shell = (GNOME_Evolution_Shell) data;
|
shell = BONOBO_OBJREF (addressbook_component_get_shell_client ());
|
||||||
|
if (! shell)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!strcmp (component_id, LDAP_CONFIG_CONTROL_ID)) {
|
return BONOBO_CONTROL (ldap_config_control_new (shell));
|
||||||
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);
|
|
||||||
|
|
||||||
if (factory != NULL) {
|
|
||||||
return TRUE;
|
|
||||||
} else {
|
|
||||||
g_warning ("Cannot register factory %s", CONFIG_CONTROL_FACTORY_ID);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -27,9 +27,8 @@
|
|||||||
|
|
||||||
#include "addressbook-storage.h"
|
#include "addressbook-storage.h"
|
||||||
|
|
||||||
|
BonoboControl *addressbook_config_control_new (void);
|
||||||
void addressbook_config_create_new_source (const char *new_source,
|
void addressbook_config_create_new_source (const char *new_source,
|
||||||
GtkWidget *parent);
|
GtkWidget *parent);
|
||||||
|
|
||||||
gboolean addressbook_config_register_factory (GNOME_Evolution_Shell shell);
|
|
||||||
|
|
||||||
#endif /* __ADDRESSBOOK_CONFIG_H__ */
|
#endif /* __ADDRESSBOOK_CONFIG_H__ */
|
||||||
|
@ -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;
|
|
||||||
}
|
|
@ -47,6 +47,9 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
@ -1,11 +1,23 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
||||||
/*
|
/* addressbook.c
|
||||||
* addressbook.c:
|
|
||||||
*
|
*
|
||||||
* Author:
|
* Copyright (C) 2000, 2001, 2002 Ximian, Inc.
|
||||||
* Chris Lahey (clahey@ximian.com)
|
|
||||||
*
|
*
|
||||||
* (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>
|
#include <config.h>
|
||||||
@ -1089,7 +1101,7 @@ connect_master_list_changed (AddressbookView *view)
|
|||||||
}
|
}
|
||||||
|
|
||||||
BonoboControl *
|
BonoboControl *
|
||||||
addressbook_factory_new_control (void)
|
addressbook_new_control (void)
|
||||||
{
|
{
|
||||||
AddressbookView *view;
|
AddressbookView *view;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
@ -1174,29 +1186,3 @@ addressbook_factory_new_control (void)
|
|||||||
|
|
||||||
return view->control;
|
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.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
gboolean addressbook_load_uri (EBook *book, const char *uri, EBookCallback cb, gpointer closure);
|
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);
|
gboolean addressbook_load_default_book (EBook *book, EBookCallback open_response, gpointer closure);
|
||||||
|
|
||||||
BonoboControl *addressbook_factory_new_control (void);
|
BonoboControl *addressbook_new_control (void);
|
||||||
void addressbook_factory_init (void);
|
|
||||||
|
|
||||||
#endif /* __ADDRESSBOOK_H__ */
|
#endif /* __ADDRESSBOOK_H__ */
|
||||||
|
@ -1218,8 +1218,8 @@ get_prop (BonoboPropertyBag *bag, BonoboArg *arg, guint arg_id, CORBA_Environmen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static BonoboControl *
|
BonoboControl *
|
||||||
e_address_popup_factory_new_control (void)
|
e_address_popup_new_control (void)
|
||||||
{
|
{
|
||||||
BonoboControl *control;
|
BonoboControl *control;
|
||||||
BonoboPropertyBag *bag;
|
BonoboPropertyBag *bag;
|
||||||
@ -1254,26 +1254,3 @@ e_address_popup_factory_new_control (void)
|
|||||||
|
|
||||||
return control;
|
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.");
|
|
||||||
}
|
|
||||||
|
@ -80,7 +80,7 @@ void e_address_popup_set_email (EAddressPopup *, const gchar *email);
|
|||||||
void e_address_popup_construct (EAddressPopup *);
|
void e_address_popup_construct (EAddressPopup *);
|
||||||
GtkWidget *e_address_popup_new (void);
|
GtkWidget *e_address_popup_new (void);
|
||||||
|
|
||||||
void e_address_popup_factory_init (void);
|
BonoboControl *e_address_popup_new_control (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -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)
|
e_address_widget_factory_new_control (void)
|
||||||
{
|
{
|
||||||
BonoboControl *control;
|
BonoboControl *control;
|
||||||
@ -556,27 +556,3 @@ e_address_widget_factory_new_control (void)
|
|||||||
|
|
||||||
return control;
|
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.");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -75,10 +75,7 @@ void e_address_widget_set_text (EAddressWidget *, const gchar *text);
|
|||||||
void e_address_widget_construct (EAddressWidget *);
|
void e_address_widget_construct (EAddressWidget *);
|
||||||
GtkWidget *e_address_widget_new (void);
|
GtkWidget *e_address_widget_new (void);
|
||||||
|
|
||||||
|
BonoboControl *e_address_widget_new_control (void);
|
||||||
void e_address_widget_factory_init (void);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
#include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <libxml/xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "e-cardlist-model.h"
|
#include "e-cardlist-model.h"
|
||||||
|
|
||||||
#define PARENT_TYPE e_table_model_get_type()
|
#define PARENT_TYPE e_table_model_get_type()
|
||||||
|
@ -169,7 +169,7 @@ focus_in_cb (GtkWidget *w, GdkEventFocus *ev, gpointer user_data)
|
|||||||
ESelectNamesManagerEntry *entry = user_data;
|
ESelectNamesManagerEntry *entry = user_data;
|
||||||
|
|
||||||
if (entry->cleaning_tag) {
|
if (entry->cleaning_tag) {
|
||||||
gtk_timeout_remove (entry->cleaning_tag);
|
g_source_remove (entry->cleaning_tag);
|
||||||
entry->cleaning_tag = 0;
|
entry->cleaning_tag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ e_select_names_manager_create_entry (ESelectNamesManager *manager, const char *i
|
|||||||
static void
|
static void
|
||||||
e_select_names_response(ESelectNames *dialog, gint response_id, ESelectNamesManager *manager)
|
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) {
|
switch(response_id) {
|
||||||
case GTK_RESPONSE_OK:
|
case GTK_RESPONSE_OK:
|
||||||
|
@ -291,7 +291,6 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n
|
|||||||
ETableModel *without;
|
ETableModel *without;
|
||||||
EAddressbookModel *model;
|
EAddressbookModel *model;
|
||||||
GtkWidget *table;
|
GtkWidget *table;
|
||||||
char *spec;
|
|
||||||
|
|
||||||
model = e_addressbook_model_new ();
|
model = e_addressbook_model_new ();
|
||||||
adapter = E_TABLE_MODEL (e_addressbook_table_adapter_new (model));
|
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;
|
GtkTable *table;
|
||||||
char *label_text;
|
char *label_text;
|
||||||
ETable *etable;
|
ETable *etable;
|
||||||
PangoLayout *layout;
|
|
||||||
|
|
||||||
GtkWidget *sw;
|
GtkWidget *sw;
|
||||||
GtkWidget *recipient_table;
|
GtkWidget *recipient_table;
|
||||||
|
@ -2,10 +2,24 @@
|
|||||||
/*
|
/*
|
||||||
* e-minicard-control.c
|
* 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:
|
* Authors:
|
||||||
* Chris Lahey <clahey@ximian.com>
|
* Chris Lahey <clahey@ximian.com>
|
||||||
*
|
|
||||||
* Copyright 1999, 2000, Ximian, Inc.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@ -26,9 +40,6 @@
|
|||||||
#include "e-minicard-widget.h"
|
#include "e-minicard-widget.h"
|
||||||
#include "e-card-merging.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 {
|
typedef struct {
|
||||||
EMinicardWidget *minicard;
|
EMinicardWidget *minicard;
|
||||||
GList *card_list;
|
GList *card_list;
|
||||||
@ -272,10 +283,8 @@ free_struct (gpointer data, GObject *where_object_was)
|
|||||||
g_free (minicard_control);
|
g_free (minicard_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BonoboObject *
|
BonoboControl *
|
||||||
e_minicard_control_factory (BonoboGenericFactory *Factory,
|
e_minicard_control_new (void)
|
||||||
const char *component_id,
|
|
||||||
void *closure)
|
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
BonoboPropertyBag *pb;
|
BonoboPropertyBag *pb;
|
||||||
@ -342,22 +351,5 @@ e_minicard_control_factory (BonoboGenericFactory *Factory,
|
|||||||
bonobo_object_add_interface (BONOBO_OBJECT (control),
|
bonobo_object_add_interface (BONOBO_OBJECT (control),
|
||||||
BONOBO_OBJECT (stream));
|
BONOBO_OBJECT (stream));
|
||||||
|
|
||||||
return BONOBO_OBJECT (control);
|
return 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.");
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
#include <bonobo/bonobo-control.h>
|
#include <bonobo/bonobo-control.h>
|
||||||
|
|
||||||
void e_minicard_control_factory_init (void);
|
BonoboControl *e_minicard_control_new (void);
|
||||||
|
|
||||||
#endif /* __E_MINICARD_CONTROL_H__ */
|
#endif /* __E_MINICARD_CONTROL_H__ */
|
||||||
|
Reference in New Issue
Block a user