Angus Leeming <[EMAIL PROTECTED]> writes: | John Spray wrote: > >> Hi, >> >> Today's gtk+ improvement: implementation of "Text Style" dialog, aka >> layout->character. >> >> * GCharacter.[Ch], glade/character.glade: New files >> * Dialogs.C, Makefile.am: move from FormCharacter to GCharacter >> * ghelpers.h: copy findPos() from xforms helpers >> >> John > | I see that Lars has committed this, but... > | Strip any extraneous whitespace. Run your files through > | #! /bin/sh > | for file in "$@" | do | sed 's/[ TAB]\{1,\}$//' $file > tmp | cmp -s $file tmp && continue | diff -u $file tmp | mv -i tmp $file | done
What is this doing? Only removeing whitespace from the end of lines? My emacs is setup to do that automatically... | where TAB is a tab character. > | This seems like too much copying is going on: | vector<string>::const_iterator it = strings.begin(); | for(; it != strings.end(); ++it){ | Gtk::TreeModel::iterator iter = model->append(); | Gtk::TreeModel::Row row = *iter; | row[cols->name] = *it; | } > | Why not: | vector<string>::const_iterator it = strings.begin(); | vector<string>::const_iterator const end = strings.end(); I move end out | for (; it != end; ++it) { | Gtk::TreeModel::Row & row = *model->append(); | row[cols->name] = *it; but didn't change the row stuff. | Angus (just to show I can be picky too ;-) Copycat. -- Lgb