Commit f95d96a7 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Mostly constification.

2002-02-21  Morten Welinder  <terra@diku.dk>

	* dialog-summary.c (dialog_summary_update): Constify.

	* dialog-stf-preview.c (stf_preview_draw_grid): Constify.

	* dialog-solver.c (cb_dialog_solve_clicked): Remove unneeded
	initialisation.

	* dialog-cell-format.c (fmt_dialog_init_format_page): Constify.
	(cb_validation_sensitivity): Constify.  Fix broken sensitivity
	code.

	* dialog-consolidate.c (construct_consolidate): Constify.

2002-02-21  Morten Welinder  <terra@diku.dk>

	* widget-font-selector.c (styles): Constify.
parent ddd60c1f
......@@ -145,7 +145,7 @@ typedef enum {
GtkWidget *cancel_button;\
GtkWidget *apply_button;\
GtkWidget *help_button;\
char *help_link;\
const char *help_link;\
char *input_var1_str;\
char *input_var2_str;\
GtkWidget *new_sheet;\
......
2002-02-21 Morten Welinder <terra@diku.dk>
* dialog-summary.c (dialog_summary_update): Constify.
* dialog-stf-preview.c (stf_preview_draw_grid): Constify.
* dialog-solver.c (cb_dialog_solve_clicked): Remove unneeded
initialisation.
* dialog-cell-format.c (fmt_dialog_init_format_page): Constify.
(cb_validation_sensitivity): Constify. Fix broken sensitivity
code.
* dialog-consolidate.c (construct_consolidate): Constify.
2002-02-20 Morten Welinder <terra@diku.dk>
* dialog-printer-setup.c (do_setup_page): Constify.
......
......@@ -940,12 +940,12 @@ fmt_dialog_init_format_page (FormatState *state)
/* setup the red elements of the negative list box */
cl = GTK_CLIST (state->format.widget[F_NEGATIVE]);
if (cl != NULL) {
gchar *dummy[1] = { "321" };
const char *dummy[1] = { "321" };
GtkStyle *style;
/* stick in some place holders */
for (j = 4; --j >= 0 ;)
gtk_clist_append (cl, dummy);
gtk_clist_append (cl, (char **)dummy);
/* Make the 2nd and 4th elements red */
gtk_widget_ensure_style (GTK_WIDGET (cl));
......@@ -2092,7 +2092,8 @@ static void
cb_validation_sensitivity (GtkMenuShell *ignored, FormatState *state)
{
gboolean has_operators = FALSE;
char *msg0 = "", *msg1 = "";
const char *msg0 = "";
const char *msg1 = "";
ValidationType const type = gnumeric_option_menu_get_selected_index (
state->validation.constraint_type);
......@@ -2132,12 +2133,12 @@ cb_validation_sensitivity (GtkMenuShell *ignored, FormatState *state)
}
gtk_label_set_text (state->validation.expr0.name, msg0);
gtk_widget_set_sensitive (GTK_WIDGET (state->validation.expr0.name), msg0 != '\0');
gtk_widget_set_sensitive (GTK_WIDGET (state->validation.expr0.entry), msg0 != '\0');
gtk_widget_set_sensitive (GTK_WIDGET (state->validation.expr0.name), *msg0 != '\0');
gtk_widget_set_sensitive (GTK_WIDGET (state->validation.expr0.entry), *msg0 != '\0');
gtk_label_set_text (state->validation.expr1.name, msg1);
gtk_widget_set_sensitive (GTK_WIDGET (state->validation.expr1.name), msg1 != '\0');
gtk_widget_set_sensitive (GTK_WIDGET (state->validation.expr1.entry), msg1 != '\0');
gtk_widget_set_sensitive (GTK_WIDGET (state->validation.expr1.name), *msg1 != '\0');
gtk_widget_set_sensitive (GTK_WIDGET (state->validation.expr1.entry), *msg1 != '\0');
gtk_widget_set_sensitive (GTK_WIDGET (state->validation.op),
has_operators);
......
......@@ -76,9 +76,9 @@ typedef struct {
static Consolidate *
construct_consolidate (ConsolidateState *state)
{
Consolidate *cs = consolidate_new ();
Consolidate *cs = consolidate_new ();
ConsolidateMode mode = 0;
char *func;
const char *func;
Value *range_value;
int i;
......
......@@ -19,7 +19,7 @@
#define BUTTON_PASTE_LINK 0
static const struct {
char *name;
const char *name;
int disables_second_group;
} paste_types[] = {
{ N_("All"), 0 },
......
......@@ -811,7 +811,7 @@ cb_dialog_solve_clicked (GtkWidget *button, SolverState *state)
"constraints and optimality conditions "
"are satisfied.\n"));
} else {
char *str = "";
char *str;
if (res == SOLVER_LP_UNBOUNDED) {
str = g_strdup_printf
(_("The Target Cell value does "
......
......@@ -203,7 +203,7 @@ stf_preview_draw_grid (RenderData_t *renderdata, int rowcount, int colcount)
double tablewidth = stf_preview_get_table_pixel_width (renderdata);
double xpos = 0;
double ypos = 0;
char *tempcolor;
const char *tempcolor;
int i;
if (renderdata->gridgroup != NULL)
......
......@@ -81,7 +81,7 @@ dialog_summary_update (WorkbookControlGUI *wbcg, SummaryInfo *sin)
GtkWidget *dia, *comments;
gint v;
int i;
static char *names[] = {
static const char *names[] = {
"glade_title",
"glade_author",
"glade_category",
......
2002-02-21 Morten Welinder <terra@diku.dk>
* widget-font-selector.c (styles): Constify.
2002-02-18 Jody Goldberg <jody@gnome.org>
* Release 1.1.0
......
......@@ -110,7 +110,7 @@ fs_fill_font_name_list (FontSelector *fs)
GTK_SIGNAL_FUNC (list_mapped), NULL);
}
static char *styles[] = {
static const char *styles[] = {
N_("Normal"),
N_("Bold"),
N_("Bold italic"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment