Replace tabs with spaces in a couple of source files

This commit is contained in:
Robert Fewell 2017-12-29 10:35:49 +00:00
parent f00f7335b7
commit 2f2d1b68ba
4 changed files with 61 additions and 63 deletions

View File

@ -354,13 +354,13 @@ gnc_plugin_business_get_type (void)
static const GTypeInfo our_info =
{
sizeof (GncPluginBusinessClass),
NULL, /* base_init */
NULL, /* base_finalize */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gnc_plugin_business_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GncPluginBusiness),
0, /* n_preallocs */
0, /* n_preallocs */
(GInstanceInitFunc) gnc_plugin_business_init
};
@ -953,17 +953,17 @@ static void
gnc_plugin_business_cmd_test_init_data (GtkAction *action,
GncMainWindowActionData *data)
{
QofBook *book = gnc_get_current_book();
GncCustomer *customer = gncCustomerCreate(book);
GncAddress *address = gncCustomerGetAddr(customer);
GncInvoice *invoice = gncInvoiceCreate(book);
GncOwner *owner = gncOwnerNew();
GncJob *job = gncJobCreate(book);
Account *root = gnc_book_get_root_account(book);
Account *inc_acct = xaccMallocAccount(book);
Account *bank_acct = xaccMallocAccount(book);
Account *tax_acct = xaccMallocAccount(book);
Account *ar_acct = xaccMallocAccount(book);
QofBook *book = gnc_get_current_book();
GncCustomer *customer = gncCustomerCreate(book);
GncAddress *address = gncCustomerGetAddr(customer);
GncInvoice *invoice = gncInvoiceCreate(book);
GncOwner *owner = gncOwnerNew();
GncJob *job = gncJobCreate(book);
Account *root = gnc_book_get_root_account(book);
Account *inc_acct = xaccMallocAccount(book);
Account *bank_acct = xaccMallocAccount(book);
Account *tax_acct = xaccMallocAccount(book);
Account *ar_acct = xaccMallocAccount(book);
Timespec now;
// Create Customer

View File

@ -393,8 +393,8 @@ static GtkActionEntry gnc_plugin_page_register_actions [] =
},
{
"ScrubAllAction", NULL,
/* Translators: The following 2 are Scrub actions in register view */
N_("_All transactions"), NULL, NULL,
/* Translators: The following 2 are Scrub actions in register view */
N_("_All transactions"), NULL, NULL,
G_CALLBACK (gnc_plugin_page_register_cmd_scrub_all)
},
{
@ -488,11 +488,11 @@ static const gchar *view_style_actions[] =
/** Short labels for use on the toolbar buttons. */
static action_toolbar_labels toolbar_labels[] =
{
{ "ActionsTransferAction", N_("Transfer") },
{ "RecordTransactionAction", N_("Enter") },
{ "CancelTransactionAction", N_("Cancel") },
{ "DeleteTransactionAction", N_("Delete") },
{ "DuplicateTransactionAction", N_("Duplicate") },
{ "ActionsTransferAction", N_("Transfer") },
{ "RecordTransactionAction", N_("Enter") },
{ "CancelTransactionAction", N_("Cancel") },
{ "DeleteTransactionAction", N_("Delete") },
{ "DuplicateTransactionAction", N_("Duplicate") },
{ "SplitTransactionAction", N_("Split") },
{ "ScheduleTransactionAction", N_("Schedule") },
{ "BlankTransactionAction", N_("Blank") },
@ -1323,10 +1323,10 @@ static const gchar *style_names[] =
#define KEY_REGISTER_STYLE "RegisterStyle"
#define KEY_DOUBLE_LINE "DoubleLineMode"
#define LABEL_ACCOUNT "Account"
#define LABEL_SUBACCOUNT "SubAccount"
#define LABEL_GL "GL"
#define LABEL_SEARCH "Search"
#define LABEL_ACCOUNT "Account"
#define LABEL_SUBACCOUNT "SubAccount"
#define LABEL_GL "GL"
#define LABEL_SEARCH "Search"
/** Save enough information about this register page that it can be
@ -2219,10 +2219,10 @@ gnc_plugin_page_register_filter_dmy2time (char *date_string)
struct tm when;
PINFO("Date string is %s", date_string);
memset (&when, 0, sizeof (when));
memset (&when, 0, sizeof (when));
sscanf (date_string, "%d-%d-%d", &when.tm_mday,
&when.tm_mon, &when.tm_year);
&when.tm_mon, &when.tm_year);
when.tm_mon -= 1;
when.tm_year -= 1900;
@ -4162,7 +4162,7 @@ gnc_plugin_page_register_event_handler (QofInstance *entity,
GtkWidget *window;
gchar *label, *color;
g_return_if_fail(page); /* Required */
g_return_if_fail(page); /* Required */
if (!GNC_IS_TRANS(entity) && !GNC_IS_ACCOUNT(entity))
return;

View File

@ -200,10 +200,10 @@ gnc_plugin_page_sx_list_new (void)
GncPluginPageSxList *plugin_page;
const GList *object = gnc_gobject_tracking_get_list (GNC_PLUGIN_PAGE_SX_LIST_NAME);
if (object && GNC_IS_PLUGIN_PAGE_SX_LIST (object->data))
plugin_page = GNC_PLUGIN_PAGE_SX_LIST (object->data);
plugin_page = GNC_PLUGIN_PAGE_SX_LIST (object->data);
else
{
plugin_page = g_object_new (GNC_TYPE_PLUGIN_PAGE_SX_LIST, NULL);
plugin_page = g_object_new (GNC_TYPE_PLUGIN_PAGE_SX_LIST, NULL);
}
return GNC_PLUGIN_PAGE(plugin_page);
}

View File

@ -181,13 +181,13 @@ gnc_split_reg_get_type( void )
GTypeInfo type_info =
{
sizeof(GNCSplitRegClass), /* class_size */
NULL, /* base_init */
NULL, /* base_finalize */
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc)gnc_split_reg_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSplitReg), /* */
0, /* n_preallocs */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof(GNCSplitReg), /* */
0, /* n_preallocs */
(GInstanceInitFunc)gnc_split_reg_init,
};
@ -928,7 +928,7 @@ gsr_default_associate_handler_file (GNCSplitReg *gsr, Transaction *trans, gboole
const gchar *uri = xaccTransGetAssociation (trans);
if (valid_path_head && g_str_has_prefix (uri,"file:/") && !g_str_has_prefix (uri,"file://"))
if (valid_path_head && g_str_has_prefix (uri,"file:/") && !g_str_has_prefix (uri,"file://"))
{
const gchar *part = uri + strlen ("file:");
new_uri = g_strconcat (path_head, part, NULL);
@ -952,7 +952,7 @@ gsr_default_associate_handler_file (GNCSplitReg *gsr, Transaction *trans, gboole
if (response == GTK_RESPONSE_ACCEPT)
{
gchar *dialog_uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
gchar *dialog_uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
PINFO("Dialog File URI: %s\n", dialog_uri);
@ -1337,37 +1337,35 @@ gnc_split_reg_duplicate_trans_cb(GtkWidget *w, gpointer data)
void
gsr_default_schedule_handler( GNCSplitReg *gsr, gpointer data )
{
GncGUID *fromSXId = NULL;
SchedXaction *theSX = NULL;
GList *sxElts;
SplitRegister *reg = gnc_ledger_display_get_split_register( gsr->ledger );
Transaction *pending_trans = gnc_split_register_get_current_trans (reg);
/* If the transaction has a sched-xact KVP frame, then go to the editor
* for the existing SX; otherwise, do the sx-from-trans dialog. */
qof_instance_get (QOF_INSTANCE (pending_trans),
"from-sched-xaction", &fromSXId,
NULL);
/* Get the correct SX */
for ( sxElts = gnc_book_get_schedxactions (gnc_get_current_book())->sx_list;
(!theSX) && sxElts;
sxElts = sxElts->next )
{
GncGUID *fromSXId = NULL;
SchedXaction *theSX = NULL;
GList *sxElts;
qof_instance_get (QOF_INSTANCE (pending_trans),
"from-sched-xaction", &fromSXId,
NULL);
/* Get the correct SX */
for ( sxElts = gnc_book_get_schedxactions (gnc_get_current_book())->sx_list;
(!theSX) && sxElts;
sxElts = sxElts->next )
{
SchedXaction *sx = (SchedXaction*)sxElts->data;
theSX =
((guid_equal (xaccSchedXactionGetGUID (sx), fromSXId))
? sx : NULL);
}
if ( theSX )
{
gnc_ui_scheduled_xaction_editor_dialog_create(theSX, FALSE);
return;
}
SchedXaction *sx = (SchedXaction*)sxElts->data;
theSX =
((guid_equal (xaccSchedXactionGetGUID (sx), fromSXId))
? sx : NULL);
}
if ( theSX )
{
gnc_ui_scheduled_xaction_editor_dialog_create(theSX, FALSE);
return;
}
gnc_sx_create_from_trans(pending_trans);
}