[monkey-bubble: 683/753] Going back to the state of libgnome 1.102.0 so that we're in API frozen state again.
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 683/753] Going back to the state of libgnome 1.102.0 so that we're in API frozen state again.
- Date: Wed, 14 Jul 2010 22:53:06 +0000 (UTC)
commit b0bd52947e36a91adaef0fba59b0fabb02253f51
Author: Martin Baulig <martin src gnome org>
Date: Tue Aug 28 09:18:18 2001 +0000
Going back to the state of libgnome 1.102.0 so that we're in API frozen
state again.
ChangeLog | 24 +-
NEWS | 12 +
acconfig.h | 3 -
configure.in | 11 +-
libgnome/ChangeLog | 48 +-
libgnome/Makefile.am | 14 +-
libgnome/gnome-config.c | 2158 -------------------------------------------
libgnome/gnome-config.h | 291 ------
libgnome/gnome-exec.c | 5 +-
libgnome/gnome-gconf.c | 156 ----
libgnome/gnome-gconf.h | 53 --
libgnome/gnome-i18n.c | 375 --------
libgnome/gnome-i18n.h | 49 +-
libgnome/gnome-i18nP.h | 57 --
libgnome/gnome-init.c | 75 +--
libgnome/gnome-init.h | 4 -
libgnome/gnome-program.c | 55 +-
libgnome/gnome-program.h | 3 +-
libgnome/gnome-sound.c | 516 -----------
libgnome/gnome-sound.h | 50 -
libgnome/gnome-triggers.c | 605 ------------
libgnome/gnome-triggers.h | 84 --
libgnome/gnome-triggersP.h | 40 -
libgnome/gnome-url.c | 2 -
libgnome/gnome-util.c | 118 +---
libgnome/gnome-util.h | 8 -
libgnome/libgnome-2.0.pc.in | 2 +-
libgnome/libgnome.h | 7 -
libgnome/parse-path.cP | 99 --
libgnome/test-libgnome.c | 2 -
30 files changed, 68 insertions(+), 4858 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e339e9d..6193706 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
-Sun Aug 26 18:39:43 2001 George Lebl <jirka 5z com>
+2001-08-28 Martin Baulig <baulig suse de>
- * libgnome/configure.in, libgnome/libgnome-2.0.pc.in: Require GConf
+ * configure.in: Bumped version number to 1.103.0, the next release will
+ be 1.104.0.
+
+ NOTE: We're in API freeze again, this is the state of the 1.102.0 release.
+
+ NOTE: Please update the required version in your PKG_CHECK_MODULES macros
+ to 1.103.0, there was some larger breakage between 1.102.0 and this one,
+ but 1.103.0 is stable again (and compatible with the frozen 1.102.0).
Fri Aug 24 09:59:14 2001 George Lebl <jirka 5z com>
@@ -10,23 +17,10 @@ Fri Aug 24 09:59:14 2001 George Lebl <jirka 5z com>
by macros or just punted. They are simple yet very useful to
have to write portable code
- * libgnome/gnome-utils.c: make gnome_is_program_in_path use 'access'
- with X_OK to check only for actually executable files and it also
- regets the PATH every time so that it follows the current PATH
- setting. Note that this cannot possibly be the bottleneck in this
- function and the "access" is.
-
- * configure.in: get rid of this elitist evil CERTIFIED_GNOMIE
- bullshit
-
2001-08-14 Michael Meeks <michael ximian com>
* configure.in: add a bonobo-config dependency.
-2001-08-14 Abel Cheung <maddog linux org hk>
-
- * configure.in: Added zh_TW to ALL_LINGUAS.
-
2001-08-14 Martin Baulig <baulig suse de>
Released libgnome 1.102.0 "Roswell".
diff --git a/NEWS b/NEWS
index 4e17fa8..55e690c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+August 28, 2001:
+===============
+
+* Bumped version number to 1.103.0 so people can depend on a clean version.
+ The next release will be libgnome 1.104.0 "Going back to Roswell".
+
+ - bug fixes (George).
+
August 11, 2001:
===============
@@ -5,6 +13,10 @@ August 11, 2001:
- a few bug fixes.
+ Outstanding API issues:
+
+ None
+
August 9, 2001:
==============
diff --git a/acconfig.h b/acconfig.h
index 630aa45..06ae7e6 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -8,6 +8,3 @@
#undef GNOME_EXCLUDE_DEPRECATED_SOURCE
#undef GNOME_EXCLUDE_DEPRECATED
#undef HAVE_GNOMESUPPORT
-#undef HAVE_SETENV
-#undef HAVE_UNSETENV
-#undef HAVE_CLEARENV
diff --git a/configure.in b/configure.in
index 2b12fcc..81904c5 100644
--- a/configure.in
+++ b/configure.in
@@ -2,10 +2,15 @@ AC_PREREQ(2.52)
AC_INIT(libgnome)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libgnome2, 1.102.0)
+AM_INIT_AUTOMAKE(libgnome2, 1.103.0)
AM_MAINTAINER_MODE
+if test -z "$CERTIFIED_GNOMIE"; then
+ cat $srcdir/message-of-doom
+ exit 1
+fi
+
dnl
dnl Due to the sed scripts being split on 90 line
dnl blocks, this macro needs to be right at the beggining.
@@ -63,9 +68,7 @@ AC_SUBST(REBUILD)
dnl
dnl Start of pkg-config checks
dnl
-PKG_CHECK_MODULES(LIBGNOME, glib-2.0 >= 1.3.7 gmodule-2.0 >= 1.3.7 gnome-vfs-2.0 >= 1.1 \
- libxml-2.0 >= 2.4.1 libbonobo-2.0 >= 1.100.0 bonobo-config-2.0 >= 0.1.3 \
- gconf-2.0 >= 1.1.1)
+PKG_CHECK_MODULES(LIBGNOME, glib-2.0 >= 1.3.7 gmodule-2.0 >= 1.3.7 gnome-vfs-2.0 >= 1.1 libxml-2.0 >= 2.4.1 libbonobo-2.0 >= 1.100.0 bonobo-config-2.0 >= 0.1.3)
AC_SUBST(LIBGNOME_CFLAGS)
AC_SUBST(LIBGNOME_LIBS)
diff --git a/libgnome/ChangeLog b/libgnome/ChangeLog
index 4dba1fd..c0a8a7a 100644
--- a/libgnome/ChangeLog
+++ b/libgnome/ChangeLog
@@ -1,45 +1,5 @@
-Tue Aug 28 01:49:27 2001 George Lebl <jirka 5z com>
-
- * gnome-gconf.[ch]: For program relative path, take an optional
- argument of GnomeProgram. Also add documentation for these
- two.
-
-Mon Aug 27 00:55:56 2001 George Lebl <jirka 5z com>
-
- * gnome-config.c, parse-path.cP: use an internal version of
- cancat dir and file which always works with '/'
-
-Mon Aug 27 00:32:57 2001 George Lebl <jirka 5z com>
-
- * gnome-gconf.c: include gnome-i18nP.h
-
- * gnome-init.[ch], gnome-program.[ch]: Fix include stuff foo,
- declare the externs in the header file, initialize triggers again,
- and put back the sound stuff so that we're at 1.0 level on that.
- Also added a few descriptions of GnomeProgram properties.
-
-Sun Aug 26 22:54:57 2001 George Lebl <jirka 5z com>
-
- * libgnome.h, Makefile.am, gnome-gconf.c: Getting confused a bit,
- fix things up, now it does compile
-
-Sun Aug 26 22:48:54 2001 George Lebl <jirka 5z com>
-
- * gnome-init.c, gnome-gconf.[ch], Makefile.am: Add gconf support
- here. This is the init stuff, none of the gui stuff.
-
Sun Aug 26 07:29:59 2001 George Lebl <jirka 5z com>
- * Makefile.am, gnome-config.[ch], parse-path.cP, gnome-sound.[ch],
- gnome-triggersP.h, gnome-triggers.[ch], gnome-i18n.[ch],
- gnome-i18nP.h, libgnome.h: Bring back sane versions of these files.
- Will be marked as deprecated where appropriate later after some more
- discussion. In gnome-i18n, don't bring back the broken and
- unused crap (preffered language and get_language)
-
- * gnome-i18nP.h, gnome-exec.c, gnome-init.c, gnome-program.c,
- gnome-url.c, test-libgnome.c: Make translations works once more
-
* gnome-util.c: paranoia fix, setuid/setgid programs can't use
getenv ("SHELL") (for obvious reasons).
@@ -50,6 +10,14 @@ Thu Aug 23 23:23:42 2001 George Lebl <jirka 5z com>
casted when passed to printf since they can be either %d or %ld
or some such.
+Fri Aug 24 09:59:14 2001 George Lebl <jirka 5z com>
+
+ * gnome-utils.c: make gnome_is_program_in_path use 'access'
+ with X_OK to check only for actually executable files and it also
+ regets the PATH every time so that it follows the current PATH
+ setting. Note that this cannot possibly be the bottleneck in this
+ function and the "access" is.
+
2001-08-10 Michael Meeks <michael ximian com>
* gnome-init.c (libgnome_requirements): remove redundant
diff --git a/libgnome/Makefile.am b/libgnome/Makefile.am
index ec97213..02add92 100644
--- a/libgnome/Makefile.am
+++ b/libgnome/Makefile.am
@@ -50,15 +50,8 @@ $(CORBA_SOURCE): $(idls) $(ORBIT_IDL)
libgnome_src = \
libgnometypebuiltins.h \
libgnometypebuiltins.c \
- gnome-config.c \
- gnome-sound.c \
- gnome-triggers.c \
- gnome-triggersP.h \
gnome-program.c \
gnome-exec.c \
- gnome-gconf.c \
- gnome-i18n.c \
- gnome-i18nP.h \
gnome-url.c \
gnome-util.c \
gnome-preferences.c \
@@ -76,13 +69,9 @@ libinclude_HEADERS = \
libgnome.h
libgnome_headers = \
- gnome-config.h \
- gnome-sound.h \
- gnome-triggers.h \
gnome-program.h \
gnome-i18n.h \
gnome-exec.h \
- gnome-gconf.h \
gnome-url.h \
gnome-util.h \
gnome-preferences.h \
@@ -162,8 +151,7 @@ $(srcdir)/gnome-marshal.c: @REBUILD@ Makefile.am gnome-marshal.list
EXTRA_DIST = \
libgnome-2.0.pc.in \
gnome-marshal.list \
- gnome-marshal.c \
- parse-path.cP
+ gnome-marshal.c
BUILT_SOURCES = \
libgnometypebuiltins.h \
diff --git a/libgnome/gnome-exec.c b/libgnome/gnome-exec.c
index 85207fc..ffb5e43 100644
--- a/libgnome/gnome-exec.c
+++ b/libgnome/gnome-exec.c
@@ -25,8 +25,6 @@
# include <config.h>
#endif
-#include "gnome-i18nP.h"
-
#include <libgnome/gnome-exec.h>
#include <libgnome/gnome-util.h>
#include <libgnome/gnome-i18n.h>
@@ -187,8 +185,7 @@ gnome_execute_async_with_env_fds (const char *dir, int argc,
res = read (parent_comm_pipes[0], &child_pid, sizeof(child_pid));
if (res != sizeof(child_pid))
{
- g_message("res is %ld instead of %d",
- (long)res, (int)sizeof(child_pid));
+ g_message("res is %d instead of %d", res, (int)sizeof(child_pid));
child_pid = -1; /* really weird things happened */
}
else if (read (parent_comm_pipes[0], &child_errno, sizeof(child_errno))
diff --git a/libgnome/gnome-i18n.h b/libgnome/gnome-i18n.h
index f610a7f..e8b22fe 100644
--- a/libgnome/gnome-i18n.h
+++ b/libgnome/gnome-i18n.h
@@ -28,14 +28,15 @@
* Author: Tom Tromey <tromey creche cygnus com>
*/
-#ifndef __GNOME_I18N_H__
-#define __GNOME_I18N_H__ 1
+#ifndef __LIBGNOME_I18N_H__
+#define __LIBGNOME_I18N_H__ 1
+
+#include <glib/gmacros.h>
-#include <glib.h>
G_BEGIN_DECLS
-#if !defined(__GNOME_I18NP_H__)
+#if !defined(__LIBGNOME_I18NP_H__)
#ifdef ENABLE_NLS
# include <libintl.h>
@@ -63,44 +64,6 @@ G_BEGIN_DECLS
#endif
-/* 'gnome_i18n_get_language_list' returns a list of language strings.
- *
- * It searches for one of following environment variables:
- * LANGUAGE
- * LC_ALL
- * 'category_name'
- * LANG
- *
- * If one of these environment variables was found, it is split into
- * pieces, whereever a ':' is found. When the environment variable included
- * no C locale, the C locale is appended to the list of languages.
- *
- * Assume, you have the following environment variables set:
- *
- * LC_MONETARY="de_DE:es"
- * LANG="de_DE:de:C:en"
- *
- * In this case 'gnome_i18n_get_language_list ("LC_COLLATE")' returns the
- * list: ("de_DE" "de" "C" "en").
- *
- * 'gnome_i18n_get_language_list ("LC_MONETARY")' returns:
- * ("de_DE" "es" "C")
- *
- * The returned list must not be changed.
- */
-
-const GList * gnome_i18n_get_language_list (const gchar *category_name);
-
-/* Push "C" numeric locale. Do this before doing any floating
- * point to/from string conversions, if those are to be done in
- * a portable manner. This is a hack really, and there is
- * no need to generalize it to other cathegories. But it is
- * needed whenever things like printing scanning floats from or
- * to files or other places where you'd like to read them back
- * later. */
-void gnome_i18n_push_c_numeric_locale (void);
-void gnome_i18n_pop_c_numeric_locale (void);
-
G_END_DECLS
-#endif /* __GNOME_UTIL_H__ */
+#endif /* __LIBGNOME_I18N_H__ */
diff --git a/libgnome/gnome-init.c b/libgnome/gnome-init.c
index 7ac2f48..8de83ac 100644
--- a/libgnome/gnome-init.c
+++ b/libgnome/gnome-init.c
@@ -37,13 +37,9 @@
#include <sys/stat.h>
#include <glib.h>
-#include "gnome-i18nP.h"
-#include "gnome-init.h"
-#include "gnome-gconf.h"
-#include "gnome-util.h"
-#include "gnome-sound.h"
-#include "gnome-triggers.h"
+#include <libgnome/gnome-init.h>
+#include <libgnome/gnome-util.h>
#include <errno.h>
@@ -392,7 +388,7 @@ GnomeModuleInfo libbonobo_module_info = {
* libgnome
*****************************************************************************/
-enum { ARG_DISABLE_SOUND = 1, ARG_ENABLE_SOUND, ARG_ESPEAKER, ARG_VERSION };
+enum { ARG_VERSION = 1 };
char *gnome_user_dir = NULL, *gnome_user_private_dir = NULL, *gnome_user_accels_dir = NULL;
@@ -402,37 +398,12 @@ libgnome_option_cb (poptContext ctx, enum poptCallbackReason reason,
void *data)
{
GnomeProgram *program;
- GValue value = { 0 };
program = gnome_program_get ();
switch(reason) {
case POPT_CALLBACK_REASON_OPTION:
switch(opt->val) {
- case ARG_ESPEAKER:
- g_value_init (&value, G_TYPE_STRING);
- g_value_set_string (&value, opt->arg);
- g_object_set (G_OBJECT (program),
- GNOME_PARAM_ESPEAKER, &value);
- g_value_unset (&value);
- break;
-
- case ARG_DISABLE_SOUND:
- g_value_init (&value, G_TYPE_BOOLEAN);
- g_value_set_boolean (&value, FALSE);
- g_object_set (G_OBJECT (program),
- GNOME_PARAM_ENABLE_SOUND, &value);
- g_value_unset (&value);
- break;
-
- case ARG_ENABLE_SOUND:
- g_value_init (&value, G_TYPE_BOOLEAN);
- g_value_set_boolean (&value, TRUE);
- g_object_set (G_OBJECT (program),
- GNOME_PARAM_ENABLE_SOUND, &value);
- g_value_unset (&value);
- break;
-
case ARG_VERSION:
g_print ("Gnome %s %s\n",
gnome_program_get_name (program),
@@ -503,35 +474,15 @@ static void
libgnome_post_args_parse (GnomeProgram *program,
GnomeModuleInfo *mod_info)
{
- GValue value = { 0 };
- gboolean enable_val = TRUE, create_dirs_val = TRUE;
- char *espeaker_val = NULL;
+ GValue value = { 0, };
+ gboolean create_dirs_val;
g_value_init (&value, G_TYPE_BOOLEAN);
- g_object_get_property (G_OBJECT (program),
- GNOME_PARAM_CREATE_DIRECTORIES,
- &value);
+ g_object_get_property (G_OBJECT (program), "create-directories", &value);
create_dirs_val = g_value_get_boolean (&value);
g_value_unset (&value);
- g_value_init (&value, G_TYPE_BOOLEAN);
- g_object_get_property (G_OBJECT (program),
- GNOME_PARAM_ENABLE_SOUND, &value);
- enable_val = g_value_get_boolean (&value);
- g_value_unset (&value);
-
- g_value_init (&value, G_TYPE_STRING);
- g_object_get_property (G_OBJECT (program),
- GNOME_PARAM_ESPEAKER, &value);
- espeaker_val = g_value_dup_string (&value);
- g_value_unset (&value);
-
-
- if (enable_val) {
- gnome_sound_init(espeaker_val);
- }
-
- gnome_triggers_init ();
+ // gnome_triggers_init ();
libgnome_userdir_setup (create_dirs_val);
@@ -545,17 +496,6 @@ static struct poptOption gnomelib_options [] = {
{ NULL, '\0', POPT_ARG_CALLBACK, (void *) libgnome_option_cb, 0, NULL, NULL},
- { "disable-sound", '\0', POPT_ARG_NONE,
- NULL, ARG_DISABLE_SOUND, N_("Disable sound server usage"), NULL},
-
- { "enable-sound", '\0', POPT_ARG_NONE,
- NULL, ARG_ENABLE_SOUND, N_("Enable sound server usage"), NULL},
-
- { "espeaker", '\0', POPT_ARG_STRING,
- NULL, ARG_ESPEAKER, N_("Host:port on which the sound server to use is
- running"),
- N_("HOSTNAME:PORT")},
-
{"version", '\0', POPT_ARG_NONE, NULL, },
{ NULL, '\0', 0, NULL, 0 }
@@ -579,7 +519,6 @@ GnomeModuleInfo gnome_vfs_module_info = {
static GnomeModuleRequirement libgnome_requirements [] = {
{ VERSION, &libbonobo_module_info },
{ "0.3.0", &gnome_vfs_module_info },
- { VERSION, &gnome_gconf_module_info },
{ NULL }
};
diff --git a/libgnome/gnome-init.h b/libgnome/gnome-init.h
index 425ec1d..1c15c06 100644
--- a/libgnome/gnome-init.h
+++ b/libgnome/gnome-init.h
@@ -61,10 +61,6 @@ extern GnomeModuleInfo gnome_bonobo_activation_module_info;
extern GnomeModuleInfo gnome_vfs_module_info;
extern GnomeModuleInfo libgnome_module_info;
-extern char *gnome_user_dir;
-extern char *gnome_user_private_dir;
-extern char *gnome_user_accels_dir;
-
G_END_DECLS
#endif /* LIBGNOMEINIT_H */
diff --git a/libgnome/gnome-program.c b/libgnome/gnome-program.c
index eb2af8c..b18ae8e 100644
--- a/libgnome/gnome-program.c
+++ b/libgnome/gnome-program.c
@@ -29,15 +29,11 @@
/* This module takes care of handling application and library
initialization and command line parsing */
-#include <config.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gmodule.h>
-
-#include "gnome-i18nP.h"
-
#include <libgnome/gnome-program.h>
#include <libgnome/gnome-init.h>
#include <libgnome/gnome-i18n.h>
@@ -66,8 +62,6 @@ struct _GnomeProgramPrivate {
gchar *prop_app_sysconfdir;
gchar *prop_app_datadir;
gboolean prop_create_directories;
- gboolean prop_enable_sound;
- gchar *prop_espeaker;
gchar **gnome_path;
@@ -103,8 +97,6 @@ enum {
PROP_APP_DATADIR,
PROP_APP_SYSCONFDIR,
PROP_CREATE_DIRECTORIES,
- PROP_ENABLE_SOUND,
- PROP_ESPEAKER,
PROP_POPT_TABLE,
PROP_POPT_FLAGS,
PROP_POPT_CONTEXT,
@@ -170,7 +162,6 @@ gnome_program_set_property (GObject *object, guint param_id,
program->_priv->prop_module_info = g_value_dup_boxed ((GValue *) value);
break;
case PROP_MODULES:
- g_free (program->_priv->prop_module_list);
program->_priv->prop_module_list = g_value_dup_string (value);
break;
case PROP_POPT_TABLE:
@@ -180,7 +171,6 @@ gnome_program_set_property (GObject *object, guint param_id,
program->_priv->prop_popt_flags = g_value_get_int (value);
break;
case PROP_HUMAN_READABLE_NAME:
- g_free (program->_priv->prop_human_readable_name);
program->_priv->prop_human_readable_name = g_value_dup_string (value);
break;
case PROP_GNOME_PATH:
@@ -193,31 +183,20 @@ gnome_program_set_property (GObject *object, guint param_id,
(g_value_get_string (value), ":", -1);
break;
case PROP_APP_PREFIX:
- g_free (program->_priv->prop_app_prefix);
program->_priv->prop_app_prefix = g_value_dup_string (value);
break;
case PROP_APP_SYSCONFDIR:
- g_free (program->_priv->prop_app_sysconfdir);
program->_priv->prop_app_sysconfdir = g_value_dup_string (value);
break;
case PROP_APP_DATADIR:
- g_free (program->_priv->prop_app_datadir);
program->_priv->prop_app_datadir = g_value_dup_string (value);
break;
case PROP_APP_LIBDIR:
- g_free (program->_priv->prop_app_libdir);
program->_priv->prop_app_libdir = g_value_dup_string (value);
break;
case PROP_CREATE_DIRECTORIES:
program->_priv->prop_create_directories = g_value_get_boolean (value);
break;
- case PROP_ENABLE_SOUND:
- program->_priv->prop_enable_sound = g_value_get_boolean (value);
- break;
- case PROP_ESPEAKER:
- g_free (program->_priv->prop_espeaker);
- program->_priv->prop_espeaker = g_value_dup_string (value);
- break;
default: {
GObjectSetPropertyFunc set_func;
@@ -277,12 +256,6 @@ gnome_program_get_property (GObject *object, guint param_id, GValue *value,
case PROP_CREATE_DIRECTORIES:
g_value_set_boolean (value, program->_priv->prop_create_directories);
break;
- case PROP_ENABLE_SOUND:
- g_value_set_boolean (value, program->_priv->prop_enable_sound);
- break;
- case PROP_ESPEAKER:
- g_value_set_string (value, program->_priv->prop_espeaker);
- break;
default: {
GObjectSetPropertyFunc get_func;
@@ -454,9 +427,7 @@ gnome_program_class_init (GnomeProgramClass *class)
g_object_class_install_property
(object_class,
PROP_HUMAN_READABLE_NAME,
- g_param_spec_string (GNOME_PARAM_HUMAN_READABLE_NAME,
- _("Human readable name"),
- _("Human readable name of this application"),
+ g_param_spec_string (GNOME_PARAM_HUMAN_READABLE_NAME, NULL, NULL,
NULL,
(G_PARAM_READABLE | G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY)));
@@ -464,9 +435,7 @@ gnome_program_class_init (GnomeProgramClass *class)
g_object_class_install_property
(object_class,
PROP_GNOME_PATH,
- g_param_spec_string (GNOME_PARAM_GNOME_PATH,
- _("GNOME path"),
- _("Path in which to look for installed files"),
+ g_param_spec_string (GNOME_PARAM_GNOME_PATH, NULL, NULL,
g_getenv ("GNOME2_PATH"),
(G_PARAM_READABLE | G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY)));
@@ -480,9 +449,7 @@ gnome_program_class_init (GnomeProgramClass *class)
g_object_class_install_property
(object_class,
PROP_APP_VERSION,
- g_param_spec_string (GNOME_PARAM_APP_VERSION,
- _("App version"),
- _("Version of this application"),
+ g_param_spec_string (GNOME_PARAM_APP_VERSION, NULL, NULL,
NULL, G_PARAM_READABLE));
g_object_class_install_property
@@ -525,22 +492,6 @@ gnome_program_class_init (GnomeProgramClass *class)
(G_PARAM_READABLE | G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY)));
- g_object_class_install_property
- (object_class,
- PROP_ENABLE_SOUND,
- g_param_spec_boolean (GNOME_PARAM_ENABLE_SOUND, NULL, NULL,
- TRUE,
- (G_PARAM_READABLE | G_PARAM_WRITABLE |
- G_PARAM_CONSTRUCT_ONLY)));
-
- g_object_class_install_property
- (object_class,
- PROP_ESPEAKER,
- g_param_spec_string (GNOME_PARAM_ESPEAKER, NULL, NULL,
- NULL,
- (G_PARAM_READABLE | G_PARAM_WRITABLE |
- G_PARAM_CONSTRUCT_ONLY)));
-
object_class->finalize = gnome_program_finalize;
}
diff --git a/libgnome/gnome-program.h b/libgnome/gnome-program.h
index f907b6c..319d7cf 100644
--- a/libgnome/gnome-program.h
+++ b/libgnome/gnome-program.h
@@ -101,8 +101,9 @@ gnome_program_locate_file (GnomeProgram *program,
#define GNOME_PARAM_POPT_FLAGS "popt-flags"
#define GNOME_PARAM_POPT_CONTEXT "popt-context"
#define GNOME_PARAM_CREATE_DIRECTORIES "create-directories"
+#define GNOME_PARAM_SOUND_DRIVER "sound-driver"
#define GNOME_PARAM_ENABLE_SOUND "enable-sound"
-#define GNOME_PARAM_ESPEAKER "espeaker"
+#define GNOME_PARAM_FILE_LOCATOR "file-locator"
#define GNOME_PARAM_APP_ID "app-id"
#define GNOME_PARAM_APP_VERSION "app-version"
#define GNOME_PARAM_APP_PREFIX "app-prefix"
diff --git a/libgnome/gnome-url.c b/libgnome/gnome-url.c
index 2f3d0ed..b7393e5 100644
--- a/libgnome/gnome-url.c
+++ b/libgnome/gnome-url.c
@@ -32,8 +32,6 @@
#include <unistd.h>
#include <errno.h>
-#include "gnome-i18nP.h"
-
#include <bonobo/bonobo-property-bag-client.h>
#include <libgnome/gnome-exec.h>
#include <libgnome/gnome-util.h>
diff --git a/libgnome/gnome-util.c b/libgnome/gnome-util.c
index 004a353..3f18e5e 100644
--- a/libgnome/gnome-util.c
+++ b/libgnome/gnome-util.c
@@ -94,12 +94,8 @@ gnome_util_user_shell (void)
"/bin/csh", "/bin/sh", 0
};
- if (geteuid () == getuid () &&
- getegid () == getgid ()) {
- /* only in non-setuid */
- if ((shell = g_getenv ("SHELL"))){
- return g_strdup (shell);
- }
+ if ((shell = g_getenv ("SHELL"))){
+ return g_strdup (shell);
}
pw = getpwuid(getuid());
if (pw && pw->pw_shell) {
@@ -195,112 +191,20 @@ g_copy_vector (const char **vec)
char *
gnome_is_program_in_path (const gchar *program)
{
- gchar **paths = NULL;
+ static gchar **paths = NULL;
gchar **p;
gchar *f;
- paths = g_strsplit (g_getenv ("PATH"), ":", -1);
+ if (!paths)
+ paths = g_strsplit(g_getenv("PATH"), ":", -1);
- for (p = paths; *p != NULL; p++) {
- f = g_strconcat (*p,"/", program, NULL);
- if (access (f, X_OK) == 0) {
- g_strfreev (paths);
+ p = paths;
+ while (*p){
+ f = g_strconcat (*p,"/",program, NULL);
+ if (g_file_test (f, G_FILE_TEST_EXISTS))
return f;
- }
g_free (f);
+ p++;
}
-
- g_strfreev (paths);
- return NULL;
-}
-
-/**
- * gnome_setenv:
- *
- * Description: Adds "@name= value" to the environment
- * Note that on systems without setenv, this leaks memory
- * so please do not use inside a loop or anything like that.
- * semantics are the same as the glibc setenv. The @overwrite
- * flag says that existing @name in the environment should be
- * overwritten.
- *
- * Returns: 0 on success -1 on error
- *
- **/
-int
-gnome_setenv (const char *name, const char *value, gboolean overwrite)
-{
-#if defined (HAVE_SETENV)
- return setenv (name, value, overwrite);
-#else
- char *string;
-
- if (! overwrite && g_getenv (name) != NULL) {
- return 0;
- }
-
- /* This results in a leak when you overwrite existing
- * settings. It would be fairly easy to fix this by keeping
- * our own parallel array or hash table.
- */
- string = g_strconcat (name, "=", value, NULL);
- return putenv (string);
-#endif
-}
-
-/**
- * gnome_unsetenv:
- * @name:
- *
- * Description: Removes @name from the environment.
- * In case there is no native implementation of unsetenv,
- * this could cause leaks depending on the implementation of
- * enviroment.
- *
- **/
-void
-gnome_unsetenv (const char *name)
-{
-#if defined (HAVE_SETENV)
- unsetenv (name);
-#else
- extern char **environ;
- int i, len;
-
- len = strlen (name);
-
- /* Mess directly with the environ array.
- * This seems to be the only portable way to do this.
- */
- for (i = 0; environ[i] != NULL; i++) {
- if (strncmp (environ[i], name, len) == 0
- && environ[i][len + 1] == '=') {
- break;
- }
- }
- while (environ[i] != NULL) {
- environ[i] = environ[i + 1];
- i++;
- }
-#endif
-}
-
-/**
- * gnome_clearenv:
- *
- * Description: Clears out the environment completely.
- * In case there is no native implementation of clearenv,
- * this could cause leaks depending on the implementation
- * of enviroment.
- *
- **/
-void
-gnome_clearenv (void)
-{
-#ifdef HAVE_CLEARENV
- clearenv ();
-#else
- extern char **environ;
- environ[0] = NULL;
-#endif
+ return 0;
}
diff --git a/libgnome/gnome-util.h b/libgnome/gnome-util.h
index e2deda4..d5fd571 100644
--- a/libgnome/gnome-util.h
+++ b/libgnome/gnome-util.h
@@ -73,14 +73,6 @@ char ** g_copy_vector (const char ** vec);
/* Find the name of the user's shell. */
char *gnome_util_user_shell (void);
-/* Portable versions of setenv/unsetenv */
-
-/* Note: setenv will leak on some systems (those without setenv) so
- * do NOT use inside a loop. Semantics are the same as those in glibc */
-int gnome_setenv (const char *name, const char *value, gboolean overwrite);
-void gnome_unsetenv (const char *name);
-void gnome_clearenv (void);
-
G_END_DECLS
#endif
diff --git a/libgnome/libgnome-2.0.pc.in b/libgnome/libgnome-2.0.pc.in
index 966cc5f..fd1f055 100644
--- a/libgnome/libgnome-2.0.pc.in
+++ b/libgnome/libgnome-2.0.pc.in
@@ -5,7 +5,7 @@ includedir= includedir@
Name: libgnome
Description: libgnome
-Requires: glib-2.0 ORBit-2.0 libbonobo-2.0 gconf-2.0
+Requires: glib-2.0 ORBit-2.0 libbonobo-2.0
Version: @VERSION@
Libs: -L${libdir} -lgnome-2
Cflags: -I${includedir}/gnome/2
diff --git a/libgnome/libgnome.h b/libgnome/libgnome.h
index 8251766..c66eb2b 100644
--- a/libgnome/libgnome.h
+++ b/libgnome/libgnome.h
@@ -29,13 +29,6 @@
#include <libgnome/gnome-program.h>
#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-config.h>
-
-#include <libgnome/gnome-gconf.h>
-
-#include <libgnome/gnome-triggers.h>
-#include <libgnome/gnome-sound.h>
-
#include <libgnome/gnome-exec.h>
#include <libgnome/gnome-util.h>
diff --git a/libgnome/test-libgnome.c b/libgnome/test-libgnome.c
index 390f736..007994a 100644
--- a/libgnome/test-libgnome.c
+++ b/libgnome/test-libgnome.c
@@ -7,8 +7,6 @@
#include <unistd.h>
#include <string.h>
-#include "gnome-i18nP.h"
-
#include "libgnome.h"
#include <libgnome/gnome-url.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]