Re-indentation of source code.

This re-indentation was done using astyle-1.24 using the following options:

 astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19627 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-10-03 12:27:44 +00:00
parent 752b94a8b9
commit a57ed88ee0
22 changed files with 179 additions and 155 deletions

View File

@ -1482,7 +1482,8 @@ GHashTable* gnc_g_hash_new_guid_numeric()
NULL, gnc_numeric_free); NULL, gnc_numeric_free);
} }
typedef struct { typedef struct
{
GHashTable *hash; GHashTable *hash;
GList **creation_errors; GList **creation_errors;
const SchedXaction *sx; const SchedXaction *sx;
@ -1685,7 +1686,8 @@ void gnc_sx_instantiate_cashflow(const SchedXaction* sx,
instantiate_cashflow_internal(sx, map, creation_errors, 1); instantiate_cashflow_internal(sx, map, creation_errors, 1);
} }
typedef struct { typedef struct
{
GHashTable *hash; GHashTable *hash;
GList **creation_errors; GList **creation_errors;
const GDate *range_start; const GDate *range_start;

View File

@ -676,7 +676,7 @@ gnc_invoice_window_postCB (GtkWidget *widget, gpointer data)
acct_commodities = gnc_business_commodities(&(iw->owner)); acct_commodities = gnc_business_commodities(&(iw->owner));
/* Get the due date and posted account */ /* Get the due date and posted account */
postdate=gncInvoiceGetDateOpened (invoice); postdate = gncInvoiceGetDateOpened (invoice);
ddue = postdate; ddue = postdate;
memo = NULL; memo = NULL;
@ -2586,7 +2586,7 @@ gnc_invoice_search (GncInvoice *start, GncOwner *owner, QofBook *book)
else else
{ {
QofQueryPredData *inv_type_pred; QofQueryPredData *inv_type_pred;
GSList *param_list=NULL; GSList *param_list = NULL;
inv_type_pred = qof_query_string_predicate(QOF_COMPARE_EQUAL, inv_type_pred = qof_query_string_predicate(QOF_COMPARE_EQUAL,
gncInvoiceGetTypeFromOwnerType(owner_type), gncInvoiceGetTypeFromOwnerType(owner_type),
QOF_STRING_MATCH_NORMAL, FALSE); QOF_STRING_MATCH_NORMAL, FALSE);

View File

@ -45,9 +45,9 @@ gnc_search_invoice_on_id (QofBook * book, const gchar *id)
{ {
GncInvoice *invoice = NULL; GncInvoice *invoice = NULL;
GNCIdType type = GNC_INVOICE_MODULE_NAME; GNCIdType type = GNC_INVOICE_MODULE_NAME;
invoice = (GncInvoice*)search(book,id, invoice, type); invoice = (GncInvoice*)search(book, id, invoice, type);
return invoice; return invoice;
} }
/* Essentially identical to above.*/ /* Essentially identical to above.*/
GncInvoice * GncInvoice *
@ -57,7 +57,7 @@ gnc_search_bill_on_id (QofBook * book, const gchar *id)
GNCIdType type = GNC_INVOICE_MODULE_NAME; GNCIdType type = GNC_INVOICE_MODULE_NAME;
bill = (GncInvoice*)search(book, id, bill, type); bill = (GncInvoice*)search(book, id, bill, type);
return bill; return bill;
} }
GncVendor * GncVendor *
gnc_search_vendor_on_id (QofBook * book, const gchar *id) gnc_search_vendor_on_id (QofBook * book, const gchar *id)
@ -90,17 +90,17 @@ static void * search(QofBook * book, const gchar *id, void * object, GNCIdType t
// Search only the id field // Search only the id field
string_pred_data = gncQueryStringPredicate (COMPARE_EQUAL, id, STRING_MATCH_NORMAL, FALSE); string_pred_data = gncQueryStringPredicate (COMPARE_EQUAL, id, STRING_MATCH_NORMAL, FALSE);
if (strcmp(type,GNC_CUSTOMER_MODULE_NAME)) if (strcmp(type, GNC_CUSTOMER_MODULE_NAME))
{ {
GncCustomer *c = NULL; GncCustomer *c = NULL;
gncQueryAddTerm (q, gncQueryBuildParamList("CUSTOMER_ID"), string_pred_data, QUERY_AND); gncQueryAddTerm (q, gncQueryBuildParamList("CUSTOMER_ID"), string_pred_data, QUERY_AND);
} }
else if (strcmp(type,GNC_INVOICE_MODULE_NAME)) else if (strcmp(type, GNC_INVOICE_MODULE_NAME))
{ {
GncInvoice *c = NULL; GncInvoice *c = NULL;
gncQueryAddTerm (q, gncQueryBuildParamList("INVOICE_ID"), string_pred_data, QUERY_AND); gncQueryAddTerm (q, gncQueryBuildParamList("INVOICE_ID"), string_pred_data, QUERY_AND);
} }
else if (strcmp(type,GNC_VENDOR_MODULE_NAME)) else if (strcmp(type, GNC_VENDOR_MODULE_NAME))
{ {
GncVendor *c = NULL; GncVendor *c = NULL;
gncQueryAddTerm (q, gncQueryBuildParamList("VENDOR_ID"), string_pred_data, QUERY_AND); gncQueryAddTerm (q, gncQueryBuildParamList("VENDOR_ID"), string_pred_data, QUERY_AND);
@ -111,11 +111,14 @@ static void * search(QofBook * book, const gchar *id, void * object, GNCIdType t
// now compare _exactly_ // now compare _exactly_
len = g_list_length (result); len = g_list_length (result);
if (result && (len>0)) { if (result && (len > 0))
{
result = g_list_first (result); result = g_list_first (result);
while (result) { while (result)
{
c = result->data; c = result->data;
if (strcmp(id,gncCustomerGetID(c)) == 0) { if (strcmp(id, gncCustomerGetID(c)) == 0)
{
// correct id found // correct id found
object = c; object = c;
break; break;

View File

@ -827,25 +827,44 @@ close_handler (gpointer data)
static const gchar * static const gchar *
type_label_to_new_button(const gchar* type_label) type_label_to_new_button(const gchar* type_label)
{ {
if (g_strcmp0(type_label, "Bill") == 0) { if (g_strcmp0(type_label, "Bill") == 0)
{
return _("New Bill"); return _("New Bill");
} else if (g_strcmp0(type_label, "Customer") == 0) { }
else if (g_strcmp0(type_label, "Customer") == 0)
{
return _("New Customer"); return _("New Customer");
} else if (g_strcmp0(type_label, "Employee") == 0) { }
else if (g_strcmp0(type_label, "Employee") == 0)
{
return _("New Employee"); return _("New Employee");
} else if (g_strcmp0(type_label, "Expense Voucher") == 0) { }
else if (g_strcmp0(type_label, "Expense Voucher") == 0)
{
return _("New Expense Voucher"); return _("New Expense Voucher");
} else if (g_strcmp0(type_label, "Invoice") == 0) { }
else if (g_strcmp0(type_label, "Invoice") == 0)
{
return _("New Invoice"); return _("New Invoice");
} else if (g_strcmp0(type_label, "Job") == 0) { }
else if (g_strcmp0(type_label, "Job") == 0)
{
return _("New Job"); return _("New Job");
} else if (g_strcmp0(type_label, "Order") == 0) { }
else if (g_strcmp0(type_label, "Order") == 0)
{
return _("New Order"); return _("New Order");
} else if (g_strcmp0(type_label, "Transaction") == 0) { }
else if (g_strcmp0(type_label, "Transaction") == 0)
{
return _("New Transaction"); return _("New Transaction");
} else if (g_strcmp0(type_label, "Vendor") == 0) { }
else if (g_strcmp0(type_label, "Vendor") == 0)
{
return _("New Vendor"); return _("New Vendor");
} else { }
else
{
PWARN("No translatable new-button label found for search type \"%s\", please add one into dialog-search.c!", type_label); PWARN("No translatable new-button label found for search type \"%s\", please add one into dialog-search.c!", type_label);
return _("New item"); return _("New item");
} }

View File

@ -981,7 +981,7 @@ gnc_file_do_export(const char * filename)
/* Save As can't use the generic 'file' protocol. If the user didn't set /* Save As can't use the generic 'file' protocol. If the user didn't set
* a specific protocol, assume the default 'xml'. * a specific protocol, assume the default 'xml'.
*/ */
if (g_strcmp0 (protocol,"file") == 0) if (g_strcmp0 (protocol, "file") == 0)
{ {
g_free (protocol); g_free (protocol);
protocol = g_strdup ("xml"); protocol = g_strdup ("xml");
@ -1193,7 +1193,7 @@ gnc_file_do_save_as (const char* filename)
/* Save As can't use the generic 'file' protocol. If the user didn't set /* Save As can't use the generic 'file' protocol. If the user didn't set
* a specific protocol, assume the default 'xml'. * a specific protocol, assume the default 'xml'.
*/ */
if (g_strcmp0 (protocol,"file") == 0) if (g_strcmp0 (protocol, "file") == 0)
{ {
g_free (protocol); g_free (protocol);
protocol = g_strdup ("xml"); protocol = g_strdup ("xml");

View File

@ -1819,7 +1819,7 @@ gnc_tree_view_column_properties (GncTreeView *view,
visible = gnc_tree_view_column_visible(view, NULL, pref_name); visible = gnc_tree_view_column_visible(view, NULL, pref_name);
/* Get width */ /* Get width */
if(default_width == 0) if (default_width == 0)
{ {
sizing = GTK_TREE_VIEW_COLUMN_AUTOSIZE; sizing = GTK_TREE_VIEW_COLUMN_AUTOSIZE;
} }

View File

@ -2552,7 +2552,7 @@ gnc_print_check_position_changed (GtkComboBox *widget,
gint pnum; gint pnum;
guint check_count; guint check_count;
gint first_page_max, first_page_min, first_page_value; gint first_page_max, first_page_min, first_page_value;
gdouble fpmin,fpmax; gdouble fpmin, fpmax;
pnum = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->position_combobox)); pnum = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->position_combobox));

View File

@ -72,11 +72,11 @@
const char *gnc_default_strftime_date_format = const char *gnc_default_strftime_date_format =
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
/* The default date format for use with strftime in Win32. */ /* The default date format for use with strftime in Win32. */
N_("%B %#d, %Y") N_("%B %#d, %Y")
#else #else
/* The default date format for use with strftime in other OS. */ /* The default date format for use with strftime in other OS. */
/* Translators: call "man strftime" for possible values. */ /* Translators: call "man strftime" for possible values. */
N_("%B %e, %Y") N_("%B %e, %Y")
#endif #endif
; ;

View File

@ -1407,8 +1407,8 @@ gnc_get_export_filename (SCM choice)
filepath = gnc_file_dialog (title, NULL, default_dir, GNC_FILE_DIALOG_EXPORT); filepath = gnc_file_dialog (title, NULL, default_dir, GNC_FILE_DIALOG_EXPORT);
/* Try to test for extension on file name, add if missing */ /* Try to test for extension on file name, add if missing */
if (g_strrstr(filepath,".") == NULL) if (g_strrstr(filepath, ".") == NULL)
filepath = g_strconcat(filepath,".",g_ascii_strdown(type,strlen(type)),NULL); filepath = g_strconcat(filepath, ".", g_ascii_strdown(type, strlen(type)), NULL);
g_free (title); g_free (title);
g_free (default_dir); g_free (default_dir);