aboutsummaryrefslogtreecommitdiffstats
path: root/a11y/e-table
diff options
context:
space:
mode:
authorRadek Doulik <rodo@ximian.com>2004-06-11 01:00:45 +0800
committerRadek Doulik <rodo@src.gnome.org>2004-06-11 01:00:45 +0800
commit4b829c4fffe52585ce7cb98b9916d2dedd8f39cd (patch)
tree952e6fdc07436572ae9e44bdfedd9a02b4b8900f /a11y/e-table
parent1af9d0be3d9239f7ac8b609e62a3b3a00a039fe4 (diff)
downloadgsoc2013-evolution-4b829c4fffe52585ce7cb98b9916d2dedd8f39cd.tar.gz
gsoc2013-evolution-4b829c4fffe52585ce7cb98b9916d2dedd8f39cd.tar.zst
gsoc2013-evolution-4b829c4fffe52585ce7cb98b9916d2dedd8f39cd.zip
fixes to get rid of compiler warnings
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=26288
Diffstat (limited to 'a11y/e-table')
-rw-r--r--a11y/e-table/gal-a11y-e-cell-popup.c4
-rw-r--r--a11y/e-table/gal-a11y-e-cell-text.c10
-rw-r--r--a11y/e-table/gal-a11y-e-cell-toggle.c1
-rw-r--r--a11y/e-table/gal-a11y-e-cell-tree.c14
-rw-r--r--a11y/e-table/gal-a11y-e-cell.c8
-rw-r--r--a11y/e-table/gal-a11y-e-table-click-to-add-factory.c2
-rw-r--r--a11y/e-table/gal-a11y-e-table-click-to-add.c9
-rw-r--r--a11y/e-table/gal-a11y-e-table-item-factory.c7
-rw-r--r--a11y/e-table/gal-a11y-e-table-item.c20
-rw-r--r--a11y/e-table/gal-a11y-e-tree.c2
10 files changed, 30 insertions, 47 deletions
diff --git a/a11y/e-table/gal-a11y-e-cell-popup.c b/a11y/e-table/gal-a11y-e-cell-popup.c
index 88325e726e..a3de45afb3 100644
--- a/a11y/e-table/gal-a11y-e-cell-popup.c
+++ b/a11y/e-table/gal-a11y-e-cell-popup.c
@@ -26,6 +26,7 @@
#include <config.h>
#include <gal/e-table/e-cell-popup.h>
#include "gal-a11y-e-cell-popup.h"
+#include "gal-a11y-e-cell-registry.h"
#include "gal-a11y-util.h"
#include <atk/atkobject.h>
#include <gdk/gdkkeysyms.h>
@@ -75,8 +76,6 @@ gal_a11y_e_cell_popup_get_type (void)
static void
gal_a11y_e_cell_popup_class_init (GalA11yECellPopupClass *klass)
{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
parent_class = g_type_class_ref (PARENT_TYPE);
}
@@ -131,7 +130,6 @@ gal_a11y_e_cell_popup_new (ETableItem *item,
static void
popup_cell_action (GalA11yECell *cell)
{
- ECellPopup *ecp;
gint finished;
GdkEvent event;
diff --git a/a11y/e-table/gal-a11y-e-cell-text.c b/a11y/e-table/gal-a11y-e-cell-text.c
index 88eefc8325..d94a3640a3 100644
--- a/a11y/e-table/gal-a11y-e-cell-text.c
+++ b/a11y/e-table/gal-a11y-e-cell-text.c
@@ -7,6 +7,7 @@
*/
#include <config.h>
+#include <string.h>
#include "gal-a11y-e-cell-text.h"
#include "gal-a11y-util.h"
#include <gal/e-table/e-cell-text.h>
@@ -290,7 +291,6 @@ ect_remove_selection (AtkText *text,
gint selection_num)
{
GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
gint selection_start, selection_end;
if (selection_num == 0
@@ -400,7 +400,7 @@ ect_copy_text (AtkEditableText *text,
{
GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
if (start_pos != end_pos
- && atk_text_set_selection (text, 0, start_pos, end_pos))
+ && atk_text_set_selection (ATK_TEXT (text), 0, start_pos, end_pos))
e_cell_text_copy_clipboard (gaec->cell_view,
gaec->view_col, gaec->row);
}
@@ -412,7 +412,7 @@ ect_delete_text (AtkEditableText *text,
{
GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
if (start_pos != end_pos
- && atk_text_set_selection (text, 0, start_pos, end_pos))
+ && atk_text_set_selection (ATK_TEXT (text), 0, start_pos, end_pos))
e_cell_text_delete_selection (gaec->cell_view,
gaec->view_col, gaec->row);
}
@@ -434,7 +434,7 @@ ect_paste_text (AtkEditableText *text,
e_table_item_enter_edit (gaec->item, gaec->view_col, gaec->row);
- if (atk_text_set_caret_offset (text, position))
+ if (atk_text_set_caret_offset (ATK_TEXT (text), position))
e_cell_text_paste_clipboard (gaec->cell_view,
gaec->view_col, gaec->row);
}
@@ -491,7 +491,7 @@ ect_class_init (GalA11yECellTextClass *klass)
static void
ect_init (GalA11yECellText *a11y)
{
- gal_a11y_e_cell_add_action (a11y,
+ gal_a11y_e_cell_add_action (GAL_A11Y_E_CELL (a11y),
"edit",
"begin editing this cell",
NULL,
diff --git a/a11y/e-table/gal-a11y-e-cell-toggle.c b/a11y/e-table/gal-a11y-e-cell-toggle.c
index f3b5bf2879..0d01028cc9 100644
--- a/a11y/e-table/gal-a11y-e-cell-toggle.c
+++ b/a11y/e-table/gal-a11y-e-cell-toggle.c
@@ -65,7 +65,6 @@ gal_a11y_e_cell_toggle_class_init (GalA11yECellToggleClass *klass)
static void
toggle_cell_action (GalA11yECell *cell)
{
- ECellToggle * ect;
gint finished;
GdkEventButton event;
gint x, y, width, height;
diff --git a/a11y/e-table/gal-a11y-e-cell-tree.c b/a11y/e-table/gal-a11y-e-cell-tree.c
index e6ff75667b..ae833d9150 100644
--- a/a11y/e-table/gal-a11y-e-cell-tree.c
+++ b/a11y/e-table/gal-a11y-e-cell-tree.c
@@ -9,6 +9,7 @@
#include <config.h>
#include <atk/atk.h>
#include "gal-a11y-e-cell-tree.h"
+#include "gal-a11y-e-cell-registry.h"
#include "gal-a11y-util.h"
#include "gal/e-table/e-cell-tree.h"
#include "gal/e-table/e-table.h"
@@ -146,7 +147,6 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
{
AtkObject *subcell_a11y;
GalA11yECellTree *a11y;
- GtkWidget *e_table;
ETreePath node;
ETreeModel *tree_model;
@@ -163,13 +163,13 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
model_col,
view_col,
row);
- gal_a11y_e_cell_add_action (subcell_a11y,
+ gal_a11y_e_cell_add_action (GAL_A11Y_E_CELL (subcell_a11y),
"expand",
"expands the row in the ETree containing this cell",
NULL,
(ACTION_FUNC)ectr_do_action_expand);
- gal_a11y_e_cell_add_action (subcell_a11y,
+ gal_a11y_e_cell_add_action (GAL_A11Y_E_CELL (subcell_a11y),
"collapse",
"collapses the row in the ETree containing this cell",
NULL,
@@ -180,9 +180,9 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
tree_model = e_table_model_value_at (item->table_model, -2, row);
tree_table_adapter = e_table_model_value_at (item->table_model, -3, row);
if (e_tree_model_node_is_expandable (tree_model, node)) {
- gal_a11y_e_cell_add_state (subcell_a11y, ATK_STATE_EXPANDABLE, FALSE);
+ gal_a11y_e_cell_add_state (GAL_A11Y_E_CELL (subcell_a11y), ATK_STATE_EXPANDABLE, FALSE);
if (e_tree_table_adapter_node_is_expanded (tree_table_adapter, node))
- gal_a11y_e_cell_add_state (subcell_a11y, ATK_STATE_EXPANDED, FALSE);
+ gal_a11y_e_cell_add_state (GAL_A11Y_E_CELL (subcell_a11y), ATK_STATE_EXPANDED, FALSE);
}
}
else
@@ -192,7 +192,7 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
and it connects to some signals to determine whether a tree cell is
expanded or collapsed */
a11y = g_object_new (gal_a11y_e_cell_tree_get_type (), NULL);
- gal_a11y_e_cell_construct (a11y,
+ gal_a11y_e_cell_construct (ATK_OBJECT (a11y),
item,
cell_view,
parent,
@@ -203,7 +203,7 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
g_signal_connect (item->table_model, "model_row_changed",
G_CALLBACK (ectr_model_row_changed_cb),
subcell_a11y);
- g_object_weak_ref (subcell_a11y, ectr_subcell_weak_ref, a11y);
+ g_object_weak_ref (G_OBJECT (subcell_a11y), (GWeakNotify) ectr_subcell_weak_ref, a11y);
return subcell_a11y;
}
diff --git a/a11y/e-table/gal-a11y-e-cell.c b/a11y/e-table/gal-a11y-e-cell.c
index 34a7429cd5..9df3568e6c 100644
--- a/a11y/e-table/gal-a11y-e-cell.c
+++ b/a11y/e-table/gal-a11y-e-cell.c
@@ -13,6 +13,8 @@
#include <atk/atkobject.h>
#include <atk/atkcomponent.h>
#include <atk/atkaction.h>
+#include <atk/atkstateset.h>
+#include <gtk/gtkwindow.h>
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellClass))
static GObjectClass *parent_class;
@@ -128,7 +130,7 @@ eti_grab_focus (AtkComponent *component)
GtkWidget *e_table, *toplevel;
a11y = GAL_A11Y_E_CELL (component);
- e_table = gtk_widget_get_parent (GNOME_CANVAS_ITEM (a11y->item)->canvas);
+ e_table = gtk_widget_get_parent (GTK_WIDGET (GNOME_CANVAS_ITEM (a11y->item)->canvas));
view_row = e_table_view_to_model_row (E_TABLE (e_table), a11y->row);
e_selection_model_select_single_row (a11y->item->selection, view_row);
@@ -137,7 +139,9 @@ eti_grab_focus (AtkComponent *component)
gtk_widget_grab_focus (e_table);
toplevel = gtk_widget_get_toplevel (e_table);
if (GTK_WIDGET_TOPLEVEL (toplevel))
- gtk_window_present (toplevel);
+ gtk_window_present (GTK_WINDOW (toplevel));
+
+ return TRUE;
}
/* Table IFace */
diff --git a/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c b/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
index 4efc179200..9c46b2badc 100644
--- a/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
+++ b/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
@@ -30,7 +30,7 @@ gal_a11y_e_table_click_to_add_factory_create_accessible (GObject *obj)
{
AtkObject * atk_object;
- g_return_if_fail (E_IS_TABLE_CLICK_TO_ADD(obj));
+ g_return_val_if_fail (E_IS_TABLE_CLICK_TO_ADD(obj), NULL);
atk_object = gal_a11y_e_table_click_to_add_new (obj);
diff --git a/a11y/e-table/gal-a11y-e-table-click-to-add.c b/a11y/e-table/gal-a11y-e-table-click-to-add.c
index 1b55d526df..13214a7ddd 100644
--- a/a11y/e-table/gal-a11y-e-table-click-to-add.c
+++ b/a11y/e-table/gal-a11y-e-table-click-to-add.c
@@ -57,11 +57,11 @@ idle_do_action (gpointer data)
{
GdkEventButton event;
ETableClickToAdd * etcta;
- gint x, y, width, height, finished;
+ gint finished;
g_return_val_if_fail ( data!= NULL, FALSE);
- etcta = atk_gobject_accessible_get_object (ATK_OBJECT(data));
+ etcta = E_TABLE_CLICK_TO_ADD (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (data)));
g_return_val_if_fail (etcta, FALSE);
event.x = 0;
@@ -127,7 +127,7 @@ etcta_ref_child (AtkObject *accessible,
etcta = E_TABLE_CLICK_TO_ADD(atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible)));
- g_return_if_fail (etcta);
+ g_return_val_if_fail (etcta, NULL);
if (etcta->rect) {
atk_obj = atk_gobject_accessible_for_object (G_OBJECT(etcta->rect));
@@ -247,9 +247,8 @@ gal_a11y_e_table_click_to_add_new (GObject *widget)
GalA11yETableClickToAdd *a11y;
ETableClickToAdd * etcta;
GalA11yETableClickToAddPrivate *priv;
- gint id;
- g_return_if_fail (widget != NULL);
+ g_return_val_if_fail (widget != NULL, NULL);
a11y = g_object_new (gal_a11y_e_table_click_to_add_get_type (), NULL);
priv = GET_PRIVATE (a11y);
diff --git a/a11y/e-table/gal-a11y-e-table-item-factory.c b/a11y/e-table/gal-a11y-e-table-item-factory.c
index 320af6d9a0..12cb978fde 100644
--- a/a11y/e-table/gal-a11y-e-table-item-factory.c
+++ b/a11y/e-table/gal-a11y-e-table-item-factory.c
@@ -29,12 +29,9 @@ static AtkObject*
gal_a11y_e_table_item_factory_create_accessible (GObject *obj)
{
AtkObject *accessible;
- ETableItem * eti;
- GnomeCanvas * gc;
- GtkWidget * table;
- g_return_if_fail (E_IS_TABLE_ITEM(obj));
- accessible = gal_a11y_e_table_item_new(NULL, obj, 0);
+ g_return_val_if_fail (E_IS_TABLE_ITEM(obj), NULL);
+ accessible = gal_a11y_e_table_item_new(NULL, E_TABLE_ITEM (obj), 0);
return accessible;
}
diff --git a/a11y/e-table/gal-a11y-e-table-item.c b/a11y/e-table/gal-a11y-e-table-item.c
index 588df90a6a..cc429ddd82 100644
--- a/a11y/e-table/gal-a11y-e-table-item.c
+++ b/a11y/e-table/gal-a11y-e-table-item.c
@@ -8,6 +8,7 @@
*/
#include <config.h>
+#include <string.h>
#include "gal-a11y-e-table-item.h"
#include "gal-a11y-e-cell-registry.h"
#include "gal-a11y-e-cell.h"
@@ -91,7 +92,6 @@ eti_a11y_get_gobject (AtkObject *accessible)
static void
eti_dispose (GObject *object)
{
- gint i,j;
GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (object);
GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y);
@@ -117,7 +117,6 @@ eti_dispose (GObject *object)
static AtkObject *
eti_get_parent (AtkObject *accessible)
{
- AtkGObjectAccessible *atk_gobj;
GalA11yETableItem *a11y;
g_return_val_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (accessible), NULL);
@@ -132,8 +131,6 @@ eti_get_parent (AtkObject *accessible)
static gint
eti_get_n_children (AtkObject *accessible)
{
- AtkGObjectAccessible *atk_gobj;
-
g_return_val_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (accessible), 0);
if (!eti_a11y_get_gobject (accessible))
return 0;
@@ -145,7 +142,6 @@ eti_get_n_children (AtkObject *accessible)
static AtkObject*
eti_ref_child (AtkObject *accessible, gint index)
{
- AtkGObjectAccessible *atk_gobj;
ETableItem *item;
gint col, row;
@@ -174,7 +170,6 @@ eti_ref_child (AtkObject *accessible, gint index)
static gint
eti_get_index_in_parent (AtkObject *accessible)
{
- AtkGObjectAccessible *atk_gobj;
GalA11yETableItem *a11y;
g_return_val_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (accessible), -1);
@@ -236,7 +231,7 @@ eti_ref_accessible_at_point (AtkComponent *component,
item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (component)));
if (!item)
- return;
+ return NULL;
atk_component_get_position (component,
&x_origin,
@@ -259,8 +254,7 @@ eti_ref_accessible_at_point (AtkComponent *component,
static void
cell_destroyed (gpointer data)
{
- AtkObject *parent;
- gint index, n_cols;
+ gint index;
GalA11yETableItem * item;
GalA11yECell * cell;
@@ -552,9 +546,6 @@ static gboolean
table_add_row_selection (AtkTable *table, gint row)
{
ETableItem *item;
- gint cursor_row, cursor_col, row_count;
- GdkModifierType state = GDK_CONTROL_MASK;
- ESelectionModel *selection;
item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (table)));
if (!item)
@@ -622,9 +613,7 @@ eti_rows_inserted (ETableModel * model, int row, int count,
AtkObject * table_item)
{
gint n_cols,n_rows,i,j;
- gint size;
gpointer *cell_data;
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table_item)));
GalA11yETableItem * item_a11y;
gint old_nrows;
@@ -760,7 +749,6 @@ eti_rows_deleted (ETableModel * model, int row, int count,
{
gint i,j, n_rows, n_cols, old_nrows;
gpointer *cell_data;
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table_item)));
n_rows = atk_table_get_n_rows (ATK_TABLE(table_item));
n_cols = atk_table_get_n_columns (ATK_TABLE(table_item));
@@ -901,8 +889,6 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
/* cols[i] is new added column. */
if ( j == prev_n_cols ) {
- gint row;
-
added_found = TRUE;
state[i] = ETI_HEADER_NEW_ADDED;
}
diff --git a/a11y/e-table/gal-a11y-e-tree.c b/a11y/e-table/gal-a11y-e-tree.c
index 921576b650..9bb49496d4 100644
--- a/a11y/e-table/gal-a11y-e-tree.c
+++ b/a11y/e-table/gal-a11y-e-tree.c
@@ -7,6 +7,7 @@
#include <config.h>
#include "gal-a11y-e-tree.h"
#include "gal-a11y-util.h"
+#include "gal-a11y-e-table-item.h"
#include <gal/e-table/e-tree.h>
#include <gal/e-table/e-table-item.h>
@@ -150,7 +151,6 @@ gal_a11y_e_tree_new (GObject *widget)
{
GalA11yETree *a11y;
ETree *tree;
- AtkObject * item;
tree = E_TREE (widget);