diff options
-rw-r--r-- | a11y/e-text/gal-a11y-e-text.c | 12 | ||||
-rw-r--r-- | widgets/misc/e-reflow.c | 4 | ||||
-rw-r--r-- | widgets/text/e-completion.c | 4 | ||||
-rw-r--r-- | widgets/text/e-text-model.c | 1 | ||||
-rw-r--r-- | widgets/text/e-text.c | 22 |
5 files changed, 20 insertions, 23 deletions
diff --git a/a11y/e-text/gal-a11y-e-text.c b/a11y/e-text/gal-a11y-e-text.c index be7835e17d..db066edd6e 100644 --- a/a11y/e-text/gal-a11y-e-text.c +++ b/a11y/e-text/gal-a11y-e-text.c @@ -7,6 +7,7 @@ */ #include <config.h> +#include <string.h> #include "gal-a11y-e-text.h" #include "gal-a11y-util.h" #include <atk/atkobject.h> @@ -113,7 +114,7 @@ et_get_text (AtkText *text, gint start, end, real_start, real_end, len; const char *full_text = et_get_full_text (text); if (full_text == NULL) - return; + return NULL; len = g_utf8_strlen (full_text, -1); start = MIN (MAX (0, start_offset), len); @@ -333,7 +334,7 @@ et_get_text_after_offset (AtkText *text, start = find_line_end (full_text, offset + 1, 1); end = find_line_end (full_text, start + 1, 1); break; - defalut: + default: return NULL; } @@ -386,7 +387,7 @@ et_get_text_at_offset (AtkText *text, start = find_line_end (full_text, offset, -1); end = find_line_end (full_text, offset + 1, 1); break; - defalut: + default: return NULL; } @@ -519,8 +520,6 @@ et_get_character_extents (AtkText *text, gint x_widget, y_widget, x_window, y_window; GdkWindow *window; GtkWidget *widget; - int index; - int trailing; PangoRectangle pango_pos; g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE(text)); @@ -769,7 +768,6 @@ et_set_selection (AtkText *text, { GObject *obj; EText *etext; - int offset; g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), FALSE); obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)); @@ -1009,6 +1007,8 @@ _et_command_cb (ETextEventProcessor *tep, case E_TEP_SELECT: g_signal_emit_by_name (text, "text-selection-changed"); break; + default: + break; } } diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c index b46e410d5b..69c4bd8266 100644 --- a/widgets/misc/e-reflow.c +++ b/widgets/misc/e-reflow.c @@ -370,9 +370,7 @@ item_removed (EReflowModel *model, int i, EReflow *reflow) static void items_inserted (EReflowModel *model, int position, int count, EReflow *reflow) { - int i, c; - int oldcount; - int lowest_column; + int i, oldcount; if (position < 0 || position > reflow->count) return; diff --git a/widgets/text/e-completion.c b/widgets/text/e-completion.c index b243d4db35..6e455cb619 100644 --- a/widgets/text/e-completion.c +++ b/widgets/text/e-completion.c @@ -56,7 +56,9 @@ static void e_completion_dispose (GObject *object); static void e_completion_add_match (ECompletion *complete, ECompletionMatch *); static void e_completion_clear_matches (ECompletion *complete); +#if 0 static gboolean e_completion_sort (ECompletion *complete); +#endif #define PARENT_TYPE GTK_TYPE_OBJECT static GtkObjectClass *parent_class; @@ -266,6 +268,7 @@ e_completion_new (void) return E_COMPLETION (g_object_new (E_COMPLETION_TYPE, NULL)); } +#if 0 static gboolean e_completion_sort (ECompletion *complete) { @@ -296,6 +299,7 @@ e_completion_sort (ECompletion *complete) return diff; } +#endif void e_completion_found_match (ECompletion *complete, ECompletionMatch *match) diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c index d995d81396..ed6be10672 100644 --- a/widgets/text/e-text-model.c +++ b/widgets/text/e-text-model.c @@ -243,7 +243,6 @@ static void e_text_model_real_insert_length (ETextModel *model, gint position, const gchar *text, gint length) { EReposInsertShift repos; - gchar *new_text; int model_len = e_text_model_real_get_text_length (model); char *offs; const char *p; diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index 3c7ccad68b..b80228021c 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -144,6 +144,7 @@ static void e_text_insert(EText *text, const char *string); static void reset_layout_attrs (EText *text); +#if 0 /* GtkEditable Methods */ static void e_text_editable_do_insert_text (GtkEditable *editable, const gchar *text, @@ -164,7 +165,8 @@ static gboolean e_text_editable_get_selection_bounds (GtkEditable *editable, static void e_text_editable_set_position (GtkEditable *editable, gint position); static gint e_text_editable_get_position (GtkEditable *editable); - +#endif + /* IM Context Callbacks */ static void e_text_commit_cb (GtkIMContext *context, const gchar *str, @@ -185,7 +187,7 @@ static GdkAtom clipboard_atom = GDK_NONE; /* Dispose handler for the text item */ - +#if 0 static void e_text_style_set (EText *text, GtkStyle *previous_style) { @@ -196,6 +198,7 @@ e_text_style_set (EText *text, GtkStyle *previous_style) } e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (text)); } +#endif static void e_text_dispose (GObject *object) @@ -1910,7 +1913,6 @@ _do_tooltip (gpointer data) { #warning "need to sort out tooltip stuff." EText *text = E_TEXT (data); - struct line *lines; GtkWidget *canvas; int i; int max_width; @@ -2227,7 +2229,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) /* Simulate a GdkEventButton here, so that we can call e_text_do_popup directly */ - GdkEventButton *button = gdk_event_new (GDK_BUTTON_PRESS); + GdkEventButton *button = (GdkEventButton *) gdk_event_new (GDK_BUTTON_PRESS); button->time = event->key.time; button->button = 0; e_text_do_popup (text, button, 0); @@ -2525,8 +2527,6 @@ static void primary_clear_cb (GtkClipboard *clipboard, gpointer data) { - EText *text = E_TEXT (data); - #if notyet /* XXX */ gtk_editable_select_region (GTK_EDITABLE (entry), entry->current_pos, entry->current_pos); @@ -2731,6 +2731,7 @@ e_text_do_popup (EText *text, GdkEventButton *button, int position) closure); } +#if 0 static void e_text_reset_im_context (EText *text) { @@ -2739,6 +2740,7 @@ e_text_reset_im_context (EText *text) gtk_im_context_reset (text->im_context); } } +#endif /* fixme: */ @@ -2808,7 +2810,6 @@ _get_position(EText *text, ETextEventProcessorCommand *command) gunichar unival; char *p = NULL; gint new_pos = 0; - int index, trailing; switch (command->position) { @@ -2922,10 +2923,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command) break; case E_TEP_FORWARD_LINE: { - int l; - PangoLayoutLine *line, *next_line; int offset_into_line; - int next_line_length; char *p; offset_into_line = find_offset_into_line (text, text->selection_end, NULL); @@ -2957,7 +2955,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command) break; } case E_TEP_BACKWARD_LINE: { - char *p, *prev = NULL; + char *p; int offset_into_line = find_offset_into_line (text, text->selection_end, &p); if (offset_into_line == -1) @@ -3163,7 +3161,6 @@ static void e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gpointer data) { EText *text = E_TEXT(data); - int sel_start, sel_end; gboolean scroll = TRUE; gboolean use_start = TRUE; @@ -3277,7 +3274,6 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp /* XXX do we really need the @trailing logic here? if we don't we can scrap the loop and just use pango_layout_index_to_pos */ - int i; PangoLayoutLine *cur_line = NULL; int selection_index; PangoLayoutIter *iter = pango_layout_get_iter (text->layout); |