From 0e32287bbb63df6b8f64f0bf68848438fe2aa3cc Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 9 Aug 2008 12:13:16 +0000 Subject: Killing spree... svn path=/branches/kill-bonobo/; revision=35948 --- shell/Makefile.am | 4 - shell/evolution-config-control.c | 177 -------------------------------- shell/evolution-config-control.h | 64 ------------ shell/evolution-shell-component-utils.c | 113 -------------------- shell/evolution-shell-component-utils.h | 51 --------- 5 files changed, 409 deletions(-) delete mode 100644 shell/evolution-config-control.c delete mode 100644 shell/evolution-config-control.h delete mode 100644 shell/evolution-shell-component-utils.c delete mode 100644 shell/evolution-shell-component-utils.h (limited to 'shell') diff --git a/shell/Makefile.am b/shell/Makefile.am index 1999a68a93..9569f91bf9 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -66,8 +66,6 @@ eshellinclude_HEADERS = \ e-shell-window.h \ e-shell-window-actions.h \ e-user-creatable-items-handler.h \ - evolution-config-control.h \ - evolution-shell-component-utils.h \ es-event.h \ es-menu.h @@ -79,8 +77,6 @@ libeshell_la_SOURCES = \ e-shell-window.c \ e-shell-window-actions.c \ e-user-creatable-items-handler.c \ - evolution-config-control.c \ - evolution-shell-component-utils.c \ $(eshellinclude_HEADERS) libeshell_la_LDFLAGS = $(NO_UNDEFINED) diff --git a/shell/evolution-config-control.c b/shell/evolution-config-control.c deleted file mode 100644 index b50bcf5072..0000000000 --- a/shell/evolution-config-control.c +++ /dev/null @@ -1,177 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* evolution-config-control.c - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * 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., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "evolution-config-control.h" - -#include "e-shell-marshal.h" - -#include - -#include -#include - - -#define PARENT_TYPE BONOBO_OBJECT_TYPE -static BonoboObjectClass *parent_class = NULL; - -struct _EvolutionConfigControlPrivate { - BonoboControl *control; - BonoboEventSource *event_source; -}; - -/* GObject methods. */ - -static void -impl_dispose (GObject *object) -{ - EvolutionConfigControl *config_control; - EvolutionConfigControlPrivate *priv; - - config_control = EVOLUTION_CONFIG_CONTROL (object); - priv = config_control->priv; - - if (priv->control != NULL) { - bonobo_object_unref (BONOBO_OBJECT (priv->control)); - priv->control = NULL; - } - - if (priv->event_source != NULL) { - bonobo_object_unref (BONOBO_OBJECT (priv->event_source)); - priv->event_source = NULL; - } - - (* G_OBJECT_CLASS (parent_class)->dispose) (object); -} - -static void -impl_finalize (GObject *object) -{ - EvolutionConfigControl *config_control; - EvolutionConfigControlPrivate *priv; - - config_control = EVOLUTION_CONFIG_CONTROL (object); - priv = config_control->priv; - - g_free (priv); - - (* G_OBJECT_CLASS (parent_class)->finalize) (object); -} - - -/* Evolution::ConfigControl CORBA methods. */ - -static Bonobo_Control -impl__get_control (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - EvolutionConfigControl *config_control; - EvolutionConfigControlPrivate *priv; - - config_control = EVOLUTION_CONFIG_CONTROL (bonobo_object_from_servant (servant)); - priv = config_control->priv; - - bonobo_object_ref (BONOBO_OBJECT (priv->control)); - - return CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (priv->control)), ev); -} - -static Bonobo_EventSource -impl__get_eventSource (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - EvolutionConfigControl *config_control; - EvolutionConfigControlPrivate *priv; - - config_control = EVOLUTION_CONFIG_CONTROL (bonobo_object_from_servant (servant)); - priv = config_control->priv; - - bonobo_object_ref (BONOBO_OBJECT (priv->event_source)); - - return CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (priv->event_source)), ev); -} - - -static void -evolution_config_control_class_init (EvolutionConfigControlClass *class) -{ - POA_GNOME_Evolution_ConfigControl__epv *epv; - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->dispose = impl_dispose; - object_class->finalize = impl_finalize; - - epv = &class->epv; - epv->_get_control = impl__get_control; - epv->_get_eventSource = impl__get_eventSource; - - parent_class = g_type_class_ref (PARENT_TYPE); -} - -static void -evolution_config_control_init (EvolutionConfigControl *config_control) -{ - EvolutionConfigControlPrivate *priv; - - priv = g_new (EvolutionConfigControlPrivate, 1); - priv->control = NULL; - priv->event_source = bonobo_event_source_new (); - - config_control->priv = priv; -} - - -void -evolution_config_control_construct (EvolutionConfigControl *control, - GtkWidget *widget) -{ - EvolutionConfigControlPrivate *priv; - - g_return_if_fail (EVOLUTION_IS_CONFIG_CONTROL (control)); - g_return_if_fail (GTK_IS_WIDGET (widget)); - - priv = control->priv; - - priv->control = bonobo_control_new (widget); -} - -EvolutionConfigControl * -evolution_config_control_new (GtkWidget *widget) -{ - EvolutionConfigControl *new; - - g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); - - new = g_object_new (evolution_config_control_get_type (), NULL); - evolution_config_control_construct (new, widget); - - return new; -} - -BONOBO_TYPE_FUNC_FULL (EvolutionConfigControl, - GNOME_Evolution_ConfigControl, - PARENT_TYPE, - evolution_config_control) diff --git a/shell/evolution-config-control.h b/shell/evolution-config-control.h deleted file mode 100644 index e265be0a40..0000000000 --- a/shell/evolution-config-control.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* evolution-config-control.h - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * 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., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef EVOLUTION_CONFIG_CONTROL_H -#define EVOLUTION_CONFIG_CONTROL_H - -#include "Evolution.h" - -#include -#include - -#ifdef cplusplus -extern "C" { -#pragma } -#endif /* cplusplus */ - -#define EVOLUTION_TYPE_CONFIG_CONTROL (evolution_config_control_get_type ()) -#define EVOLUTION_CONFIG_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EVOLUTION_TYPE_CONFIG_CONTROL, EvolutionConfigControl)) -#define EVOLUTION_CONFIG_CONTROL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EVOLUTION_TYPE_CONFIG_CONTROL, EvolutionConfigControlClass)) -#define EVOLUTION_IS_CONFIG_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EVOLUTION_TYPE_CONFIG_CONTROL)) -#define EVOLUTION_IS_CONFIG_CONTROL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), EVOLUTION_TYPE_CONFIG_CONTROL)) - -typedef struct _EvolutionConfigControl EvolutionConfigControl; -typedef struct _EvolutionConfigControlPrivate EvolutionConfigControlPrivate; -typedef struct _EvolutionConfigControlClass EvolutionConfigControlClass; - -struct _EvolutionConfigControl { - BonoboObject parent; - - EvolutionConfigControlPrivate *priv; -}; - -struct _EvolutionConfigControlClass { - BonoboObjectClass parent_class; - - POA_GNOME_Evolution_ConfigControl__epv epv; -}; - - -GType evolution_config_control_get_type (void); -EvolutionConfigControl *evolution_config_control_new (GtkWidget *widget); -void evolution_config_control_construct (EvolutionConfigControl *control, - GtkWidget *widget); - -#endif /* EVOLUTION_CONFIG_CONTROL_H */ diff --git a/shell/evolution-shell-component-utils.c b/shell/evolution-shell-component-utils.c deleted file mode 100644 index 68a9995481..0000000000 --- a/shell/evolution-shell-component-utils.c +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* evolution-shell-component-utils.c - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * 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., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "evolution-shell-component-utils.h" -#include -#include "e-util/e-dialog-utils.h" - -#include -#include -#include -#include -#include -#include -#include - -static void free_pixmaps (void); -static GSList *inited_arrays = NULL; - -void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache) -{ - static int done_init = 0; - int i; - - if (!done_init) { - g_atexit (free_pixmaps); - done_init = 1; - } - - if (g_slist_find (inited_arrays, pixcache) == NULL) - inited_arrays = g_slist_prepend (inited_arrays, pixcache); - - for (i = 0; pixcache [i].path; i++) { - if (!pixcache [i].pixbuf) { - GdkPixbuf *pixbuf; - - pixbuf = e_icon_factory_get_icon (pixcache [i].name, pixcache [i].size); - pixcache [i].pixbuf = bonobo_ui_util_pixbuf_to_xml (pixbuf); - g_object_unref (pixbuf); - bonobo_ui_component_set_prop (uic, - pixcache [i].path, "pixname", - pixcache [i].pixbuf, NULL); - } else { - bonobo_ui_component_set_prop (uic, pixcache [i].path, - "pixname", - pixcache [i].pixbuf, - NULL); - } - } -} - -static void -free_pixmaps (void) -{ - int i; - GSList *li; - - for (li = inited_arrays; li != NULL; li = li->next) { - EPixmap *pixcache = li->data; - for (i = 0; pixcache [i].path; i++) - g_free (pixcache [i].pixbuf); - } - - g_slist_free (inited_arrays); -} - - -/** - * e_get_activation_failure_msg: - * @ev: An exception returned by an oaf_activate call. - * - * Get a descriptive error message from @ev. - * - * Return value: A newly allocated string with the printable error message. - **/ -char * -e_get_activation_failure_msg (CORBA_Environment *ev) -{ - g_return_val_if_fail (ev != NULL, NULL); - - if (CORBA_exception_id (ev) == NULL) - return NULL; - - if (strcmp (CORBA_exception_id (ev), ex_Bonobo_GeneralError) != 0) { - return bonobo_exception_get_text (ev); - } else { - const Bonobo_GeneralError *oaf_general_error; - - oaf_general_error = CORBA_exception_value (ev); - return g_strdup (oaf_general_error->description); - } -} diff --git a/shell/evolution-shell-component-utils.h b/shell/evolution-shell-component-utils.h deleted file mode 100644 index b3f1b0b8eb..0000000000 --- a/shell/evolution-shell-component-utils.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* evolution-shell-component-utils.h - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * 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., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __EVOLUTION_SHELL_COMPONENT_UTILS_H__ -#define __EVOLUTION_SHELL_COMPONENT_UTILS_H__ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -typedef struct _EPixmap { - const char *path; - const char *name; - gint size; - char *pixbuf; -} EPixmap; - -#define E_PIXMAP(path,name,size) { (path), (name), (size), NULL } -#define E_PIXMAP_END { NULL, NULL, 0, NULL } - -/* Takes an array of pixmaps, terminated by E_PIXMAP_END, and loads into uic */ -void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache); - -char *e_get_activation_failure_msg (CORBA_Environment *ev); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __EVOLUTION_SHELL_COMPONENT_UTILS_H__ */ -- cgit v1.2.3