mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Remove some white space and tabs in dialog-search.c
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
#include "engine-helpers.h"
|
||||
#include "qofbookslots.h"
|
||||
|
||||
#include "Transaction.h" /* for the SPLIT_* and TRANS_* */
|
||||
#include "Transaction.h" /* for the SPLIT_* and TRANS_* */
|
||||
|
||||
#include "dialog-search.h"
|
||||
#include "search-core-type.h"
|
||||
@@ -166,7 +166,6 @@ gnc_search_callback_button_execute (GNCSearchCallbackButton *cb,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_result_clicked (GtkButton *button, GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -176,7 +175,6 @@ gnc_search_dialog_result_clicked (GtkButton *button, GNCSearchWindow *sw)
|
||||
gnc_search_callback_button_execute (cb, sw);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_select_buttons_enable (GNCSearchWindow *sw, gint selected)
|
||||
{
|
||||
@@ -219,7 +217,6 @@ gnc_search_dialog_select_buttons_enable (GNCSearchWindow *sw, gint selected)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_select_cb (GtkButton *button, GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -238,7 +235,6 @@ gnc_search_dialog_select_cb (GtkButton *button, GNCSearchWindow *sw)
|
||||
gnc_search_dialog_destroy (sw);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_select_row_cb (GNCQueryView *qview,
|
||||
gpointer item,
|
||||
@@ -249,7 +245,6 @@ gnc_search_dialog_select_row_cb (GNCQueryView *qview,
|
||||
gnc_search_dialog_select_buttons_enable(sw, number_of_rows);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_double_click_cb (GNCQueryView *qview,
|
||||
gpointer item,
|
||||
@@ -267,7 +262,6 @@ gnc_search_dialog_double_click_cb (GNCQueryView *qview,
|
||||
/* If we get here, then nothing to do for a double-click */
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_init_result_view (GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -290,7 +284,6 @@ gnc_search_dialog_init_result_view (GNCSearchWindow *sw)
|
||||
G_CALLBACK(gnc_search_dialog_double_click_cb), sw);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_display_results (GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -376,14 +369,12 @@ gnc_search_dialog_display_results (GNCSearchWindow *sw)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (sw->new_rb), TRUE);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
match_combo_changed (GtkComboBoxText *combo_box, GNCSearchWindow *sw)
|
||||
{
|
||||
sw->grouping = gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
search_type_cb (GtkToggleButton *button, GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -396,7 +387,6 @@ search_type_cb (GtkToggleButton *button, GNCSearchWindow *sw)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
search_active_only_cb (GtkToggleButton *button, GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -410,24 +400,24 @@ create_query_fragment (QofIdTypeConst search_for, GNCSearchParam *param, QofQuer
|
||||
{
|
||||
GNCSearchParamKind kind = gnc_search_param_get_kind (param);
|
||||
QofQuery *q = qof_query_create_for (search_for);
|
||||
|
||||
|
||||
if (kind == SEARCH_PARAM_ELEM)
|
||||
{
|
||||
/* The "op" parameter below will be ignored since q has no terms. */
|
||||
qof_query_add_term (q, gnc_search_param_get_param_path (GNC_SEARCH_PARAM_SIMPLE (param)),
|
||||
pdata, QOF_QUERY_OR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GList *plist = gnc_search_param_get_search (GNC_SEARCH_PARAM_COMPOUND (param));
|
||||
|
||||
|
||||
for ( ; plist; plist = plist->next)
|
||||
{
|
||||
QofQuery *new_q;
|
||||
GNCSearchParam *param2 = plist->data;
|
||||
QofQuery *q2 = create_query_fragment (search_for, param2,
|
||||
QofQuery *q2 = create_query_fragment (search_for, param2,
|
||||
qof_query_core_predicate_copy (pdata));
|
||||
new_q = qof_query_merge (q, q2, kind == SEARCH_PARAM_ANY ?
|
||||
new_q = qof_query_merge (q, q2, kind == SEARCH_PARAM_ANY ?
|
||||
QOF_QUERY_OR : QOF_QUERY_AND);
|
||||
qof_query_destroy (q);
|
||||
qof_query_destroy (q2);
|
||||
@@ -490,19 +480,19 @@ search_update_query (GNCSearchWindow *sw)
|
||||
|
||||
switch (sw->search_type)
|
||||
{
|
||||
case 0: /* New */
|
||||
case 0: /* New */
|
||||
new_q = qof_query_merge (sw->start_q, q, QOF_QUERY_AND);
|
||||
qof_query_destroy (q);
|
||||
break;
|
||||
case 1: /* Refine */
|
||||
case 1: /* Refine */
|
||||
new_q = qof_query_merge (sw->q, q, QOF_QUERY_AND);
|
||||
qof_query_destroy (q);
|
||||
break;
|
||||
case 2: /* Add */
|
||||
case 2: /* Add */
|
||||
new_q = qof_query_merge (sw->q, q, QOF_QUERY_OR);
|
||||
qof_query_destroy (q);
|
||||
break;
|
||||
case 3: /* Delete */
|
||||
case 3: /* Delete */
|
||||
q2 = qof_query_invert (q);
|
||||
new_q = qof_query_merge (sw->q, q2, QOF_QUERY_AND);
|
||||
qof_query_destroy (q2);
|
||||
@@ -528,7 +518,6 @@ search_update_query (GNCSearchWindow *sw)
|
||||
sw->q = new_q;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_show_close_cancel (GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -544,7 +533,6 @@ gnc_search_dialog_show_close_cancel (GNCSearchWindow *sw)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_reset_widgets (GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -589,7 +577,6 @@ gnc_search_dialog_crit_ok (GNCSearchWindow *sw)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
search_find_cb (GtkButton *button, GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -614,7 +601,6 @@ search_find_cb (GtkButton *button, GNCSearchWindow *sw)
|
||||
gnc_search_dialog_display_results (sw);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
search_new_item_cb (GtkButton *button, GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -648,7 +634,6 @@ search_new_item_cb (GtkButton *button, GNCSearchWindow *sw)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
search_cancel_cb (GtkButton *button, GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -656,14 +641,12 @@ 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)
|
||||
{
|
||||
@@ -692,7 +675,6 @@ remove_element (GtkWidget *button, GNCSearchWindow *sw)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
attach_element (GtkWidget *element, GNCSearchWindow *sw, int row)
|
||||
{
|
||||
@@ -718,10 +700,9 @@ attach_element (GtkWidget *element, GNCSearchWindow *sw, int row)
|
||||
g_object_set (remove, "margin", 0, NULL);
|
||||
|
||||
gtk_widget_show (remove);
|
||||
data->button = remove; /* Save the button for later */
|
||||
data->button = remove; /* Save the button for later */
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
combo_box_changed (GtkComboBox *combo_box, struct _crit_data *data)
|
||||
{
|
||||
@@ -774,7 +755,6 @@ combo_box_changed (GtkComboBox *combo_box, struct _crit_data *data)
|
||||
gnc_search_core_type_editable_enters (newelem);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
search_clear_criteria (GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -790,7 +770,6 @@ search_clear_criteria (GNCSearchWindow *sw)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *
|
||||
get_comb_box_widget (GNCSearchWindow *sw, struct _crit_data *data)
|
||||
{
|
||||
@@ -1009,14 +988,12 @@ 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)
|
||||
{
|
||||
@@ -1049,7 +1026,6 @@ gnc_search_dialog_close_cb (GtkDialog *dialog, GNCSearchWindow *sw)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
refresh_handler (GHashTable *changes, gpointer data)
|
||||
{
|
||||
@@ -1062,7 +1038,6 @@ refresh_handler (GHashTable *changes, gpointer data)
|
||||
gnc_search_dialog_display_results (sw);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
close_handler (gpointer data)
|
||||
{
|
||||
@@ -1073,7 +1048,6 @@ close_handler (gpointer data)
|
||||
/* DRH: should sw be freed here? */
|
||||
}
|
||||
|
||||
|
||||
static const gchar *
|
||||
type_label_to_new_button(const gchar* type_label)
|
||||
{
|
||||
@@ -1125,7 +1099,6 @@ type_label_to_new_button(const gchar* type_label)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
|
||||
{
|
||||
@@ -1272,7 +1245,6 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title)
|
||||
g_object_unref(G_OBJECT(builder));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_search_dialog_destroy (GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -1282,7 +1254,6 @@ gnc_search_dialog_destroy (GNCSearchWindow *sw)
|
||||
gnc_close_gui_component (sw->component_id);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_search_dialog_raise (GNCSearchWindow *sw)
|
||||
{
|
||||
@@ -1356,7 +1327,6 @@ gnc_search_dialog_create (GtkWindow *parent,
|
||||
return sw;
|
||||
}
|
||||
|
||||
|
||||
/* Register an on-close signal with the Search Dialog */
|
||||
guint gnc_search_dialog_connect_on_close (GNCSearchWindow *sw,
|
||||
GCallback func,
|
||||
@@ -1371,7 +1341,6 @@ 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)
|
||||
{
|
||||
@@ -1382,7 +1351,6 @@ 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,
|
||||
@@ -1441,7 +1409,6 @@ get_params_list (QofIdTypeConst type)
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
static GList *
|
||||
get_display_list (QofIdTypeConst type)
|
||||
{
|
||||
@@ -1463,7 +1430,6 @@ do_nothing (GtkWindow *dialog, gpointer *a, gpointer b)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_search_dialog_test (void)
|
||||
{
|
||||
@@ -1490,8 +1456,7 @@ gnc_search_dialog_test (void)
|
||||
/* (keep the line break below to avoid a translator comment) */
|
||||
gnc_search_dialog_create (NULL, GNC_ID_SPLIT,
|
||||
_("Find Transaction"),
|
||||
params, display,
|
||||
NULL, NULL, buttons, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
params, display,
|
||||
NULL, NULL, buttons, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user