added cast

2004-06-10  Radek Doulik  <rodo@ximian.com>

	* gal/a11y/e-table/gal-a11y-e-table-click-to-add.c
	(idle_do_action): added cast

	* gal/a11y/e-table/gal-a11y-e-cell-tree.c
	(gal_a11y_e_cell_tree_new): added cast

	* gal/a11y/e-table/gal-a11y-e-cell.c: added #include
<gtk/gtkwindow.h>

	* gal/e-text/e-text.c (_get_position): removed unused variable

	* gal/e-text/e-completion.c: #if 0'ed e_completion_sort

	* tests/test-text.c (create_entry): removed unused variables
	added #include "gal/widgets/e-canvas-utils.h"
	added #include "gal/e-text/e-text-model.h"
	(create_text): removed unused variables
	(create_ro_text): ditto

	* tests/test-table-1.c (create_table): added cast

	* tests/test-completion.c (main): added cast

	* gal/a11y/e-text/gal-a11y-e-text.c (et_get_text): return NULL if
	check fails
	added #include <string.h> for strlen
	(et_get_text_after_offset): fixed typo defalut --> default
	(et_get_text_at_offset): ditto
	(et_get_character_extents): removed unused variables
	(et_set_selection): ditto
	(_et_command_cb): added default: label to quiet compiler

	* gal/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
	(gal_a11y_e_table_click_to_add_factory_create_accessible): return
	NULL if check fails

	* gal/a11y/e-table/gal-a11y-e-table-click-to-add.c
	(idle_do_action): fixed wrong cast
	(idle_do_action): removed unused variables
	(etcta_ref_child): return NULL if check fails
	(gal_a11y_e_table_click_to_add_new): ditto
	(gal_a11y_e_table_click_to_add_new): removed unused variable

	* gal/a11y/e-table/gal-a11y-e-table-item-factory.c
	(gal_a11y_e_table_item_factory_create_accessible): return NULL if
	fails
	(gal_a11y_e_table_item_factory_create_accessible): added cast
	(gal_a11y_e_table_item_factory_create_accessible): removed unused
	variable

	* gal/a11y/e-table/gal-a11y-e-table-item.c (eti_dispose): removed
	unused variable
	(eti_get_parent): ditto
	(eti_get_n_children): ditto
	(eti_ref_child): ditto
	(eti_get_index_in_parent): ditto
	(eti_ref_accessible_at_point): return value (NULL)
	(cell_destroyed): removed unused variable
	(cell_destroyed): ditto
	(table_add_row_selection): ditto
	added #inclued <string.h> for memset, memmove
	(eti_rows_inserted): removed unused variable
	(eti_rows_deleted): ditto
	(eti_header_structure_changed): ditto

	* gal/a11y/e-table/gal-a11y-e-cell-popup.c
	(gal_a11y_e_cell_popup_class_init): removed unused variable
	added #include "gal-a11y-e-cell-registry.h"
	(popup_cell_action): removed unused variable

	* gal/a11y/e-table/gal-a11y-e-cell-toggle.c (toggle_cell_action):
	removed unused variable

	* gal/a11y/e-table/gal-a11y-e-cell-tree.c: added #include
	"gal-a11y-e-cell-registry.h"
	(gal_a11y_e_cell_tree_new): add cast
	(gal_a11y_e_cell_tree_new): removed unused variable

	* gal/a11y/e-table/gal-a11y-e-cell-text.c: added #include
	<string.h>
	(ect_remove_selection): removed unused variable
	(ect_copy_text): added cast
	(ect_delete_text): ditto
	(ect_paste_text): ditto
	(ect_init): ditto

	* gal/a11y/e-table/gal-a11y-e-cell.c (eti_grab_focus): added cast
	(eti_grab_focus): ditto
	(eti_grab_focus): return TRUE (grab was successful)
	added #include <atk/atkstateset.h>

	* gal/a11y/e-table/gal-a11y-e-tree.c: added #include
	"gal-a11y-e-table-item.h"
	(gal_a11y_e_tree_new): removed unused variable

	* gal/e-text/e-text.c (_do_tooltip): removed unused variable
	(e_text_event): added cast
	(primary_clear_cb): removed unused variable
	(_get_position): ditto
	(_get_position): ditto
	#if 0'ed unused prototypes

	* gal/e-text/e-text-model.c (e_text_model_real_insert_length):
	removed unused variables

	* gal/e-text/e-completion.c (e_completion_sort): #if'0 ed, as it's
	not used anywhere

	* gal/widgets/e-reflow.c (items_inserted): remove unused variables

	* gal/widgets/e-categories.c (e_categories_get_property): remove
	unused variable

	* gal/widgets/e-categories-master-list-dialog.c
	(dialog_destroyed): added cast

	* gal/widgets/e-categories-master-list-combo.c
	(ecmlc_ecml_changed): remove unused variable

	* gal/widgets/color-palette.c: include string.h for memset
	prototype

svn path=/trunk/; revision=26289
This commit is contained in:
Radek Doulik
2004-06-10 17:01:14 +00:00
committed by Radek Doulik
parent 4b829c4fff
commit 8db565271c
5 changed files with 20 additions and 23 deletions

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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);