Commit 8f61f24e authored by Morten Welinder's avatar Morten Welinder

Why does cvs suck so badly?

parent 2b5db3dc
2003-06-10 Morten Welinder <terra@gnome.org>
* dialog-summary.c (dialog_summary_put): Fix UTF-8 problem.
* dialog-password.c (dialog_get_password): Ditto.
2003-06-09 Jody Goldberg <jody@gnome.org>
* dialog-random-generator.c (dialog_random_tool_init) : use simpler
......
......@@ -66,20 +66,23 @@ autosave_set_sensitivity (G_GNUC_UNUSED GtkWidget *widget,
gboolean
dialog_autosave_prompt (WorkbookControlGUI *wbcg)
{
gint result;
gint result;
GtkWidget *dialog;
char *filename_utf8;
filename_utf8 = workbook_get_filename_utf8 (wb_control_workbook
(WORKBOOK_CONTROL (wbcg)), FALSE);
dialog = gtk_message_dialog_new (wbcg_toplevel (wbcg),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
_("Do you want to save the workbook %s ?"),
workbook_get_filename (wb_control_workbook
(WORKBOOK_CONTROL (wbcg))));
filename_utf8);
g_free (filename_utf8);
result = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
return result == GTK_RESPONSE_YES;
return result == GTK_RESPONSE_YES;
}
......
......@@ -16,6 +16,9 @@ cb_accept_password (GtkWidget *IGNORED, GtkDialog *d)
gtk_dialog_response (d, GTK_RESPONSE_ACCEPT);
}
/*
* Note: filename is fs encoded, not UTF-8.
*/
char *
dialog_get_password (GtkWindow *parent, const char *filename)
{
......@@ -25,8 +28,9 @@ dialog_get_password (GtkWindow *parent, const char *filename)
char *primary;
char *secondary;
GtkWidget *d, *hb, *vb, *pwb, *image, *label, *entry;
char *filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL);
basename = g_path_get_basename (filename);
basename = g_path_get_basename (filename_utf8);
primary = g_strdup_printf (_("%s is encrypted"), basename);
g_free (basename);
secondary = _("Encrypted files require a password\nbefore they can be opened.");
......
......@@ -133,8 +133,11 @@ dialog_summary_put (SummaryState *state)
g_free (txt);
}
w = glade_xml_get_widget (state->gui, "doc_name");
if (w)
gtk_entry_set_text (GTK_ENTRY (w), workbook_get_filename (wb));
if (w) {
char *filename_utf8 = workbook_get_filename_utf8 (wb, FALSE);
gtk_entry_set_text (GTK_ENTRY (w), filename_utf8);
g_free (filename_utf8);
}
}
static void
......
......@@ -789,7 +789,8 @@ void
dao_write_header (data_analysis_output_t *dao, const gchar *toolname,
const gchar *title, Sheet *sheet)
{
GString *buf;
GString *buf;
char *filename_utf8;
buf = g_string_new (NULL);
g_string_append_printf (buf, "%s %s %s %s",
......@@ -798,11 +799,13 @@ dao_write_header (data_analysis_output_t *dao, const gchar *toolname,
g_string_free (buf, FALSE);
buf = g_string_new (NULL);
filename_utf8 = workbook_get_filename_utf8 (sheet->workbook, FALSE);
g_string_append_printf (buf, "%s [%s]%s", _("Worksheet:"),
workbook_get_filename (sheet->workbook),
filename_utf8,
sheet->name_quoted);
dao_set_cell (dao, 0, 1, buf->str);
g_string_free (buf, FALSE);
g_free (filename_utf8);
buf = g_string_new (NULL);
g_string_append (buf, _("Report Created: "));
......
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