Commit 1eb8f623 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Ditto. (wbcg_edit_start): Ditto.

2002-10-30  Morten Welinder  <terra@diku.dk>

	* src/workbook-edit.c (entry_changed): Ditto.
	(wbcg_edit_start): Ditto.

	* src/func.c (tokenized_help_new): Make utf8 safe.


2002-10-30  Morten Welinder  <terra@diku.dk>

	* dialog-function-select.c
	(cb_dialog_function_select_fun_selection_changed): Make utf8 safe.
	I think.  I hope.
parent 2ef4ee07
2002-10-30 Morten Welinder <terra@diku.dk>
* src/workbook-edit.c (entry_changed): Ditto.
(wbcg_edit_start): Ditto.
* src/func.c (tokenized_help_new): Make utf8 safe.
* src/cell-draw.c (cell_split_text): Fix isspace check and
eliminate ctype.h usage.
* src/print-cell.c (cell_split_text): Ditto.
......
......@@ -14,6 +14,7 @@ Morten:
* Fix elusive dependency leak.
* Implemented a new and better qgamma function. (Anything dealing
with the chisq distribution will also benefit from this.)
* More utf8 work.
--------------------------------------------------------------------------
Gnumeric 1.1.10
......
2002-10-30 Morten Welinder <terra@diku.dk>
* src/workbook-edit.c (entry_changed): Ditto.
(wbcg_edit_start): Ditto.
* src/func.c (tokenized_help_new): Make utf8 safe.
* src/cell-draw.c (cell_split_text): Fix isspace check and
eliminate ctype.h usage.
* src/print-cell.c (cell_split_text): Ditto.
......
2002-10-30 Morten Welinder <terra@diku.dk>
* src/workbook-edit.c (entry_changed): Ditto.
(wbcg_edit_start): Ditto.
* src/func.c (tokenized_help_new): Make utf8 safe.
* src/cell-draw.c (cell_split_text): Fix isspace check and
eliminate ctype.h usage.
* src/print-cell.c (cell_split_text): Ditto.
......
......@@ -31,7 +31,6 @@
#include <locale.h>
#include <string.h>
#include <ctype.h>
static gboolean
cell_has_expr_or_number_or_blank (Cell const * cell)
......
2002-10-30 Morten Welinder <terra@diku.dk>
* dialog-function-select.c
(cb_dialog_function_select_fun_selection_changed): Make utf8 safe.
I think. I hope.
2002-10-29 Jody Goldberg <jody@gnome.org>
* dialog-define-names.c (name_guru_init) : add a help button.
......
......@@ -46,7 +46,6 @@
#include <glade/glade.h>
#include <gsf/gsf-impl-utils.h>
#include <ctype.h>
#include <stdio.h>
#define GLADE_FILE "cell-sort.glade"
......
......@@ -38,7 +38,6 @@
#include <gsf/gsf-impl-utils.h>
#include <glade/glade.h>
#include <ctype.h>
#define GLADE_FILE "function-select.glade"
......@@ -243,8 +242,10 @@ cb_dialog_function_select_fun_selection_changed (GtkTreeSelection *the_selection
/* Set the fn name Bold */
cursor = f_desc;
for (i = 0; !isspace ((unsigned char)*cursor); i++)
cursor++;
for (i = 0;
g_unichar_isspace (g_utf8_get_char (cursor));
i++)
cursor = g_utf8_next_char (cursor);
tag = gtk_text_buffer_create_tag (state->description,
NULL,
......@@ -259,45 +260,55 @@ cb_dialog_function_select_fun_selection_changed (GtkTreeSelection *the_selection
&start, &end);
/* Set the arguments and errors Italic */
for ( ; *cursor; cursor++) {
for (; *cursor; cursor = g_utf8_next_char (cursor)) {
if (*cursor == '@' || *cursor == '#') {
int j;
cursor++;
for (i = 0; *cursor
&& !isspace ((unsigned char)*cursor); i++)
cursor++;
for (i = 0;
*cursor && !g_unichar_isspace (g_utf8_get_char (cursor));
i++)
cursor = g_utf8_next_char (cursor);
j = g_utf8_pointer_to_offset (f_desc, cursor);
tag = gtk_text_buffer_create_tag
(state->description,
NULL, "style",
PANGO_STYLE_ITALIC, NULL);
gtk_text_buffer_get_iter_at_offset
(state->description, &start,
cursor - f_desc - i);
j - i);
gtk_text_buffer_get_iter_at_offset
(state->description, &end,
cursor - f_desc);
j);
gtk_text_buffer_apply_tag
(state->description, tag,
&start, &end);
} else if (*cursor == '\n' && cursor[1] == '*'
&& cursor[2] == ' ') {
} else if (*cursor == '\n' &&
cursor[1] == '*' &&
cursor[2] == ' ') {
int j = g_utf8_pointer_to_offset (f_desc, cursor);
const char *p;
tag = gtk_text_buffer_create_tag
(state->description, NULL,
"weight", PANGO_WEIGHT_BOLD,
NULL);
gtk_text_buffer_get_iter_at_offset
(state->description, &start,
cursor - f_desc + 1);
j + 1);
gtk_text_buffer_get_iter_at_offset
(state->description, &end,
cursor - f_desc + 2);
j + 2);
gtk_text_buffer_apply_tag
(state->description, tag,
&start, &end);
/* Make notes to look cooler. */
for (i = 2; cursor[i]
&& cursor[i] != '\n'; i++)
;
p = cursor + 2;
for (i = 0; *p && *p != '\n'; i++)
p = g_utf8_next_char (p);
tag = gtk_text_buffer_create_tag
(state->description, NULL,
......@@ -305,10 +316,10 @@ cb_dialog_function_select_fun_selection_changed (GtkTreeSelection *the_selection
gtk_text_buffer_get_iter_at_offset
(state->description,
&start, cursor - f_desc + 1);
&start, j + 1);
gtk_text_buffer_get_iter_at_offset
(state->description, &end,
cursor - f_desc + i);
j + i);
gtk_text_buffer_apply_tag
(state->description, tag,
&start, &end);
......
......@@ -31,7 +31,6 @@
#include <string.h>
#include <glib.h>
#include <stdlib.h>
#include <ctype.h>
static GList *categories;
static SymbolTable *global_symbol_table;
......@@ -1211,8 +1210,10 @@ tokenized_help_new (GnmFunc const *func)
tok->sections = g_ptr_array_new ();
for (start = ptr = tok->help_copy; *ptr ; ptr++) {
if (ptr[0] == '\\' && ptr[1])
ptr += 2;
if (ptr[0] == '\\' && ptr[1]) {
ptr = g_utf8_next_char (ptr + 1);
continue;
}
/* FIXME : This is hugely ugly. we need a decent
* format for this stuff.
......@@ -1221,7 +1222,8 @@ tokenized_help_new (GnmFunc const *func)
* for now make the assumption that any args will
* always start with lower case.
*/
if (*ptr == '@' && isupper (*(unsigned char *)(ptr +1)) &&
if (*ptr == '@' &&
g_unichar_isupper (g_utf8_get_char (ptr + 1)) &&
seek_at && last_newline) {
/* previous newline if this is not the first */
if (ptr != start)
......
......@@ -30,7 +30,6 @@
#include <libxml/globals.h>
#include <locale.h>
#include <string.h>
#include <ctype.h>
/* The name of our clipboard atom and the 'magic' info number */
#define GNUMERIC_ATOM_NAME "application/x-gnumeric"
......
......@@ -38,7 +38,6 @@
#include <gsf/gsf-impl-utils.h>
#include <gal/widgets/e-cursors.h>
#include <ctype.h>
#include <string.h>
static GnomeCanvasItem *item_edit_parent_class;
......
......@@ -20,7 +20,6 @@
#include "sheet-object-cell-comment.h"
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
/* ------------------------------------------------------------------------- */
......
......@@ -11,7 +11,6 @@
#include "gutils.h"
#include <string.h>
#include <ctype.h>
#include <stdio.h>
/**
......
......@@ -6,7 +6,6 @@
#include <gnumeric.h>
#include "gnumeric-combo-text.h"
#include <ctype.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkentry.h>
#include <gtk/gtklist.h>
......
......@@ -89,7 +89,6 @@
#include <libgnomevfs/gnome-vfs-uri.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
......
......@@ -34,7 +34,6 @@
#include "widgets/gnumeric-expr-entry.h"
#include <gtk/gtk.h>
#include <ctype.h>
#include <string.h>
/*
......@@ -265,7 +264,7 @@ entry_changed (GtkEntry *entry, void *data)
* does not begin with an alphabetic character.
*/
if (text_len < wbcg->auto_max_size ||
!isalpha((unsigned char)*text))
!g_unichar_isalpha (g_utf8_get_char (text)))
wbcg->auto_completing = FALSE;
if (wbv->do_auto_completion && wbcg->auto_completing)
......@@ -365,7 +364,7 @@ wbcg_edit_start (WorkbookControlGUI *wbcg,
/* Activate auto-completion if this is not an expression */
if (wbv->do_auto_completion &&
(text == NULL || isalpha ((unsigned char)*text))) {
(text == NULL || g_unichar_isalpha (g_utf8_get_char (text)))) {
wbcg->auto_complete = complete_sheet_new (
sv->sheet, col, row,
workbook_edit_complete_notify, wbcg);
......
......@@ -40,7 +40,6 @@
#include <gtk/gtkmain.h> /* for gtk_main_quit */
#include <gsf/gsf-impl-utils.h>
#include <ctype.h>
#include <string.h>
static GObjectClass *workbook_parent_class;
......
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