Re: [evolution-patches] initial addressbook patches
- From: Larry Ewing <lewing ximian com>
- To: Chris Toshok <toshok ximian com>
- Cc: patches <evolution-patches ximian com>
- Subject: Re: [evolution-patches] initial addressbook patches
- Date: 13 Jun 2003 20:21:10 -0500
On Fri, 2003-06-13 at 19:51, Chris Toshok wrote:
> On Fri, 2003-06-13 at 11:07, Larry Ewing wrote:
> > This isn't complete but I thought I'd get what I have out there for
> > people to look at while I continue working on it.
>
>
> > Index: component/select-names/e-select-names-text-model.c
> > ===================================================================
> > RCS file:
> > /cvs/gnome/evolution/addressbook/gui/component/select-names/e-select-names-text-model.c,v
> > retrieving revision 1.36
> > diff -u -p -r1.36 e-select-names-text-model.c
> > --- component/select-names/e-select-names-text-model.c 14 May 2003
> > 00:45:20 -0000 1.36
> > +++ component/select-names/e-select-names-text-model.c 13 Jun 2003
> > 18:04:08 -0000
> > @@ -334,6 +334,7 @@ e_select_names_text_model_insert_length
> > ESelectNamesTextModel *text_model = E_SELECT_NAMES_TEXT_MODEL
> > (model);
> > ESelectNamesModel *source = text_model->source;
> > const char *t;
> > + gchar *text;
>
> just noticed this - "text" is the name of a parameter, so this new
> variable generates a compiler warning.
>
> > if (out) {
> > gchar *tmp = g_strndup (text, length);
> > @@ -341,7 +342,9 @@ e_select_names_text_model_insert_length
> > g_free (tmp);
> > }
> >
> > - pos = CLAMP (pos, 0, g_utf8_strlen
> > (e_select_names_model_get_textification (source, text_model->sep),
> > -1));
> > + text = e_select_names_model_get_textification (source,
> > text_model->sep);
> > + pos = CLAMP (pos, 0, g_utf8_strlen (text, -1));
> > + g_free (text)
>
> missing ';' here, but I'm sure that's a typo :)
Yeah I got a bad version of this file into the patch. Updated version
attached.
--Larry
Index: component/select-names/e-select-names-text-model.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/select-names/e-select-names-text-model.c,v
retrieving revision 1.36
diff -u -p -r1.36 e-select-names-text-model.c
--- component/select-names/e-select-names-text-model.c 14 May 2003 00:45:20 -0000 1.36
+++ component/select-names/e-select-names-text-model.c 14 Jun 2003 01:21:01 -0000
@@ -334,14 +334,17 @@ e_select_names_text_model_insert_length
ESelectNamesTextModel *text_model = E_SELECT_NAMES_TEXT_MODEL (model);
ESelectNamesModel *source = text_model->source;
const char *t;
+ gchar *tmp;
if (out) {
- gchar *tmp = g_strndup (text, length);
+ tmp = g_strndup (text, length);
fprintf (out, ">> insert \"%s\" (len=%d) at %d\n", tmp, length, pos);
g_free (tmp);
}
- pos = CLAMP (pos, 0, g_utf8_strlen (e_select_names_model_get_textification (source, text_model->sep), -1));
+ tmp = e_select_names_model_get_textification (source, text_model->sep);
+ pos = CLAMP (pos, 0, g_utf8_strlen (tmp, -1));
+ g_free (tmp);
/* We want to control all cursor motions ourselves, rather than taking hints
from the ESelectNamesModel. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]