[monkey-bubble: 289/753] Moved here from ../libgnomeui. Likewise.
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 289/753] Moved here from ../libgnomeui. Likewise.
- Date: Wed, 14 Jul 2010 22:19:56 +0000 (UTC)
commit bad1fa1810bd8b96ed3bef8ba1ba721295d0419f
Author: Martin Baulig <baulig suse de>
Date: Sat May 19 20:10:10 2001 +0000
Moved here from ../libgnomeui. Likewise.
2001-05-19 Martin Baulig <baulig suse de>
* gnome-image-entry-component.[ch]: Moved here from ../libgnomeui.
* gnome-icon-selector-component.[ch]: Likewise.
* libgnomeui-components.c: New file.
* GNOME_UI_Components.oaf.in: New file.
components/.cvsignore | 11 +++
components/ChangeLog | 9 +++
components/GNOME_UI_Components.oaf.in | 27 +++++++
components/Makefile.am | 54 +++++++++++++++
components/libgnomeui-components.c | 121 +++++++++++++++++++++++++++++++++
5 files changed, 222 insertions(+), 0 deletions(-)
---
diff --git a/components/.cvsignore b/components/.cvsignore
new file mode 100644
index 0000000..bd597db
--- /dev/null
+++ b/components/.cvsignore
@@ -0,0 +1,11 @@
+*.la
+*.lo
+.deps
+.libs
+Makefile
+Makefile.in
+_libs
+so_locations
+.exrc
+GNOME_UI_Components.oaf
+libgnomeui-components
diff --git a/components/ChangeLog b/components/ChangeLog
new file mode 100644
index 0000000..f86b791
--- /dev/null
+++ b/components/ChangeLog
@@ -0,0 +1,9 @@
+2001-05-19 Martin Baulig <baulig suse de>
+
+ * gnome-image-entry-component.[ch]: Moved here from ../libgnomeui.
+ * gnome-icon-selector-component.[ch]: Likewise.
+
+ * libgnomeui-components.c: New file.
+
+ * GNOME_UI_Components.oaf.in: New file.
+
diff --git a/components/GNOME_UI_Components.oaf.in b/components/GNOME_UI_Components.oaf.in
new file mode 100644
index 0000000..5341feb
--- /dev/null
+++ b/components/GNOME_UI_Components.oaf.in
@@ -0,0 +1,27 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:GNOME_UI_Components_Factory" type="shlib" location="@COMPONENTS_LIBDIR@/libgnomeui-components-2.so">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="name" type="string" value="GNOME UI Components Factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:GNOME_UI_Component_IconSelector" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Selector:1.0"/>
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="GNOME Icon Selector"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:GNOME_UI_Component_ImageEntry" type="factory" location="OAFIID:GNOME_UI_Components_Factory">
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/ItemContainer:1.0"/>
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="GNOME Image Entry"/>
+</oaf_server>
+
+</oaf_info>
diff --git a/components/Makefile.am b/components/Makefile.am
new file mode 100644
index 0000000..31defe3
--- /dev/null
+++ b/components/Makefile.am
@@ -0,0 +1,54 @@
+#
+# The targets
+#
+componentdir = $(libdir)/gnomeui-2.0/components
+
+component_LTLIBRARIES = libgnomeui-components-2.la
+
+LIB_VERSION=0:0:0
+LIB_VERSION_NUM=0.0.0
+
+INCLUDES = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/intl \
+ -I$(top_builddir)/intl \
+ -DGNOMEUILIBDIR=\""$(libdir)"\" \
+ -DGNOMEUIDATADIR=\""$(datadir)"\" \
+ -DGNOMEUIPIXMAPDIR=\""$(datadir)/pixmaps"\" \
+ -DGNOMEUIBINDIR=\""$(bindir)"\" \
+ -DGNOMEUILOCALSTATEDIR=\""$(localstatedir)"\" \
+ -DGNOMEUILOCALEDIR=\""$(gnomelocaledir)"\" \
+ -DG_LOG_DOMAIN=\"GnomeUI-Components\" \
+ $(WARN_CFLAGS) \
+ $(LIBGNOME_CFLAGS) \
+ $(LIBGNOMECANVAS_CFLAGS) \
+ $(LIBBONOBOUI_CFLAGS) \
+ -DGTK_VERSION=\""$(GTK_VERSION)"\" \
+ -DVERSION=\"$(VERSION)\"
+
+OAF_FILES = \
+ GNOME_UI_Components.oaf
+
+oafdir = $(datadir)/oaf
+oaf_DATA = $(OAF_FILES)
+
+GNOME_UI_Components.oaf : $(srcdir)/GNOME_UI_Components.oaf.in $(top_builddir)/config.status
+ sed -e "s|\ COMPONENTS_LIBDIR\@|$(componentdir)|" \
+ $(srcdir)/GNOME_UI_Components.oaf.in > GNOME_UI_Components.oaf
+
+clean-local:
+ -rm -f $(OAF_FILES)
+
+libgnomeui_components_2_la_SOURCES = \
+ gnome-icon-selector-component.c \
+ gnome-icon-selector-component.h \
+ gnome-image-entry-component.c \
+ gnome-image-entry-component.h \
+ libgnomeui-components.c
+
+libgnomeui_components_2_la_LDFLAGS = \
+ -version-info $(LIB_VERSION)
+
+libgnomeui_components_2_la_LIBADD = \
+ ../libgnomeui/libgnomeui-2.la
diff --git a/components/libgnomeui-components.c b/components/libgnomeui-components.c
new file mode 100644
index 0000000..27e03ff
--- /dev/null
+++ b/components/libgnomeui-components.c
@@ -0,0 +1,121 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
+ * All rights reserved.
+ *
+ * This file is part of the Gnome Library.
+ *
+ * The Gnome Library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * The Gnome Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with the Gnome Library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+/*
+ @NOTATION@
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <bonobo/bonobo-ui-main.h>
+#include <bonobo/bonobo-shlib-factory.h>
+#include <bonobo/bonobo-item-handler.h>
+#include "gnome-icon-selector-component.h"
+#include "gnome-image-entry-component.h"
+
+static Bonobo_Unknown
+image_entry_get_object_fn (BonoboItemHandler *h, const char *item_name,
+ gboolean only_if_exists, gpointer data,
+ CORBA_Environment *ev)
+{
+ GSList *options, *c;
+ gboolean is_pixmap_entry = FALSE;
+ guint preview_x = 0, preview_y = 0;
+ GnomeSelector *selector = NULL;
+
+ g_message (G_STRLOC ": `%s' - %d", item_name, only_if_exists);
+
+ options = bonobo_item_option_parse (item_name);
+
+ for (c = options; c; c = c->next) {
+ BonoboItemOption *option = c->data;
+
+ if (!strcmp (option->key, "type")) {
+ is_pixmap_entry = !strcmp (option->value, "pixmap");
+ } else if (!strcmp (option->key, "preview_x")) {
+ preview_x = atoi (option->value);
+ } else if (!strcmp (option->key, "preview_y")) {
+ preview_y = atoi (option->value);
+ } else {
+ g_warning (G_STRLOC ": unknown option `%s'", option->key);
+ }
+ }
+
+ if (is_pixmap_entry) {
+ if ((preview_x > 0) && (preview_y) > 0)
+ selector = g_object_new (gnome_image_entry_component_get_type (),
+ "is_pixmap_entry", TRUE,
+ "preview_x", preview_x,
+ "preview_y", preview_y,
+ NULL);
+ else
+ selector = g_object_new (gnome_image_entry_component_get_type (),
+ "is_pixmap_entry", TRUE,
+ NULL);
+ } else {
+ selector = g_object_new (gnome_image_entry_component_get_type (),
+ "is_pixmap_entry", FALSE,
+ NULL);
+ }
+
+ bonobo_item_options_free (options);
+
+ return BONOBO_OBJREF (selector);
+}
+
+static BonoboObject *
+libgnomeui_components_factory (BonoboGenericFactory *this,
+ const char *object_id,
+ void *closure)
+{
+ static gboolean initialized = FALSE;
+
+ if (!initialized) {
+ initialized = TRUE;
+ }
+
+ g_message (G_STRLOC ": `%s'", object_id);
+
+ if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_IconSelector")) {
+ GnomeSelector *selector = g_object_new (gnome_icon_selector_component_get_type (), NULL);
+
+ return BONOBO_OBJECT (selector);
+ } else if (!strcmp (object_id, "OAFIID:GNOME_UI_Component_ImageEntry")) {
+ BonoboItemHandler *item_handler;
+
+ item_handler = bonobo_item_handler_new (NULL, image_entry_get_object_fn, NULL);
+
+ return BONOBO_OBJECT (item_handler);
+ } else
+ g_warning ("Failing to manufacture a '%s'", object_id);
+
+ return NULL;
+}
+
+BONOBO_OAF_SHLIB_FACTORY_MULTI ("OAFIID:GNOME_UI_Components_Factory",
+ "GNOME UI Components",
+ libgnomeui_components_factory,
+ NULL);
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]