Commit 58a9b33c authored by Darin Adler's avatar Darin Adler

Changed it to not attempt to create a GC just to measure the text. This

	* nautilus-icons-view-icon-item.c:
	(nautilus_icons_view_draw_text_box):
	Changed it to not attempt to create a GC just to measure the text.
	This makes it work when the widget is not realized.

	* nautilus-icons-view-icon-item.h:
	nautilus-icons-view-icon-item.c:
	gnome-icon-container-dnd.c:
	(nautilus_icons_view_icon_item_center_offset):
	Changed the parameter type to NautilusIconsViewIconItem.

	* fm-directory-view.c:
	(stop_load):
	(fm_directory_view_load_uri):
	Fixed code so that if you stop loading more than once, or
	stop before you even start, it won't send extra progress
	requests to the Nautilus shell or call stop_monitoring
	extra times on the NautilusDirectory object.

	* nautilus-icons-view-icon-item.h:
	nautilus-icons-view-icon-item.c:
	gnome-icon-container-dnd.c:
	Quick cleanup of the new NautilusIconsViewIconItem class.

	* libnautilus/gdk-extensions.c:
	libnautilus/gnome-icon-container-dnd.c:
	libnautilus/gnome-icon-container.c:
	libnautilus/gtkflist.c:
	libnautilus/nautilus-background-canvas-group.c:
	libnautilus/nautilus-background.c:
	libnautilus/nautilus-debug.c:
	libnautilus/nautilus-default-file-icon.c:
	libnautilus/nautilus-directory.c:
	libnautilus/nautilus-icon-factory.c:
	libnautilus/nautilus-icons-controller.c:
	libnautilus/nautilus-icons-view-icon-item.c:
	libnautilus/nautilus-lib-self-check-functions.c:
	libnautilus/nautilus-self-checks.c:
	libnautilus/nautilus-string.c:
	src/explorer-location-bar.c:
	src/file-manager/dfos-corba.c:
	src/file-manager/dfos-xfer-progress-dialog.c:
	src/file-manager/dfos-xfer.c:
	src/file-manager/dfos.c:
	src/file-manager/fm-directory-view-icons.c:
	src/file-manager/fm-directory-view-list.c:
	src/file-manager/fm-directory-view.c:
	src/file-manager/fm-icons-controller.c:
	src/file-manager/fm-main.c:
	src/nautilus-self-check-functions.c:
	src/ntl-index-panel.c:
	Got rid of #ifdef HAVE_CONFIG_H. Elliot says that we must always
	include <config.h>, but there's no reason to include that ifdef
	since we don't plan on building without a <config.h> ever.
