static GtkWidget * make_menu (GNCSearchCoreType *fe) { GNCSearchAccount *fi = (GNCSearchAccount *)fe; GNCSearchAccountPrivate *priv; GtkComboBox *combo; int initial = 0; combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); priv = _PRIVATE(fi); if (priv->match_all) { gnc_combo_box_search_add(combo, _("matches all accounts"), QOF_GUID_MATCH_ALL); initial = QOF_GUID_MATCH_ALL; } else { gnc_combo_box_search_add(combo, _("matches any account"), QOF_GUID_MATCH_ANY); gnc_combo_box_search_add(combo, _("matches no accounts"), QOF_GUID_MATCH_NONE); initial = QOF_GUID_MATCH_ANY; } gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : initial); return GTK_WIDGET(combo); }
static GtkWidget * make_menu (GNCSearchCoreType *fe) { GNCSearchReconciled *fi = (GNCSearchReconciled *)fe; GtkComboBox *combo; combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); gnc_combo_box_search_add(combo, _("is"), QOF_CHAR_MATCH_ANY); gnc_combo_box_search_add(combo, _("is not"), QOF_CHAR_MATCH_NONE); gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : QOF_CHAR_MATCH_ANY); return GTK_WIDGET(combo); }
static GtkWidget * make_menu (GNCSearchCoreType *fe) { GNCSearchString *fi = (GNCSearchString *)fe; GtkComboBox *combo; combo = GTK_COMBO_BOX(gnc_combo_box_new_search()); gnc_combo_box_search_add(combo, _("contains"), SEARCH_STRING_CONTAINS); gnc_combo_box_search_add(combo, _("matches regex"), SEARCH_STRING_MATCHES_REGEX); gnc_combo_box_search_add(combo, _("does not match regex"), SEARCH_STRING_NOT_MATCHES_REGEX); gnc_combo_box_search_changed(combo, &fi->how); gnc_combo_box_search_set_active(combo, fi->how ? fi->how : SEARCH_STRING_CONTAINS); return GTK_WIDGET(combo); }