Re: again a new snapshot of the GtkComboBox...



On Fri, 27 Oct 2000, Kristian Rietveld wrote:

> >  * You've removed the authorship/copyright attributions! This is
> >    something that need to be taken very seriously.  Please make sure
> >    that gtkcombobox includes all the attributions from the
> >    gnumeric/gal version.
> >
> 
> I forgot to add them, oops. I'll add them as soon as possible (I'm doing
> it right now :).
>  
> >  * You need to reindent all the code from Linux style to 
> >    GNU/GTK+ style (2 space indents) - other than that,
> >    the coding style looks generally good.
> >
> 
> I'll reindent the code after I found out how /usr/bin/indent
> works. Shouldn't be that difficult :).

i'm not so worried about your indentation, going once over the file with
emacs will fix the indentation easily.
rather, please put opening braces after a newline, i.e.:
if (foo)
  {
    do stuff;
  }
instead of if (foo) {
and please don't use inline assignments (haven't looked closely enough,
so maybe you aren't using them), that is, do:
foo = 5;
if (foo)
instead of
if ((foo = 5))

> >     void       gtk_combo_box_text_remove_matches    (GtkComboBoxText   *cboxtext,
> >                                                      const gchar       *pattern);
> > 
> > What is the motivation for this?
> 
> It was in the GtkClueHunter code, you can remove the matches of the given
> pattern out of the list.

well, from looking at your code, you seem to miss one of the clue hunters
most important features, i.e. is the user enters:

| *foo?baz* |
if gtk_clue_hunter_set_pattern_matching (ch, TRUE); was called (defaults to
TRUE as well), the clue hunter lists completions for you:

+---------------------+
| abacus              |
| barbara             |
| barbarafoo1baz  <--------- highlit
| customizedfoo       |
| deltafoobaz         |
| extrafoo2bazig  <--------- highlit
| zacharias           |
+---------------------+

basically, you just need to do your strcmp for pattern_matching==FALSE
and use the pattern functions as in remove_matches for pattern_matching==TRUE.
this and the tab-completion is what made clue-hunter shell-sytle alike,
was the main motivation for its implementation and finally, produced
its name ;)

> >     void       gtk_combo_box_text_select            (GtkComboBoxText   *cboxtext,
> >                                                      const gchar       *string);
> > Why this as a public function?
> > 
> >     gchar     *gtk_combo_box_text_try_complete      (GtkComboBoxText   *cboxtext);
> > 
> > Why this as a public function?
> > 
> 
> Both were also public in the GtkClueHunter, so I thought it was better if
> I kept them public.

well, they, along with _remove_matches, don't make much sense without
having wildcard pattern matching in the first place, so please add that ;)

> 
> 	Kris
> 

---
ciaoTJ





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]