aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2007-10-31 20:30:51 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2007-10-31 20:30:51 +0800
commit3a0a6995426d41b3f7f0deff3b021c1f6c28bd9b (patch)
treeef09c52f04ea71b076bdf21d6ed9f6c2ea2d5d0a /widgets
parentbe99f3db8925de2016528d50f32339a73fcd10c8 (diff)
downloadgsoc2013-evolution-3a0a6995426d41b3f7f0deff3b021c1f6c28bd9b.tar.gz
gsoc2013-evolution-3a0a6995426d41b3f7f0deff3b021c1f6c28bd9b.tar.zst
gsoc2013-evolution-3a0a6995426d41b3f7f0deff3b021c1f6c28bd9b.zip
Warning fixes: - NULL vs. 0 vs. FALSE - Mark som code static
2007-10-26 Kjartan Maraas <kmaraas@gnome.org> * e-cell-text.c: (ect_event), (_blink_scroll_timeout): * e-table-config.c: (do_sort_and_group_config_dialog), (do_fields_config_dialog): * e-table-group-container.c: (etgc_add_array), (etgc_get_focus_column), (etgc_get_cell_geometry), (etgc_set_property), (etgc_get_property), (etgc_class_init), (etgc_reflow), (etgc_init), (e_table_group_container_print_page), (e_table_group_container_height): * e-table-group.c: (e_table_group_get_focus_column): * e-table-header.c: (e_table_header_get_columns), (eth_set_size): * e-table-item.c: (eti_tree_unfreeze), (eti_draw), (find_cell), (_do_tooltip), (eti_event), (e_table_item_height): * e-table-memory-store.c: (etms_initialize_value), (etms_value_is_empty): * e-tree-model.c: (e_tree_model_new), (e_tree_model_node_find): Warning fixes: - NULL vs. 0 vs. FALSE - Mark som code static svn path=/trunk/; revision=34467
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/ChangeLog21
-rw-r--r--widgets/table/e-cell-text.c6
-rw-r--r--widgets/table/e-table-config.c10
-rw-r--r--widgets/table/e-table-group-container.c4
-rw-r--r--widgets/table/e-table-group.c2
-rw-r--r--widgets/table/e-table-header.c4
-rw-r--r--widgets/table/e-table-item.c2
-rw-r--r--widgets/table/e-table-memory-store.c4
-rw-r--r--widgets/table/e-tree-model.c2
9 files changed, 38 insertions, 17 deletions
diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog
index c25ecf1a0d..f439d17d7b 100644
--- a/widgets/table/ChangeLog
+++ b/widgets/table/ChangeLog
@@ -1,3 +1,24 @@
+2007-10-26 Kjartan Maraas <kmaraas@gnome.org>
+
+ * e-cell-text.c: (ect_event), (_blink_scroll_timeout):
+ * e-table-config.c: (do_sort_and_group_config_dialog),
+ (do_fields_config_dialog):
+ * e-table-group-container.c: (etgc_add_array),
+ (etgc_get_focus_column), (etgc_get_cell_geometry),
+ (etgc_set_property), (etgc_get_property), (etgc_class_init),
+ (etgc_reflow), (etgc_init), (e_table_group_container_print_page),
+ (e_table_group_container_height):
+ * e-table-group.c: (e_table_group_get_focus_column):
+ * e-table-header.c: (e_table_header_get_columns), (eth_set_size):
+ * e-table-item.c: (eti_tree_unfreeze), (eti_draw), (find_cell),
+ (_do_tooltip), (eti_event), (e_table_item_height):
+ * e-table-memory-store.c: (etms_initialize_value),
+ (etms_value_is_empty):
+ * e-tree-model.c: (e_tree_model_new), (e_tree_model_node_find):
+ Warning fixes:
+ - NULL vs. 0 vs. FALSE
+ - Mark som code static
+
2007-10-09 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #437579
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index d7e6d84941..f89e34ec0b 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -922,7 +922,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
return 0;
if ( edit && !edit->preedit_length && flags & E_CELL_PREEDIT)
- return TRUE;
+ return 1;
if (edit && edit->view_col == view_col && edit->row == row) {
edit_display = TRUE;
@@ -988,9 +988,9 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
edit->need_im_reset = TRUE;
if (preedit_len && flags & E_CELL_PREEDIT)
- return FALSE;
+ return 0;
else
- return TRUE;
+ return 1;
}
if (event->key.keyval == GDK_Escape){
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 3a4ae1dec0..9bada0a0cf 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -529,7 +529,7 @@ do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
case GTK_RESPONSE_OK:
g_object_unref (config->state);
config->state = config->temp_state;
- config->temp_state = 0;
+ config->temp_state = NULL;
running = 0;
config_dialog_changed (config);
break;
@@ -537,7 +537,7 @@ do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
case GTK_RESPONSE_DELETE_EVENT:
case GTK_RESPONSE_CANCEL:
g_object_unref (config->temp_state);
- config->temp_state = 0;
+ config->temp_state = NULL;
running = 0;
break;
}
@@ -573,7 +573,7 @@ do_fields_config_dialog (ETableConfig *config)
case GTK_RESPONSE_OK:
g_object_unref (config->state);
config->state = config->temp_state;
- config->temp_state = 0;
+ config->temp_state = NULL;
running = 0;
config_dialog_changed (config);
break;
@@ -581,7 +581,7 @@ do_fields_config_dialog (ETableConfig *config)
case GTK_RESPONSE_DELETE_EVENT:
case GTK_RESPONSE_CANCEL:
g_object_unref (config->temp_state);
- config->temp_state = 0;
+ config->temp_state = NULL;
running = 0;
break;
}
@@ -619,7 +619,7 @@ create_global_store (ETableConfig *config)
}
}
-char *spec = "<ETableSpecification gettext-domain=\"" GETTEXT_PACKAGE "\" no-headers=\"true\" cursor-mode=\"line\" "
+static char *spec = "<ETableSpecification gettext-domain=\"" GETTEXT_PACKAGE "\" no-headers=\"true\" cursor-mode=\"line\" "
" draw-grid=\"false\" draw-focus=\"true\" selection-mode=\"browse\">"
"<ETableColumn model_col= \"0\" _title=\"Name\" minimum_width=\"30\" resizable=\"true\" cell=\"string\" compare=\"string\"/>"
"<ETableState> <column source=\"0\"/>"
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index ea5600760a..114bcbfc04 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -510,7 +510,7 @@ etgc_add_array (ETableGroup *etg, const int *array, int count)
{
int i;
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
- void *lastval = 0;
+ void *lastval = NULL;
int laststart = 0;
GCompareFunc comp = etgc->ecol->compare;
ETableGroupContainerChildNode *child_node;
@@ -1070,7 +1070,7 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
static void
etgc_init (ETableGroupContainer *container)
{
- container->children = FALSE;
+ container->children = NULL;
e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM(container), etgc_reflow);
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index ff2d0c15f5..8412134fb1 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -332,7 +332,7 @@ e_table_group_get_focus (ETableGroup *etg)
gint
e_table_group_get_focus_column (ETableGroup *etg)
{
- g_return_val_if_fail (etg != NULL, FALSE);
+ g_return_val_if_fail (etg != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_GROUP (etg), -1);
g_return_val_if_fail (ETG_CLASS (etg)->get_focus_column != NULL, -1);
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index a4f85b1e39..2a4e77014a 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -532,8 +532,8 @@ e_table_header_get_columns (ETableHeader *eth)
ETableCol **ret;
int i;
- g_return_val_if_fail (eth != NULL, 0);
- g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
+ g_return_val_if_fail (eth != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE_HEADER (eth), NULL);
ret = g_new (ETableCol *, eth->col_count + 1);
memcpy (ret, eth->columns, sizeof (ETableCol *) * eth->col_count);
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 4c06d3eee6..ecdfc52c6e 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1671,7 +1671,7 @@ eti_tree_unfreeze (GtkWidget *widget, GdkEvent *event, ETableItem *eti)
{
if (widget)
- g_object_set_data (G_OBJECT (widget), "freeze-cursor", 0);
+ g_object_set_data (G_OBJECT (widget), "freeze-cursor", NULL);
return FALSE;
}
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index 15886a712e..b4fe2d2a16 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -159,7 +159,7 @@ etms_initialize_value (ETableModel *etm, int col)
default:
break;
}
- return 0;
+ return NULL;
}
static gboolean
@@ -180,7 +180,7 @@ etms_value_is_empty (ETableModel *etm, int col, const void *value)
default:
break;
}
- return value == 0;
+ return value == NULL;
}
static char *
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 5643ec75d3..b694536763 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -389,7 +389,7 @@ e_tree_model_node_request_collapse (ETreeModel *tree_model, ETreePath collapsed
* return values: a newly constructed ETreeModel.
*/
ETreeModel *
-e_tree_model_new ()
+e_tree_model_new (void)
{
return (ETreeModel *) g_object_new (E_TREE_MODEL_TYPE, NULL);
}