libmate-2.0/ 0000755 0466213 0466213 00000000000 12000000166 012623 5 ustar vicodan vicodan libmate-2.0/mate-data/ 0000755 0466213 0466213 00000000000 11776507117 014513 5 ustar vicodan vicodan libmate-2.0/mate-data/gtk2-mate-events.soundlist.in 0000644 0466213 0466213 00000000416 11776507117 022164 0 ustar vicodan vicodan [__section_info__]
_description=User interface events
[clicked]
file=gtk-events/clicked.wav
_description=Click on command button
[activate]
file=gtk-events/activate.wav
_description=Choose menu item
[toggled]
file=gtk-events/toggled.wav
_description=Select check box
libmate-2.0/mate-data/mate-default.xml.in.in 0000644 0466213 0466213 00000000573 11776507117 020624 0 ustar vicodan vicodan
<_name>Default Background
@datadir@/pixmaps/backgrounds/mate/desktop/Stripes.png
zoom
vertical-gradient
#5891BC
#3C8F25
libmate-2.0/mate-data/mate-options.7 0000644 0466213 0466213 00000004403 11776507117 017223 0 ustar vicodan vicodan .\" mate-options.7 - Standard Command Line Options for Mate Programs
.\" Copyright 2002, 2003 Jochen Voss
.\" You may redistribute and modify this manual page
.\" under the terms of the GPL.
.TH mate-options 7 "2003-10-20" "MATE" "Mate User's Manual"
.SH NAME
mate-options \- Standard Command Line Options for MATE Programs
.SH SYNOPSIS
.IR "program " [ "standard options" "] [" "specific options" "] " arguments
.SH DESCRIPTION
This manual page describes the command line options, which are common
to all Mate applications.
.SH OPTIONS
.SS Help options
.TP
\fB-?\fR, \fB\-\-help\fR
Show the applications help message.
.TP
\fB\-\-usage\fR
Display a brief usage message.
.TP
\fB\-\-version\fR
Show the applications's version information.
.SS MateComponent Activation support
.TP
\fB\-\-oaf\-ior\-fd\fR=\fIFD\fR
File descriptor to print IOR on
.TP
\fB\-\-oaf\-activate\-iid\fR=\fIIID\fR
IID to activate
.TP
\fB\-\-oaf\-private\fR
Prevent registering of server with OAF
.SS MATE library options
.TP
\fB\-\-disable\-sound\fR
Disable sound server usage
.TP
\fB\-\-enable\-sound\fR
Enable sound server usage
.TP
\fB\-\-espeaker\fR=\fIHOSTNAME\fR:PORT
.IR Host : port
on which the
.B esd
sound server to use is running. This is useful if you simultaneously
run programs on several machines.
.SS MATE GUI options
.TP
\fB\-\-disable\-crash\-dialog\fR
Disable the crash dialog, which is normally shown when the application
segfaults.
.SS Session management options
.TP
\fB\-\-sm\-client\-id\fR=\fIID\fR
Specify session management ID. Only used by the session manager itself
while restarting the application.
.TP
\fB\-\-sm\-config\-prefix\fR=\fIPREFIX\fR
Specify prefix of saved configuration.
.TP
\fB\-\-sm\-disable\fR
Disable connection to session manager.
.SS Other options
.TP
\fB\-\-load\-modules\fR=\fIMODULE1\fR,MODULE2,...
Dynamic modules to load
.SH "SEE ALSO"
For most MATE programs there will be additional command line options,
which are specific to the program. These will be explained in the
.I Application options
section of the
.I --help
output and in the application's online help.
.SH AUTHOR
This manual page was written by Jochen Voss . A
first version was generated with the help of the
.I help2man
program. The program's output was manually edited later.
libmate-2.0/mate-data/mate.soundlist.in 0000644 0466213 0466213 00000000656 11776507117 020023 0 ustar vicodan vicodan [__section_info__]
_description=System events
[login]
file=startup3.wav
_description=Log in
[logout]
file=shutdown1.wav
_description=Log out
[info]
file=info.wav
_description=Informational message
[warning]
file=warning.wav
_description=Warning message
[error]
file=error.wav
_description=Error message
[question]
file=question.wav
_description=Question dialog
[generic]
file=generic.wav
_description=Miscellaneous message
libmate-2.0/mate-data/Makefile.am 0000644 0466213 0466213 00000001454 11776507117 016553 0 ustar vicodan vicodan soundlistdir = $(sysconfdir)/sound/events
soundlist_in_files = \
mate.soundlist.in \
gtk2-mate-events.soundlist.in
soundlist_DATA = $(soundlist_in_files:.soundlist.in=.soundlist)
man_MANS = mate-options.7
metadata_in_files = mate-default.xml.in
metadatadir = $(datadir)/mate-background-properties
metadata_DATA = $(metadata_in_files:.xml.in=.xml)
mate-default.xml.in: mate-default.xml.in.in Makefile
$(AM_V_GEN) $(SED) -e 's^\@datadir\@^$(datadir)^g' < $(srcdir)/mate-default.xml.in.in > mate-default.xml.in.tmp \
&& mv mate-default.xml.in.tmp mate-default.xml.in
@INTLTOOL_SOUNDLIST_RULE@
@INTLTOOL_XML_RULE@
noinst_DATA = mate-default.xml.in
CLEANFILES = $(soundlist_DATA) mate-default.xml mate-default.xml.in
EXTRA_DIST = $(soundlist_in_files) $(soundlist_DATA) $(man_MANS) mate-default.xml.in.in
libmate-2.0/README 0000644 0466213 0466213 00000000142 11776507117 013533 0 ustar vicodan vicodan This is the non-gui part of the library formerly known as
mate-libs.
This is a fork of libgnome.
libmate-2.0/MAINTAINERS 0000644 0466213 0466213 00000000071 11776507117 014351 0 ustar vicodan vicodan Kjartan Maraas
E-mail: kmaraas@gnome.org
Userid: kmaraas
libmate-2.0/monikers/ 0000755 0466213 0466213 00000000000 11776507117 014505 5 ustar vicodan vicodan libmate-2.0/monikers/matecomponent-moniker-conf-indirect.c 0000644 0466213 0466213 00000002766 11776507117 023721 0 ustar vicodan vicodan /*
* mate-moniker-conf-indirect.c: conf_indirect Moniker implementation
*
* This is the ior (container) based Moniker implementation.
*
* Author:
* Rodrigo Moya (rodrigo@mate-db.org)
*/
#include
#include
#include
#include
#include
#include
#include "matecomponent-moniker-extra.h"
MateComponent_Unknown
matecomponent_moniker_conf_indirect_resolve (MateComponentMoniker *moniker,
const MateComponent_ResolveOptions *options,
const CORBA_char *requested_interface,
CORBA_Environment *ev)
{
const char *key;
char *oiid;
MateComponent_Unknown object;
MateConfClient *conf_client;
GError *err = NULL;
/* retrieve the key contents from MateConf */
key = matecomponent_moniker_get_name (moniker);
if (!mateconf_is_initialized ())
mateconf_init (0, NULL, NULL);
conf_client = mateconf_client_get_default ();
oiid = mateconf_client_get_string (conf_client, key, &err);
g_object_unref (conf_client);
if (!oiid) {
matecomponent_exception_general_error_set (
ev, NULL,
err ? err->message : _("Key %s not found in configuration"), key);
g_error_free (err);
return CORBA_OBJECT_NIL;
}
/* activate the object referenced in the MateConf entry */
object = matecomponent_get_object ((const CORBA_char *) oiid,
requested_interface,
ev);
g_free (oiid);
return object;
}
libmate-2.0/monikers/matecomponent-moniker-extra.c 0000644 0466213 0466213 00000002126 11776507117 022306 0 ustar vicodan vicodan #include "config.h"
#include
#include
#include "matecomponent-moniker-extra.h"
static MateComponentObject *
matecomponent_extra_moniker_factory (MateComponentGenericFactory *this,
const char *object_id,
void *data)
{
g_return_val_if_fail (object_id != NULL, NULL);
if (!strcmp (object_id, "OAFIID:MATE_Moniker_Config")) {
return MATECOMPONENT_OBJECT (matecomponent_moniker_simple_new (
"config:", matecomponent_moniker_config_resolve));
} else if (!strcmp (object_id, "OAFIID:MATE_Moniker_ConfIndirect")) {
return MATECOMPONENT_OBJECT (matecomponent_moniker_simple_new (
"conf_indirect:", matecomponent_moniker_conf_indirect_resolve));
} else
g_warning ("Failing to manufacture a '%s'", object_id);
return NULL;
}
MATECOMPONENT_ACTIVATION_SHLIB_FACTORY ("OAFIID:MATE_Moniker_std_Factory",
"Extra matecomponent moniker",
matecomponent_extra_moniker_factory, NULL)
libmate-2.0/monikers/matecomponent-moniker-config.c 0000644 0466213 0466213 00000002104 11776507117 022424 0 ustar vicodan vicodan /*
* mate-moniker-config.c: MateConf Moniker implementation
*
* This is the MateConf based Moniker implementation.
*
* Author:
* Rodrigo Moya (rodrigo@mate-db.org)
*/
#include
#include
#include "matecomponent-config-bag.h"
#include "matecomponent-moniker-extra.h"
MateComponent_Unknown
matecomponent_moniker_config_resolve (MateComponentMoniker *moniker,
const MateComponent_ResolveOptions *options,
const CORBA_char *requested_interface,
CORBA_Environment *ev)
{
const gchar *name;
name = matecomponent_moniker_get_name (moniker);
if (!strcmp (requested_interface, "IDL:MateComponent/PropertyBag:1.0")) {
MateComponentConfigBag *bag;
bag = matecomponent_config_bag_new (name);
if (bag) {
return (MateComponent_Unknown) CORBA_Object_duplicate (
MATECOMPONENT_OBJREF (bag), ev);
}
matecomponent_exception_set (ev, ex_MateComponent_Moniker_InterfaceNotFound);
}
else
matecomponent_exception_set (ev, ex_MateComponent_Moniker_InterfaceNotFound);
return CORBA_OBJECT_NIL;
}
libmate-2.0/monikers/matecomponent-moniker-extra.h 0000644 0466213 0466213 00000001262 11776507117 022313 0 ustar vicodan vicodan #ifndef _MATECOMPONENT_MONIKER_EXTRA_H_
#define _MATECOMPONENT_MONIKER_EXTRA_H_
#include
#include
MateComponent_Unknown matecomponent_moniker_config_resolve (
MateComponentMoniker *moniker,
const MateComponent_ResolveOptions *options,
const CORBA_char *requested_interface,
CORBA_Environment *ev);
MateComponent_Unknown matecomponent_moniker_conf_indirect_resolve (
MateComponentMoniker *moniker,
const MateComponent_ResolveOptions *options,
const CORBA_char *requested_interface,
CORBA_Environment *ev);
#endif
libmate-2.0/monikers/matecomponent-config-bag.h 0000644 0466213 0466213 00000003354 11776507117 021526 0 ustar vicodan vicodan /**
* matecomponent-config-bag.h: config bag object implementation.
*
* Author:
* Dietmar Maurer (dietmar@ximian.com)
* Rodrigo Moya (rodrigo@ximian.com)
*
* Copyright 2000, 2001 Ximian, Inc.
*/
#ifndef __MATECOMPONENT_CONFIG_BAG_H__
#define __MATECOMPONENT_CONFIG_BAG_H__
#include
#include
#include
#ifdef __cplusplus
extern "C" {
#endif
#define MATECOMPONENT_TYPE_CONFIG_BAG (matecomponent_config_bag_get_type ())
#define MATECOMPONENT_CONFIG_BAG_TYPE MATECOMPONENT_TYPE_CONFIG_BAG // deprecated, you should use MATECOMPONENT_TYPE_CONFIG_BAG
#define MATECOMPONENT_CONFIG_BAG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MATECOMPONENT_TYPE_CONFIG_BAG, MateComponentConfigBag))
#define MATECOMPONENT_CONFIG_BAG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MATECOMPONENT_TYPE_CONFIG_BAG, MateComponentConfigBagClass))
#define MATECOMPONENT_IS_CONFIG_BAG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MATECOMPONENT_TYPE_CONFIG_BAG))
#define MATECOMPONENT_IS_CONFIG_BAG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MATECOMPONENT_TYPE_CONFIG_BAG))
typedef struct _MateComponentConfigBag MateComponentConfigBag;
struct _MateComponentConfigBag {
MateComponentObject base;
gchar *path;
MateComponentEventSource *es;
MateConfClient *conf_client;
};
typedef struct {
MateComponentObjectClass parent_class;
POA_MateComponent_PropertyBag__epv epv;
} MateComponentConfigBagClass;
GType matecomponent_config_bag_get_type (void);
MateComponentConfigBag *matecomponent_config_bag_new (const gchar *path);
#ifdef __cplusplus
}
#endif
#endif /* ! __MATECOMPONENT_CONFIG_BAG_H__ */
libmate-2.0/monikers/MATE_Moniker_std.server.in.in 0000644 0466213 0466213 00000002733 11776507117 022040 0 ustar vicodan vicodan
libmate-2.0/monikers/Makefile.am 0000644 0466213 0466213 00000002037 11776507117 016543 0 ustar vicodan vicodan INCLUDES = \
-I$(top_srcdir) \
$(LIBMATE_CFLAGS) \
-DG_LOG_DOMAIN=\"libmate\" \
-DVERSION=\"$(VERSION)\"
MATE_Moniker_std.server.in: MATE_Moniker_std.server.in.in
$(AM_V_GEN) $(SED) -e "s|\@MONIKER_LIBDIR\@|$(monikerdir_in_server_file)|" \
-e "s|\@SOPREFIX\@|$(SOPREFIX)|" $< > $@
CLEANFILES = MATE_Moniker_std.server MATE_Moniker_std.server.in
serverdir = $(libdir)/matecomponent/servers
server_DATA = MATE_Moniker_std.server
@INTLTOOL_SERVER_RULE@
monikerdir = $(libdir)/matecomponent/monikers
if OS_WIN32
monikerdir_in_server_file = ../monikers
else
monikerdir_in_server_file = $(monikerdir)
endif
moniker_LTLIBRARIES = libmoniker_extra_2.la
libmoniker_extra_2_la_SOURCES = \
matecomponent-config-bag.c \
matecomponent-config-bag.h \
matecomponent-moniker-config.c \
matecomponent-moniker-conf-indirect.c \
matecomponent-moniker-extra.h \
matecomponent-moniker-extra.c
libmoniker_extra_2_la_LDFLAGS = -module -avoid-version -no-undefined
libmoniker_extra_2_la_LIBADD = $(LIBMATE_LIBS)
EXTRA_DIST = MATE_Moniker_std.server.in.in
libmate-2.0/monikers/matecomponent-config-bag.c 0000644 0466213 0466213 00000034366 11776507117 021530 0 ustar vicodan vicodan /**
* matecomponent-config-bag.c: config bag object implementation.
*
* Author:
* Dietmar Maurer (dietmar@ximian.com)
* Rodrigo Moya (rodrigo@ximian.com)
*
* Copyright 2000 Ximian, Inc.
*/
#include
#include
#include
#include
#include
#include
#include
#include "matecomponent-config-bag.h"
#define PARENT_TYPE (MATECOMPONENT_TYPE_OBJECT)
#define GET_BAG_FROM_SERVANT(servant) MATECOMPONENT_CONFIG_BAG (matecomponent_object (servant))
static GObjectClass *parent_class = NULL;
#define CLASS(o) MATECOMPONENT_CONFIG_BAG_CLASS (G_OBJECT_GET_CLASS (o))
static void
matecomponent_config_bag_finalize (GObject *object)
{
MateComponentConfigBag *cb = MATECOMPONENT_CONFIG_BAG (object);
g_free (cb->path);
g_object_unref (cb->conf_client);
parent_class->finalize (object);
}
static MateComponent_KeyList *
impl_MateComponent_PropertyBag_getKeys (PortableServer_Servant servant,
const CORBA_char *filter,
CORBA_Environment *ev)
{
MateComponentConfigBag *cb = GET_BAG_FROM_SERVANT (servant);
char *path;
MateComponent_KeyList *retval;
GSList *slist, *sl;
GError *err = NULL;
int length;
int n;
if (strchr (filter, '/')) {
matecomponent_exception_set (ev, ex_MateComponent_PropertyBag_NotFound);
return NULL;
}
path = g_strconcat (cb->path, "/", filter, NULL);
/* get keys from MateConf */
slist = mateconf_client_all_entries (cb->conf_client, path, &err);
g_free (path);
if (err) {
matecomponent_exception_general_error_set (ev, NULL, "%s", err->message);
g_error_free (err);
return CORBA_OBJECT_NIL;
}
/* create CORBA sequence */
length = g_slist_length (slist);
retval = MateComponent_KeyList__alloc ();
retval->_length = length;
CORBA_sequence_set_release (retval, TRUE);
retval->_buffer = MateComponent_KeyList_allocbuf (length);
for (sl = slist, n = 0; n < length; sl = sl->next, n++) {
MateConfEntry *entry = (MateConfEntry *) sl->data;
const char *entry_name;
entry_name = mateconf_entry_get_key (entry);
retval->_buffer[n] = CORBA_string_dup (entry_name);
}
g_slist_free (slist);
return retval;
}
static CORBA_TypeCode
impl_MateComponent_PropertyBag_getType (PortableServer_Servant servant,
const CORBA_char *key,
CORBA_Environment *ev)
{
MateComponentConfigBag *cb = GET_BAG_FROM_SERVANT (servant);
char *path;
MateConfValue *value;
GError *err = NULL;
if (strchr (key, '/')) {
matecomponent_exception_set (ev, ex_MateComponent_PropertyBag_NotFound);
return CORBA_OBJECT_NIL;
}
path = g_strconcat (cb->path, "/", key, NULL);
/* get type for the given key */
value = mateconf_client_get (cb->conf_client, path, &err);
g_free (path);
if (err) {
matecomponent_exception_general_error_set (ev, NULL, "%s", err->message);
g_error_free (err);
return CORBA_OBJECT_NIL;
}
switch (value->type) {
case MATECONF_VALUE_STRING :
return (CORBA_TypeCode)
CORBA_Object_duplicate ((CORBA_Object) MATECOMPONENT_ARG_STRING, ev);
case MATECONF_VALUE_INT :
return (CORBA_TypeCode)
CORBA_Object_duplicate ((CORBA_Object) MATECOMPONENT_ARG_LONG, ev);
case MATECONF_VALUE_FLOAT :
return (CORBA_TypeCode)
CORBA_Object_duplicate ((CORBA_Object) MATECOMPONENT_ARG_DOUBLE, ev);
case MATECONF_VALUE_BOOL :
return (CORBA_TypeCode)
CORBA_Object_duplicate ((CORBA_Object) MATECOMPONENT_ARG_BOOLEAN, ev);
default :
/* FIXME */
break;
}
return CORBA_OBJECT_NIL;
}
static MateComponentArg*
matecomponent_arg_new_from_mateconf_value (MateConfValue *value)
{
if (value == NULL)
return matecomponent_arg_new (MATECOMPONENT_ARG_NULL);
switch (value->type) {
case MATECONF_VALUE_STRING :
return matecomponent_arg_new_from (MATECOMPONENT_ARG_STRING,
mateconf_value_get_string (value));
case MATECONF_VALUE_INT : {
long v = mateconf_value_get_int (value);
return matecomponent_arg_new_from (MATECOMPONENT_ARG_LONG, &v);
}
case MATECONF_VALUE_FLOAT : {
double v = mateconf_value_get_float (value);
return matecomponent_arg_new_from (MATECOMPONENT_ARG_DOUBLE, &v);
}
case MATECONF_VALUE_BOOL : {
gboolean v = mateconf_value_get_bool (value);
return matecomponent_arg_new_from (MATECOMPONENT_ARG_BOOLEAN, &v);
}
default :
return matecomponent_arg_new (MATECOMPONENT_ARG_NULL);
}
}
static CORBA_any *
impl_MateComponent_PropertyBag_getValue (PortableServer_Servant servant,
const CORBA_char *key,
CORBA_Environment *ev)
{
MateComponentConfigBag *cb = GET_BAG_FROM_SERVANT (servant);
char *path;
MateConfValue *value;
GError *err = NULL;
if (strchr (key, '/')) {
matecomponent_exception_set (ev, ex_MateComponent_PropertyBag_NotFound);
return NULL;
}
path = g_strconcat (cb->path, "/", key, NULL);
value = mateconf_client_get (cb->conf_client, path, &err);
g_free (path);
if (err) {
matecomponent_exception_general_error_set (ev, NULL, "%s", err->message);
g_error_free (err);
return CORBA_OBJECT_NIL;
}
/* FIXME The original code here returned MateComponentArg*
* as a CORBA_any*, is that OK?
*/
return matecomponent_arg_new_from_mateconf_value (value);
}
static void
impl_MateComponent_PropertyBag_setValue (PortableServer_Servant servant,
const CORBA_char *key,
const CORBA_any *value,
CORBA_Environment *ev)
{
MateComponentConfigBag *cb = GET_BAG_FROM_SERVANT (servant);
char *path;
GError *err = NULL;
if (strchr (key, '/')) {
matecomponent_exception_set (ev, ex_MateComponent_PropertyBag_NotFound);
return;
}
path = g_strconcat (cb->path, "/", key, NULL);
if (matecomponent_arg_type_is_equal (value->_type, MATECOMPONENT_ARG_STRING, ev)) {
mateconf_client_set_string (cb->conf_client, path,
MATECOMPONENT_ARG_GET_STRING (value), &err);
}
else if (matecomponent_arg_type_is_equal (value->_type, MATECOMPONENT_ARG_LONG, ev)) {
mateconf_client_set_int (cb->conf_client, path,
MATECOMPONENT_ARG_GET_LONG (value), &err);
}
else if (matecomponent_arg_type_is_equal (value->_type, MATECOMPONENT_ARG_DOUBLE, ev)) {
mateconf_client_set_float (cb->conf_client, path,
MATECOMPONENT_ARG_GET_DOUBLE (value), &err);
}
else if (matecomponent_arg_type_is_equal (value->_type, MATECOMPONENT_ARG_BOOLEAN, ev)) {
mateconf_client_set_bool (cb->conf_client, path,
MATECOMPONENT_ARG_GET_BOOLEAN (value), &err);
}
else if (matecomponent_arg_type_is_equal (value->_type, MATECOMPONENT_ARG_NULL, ev)) {
mateconf_client_unset (cb->conf_client, path, &err);
}
else {
g_free (path);
matecomponent_exception_general_error_set (ev, NULL, _("Unknown type"));
return;
}
g_free (path);
if (err) {
matecomponent_exception_general_error_set (ev, NULL, "%s", err->message);
g_error_free (err);
}
}
static MateComponent_PropertySet *
impl_MateComponent_PropertyBag_getValues (PortableServer_Servant servant,
const CORBA_char *filter,
CORBA_Environment *ev)
{
MateComponentConfigBag *cb = GET_BAG_FROM_SERVANT (servant);
char *path;
MateComponent_PropertySet *retval;
GSList *slist, *sl;
GError *err = NULL;
int length;
int n;
if (strchr (filter, '/')) {
matecomponent_exception_set (ev, ex_MateComponent_PropertyBag_NotFound);
return NULL;
}
path = g_strconcat (cb->path, "/", filter, NULL);
/* get keys from MateConf */
slist = mateconf_client_all_entries (cb->conf_client, path, &err);
g_free (path);
if (err) {
matecomponent_exception_general_error_set (ev, NULL, "%s", err->message);
g_error_free (err);
return CORBA_OBJECT_NIL;
}
/* create CORBA sequence */
length = g_slist_length (slist);
retval = MateComponent_PropertySet__alloc ();
retval->_length = length;
CORBA_sequence_set_release (retval, TRUE);
retval->_buffer = CORBA_sequence_MateComponent_Pair_allocbuf (length);
for (sl = slist, n = 0; n < length; sl = sl->next, n++) {
MateConfEntry *entry = (MateConfEntry *) sl->data;
MateComponentArg *arg;
MateConfValue *value;
retval->_buffer[n].name = CORBA_string_dup (mateconf_entry_get_key (entry));
value = mateconf_entry_get_value (entry);
arg = matecomponent_arg_new_from_mateconf_value (value);
retval->_buffer[n].value = *arg;
}
g_slist_free (slist);
return retval;
}
static void
impl_MateComponent_PropertyBag_setValues (PortableServer_Servant servant,
const MateComponent_PropertySet *set,
CORBA_Environment *ev)
{
int i;
for (i = 0; i < set->_length; i++) {
impl_MateComponent_PropertyBag_setValue (servant,
set->_buffer [i].name,
&set->_buffer [i].value,
ev);
if (MATECOMPONENT_EX (ev))
return;
}
}
static CORBA_any *
impl_MateComponent_PropertyBag_getDefault (PortableServer_Servant servant,
const CORBA_char *key,
CORBA_Environment *ev)
{
MateComponentConfigBag *cb = GET_BAG_FROM_SERVANT (servant);
char *path;
MateConfValue *value;
GError *err = NULL;
if (strchr (key, '/')) {
matecomponent_exception_set (ev, ex_MateComponent_PropertyBag_NotFound);
return NULL;
}
path = g_strconcat (cb->path, "/", key, NULL);
value = mateconf_client_get_default_from_schema (cb->conf_client, path, &err);
g_free (path);
if (err) {
matecomponent_exception_general_error_set (ev, NULL, "%s", err->message);
g_error_free (err);
return CORBA_OBJECT_NIL;
}
return matecomponent_arg_new_from_mateconf_value (value);
}
static CORBA_char *
impl_MateComponent_PropertyBag_getDocTitle (PortableServer_Servant servant,
const CORBA_char *key,
CORBA_Environment *ev)
{
MateComponentConfigBag *cb = GET_BAG_FROM_SERVANT (servant);
char *path;
CORBA_char *retval;
MateConfSchema *schema;
GError *err = NULL;
if (strchr (key, '/')) {
matecomponent_exception_set (ev, ex_MateComponent_PropertyBag_NotFound);
return NULL;
}
path = g_strconcat (cb->path, "/", key, NULL);
schema = mateconf_client_get_schema (cb->conf_client, path, &err);
g_free (path);
if (err) {
matecomponent_exception_general_error_set (ev, NULL, "%s", err->message);
g_error_free (err);
return NULL;
}
retval = CORBA_string_dup (mateconf_schema_get_short_desc (schema));
mateconf_schema_free (schema);
return retval;
}
static CORBA_char *
impl_MateComponent_PropertyBag_getDoc (PortableServer_Servant servant,
const CORBA_char *key,
CORBA_Environment *ev)
{
MateComponentConfigBag *cb = GET_BAG_FROM_SERVANT (servant);
char *path;
CORBA_char *retval;
MateConfSchema *schema;
GError *err = NULL;
if (strchr (key, '/')) {
matecomponent_exception_set (ev, ex_MateComponent_PropertyBag_NotFound);
return NULL;
}
path = g_strconcat (cb->path, "/", key, NULL);
schema = mateconf_client_get_schema (cb->conf_client, path, &err);
g_free (path);
if (err) {
matecomponent_exception_general_error_set (ev, NULL, "%s", err->message);
g_error_free (err);
return NULL;
}
retval = CORBA_string_dup (mateconf_schema_get_long_desc (schema));
mateconf_schema_free (schema);
return retval;
}
static MateComponent_PropertyFlags
impl_MateComponent_PropertyBag_getFlags (PortableServer_Servant servant,
const CORBA_char *key,
CORBA_Environment *ev)
{
MateComponentConfigBag *cb = GET_BAG_FROM_SERVANT (servant);
char *path;
MateComponent_PropertyFlags retval = 0;
MateConfEntry *entry;
GError *err = NULL;
if (strchr (key, '/')) {
matecomponent_exception_set (ev, ex_MateComponent_PropertyBag_NotFound);
return 0;
}
path = g_strconcat (cb->path, "/", key, NULL);
entry = mateconf_client_get_entry (cb->conf_client, path, NULL, TRUE, &err);
g_free (path);
if (err) {
matecomponent_exception_general_error_set (ev, NULL, "%s", err->message);
g_error_free (err);
return 0;
}
retval |= MateComponent_PROPERTY_READABLE;
if (mateconf_entry_get_is_writable (entry))
retval |= MateComponent_PROPERTY_WRITEABLE;
mateconf_entry_free (entry);
return retval;
}
MateComponentConfigBag *
matecomponent_config_bag_new (const gchar *path)
{
MateComponentConfigBag *cb;
char *m;
int l;
g_return_val_if_fail (path != NULL, NULL);
cb = g_object_new (MATECOMPONENT_TYPE_CONFIG_BAG, NULL);
if (path[0] == '/')
cb->path = g_strdup (path);
else
cb->path = g_strconcat ("/", path, NULL);
while ((l = strlen (cb->path)) > 1 && path [l - 1] == '/')
cb->path [l] = '\0';
cb->es = matecomponent_event_source_new ();
matecomponent_object_add_interface (MATECOMPONENT_OBJECT (cb),
MATECOMPONENT_OBJECT (cb->es));
m = g_strconcat ("MateComponent/ConfigDatabase:change", cb->path, ":", NULL);
/* matecomponent_event_source_client_add_listener (db, notify_cb, m, NULL, cb); */
g_free (m);
/* initialize MateConf client */
if (!mateconf_is_initialized ())
mateconf_init (0, NULL, NULL);
cb->conf_client = mateconf_client_get_default ();
return cb;
}
static void
matecomponent_config_bag_class_init (MateComponentConfigBagClass *class)
{
GObjectClass *object_class = (GObjectClass *) class;
POA_MateComponent_PropertyBag__epv *epv= &class->epv;
parent_class = g_type_class_peek_parent (class);
object_class->finalize = matecomponent_config_bag_finalize;
epv->getKeys = impl_MateComponent_PropertyBag_getKeys;
epv->getType = impl_MateComponent_PropertyBag_getType;
epv->getValue = impl_MateComponent_PropertyBag_getValue;
epv->setValue = impl_MateComponent_PropertyBag_setValue;
epv->getValues = impl_MateComponent_PropertyBag_getValues;
epv->setValues = impl_MateComponent_PropertyBag_setValues;
epv->getDefault = impl_MateComponent_PropertyBag_getDefault;
epv->getDocTitle = impl_MateComponent_PropertyBag_getDocTitle;
epv->getDoc = impl_MateComponent_PropertyBag_getDoc;
epv->getFlags = impl_MateComponent_PropertyBag_getFlags;
}
static void
matecomponent_config_bag_init (MateComponentConfigBag *cb)
{
/* nothing to do */
}
MATECOMPONENT_TYPE_FUNC_FULL (MateComponentConfigBag,
MateComponent_PropertyBag,
PARENT_TYPE,
matecomponent_config_bag);
libmate-2.0/libmate-zip.in 0000755 0466213 0466213 00000003220 11776507117 015423 0 ustar vicodan vicodan #!/bin/sh
# Build zipfiles for libmate on Win32. Separate runtime and developer
# ones. Run after make install.
ZIP=/tmp/libmate-@VERSION@.zip
DEVZIP=/tmp/libmate-dev-@VERSION@.zip
cd @prefix@
rm $ZIP
zip $ZIP -@ <