diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-09-13 19:57:42 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-09-13 19:57:42 +0000 |
commit | 463aab93dd04bb815f13ff8f17019071162a8ac3 (patch) | |
tree | 539f4100082e7cb0fcb1a1ba449e3b7791eb4cfd | |
parent | 9a5d4a2ff9e9117b731418d0deafd4204cace1c4 (diff) | |
download | gtk+-463aab93dd04bb815f13ff8f17019071162a8ac3.tar.gz |
Various cleanups. (#315360, Kjartan Maraas)
2005-09-13 Matthias Clasen <mclasen@redhat.com>
* gtk/*.c: Various cleanups. (#315360, Kjartan Maraas)
75 files changed, 59 insertions, 373 deletions
@@ -1,5 +1,7 @@ 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> diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 403ad254fe..10c288aad3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,7 @@ 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> diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index a5cbe6e423..54303c4460 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -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; diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c index 5c783b2110..92a7c9aaa9 100644 --- a/gtk/gtkaccellabel.c +++ b/gtk/gtkaccellabel.c @@ -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); diff --git a/gtk/gtkaccelmap.c b/gtk/gtkaccelmap.c index 98150ed221..c95fbcfc8e 100644 --- a/gtk/gtkaccelmap.c +++ b/gtk/gtkaccelmap.c @@ -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; diff --git a/gtk/gtkalignment.c b/gtk/gtkalignment.c index 0248ca285a..544e388ee7 100644 --- a/gtk/gtkalignment.c +++ b/gtk/gtkalignment.c @@ -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); diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 7cb668a816..f74a35b8d2 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -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)); diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index a65772c890..31442fc33b 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -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); diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index f0de2671e6..9a8220c91c 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -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); diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index b509643981..677e9f58b6 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -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); diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c index 525888ae94..0ffb70d3be 100644 --- a/gtk/gtkcolorsel.c +++ b/gtk/gtkcolorsel.c @@ -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]; } diff --git a/gtk/gtkcolorseldialog.c b/gtk/gtkcolorseldialog.c index 97a84fff56..5e0641e681 100644 --- a/gtk/gtkcolorseldialog.c +++ b/gtk/gtkcolorseldialog.c @@ -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); diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 1a4b107734..f6a6a22771 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -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; diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index a02d16539c..7f7bff9d33 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -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); diff --git a/gtk/gtkcurve.c b/gtk/gtkcurve.c index c96c3658d9..2e691b1d31 100644 --- a/gtk/gtkcurve.c +++ b/gtk/gtkcurve.c @@ -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) diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index d7ac5c04da..7f05cc69f3 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -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; } diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 2814f2b344..435a40b6f8 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -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 diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c index fd7e90cdf7..01a05681d6 100644 --- a/gtk/gtkeventbox.c +++ b/gtk/gtkeventbox.c @@ -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) diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index 45208679a2..7335b0b1a9 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -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; diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 7b41b036db..e9117f9328 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -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)); } diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 16f52d68f0..d3f9a2dcb6 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -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)) diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index 53e17a7587..0d7325d1b2 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -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; diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index 1e3158dfab..9c2dd30607 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -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); diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c index d49c62d775..a0c6802a70 100644 --- a/gtk/gtkfontbutton.c +++ b/gtk/gtkfontbutton.c @@ -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; diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c index 7e83cc45d3..3f95b14a81 100644 --- a/gtk/gtkfontsel.c +++ b/gtk/gtkfontsel.c @@ -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) diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c index 884930c9fe..e5f535163d 100644 --- a/gtk/gtkhandlebox.c +++ b/gtk/gtkhandlebox.c @@ -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; diff --git a/gtk/gtkhbbox.c b/gtk/gtkhbbox.c index 3dda89c16f..9fdf66516b 100644 --- a/gtk/gtkhbbox.c +++ b/gtk/gtkhbbox.c @@ -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; diff --git a/gtk/gtkhsv.c b/gtk/gtkhsv.c index 3b4a16f1d6..39b79e0da1 100644 --- a/gtk/gtkhsv.c +++ b/gtk/gtkhsv.c @@ -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; diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 0ffb62bc89..e039353913 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -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); } +#endif static gchar* gtk_icon_view_item_accessible_text_get_text_before_offset (AtkText *text, @@ -7281,7 +7269,9 @@ gtk_icon_view_item_accessible_text_get_text_before_offset (AtkText *text GtkIconViewItemAccessible *item; GtkTextIter start, end; GtkTextBuffer *buffer; +#if 0 GtkIconView *icon_view; +#endif item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text); @@ -7356,8 +7346,8 @@ gtk_icon_view_item_accessible_text_get_text_before_offset (AtkText *text break; case ATK_TEXT_BOUNDARY_LINE_START: case ATK_TEXT_BOUNDARY_LINE_END: - icon_view = GTK_ICON_VIEW (item->widget); #if 0 + icon_view = GTK_ICON_VIEW (item->widget); /* FIXME we probably have to use GailTextCell to salvage this */ gtk_icon_view_update_item_text (icon_view, item->item); get_pango_text_offsets (icon_view->priv->layout, @@ -7389,7 +7379,9 @@ gtk_icon_view_item_accessible_text_get_text_at_offset (AtkText *text, GtkIconViewItemAccessible *item; GtkTextIter start, end; GtkTextBuffer *buffer; +#if 0 GtkIconView *icon_view; +#endif item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text); @@ -7462,8 +7454,8 @@ gtk_icon_view_item_accessible_text_get_text_at_offset (AtkText *text, break; case ATK_TEXT_BOUNDARY_LINE_START: case ATK_TEXT_BOUNDARY_LINE_END: - icon_view = GTK_ICON_VIEW (item->widget); #if 0 + icon_view = GTK_ICON_VIEW (item->widget); /* FIXME we probably have to use GailTextCell to salvage this */ gtk_icon_view_update_item_text (icon_view, item->item); get_pango_text_offsets (icon_view->priv->layout, @@ -7496,7 +7488,9 @@ gtk_icon_view_item_accessible_text_get_text_after_offset (AtkText *text, GtkIconViewItemAccessible *item; GtkTextIter start, end; GtkTextBuffer *buffer; +#if 0 GtkIconView *icon_view; +#endif item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text); @@ -7576,8 +7570,8 @@ gtk_icon_view_item_accessible_text_get_text_after_offset (AtkText *text, break; case ATK_TEXT_BOUNDARY_LINE_START: case ATK_TEXT_BOUNDARY_LINE_END: - icon_view = GTK_ICON_VIEW (item->widget); #if 0 + icon_view = GTK_ICON_VIEW (item->widget); /* FIXME we probably have to use GailTextCell to salvage this */ gtk_icon_view_update_item_text (icon_view, item->item); get_pango_text_offsets (icon_view->priv->layout, @@ -7624,10 +7618,12 @@ gtk_icon_view_item_accessible_text_get_character_extents (AtkText *text, AtkCoordType coord_type) { GtkIconViewItemAccessible *item; +#if 0 GtkIconView *icon_view; PangoRectangle char_rect; const gchar *item_text; gint index; +#endif item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text); @@ -7637,8 +7633,8 @@ gtk_icon_view_item_accessible_text_get_character_extents (AtkText *text, if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT)) return; - icon_view = GTK_ICON_VIEW (item->widget); #if 0 + icon_view = GTK_ICON_VIEW (item->widget); /* FIXME we probably have to use GailTextCell to salvage this */ gtk_icon_view_update_item_text (icon_view, item->item); item_text = pango_layout_get_text (icon_view->priv->layout); @@ -7662,11 +7658,13 @@ gtk_icon_view_item_accessible_text_get_offset_at_point (AtkText *text, AtkCoordType coord_type) { GtkIconViewItemAccessible *item; + gint offset = 0; +#if 0 GtkIconView *icon_view; const gchar *item_text; gint index; - gint offset; gint l_x, l_y; +#endif item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text); @@ -7676,8 +7674,8 @@ gtk_icon_view_item_accessible_text_get_offset_at_point (AtkText *text, if (atk_state_set_contains_state (item->state_set, ATK_STATE_DEFUNCT)) return -1; - icon_view = GTK_ICON_VIEW (item->widget); #if 0 + icon_view = GTK_ICON_VIEW (item->widget); /* FIXME we probably have to use GailTextCell to salvage this */ gtk_icon_view_update_item_text (icon_view, item->item); atk_component_get_position (ATK_COMPONENT (text), &l_x, &l_y, coord_type); @@ -8565,14 +8563,12 @@ gtk_icon_view_accessible_notify_gtk (GObject *obj, GtkIconView *icon_view; GtkWidget *widget; AtkObject *atk_obj; - GtkIconViewAccessible *view; GtkIconViewAccessiblePrivate *priv; if (strcmp (pspec->name, "model") == 0) { widget = GTK_WIDGET (obj); atk_obj = gtk_widget_get_accessible (widget); - view = GTK_ICON_VIEW_ACCESSIBLE (atk_obj); priv = gtk_icon_view_accessible_get_priv (atk_obj); if (priv->model) { diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 37be14a667..23a76b7279 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -308,10 +308,8 @@ gtk_image_set_property (GObject *object, GParamSpec *pspec) { GtkImage *image; - GtkImagePrivate *priv; image = GTK_IMAGE (object); - priv = GTK_IMAGE_GET_PRIVATE (image); switch (prop_id) { diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c index 4aac44d5e1..548000379f 100644 --- a/gtk/gtkitemfactory.c +++ b/gtk/gtkitemfactory.c @@ -181,10 +181,6 @@ gtk_item_factory_class_init (GtkItemFactoryClass *class) static void gtk_item_factory_init (GtkItemFactory *ifactory) { - GtkObject *object; - - object = GTK_OBJECT (ifactory); - ifactory->path = NULL; ifactory->accel_group = NULL; ifactory->widget = NULL; @@ -1322,14 +1318,11 @@ void gtk_item_factory_delete_item (GtkItemFactory *ifactory, const gchar *path) { - GtkItemFactoryClass *class; GtkWidget *widget; g_return_if_fail (GTK_IS_ITEM_FACTORY (ifactory)); g_return_if_fail (path != NULL); - class = GTK_ITEM_FACTORY_GET_CLASS (ifactory); - widget = gtk_item_factory_get_widget (ifactory, path); if (widget) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index e0cd823e8a..10992e48e4 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1774,14 +1774,11 @@ gtk_label_ensure_layout (GtkLabel *label) { GtkWidget *widget; PangoRectangle logical_rect; - gint rwidth, rheight; gboolean rtl; widget = GTK_WIDGET (label); rtl = gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL; - rwidth = label->misc.xpad * 2; - rheight = label->misc.ypad * 2; if (!label->layout) { @@ -2084,10 +2081,8 @@ gtk_label_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { GtkLabel *label; - GtkLabelPrivate *priv; label = GTK_LABEL (widget); - priv = GTK_LABEL_GET_PRIVATE (widget); (* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation); @@ -2910,16 +2905,15 @@ gtk_label_motion (GtkWidget *widget, label->select_info->drag_start_y, event->x, event->y)) { - GdkDragContext *context; GtkTargetList *target_list = gtk_target_list_new (NULL, 0); gtk_target_list_add_text_targets (target_list, 0); g_signal_connect (widget, "drag-begin", G_CALLBACK (drag_begin_cb), NULL); - context = gtk_drag_begin (widget, target_list, - GDK_ACTION_COPY, - 1, (GdkEvent *)event); + gtk_drag_begin (widget, target_list, + GDK_ACTION_COPY, + 1, (GdkEvent *)event); label->select_info->in_drag = FALSE; @@ -3708,10 +3702,7 @@ gtk_label_move_backward_word (GtkLabel *label, { gint new_pos = g_utf8_pointer_to_offset (label->text, label->text + start); - gint length; - length = g_utf8_strlen (label->text, -1); - if (new_pos > 0) { PangoLogAttr *log_attrs; diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c index 52b1689d36..07d272f6a9 100644 --- a/gtk/gtklayout.c +++ b/gtk/gtklayout.c @@ -1141,10 +1141,6 @@ static void gtk_layout_adjustment_changed (GtkAdjustment *adjustment, GtkLayout *layout) { - GtkWidget *widget; - - widget = GTK_WIDGET (layout); - if (layout->freeze_count) return; diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c index 4d3de9f7a6..000fa960ff 100644 --- a/gtk/gtklistitem.c +++ b/gtk/gtklistitem.c @@ -544,14 +544,10 @@ static gint gtk_list_item_expose (GtkWidget *widget, GdkEventExpose *event) { - GtkBin *bin; - g_return_val_if_fail (widget != NULL, FALSE); if (GTK_WIDGET_DRAWABLE (widget)) { - bin = GTK_BIN (widget); - if (widget->state == GTK_STATE_NORMAL) { gdk_window_set_back_pixmap (widget->window, NULL, TRUE); diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 56f3c986f8..7a2c596368 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1550,7 +1550,6 @@ void gtk_grab_add (GtkWidget *widget) { GtkWindowGroup *group; - gboolean was_grabbed; g_return_if_fail (widget != NULL); @@ -1560,8 +1559,6 @@ gtk_grab_add (GtkWidget *widget) group = gtk_main_get_window_group (widget); - was_grabbed = (group->grabs != NULL); - g_object_ref (widget); group->grabs = g_slist_prepend (group->grabs, widget); diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 1761f4848f..0722d8788c 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -932,7 +932,6 @@ gtk_menu_destroy (GtkObject *object) { GtkMenu *menu; GtkMenuAttachData *data; - GtkMenuPrivate *priv; g_return_if_fail (GTK_IS_MENU (object)); @@ -970,8 +969,6 @@ gtk_menu_destroy (GtkObject *object) if (menu->tearoff_window) gtk_widget_destroy (menu->tearoff_window); - priv = gtk_menu_get_private (menu); - GTK_OBJECT_CLASS (parent_class)->destroy (object); } @@ -1131,13 +1128,11 @@ gtk_menu_remove (GtkContainer *container, GtkWidget *widget) { GtkMenu *menu; - GtkMenuPrivate *priv; g_return_if_fail (GTK_IS_MENU (container)); g_return_if_fail (GTK_IS_MENU_ITEM (widget)); menu = GTK_MENU (container); - priv = gtk_menu_get_private (menu); /* Clear out old_active_menu_item if it matches the item we are removing */ @@ -2781,7 +2776,6 @@ gtk_menu_motion_notify (GtkWidget *widget, GtkWidget *menu_item; GtkMenu *menu; GtkMenuShell *menu_shell; - GtkMenuPrivate *priv; gboolean need_enter; @@ -2805,8 +2799,6 @@ gtk_menu_motion_notify (GtkWidget *widget, menu_shell = GTK_MENU_SHELL (menu_item->parent); menu = GTK_MENU (menu_shell); - priv = gtk_menu_get_private (GTK_MENU (widget)); - if (definitely_within_item (menu_item, event->x, event->y)) menu_shell->activate_time = 0; diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index bc63b056d8..402d7a5856 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -120,7 +120,6 @@ static void gtk_menu_bar_class_init (GtkMenuBarClass *class) { GObjectClass *gobject_class; - GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkMenuShellClass *menu_shell_class; @@ -129,7 +128,6 @@ gtk_menu_bar_class_init (GtkMenuBarClass *class) parent_class = g_type_class_peek_parent (class); gobject_class = (GObjectClass*) class; - object_class = (GtkObjectClass*) class; widget_class = (GtkWidgetClass*) class; menu_shell_class = (GtkMenuShellClass*) class; diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index 9f9b2a05e7..28e8db6349 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -974,7 +974,6 @@ static void gtk_real_menu_item_activate_item (GtkMenuItem *menu_item) { GtkWidget *widget; - GtkMenuShell *submenu; g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); @@ -996,7 +995,6 @@ gtk_real_menu_item_activate_item (GtkMenuItem *menu_item) _gtk_menu_item_popup_submenu (widget); gtk_menu_shell_select_first (GTK_MENU_SHELL (menu_item->submenu), TRUE); - submenu = GTK_MENU_SHELL (menu_item->submenu); } } } @@ -1443,13 +1441,11 @@ gtk_menu_item_forall (GtkContainer *container, gpointer callback_data) { GtkBin *bin; - GtkMenuItem *menu_item; g_return_if_fail (GTK_IS_MENU_ITEM (container)); g_return_if_fail (callback != NULL); bin = GTK_BIN (container); - menu_item = GTK_MENU_ITEM (container); if (bin->child) callback (bin->child, callback_data); diff --git a/gtk/gtkmenutoolbutton.c b/gtk/gtkmenutoolbutton.c index d44f8bc50d..b8210613b1 100644 --- a/gtk/gtkmenutoolbutton.c +++ b/gtk/gtkmenutoolbutton.c @@ -238,7 +238,6 @@ gtk_menu_tool_button_class_init (GtkMenuToolButtonClass *klass) GtkObjectClass *gtk_object_class; GtkWidgetClass *widget_class; GtkToolItemClass *toolitem_class; - GtkToolButtonClass *toolbutton_class; parent_class = g_type_class_peek_parent (klass); @@ -246,7 +245,6 @@ gtk_menu_tool_button_class_init (GtkMenuToolButtonClass *klass) gtk_object_class = (GtkObjectClass *)klass; widget_class = (GtkWidgetClass *)klass; toolitem_class = (GtkToolItemClass *)klass; - toolbutton_class = (GtkToolButtonClass *)klass; object_class->set_property = gtk_menu_tool_button_set_property; object_class->get_property = gtk_menu_tool_button_get_property; diff --git a/gtk/gtkmisc.c b/gtk/gtkmisc.c index 7a22c14974..1a0225d9c3 100644 --- a/gtk/gtkmisc.c +++ b/gtk/gtkmisc.c @@ -332,14 +332,12 @@ gtk_misc_get_padding (GtkMisc *misc, static void gtk_misc_realize (GtkWidget *widget) { - GtkMisc *misc; GdkWindowAttr attributes; gint attributes_mask; g_return_if_fail (GTK_IS_MISC (widget)); GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); - misc = GTK_MISC (widget); if (GTK_WIDGET_NO_WINDOW (widget)) { diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 422bc75e97..ea7b12f549 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -1937,14 +1937,11 @@ gtk_notebook_leave_notify (GtkWidget *widget, GdkEventCrossing *event) { GtkNotebook *notebook = GTK_NOTEBOOK (widget); - GtkNotebookArrow arrow; gint x, y; if (!get_widget_coordinates (widget, (GdkEvent *)event, &x, &y)) return FALSE; - arrow = gtk_notebook_get_arrow (notebook, x, y); - if (notebook->in_child) { notebook->in_child = 0; @@ -3906,7 +3903,6 @@ gtk_notebook_switch_focus_tab (GtkNotebook *notebook, GList *new_child) { GList *old_child; - GtkNotebookPage *old_page = NULL; GtkNotebookPage *page; g_return_if_fail (GTK_IS_NOTEBOOK (notebook)); @@ -3923,9 +3919,6 @@ gtk_notebook_switch_focus_tab (GtkNotebook *notebook, if (!notebook->show_tabs || !notebook->focus_tab) return; - if (old_child) - old_page = old_child->data; - page = notebook->focus_tab->data; if (GTK_WIDGET_MAPPED (page->tab_label)) gtk_notebook_redraw_tabs (notebook); diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c index ffcf99c3d2..bd54e5e90a 100644 --- a/gtk/gtkoptionmenu.c +++ b/gtk/gtkoptionmenu.c @@ -154,13 +154,11 @@ gtk_option_menu_class_init (GtkOptionMenuClass *class) GObjectClass *gobject_class; GtkObjectClass *object_class; GtkWidgetClass *widget_class; - GtkButtonClass *button_class; GtkContainerClass *container_class; gobject_class = (GObjectClass*) class; object_class = (GtkObjectClass*) class; widget_class = (GtkWidgetClass*) class; - button_class = (GtkButtonClass*) class; container_class = (GtkContainerClass*) class; parent_class = g_type_class_peek_parent (class); diff --git a/gtk/gtkpixmap.c b/gtk/gtkpixmap.c index e8c4b37976..d2834bf209 100644 --- a/gtk/gtkpixmap.c +++ b/gtk/gtkpixmap.c @@ -77,10 +77,8 @@ static void gtk_pixmap_class_init (GtkPixmapClass *class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); - GtkObjectClass *object_class; GtkWidgetClass *widget_class; - object_class = (GtkObjectClass*) class; widget_class = (GtkWidgetClass*) class; parent_class = gtk_type_class (gtk_misc_get_type ()); diff --git a/gtk/gtkplug-x11.c b/gtk/gtkplug-x11.c index c2dff4a250..ae687a05d8 100644 --- a/gtk/gtkplug-x11.c +++ b/gtk/gtkplug-x11.c @@ -233,7 +233,7 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent, * root window as the reliable end of the embedding protocol */ - return GDK_FILTER_REMOVE; + return_val = GDK_FILTER_REMOVE; } break; case ReparentNotify: @@ -324,5 +324,5 @@ _gtk_plug_windowing_filter_func (GdkXEvent *gdk_xevent, } } - return GDK_FILTER_CONTINUE; + return return_val; } diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c index 66a83c0dee..36090e53a8 100644 --- a/gtk/gtkpreview.c +++ b/gtk/gtkpreview.c @@ -105,10 +105,8 @@ static void gtk_preview_class_init (GtkPreviewClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - GtkObjectClass *object_class; GtkWidgetClass *widget_class; - object_class = (GtkObjectClass*) klass; widget_class = (GtkWidgetClass*) klass; parent_class = gtk_type_class (GTK_TYPE_WIDGET); @@ -247,7 +245,6 @@ gtk_preview_put (GtkPreview *preview, gint width, gint height) { - GtkWidget *widget; GdkRectangle r1, r2, r3; guchar *src; guint bpp; @@ -259,8 +256,6 @@ gtk_preview_put (GtkPreview *preview, if (!preview->buffer) return; - widget = GTK_WIDGET (preview); - r1.x = 0; r1.y = 0; r1.width = preview->buffer_width; diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c index 55679451c0..d29ae67fe3 100644 --- a/gtk/gtkprogressbar.c +++ b/gtk/gtkprogressbar.c @@ -574,7 +574,6 @@ gtk_progress_bar_act_mode_enter (GtkProgress *progress) { GtkProgressBar *pbar; GtkWidget *widget; - gint size; GtkProgressBarOrientation orientation; pbar = GTK_PROGRESS_BAR (progress); @@ -594,8 +593,6 @@ gtk_progress_bar_act_mode_enter (GtkProgress *progress) if (orientation == GTK_PROGRESS_LEFT_TO_RIGHT || orientation == GTK_PROGRESS_RIGHT_TO_LEFT) { - size = MAX (2, widget->allocation.width / pbar->activity_blocks); - if (orientation == GTK_PROGRESS_LEFT_TO_RIGHT) { pbar->activity_pos = widget->style->xthickness; @@ -611,8 +608,6 @@ gtk_progress_bar_act_mode_enter (GtkProgress *progress) } else { - size = MAX (2, widget->allocation.height / pbar->activity_blocks); - if (orientation == GTK_PROGRESS_TOP_TO_BOTTOM) { pbar->activity_pos = widget->style->ythickness; diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c index 61c8dada47..6ca752318c 100644 --- a/gtk/gtkradiobutton.c +++ b/gtk/gtkradiobutton.c @@ -196,10 +196,6 @@ gtk_radio_button_get_property (GObject *object, GValue *value, GParamSpec *pspec) { - GtkRadioButton *radio_button; - - radio_button = GTK_RADIO_BUTTON (object); - switch (prop_id) { default: diff --git a/gtk/gtkradiomenuitem.c b/gtk/gtkradiomenuitem.c index 7a9b82fe09..5c74509bb6 100644 --- a/gtk/gtkradiomenuitem.c +++ b/gtk/gtkradiomenuitem.c @@ -129,10 +129,6 @@ gtk_radio_menu_item_get_property (GObject *object, GValue *value, GParamSpec *pspec) { - GtkRadioMenuItem *radio_menu_item; - - radio_menu_item = GTK_RADIO_MENU_ITEM (object); - switch (prop_id) { default: diff --git a/gtk/gtkrbtree.c b/gtk/gtkrbtree.c index cc9d85342b..e46cc98dfd 100644 --- a/gtk/gtkrbtree.c +++ b/gtk/gtkrbtree.c @@ -1213,7 +1213,6 @@ _gtk_rbtree_remove_node (GtkRBTree *tree, GtkRBNode *x, *y; GtkRBTree *tmp_tree; GtkRBNode *tmp_node; - gint node_height; gint y_height; g_return_if_fail (tree != NULL); @@ -1259,7 +1258,6 @@ _gtk_rbtree_remove_node (GtkRBTree *tree, /* offsets and parity adjust all the way up through parent trees */ y_height = GTK_RBNODE_GET_HEIGHT (y); - node_height = GTK_RBNODE_GET_HEIGHT (node) + (node->children?node->children->root->offset:0); tmp_tree = tree; tmp_node = y; diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c index 1cb611160f..fb70fb5779 100644 --- a/gtk/gtkscrollbar.c +++ b/gtk/gtkscrollbar.c @@ -131,9 +131,6 @@ gtk_scrollbar_class_init (GtkScrollbarClass *class) static void gtk_scrollbar_init (GtkScrollbar *scrollbar) { - GtkRange *range; - - range = GTK_RANGE (scrollbar); } static void diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 9322211ded..8251e174d5 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -1385,8 +1385,6 @@ settings_update_font_options (GtkSettings *settings) cairo_antialias_t antialias_mode = CAIRO_ANTIALIAS_DEFAULT; gchar *rgba_str; cairo_subpixel_order_t subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT; - gint dpi_int; - double dpi; cairo_font_options_t *options; g_object_get (settings, @@ -1394,14 +1392,8 @@ settings_update_font_options (GtkSettings *settings) "gtk-xft-hinting", &hinting, "gtk-xft-hintstyle", &hint_style_str, "gtk-xft-rgba", &rgba_str, - "gtk-xft-dpi", &dpi_int, NULL); - if (dpi_int > 0) - dpi = dpi_int / 1024.; - else - dpi = -1.; - options = cairo_font_options_create (); if (hinting >= 0 && !hinting) diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c index bfed9505cf..2a16957de5 100644 --- a/gtk/gtkstatusbar.c +++ b/gtk/gtkstatusbar.c @@ -130,12 +130,10 @@ gtk_statusbar_class_init (GtkStatusbarClass *class) GObjectClass *gobject_class; GtkObjectClass *object_class; GtkWidgetClass *widget_class; - GtkContainerClass *container_class; gobject_class = (GObjectClass *) class; object_class = (GtkObjectClass *) class; widget_class = (GtkWidgetClass *) class; - container_class = (GtkContainerClass *) class; parent_class = g_type_class_peek_parent (class); diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index d5cddc7f33..44a6573080 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -3025,13 +3025,8 @@ gtk_default_draw_arrow (GtkStyle *style, gint width, gint height) { - gint original_width, original_x; - sanitize_size (window, &width, &height); - original_width = width; - original_x = x; - calculate_arrow_geometry (arrow_type, &x, &y, &width, &height); if (detail && strcmp (detail, "menu_scroll_arrow_up") == 0) @@ -3192,13 +3187,9 @@ gtk_default_draw_string (GtkStyle *style, gint y, const gchar *string) { - GdkDisplay *display; - g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (window != NULL); - display = gdk_drawable_get_display (window); - if (area) { gdk_gc_set_clip_rectangle (style->white_gc, area); diff --git a/gtk/gtktearoffmenuitem.c b/gtk/gtktearoffmenuitem.c index 1c61856e57..c41af0aaaf 100644 --- a/gtk/gtktearoffmenuitem.c +++ b/gtk/gtktearoffmenuitem.c @@ -82,11 +82,9 @@ gtk_tearoff_menu_item_new (void) static void gtk_tearoff_menu_item_class_init (GtkTearoffMenuItemClass *klass) { - GtkObjectClass *object_class; GtkWidgetClass *widget_class; GtkMenuItemClass *menu_item_class; - object_class = (GtkObjectClass*) klass; widget_class = (GtkWidgetClass*) klass; menu_item_class = (GtkMenuItemClass*) klass; @@ -107,10 +105,6 @@ static void gtk_tearoff_menu_item_size_request (GtkWidget *widget, GtkRequisition *requisition) { - GtkTearoffMenuItem *tearoff; - - tearoff = GTK_TEAROFF_MENU_ITEM (widget); - requisition->width = (GTK_CONTAINER (widget)->border_width + widget->style->xthickness + BORDER_SPACING) * 2; @@ -132,7 +126,6 @@ gtk_tearoff_menu_item_paint (GtkWidget *widget, GdkRectangle *area) { GtkMenuItem *menu_item; - GtkTearoffMenuItem *tearoff_item; GtkShadowType shadow_type; gint width, height; gint x, y; @@ -143,7 +136,6 @@ gtk_tearoff_menu_item_paint (GtkWidget *widget, if (GTK_WIDGET_DRAWABLE (widget)) { menu_item = GTK_MENU_ITEM (widget); - tearoff_item = GTK_TEAROFF_MENU_ITEM (widget); direction = gtk_widget_get_direction (widget); diff --git a/gtk/gtktext.c b/gtk/gtktext.c index dd5d11de33..ba0f37d26f 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -1107,7 +1107,7 @@ gboolean gtk_text_forward_delete (GtkText *text, guint nchars) { - guint old_lines, old_height; + guint old_lines = 0, old_height = 0; GtkOldEditable *old_editable = GTK_OLD_EDITABLE (text); gboolean frozen = FALSE; @@ -1601,13 +1601,11 @@ gtk_text_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { GtkText *text; - GtkOldEditable *old_editable; g_return_if_fail (GTK_IS_TEXT (widget)); g_return_if_fail (allocation != NULL); text = GTK_TEXT (widget); - old_editable = GTK_OLD_EDITABLE (widget); widget->allocation = *allocation; if (GTK_WIDGET_REALIZED (widget)) @@ -2368,7 +2366,7 @@ fetch_lines (GtkText* text, static void fetch_lines_backward (GtkText* text) { - GList* new_lines = NULL, *new_line_start; + GList *new_line_start; GtkPropertyMark mark; if (CACHE_DATA(text->line_start_cache).start.index == 0) @@ -2378,7 +2376,7 @@ fetch_lines_backward (GtkText* text) CACHE_DATA(text->line_start_cache).start.index - 1, &CACHE_DATA(text->line_start_cache).start); - new_line_start = new_lines = fetch_lines (text, &mark, NULL, FetchLinesCount, 1); + new_line_start = fetch_lines (text, &mark, NULL, FetchLinesCount, 1); while (new_line_start->next) new_line_start = new_line_start->next; @@ -5106,12 +5104,8 @@ drawn_cursor_min (GtkText* text) static gint drawn_cursor_max (GtkText* text) { - GdkFont* font; - g_assert(text->cursor_mark.property); - font = MARK_CURRENT_FONT(text, &text->cursor_mark); - return text->cursor_pos_y - text->cursor_char_offset; } diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 5ebfcf80dc..1e78da9eb5 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -2091,7 +2091,6 @@ _gtk_text_btree_get_line_at_char (GtkTextBTree *tree, GtkTextLineSegment *seg; int chars_left; int chars_in_line; - int bytes_in_line; node = tree->root_node; @@ -2137,7 +2136,6 @@ _gtk_text_btree_get_line_at_char (GtkTextBTree *tree, */ chars_in_line = 0; - bytes_in_line = 0; seg = NULL; for (line = node->children.line; line != NULL; line = line->next) { @@ -2177,13 +2175,11 @@ _gtk_text_btree_get_tags (const GtkTextIter *iter, int src, dst, index; TagInfo tagInfo; GtkTextLine *line; - GtkTextBTree *tree; gint byte_index; #define NUM_TAG_INFOS 10 line = _gtk_text_iter_get_text_line (iter); - tree = _gtk_text_iter_get_btree (iter); byte_index = gtk_text_iter_get_line_index (iter); tagInfo.numTags = 0; @@ -2371,7 +2367,6 @@ _gtk_text_btree_get_text (const GtkTextIter *start_orig, GtkTextLineSegment *seg; GtkTextLineSegment *end_seg; GString *retval; - GtkTextBTree *tree; gchar *str; GtkTextIter iter; GtkTextIter start; @@ -2389,8 +2384,6 @@ _gtk_text_btree_get_text (const GtkTextIter *start_orig, retval = g_string_new (NULL); - tree = _gtk_text_iter_get_btree (&start); - end_seg = _gtk_text_iter_get_indexable_segment (&end); iter = start; seg = _gtk_text_iter_get_indexable_segment (&iter); @@ -3913,7 +3906,6 @@ _gtk_text_line_byte_locate (GtkTextLine *line, gint *line_byte_offset) { GtkTextLineSegment *seg; - GtkTextLineSegment *after_prev_indexable; GtkTextLineSegment *after_last_indexable; GtkTextLineSegment *last_indexable; gint offset; @@ -3930,7 +3922,6 @@ _gtk_text_line_byte_locate (GtkTextLine *line, last_indexable = NULL; after_last_indexable = line->segments; - after_prev_indexable = line->segments; seg = line->segments; /* The loop ends when we're inside a segment; @@ -3943,7 +3934,6 @@ _gtk_text_line_byte_locate (GtkTextLine *line, offset -= seg->byte_count; bytes_in_line += seg->byte_count; last_indexable = seg; - after_prev_indexable = after_last_indexable; after_last_indexable = last_indexable->next; } @@ -3993,7 +3983,6 @@ _gtk_text_line_char_locate (GtkTextLine *line, gint *line_char_offset) { GtkTextLineSegment *seg; - GtkTextLineSegment *after_prev_indexable; GtkTextLineSegment *after_last_indexable; GtkTextLineSegment *last_indexable; gint offset; @@ -4010,7 +3999,6 @@ _gtk_text_line_char_locate (GtkTextLine *line, last_indexable = NULL; after_last_indexable = line->segments; - after_prev_indexable = line->segments; seg = line->segments; /* The loop ends when we're inside a segment; @@ -4023,7 +4011,6 @@ _gtk_text_line_char_locate (GtkTextLine *line, offset -= seg->char_count; chars_in_line += seg->char_count; last_indexable = seg; - after_prev_indexable = after_last_indexable; after_last_indexable = last_indexable->next; } diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index aa56e28284..398993170f 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -855,7 +855,6 @@ insert_range_untagged (GtkTextBuffer *buffer, GtkTextIter range_start; GtkTextIter range_end; GtkTextIter start, end; - GtkTextBuffer *src_buffer; Range *r; if (gtk_text_iter_equal (orig_start, orig_end)) @@ -864,8 +863,6 @@ insert_range_untagged (GtkTextBuffer *buffer, start = *orig_start; end = *orig_end; - src_buffer = gtk_text_iter_get_buffer (&start); - range_start = start; range_end = start; @@ -971,13 +968,10 @@ insert_range_not_inside_self (GtkTextBuffer *buffer, GtkTextIter end = *orig_end; GtkTextIter range_start; GtkTextIter range_end; - GtkTextBuffer *src_buffer; if (gtk_text_iter_equal (orig_start, orig_end)) return; - src_buffer = gtk_text_iter_get_buffer (orig_start); - gtk_text_iter_order (&start, &end); range_start = start; diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c index b644e139cd..0a62df89b4 100644 --- a/gtk/gtktextiter.c +++ b/gtk/gtktextiter.c @@ -1547,13 +1547,10 @@ gtk_text_iter_starts_line (const GtkTextIter *iter) gboolean gtk_text_iter_ends_line (const GtkTextIter *iter) { - GtkTextRealIter *real; gunichar wc; g_return_val_if_fail (iter != NULL, FALSE); - real = gtk_text_iter_make_real (iter); - check_invariants (iter); /* Only one character has type G_UNICODE_PARAGRAPH_SEPARATOR in diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index 85598c95b7..84f4e5cdeb 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -1505,7 +1505,6 @@ add_child_attrs (GtkTextLayout *layout, { PangoAttribute *attr; PangoRectangle logical_rect; - GtkTextChildAnchor *anchor; gint width, height; GSList *tmp_list; GtkWidget *widget; @@ -1513,8 +1512,6 @@ add_child_attrs (GtkTextLayout *layout, width = 1; height = 1; - anchor = seg->body.child.obj; - tmp_list = seg->body.child.widgets; while (tmp_list != NULL) { diff --git a/gtk/gtktexttagtable.c b/gtk/gtktexttagtable.c index 8d22070e2b..704ddd584d 100644 --- a/gtk/gtktexttagtable.c +++ b/gtk/gtktexttagtable.c @@ -201,10 +201,6 @@ gtk_text_tag_table_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - GtkTextTagTable *table; - - table = GTK_TEXT_TAG_TABLE (object); - switch (prop_id) { @@ -221,10 +217,6 @@ gtk_text_tag_table_get_property (GObject *object, GValue *value, GParamSpec *pspec) { - GtkTextTagTable *table; - - table = GTK_TEXT_TAG_TABLE (object); - switch (prop_id) { diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c index 7552a8cb8c..6678e4e3b6 100644 --- a/gtk/gtktextutil.c +++ b/gtk/gtktextutil.c @@ -187,7 +187,6 @@ _gtk_text_util_create_drag_icon (GtkWidget *widget, PangoLayout *layout; gint pixmap_height, pixmap_width; gint layout_width, layout_height; - gint n_lines; g_return_val_if_fail (widget != NULL, NULL); g_return_val_if_fail (text != NULL, NULL); @@ -201,7 +200,6 @@ _gtk_text_util_create_drag_icon (GtkWidget *widget, layout_width = MIN (layout_width, DRAG_ICON_MAX_WIDTH * PANGO_SCALE); pango_layout_set_width (layout, layout_width); - n_lines = pango_layout_get_line_count (layout); limit_layout_lines (layout); diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index d5e5be18ca..a194e9d69b 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -2553,12 +2553,9 @@ static void gtk_text_view_destroy (GtkObject *object) { GtkTextView *text_view; - GtkTextLayout *layout; text_view = GTK_TEXT_VIEW (object); - layout = text_view->layout; - gtk_text_view_remove_validate_idles (text_view); gtk_text_view_set_buffer (text_view, NULL); gtk_text_view_destroy_layout (text_view); @@ -3775,9 +3772,6 @@ emit_event_on_tags (GtkWidget *widget, GSList *tags; GSList *tmp; gboolean retval = FALSE; - GtkTextView *text_view; - - text_view = GTK_TEXT_VIEW (widget); tags = gtk_text_iter_get_tags (iter); @@ -4331,11 +4325,9 @@ static gboolean gtk_text_view_focus (GtkWidget *widget, GtkDirectionType direction) { - GtkTextView *text_view; GtkContainer *container; gboolean result; - text_view = GTK_TEXT_VIEW (widget); container = GTK_CONTAINER (widget); if (!gtk_widget_is_focus (widget) && @@ -6041,7 +6033,6 @@ gtk_text_view_start_selection_dnd (GtkTextView *text_view, const GtkTextIter *iter, GdkEventMotion *event) { - GdkDragContext *context; GtkTargetList *target_list; text_view->drag_start_x = -1; @@ -6054,9 +6045,9 @@ gtk_text_view_start_selection_dnd (GtkTextView *text_view, g_signal_connect (text_view, "drag-begin", G_CALLBACK (drag_begin_cb), NULL); - context = gtk_drag_begin (GTK_WIDGET (text_view), target_list, - GDK_ACTION_COPY | GDK_ACTION_MOVE, - 1, (GdkEvent*)event); + gtk_drag_begin (GTK_WIDGET (text_view), target_list, + GDK_ACTION_COPY | GDK_ACTION_MOVE, + 1, (GdkEvent*)event); gtk_target_list_unref (target_list); } @@ -6072,9 +6063,6 @@ static void gtk_text_view_drag_end (GtkWidget *widget, GdkDragContext *context) { - GtkTextView *text_view; - - text_view = GTK_TEXT_VIEW (widget); } static void @@ -6125,10 +6113,6 @@ static void gtk_text_view_drag_data_delete (GtkWidget *widget, GdkDragContext *context) { - GtkTextView *text_view; - - text_view = GTK_TEXT_VIEW (widget); - gtk_text_buffer_delete_selection (GTK_TEXT_VIEW (widget)->buffer, TRUE, GTK_TEXT_VIEW (widget)->editable); } diff --git a/gtk/gtktoggleaction.c b/gtk/gtktoggleaction.c index 547157ed90..332b1cbd40 100644 --- a/gtk/gtktoggleaction.c +++ b/gtk/gtktoggleaction.c @@ -293,10 +293,6 @@ static void disconnect_proxy (GtkAction *action, GtkWidget *proxy) { - GtkToggleAction *toggle_action; - - toggle_action = GTK_TOGGLE_ACTION (action); - (* GTK_ACTION_CLASS (parent_class)->disconnect_proxy) (action, proxy); } diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 8a60d46149..10f0542564 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -1747,7 +1747,7 @@ gtk_toolbar_size_allocate (GtkWidget *widget, new_states[i] == NORMAL) { GtkAllocation alloc; - GtkAllocation start_allocation; + GtkAllocation start_allocation = { 0, }; GtkAllocation goal_allocation; if (priv->is_sliding) @@ -3722,9 +3722,7 @@ internal_insert_element (GtkToolbar *toolbar, { GtkWidget *box; ToolbarContent *content; - GtkToolbarPrivate *priv; char *free_me = NULL; - gboolean is_button = FALSE; GtkWidget *child_widget; GtkWidget *child_label; @@ -3741,8 +3739,6 @@ internal_insert_element (GtkToolbar *toolbar, if (!gtk_toolbar_check_old_api (toolbar)) return NULL; - priv = GTK_TOOLBAR_GET_PRIVATE (toolbar); - child_widget = NULL; child_label = NULL; child_icon = NULL; @@ -3759,7 +3755,6 @@ internal_insert_element (GtkToolbar *toolbar, case GTK_TOOLBAR_CHILD_BUTTON: case GTK_TOOLBAR_CHILD_TOGGLEBUTTON: case GTK_TOOLBAR_CHILD_RADIOBUTTON: - is_button = TRUE; if (type == GTK_TOOLBAR_CHILD_BUTTON) { child_widget = gtk_button_new (); @@ -4815,12 +4810,10 @@ _gtk_toolbar_paint_space_line (GtkWidget *widget, const double start_fraction = (SPACE_LINE_START / SPACE_LINE_DIVISION); const double end_fraction = (SPACE_LINE_END / SPACE_LINE_DIVISION); - GtkToolbarSpaceStyle space_style; GtkOrientation orientation; g_return_if_fail (GTK_IS_WIDGET (widget)); - space_style = toolbar? get_space_style (toolbar) : DEFAULT_SPACE_STYLE; orientation = toolbar? toolbar->orientation : GTK_ORIENTATION_HORIZONTAL; if (orientation == GTK_ORIENTATION_HORIZONTAL) diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index 8d53c83ba5..959104087c 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -126,13 +126,11 @@ static void gtk_tool_button_class_init (GtkToolButtonClass *klass) { GObjectClass *object_class; - GtkWidgetClass *widget_class; GtkToolItemClass *tool_item_class; parent_class = g_type_class_peek_parent (klass); object_class = (GObjectClass *)klass; - widget_class = (GtkWidgetClass *)klass; tool_item_class = (GtkToolItemClass *)klass; object_class->set_property = gtk_tool_button_set_property; diff --git a/gtk/gtktooltips.c b/gtk/gtktooltips.c index 484d34335b..3c720c5e4d 100644 --- a/gtk/gtktooltips.c +++ b/gtk/gtktooltips.c @@ -398,7 +398,6 @@ gtk_tooltips_draw_tips (GtkTooltips *tooltips) { GtkRequisition requisition; GtkWidget *widget; - GtkStyle *style; gint x, y, w, h; GtkTooltipsData *data; gboolean keyboard_mode; @@ -413,7 +412,6 @@ gtk_tooltips_draw_tips (GtkTooltips *tooltips) g_get_current_time (&tooltips->last_popdown); gtk_widget_ensure_style (tooltips->tip_window); - style = tooltips->tip_window->style; widget = tooltips->active_tips_data->widget; g_object_set_data (G_OBJECT (tooltips->tip_window), I_(tooltips_info_key), diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c index 2b824d7bea..46fa3a4aa8 100644 --- a/gtk/gtktreeitem.c +++ b/gtk/gtktreeitem.c @@ -611,7 +611,6 @@ static void gtk_tree_item_paint (GtkWidget *widget, GdkRectangle *area) { - GtkBin *bin; GdkRectangle child_area, item_area; GtkTreeItem* tree_item; @@ -626,7 +625,6 @@ gtk_tree_item_paint (GtkWidget *widget, */ if (GTK_WIDGET_DRAWABLE (widget)) { - bin = GTK_BIN (widget); tree_item = GTK_TREE_ITEM(widget); if (widget->state == GTK_STATE_NORMAL) @@ -751,12 +749,10 @@ gtk_tree_item_expose (GtkWidget *widget, static void gtk_real_tree_item_select (GtkItem *item) { - GtkTreeItem *tree_item; GtkWidget *widget; g_return_if_fail (GTK_IS_TREE_ITEM (item)); - tree_item = GTK_TREE_ITEM (item); widget = GTK_WIDGET (item); gtk_widget_set_state (GTK_WIDGET (item), GTK_STATE_SELECTED); diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index 6576519cc4..e9e97ce9a0 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -848,7 +848,7 @@ gtk_tree_model_filter_remove_node (GtkTreeModelFilter *filter, { FilterElt *elt, *parent; FilterLevel *level, *parent_level; - gint offset, i, length, level_refcount; + gint i, length, level_refcount; /* FIXME: this function is very ugly. I need to rethink and * rewrite it someday. @@ -860,7 +860,6 @@ gtk_tree_model_filter_remove_node (GtkTreeModelFilter *filter, parent = level->parent_elt; parent_level = level->parent_level; length = level->array->len; - offset = elt->offset; /* ref counting */ while (elt->ref_count > 0) @@ -1191,7 +1190,7 @@ gtk_tree_model_filter_row_inserted (GtkTreeModel *c_model, FilterLevel *level; FilterLevel *parent_level; - gint i = 0, offset, index = -1; + gint i = 0, offset; gboolean free_c_path = FALSE; @@ -1334,7 +1333,6 @@ gtk_tree_model_filter_row_inserted (GtkTreeModel *c_model, break; g_array_insert_val (level->array, i, felt); - index = i; if (!level->parent_level) filter->priv->root_level_visible++; diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index a004b6c4df..9bc15100a3 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -560,8 +560,6 @@ gint gtk_tree_selection_count_selected_rows (GtkTreeSelection *selection) { gint count = 0; - GtkRBTree *tree; - GtkRBNode *node; g_return_val_if_fail (GTK_IS_TREE_SELECTION (selection), 0); g_return_val_if_fail (selection->tree_view != NULL, 0); @@ -579,9 +577,6 @@ gtk_tree_selection_count_selected_rows (GtkTreeSelection *selection) return 0; } - tree = selection->tree_view->priv->tree; - node = selection->tree_view->priv->tree->root; - _gtk_rbtree_traverse (selection->tree_view->priv->tree, selection->tree_view->priv->tree->root, G_PRE_ORDER, diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 50c8b52276..d1f62ffdcd 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -1514,7 +1514,6 @@ gtk_tree_view_realize (GtkWidget *widget) { GList *tmp_list; GtkTreeView *tree_view; - GdkGCValues values; GdkWindowAttr attributes; gint attributes_mask; @@ -1576,12 +1575,6 @@ gtk_tree_view_realize (GtkWidget *widget) &attributes, attributes_mask); gdk_window_set_user_data (tree_view->priv->header_window, widget); - - values.foreground = (widget->style->white.pixel==0 ? - widget->style->black:widget->style->white); - values.function = GDK_XOR; - values.subwindow_mode = GDK_INCLUDE_INFERIORS; - /* Add them all up. */ widget->style = gtk_style_attach (widget->style, widget->window); gdk_window_set_background (widget->window, &widget->style->base[widget->state]); @@ -3454,7 +3447,7 @@ gtk_tree_view_bin_expose (GtkWidget *widget, GtkRBTree *drag_highlight_tree = NULL; GtkTreeIter iter; gint new_y; - gint y_offset, x_offset, cell_offset; + gint y_offset, cell_offset; gint max_height; gint depth; GdkRectangle background_area; @@ -3588,7 +3581,6 @@ gtk_tree_view_bin_expose (GtkWidget *widget, max_height = ROW_HEIGHT (tree_view, BACKGROUND_HEIGHT (node)); - x_offset = -event->area.x; cell_offset = 0; highlight_x = 0; /* should match x coord of first cell */ @@ -6206,10 +6198,6 @@ gtk_tree_view_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time) { - TreeViewDragInfo *di; - - di = get_info (GTK_TREE_VIEW (widget)); - /* unset any highlight row */ gtk_tree_view_set_drag_dest_row (GTK_TREE_VIEW (widget), NULL, @@ -6229,7 +6217,6 @@ gtk_tree_view_drag_motion (GtkWidget *widget, { gboolean empty; GtkTreePath *path = NULL; - GtkTreeModel *model; GtkTreeViewDropPosition pos; GtkTreeView *tree_view; GdkDragAction suggested_action = 0; @@ -6243,7 +6230,6 @@ gtk_tree_view_drag_motion (GtkWidget *widget, gtk_tree_view_get_drag_dest_row (tree_view, &path, &pos); /* we only know this *after* set_desination_row */ - model = gtk_tree_view_get_model (tree_view); empty = tree_view->priv->empty_view_drop; if (path == NULL && !empty) @@ -6676,7 +6662,6 @@ gtk_tree_view_header_focus (GtkTreeView *tree_view, GtkDirectionType dir) { GtkWidget *focus_child; - GtkContainer *container; GList *last_column, *first_column; GList *tmp_list; @@ -6686,7 +6671,6 @@ gtk_tree_view_header_focus (GtkTreeView *tree_view, return FALSE; focus_child = GTK_CONTAINER (tree_view)->focus_child; - container = GTK_CONTAINER (tree_view); first_column = tree_view->priv->columns; while (first_column) @@ -10851,7 +10835,6 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view, gboolean collapse; gint x, y; GList *list; - GdkDisplay *display; GdkWindow *child, *parent; remove_auto_expand_timeout (tree_view); @@ -11002,7 +10985,6 @@ gtk_tree_view_real_collapse_row (GtkTreeView *tree_view, /* now that we've collapsed all rows, we want to try to set the prelight * again. To do this, we fake a motion event and send it to ourselves. */ - display = gdk_drawable_get_display (tree_view->priv->bin_window); child = tree_view->priv->bin_window; parent = gdk_window_get_parent (child); diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index edf2dd8f7b..b39997745a 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -2025,7 +2025,6 @@ update_smart_separators (GtkWidget *proxy) gboolean empty; GList *children, *cur, *last; GtkWidget *filler; - gint i; children = gtk_container_get_children (GTK_CONTAINER (parent)); @@ -2034,7 +2033,6 @@ update_smart_separators (GtkWidget *proxy) empty = TRUE; filler = NULL; - i = 0; cur = children; while (cur) { diff --git a/gtk/gtkvbbox.c b/gtk/gtkvbbox.c index be718e7f30..65c0b0e96a 100644 --- a/gtk/gtkvbbox.c +++ b/gtk/gtkvbbox.c @@ -202,7 +202,6 @@ gtk_vbutton_box_size_allocate (GtkWidget *widget, { GtkBox *base_box; GtkButtonBox *box; - GtkVButtonBox *hbox; GtkBoxChild *child; GList *children; GtkAllocation child_allocation; @@ -221,7 +220,6 @@ gtk_vbutton_box_size_allocate (GtkWidget *widget, base_box = GTK_BOX (widget); box = GTK_BUTTON_BOX (widget); - hbox = GTK_VBUTTON_BOX (widget); spacing = base_box->spacing; layout = box->layout_style != GTK_BUTTONBOX_DEFAULT_STYLE ? box->layout_style : default_layout_style; diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index fd987b3dec..9fc40e4169 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -699,12 +699,10 @@ gtk_viewport_expose (GtkWidget *widget, GdkEventExpose *event) { GtkViewport *viewport; - GtkBin *bin; if (GTK_WIDGET_DRAWABLE (widget)) { viewport = GTK_VIEWPORT (widget); - bin = GTK_BIN (widget); if (event->window == widget->window) gtk_viewport_paint (widget, &event->area); @@ -742,11 +740,9 @@ static void gtk_viewport_size_request (GtkWidget *widget, GtkRequisition *requisition) { - GtkViewport *viewport; GtkBin *bin; GtkRequisition child_requisition; - viewport = GTK_VIEWPORT (widget); bin = GTK_BIN (widget); requisition->width = (GTK_CONTAINER (widget)->border_width + diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 94b1300936..0376685851 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4671,13 +4671,9 @@ void gtk_widget_modify_style (GtkWidget *widget, GtkRcStyle *style) { - GtkRcStyle *old_style; - g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_RC_STYLE (style)); - old_style = g_object_get_qdata (G_OBJECT (widget), quark_rc_style); - g_object_set_qdata_full (G_OBJECT (widget), quark_rc_style, gtk_rc_style_copy (style), diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index c329075a67..703dd66b4a 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -2854,10 +2854,7 @@ static void gtk_window_unrealize_icon (GtkWindow *window) { GtkWindowIconInfo *info; - GtkWidget *widget; - widget = GTK_WIDGET (window); - info = get_icon_info (window); if (info == NULL) @@ -3575,12 +3572,9 @@ gtk_window_get_size (GtkWindow *window, gint *height) { gint w, h; - GtkWidget *widget; g_return_if_fail (GTK_IS_WINDOW (window)); - widget = GTK_WIDGET (window); - if (width == NULL && height == NULL) return; @@ -5225,7 +5219,7 @@ gtk_window_compute_configure_request (GtkWindow *window, screen = gtk_window_check_screen (window); gtk_widget_size_request (widget, NULL); - gtk_window_compute_configure_request_size (window, &w, &h); + gtk_window_compute_configure_request_size (window, (guint *)&w, (guint *)&h); gtk_window_compute_hints (window, &new_geometry, &new_flags); gtk_window_constrain_size (window, @@ -7326,7 +7320,7 @@ gboolean gtk_window_parse_geometry (GtkWindow *window, const gchar *geometry) { - gint result, x, y; + gint result, x = 0, y = 0; guint w, h; GdkGravity grav; gboolean size_set, pos_set; @@ -7349,7 +7343,7 @@ gtk_window_parse_geometry (GtkWindow *window, size_set = TRUE; } - gtk_window_get_size (window, &w, &h); + gtk_window_get_size (window, (gint *)&w, (gint *)&h); grav = GDK_GRAVITY_NORTH_WEST; |