Bug #656422 Migrate Search from GladeXML to Builder

Patch by Robert Fewell

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21178 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2011-08-13 15:32:55 +00:00
parent 177a1fd07b
commit c4c54ab4a4
4 changed files with 405 additions and 317 deletions

View File

@ -258,6 +258,7 @@ src/gnome/schemas/apps_gnucash_warnings.schemas.in
src/gnome/schemas/apps_gnucash_window_pages_account_tree.schemas.in
src/gnome/schemas/apps_gnucash_window_pages_register.schemas.in
src/gnome-search/dialog-search.c
src/gnome-search/dialog-search.glade
src/gnome-search/gnc-general-search.c
src/gnome-search/gncmod-gnome-search.c
src/gnome-search/search-account.c
@ -266,7 +267,6 @@ src/gnome-search/search-core-type.c
src/gnome-search/search-core-utils.c
src/gnome-search/search-date.c
src/gnome-search/search-double.c
src/gnome-search/search.glade
src/gnome-search/search-int64.c
src/gnome-search/search-numeric.c
src/gnome-search/search-reconciled.c

View File

@ -59,11 +59,11 @@ libgncmod_gnome_search_la_LIBADD = \
${GLIB_LIBS} \
${REGEX_LIBS}
gladedir = $(GNC_GLADE_DIR)
glade_DATA = \
search.glade
gtkbuilderdir = $(GNC_GTKBUILDER_DIR)
gtkbuilder_DATA = \
dialog-search.glade
EXTRA_DIST = \
${glade_DATA}
${gtkbuilder_DATA}
INCLUDES = -DG_LOG_DOMAIN=\"gnc.gui.search\"

View File

