Skip to content

Commit

Permalink
[dialog-sx-from-trans.cpp] convert to c++
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed May 31, 2024
1 parent 109497d commit b0d1de6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gnucash/gnome/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ set (gnc_gnome_SOURCES
dialog-report-column-view.cpp
dialog-report-style-sheet.cpp
dialog-sx-editor.c
dialog-sx-from-trans.c
dialog-sx-from-trans.cpp
dialog-sx-since-last-run.c
dialog-tax-info.c
dialog-vendor.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ typedef struct
static void sxftd_update_example_cal( SXFromTransInfo *sxfti );
static void sxftd_update_excal_adapt( GObject *o, gpointer ud );

typedef struct
struct widgetSignalHandlerTuple
{
gchar *name;
gchar *signal;
void (*handlerFn)();
} widgetSignalHandlerTuple;
const gchar *name;
const gchar *signal;
void (*handlerFn)(GObject*,gpointer);
};

static void sxftd_ok_clicked(SXFromTransInfo *sxfti);
static void sxftd_advanced_clicked(SXFromTransInfo *sxfti);
Expand Down Expand Up @@ -211,7 +211,6 @@ sxftd_add_template_trans(SXFromTransInfo *sxfti)
GList *splits, *template_splits = NULL;
TTInfo *tti = gnc_ttinfo_malloc();
TTSplitInfo *ttsi;
Split *sp;
gnc_numeric runningBalance;
gnc_numeric split_value;
const char *tmpStr;
Expand All @@ -225,7 +224,7 @@ sxftd_add_template_trans(SXFromTransInfo *sxfti)

for (splits = xaccTransGetSplitList(tr); splits; splits = splits->next)
{
sp = splits->data;
auto sp = GNC_SPLIT(splits->data);
ttsi = gnc_ttsplitinfo_malloc();
gnc_ttsplitinfo_set_action(ttsi, gnc_get_num_action(NULL, sp));
split_value = xaccSplitGetValue(sp);
Expand Down
8 changes: 8 additions & 0 deletions gnucash/gnome/dialog-sx-from-trans.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@

#include "Transaction.h"

#ifdef __cplusplus
extern "C" {
#endif

void gnc_sx_create_from_trans(GtkWindow *parent, Transaction *trans);

#ifdef __cplusplus
}
#endif

#endif
2 changes: 1 addition & 1 deletion po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ gnucash/gnome/dialog-progress.c
gnucash/gnome/dialog-report-column-view.cpp
gnucash/gnome/dialog-report-style-sheet.cpp
gnucash/gnome/dialog-sx-editor.c
gnucash/gnome/dialog-sx-from-trans.c
gnucash/gnome/dialog-sx-from-trans.cpp
gnucash/gnome/dialog-sx-since-last-run.c
gnucash/gnome/dialog-tax-info.c
gnucash/gnome/dialog-vendor.c
Expand Down

0 comments on commit b0d1de6

Please sign in to comment.