Commit 463aab93 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Various cleanups. (#315360, Kjartan Maraas)

2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
parent 9a5d4a2f
2005-09-13 Matthias Clasen <mclasen@redhat.com>
* gtk/*.c: Various cleanups. (#315360, Kjartan Maraas)
* gdk/*.c: Various cleanups. (#315359, Kjartan Maraas)
2005-09-13 Matthias Clasen <mclasen@redhat.com>
......
2005-09-13 Matthias Clasen <mclasen@redhat.com>
* gtk/*.c: Various cleanups. (#315360, Kjartan Maraas)
* gdk/*.c: Various cleanups. (#315359, Kjartan Maraas)
2005-09-13 Matthias Clasen <mclasen@redhat.com>
......
......@@ -179,11 +179,9 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkDialogClass *dialog_class;
object_class = (GObjectClass *)klass;
widget_class = (GtkWidgetClass *)klass;
dialog_class = (GtkDialogClass *)klass;
object_class->set_property = gtk_about_dialog_set_property;
object_class->get_property = gtk_about_dialog_get_property;
......
......@@ -693,12 +693,8 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
gboolean
gtk_accel_label_refetch (GtkAccelLabel *accel_label)
{
GtkAccelLabelClass *class;
g_return_val_if_fail (GTK_IS_ACCEL_LABEL (accel_label), FALSE);
class = GTK_ACCEL_LABEL_GET_CLASS (accel_label);
if (accel_label->accel_string)
{
g_free (accel_label->accel_string);
......
......@@ -387,8 +387,6 @@ internal_change_entry (const gchar *accel_path,
if (change_accel && !simulate)
{
guint old_accel_key, old_accel_mods;
/* ref accel groups */
for (slist = group_list; slist; slist = slist->next)
g_object_ref (slist->data);
......@@ -398,8 +396,6 @@ internal_change_entry (const gchar *accel_path,
internal_change_entry (g_quark_to_string (GPOINTER_TO_UINT (slist->data)), 0, 0, FALSE, FALSE);
/* 9) install new accelerator */
old_accel_key = entry->accel_key;
old_accel_mods = entry->accel_mods;
entry->accel_key = accel_key;
entry->accel_mods = accel_mods;
entry->changed = TRUE;
......
......@@ -441,11 +441,9 @@ static void
gtk_alignment_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
GtkAlignment *alignment;
GtkBin *bin;
GtkAlignmentPrivate *priv;
alignment = GTK_ALIGNMENT (widget);
bin = GTK_BIN (widget);
priv = GTK_ALIGNMENT_GET_PRIVATE (widget);
......
......@@ -760,12 +760,9 @@ static void
calendar_set_year_next (GtkCalendar *calendar)
{
gint month_len;
GtkWidget *widget;
g_return_if_fail (GTK_IS_WIDGET (calendar));
widget = GTK_WIDGET (calendar);
calendar->year++;
calendar_compute_days (calendar);
g_signal_emit (calendar,
......@@ -1678,16 +1675,10 @@ gtk_calendar_size_allocate (GtkWidget *widget,
GtkCalendarPrivate *priv = GTK_CALENDAR_GET_PRIVATE (widget);
gint xthickness = widget->style->xthickness;
gint ythickness = widget->style->xthickness;
gboolean year_left;
guint i;
widget->allocation = *allocation;
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
year_left = priv->year_before;
else
year_left = !priv->year_before;
if (calendar->display_flags & GTK_CALENDAR_SHOW_WEEK_NUMBERS)
{
priv->day_width = (priv->min_day_width
......@@ -1789,7 +1780,7 @@ calendar_paint_header (GtkCalendar *calendar)
cairo_t *cr;
char buffer[255];
int x, y;
gint header_width, cal_height;
gint header_width;
gint max_month_width;
gint max_year_width;
PangoLayout *layout;
......@@ -1807,7 +1798,6 @@ calendar_paint_header (GtkCalendar *calendar)
cr = gdk_cairo_create (priv->header_win);
header_width = widget->allocation.width - 2 * widget->style->xthickness;
cal_height = widget->allocation.height;
max_month_width = priv->max_month_width;
max_year_width = priv->max_year_width;
......@@ -1896,7 +1886,6 @@ calendar_paint_day_names (GtkCalendar *calendar)
char buffer[255];
int day,i;
int day_width, cal_width;
gint cal_height;
int day_wid_sep;
PangoLayout *layout;
PangoRectangle logical_rect;
......@@ -1912,7 +1901,6 @@ calendar_paint_day_names (GtkCalendar *calendar)
day_width = priv->day_width;
cal_width = widget->allocation.width;
cal_height = widget->allocation.height;
day_wid_sep = day_width + DAY_XSEP;
/*
......@@ -2125,14 +2113,14 @@ calendar_paint_day (GtkCalendar *calendar,
}
else
{
/*
#if 0
if (calendar->highlight_row == row && calendar->highlight_col == col)
{
cairo_set_source_color (cr, HIGHLIGHT_BG_COLOR (widget));
gdk_cairo_rectangle (cr, &day_rect);
cairo_fill (cr);
}
*/
#endif
if (calendar->selected_day == day)
{
gdk_cairo_set_source_color (cr, SELECTED_BG_COLOR (widget));
......
......@@ -330,11 +330,9 @@ static gint
gtk_check_button_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkCheckButton *check_button;
GtkToggleButton *toggle_button;
GtkBin *bin;
check_button = GTK_CHECK_BUTTON (widget);
toggle_button = GTK_TOGGLE_BUTTON (widget);
bin = GTK_BIN (widget);
......
......@@ -2814,7 +2814,7 @@ static void
real_remove_row (GtkCList *clist,
gint row)
{
gint was_visible, was_selected;
gint was_visible;
GList *list;
GtkCListRow *clist_row;
......@@ -2825,7 +2825,6 @@ real_remove_row (GtkCList *clist,
return;
was_visible = (gtk_clist_row_is_visible (clist, row) != GTK_VISIBILITY_NONE);
was_selected = 0;
/* get the row we're going to delete */
list = ROW_ELEMENT (clist, row);
......
......@@ -170,12 +170,10 @@ static void
gtk_color_button_class_init (GtkColorButtonClass *klass)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkButtonClass *button_class;
gobject_class = G_OBJECT_CLASS (klass);
object_class = GTK_OBJECT_CLASS (klass);
widget_class = GTK_WIDGET_CLASS (klass);
button_class = GTK_BUTTON_CLASS (klass);
......
......@@ -1290,8 +1290,6 @@ mouse_release (GtkWidget *invisible,
gpointer data)
{
GtkColorSelection *colorsel = data;
ColorSelectionPrivate *priv;
priv = colorsel->private_data;
if (event->button != 1)
return FALSE;
......@@ -1394,8 +1392,6 @@ mouse_press (GtkWidget *invisible,
gpointer data)
{
GtkColorSelection *colorsel = data;
ColorSelectionPrivate *priv;
priv = colorsel->private_data;
if (event->type == GDK_BUTTON_PRESS &&
event->button == 1)
......@@ -2335,7 +2331,6 @@ gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
{
ColorSelectionPrivate *priv;
gint i;
gboolean previous_changed;
g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel));
g_return_if_fail (color != NULL);
......@@ -2353,7 +2348,6 @@ gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
&priv->color[COLORSEL_VALUE]);
if (priv->default_set == FALSE)
{
previous_changed = TRUE;
for (i = 0; i < COLORSEL_NUM_CHANNELS; i++)
priv->old_color[i] = priv->color[i];
}
......
......@@ -81,7 +81,7 @@ gtk_color_selection_dialog_class_init (GtkColorSelectionDialogClass *klass)
static void
gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
{
GtkWidget *action_area_button_box, *frame;
GtkWidget *frame;
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
......@@ -95,8 +95,6 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
gtk_container_add (GTK_CONTAINER (frame), colorseldiag->colorsel);
gtk_widget_show (colorseldiag->colorsel);
action_area_button_box = GTK_DIALOG (colorseldiag)->action_area;
colorseldiag->cancel_button = gtk_dialog_add_button (GTK_DIALOG (colorseldiag),
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
......
......@@ -486,13 +486,10 @@ static void
gtk_combo_box_class_init (GtkComboBoxClass *klass)
{
GObjectClass *object_class;
GtkBindingSet *binding_set;
GtkObjectClass *gtk_object_class;
GtkContainerClass *container_class;
GtkWidgetClass *widget_class;
binding_set = gtk_binding_set_by_class (klass);
klass->get_active_text = gtk_combo_box_real_get_active_text;
container_class = (GtkContainerClass *)klass;
......
......@@ -497,7 +497,6 @@ gtk_container_child_set_valist (GtkContainer *container,
const gchar *first_property_name,
va_list var_args)
{
GObject *object;
GObjectNotifyQueue *nqueue;
const gchar *name;
......@@ -508,7 +507,6 @@ gtk_container_child_set_valist (GtkContainer *container,
g_object_ref (container);
g_object_ref (child);
object = G_OBJECT (container);
nqueue = g_object_notify_queue_freeze (G_OBJECT (child), _gtk_widget_child_property_notify_context);
name = first_property_name;
while (name)
......@@ -572,7 +570,6 @@ gtk_container_child_set_property (GtkContainer *container,
const gchar *property_name,
const GValue *value)
{
GObject *object;
GObjectNotifyQueue *nqueue;
GParamSpec *pspec;
......@@ -585,7 +582,6 @@ gtk_container_child_set_property (GtkContainer *container,
g_object_ref (container);
g_object_ref (child);
object = G_OBJECT (container);
nqueue = g_object_notify_queue_freeze (G_OBJECT (child), _gtk_widget_child_property_notify_context);
pspec = g_param_spec_pool_lookup (_gtk_widget_child_property_pool, property_name,
G_OBJECT_TYPE (container), TRUE);
......
......@@ -427,7 +427,6 @@ gtk_curve_graph_events (GtkWidget *widget, GdkEvent *event, GtkCurve *c)
{
GdkCursorType new_type = c->cursor_type;
gint i, src, dst, leftbound, rightbound;
GdkEventButton *bevent;
GdkEventMotion *mevent;
GtkWidget *w;
gint tx, ty;
......@@ -481,7 +480,6 @@ gtk_curve_graph_events (GtkWidget *widget, GdkEvent *event, GtkCurve *c)
case GDK_BUTTON_PRESS:
gtk_grab_add (widget);
bevent = (GdkEventButton *) event;
new_type = GDK_TCROSS;
switch (c->curve_type)
......
......@@ -3451,12 +3451,10 @@ gtk_drag_source_event_cb (GtkWidget *widget,
if (gtk_drag_check_threshold (widget, site->x, site->y,
event->motion.x, event->motion.y))
{
GdkDragContext *context;
site->state = 0;
context = gtk_drag_begin_internal (widget, site, site->target_list,
site->actions,
i, event);
gtk_drag_begin_internal (widget, site, site->target_list,
site->actions,
i, event);
retval = TRUE;
}
......
......@@ -1127,13 +1127,11 @@ static void
gtk_entry_realize (GtkWidget *widget)
{
GtkEntry *entry;
GtkEditable *editable;
GdkWindowAttr attributes;
gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
entry = GTK_ENTRY (widget);
editable = GTK_EDITABLE (widget);
attributes.window_type = GDK_WINDOW_CHILD;
......@@ -1704,12 +1702,7 @@ drag_begin_cb (GtkWidget *widget,
GdkDragContext *context,
gpointer data)
{
GtkEntry *entry;
g_signal_handlers_disconnect_by_func (widget, drag_begin_cb, NULL);
entry = GTK_ENTRY (widget);
}
static gint
......
......@@ -266,12 +266,10 @@ gtk_event_box_set_visible_window (GtkEventBox *event_box,
gboolean visible_window)
{
GtkWidget *widget;
GtkEventBoxPrivate *priv;
g_return_if_fail (GTK_IS_EVENT_BOX (event_box));
widget = GTK_WIDGET (event_box);
priv = GTK_EVENT_BOX_GET_PRIVATE (event_box);
visible_window = visible_window != FALSE;
......@@ -470,10 +468,8 @@ gtk_event_box_realize (GtkWidget *widget)
static void
gtk_event_box_unrealize (GtkWidget *widget)
{
GtkEventBox *event_box;
GtkEventBoxPrivate *priv;
event_box = GTK_EVENT_BOX (widget);
priv = GTK_EVENT_BOX_GET_PRIVATE (widget);
if (priv->event_window != NULL)
......
......@@ -501,7 +501,6 @@ get_expander_bounds (GtkExpander *expander,
GdkRectangle *rect)
{
GtkWidget *widget;
GtkBin *bin;
GtkExpanderPrivate *priv;
gint border_width;
gint expander_size;
......@@ -512,7 +511,6 @@ get_expander_bounds (GtkExpander *expander,
gboolean ltr;
widget = GTK_WIDGET (expander);
bin = GTK_BIN (expander);
priv = expander->priv;
border_width = GTK_CONTAINER (expander)->border_width;
......
......@@ -1124,14 +1124,10 @@ static void
gtk_file_chooser_button_style_set (GtkWidget *widget,
GtkStyle *old_style)
{
GtkFileChooserButtonPrivate *priv;
if (GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->style_set)
(*GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->style_set) (widget,
old_style);
priv = GTK_FILE_CHOOSER_BUTTON_GET_PRIVATE (widget);
if (gtk_widget_has_screen (widget))
change_icon_theme (GTK_FILE_CHOOSER_BUTTON (widget));
}
......
......@@ -1484,10 +1484,8 @@ shortcuts_append_paths (GtkFileChooserDefault *impl,
for (; paths; paths = paths->next)
{
GtkFilePath *path;
GError *error;
path = paths->data;
error = NULL;
if (impl->local_only &&
!gtk_file_system_path_is_local (impl->file_system, path))
......
......@@ -653,7 +653,6 @@ gtk_file_selection_init (GtkFileSelection *filesel)
GtkWidget *entry_vbox;
GtkWidget *label;
GtkWidget *list_hbox, *list_container;
GtkWidget *confirm_area;
GtkWidget *pulldown_hbox;
GtkWidget *scrolled_win;
GtkWidget *eventbox;
......@@ -797,7 +796,6 @@ gtk_file_selection_init (GtkFileSelection *filesel)
gtk_widget_show (filesel->action_area);
/* The OK/Cancel button area */
confirm_area = dialog->action_area;
/* The Cancel button */
filesel->cancel_button = gtk_dialog_add_button (dialog,
......@@ -3557,12 +3555,11 @@ static PossibleCompletion*
attempt_homedir_completion (gchar *text_to_complete,
CompletionState *cmpl_state)
{
gint index, length;
gint index;
if (!cmpl_state->user_dir_name_buffer &&
!get_pwdb (cmpl_state))
return NULL;
length = strlen (text_to_complete) - 1;
cmpl_state->user_completion_index += 1;
......
......@@ -1642,7 +1642,6 @@ do_files_changed (GtkFileSystemModel *model,
{
GtkTreeModel *tree_model = GTK_TREE_MODEL (model);
FileModelNode *children;
FileModelNode *prev = NULL;
GtkTreeIter iter;
GtkTreePath *path;
GSList *sorted_paths;
......@@ -1666,7 +1665,6 @@ do_files_changed (GtkFileSystemModel *model,
if (parent_node && parent_node->has_dummy)
{
prev = children;
children = children->next;
gtk_tree_path_next (path);
}
......@@ -1678,7 +1676,6 @@ do_files_changed (GtkFileSystemModel *model,
while (children &&
(!children->path || gtk_file_path_compare (children->path, file_path) < 0))
{
prev = children;
if (children->is_visible)
gtk_tree_path_next (path);
......
......@@ -146,11 +146,9 @@ gtk_font_button_get_type (void)
static void
gtk_font_button_class_init (GtkFontButtonClass *klass)
{
GtkObjectClass *object_class;
GObjectClass *gobject_class;
GtkButtonClass *button_class;
object_class = (GtkObjectClass *) klass;
gobject_class = (GObjectClass *) klass;
button_class = (GtkButtonClass *) klass;
......
......@@ -681,8 +681,10 @@ gtk_font_selection_select_font (GtkTreeSelection *selection,
GtkFontSelection *fontsel;
GtkTreeModel *model;
GtkTreeIter iter;
#ifdef INCLUDE_FONT_ENTRIES
const gchar *family_name;
#endif
fontsel = GTK_FONT_SELECTION (data);
if (gtk_tree_selection_get_selected (selection, &model, &iter))
......@@ -694,9 +696,8 @@ gtk_font_selection_select_font (GtkTreeSelection *selection,
{
fontsel->family = family;
family_name = pango_font_family_get_name (fontsel->family);
#ifdef INCLUDE_FONT_ENTRIES
family_name = pango_font_family_get_name (fontsel->family);
gtk_entry_set_text (GTK_ENTRY (fontsel->font_entry), family_name);
#endif
......@@ -936,12 +937,10 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel,
{
gint i;
GtkListStore *model;
GtkTreeSelection *selection;
gchar buffer[128];
gchar *p;
model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fontsel->size_list)));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (fontsel->size_list));
/* Insert the standard font sizes */
if (first_time)
......
......@@ -667,11 +667,9 @@ gtk_handle_box_size_allocate (GtkWidget *widget,
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
GtkWidget *child;
GtkAllocation child_allocation;
guint border_width;
child = bin->child;
border_width = GTK_CONTAINER (widget)->border_width;
child_allocation.x = border_width;
......@@ -904,8 +902,7 @@ gtk_handle_box_paint (GtkWidget *widget,
{
GtkBin *bin;
GtkHandleBox *hb;
guint width;
guint height;
guint width, height;
GdkRectangle rect;
GdkRectangle dest;
gint handle_position;
......
......@@ -198,7 +198,6 @@ gtk_hbutton_box_size_allocate (GtkWidget *widget,
{
GtkBox *base_box;
GtkButtonBox *box;
GtkHButtonBox *hbox;
GtkBoxChild *child;
GList *children;
GtkAllocation child_allocation;
......@@ -217,7 +216,6 @@ gtk_hbutton_box_size_allocate (GtkWidget *widget,
base_box = GTK_BOX (widget);
box = GTK_BUTTON_BOX (widget);
hbox = GTK_HBUTTON_BOX (widget);
spacing = base_box->spacing;
layout = box->layout_style != GTK_BUTTONBOX_DEFAULT_STYLE
? box->layout_style : default_layout_style;
......
......@@ -632,13 +632,10 @@ compute_sv (GtkHSV *hsv,
gdouble *s,
gdouble *v)
{
HSVPrivate *priv;
int ihx, ihy, isx, isy, ivx, ivy;
double hx, hy, sx, sy, vx, vy;
double center;
priv = hsv->priv;
compute_triangle (hsv, &ihx, &ihy, &isx, &isy, &ivx, &ivy);
center = GTK_WIDGET (hsv)->requisition.width / 2.0;
hx = ihx - center;
......@@ -736,13 +733,10 @@ compute_v (GtkHSV *hsv,
gdouble x,
gdouble y)
{
HSVPrivate *priv;
double center;
double dx, dy;
double angle;
priv = hsv->priv;
center = GTK_WIDGET (hsv)->requisition.width / 2.0;
dx = x - center;
dy = center - y;
......
......@@ -1741,7 +1741,7 @@ gtk_icon_view_set_cursor (GtkIconView *icon_view,
GtkCellRenderer *cell,
gboolean start_editing)
{
GtkIconViewItem *item;
GtkIconViewItem *item = NULL;
GtkIconViewCellInfo *info = NULL;
GList *l;
gint i, cell_pos;
......@@ -2361,7 +2361,6 @@ gtk_icon_view_layout_single_row (GtkIconView *icon_view,
gint *maximum_width)
{
gint focus_width;
gint spacing;
gint x, current_width;
GList *items, *last_item;
gint col;
......@@ -2382,8 +2381,6 @@ gtk_icon_view_layout_single_row (GtkIconView *icon_view,
"focus-line-width", &focus_width,
NULL);
spacing = icon_view->priv->spacing;
x += icon_view->priv->margin + focus_width;
current_width += 2 * (icon_view->priv->margin + focus_width);
......@@ -2777,12 +2774,11 @@ gtk_icon_view_paint_item (GtkIconView *icon_view,
gboolean draw_focus)
{
gint focus_width, focus_pad;
gint spacing, padding;
gint padding;
GdkRectangle cell_area, box;
GList *l;
gint i;
GtkStateType state;
gboolean rtl;
GtkCellRendererState flags;
if (icon_view->priv->model == NULL)
......@@ -2790,14 +2786,11 @@ gtk_icon_view_paint_item (GtkIconView *icon_view,
gtk_icon_view_set_cell_data (icon_view, item);
rtl = gtk_widget_get_direction (GTK_WIDGET (icon_view)) == GTK_TEXT_DIR_RTL;
gtk_widget_style_get (GTK_WIDGET (icon_view),
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
NULL);
spacing = icon_view->priv->spacing;
padding = focus_width;
if (item->selected)
......@@ -3245,7 +3238,7 @@ gtk_icon_view_row_inserted (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data)
{
gint length, index;
gint index;
GtkIconViewItem *item;
gboolean iters_persist;
GtkIconView *icon_view;
......@@ -3255,7 +3248,6 @@ gtk_icon_view_row_inserted (GtkTreeModel *model,
iters_persist = gtk_tree_model_get_flags (icon_view->priv->model) & GTK_TREE_MODEL_ITERS_PERSIST;
length = gtk_tree_model_iter_n_children (model, NULL);
index = gtk_tree_path_get_indices(path)[0];
item = gtk_icon_view_item_new ();
......@@ -3995,7 +3987,7 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
if (use_align)
{
gint x, y, width, height;
gint x, y;
gint focus_width;
gfloat offset, value;
......@@ -4464,7 +4456,6 @@ gtk_icon_view_get_visible_range (GtkIconView *icon_view,
{
gint start_index = -1;
gint end_index = -1;
GtkIconViewItem *item;
GList *icons;
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), FALSE);
......@@ -6178,7 +6169,6 @@ gtk_icon_view_drag_motion (GtkWidget *widget,
guint time)
{
GtkTreePath *path = NULL;
GtkTreeModel *model;
GtkIconViewDropPosition pos;
GtkIconView *icon_view;
GdkDragAction suggested_action = 0;
......@@ -6193,7 +6183,6 @@ gtk_icon_view_drag_motion (GtkWidget *widget,
gtk_icon_view_get_drag_dest_item (icon_view, &path, &pos);
/* we only know this *after* set_desination_row */
model = gtk_icon_view_get_model (icon_view);
empty = icon_view->priv->empty_view_drop;
if (path == NULL && !empty)
......@@ -6870,7 +6859,6 @@ gtk_icon_view_item_accessible_action_do_action (AtkAction *action,
gint i)
{
GtkIconViewItemAccessible *item;
GtkIconView *icon_view;
if (i < 0 || i >= LAST_ACTION)
return FALSE;
......@@ -6883,8 +6871,6 @@ gtk_icon_view_item_accessible_action_do_action (AtkAction *action,
if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT))
return FALSE;
icon_view = GTK_ICON_VIEW (item->widget);
switch (i)
{
case ACTION_ACTIVATE:
......@@ -7148,6 +7134,7 @@ gtk_icon_view_item_accessible_text_get_character_at_offset (AtkText *text,
return unichar;
}
#if 0
static void
get_pango_text_offsets (PangoLayout *layout,
GtkTextBuffer *buffer,
......@@ -7270,6 +7257,7 @@ get_pango_text_offsets (PangoLayout *layout,
gtk_text_buffer_get_iter_at_offset (buffer, start_iter, *start_offset);
gtk_text_buffer_get_iter_at_offset (buffer, end_iter, *end_offset);
}