aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/add-col.xpm2
-rw-r--r--widgets/table/e-cell-combo.c2
-rw-r--r--widgets/table/e-cell-popup.c2
-rw-r--r--widgets/table/e-cell-popup.h4
-rw-r--r--widgets/table/e-cell-text.c6
-rw-r--r--widgets/table/e-cell.c8
-rw-r--r--widgets/table/e-table-config.c5
-rw-r--r--widgets/table/e-table-extras.c6
-rw-r--r--widgets/table/e-table-extras.h6
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c2
-rw-r--r--widgets/table/e-table-field-chooser-item.c2
-rw-r--r--widgets/table/e-table-field-chooser.c2
-rw-r--r--widgets/table/e-table-header-item.c28
-rw-r--r--widgets/table/e-table-model.c4
-rw-r--r--widgets/table/e-table-model.h2
-rw-r--r--widgets/table/e-table-selection-model.c6
-rw-r--r--widgets/table/e-table-selection-model.h2
-rw-r--r--widgets/table/e-table-specification.c2
-rw-r--r--widgets/table/remove-col.xpm2
-rw-r--r--widgets/table/tree-expanded.xpm2
-rw-r--r--widgets/table/tree-unexpanded.xpm2
21 files changed, 44 insertions, 53 deletions
diff --git a/widgets/table/add-col.xpm b/widgets/table/add-col.xpm
index 9c5f314c8e..6dadad6fcc 100644
--- a/widgets/table/add-col.xpm
+++ b/widgets/table/add-col.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * add_col_xpm[] = {
+static const gchar *add_col_xpm[] = {
"16 16 3 1",
" c None",
". c #000000",
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 84d58200d2..83c17d3c2f 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -74,8 +74,6 @@
/* The height to make the popup list if there aren't any items in it. */
#define E_CELL_COMBO_LIST_EMPTY_HEIGHT 15
-static void e_cell_combo_class_init (ECellComboClass *klass);
-static void e_cell_combo_init (ECellCombo *ecc);
static void e_cell_combo_dispose (GObject *object);
static gint e_cell_combo_do_popup (ECellPopup *ecp,
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index 92e03d79a1..c291571c73 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -46,8 +46,6 @@
#define E_CELL_POPUP_ARROW_YPAD 3
-static void e_cell_popup_class_init (ECellPopupClass *klass);
-static void e_cell_popup_init (ECellPopup *ecp);
static void e_cell_popup_dispose (GObject *object);
diff --git a/widgets/table/e-cell-popup.h b/widgets/table/e-cell-popup.h
index 5c462b9490..12e44cb8dc 100644
--- a/widgets/table/e-cell-popup.h
+++ b/widgets/table/e-cell-popup.h
@@ -94,8 +94,4 @@ void e_cell_popup_set_shown (ECellPopup *ecp,
gboolean shown);
void e_cell_popup_queue_cell_redraw (ECellPopup *ecp);
-void e_cell_popup_set_shown (ECellPopup *ecp,
- gboolean shown);
-void e_cell_popup_queue_cell_redraw (ECellPopup *ecp);
-
#endif /* _E_CELL_POPUP_H_ */
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index e50d3d7ae7..b86d709bca 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -213,7 +213,7 @@ static void e_cell_text_preedit_changed_cb (GtkIMContext *context, ECellTextView
static void e_cell_text_commit_cb (GtkIMContext *context, const gchar *str, ECellTextView *text_view);
static gboolean e_cell_text_retrieve_surrounding_cb (GtkIMContext *context, ECellTextView *text_view);
static gboolean e_cell_text_delete_surrounding_cb (GtkIMContext *context, gint offset, gint n_chars, ECellTextView *text_view);
-static void _insert (ECellTextView *text_view, char *string, int value);
+static void _insert (ECellTextView *text_view, const gchar *string, int value);
static void _delete_selection (ECellTextView *text_view);
static PangoAttrList* build_attr_list (ECellTextView *text_view, int row, int text_length);
static void update_im_cursor_location (ECellTextView *tv);
@@ -1029,7 +1029,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
_get_tep (edit);
return_val = e_text_event_processor_handle_event (edit->tep, &e_tep_event);
if (e_tep_event.key.string)
- g_free (e_tep_event.key.string);
+ g_free ((gpointer) e_tep_event.key.string);
break;
}
}
@@ -2360,7 +2360,7 @@ _delete_selection (ECellTextView *text_view)
/* NB! We expect value to be length IN BYTES */
static void
-_insert (ECellTextView *text_view, char *string, int value)
+_insert (ECellTextView *text_view, const gchar *string, int value)
{
CellEdit *edit = text_view->edit;
char *temp;
diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c
index e76e073dd1..1de405feff 100644
--- a/widgets/table/e-cell.c
+++ b/widgets/table/e-cell.c
@@ -58,20 +58,22 @@ ec_draw (ECellView *ecell_view, GdkDrawable *drawable,
int model_col, int view_col, int row, ECellFlags flags,
int x1, int y1, int x2, int y2)
{
- g_error ("e-cell-draw invoked\n");
+ g_critical ("e-cell-draw invoked");
}
static gint
ec_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions)
{
- g_error ("e-cell-event invoked\n");
+ g_critical ("e-cell-event invoked");
+
return 0;
}
static gint
ec_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
- g_error ("e-cell-height invoked\n");
+ g_critical ("e-cell-height invoked");
+
return 0;
}
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 510b5074f6..1c40798720 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -282,7 +282,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
for (i = 0; i < 4; i++){
gboolean sensitive = (i <= count);
- char *text = "";
+ const gchar *text = "";
gtk_widget_set_sensitive (widgets [i].frames, sensitive);
@@ -619,7 +619,8 @@ create_global_store (ETableConfig *config)
}
}
-static char *spec = "<ETableSpecification gettext-domain=\"" GETTEXT_PACKAGE "\" no-headers=\"true\" cursor-mode=\"line\" "
+static const gchar *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-extras.c b/widgets/table/e-table-extras.c
index 2fa6e5cecf..acbd479a43 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -194,7 +194,7 @@ e_table_extras_new (void)
void
e_table_extras_add_cell (ETableExtras *extras,
- char *id,
+ const gchar *id,
ECell *cell)
{
if (cell)
@@ -211,7 +211,7 @@ e_table_extras_get_cell (ETableExtras *extras,
void
e_table_extras_add_compare (ETableExtras *extras,
- char *id,
+ const gchar *id,
GCompareFunc compare)
{
g_hash_table_insert(extras->compares, g_strdup(id), (gpointer) compare);
@@ -226,7 +226,7 @@ e_table_extras_get_compare (ETableExtras *extras,
void
e_table_extras_add_search (ETableExtras *extras,
- char *id,
+ const gchar *id,
ETableSearchFunc search)
{
g_hash_table_insert(extras->searches, g_strdup(id), search);
diff --git a/widgets/table/e-table-extras.h b/widgets/table/e-table-extras.h
index 986d9b9208..9ab8bc2395 100644
--- a/widgets/table/e-table-extras.h
+++ b/widgets/table/e-table-extras.h
@@ -54,19 +54,19 @@ GType e_table_extras_get_type (void);
ETableExtras *e_table_extras_new (void);
void e_table_extras_add_cell (ETableExtras *extras,
- char *id,
+ const gchar *id,
ECell *cell);
ECell *e_table_extras_get_cell (ETableExtras *extras,
char *id);
void e_table_extras_add_compare (ETableExtras *extras,
- char *id,
+ const gchar *id,
GCompareFunc compare);
GCompareFunc e_table_extras_get_compare (ETableExtras *extras,
char *id);
void e_table_extras_add_search (ETableExtras *extras,
- char *id,
+ const gchar *id,
ETableSearchFunc search);
ETableSearchFunc e_table_extras_get_search (ETableExtras *extras,
char *id);
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index e92428d5f8..5b504496c7 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -30,8 +30,6 @@
#include "e-table-field-chooser-dialog.h"
-static void e_table_field_chooser_dialog_init (ETableFieldChooserDialog *card);
-static void e_table_field_chooser_dialog_class_init (ETableFieldChooserDialogClass *klass);
static void e_table_field_chooser_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_dialog_dispose (GObject *object);
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index d29dcbfa5f..4b4c6b16a7 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -527,7 +527,7 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, double x, doub
int button_height;
GtkTargetEntry etfci_drag_types [] = {
- { TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
+ { (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
if (etfci->combined_header == NULL)
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index 2a343e9915..60a0b40e9d 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -32,8 +32,6 @@
#include "e-table-field-chooser.h"
#include "e-table-field-chooser-item.h"
-static void e_table_field_chooser_init (ETableFieldChooser *card);
-static void e_table_field_chooser_class_init (ETableFieldChooserClass *klass);
static void e_table_field_chooser_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void e_table_field_chooser_dispose (GObject *object);
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index e6c20b1796..028fd9b93e 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -871,7 +871,7 @@ ethi_realize (GnomeCanvasItem *item)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
GtkTargetEntry ethi_drop_types [] = {
- { TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
+ { (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
@@ -1131,7 +1131,7 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
GHashTable *arrows = g_hash_table_new (NULL, NULL);
GtkTargetEntry ethi_drag_types [] = {
- { TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
+ { (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
ethi->drag_col = ethi_find_col_by_x (ethi, event->motion.x);
@@ -1468,19 +1468,19 @@ free_popup_info (GtkWidget *w, EthiHeaderInfo *info)
/* Bit 2 is disabled if not "sortable". */
/* Bit 4 is disabled if we don't have a pointer to our table object. */
static EPopupMenu ethi_context_menu [] = {
- E_POPUP_ITEM (N_("Sort _Ascending"), G_CALLBACK(ethi_popup_sort_ascending), 2),
- E_POPUP_ITEM (N_("Sort _Descending"), G_CALLBACK(ethi_popup_sort_descending), 2),
- E_POPUP_ITEM (N_("_Unsort"), G_CALLBACK(ethi_popup_unsort), 0),
+ E_POPUP_ITEM (N_("Sort _Ascending"), G_CALLBACK(ethi_popup_sort_ascending), 2),
+ E_POPUP_ITEM (N_("Sort _Descending"), G_CALLBACK(ethi_popup_sort_descending), 2),
+ E_POPUP_ITEM (N_("_Unsort"), G_CALLBACK(ethi_popup_unsort), 0),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Group By This _Field"), G_CALLBACK(ethi_popup_group_field), 16),
- E_POPUP_ITEM (N_("Group By _Box"), G_CALLBACK(ethi_popup_group_box), 128),
+ E_POPUP_ITEM (N_("Group By This _Field"), G_CALLBACK(ethi_popup_group_field), 16),
+ E_POPUP_ITEM (N_("Group By _Box"), G_CALLBACK(ethi_popup_group_box), 128),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("Remove This _Column"), G_CALLBACK(ethi_popup_remove_column), 8),
- E_POPUP_ITEM (N_("Add a C_olumn..."), G_CALLBACK(ethi_popup_field_chooser), 0),
+ E_POPUP_ITEM (N_("Remove This _Column"), G_CALLBACK(ethi_popup_remove_column), 8),
+ E_POPUP_ITEM (N_("Add a C_olumn..."), G_CALLBACK(ethi_popup_field_chooser), 0),
E_POPUP_SEPARATOR,
- E_POPUP_ITEM (N_("A_lignment"), G_CALLBACK(ethi_popup_alignment), 128),
- E_POPUP_ITEM (N_("B_est Fit"), G_CALLBACK(ethi_popup_best_fit), 2),
- E_POPUP_ITEM (N_("Format Column_s..."), G_CALLBACK(ethi_popup_format_columns), 128),
+ E_POPUP_ITEM (N_("A_lignment"), G_CALLBACK(ethi_popup_alignment), 128),
+ E_POPUP_ITEM (N_("B_est Fit"), G_CALLBACK(ethi_popup_best_fit), 2),
+ E_POPUP_ITEM (N_("Format Column_s..."), G_CALLBACK(ethi_popup_format_columns), 128),
E_POPUP_SEPARATOR,
E_POPUP_ITEM (N_("Custo_mize Current View..."), G_CALLBACK(ethi_popup_customize_view), 4),
E_POPUP_TERMINATOR
@@ -1935,11 +1935,11 @@ ethi_class_init (ETableHeaderItemClass *klass)
dnd_colormap = gtk_widget_get_default_colormap ();
remove_col_pixmap = gdk_pixmap_colormap_create_from_xpm_d (
NULL, dnd_colormap,
- &remove_col_mask, NULL, remove_col_xpm);
+ &remove_col_mask, NULL, (gchar **) remove_col_xpm);
add_col_pixmap = gdk_pixmap_colormap_create_from_xpm_d (
NULL, dnd_colormap,
- &add_col_mask, NULL, add_col_xpm);
+ &add_col_mask, NULL, (gchar **) add_col_xpm);
ethi_signals [BUTTON_PRESSED] =
g_signal_new ("button_pressed",
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index 41664e4757..f88f3bf215 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -209,8 +209,8 @@ e_table_model_has_save_id (ETableModel *e_table_model)
char *
e_table_model_get_save_id (ETableModel *e_table_model, int row)
{
- g_return_val_if_fail (e_table_model != NULL, "/");
- g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), "/");
+ g_return_val_if_fail (e_table_model != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL);
if (ETM_CLASS (e_table_model)->get_save_id)
return ETM_CLASS (e_table_model)->get_save_id (e_table_model, row);
diff --git a/widgets/table/e-table-model.h b/widgets/table/e-table-model.h
index 337da0758e..f639d77374 100644
--- a/widgets/table/e-table-model.h
+++ b/widgets/table/e-table-model.h
@@ -54,7 +54,7 @@ typedef struct {
gboolean (*is_cell_editable) (ETableModel *etm, int col, int row);
gboolean (*has_save_id) (ETableModel *etm);
- char *(*get_save_id) (ETableModel *etm, int row);
+ gchar *(*get_save_id) (ETableModel *etm, int row);
gboolean (*has_change_pending) (ETableModel *etm);
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index 75ae0f92c8..2fdef3f88a 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -45,9 +45,9 @@ static void
save_to_hash(int model_row, gpointer closure)
{
ETableSelectionModel *etsm = closure;
- gchar *key = e_table_model_get_save_id(etsm->model, model_row);
+ const gchar *key = e_table_model_get_save_id(etsm->model, model_row);
- g_hash_table_insert(etsm->hash, key, key);
+ g_hash_table_insert(etsm->hash, (gpointer) key, (gpointer) key);
}
static void
@@ -101,7 +101,7 @@ model_changed_idle(ETableSelectionModel *etsm)
int i;
e_selection_model_array_confirm_row_count(E_SELECTION_MODEL_ARRAY(etsm));
for (i = 0; i < row_count; i++) {
- char *save_id = e_table_model_get_save_id(etm, i);
+ gchar *save_id = e_table_model_get_save_id(etm, i);
if (g_hash_table_lookup(etsm->hash, save_id))
e_selection_model_change_one_row(E_SELECTION_MODEL(etsm), i, TRUE);
diff --git a/widgets/table/e-table-selection-model.h b/widgets/table/e-table-selection-model.h
index c1549513db..5d7d831205 100644
--- a/widgets/table/e-table-selection-model.h
+++ b/widgets/table/e-table-selection-model.h
@@ -58,7 +58,7 @@ typedef struct {
guint group_info_changed : 1;
GHashTable *hash;
- char *cursor_id;
+ gchar *cursor_id;
} ETableSelectionModel;
typedef struct {
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index 6860d2f275..ff170dfce5 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -351,7 +351,7 @@ e_table_specification_save_to_node (ETableSpecification *specification,
xmlDoc *doc)
{
xmlNode *node;
- char *s;
+ const gchar *s;
g_return_val_if_fail (doc != NULL, NULL);
g_return_val_if_fail (specification != NULL, NULL);
diff --git a/widgets/table/remove-col.xpm b/widgets/table/remove-col.xpm
index ff1024f0c9..570d1862d1 100644
--- a/widgets/table/remove-col.xpm
+++ b/widgets/table/remove-col.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * remove_col_xpm[] = {
+static const gchar *remove_col_xpm[] = {
"16 16 3 1",
" c None",
". c #000000",
diff --git a/widgets/table/tree-expanded.xpm b/widgets/table/tree-expanded.xpm
index d9bda3694d..94d162d40b 100644
--- a/widgets/table/tree-expanded.xpm
+++ b/widgets/table/tree-expanded.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * tree_expanded_xpm[] = {
+static const gchar *tree_expanded_xpm[] = {
"16 16 4 1",
" c None",
". c #FFFFFF",
diff --git a/widgets/table/tree-unexpanded.xpm b/widgets/table/tree-unexpanded.xpm
index e1b48448ba..d20ec5aa33 100644
--- a/widgets/table/tree-unexpanded.xpm
+++ b/widgets/table/tree-unexpanded.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * tree_unexpanded_xpm[] = {
+static const gchar *tree_unexpanded_xpm[] = {
"16 16 4 1",
" c None",
". c #FFFFFF",