aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2001-09-19 20:47:16 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2001-09-19 20:47:16 +0800
commit85390babb97dabc9e9ad5e878ad0a9d1d49fdc83 (patch)
tree2a3310262808e76f634ac5a1d92531b7ad0513a3
parent9ab4b45c155a49e2109a6dee3a315cce54d3bf16 (diff)
downloadgsoc2013-evolution-85390babb97dabc9e9ad5e878ad0a9d1d49fdc83.tar.gz
gsoc2013-evolution-85390babb97dabc9e9ad5e878ad0a9d1d49fdc83.tar.zst
gsoc2013-evolution-85390babb97dabc9e9ad5e878ad0a9d1d49fdc83.zip
add a new parameter (const char *iid) to specify the OAFIID of the factory
2001-09-19 Rodrigo Moya <rodrigo@ximian.com> * pcs/cal-factory.c (cal_factory_oaf_register): add a new parameter (const char *iid) to specify the OAFIID of the factory being registered svn path=/trunk/; revision=12977
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/pcs/cal-factory.c25
-rw-r--r--calendar/pcs/cal-factory.h2
3 files changed, 27 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 3c725c89da..5ff1568ec3 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-19 Rodrigo Moya <rodrigo@ximian.com>
+
+ * pcs/cal-factory.c (cal_factory_oaf_register): add a new parameter
+ (const char *iid) to specify the OAFIID of the factory being
+ registered
+
2001-09-19 JP Rosevear <jpr@ximian.com>
* gui/e-meeting-model.c (e_meeting_model_refresh_busy_periods):
diff --git a/calendar/pcs/cal-factory.c b/calendar/pcs/cal-factory.c
index 86090fc2bb..00f6d8b6da 100644
--- a/calendar/pcs/cal-factory.c
+++ b/calendar/pcs/cal-factory.c
@@ -30,8 +30,8 @@
#include "cal-factory.h"
#include "job.h"
-#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
-#define CAL_FACTORY_OAF_ID "OAFIID:GNOME_Evolution_Wombat_CalendarFactory"
+#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
+#define DEFAULT_CAL_FACTORY_OAF_ID "OAFIID:GNOME_Evolution_Wombat_CalendarFactory"
static BonoboXObjectClass *parent_class;
@@ -43,6 +43,9 @@ struct _CalFactoryPrivate {
/* Hash table from GnomeVFSURI structures to CalBackend objects */
GHashTable *backends;
+ /* OAFIID of the factory */
+ char *iid;
+
/* Whether we have been registered with OAF yet */
guint registered : 1;
};
@@ -469,9 +472,10 @@ cal_factory_destroy (GtkObject *object)
priv->backends = NULL;
if (priv->registered) {
- oaf_active_server_unregister (CAL_FACTORY_OAF_ID, BONOBO_OBJREF (factory));
+ oaf_active_server_unregister (priv->iid, BONOBO_OBJREF (factory));
priv->registered = FALSE;
}
+ g_free (priv->iid);
g_free (priv);
factory->priv = NULL;
@@ -543,6 +547,7 @@ str_tolower (const char *s)
/**
* cal_factory_oaf_register:
* @factory: A calendar factory.
+ * @iid: OAFIID for the factory to be registered.
*
* Registers a calendar factory with the OAF object activation daemon. This
* function must be called before any clients can activate the factory.
@@ -550,10 +555,11 @@ str_tolower (const char *s)
* Return value: TRUE on success, FALSE otherwise.
**/
gboolean
-cal_factory_oaf_register (CalFactory *factory)
+cal_factory_oaf_register (CalFactory *factory, const char *iid)
{
CalFactoryPrivate *priv;
OAF_RegistrationResult result;
+ char *tmp_iid;
g_return_val_if_fail (factory != NULL, FALSE);
g_return_val_if_fail (IS_CAL_FACTORY (factory), FALSE);
@@ -562,11 +568,18 @@ cal_factory_oaf_register (CalFactory *factory)
g_return_val_if_fail (!priv->registered, FALSE);
- result = oaf_active_server_register (CAL_FACTORY_OAF_ID, BONOBO_OBJREF (factory));
+ /* if iid is NULL, use the default factory OAFIID */
+ if (iid)
+ tmp_iid = g_strdup (iid);
+ else
+ tmp_iid = g_strdup (DEFAULT_CAL_FACTORY_OAF_ID);
+
+ result = oaf_active_server_register (tmp_iid, BONOBO_OBJREF (factory));
switch (result) {
case OAF_REG_SUCCESS:
priv->registered = TRUE;
+ priv->iid = tmp_iid;
return TRUE;
case OAF_REG_NOT_LISTED:
@@ -586,6 +599,8 @@ cal_factory_oaf_register (CalFactory *factory)
break;
}
+ g_free (tmp_iid);
+
return FALSE;
}
diff --git a/calendar/pcs/cal-factory.h b/calendar/pcs/cal-factory.h
index 008fc2c36d..434cb56f81 100644
--- a/calendar/pcs/cal-factory.h
+++ b/calendar/pcs/cal-factory.h
@@ -62,7 +62,7 @@ struct _CalFactoryClass {
GtkType cal_factory_get_type (void);
CalFactory *cal_factory_new (void);
-gboolean cal_factory_oaf_register (CalFactory *factory);
+gboolean cal_factory_oaf_register (CalFactory *factory, const char *iid);
void cal_factory_register_method (CalFactory *factory,
const char *method,
GtkType backend_type);
'>| | | | to GCC 4.8.3. Part II, Bump PORTREVISIONs. PR: 192025 Tested by: antoine (-exp runs) Approved by: portmgr (implicit) * Upgrade OpenEXR and ilmbase to 2.2.0.mandree2014-08-161-1/+1 | | | | | | | | | | | | | | | | | | | GCC 4.2 in FreeBSD 8.X/9.X base is now too old to compile OpenEXR, so GCC-based systems will upgrade to the default ports compiler (GCC 4.7 currently.) Add two patches to OpenEXR to permit building it in a live system with the older OpenEXR version installed. Bug report filed to upstream Github at https://github.com/openexr/openexr/issues/130 Couple OpenEXR more tightly to ilmbase and require its exact .so version. Add UPDATING note, and bump PORTREVISION of all dependent ports. Proto-STAGE hugin-devel, and mark it IGNORE because hugin is newer. Approved by: portmgr (implicit for bumping PORTREVISION on unstaged ports) * - Bump PORTREVISION after KDE4_PREFIX changemakc2014-02-181-0/+1 | * - Update to digiKam and Kipi Plugins ports to 3.5.0makc2014-01-221-2/+0 | | | | | | | | | | | - Add new kipi-plugin port for jalbumexport - Remove useless LATEST_LINK - Bring stage support - Convert to options helpers, new style LIB_DEPENDS - Add patch to fix linking with libpgf [1] PR: ports/184942 [1] Reported by: Mike Clarke <jmc-freebsd2 at milibyte.co.uk> * - Update graphics/*opencv* to 2.4.7jhale2013-12-041-1/+2 | | | | | | | | | | | | | - Revert options helpers to if statements since the OFF condition is not applied when OPTIONS_EXCLUDE is used - Move most of the OpenCV modules from the graphics/opencv-core port to graphics/opencv, leaving opencv-core as just the bare minimum required for building ffmpeg with OpenCV support - Install examples for python and java bindings - Add new slave port graphics/opencv-java: Java bindings for OpenCV - Bump PORTREVISION and make dependency adjustments and fixes for dependent ports - Add UPDATING entry * Add NO_STAGE all over the place in preparation for the staging support (cat: ↵bapt2013-09-211-0/+1 | | | | graphics)