~ubuntu-dev/gnucash/ubuntu

« back to all changes in this revision

Viewing changes to src/core-utils/gnc-gtk-utils.c

  • Committer: Reinhard Tartler
  • Date: 2008-08-03 07:38:54 UTC
  • mfrom: (2.1.2 debian)
  • Revision ID: siretart@tauware.de-20080803073854-23i4uqi1e73no4oz
mergeĀ fromĀ debian/unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
{
44
44
  GtkTreeModel *model;
45
45
  GtkTreeIter iter;
46
 
  const gchar *tree_string;
 
46
  gchar *tree_string;
47
47
  gint column, index, id;
 
48
  gboolean match;
48
49
 
49
50
  model = gtk_combo_box_get_model(GTK_COMBO_BOX(cbe));
50
51
  if (!gtk_tree_model_get_iter_first(model, &iter)) {
56
57
  column = gtk_combo_box_entry_get_text_column(cbe);
57
58
  do {
58
59
    gtk_tree_model_get(model, &iter, column, &tree_string, -1);
59
 
    if (g_utf8_collate(text, tree_string) != 0)
 
60
    match = g_utf8_collate(text, tree_string) == 0;
 
61
    g_free(tree_string);
 
62
    if (!match)
60
63
      continue;
61
64
 
62
65
    /* Found a matching string */
120
123
  column = gtk_combo_box_entry_get_text_column(cbe);
121
124
  gtk_tree_model_get(comp_model, comp_iter, column, &text, -1);
122
125
  gnc_cbe_set_by_string(cbe, text);
 
126
  g_free(text);
123
127
  return FALSE;
124
128
}
125
129