@ -135,6 +135,7 @@ struct _crit_data
static void search_clear_criteria (GNCSearchWindow *sw);
static void gnc_search_dialog_display_results (GNCSearchWindow *sw);
static void
gnc_search_callback_button_execute (GNCSearchCallbackButton *cb,
GNCSearchWindow *sw)
@ -143,6 +144,7 @@ gnc_search_callback_button_execute (GNCSearchCallbackButton *cb,
(cb->cb_fcn)(&(sw->selected_item), sw->user_data);
}
static void
gnc_search_dialog_result_clicked (GtkButton *button, GNCSearchWindow *sw)
{
@ -152,6 +154,7 @@ gnc_search_dialog_result_clicked (GtkButton *button, GNCSearchWindow *sw)
gnc_search_callback_button_execute (cb, sw);
}
static void
gnc_search_dialog_select_cb (GtkButton *button, GNCSearchWindow *sw)
{
@ -201,6 +204,7 @@ gnc_search_dialog_double_click_entry (GNCQueryList *list, gpointer item,
}
#endif
static void
gnc_search_dialog_select_row_cb (GtkCList *clist, gint row, gint column,
GdkEventButton *event, gpointer user_data)
@ -224,6 +228,7 @@ gnc_search_dialog_select_row_cb (GtkCList *clist, gint row, gint column,
}
}
static void
gnc_search_dialog_unselect_row_cb (GtkCList *clist, gint row, gint column,
GdkEventButton *event, gpointer user_data)
@ -235,6 +240,7 @@ gnc_search_dialog_unselect_row_cb (GtkCList *clist, gint row, gint column,
sw->selected_item = NULL;
}
static void
gnc_search_dialog_init_result_list (GNCSearchWindow *sw)
{
@ -247,6 +253,7 @@ gnc_search_dialog_init_result_list (GNCSearchWindow *sw)
G_CALLBACK (gnc_search_dialog_unselect_row_cb), sw);
}
static void
gnc_search_dialog_display_results (GNCSearchWindow *sw)
{
@ -316,12 +323,14 @@ gnc_search_dialog_display_results (GNCSearchWindow *sw)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (sw->new_rb), TRUE);
}
static void
match_combo_changed (GtkComboBox *combo_box, GNCSearchWindow *sw)
{
sw->grouping = gtk_combo_box_get_active(combo_box);
}
static void
search_type_cb (GtkToggleButton *button, GNCSearchWindow *sw)
{
@ -334,6 +343,7 @@ search_type_cb (GtkToggleButton *button, GNCSearchWindow *sw)
}
}
static void
search_active_only_cb (GtkToggleButton *button, GNCSearchWindow *sw)
{
@ -342,6 +352,7 @@ search_active_only_cb (GtkToggleButton *button, GNCSearchWindow *sw)
gtk_toggle_button_get_active (button), NULL);
}
static void
search_update_query (GNCSearchWindow *sw)
{
@ -430,6 +441,7 @@ search_update_query (GNCSearchWindow *sw)
sw->q = new_q;
}
static void
gnc_search_dialog_show_close_cancel (GNCSearchWindow *sw)
{
@ -445,6 +457,7 @@ gnc_search_dialog_show_close_cancel (GNCSearchWindow *sw)
}
}
static void
gnc_search_dialog_reset_widgets (GNCSearchWindow *sw)
{
@ -472,6 +485,7 @@ gnc_search_dialog_reset_widgets (GNCSearchWindow *sw)
}
}
static gboolean
gnc_search_dialog_crit_ok (GNCSearchWindow *sw)
{
@ -492,6 +506,7 @@ gnc_search_dialog_crit_ok (GNCSearchWindow *sw)
return ret;
}
static void
search_find_cb (GtkButton *button, GNCSearchWindow *sw)
{
@ -508,6 +523,7 @@ search_find_cb (GtkButton *button, GNCSearchWindow *sw)
gnc_search_dialog_display_results (sw);
}
static void
search_new_item_cb (GtkButton *button, GNCSearchWindow *sw)
{
@ -541,6 +557,7 @@ search_new_item_cb (GtkButton *button, GNCSearchWindow *sw)
}
}
static void
search_cancel_cb (GtkButton *button, GNCSearchWindow *sw)
{
@ -549,12 +566,14 @@ search_cancel_cb (GtkButton *button, GNCSearchWindow *sw)
gnc_search_dialog_destroy (sw);
}
static void
search_help_cb (GtkButton *button, GNCSearchWindow *sw)
{
gnc_gnome_help (HF_HELP, HL_FIND_TRANSACTIONS);
}
static void
remove_element (GtkWidget *button, GNCSearchWindow *sw)
{
@ -582,6 +601,7 @@ remove_element (GtkWidget *button, GNCSearchWindow *sw)
}
}
static void
attach_element (GtkWidget *element, GNCSearchWindow *sw, int row)
{
@ -603,6 +623,7 @@ attach_element (GtkWidget *element, GNCSearchWindow *sw, int row)
data->button = remove; /* Save the button for later */
}
static void
combo_box_changed (GtkComboBox *combo_box, struct _crit_data *data)
{
@ -653,6 +674,7 @@ combo_box_changed (GtkComboBox *combo_box, struct _crit_data *data)
gnc_search_core_type_editable_enters (newelem);
}
static void
search_clear_criteria (GNCSearchWindow *sw)
{
@ -668,6 +690,7 @@ search_clear_criteria (GNCSearchWindow *sw)
}
}
static GtkWidget *
get_element_widget (GNCSearchWindow *sw, GNCSearchCoreType *element)
{
@ -729,6 +752,7 @@ get_element_widget (GNCSearchWindow *sw, GNCSearchCoreType *element)
return hbox;
}
static void
gnc_search_dialog_add_criterion (GNCSearchWindow *sw)
{
@ -773,12 +797,14 @@ gnc_search_dialog_add_criterion (GNCSearchWindow *sw)
}
}
static void
add_criterion (GtkWidget *button, GNCSearchWindow *sw)
{
gnc_search_dialog_add_criterion (sw);
}
static int
gnc_search_dialog_close_cb (GtkDialog *dialog, GNCSearchWindow *sw)
{
@ -802,6 +828,7 @@ gnc_search_dialog_close_cb (GtkDialog *dialog, GNCSearchWindow *sw)
return FALSE;
}
static void
refresh_handler (GHashTable *changes, gpointer data)
{
@ -811,6 +838,7 @@ refresh_handler (GHashTable *changes, gpointer data)
gnc_search_dialog_display_results (sw);
}
static void
close_handler (gpointer data)
{
@ -821,6 +849,7 @@ close_handler (gpointer data)
/* DRH: should sw be freed here? */
}
static const gchar *
type_label_to_new_button(const gchar* type_label)
{
@ -856,6 +885,10 @@ type_label_to_new_button(const gchar* type_label)
{
return _("New Transaction");
}
else if (g_strcmp0(type_label, "Split") == 0)
{
return _("New Split");
}
else if (g_strcmp0(type_label, "Vendor") == 0)
{
return _("New Vendor");
@ -867,31 +900,34 @@ type_label_to_new_button(const gchar* type_label)
}
}
static void
gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
{
GladeXML *xml;
GtkBuilder *builder;
GtkWidget *label, *add, *box;
GtkComboBox *combo_box;
GtkWidget *widget;
GtkWidget *new_item_button;
const char * type_label;
gboolean active;
xml = gnc_glade_xml_new ("search.glade", "Search Dialog");
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-search.glade", "Search Dialog");
/* Grab the dialog, save the dialog info */
sw->dialog = glade_xml_get_widget (xml, "Search Dialog");
sw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Search Dialog"));
gtk_window_set_title(GTK_WINDOW(sw->dialog), title);
g_object_set_data (G_OBJECT (sw->dialog), "dialog-info", sw);
/* grab the result hbox */
sw->result_hbox = glade_xml_get_widget (xml, "result_hbox");
/* Grab the result hbox */
sw->result_hbox = GTK_WIDGET(gtk_builder_get_object (builder, "result_hbox"));
/* Grab the search-table widget */
sw->criteria_table = glade_xml_get_widget (xml, "criteria_table");
sw->criteria_table = GTK_WIDGET(gtk_builder_get_object (builder, "criteria_table"));
/* Set the type label */
label = glade_xml_get_widget (xml, "type_label");
label = GTK_WIDGET(gtk_builder_get_object (builder, "type_label"));
if (sw->type_label)
type_label = sw->type_label;
else
@ -902,7 +938,7 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
add = gtk_button_new_from_stock (GTK_STOCK_ADD);
g_signal_connect (G_OBJECT (add), "clicked", G_CALLBACK (add_criterion), sw);
box = glade_xml_get_widget (xml, "add_button_box");
box = GTK_WIDGET(gtk_builder_get_object (builder, "add_button_box"));
gtk_box_pack_start (GTK_BOX (box), add, FALSE, FALSE, 3);
gtk_widget_show (add);
@ -914,24 +950,33 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
gtk_combo_box_set_active(combo_box, sw->grouping);
g_signal_connect(combo_box, "changed", G_CALLBACK (match_combo_changed), sw);
box = glade_xml_get_widget (xml, "type_menu_box");
box = GTK_WIDGET(gtk_builder_get_object (builder, "type_menu_box"));
gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET(combo_box), FALSE, FALSE, 3);
gtk_widget_show(GTK_WIDGET(combo_box));
/* Grab the 'all items match' label */
sw->match_all_label = glade_xml_get_widget (xml, "match_all_label");
sw->match_all_label = GTK_WIDGET(gtk_builder_get_object (builder, "match_all_label"));
/* if there's no original query, make the narrow, add, delete
* buttons inaccessible */
sw->new_rb = glade_xml_get_widget (xml, "new_search_radiobutton");
sw->narrow_rb = glade_xml_get_widget (xml, "narrow_search_radiobutton");
sw->add_rb = glade_xml_get_widget (xml, "add_search_radiobutton");
sw->del_rb = glade_xml_get_widget (xml, "delete_search_radiobutton");
/* if there's no original query, make the narrow, add, delete buttons inaccessible */
sw->new_rb = GTK_WIDGET(gtk_builder_get_object (builder, "new_search_radiobutton"));
g_signal_connect (sw->new_rb,"toggled",
G_CALLBACK (search_type_cb), sw);
sw->narrow_rb = GTK_WIDGET(gtk_builder_get_object (builder, "narrow_search_radiobutton"));
g_signal_connect (sw->narrow_rb,"toggled",
G_CALLBACK (search_type_cb), sw);
sw->add_rb = GTK_WIDGET(gtk_builder_get_object (builder, "add_search_radiobutton"));
g_signal_connect (sw->add_rb,"toggled",
G_CALLBACK (search_type_cb), sw);
sw->del_rb = GTK_WIDGET(gtk_builder_get_object (builder, "delete_search_radiobutton"));
g_signal_connect (sw->del_rb,"toggled",
G_CALLBACK (search_type_cb), sw);
active = gnc_gconf_get_bool(sw->gconf_section, KEY_ACTIVE_ONLY, NULL);
sw->active_only_check = glade_xml_get_widget (xml, "active_only_check");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sw->active_only_check),
active);
sw->active_only_check = GTK_WIDGET(gtk_builder_get_object (builder, "active_only_check"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sw->active_only_check), active);
g_signal_connect (sw->active_only_check,"toggled",
G_CALLBACK (search_active_only_cb), sw);
/* Figure out if we this object-type has an "active" parameter, and
* if not, then set the active-check button insensitive
@ -939,14 +984,32 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
if (qof_class_get_parameter (sw->search_for, QOF_PARAM_ACTIVE) == NULL)
gtk_widget_set_sensitive (sw->active_only_check, FALSE);
/* Deal with the find button */
widget = GTK_WIDGET(gtk_builder_get_object (builder, "find_button"));
g_signal_connect (widget,"clicked",
G_CALLBACK (search_find_cb), sw);
/* Deal with the cancel button */
sw->cancel_button = glade_xml_get_widget (xml, "cancel_button");
sw->close_button = glade_xml_get_widget (xml, "close_button");
sw->cancel_button = GTK_WIDGET(gtk_builder_get_object (builder, "cancel_button"));
g_signal_connect (sw->cancel_button,"clicked",
G_CALLBACK (search_cancel_cb), sw);
/* Deal with the close button */
sw->close_button = GTK_WIDGET(gtk_builder_get_object (builder, "close_button"));
g_signal_connect (sw->close_button,"clicked",
G_CALLBACK (search_cancel_cb), sw);
/* Deal with the new_item button */
new_item_button = glade_xml_get_widget (xml, "new_item_button");
new_item_button = GTK_WIDGET(gtk_builder_get_object (builder, "new_item_button"));
gtk_button_set_label (GTK_BUTTON(new_item_button),
type_label_to_new_button(type_label));
g_signal_connect (new_item_button,"clicked",
G_CALLBACK (search_new_item_cb), sw);
/* Deal with the help button */
widget = GTK_WIDGET(gtk_builder_get_object (builder, "help_button"));
g_signal_connect (widget,"clicked",
G_CALLBACK (search_help_cb), sw);
/* add the first criterion */
gnc_search_dialog_add_criterion (sw);
@ -955,28 +1018,8 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
if (!sw->new_item_cb)
gtk_widget_hide (new_item_button);
/* Connect XML signals */
glade_xml_signal_connect_data (xml, "gnc_ui_search_type_cb",
G_CALLBACK (search_type_cb), sw);
glade_xml_signal_connect_data (xml, "gnc_ui_search_active_cb",
G_CALLBACK (search_active_only_cb), sw);
glade_xml_signal_connect_data (xml, "gnc_ui_search_new_cb",
G_CALLBACK (search_new_item_cb), sw);
glade_xml_signal_connect_data (xml, "gnc_ui_search_find_cb",
G_CALLBACK (search_find_cb), sw);
glade_xml_signal_connect_data (xml, "gnc_ui_search_cancel_cb",
G_CALLBACK (search_cancel_cb), sw);
glade_xml_signal_connect_data (xml, "gnc_ui_search_close_cb",
G_CALLBACK (search_cancel_cb), sw);
glade_xml_signal_connect_data (xml, "gnc_ui_search_help_cb",
G_CALLBACK (search_help_cb), sw);
/* Connect all the signals */
gtk_builder_connect_signals (builder, sw);
/* Register ourselves */
sw->component_id = gnc_register_gui_component (DIALOG_SEARCH_CM_CLASS,
@ -989,8 +1032,11 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
gnc_search_dialog_reset_widgets (sw);
gnc_search_dialog_show_close_cancel (sw);
g_object_unref(G_OBJECT(builder));
}
void
gnc_search_dialog_destroy (GNCSearchWindow *sw)
{
@ -1000,6 +1046,7 @@ gnc_search_dialog_destroy (GNCSearchWindow *sw)
gnc_close_gui_component (sw->component_id);
}
void
gnc_search_dialog_raise (GNCSearchWindow *sw)
{
@ -1007,6 +1054,7 @@ gnc_search_dialog_raise (GNCSearchWindow *sw)
gtk_window_present (GTK_WINDOW(sw->dialog));
}
GNCSearchWindow *
gnc_search_dialog_create (QofIdTypeConst obj_type, const gchar *title,
GList *param_list,
@ -1064,6 +1112,7 @@ gnc_search_dialog_create (QofIdTypeConst obj_type, const gchar *title,
return sw;
}
/* Register an on-close signal with the Search Dialog */
guint gnc_search_dialog_connect_on_close (GNCSearchWindow *sw,
GCallback func,
@ -1078,6 +1127,7 @@ guint gnc_search_dialog_connect_on_close (GNCSearchWindow *sw,
}
/* Un-register the signal handlers with the Search Dialog */
void gnc_search_dialog_disconnect (GNCSearchWindow *sw, gpointer user_data)
{
@ -1088,6 +1138,7 @@ void gnc_search_dialog_disconnect (GNCSearchWindow *sw, gpointer user_data)
0, 0, NULL, NULL, user_data);
}
/* Clear all callbacks with this Search Window */
void gnc_search_dialog_set_select_cb (GNCSearchWindow *sw,
GNCSearchSelectedCB selected_cb,
@ -1113,6 +1164,7 @@ void gnc_search_dialog_set_select_cb (GNCSearchWindow *sw,
gnc_search_dialog_show_close_cancel (sw);
}
/* TEST CODE BELOW HERE */
static GList *
@ -1145,6 +1197,7 @@ get_params_list (QofIdTypeConst type)
return list;
}
static GList *
get_display_list (QofIdTypeConst type)
{
@ -1159,12 +1212,14 @@ get_display_list (QofIdTypeConst type)
return list;
}
static void
do_nothing (gpointer *a, gpointer b)
{
return;
}
void
gnc_search_dialog_test (void)
{

View File

@ -1,83 +1,44 @@
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.10 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkDialog" id="Search Dialog">
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="Search Dialog">
<property name="can_focus">False</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
<object class="GtkVBox" id="dialog-vbox3">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="spacing">8</property>
<child>
<widget class="GtkVBox" id="vbox89">
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area3">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<widget class="GtkHBox" id="hbox71">
<object class="GtkButton" id="new_item_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<child>
<widget class="GtkHBox" id="hbox72">
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkLabel" id="type_label">
<object class="GtkHBox" id="hbox74">
<property name="visible">True</property>
<property name="label" translatable="yes">()</property>
<property name="justify">center</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label844">
<property name="visible">True</property>
<property name="label" translatable="yes"> Search </property>
<property name="justify">center</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="search_frame">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<child>
<widget class="GtkVBox" id="vbox88">
<property name="visible">True</property>
<property name="border_width">3</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkHBox" id="hbox73">
<property name="visible">True</property>
<property name="border_width">3</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkHBox" id="add_button_box">
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<property name="can_focus">False</property>
<property name="stock">gtk-new</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -85,34 +46,121 @@
</packing>
</child>
<child>
<widget class="GtkLabel" id="label846">
<object class="GtkLabel" id="label848">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Search for items where</property>
<property name="justify">right</property>
</widget>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_New item...</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="type_menu_box">
<property name="visible">True</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="close_button">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="help_button">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="find_button">
<property name="label">gtk-find</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox89">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="search_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="hbox72">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="type_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">()</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -120,11 +168,106 @@
</packing>
</child>
<child>
<widget class="GtkLabel" id="match_all_label">
<object class="GtkLabel" id="label844">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes"> Search </property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="search_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="label_xalign">0</property>
<child>
<object class="GtkVBox" id="vbox88">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">3</property>
<child>
<object class="GtkHBox" id="hbox73">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">3</property>
<child>
<object class="GtkHBox" id="add_button_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="type_menu_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label846">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Search for items where</property>
<property name="justify">right</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="match_all_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Match all entries&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -133,29 +276,30 @@
</packing>
</child>
<child>
<widget class="GtkTable" id="criteria_table">
<object class="GtkTable" id="criteria_table">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">3</property>
<child>
<placeholder/>
</child>
</widget>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</object>
</child>
<child>
<widget class="GtkLabel" id="label845">
<child type="label">
<object class="GtkLabel" id="label845">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Search Criteria</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</object>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -163,36 +307,41 @@
</packing>
</child>
<child>
<widget class="GtkHBox" id="result_hbox">
<object class="GtkHBox" id="result_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<child>
<widget class="GtkHBox" id="hboxXXX">
<object class="GtkHBox" id="hboxXXX">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<widget class="GtkAlignment" id="alignment2">
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="yalign">1</property>
<property name="yscale">0</property>
<child>
<widget class="GtkFrame" id="frame12">
<object class="GtkFrame" id="frame12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<child>
<widget class="GtkVBox" id="vbox24">
<object class="GtkVBox" id="vbox24">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">3</property>
<property name="orientation">vertical</property>
<child>
<widget class="GtkRadioButton" id="new_search_radiobutton">
<object class="GtkRadioButton" id="new_search_radiobutton">
<property name="label" translatable="yes">New search</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="gnc_ui_search_type_cb"/>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -200,16 +349,16 @@
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="narrow_search_radiobutton">
<object class="GtkRadioButton" id="narrow_search_radiobutton">
<property name="label" translatable="yes">Refine current search</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">new_search_radiobutton</property>
<signal name="toggled" handler="gnc_ui_search_type_cb"/>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -217,16 +366,16 @@
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="add_search_radiobutton">
<object class="GtkRadioButton" id="add_search_radiobutton">
<property name="label" translatable="yes">Add results to current search</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">new_search_radiobutton</property>
<signal name="toggled" handler="gnc_ui_search_type_cb"/>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -234,16 +383,16 @@
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="delete_search_radiobutton">
<object class="GtkRadioButton" id="delete_search_radiobutton">
<property name="label" translatable="yes">Delete results from current search</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">new_search_radiobutton</property>
<signal name="toggled" handler="gnc_ui_search_type_cb"/>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
@ -251,199 +400,83 @@
</packing>
</child>
<child>
<widget class="GtkHSeparator" id="hseparator1">
<object class="GtkHSeparator" id="hseparator1">
<property name="visible">True</property>
</widget>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="active_only_check">
<object class="GtkCheckButton" id="active_only_check">
<property name="label" translatable="yes">Search only active data</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip" translatable="yes">Choose whether to search all your data or only that marked as "active"</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup">Choose whether to search all your data or only that marked as &amp;quot;active&amp;quot;</property>
<property name="tooltip_text" translatable="yes">Choose whether to search all your data or only that marked as "active"</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="gnc_ui_search_active_cb"/>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">5</property>
</packing>
</child>
</widget>
</object>
</child>
<child>
<widget class="GtkLabel" id="label847">
<child type="label">
<object class="GtkLabel" id="label847">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Type of search</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</object>
</child>
</widget>
</object>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<widget class="GtkButton" id="new_item_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<signal name="clicked" handler="gnc_ui_search_new_cb"/>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkHBox" id="hbox74">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label848">
<property name="visible">True</property>
<property name="label" translatable="yes">_New item...</property>
<property name="use_underline">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="close_button">
<property name="label">gtk-close</property>
<property name="response_id">-7</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="gnc_ui_search_close_cb"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="help_button">
<property name="label">gtk-help</property>
<property name="response_id">-11</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="gnc_ui_search_help_cb"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
<property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="gnc_ui_search_cancel_cb"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="find_button">
<property name="label">gtk-find</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="gnc_ui_search_find_cb"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</widget>
</object>
</child>
</widget>
</glade-interface>
<action-widgets>
<action-widget response="0">new_item_button</action-widget>
<action-widget response="-7">close_button</action-widget>
<action-widget response="-11">help_button</action-widget>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="0">find_button</action-widget>
</action-widgets>
</object>
</interface>