parent e250cfd7
2000-01-31 Darin Adler <darin@eazel.com>
* nautilus-icons-view-icon-item.c:
(nautilus_icons_view_draw_text_box):
Changed it to not attempt to create a GC just to measure the text.
This makes it work when the widget is not realized.
* nautilus-icons-view-icon-item.h:
nautilus-icons-view-icon-item.c:
gnome-icon-container-dnd.c:
(nautilus_icons_view_icon_item_center_offset):
Changed the parameter type to NautilusIconsViewIconItem.
* fm-directory-view.c:
(stop_load):
(fm_directory_view_load_uri):
Fixed code so that if you stop loading more than once, or
stop before you even start, it won't send extra progress
requests to the Nautilus shell or call stop_monitoring
extra times on the NautilusDirectory object.
* nautilus-icons-view-icon-item.h:
nautilus-icons-view-icon-item.c:
gnome-icon-container-dnd.c:
Quick cleanup of the new NautilusIconsViewIconItem class.
* libnautilus/gdk-extensions.c:
libnautilus/gnome-icon-container-dnd.c:
libnautilus/gnome-icon-container.c:
libnautilus/gtkflist.c:
libnautilus/nautilus-background-canvas-group.c:
libnautilus/nautilus-background.c:
libnautilus/nautilus-debug.c:
libnautilus/nautilus-default-file-icon.c:
libnautilus/nautilus-directory.c:
libnautilus/nautilus-icon-factory.c:
libnautilus/nautilus-icons-controller.c:
libnautilus/nautilus-icons-view-icon-item.c:
libnautilus/nautilus-lib-self-check-functions.c:
libnautilus/nautilus-self-checks.c:
libnautilus/nautilus-string.c:
src/explorer-location-bar.c:
src/file-manager/dfos-corba.c:
src/file-manager/dfos-xfer-progress-dialog.c:
src/file-manager/dfos-xfer.c:
src/file-manager/dfos.c:
src/file-manager/fm-directory-view-icons.c:
src/file-manager/fm-directory-view-list.c:
src/file-manager/fm-directory-view.c:
src/file-manager/fm-icons-controller.c:
src/file-manager/fm-main.c:
src/nautilus-self-check-functions.c:
src/ntl-index-panel.c:
Got rid of #ifdef HAVE_CONFIG_H. Elliot says that we must always
include <config.h>, but there's no reason to include that ifdef
since we don't plan on building without a <config.h> ever.
2000-01-31 Andy Hertzfeld <andy@eazel.com>
* libnautilus/gnome-icon-container-dnd.c:
......
......@@ -22,10 +22,7 @@
Authors: Darin Adler <darin@eazel.com>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdk-extensions.h"
#include "nautilus-lib-self-check-functions.h"
......
......@@ -23,14 +23,11 @@
Author: Ettore Perazzoli <ettore@gnu.org>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gnome-icon-container-dnd.h"
#include "nautilus-icons-view-icon-item.h"
#include "gnome-icon-container-private.h"
#include "nautilus-icons-view-icon-item.h"
#include "nautilus-background.h"
#include "nautilus-gtk-extensions.h"
......@@ -217,8 +214,8 @@ set_gnome_icon_list_selection (GnomeIconContainer *container,
if (!icon->is_selected)
continue;
center_offset = nautilus_icons_view_icon_item_center_offset(icon->item);
center_offset = nautilus_icons_view_icon_item_center_offset
(NAUTILUS_ICONS_VIEW_ICON_ITEM (icon->item));
/* Corner of the icon relative to the cursor. */
icon_x = icon->x - details->dnd_info->start_x + floor(center_offset / canvas->pixels_per_unit);
......@@ -579,7 +576,8 @@ gnome_icon_container_receive_dropped_icons (GnomeIconContainer *container,
if (item->got_icon_position) {
int icon_x, icon_y;
double scale = icon->item->canvas->pixels_per_unit;
int center_offset = nautilus_icons_view_icon_item_center_offset(icon->item);
int center_offset = nautilus_icons_view_icon_item_center_offset
(NAUTILUS_ICONS_VIEW_ICON_ITEM (icon->item));
icon_x = (int) world_x + item->icon_x - (center_offset / scale);
icon_y = (int) world_y + item->icon_y;
......@@ -768,14 +766,11 @@ gnome_icon_container_dnd_begin_drag (GnomeIconContainer *container,
dnd_info->start_y = event->y;
/* start the drag */
context = gtk_drag_begin (GTK_WIDGET (container),
dnd_info->target_list,
actions,
button,
(GdkEvent *) event);
/* create a pixmap and mask to drag with */
pixbuf_item = GNOME_CANVAS_ITEM (container->details->drag_icon->item);
......@@ -784,40 +779,40 @@ gnome_icon_container_dnd_begin_drag (GnomeIconContainer *container,
temp_pixbuf = (GdkPixbuf *) GTK_VALUE_OBJECT (pixbuf_args[0]);
/* compute the image's offset */
canvas = GNOME_CANVAS(container);
canvas = GNOME_CANVAS (container);
x_offset = floor(event->x - pixbuf_item->x1 + .5);
y_offset = floor(event->y - pixbuf_item->y1 + .5);
x_offset = floor (event->x - pixbuf_item->x1 + .5);
y_offset = floor (event->y - pixbuf_item->y1 + .5);
center_offset = nautilus_icons_view_icon_item_center_offset(container->details->drag_icon->item);
center_offset = nautilus_icons_view_icon_item_center_offset
(NAUTILUS_ICONS_VIEW_ICON_ITEM (container->details->drag_icon->item));
x_offset -= center_offset;
/* if the scale factor isn't 1.0, we have to scale the pixmap */
/* FIXME: eventually need to get the size, if any, from the metadata here */
scaled_pixbuf = NULL;
if (container->details->zoom_level != NAUTILUS_ZOOM_LEVEL_STANDARD)
{
gint old_width, old_height;
gint new_width, new_height;
x_offset = floor(event->x * canvas->pixels_per_unit - center_offset - pixbuf_item->x1 + .5);
y_offset = floor(event->y * canvas->pixels_per_unit - pixbuf_item->y1 + .5);
old_width = gdk_pixbuf_get_width (temp_pixbuf);
old_height = gdk_pixbuf_get_height (temp_pixbuf);
new_width = floor((old_width * canvas->pixels_per_unit) + .5);
new_height = floor((old_height * canvas->pixels_per_unit) + .5);
scaled_pixbuf = gdk_pixbuf_scale_simple (temp_pixbuf, new_width, new_height, ART_FILTER_NEAREST);
temp_pixbuf = scaled_pixbuf;
}
if (container->details->zoom_level != NAUTILUS_ZOOM_LEVEL_STANDARD) {
gint old_width, old_height;
gint new_width, new_height;
x_offset = floor (event->x * canvas->pixels_per_unit - center_offset - pixbuf_item->x1 + .5);
y_offset = floor (event->y * canvas->pixels_per_unit - pixbuf_item->y1 + .5);
old_width = gdk_pixbuf_get_width (temp_pixbuf);
old_height = gdk_pixbuf_get_height (temp_pixbuf);
new_width = floor ((old_width * canvas->pixels_per_unit) + .5);
new_height = floor ((old_height * canvas->pixels_per_unit) + .5);
scaled_pixbuf = gdk_pixbuf_scale_simple (temp_pixbuf, new_width, new_height, ART_FILTER_NEAREST);
temp_pixbuf = scaled_pixbuf;
}
gdk_pixbuf_render_pixmap_and_mask (temp_pixbuf, &pixmap_for_dragged_file, &mask_for_dragged_file, 128);
if (scaled_pixbuf)
gdk_pixbuf_unref(scaled_pixbuf);
gdk_pixbuf_unref(scaled_pixbuf);
/* set the pixmap and mask for dragging */
gtk_drag_set_icon_pixmap (context, gtk_widget_get_colormap (GTK_WIDGET (container)),
pixmap_for_dragged_file, mask_for_dragged_file,
......
......@@ -22,10 +22,7 @@
Author: Ettore Perazzoli <ettore@gnu.org>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gnome-icon-container.h"
#include <string.h>
......
......@@ -12,10 +12,7 @@
native List widget that uses a simple API similiar to the GnomeIconContainer
one. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gtkflist.h"
#include <gtk/gtkdnd.h>
......
......@@ -22,10 +22,7 @@
Author: Darin Adler <darin@eazel.com>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "nautilus-background-canvas-group.h"
#include <libgnomeui/gnome-canvas.h>
......
......@@ -22,10 +22,7 @@
Author: Darin Adler <darin@eazel.com>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "nautilus-background.h"
#include <gtk/gtksignal.h>
......
......@@ -22,10 +22,7 @@
Author: Darin Adler <darin@eazel.com>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "nautilus-debug.h"
#include <glib.h>
......
......@@ -22,10 +22,7 @@
Author: Darin Adler <darin@eazel.com>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "nautilus-default-file-icon.h"
const int nautilus_default_file_icon_width = 48;
......
......@@ -22,10 +22,7 @@
Author: Darin Adler <darin@eazel.com>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "nautilus-directory.h"
#include <stdlib.h>
......
......@@ -21,14 +21,11 @@
Author: Ettore Perazzoli <ettore@gnu.org> */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "dfos-xfer-progress-dialog.h"
#include <gnome.h>
#include "dfos-xfer-progress-dialog.h"
#define DIALOG_WIDTH 350 /* FIXME? */
......
......@@ -20,17 +20,12 @@
Author: Ettore Perazzoli <ettore@gnu.org> */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "dfos.h"
#include <gnome.h>
#include <libgnomevfs/gnome-vfs.h>
#include "dfos.h"
#include "dfos-xfer.h"
struct _XferInfo {
GnomeVFSAsyncHandle *handle;
......
......@@ -23,14 +23,12 @@
Author: John Sullivan <sullivan@eazel.com>
*/
#ifdef HAVE_CONFIG_H
#include <string.h>
#include <stdio.h>
#include <config.h>
#endif
#include "nautilus-icon-factory.h"
#include <string.h>
#include <stdio.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-mime-info.h>
#include <libgnome/gnome-util.h>
......
......@@ -23,10 +23,7 @@
Author: Darin Adler <darin@eazel.com>
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "nautilus-icons-controller.h"
#include "nautilus-gtk-macros.h"
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* GNOME libraries - Icon Item class for Icon Container
*
* Copyright (C) 2000 Eazel, Inc
......@@ -21,21 +23,17 @@
*/
#include <config.h>
#include <math.h>
#include <stdio.h>
#include <libgnomeui/gnome-canvas.h>
#include <libgnomeui/gnome-canvas-util.h>
#include <libgnomeui/gnome-icon-text.h>
#include "nautilus-icons-view-icon-item.h"
#include <math.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libart_lgpl/art_rgb_pixbuf_affine.h>
#include <libgnomeui/gnome-canvas-util.h>
#include "gnome-icon-container-private.h"
#include "nautilus-icons-view-icon-item.h"
#include "nautilus-gtk-macros.h"
/* Private part of the NautilusIconsViewIconItem structure */
typedef struct {
struct _NautilusIconsViewIconItemDetails {
/* Our main gdk-pixbuf */
GdkPixbuf *pixbuf;
......@@ -74,7 +72,8 @@ typedef struct {
/* Whether the transformation or size have changed */
guint need_xform_update : 1;
} IconItemPrivate;
};
/* Object argument IDs */
......@@ -95,8 +94,8 @@ enum {
#define MAX_LABEL_WIDTH 80
static void nautilus_icons_view_icon_item_class_init (NautilusIconsViewIconItemClass *class);
static void nautilus_icons_view_icon_item_init (NautilusIconsViewIconItem *cpb);
static void nautilus_icons_view_icon_item_initialize_class (NautilusIconsViewIconItemClass *class);
static void nautilus_icons_view_icon_item_initialize (NautilusIconsViewIconItem *cpb);
static void nautilus_icons_view_icon_item_destroy (GtkObject *object);
static void nautilus_icons_view_icon_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
static void nautilus_icons_view_icon_item_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
......@@ -112,53 +111,17 @@ static void nautilus_icons_view_draw_text_box (GnomeCanvasItem* item, GdkDrawabl
static GdkFont* get_font_for_item(GnomeCanvasItem *item);
static GnomeCanvasItemClass *parent_class;
/**
* nautilus_icons_view_icon_item_get_type:
* @void:
*
* Registers the #NautilusIconsViewIconItem class if necessary, and returns the type ID
* associated to it.
*
* Return value: The type ID of the #NautilusIconsViewIconItem class.
**/
GtkType
nautilus_icons_view_icon_item_get_type (void)
{
static GtkType icon_item_type = 0;
if (!icon_item_type) {
static const GtkTypeInfo icon_type_info = {
"NautilusIconsViewIconItem",
sizeof (NautilusIconsViewIconItem),
sizeof (NautilusIconsViewIconItemClass),
(GtkClassInitFunc) nautilus_icons_view_icon_item_class_init,
(GtkObjectInitFunc) nautilus_icons_view_icon_item_init,
NULL, /* reserved_1 */
NULL, /* reserved_2 */
(GtkClassInitFunc) NULL
};
icon_item_type = gtk_type_unique (gnome_canvas_item_get_type (),
&icon_type_info);
}
return icon_item_type;
}
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusIconsViewIconItem, nautilus_icons_view_icon_item, GNOME_TYPE_CANVAS_ITEM)
/* Class initialization function for the icon canvas item */
static void
nautilus_icons_view_icon_item_class_init (NautilusIconsViewIconItemClass *class)
nautilus_icons_view_icon_item_initialize_class (NautilusIconsViewIconItemClass *class)
{
GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
object_class = (GtkObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
parent_class = gtk_type_class (gnome_canvas_item_get_type ());
object_class = GTK_OBJECT_CLASS (class);
item_class = GNOME_CANVAS_ITEM_CLASS (class);
gtk_object_add_arg_type ("NautilusIconsViewIconItem::pixbuf",
GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_PIXBUF);
......@@ -193,27 +156,12 @@ nautilus_icons_view_icon_item_class_init (NautilusIconsViewIconItemClass *class)
/* Object initialization function for the icon item */
static void
nautilus_icons_view_icon_item_init (NautilusIconsViewIconItem *icon_view_item)
nautilus_icons_view_icon_item_initialize (NautilusIconsViewIconItem *icon_view_item)
{
IconItemPrivate *priv;
NautilusIconsViewIconItemDetails *details;
priv = g_new0 (IconItemPrivate, 1);
icon_view_item->priv = priv;
priv->width = 0.0;
priv->height = 0.0;
priv->x = 0.0;
priv->y = 0.0;
priv->text_width = 0.0;
priv->text_height = 0.0;
priv->is_selected = FALSE;
priv->is_alt_selected = FALSE;
priv->is_hilited = FALSE;
priv->need_pixbuf_update = FALSE;
priv->need_xform_update = FALSE;
details = g_new0 (NautilusIconsViewIconItemDetails, 1);
icon_view_item->details = details;
}
/* Destroy handler for the icon canvas item */
......@@ -222,26 +170,23 @@ nautilus_icons_view_icon_item_destroy (GtkObject *object)
{
GnomeCanvasItem *item;
NautilusIconsViewIconItem *icon_view_item;
IconItemPrivate *priv;
NautilusIconsViewIconItemDetails *details;
g_return_if_fail (object != NULL);
g_return_if_fail (NAUTILUS_IS_ICONS_VIEW_ICON_ITEM (object));
item = GNOME_CANVAS_ITEM (object);
icon_view_item = (NAUTILUS_ICONS_VIEW_ICON_ITEM (object));
priv = icon_view_item->priv;
details = icon_view_item->details;
gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
if (priv->pixbuf)
gdk_pixbuf_unref (priv->pixbuf);
if (priv->label)
g_free(priv->label);
if (details->pixbuf != NULL)
gdk_pixbuf_unref (details->pixbuf);
g_free(details->label);
g_free (priv);
g_free (details);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object));
}
/* Set_arg handler for the icon item */
......@@ -251,89 +196,89 @@ nautilus_icons_view_icon_item_set_arg (GtkObject *object, GtkArg *arg, guint arg
{
GnomeCanvasItem *item;
NautilusIconsViewIconItem *icon_view_item;
IconItemPrivate *priv;
NautilusIconsViewIconItemDetails *details;
GdkPixbuf *pixbuf;
gchar* new_label;
double val;
item = GNOME_CANVAS_ITEM (object);
icon_view_item = NAUTILUS_ICONS_VIEW_ICON_ITEM (object);
priv = icon_view_item->priv;
details = icon_view_item->details;
switch (arg_id) {
case ARG_PIXBUF:
pixbuf = GTK_VALUE_POINTER (*arg);
if (pixbuf != priv->pixbuf) {
if (pixbuf != details->pixbuf) {
if (pixbuf) {
g_return_if_fail (pixbuf->art_pixbuf->format == ART_PIX_RGB);
g_return_if_fail (pixbuf->art_pixbuf->n_channels == 3
|| pixbuf->art_pixbuf->n_channels == 4);
g_return_if_fail (pixbuf->art_pixbuf->bits_per_sample == 8);
gdk_pixbuf_ref (pixbuf);
}
if (details->pixbuf)
gdk_pixbuf_unref (details->pixbuf);
if (priv->pixbuf)
gdk_pixbuf_unref (priv->pixbuf);
priv->pixbuf = pixbuf;
details->pixbuf = pixbuf;
}
priv->need_pixbuf_update = TRUE;
details->need_pixbuf_update = TRUE;
gnome_canvas_item_request_update (item);
break;
case ARG_LABEL:
new_label = GTK_VALUE_STRING (*arg);
if (priv->label)
g_free(priv->label);
priv->label = g_strdup(new_label);
if (details->label)
g_free(details->label);
details->label = g_strdup(new_label);
priv->need_pixbuf_update = TRUE;
details->need_pixbuf_update = TRUE;
gnome_canvas_item_request_update (item);
break;
case ARG_WIDTH:
val = GTK_VALUE_DOUBLE (*arg);
g_return_if_fail (val >= 0.0);
priv->width = val;
priv->need_xform_update = TRUE;
details->width = val;
details->need_xform_update = TRUE;
gnome_canvas_item_request_update (item);
break;
case ARG_HEIGHT:
val = GTK_VALUE_DOUBLE (*arg);
g_return_if_fail (val >= 0.0);
priv->height = val;
priv->need_xform_update = TRUE;
details->height = val;
details->need_xform_update = TRUE;
gnome_canvas_item_request_update (item);
break;
case ARG_X:
priv->x = GTK_VALUE_DOUBLE (*arg);
priv->need_xform_update = TRUE;
details->x = GTK_VALUE_DOUBLE (*arg);
details->need_xform_update = TRUE;
gnome_canvas_item_request_update (item);
break;
case ARG_Y:
priv->y = GTK_VALUE_DOUBLE (*arg);
priv->need_xform_update = TRUE;
details->y = GTK_VALUE_DOUBLE (*arg);
details->need_xform_update = TRUE;
gnome_canvas_item_request_update (item);
break;
case ARG_SELECTED:
priv->is_selected = GTK_VALUE_BOOL (*arg);
details->is_selected = GTK_VALUE_BOOL (*arg);
gnome_canvas_item_request_update (item);
break;
case ARG_ALT_SELECTED:
priv->is_alt_selected = GTK_VALUE_BOOL (*arg);
details->is_alt_selected = GTK_VALUE_BOOL (*arg);
gnome_canvas_item_request_update (item);
break;
case ARG_HILITED:
priv->is_hilited = GTK_VALUE_BOOL (*arg);
details->is_hilited = GTK_VALUE_BOOL (*arg);
gnome_canvas_item_request_update (item);
break;
......@@ -348,48 +293,49 @@ static void
nautilus_icons_view_icon_item_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
NautilusIconsViewIconItem *icon_view_item;
IconItemPrivate *priv;
NautilusIconsViewIconItemDetails *details;
icon_view_item = NAUTILUS_ICONS_VIEW_ICON_ITEM (object);
priv = icon_view_item->priv;
switch (arg_id) {
details = icon_view_item->details;
switch (arg_id) {
case ARG_PIXBUF:
GTK_VALUE_POINTER (*arg) = priv->pixbuf;
GTK_VALUE_POINTER (*arg) = details->pixbuf;
break;
case ARG_LABEL:
GTK_VALUE_STRING (*arg) = priv->label;
GTK_VALUE_STRING (*arg) = details->label;
break;