[monkey-bubble: 622/753] Removed. Removed.
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 622/753] Removed. Removed.
- Date: Wed, 14 Jul 2010 22:47:57 +0000 (UTC)
commit e98d3d17b24ecffc0e029840b19e4213cd05c520
Author: Martin Baulig <baulig suse de>
Date: Sat Aug 11 17:55:33 2001 +0000
Removed. Removed.
2001-08-11 Martin Baulig <baulig suse de>
* gnome-icon-item.[ch]: Removed.
* gnome-icon-text.[ch]: Removed.
* gnome-icon-list.c: Use the new GnomeCanvasRichText.
(FIXME: Incomplete).
2001-08-11 Martin Baulig <baulig suse de>
* oafgnome.[ch]: Removed.
libgnomeui/ChangeLog | 12 +
libgnomeui/Makefile.am | 8 +-
libgnomeui/gnome-icon-item.c | 883 ------------------------------------------
libgnomeui/gnome-icon-item.h | 115 ------
libgnomeui/gnome-icon-list.c | 76 ++---
libgnomeui/gnome-icon-text.c | 312 ---------------
libgnomeui/gnome-icon-text.h | 61 ---
libgnomeui/libgnomeui.h | 2 -
8 files changed, 39 insertions(+), 1430 deletions(-)
---
diff --git a/libgnomeui/ChangeLog b/libgnomeui/ChangeLog
index 2b4b776..b99a809 100644
--- a/libgnomeui/ChangeLog
+++ b/libgnomeui/ChangeLog
@@ -1,3 +1,15 @@
+2001-08-11 Martin Baulig <baulig suse de>
+
+ * gnome-icon-item.[ch]: Removed.
+ * gnome-icon-text.[ch]: Removed.
+
+ * gnome-icon-list.c: Use the new GnomeCanvasRichText.
+ (FIXME: Incomplete).
+
+2001-08-11 Martin Baulig <baulig suse de>
+
+ * oafgnome.[ch]: Removed.
+
2001-08-09 Michael Meeks <michael ximian com>
* gnome-paper-selector.[ch]: Kill, now in libgnomeprintui.
diff --git a/libgnomeui/Makefile.am b/libgnomeui/Makefile.am
index 33bc65d..7c01e63 100644
--- a/libgnomeui/Makefile.am
+++ b/libgnomeui/Makefile.am
@@ -70,11 +70,8 @@ libgnomeui_2_la_SOURCES = \
gnome-winhints.c \
gnometypes.c \
gnome-icon-list.c \
- gnome-icon-item.c \
- gnome-icon-text.c \
gnome-vfs-util.c \
gnome-window.c \
- oafgnome.c \
$(noinst_HEADERS)
## this lists all the non-generated headers
@@ -97,9 +94,7 @@ gnome_headers = \
gnome-geometry.h \
gnome-href.h \
gnome-ice.h \
- gnome-icon-item.h \
gnome-icon-list.h \
- gnome-icon-text.h \
gnome-ui-init.h \
gnome-macros.h \
gnome-stock-icons.h \
@@ -107,8 +102,7 @@ gnome_headers = \
gnome-uidefs.h \
gnome-winhints.h \
gnome-vfs-util.h \
- gnome-window.h \
- oafgnome.h
+ gnome-window.h
libinclude_HEADERS = \
libgnomeui.h
diff --git a/libgnomeui/gnome-icon-list.c b/libgnomeui/gnome-icon-list.c
index cae00db..044b8c1 100644
--- a/libgnomeui/gnome-icon-list.c
+++ b/libgnomeui/gnome-icon-list.c
@@ -43,10 +43,10 @@
#include <stdio.h>
#include <gtk/gtk.h>
#include "gnome-icon-list.h"
-#include "gnome-icon-item.h"
#include <libgnomecanvas/gnome-canvas-pixbuf.h>
#include <libgnomecanvas/gnome-canvas-text.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
+#include <libgnomecanvas/gnome-canvas-rich-text.h>
#include <libgnomeuiP.h>
@@ -93,7 +93,7 @@ typedef struct {
/* Icon image and text items */
GnomeCanvasGroup *group;
GnomeCanvasPixbuf *image;
- GnomeIconTextItem *text;
+ GnomeCanvasRichText *text;
/* Filename of the icon file. */
gchar *icon_filename;
@@ -416,7 +416,7 @@ gil_free_line_info_from (Gil *gil, int first_line)
g_list_free (ll);
}
-static void
+static void G_GNUC_UNUSED
gil_layout_from_line (Gil *gil, int line)
{
GnomeIconListPrivate *priv;
@@ -601,18 +601,11 @@ static gint
selection_one_icon_event (Gil *gil, Icon *icon, int idx, int on_text, GdkEvent *event)
{
GnomeIconListPrivate *priv;
- GnomeIconTextItem *text;
int retval;
priv = gil->_priv;
retval = FALSE;
- /* We use a separate variable and ref the object because it may be
- * destroyed by one of the signal handlers.
- */
- text = icon->text;
- gtk_object_ref (GTK_OBJECT (text));
-
switch (event->type) {
case GDK_BUTTON_PRESS:
priv->edit_pending = FALSE;
@@ -649,11 +642,6 @@ selection_one_icon_event (Gil *gil, Icon *icon, int idx, int on_text, GdkEvent *
break;
case GDK_BUTTON_RELEASE:
- if (priv->edit_pending) {
- gnome_icon_text_item_start_editing (text);
- priv->edit_pending = FALSE;
- }
-
retval = TRUE;
break;
@@ -661,14 +649,6 @@ selection_one_icon_event (Gil *gil, Icon *icon, int idx, int on_text, GdkEvent *
break;
}
- /* If the click was on the text and we actually did something, stop the
- * icon text item's own handler from executing.
- */
- if (on_text && retval)
- gtk_signal_emit_stop_by_name (GTK_OBJECT (text), "event");
-
- gtk_object_unref (GTK_OBJECT (text));
-
return retval;
}
@@ -742,7 +722,6 @@ static gint
selection_many_icon_event (Gil *gil, Icon *icon, int idx, int on_text, GdkEvent *event)
{
GnomeIconListPrivate *priv;
- GnomeIconTextItem *text;
int retval;
int additive, range;
int do_select;
@@ -750,12 +729,6 @@ selection_many_icon_event (Gil *gil, Icon *icon, int idx, int on_text, GdkEvent
priv = gil->_priv;
retval = FALSE;
- /* We use a separate variable and ref the object because it may be
- * destroyed by one of the signal handlers.
- */
- text = icon->text;
- gtk_object_ref (GTK_OBJECT (text));
-
range = (event->button.state & GDK_SHIFT_MASK) != 0;
additive = (event->button.state & GDK_CONTROL_MASK) != 0;
@@ -825,11 +798,6 @@ selection_many_icon_event (Gil *gil, Icon *icon, int idx, int on_text, GdkEvent
retval = TRUE;
}
- if (priv->edit_pending) {
- gnome_icon_text_item_start_editing (text);
- priv->edit_pending = FALSE;
- retval = TRUE;
- }
#if 0
if (priv->select_pending) {
icon->selected = priv->select_pending_was_selected;
@@ -849,14 +817,6 @@ selection_many_icon_event (Gil *gil, Icon *icon, int idx, int on_text, GdkEvent
break;
}
- /* If the click was on the text and we actually did something, stop the
- * icon text item's own handler from executing.
- */
- if (on_text && retval)
- gtk_signal_emit_stop_by_name (GTK_OBJECT (text), "event");
-
- gtk_object_unref (GTK_OBJECT (text));
-
return retval;
}
@@ -891,10 +851,11 @@ icon_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
}
}
+#if 0
/* Handler for the editing_started signal of an icon text item. We block the
* event handler so that it will not be called while the text is being edited.
*/
-static void
+static void G_GNUC_UNUSED
editing_started (GnomeIconTextItem *iti, gpointer data)
{
Icon *icon;
@@ -907,7 +868,7 @@ editing_started (GnomeIconTextItem *iti, gpointer data)
/* Handler for the editing_stopped signal of an icon text item. We unblock the
* event handler so that we can get events from it again.
*/
-static void
+static void G_GNUC_UNUSED
editing_stopped (GnomeIconTextItem *iti, gpointer data)
{
Icon *icon;
@@ -916,26 +877,28 @@ editing_stopped (GnomeIconTextItem *iti, gpointer data)
gtk_signal_handler_unblock (GTK_OBJECT (iti), icon->text_event_id);
}
-static gboolean
+static gboolean G_GNUC_UNUSED
text_changed (GnomeCanvasItem *item, Icon *icon)
{
Gil *gil;
gboolean accept;
+ gchar *text = NULL;
int idx;
gil = GIL (item->canvas);
accept = TRUE;
idx = gil_icon_to_index (gil, icon);
+ g_object_get (G_OBJECT (icon->text), "text", &text, NULL);
gtk_signal_emit (GTK_OBJECT (gil),
gil_signals[TEXT_CHANGED],
- idx, gnome_icon_text_item_get_text (icon->text),
+ idx, text,
&accept);
return accept;
}
-static void
+static void G_GNUC_UNUSED
height_changed (GnomeCanvasItem *item, Icon *icon)
{
Gil *gil;
@@ -957,6 +920,7 @@ height_changed (GnomeCanvasItem *item, Icon *icon)
gil_layout_from_line (gil, n / gil_get_items_per_line (gil));
gil_scrollbar_adjust (gil);
}
+#endif
static Icon *
icon_new_from_pixbuf (GnomeIconList *gil, GdkPixbuf *im,
@@ -991,6 +955,7 @@ icon_new_from_pixbuf (GnomeIconList *gil, GdkPixbuf *im,
"anchor", GTK_ANCHOR_NW,
NULL));
+#if 0
icon->text = GNOME_ICON_TEXT_ITEM (gnome_canvas_item_new (
icon->group,
gnome_icon_text_item_get_type (),
@@ -1001,6 +966,17 @@ icon_new_from_pixbuf (GnomeIconList *gil, GdkPixbuf *im,
"editable", priv->is_editable,
"anchor", GTK_ANCHOR_NW,
NULL));
+#endif
+
+ icon->text = GNOME_CANVAS_RICH_TEXT (gnome_canvas_item_new (
+ icon->group,
+ gnome_canvas_rich_text_get_type (),
+ "text", text,
+ "x", (double) DEFAULT_TEXT_SPACING,
+ "y", (double) gdk_pixbuf_get_height (im),
+ "clip_width", (double) gdk_pixbuf_get_width (im),
+ "anchor", GTK_ANCHOR_NW,
+ NULL));
GTK_WIDGET_SET_FLAGS (GTK_WIDGET (canvas), GTK_CAN_FOCUS);
gtk_widget_grab_focus (GTK_WIDGET (canvas));
@@ -1012,6 +988,7 @@ icon_new_from_pixbuf (GnomeIconList *gil, GdkPixbuf *im,
GTK_SIGNAL_FUNC (icon_event),
icon);
+#if 0
gtk_signal_connect (GTK_OBJECT (icon->text), "editing_started",
GTK_SIGNAL_FUNC (editing_started),
icon);
@@ -1025,6 +1002,7 @@ icon_new_from_pixbuf (GnomeIconList *gil, GdkPixbuf *im,
gtk_signal_connect (GTK_OBJECT (icon->text), "height_changed",
GTK_SIGNAL_FUNC (height_changed),
icon);
+#endif
return icon;
}
@@ -1547,7 +1525,6 @@ real_select_icon (Gil *gil, gint num, GdkEvent *event)
return;
icon->selected = TRUE;
- gnome_icon_text_item_select (icon->text, TRUE);
priv->selection = g_list_append (priv->selection, GINT_TO_POINTER (num));
}
@@ -1569,7 +1546,6 @@ real_unselect_icon (Gil *gil, gint num, GdkEvent *event)
return;
icon->selected = FALSE;
- gnome_icon_text_item_select (icon->text, FALSE);
priv->selection = g_list_remove (priv->selection, GINT_TO_POINTER (num));
}
diff --git a/libgnomeui/libgnomeui.h b/libgnomeui/libgnomeui.h
index b413f27..f6089e6 100644
--- a/libgnomeui/libgnomeui.h
+++ b/libgnomeui/libgnomeui.h
@@ -46,7 +46,6 @@
#include <libgnomeui/gnome-geometry.h>
#include <libgnomeui/gnome-icon-list.h>
-#include <libgnomeui/gnome-icon-item.h>
#include <libgnomeui/gnome-canvas-init.h>
#include <libgnomeui/gnome-ui-init.h>
#include <libgnomeui/gnome-macros.h>
@@ -61,7 +60,6 @@
#include <libgnomeui/gnome-druid-page.h>
#include <libgnomeui/gnome-druid-page-edge.h>
#include <libgnomeui/gnome-druid-page-standard.h>
-#include <libgnomeui/oafgnome.h>
#include <libgnomeui/gnome-vfs-util.h>
#ifdef COMPAT_1_0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]