diff options
author | Dan Winship <danw@src.gnome.org> | 2003-10-22 22:24:03 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2003-10-22 22:24:03 +0800 |
commit | d3c6998fb8e7908ae060ccc4d23e6b73d615e774 (patch) | |
tree | d2237a608f5b26891b37387b9eb939eede808452 /widgets/misc | |
parent | 9ec98bbb494f8c98c37afc2d89a4d0f5bb97aed0 (diff) | |
download | gsoc2013-evolution-d3c6998fb8e7908ae060ccc4d23e6b73d615e774.tar.gz gsoc2013-evolution-d3c6998fb8e7908ae060ccc4d23e6b73d615e774.tar.zst gsoc2013-evolution-d3c6998fb8e7908ae060ccc4d23e6b73d615e774.zip |
Remove these (unused since 1.2)
* e-bonobo-widget.[ch]: Remove these (unused since 1.2)
svn path=/trunk/; revision=22978
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/ChangeLog | 4 | ||||
-rw-r--r-- | widgets/misc/e-bonobo-widget.c | 194 | ||||
-rw-r--r-- | widgets/misc/e-bonobo-widget.h | 74 |
3 files changed, 4 insertions, 268 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index fe4bcd24fa..839887d079 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,7 @@ +2003-10-22 Dan Winship <danw@ximian.com> + + * e-bonobo-widget.[ch]: Remove these (unused since 1.2) + 2003-09-30 Mike Kestner <mkestner@ximian.com> * e-cell-renderer-combo.* : new, treeview renderer for combo cells diff --git a/widgets/misc/e-bonobo-widget.c b/widgets/misc/e-bonobo-widget.c deleted file mode 100644 index 3ace72a4af..0000000000 --- a/widgets/misc/e-bonobo-widget.c +++ /dev/null @@ -1,194 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-bonobo-widget.c - * - * Copyright (C) 2001 Ximian, Inc. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Authors: - * Michael Meeks <michael@ximian.com> - * Ettore Perazzoli <ettore@ximian.com> - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "e-bonobo-widget.h" - -#include <bonobo/bonobo-control.h> - -#include <gdk/gdkprivate.h> -#include <gdk/gdkx.h> -#include <gdk/gdktypes.h> - - -#define PARENT_TYPE bonobo_widget_get_type () -static BonoboWidgetClass *parent_class = NULL; - - -static void -class_init (GtkObjectClass *object_class) -{ - parent_class = g_type_class_ref(PARENT_TYPE); - - /* No method to override. */ -} - -static void -init (EBonoboWidget *bonobo_widget) -{ - /* Nothing to initialize. */ -} - - -static void -evolution_toplevel_property_get_fn (BonoboPropertyBag *bag, - BonoboArg *arg, - unsigned int arg_id, - CORBA_Environment *ev, - void *data) -{ - BonoboControlFrame *frame; - GtkWidget *toplevel; - char *id; - - frame = BONOBO_CONTROL_FRAME (data); - - toplevel = bonobo_control_frame_get_widget (frame); - while (toplevel->parent != NULL) - toplevel = toplevel->parent; - - if (BONOBO_IS_CONTROL (toplevel)) { - Bonobo_PropertyBag toplevel_property_bag; - - toplevel_property_bag = bonobo_control_get_ambient_properties (BONOBO_CONTROL (toplevel), NULL); - if (toplevel_property_bag == CORBA_OBJECT_NIL) - goto error; - - id = bonobo_property_bag_client_get_value_string (toplevel_property_bag, - E_BONOBO_WIDGET_TOPLEVEL_PROPERTY_ID, - NULL); - if (id == NULL) - goto error; - - *(char **)arg->_value = id; - return; - } - - id = bonobo_control_windowid_from_x11 (GDK_WINDOW_XWINDOW (toplevel->window)); - *(char **)arg->_value = CORBA_string_dup (id); - g_free (id); - - return; - - error: - /* FIXME: exception? */ - *(char **)arg->_value = CORBA_string_dup (""); -} - -static void -setup_toplevel_property (EBonoboWidget *widget) -{ - BonoboPropertyBag *property_bag; - BonoboControlFrame *control_frame; - - control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (widget)); - - if (!(property_bag = bonobo_control_frame_get_propbag (control_frame))) { - property_bag = bonobo_property_bag_new (NULL, NULL, NULL); - bonobo_control_frame_set_propbag (control_frame, property_bag); - } - - /* FIXME: Kill property bag when the frame dies. */ - - bonobo_property_bag_add_full (property_bag, E_BONOBO_WIDGET_TOPLEVEL_PROPERTY_ID, 0, - TC_Bonobo_Control_windowId, - NULL, "Toplevel Window ID", - BONOBO_PROPERTY_READABLE, - evolution_toplevel_property_get_fn, NULL, - control_frame); -} - - -EBonoboWidget * -e_bonobo_widget_construct_control_from_objref (EBonoboWidget *widget, - Bonobo_Control control, - Bonobo_UIContainer uic) -{ - g_return_val_if_fail (widget != NULL, NULL); - g_return_val_if_fail (E_IS_BONOBO_WIDGET (widget), NULL); - - if (bonobo_widget_construct_control_from_objref (BONOBO_WIDGET (widget), control, uic) == NULL) - return NULL; - - setup_toplevel_property (widget); - return widget; -} - -EBonoboWidget * -e_bonobo_widget_construct_control (EBonoboWidget *widget, - const char *moniker, - Bonobo_UIContainer uic) -{ - g_return_val_if_fail (widget != NULL, NULL); - g_return_val_if_fail (E_IS_BONOBO_WIDGET (widget), NULL); - g_return_val_if_fail (moniker != NULL, NULL); - - if (bonobo_widget_construct_control (BONOBO_WIDGET (widget), moniker, uic) == NULL) - return NULL; - - setup_toplevel_property (widget); - - return widget; -} - - -GtkWidget * -e_bonobo_widget_new_control (const char *moniker, - Bonobo_UIContainer uic) -{ - EBonoboWidget *widget; - - g_return_val_if_fail (moniker != NULL, NULL); - - widget = gtk_type_new (e_bonobo_widget_get_type ()); - widget = e_bonobo_widget_construct_control (widget, moniker, uic); - - if (widget == NULL) - return NULL; - - return GTK_WIDGET (widget); -} - -GtkWidget * -e_bonobo_widget_new_control_from_objref (Bonobo_Control control, - Bonobo_UIContainer uic) -{ - EBonoboWidget *widget; - - g_return_val_if_fail (control != CORBA_OBJECT_NIL, NULL); - - widget = gtk_type_new (E_TYPE_BONOBO_WIDGET); - - widget = e_bonobo_widget_construct_control_from_objref (widget, control, uic); - if (widget == NULL) - return NULL; - - return GTK_WIDGET (widget); -} - - -E_MAKE_TYPE (e_bonobo_widget, "EBonoboWidget", EBonoboWidget, class_init, init, PARENT_TYPE) diff --git a/widgets/misc/e-bonobo-widget.h b/widgets/misc/e-bonobo-widget.h deleted file mode 100644 index f5ac818c6f..0000000000 --- a/widgets/misc/e-bonobo-widget.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-bonobo-widget.h - * - * Copyright (C) 2001 Ximian, Inc. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli <ettore@ximian.com> - */ - -#ifndef _E_BONOBO_WIDGET_H_ -#define _E_BONOBO_WIDGET_H_ - -#include <bonobo/bonobo-widget.h> - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_BONOBO_WIDGET (e_bonobo_widget_get_type ()) -#define E_BONOBO_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_BONOBO_WIDGET, EBonoboWidget)) -#define E_BONOBO_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_BONOBO_WIDGET, EBonoboWidgetClass)) -#define E_IS_BONOBO_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_BONOBO_WIDGET)) -#define E_IS_BONOBO_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_BONOBO_WIDGET)) - - -typedef struct _EBonoboWidget EBonoboWidget; -typedef struct _EBonoboWidgetPrivate EBonoboWidgetPrivate; -typedef struct _EBonoboWidgetClass EBonoboWidgetClass; - -struct _EBonoboWidget { - BonoboWidget parent; - - EBonoboWidgetPrivate *priv; -}; - -struct _EBonoboWidgetClass { - BonoboWidgetClass parent_class; -}; - - -#define E_BONOBO_WIDGET_TOPLEVEL_PROPERTY_ID "bonobo:toplevel" - - -GtkType e_bonobo_widget_get_type (void); -EBonoboWidget *e_bonobo_widget_construct_control_from_objref (EBonoboWidget *widget, - Bonobo_Control control, - Bonobo_UIContainer uic); -EBonoboWidget *e_bonobo_widget_construct_control (EBonoboWidget *widget, - const char *moniker, - Bonobo_UIContainer uic); -GtkWidget *e_bonobo_widget_new_control (const char *moniker, - Bonobo_UIContainer uic); -GtkWidget *e_bonobo_widget_new_control_from_objref (Bonobo_Control control, - Bonobo_UIContainer uic); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_BONOBO_WIDGET_H_ */ |