aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-08-05 12:30:33 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-08-05 12:30:33 +0800
commitd682c4f31ee76d09bb11cc06a79aa4522a35f229 (patch)
treea8e90c9fb5fe481e4f771572304465ec95ed78c4
parent324f2b9768e8b30849cea65f640b381f7f7ddfd0 (diff)
downloadgsoc2013-evolution-d682c4f31ee76d09bb11cc06a79aa4522a35f229.tar
gsoc2013-evolution-d682c4f31ee76d09bb11cc06a79aa4522a35f229.tar.gz
gsoc2013-evolution-d682c4f31ee76d09bb11cc06a79aa4522a35f229.tar.bz2
gsoc2013-evolution-d682c4f31ee76d09bb11cc06a79aa4522a35f229.tar.lz
gsoc2013-evolution-d682c4f31ee76d09bb11cc06a79aa4522a35f229.tar.xz
gsoc2013-evolution-d682c4f31ee76d09bb11cc06a79aa4522a35f229.tar.zst
gsoc2013-evolution-d682c4f31ee76d09bb11cc06a79aa4522a35f229.zip
New function to create a factory that creates separate component instances
* e-bonobo-factory-util.c (e_bonobo_generic_factory_multi_display_new): New function to create a factory that creates separate component instances for different displays. svn path=/trunk/; revision=11686
-rw-r--r--e-util/ChangeLog7
-rw-r--r--e-util/Makefile.am90
-rw-r--r--e-util/e-bonobo-factory-util.c54
-rw-r--r--e-util/e-bonobo-factory-util.h33
4 files changed, 140 insertions, 44 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 325e29cb72..a52ca6ce61 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-04 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-bonobo-factory-util.c
+ (e_bonobo_generic_factory_multi_display_new): New function to
+ create a factory that creates separate component instances for
+ different displays.
+
2001-08-03 Christopher James Lahey <clahey@ximian.com>
* e-list-iterator.c (e_list_iterator_next): Made it so that
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 73473d26e7..39ca927a5a 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -2,14 +2,14 @@ SUBDIRS = . ename
imagesdir = $(datadir)/images/evolution
-INCLUDES = \
- $(DB3_CFLAGS) \
- -I$(top_srcdir) \
- $(GNOME_INCLUDEDIR) \
- $(EXTRA_GNOME_CFLAGS) \
- $(BONOBO_CONF_CFLAGS) \
- $(PISOCK_CFLAGS) \
- -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \
+INCLUDES = \
+ $(DB3_CFLAGS) \
+ -I$(top_srcdir) \
+ $(GNOME_INCLUDEDIR) \
+ $(EXTRA_GNOME_CFLAGS) \
+ $(BONOBO_CONF_CFLAGS) \
+ $(PISOCK_CFLAGS) \
+ -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \
-DEVOLUTION_CATEGORY_ICONS=\""$(imagesdir)/categories"\" \
-DG_LOG_DOMAIN=\"e-utils\"
@@ -17,44 +17,46 @@ noinst_LTLIBRARIES = libeutil.la libeutil-static.la \
libeconduit.la libeconduit-static.la \
libedb3util.la
-libeutil_la_SOURCES = \
+libeutil_la_SOURCES = \
+ e-bonobo-factory-util.c \
+ e-bonobo-factory-util.h \
e-categories-master-list-wombat.c \
e-categories-master-list-wombat.h \
- e-categories-config.c \
- e-categories-config.h \
- e-corba-utils.c \
- e-corba-utils.h \
- e-dialog-widgets.c \
- e-dialog-widgets.h \
- e-gtk-utils.c \
- e-gtk-utils.h \
- e-gui-utils.c \
- e-gui-utils.h \
- e-host-utils.c \
- e-host-utils.h \
- e-html-utils.c \
- e-html-utils.h \
- e-iterator.c \
- e-iterator.h \
- e-list-iterator.c \
- e-list-iterator.h \
- e-list.c \
- e-list.h \
- e-memory.c \
- e-memory.h \
- e-msgport.c \
- e-msgport.h \
- e-path.c \
- e-path.h \
- e-request.c \
- e-request.h \
- e-sexp.c \
- e-sexp.h \
- e-time-utils.c \
- e-time-utils.h \
- e-url.c \
- e-url.h \
- md5-utils.c \
+ e-categories-config.c \
+ e-categories-config.h \
+ e-corba-utils.c \
+ e-corba-utils.h \
+ e-dialog-widgets.c \
+ e-dialog-widgets.h \
+ e-gtk-utils.c \
+ e-gtk-utils.h \
+ e-gui-utils.c \
+ e-gui-utils.h \
+ e-host-utils.c \
+ e-host-utils.h \
+ e-html-utils.c \
+ e-html-utils.h \
+ e-iterator.c \
+ e-iterator.h \
+ e-list-iterator.c \
+ e-list-iterator.h \
+ e-list.c \
+ e-list.h \
+ e-memory.c \
+ e-memory.h \
+ e-msgport.c \
+ e-msgport.h \
+ e-path.c \
+ e-path.h \
+ e-request.c \
+ e-request.h \
+ e-sexp.c \
+ e-sexp.h \
+ e-time-utils.c \
+ e-time-utils.h \
+ e-url.c \
+ e-url.h \
+ md5-utils.c \
md5-utils.h
libeutil_la_LIBADD = $(GAL_LIBS)
diff --git a/e-util/e-bonobo-factory-util.c b/e-util/e-bonobo-factory-util.c
new file mode 100644
index 0000000000..9b67f64fd1
--- /dev/null
+++ b/e-util/e-bonobo-factory-util.c
@@ -0,0 +1,54 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-bonobo-factory-util.c
+ *
+ * Copyright (C) 2001 Ximian, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * 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: Ettore Perazzoli
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-bonobo-factory-util.h"
+
+#include <X11/Xlib.h>
+#include <gdk/gdkprivate.h>
+
+
+BonoboGenericFactory *
+e_bonobo_generic_factory_multi_display_new (const char *factory_iid,
+ GnomeFactoryCallback factory_callback,
+ void *factory_callback_data)
+{
+ BonoboGenericFactory *factory;
+ char *registration_id;
+ char *display_string;
+
+ g_return_val_if_fail (factory_iid != NULL, NULL);
+ g_return_val_if_fail (factory_callback != NULL, NULL);
+
+ display_string = DisplayString (gdk_display);
+ registration_id = oaf_make_registration_id (factory_iid, display_string);
+ factory = bonobo_generic_factory_new_multi (registration_id, factory_callback, factory_callback_data);
+
+ g_free (registration_id);
+ XFree (display_string);
+
+ return factory;
+}
diff --git a/e-util/e-bonobo-factory-util.h b/e-util/e-bonobo-factory-util.h
new file mode 100644
index 0000000000..e4aefd1f42
--- /dev/null
+++ b/e-util/e-bonobo-factory-util.h
@@ -0,0 +1,33 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-bonobo-factory-util.h
+ *
+ * Copyright (C) 2001 Ximian, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * 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: Ettore Perazzoli
+ */
+
+#ifndef E_BONOBO_FACTORY_UTIL_H
+#define E_BONOBO_FACTORY_UTIL_H
+
+#include <bonobo/bonobo-generic-factory.h>
+
+BonoboGenericFactory *e_bonobo_generic_factory_multi_display_new (const char *factory_iid,
+ GnomeFactoryCallback factory_callback,
+ void *factory_callback_data);
+
+#endif