Commit d0a371de authored by Morten Welinder's avatar Morten Welinder

compilation: warning fixes.

parent 29516a76
......@@ -287,12 +287,13 @@ html_write_cell_content (GsfOutput *output, GnmCell *cell, GnmStyle const *style
gsf_output_puts (output, "<u>");
if (font_is_monospaced (style))
gsf_output_puts (output, "<tt>");
if (gnm_style_get_font_strike (style))
if (gnm_style_get_font_strike (style)) {
if (version == HTML32)
gsf_output_puts (output, "<strike>");
else
gsf_output_puts (output,
"<span style=\"text-decoration: line-through;\">");
}
switch (gnm_style_get_font_script (style)) {
case GO_FONT_SCRIPT_SUB:
gsf_output_puts (output, "<sub>");
......@@ -339,11 +340,12 @@ html_write_cell_content (GsfOutput *output, GnmCell *cell, GnmStyle const *style
if (hlink_target)
gsf_output_puts (output, "</a>");
if (style != NULL) {
if (gnm_style_get_font_strike (style))
if (gnm_style_get_font_strike (style)) {
if (version == HTML32)
gsf_output_puts (output, "</strike>");
else
gsf_output_puts (output, "</span>");
}
switch (gnm_style_get_font_script (style)) {
case GO_FONT_SCRIPT_SUB:
gsf_output_puts (output, "</sub>");
......
......@@ -31,7 +31,8 @@ hello_message (GnmAction const *action, WorkbookControl *wbc)
char *msg = g_strdup_printf (
_("This is message from the \"%s\" plugin."),
go_plugin_get_name (uihello_plugin));
go_gtk_notice_dialog (wbcg_toplevel (WBC_GTK (wbc)), GTK_MESSAGE_INFO, msg);
go_gtk_notice_dialog (wbcg_toplevel (WBC_GTK (wbc)), GTK_MESSAGE_INFO,
"%s", msg);
g_free (msg);
}
......
......@@ -272,8 +272,9 @@ void
error_in_entry (GenericToolState *state, GtkWidget *entry, char const *err_str)
{
go_gtk_notice_nonmodal_dialog ((GtkWindow *) state->dialog,
&(state->warning_dialog),
GTK_MESSAGE_ERROR, err_str);
&(state->warning_dialog),
GTK_MESSAGE_ERROR,
"%s", err_str);
if (IS_GNM_EXPR_ENTRY (entry))
gnm_expr_entry_grab_focus (GNM_EXPR_ENTRY (entry), TRUE);
......@@ -482,14 +483,17 @@ dialog_tool_init (GenericToolState *state,
gnumeric_keyed_dialog (wbcg, GTK_WINDOW (state->dialog), key);
gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog), state->wbcg,
gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_SHEET_REMOVED |
GNM_DIALOG_DESTROY_SHEET_RENAMED);
return FALSE;
dialog_tool_init_error:
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR, error_str);
go_gtk_notice_dialog (wbcg_toplevel (wbcg),
GTK_MESSAGE_ERROR,
"%s", error_str);
g_free (state);
return TRUE;
}
......
......@@ -302,9 +302,9 @@ cb_consolidate_ok_clicked (GtkWidget *button, ConsolidateState *state)
*/
if (cs == NULL) {
go_gtk_notice_nonmodal_dialog (GTK_WINDOW (state->base.dialog),
&state->base.warning_dialog,
GTK_MESSAGE_ERROR,
state->construct_error);
&state->base.warning_dialog,
GTK_MESSAGE_ERROR,
"%s", state->construct_error);
g_free (state->construct_error);
g_free (dao);
state->construct_error = NULL;
......
......@@ -415,7 +415,8 @@ name_guru_add (NameGuruState *state)
return TRUE;
go_gtk_notice_dialog (GTK_WINDOW (state->dialog),
GTK_MESSAGE_ERROR, perr.err->message);
GTK_MESSAGE_ERROR,
"%s", perr.err->message);
gtk_widget_grab_focus (GTK_WIDGET (state->expr_entry));
parse_error_free (&perr);
return FALSE;
......
......@@ -260,9 +260,9 @@ cb_merge_merge_clicked (G_GNUC_UNUSED GtkWidget *ignore,
text = g_strdup_printf (_("%i fields are not part of the merge zone!"),
field_problems);
go_gtk_notice_nonmodal_dialog ((GtkWindow *) state->dialog,
&(state->warning_dialog),
GTK_MESSAGE_ERROR,
text);
&(state->warning_dialog),
GTK_MESSAGE_ERROR,
"%s", text);
g_free (text);
value_release (v_zone);
range_list_destroy (data_list);
......@@ -279,8 +279,8 @@ cb_merge_merge_clicked (G_GNUC_UNUSED GtkWidget *ignore,
"%i and proceed?"), min_length, max_length,
min_length);
if (go_gtk_query_yes_no (
GTK_WINDOW (state->dialog), TRUE, text)) {
if (go_gtk_query_yes_no (GTK_WINDOW (state->dialog), TRUE,
"%s", text)) {
g_slist_foreach (data_list, cb_merge_trim_data, &min_length);
g_free (text);
} else {
......
......@@ -600,9 +600,10 @@ cb_active_toggled (G_GNUC_UNUSED GtkCellRendererToggle *celltoggle,
);
g_string_append (s, _("\nDo you want to activate this plugin together with its dependencies?"));
if (n_inactive_deps > 0) {
want_activate = go_gtk_query_yes_no (GTK_WINDOW (pm_gui->dialog_pm),
TRUE,
s->str);
want_activate = go_gtk_query_yes_no
(GTK_WINDOW (pm_gui->dialog_pm),
TRUE,
"%s", s->str);
}
g_string_free (s, TRUE);
}
......
......@@ -1040,9 +1040,9 @@ typedef struct {
static gboolean
dialog_pref_select_page_search (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
page_search_t *pst)
GtkTreePath *path,
GtkTreeIter *iter,
page_search_t *pst)
{
int page;
gtk_tree_model_get (model, iter, PAGE_NUMBER, &page, -1);
......@@ -1086,7 +1086,7 @@ cb_dialog_pref_selection_changed (GtkTreeSelection *selection,
-1);
gtk_notebook_set_current_page (state->notebook, page);
} else {
dialog_pref_select_page (state, "0");
dialog_pref_select_page (state, 0);
}
}
......
......@@ -694,7 +694,8 @@ dialog_scenarios (WBCGtk *wbcg)
return;
error_out:
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR, error_str);
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
"%s", error_str);
g_free (state->scenario_state);
g_free (state);
......
......@@ -138,7 +138,8 @@ ok_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd)
err = gnm_search_replace_verify (sr, TRUE);
if (err) {
go_gtk_notice_dialog (GTK_WINDOW (dialog), GTK_MESSAGE_ERROR, err);
go_gtk_notice_dialog (GTK_WINDOW (dialog), GTK_MESSAGE_ERROR,
"%s", err);
g_free (err);
g_object_unref (sr);
return;
......
......@@ -322,7 +322,7 @@ search_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd)
err = gnm_search_replace_verify (sr, FALSE);
if (err) {
go_gtk_notice_dialog (GTK_WINDOW (dd->dialog),
GTK_MESSAGE_ERROR, err);
GTK_MESSAGE_ERROR, "%s", err);
g_free (err);
g_object_unref (sr);
return;
......
......@@ -780,7 +780,7 @@ cb_dialog_solve_clicked (G_GNUC_UNUSED GtkWidget *button,
(GTK_WINDOW (state->dialog),
&(state->warning_dialog),
GTK_MESSAGE_ERROR,
err->message);
"%s", err->message);
}
out:
......
......@@ -189,7 +189,8 @@ cb_col_check_clicked (GtkToggleButton *togglebutton, gpointer _i)
GNM_MAX_COLS);
gtk_toggle_button_set_active (togglebutton, FALSE);
go_gtk_notice_dialog (GTK_WINDOW (pagedata->dialog),
GTK_MESSAGE_WARNING, msg);
GTK_MESSAGE_WARNING,
"%s", msg);
g_free (msg);
}
}
......
......@@ -188,7 +188,8 @@ encodings_changed_cb (GOCharmapSel *cs, char const *new_charmap,
"please select another encoding."),
name ? name : new_charmap);
go_gtk_notice_dialog (GTK_WINDOW (pagedata->dialog),
GTK_MESSAGE_ERROR, msg);
GTK_MESSAGE_ERROR,
"%s", msg);
g_free (msg);
go_charmap_sel_set_encoding (pagedata->main.charmap_selector,
......
......@@ -83,7 +83,8 @@ cb_view_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
name);
gtk_widget_destroy (state->dialog);
go_gtk_notice_dialog (wbcg_toplevel (wbcg),
GTK_MESSAGE_ERROR, error_str);
GTK_MESSAGE_ERROR,
"%s", error_str);
g_free (error_str);
return;
}
......
......@@ -384,13 +384,14 @@ check_multiple_sheet_support_if_needed (GOFileSaver *fs,
if (go_file_saver_get_save_scope (fs) != GO_FILE_SAVE_WORKBOOK &&
gnm_conf_get_core_file_save_single_sheet ()) {
Workbook *wb = wb_view_get_workbook (wb_view);
gchar *msg = _("Selected file format doesn't support "
"saving multiple sheets in one file.\n"
"If you want to save all sheets, save them "
"in separate files or select different file format.\n"
"Do you want to save only current sheet?");
const char *msg =
_("Selected file format doesn't support "
"saving multiple sheets in one file.\n"
"If you want to save all sheets, save them "
"in separate files or select different file format.\n"
"Do you want to save only current sheet?");
if (workbook_sheet_count (wb) > 1) {
ret_val = go_gtk_query_yes_no (parent, TRUE, msg);
ret_val = go_gtk_query_yes_no (parent, TRUE, "%s", msg);
}
}
return (ret_val);
......
......@@ -420,7 +420,7 @@ stf_read_workbook_auto_csvtab (GOFileOpener const *fo, gchar const *enc,
go_gtk_notice_dialog
(wbcg_toplevel (WBC_GTK (context->impl)),
GTK_MESSAGE_WARNING,
msg);
"%s", msg);
else
g_warning ("%s", msg);
#if 0
......
......@@ -479,7 +479,8 @@ cb_edit_search_replace_query (GnmSearchReplaceQuery q, GnmSearchReplace *sr, ...
old_text,
new_text);
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR, err);
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
"%s", err);
g_free (err);
res = GTK_RESPONSE_NO;
break;
......
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