[monkey-bubble: 277/753] New files.
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 277/753] New files.
- Date: Wed, 14 Jul 2010 22:18:56 +0000 (UTC)
commit f4cee9faa02394215164a92fbf14886b440d3f24
Author: Martin Baulig <baulig suse de>
Date: Wed May 9 14:41:10 2001 +0000
New files.
2001-05-09 Martin Baulig <baulig suse de>
* gnome-selector-component.[ch]: New files.
* gnome-icon-selector-component.h (GnomeIconSelectorComponent): Derive
from GnomeSelectorComponent.
* gnome-image-selector.[ch]: New files; this is a GnomeSelectorClient
wrapper for the GnomeIconSelectorComponent.
libgnomeui/ChangeLog | 10 +++
libgnomeui/Makefile.am | 5 +
libgnomeui/gnome-image-selector.c | 152 +++++++++++++++++++++++++++++++++++++
libgnomeui/gnome-image-selector.h | 79 +++++++++++++++++++
libgnomeui/libgnomeui.h | 1 +
5 files changed, 247 insertions(+), 0 deletions(-)
---
diff --git a/libgnomeui/ChangeLog b/libgnomeui/ChangeLog
index 6f4eeb7..24dd429 100644
--- a/libgnomeui/ChangeLog
+++ b/libgnomeui/ChangeLog
@@ -1,5 +1,15 @@
2001-05-09 Martin Baulig <baulig suse de>
+ * gnome-selector-component.[ch]: New files.
+
+ * gnome-icon-selector-component.h (GnomeIconSelectorComponent): Derive
+ from GnomeSelectorComponent.
+
+ * gnome-image-selector.[ch]: New files; this is a GnomeSelectorClient
+ wrapper for the GnomeIconSelectorComponent.
+
+2001-05-09 Martin Baulig <baulig suse de>
+
* gnome-icon-selector-component.[ch]: Use the new GnomeSelector API.
* gnome-icon-selector.[ch]: Renamed to gnome-icon-selector-component.[ch].
diff --git a/libgnomeui/Makefile.am b/libgnomeui/Makefile.am
index f87b947..7de6b7a 100644
--- a/libgnomeui/Makefile.am
+++ b/libgnomeui/Makefile.am
@@ -82,9 +82,11 @@ libgnomeui_2_la_SOURCES = \
gnome-druid-page-standard.c \
gnome-geometry.c \
gnome-selector-client.c \
+ gnome-selector-component.c \
gnome-entry.c \
gnome-file-entry.c \
gnome-image-entry.c \
+ gnome-image-selector.c \
gnome-image-entry-component.c \
gnome-icon-selector-component.c \
gnome-font-picker.c \
@@ -121,9 +123,12 @@ gnome_headers = \
gnome-druid-page.h \
gnome-druid-page-edge.h \
gnome-druid-page-standard.h \
+ gnome-selector-client.h \
+ gnome-selector-component.h \
gnome-entry.h \
gnome-file-entry.h \
gnome-image-entry.h \
+ gnome-image-selector.h \
gnome-image-entry-component.h \
gnome-icon-selector-component.h \
gnome-font-picker.h \
diff --git a/libgnomeui/gnome-image-selector.c b/libgnomeui/gnome-image-selector.c
new file mode 100644
index 0000000..0b6fb52
--- /dev/null
+++ b/libgnomeui/gnome-image-selector.c
@@ -0,0 +1,152 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * 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@
+ */
+
+/* GnomeImageSelector widget - combo box with auto-saved history
+ *
+ * Author: Federico Mena <federico nuclecu unam mx>
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <gtk/gtkentry.h>
+#include <gtk/gtkcombo.h>
+#include <gtk/gtklist.h>
+#include <gtk/gtklistitem.h>
+#include <gtk/gtksignal.h>
+#include <libgnome/gnome-i18n.h>
+#include <libgnomeui/gnome-icon-selector-component.h>
+#include "gnome-image-selector.h"
+
+struct _GnomeImageSelectorPrivate {
+};
+
+
+static void gnome_image_selector_class_init (GnomeImageSelectorClass *class);
+static void gnome_image_selector_init (GnomeImageSelector *gselector);
+static void gnome_image_selector_finalize (GObject *object);
+
+static GnomeSelectorClientClass *parent_class;
+
+GType
+gnome_image_selector_get_type (void)
+{
+ static GType selector_type = 0;
+
+ if (!selector_type) {
+ GtkTypeInfo selector_info = {
+ "GnomeImageSelector",
+ sizeof (GnomeImageSelector),
+ sizeof (GnomeImageSelectorClass),
+ (GtkClassInitFunc) gnome_image_selector_class_init,
+ (GtkObjectInitFunc) gnome_image_selector_init,
+ NULL,
+ NULL,
+ NULL
+ };
+
+ selector_type = gtk_type_unique (gnome_selector_client_get_type (), &selector_info);
+ }
+
+ return selector_type;
+}
+
+static void
+gnome_image_selector_class_init (GnomeImageSelectorClass *class)
+{
+ GtkObjectClass *object_class;
+ GObjectClass *gobject_class;
+
+ object_class = (GtkObjectClass *) class;
+ gobject_class = (GObjectClass *) class;
+
+ parent_class = gtk_type_class (gnome_selector_client_get_type ());
+
+ gobject_class->finalize = gnome_image_selector_finalize;
+}
+
+static void
+gnome_image_selector_init (GnomeImageSelector *gselector)
+{
+ gselector->_priv = g_new0 (GnomeImageSelectorPrivate, 1);
+}
+
+GtkWidget *
+gnome_image_selector_construct (GnomeImageSelector *iselector,
+ GNOME_Selector corba_selector,
+ Bonobo_UIContainer uic)
+{
+ g_return_val_if_fail (iselector != NULL, NULL);
+ g_return_val_if_fail (GNOME_IS_IMAGE_SELECTOR (iselector), NULL);
+ g_return_val_if_fail (corba_selector != CORBA_OBJECT_NIL, NULL);
+
+ return (GtkWidget *) gnome_selector_client_construct
+ (GNOME_SELECTOR_CLIENT (iselector), corba_selector, uic);
+}
+
+GtkWidget *
+gnome_image_selector_new (void)
+{
+ GnomeSelector *selector;
+
+ selector = g_object_new (gnome_icon_selector_component_get_type (),
+ "want_default_behaviour", TRUE,
+ NULL);
+
+ return gnome_image_selector_new_from_selector (BONOBO_OBJREF (selector),
+ CORBA_OBJECT_NIL);
+}
+
+GtkWidget *
+gnome_image_selector_new_from_selector (GNOME_Selector corba_selector,
+ Bonobo_UIContainer uic)
+{
+ GnomeImageSelector *iselector;
+
+ g_return_val_if_fail (corba_selector != CORBA_OBJECT_NIL, NULL);
+
+ iselector = g_object_new (gnome_image_selector_get_type (), NULL);
+
+ return gnome_image_selector_construct (iselector, corba_selector, uic);
+}
+
+static void
+gnome_image_selector_finalize (GObject *object)
+{
+ GnomeImageSelector *iselector;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (GNOME_IS_IMAGE_SELECTOR (object));
+
+ iselector = GNOME_IMAGE_SELECTOR (object);
+
+ g_free (iselector->_priv);
+ iselector->_priv = NULL;
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
diff --git a/libgnomeui/gnome-image-selector.h b/libgnomeui/gnome-image-selector.h
new file mode 100644
index 0000000..abe5c92
--- /dev/null
+++ b/libgnomeui/gnome-image-selector.h
@@ -0,0 +1,79 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * 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@
+ */
+
+/* GnomeImageSelector widget - combo box with auto-saved history
+ *
+ * Author: Federico Mena <federico nuclecu unam mx>
+ */
+
+#ifndef GNOME_IMAGE_SELECTOR_H
+#define GNOME_IMAGE_SELECTOR_H
+
+
+#include <libgnome/gnome-selector.h>
+#include <libgnomeui/gnome-selector-client.h>
+
+
+G_BEGIN_DECLS
+
+
+#define GNOME_TYPE_IMAGE_SELECTOR (gnome_image_selector_get_type ())
+#define GNOME_IMAGE_SELECTOR(obj) (GTK_CHECK_CAST ((obj), GNOME_TYPE_IMAGE_SELECTOR, GnomeImageSelector))
+#define GNOME_IMAGE_SELECTOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_IMAGE_SELECTOR, GnomeImageSelectorClass))
+#define GNOME_IS_IMAGE_SELECTOR(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_IMAGE_SELECTOR))
+#define GNOME_IS_IMAGE_SELECTOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_IMAGE_SELECTOR))
+
+
+typedef struct _GnomeImageSelector GnomeImageSelector;
+typedef struct _GnomeImageSelectorPrivate GnomeImageSelectorPrivate;
+typedef struct _GnomeImageSelectorClass GnomeImageSelectorClass;
+
+struct _GnomeImageSelector {
+ GnomeSelectorClient client;
+
+ /*< private >*/
+ GnomeImageSelectorPrivate *_priv;
+};
+
+struct _GnomeImageSelectorClass {
+ GnomeSelectorClientClass parent_class;
+};
+
+
+GType gnome_image_selector_get_type (void) G_GNUC_CONST;
+
+GtkWidget *gnome_image_selector_new (void);
+
+GtkWidget *gnome_image_selector_new_from_selector (GNOME_Selector corba_selector,
+ Bonobo_UIContainer uic);
+
+GtkWidget *gnome_image_selector_construct (GnomeImageSelector *iselector,
+ GNOME_Selector corba_selector,
+ Bonobo_UIContainer uic);
+
+G_END_DECLS
+
+#endif
diff --git a/libgnomeui/libgnomeui.h b/libgnomeui/libgnomeui.h
index 951f6b7..3ab9383 100644
--- a/libgnomeui/libgnomeui.h
+++ b/libgnomeui/libgnomeui.h
@@ -44,6 +44,7 @@
#include <libgnomeui/gnome-entry.h>
#include <libgnomeui/gnome-file-entry.h>
#include <libgnomeui/gnome-image-entry.h>
+#include <libgnomeui/gnome-image-selector.h>
#include <libgnomeui/gnome-font-picker.h>
#include <libgnomeui/gnome-gconf.h>
#include <libgnomeui/gnome-geometry.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]