Skip to content

Commit

Permalink
Refactor: hide implementation of GncPlugin* (move from .h -> .c)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardcohen committed Jun 14, 2023
1 parent 2e59bda commit 1255d61
Show file tree
Hide file tree
Showing 34 changed files with 90 additions and 110 deletions.
6 changes: 6 additions & 0 deletions gnucash/gnome-utils/gnc-plugin-file-history.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};

/** The instance data structure for a file history plugin. */
struct _GncPluginFileHistory
{
GncPlugin gnc_plugin;
};

/** The instance private data for a file history plugin. This data
* structure is unused. */
typedef struct GncPluginFileHistoryPrivate
Expand Down
8 changes: 0 additions & 8 deletions gnucash/gnome-utils/gnc-plugin-file-history.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@ G_DECLARE_FINAL_TYPE (GncPluginFileHistory, gnc_plugin_file_history, GNC, PLUGIN

#define GNC_PLUGIN_FILE_HISTORY_NAME "gnc-plugin-file-history"

/* typedefs & structures */

/** The instance data structure for a file history plugin. */
struct _GncPluginFileHistory
{
GncPlugin gnc_plugin;
};


/* function prototypes */

Expand Down
5 changes: 5 additions & 0 deletions gnucash/gnome-utils/gnc-plugin-menu-additions.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ static QofLogModule log_module = GNC_MOD_GUI;

#define PLUGIN_ACTIONS_NAME "gnc-plugin-menu-additions-actions"

struct _GncPluginMenuAdditions
{
GncPlugin gnc_plugin;
};

/** Private data for this plugin. This data structure is unused. */
typedef struct GncPluginMenuAdditionsPrivate
{
Expand Down
6 changes: 0 additions & 6 deletions gnucash/gnome-utils/gnc-plugin-menu-additions.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ G_DECLARE_FINAL_TYPE (GncPluginMenuAdditions, gnc_plugin_menu_additions, GNC, PL

#define GNC_PLUGIN_MENU_ADDITIONS_NAME "gnc-plugin-menu-additions"

/* typedefs & structures */
struct _GncPluginMenuAdditions
{
GncPlugin gnc_plugin;
};

/* function prototypes */

/** Create a new menu_additions plugin. This plugin attaches the menu
Expand Down
7 changes: 7 additions & 0 deletions gnucash/gnome/gnc-plugin-account-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};

/** The instance data structure for an account tree menu plugin. */
struct _GncPluginAccountTree
{
/** The parent object for this widget */
GncPlugin gnc_plugin;
};

/** The instance private data structure for an account tree plugin. */
typedef struct GncPluginAccountTreePrivate
{
Expand Down
9 changes: 0 additions & 9 deletions gnucash/gnome/gnc-plugin-account-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ G_DECLARE_FINAL_TYPE (GncPluginAccountTree, gnc_plugin_account_tree, GNC, PLUGIN

#define GNC_PLUGIN_ACCOUNT_TREE_NAME "gnc-plugin-account-tree"

/* typedefs & structures */

/** The instance data structure for an account tree menu plugin. */
struct _GncPluginAccountTree
{
/** The parent object for this widget */
GncPlugin gnc_plugin;
};

/** Create a new account tree menu plugin.
*
* @return A pointer to the new object.
Expand Down
7 changes: 7 additions & 0 deletions gnucash/gnome/gnc-plugin-basic-commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@ static const gchar *dirty_only_active_actions[] =
NULL
};

/** The instance data structure for an basic commands menu plugin. */
struct _GncPluginBasicCommands
{
/** The parent object for this widget */
GncPlugin gnc_plugin;
};

/** The instance private data structure for an basic commands
* plugin. */
typedef struct GncPluginBasicCommandsPrivate
Expand Down
9 changes: 0 additions & 9 deletions gnucash/gnome/gnc-plugin-basic-commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ G_DECLARE_FINAL_TYPE (GncPluginBasicCommands, gnc_plugin_basic_commands, GNC, PL

#define GNC_PLUGIN_BASIC_COMMANDS_NAME "gnc-plugin-basic-commands"

/* typedefs & structures */

/** The instance data structure for an basic commands menu plugin. */
struct _GncPluginBasicCommands
{
/** The parent object for this widget */
GncPlugin gnc_plugin;
};

/** Create a new basic commands menu plugin.
*
* @return A pointer to the new object.
Expand Down
5 changes: 5 additions & 0 deletions gnucash/gnome/gnc-plugin-budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ static const gchar *plugin_writeable_actions[] =
NULL
};

struct _GncPluginBudget
{
GncPlugin gnc_plugin;
};

typedef struct GncPluginBudgetPrivate
{
gpointer dummy;
Expand Down
6 changes: 0 additions & 6 deletions gnucash/gnome/gnc-plugin-budget.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ G_DECLARE_FINAL_TYPE (GncPluginBudget, gnc_plugin_budget, GNC, PLUGIN_BUDGET, Gn

#define GNC_PLUGIN_BUDGET_NAME "gnc-plugin-budget"

/* typedefs & structures */
struct _GncPluginBudget
{
GncPlugin gnc_plugin;
};

/* function prototypes */
GncPlugin *gnc_plugin_budget_new (void);

Expand Down
5 changes: 5 additions & 0 deletions gnucash/gnome/gnc-plugin-business.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
* Plugin Function Implementation *
************************************************************/

struct _GncPluginBusiness
{
GncPlugin gnc_plugin;
};

typedef struct GncPluginBusinessPrivate
{
GncOwner *last_customer;
Expand Down
6 changes: 0 additions & 6 deletions gnucash/gnome/gnc-plugin-business.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ G_DECLARE_FINAL_TYPE (GncPluginBusiness, gnc_plugin_business, GNC, PLUGIN_BUSINE

#define GNC_PLUGIN_BUSINESS_NAME "gnc-plugin-business"

/* typedefs & structures */
struct _GncPluginBusiness
{
GncPlugin gnc_plugin;
};

/* function prototypes */

GncPlugin *gnc_plugin_business_new (void);
Expand Down
5 changes: 5 additions & 0 deletions gnucash/gnome/gnc-plugin-register.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};

struct _GncPluginRegister
{
GncPlugin gnc_plugin;
};

typedef struct GncPluginRegisterPrivate
{
gpointer dummy;
Expand Down
6 changes: 0 additions & 6 deletions gnucash/gnome/gnc-plugin-register.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ G_DECLARE_FINAL_TYPE (GncPluginRegister, gnc_plugin_register, GNC, PLUGIN_REGIST

#define GNC_PLUGIN_REGISTER_NAME "gnc-plugin-register"

/* typedefs & structures */
struct _GncPluginRegister
{
GncPlugin gnc_plugin;
};

/* function prototypes */
GncPlugin *gnc_plugin_register_new (void);

Expand Down
5 changes: 5 additions & 0 deletions gnucash/gnome/gnc-plugin-report-system.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};

struct _GncPluginReportSystem
{
GncPlugin gnc_plugin;
};

typedef struct GncPluginReportSystemPrivate
{
gpointer dummy;
Expand Down
6 changes: 0 additions & 6 deletions gnucash/gnome/gnc-plugin-report-system.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ G_DECLARE_FINAL_TYPE (GncPluginReportSystem, gnc_plugin_report_system, GNC, PLUG

#define GNC_PLUGIN_REPORT_SYSTEM_NAME "gnc-plugin-report-system"

/* typedefs & structures */
struct _GncPluginReportSystem
{
GncPlugin gnc_plugin;
};

/* function prototypes */
void gnc_plugin_report_system_new (void);

Expand Down
5 changes: 5 additions & 0 deletions gnucash/import-export/aqb/gnc-plugin-aqbanking.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ static GncMainWindow *gnc_main_window = NULL;
* Object Implementation *
************************************************************/

struct _GncPluginAqBanking
{
GncPlugin gnc_plugin;
};

G_DEFINE_TYPE(GncPluginAqBanking, gnc_plugin_aqbanking, GNC_TYPE_PLUGIN)

GncPlugin *
Expand Down
6 changes: 0 additions & 6 deletions gnucash/import-export/aqb/gnc-plugin-aqbanking.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ G_DECLARE_FINAL_TYPE (GncPluginAqBanking, gnc_plugin_aqbanking, GNC, PLUGIN_AQBA

#define GNC_PLUGIN_AQBANKING_NAME "gnc-plugin-aqbanking"

/* typedefs & structures */
struct _GncPluginAqBanking
{
GncPlugin gnc_plugin;
};

/* function prototypes */

/**
Expand Down
5 changes: 5 additions & 0 deletions gnucash/import-export/bi-import/gnc-plugin-bi-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
* Object Implementation *
************************************************************/

struct _GncPluginBiImport
{
GncPlugin gnc_plugin;
};

G_DEFINE_TYPE(GncPluginBiImport, gnc_plugin_bi_import, GNC_TYPE_PLUGIN)

GncPlugin *
Expand Down
6 changes: 0 additions & 6 deletions gnucash/import-export/bi-import/gnc-plugin-bi-import.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ G_DECLARE_FINAL_TYPE (GncPluginBiImport, gnc_plugin_bi_import, GNC, PLUGIN_BI_IM

#define GNC_PLUGIN_BI_IMPORT_NAME "gnc-plugin-bi-import"

/* typedefs & structures */
struct _GncPluginBiImport
{
GncPlugin gnc_plugin;
};

/* function prototypes */

/**
Expand Down
5 changes: 5 additions & 0 deletions gnucash/import-export/csv-exp/gnc-plugin-csv-export.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};

struct _GncPluginCsvExport
{
GncPlugin gnc_plugin;
};

typedef struct GncPluginCsvExportPrivate
{
gpointer dummy;
Expand Down
6 changes: 0 additions & 6 deletions gnucash/import-export/csv-exp/gnc-plugin-csv-export.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ G_DECLARE_FINAL_TYPE (GncPluginCsvExport, gnc_plugin_csv_export, GNC, PLUGIN_CSV

#define GNC_PLUGIN_CSV_EXPORT_NAME "gnc-plugin-csv-export"

/* typedefs & structures */
struct _GncPluginCsvExport
{
GncPlugin gnc_plugin;
};

/* function prototypes */
GncPlugin *gnc_plugin_csv_export_new (void);

Expand Down
5 changes: 5 additions & 0 deletions gnucash/import-export/csv-imp/gnc-plugin-csv-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};

struct _GncPluginCsvImport
{
GncPlugin gnc_plugin;
};

typedef struct GncPluginCsvImportPrivate
{
gpointer dummy;
Expand Down
6 changes: 0 additions & 6 deletions gnucash/import-export/csv-imp/gnc-plugin-csv-import.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ G_DECLARE_FINAL_TYPE (GncPluginCsvImport, gnc_plugin_csv_import, GNC, PLUGIN_CSV

#define GNC_PLUGIN_CSV_IMPORT_NAME "gnc-plugin-csv-import"

/* typedefs & structures */
struct _GncPluginCsvImport
{
GncPlugin gnc_plugin;
};

/* function prototypes */
GncPlugin *gnc_plugin_csv_import_new (void);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
* Object Implementation *
************************************************************/

struct _GncPluginCustomerImport
{
GncPlugin gnc_plugin;
};

G_DEFINE_TYPE(GncPluginCustomerImport, gnc_plugin_customer_import, GNC_TYPE_PLUGIN)

GncPlugin *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ G_DECLARE_FINAL_TYPE (GncPluginCustomerImport, gnc_plugin_customer_import, GNC,

#define GNC_PLUGIN_CUSTOMER_IMPORT_NAME "gnc-plugin-customer-import"

/* typedefs & structures */
struct _GncPluginCustomerImport
{
GncPlugin gnc_plugin;
};

/* function prototypes */

/**
Expand Down
5 changes: 5 additions & 0 deletions gnucash/import-export/log-replay/gnc-plugin-log-replay.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};

struct _GncPluginLogReplay
{
GncPlugin gnc_plugin;
};

typedef struct GncPluginLogReplayPrivate
{
gpointer dummy;
Expand Down
6 changes: 0 additions & 6 deletions gnucash/import-export/log-replay/gnc-plugin-log-replay.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ G_DECLARE_FINAL_TYPE (GncPluginLogReplay, gnc_plugin_log_replay, GNC, PLUGIN_LOG

#define GNC_PLUGIN_LOG_REPLAY_NAME "gnc-plugin-log-replay"

/* typedefs & structures */
struct _GncPluginLogReplay
{
GncPlugin gnc_plugin;
};

/* function prototypes */
GncPlugin *gnc_plugin_log_replay_new (void);

Expand Down
5 changes: 5 additions & 0 deletions gnucash/import-export/ofx/gnc-plugin-ofx.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};

struct _GncPluginOfx
{
GncPlugin gnc_plugin;
};

typedef struct GncPluginOfxPrivate
{
gpointer dummy;
Expand Down
6 changes: 0 additions & 6 deletions gnucash/import-export/ofx/gnc-plugin-ofx.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ G_DECLARE_FINAL_TYPE (GncPluginOfx, gnc_plugin_ofx, GNC, PLUGIN_OFX, GncPlugin)

#define GNC_PLUGIN_OFX_NAME "gnc-plugin-ofx"

/* typedefs & structures */
struct _GncPluginOfx
{
GncPlugin gnc_plugin;
};

/* function prototypes */
GncPlugin *gnc_plugin_ofx_new (void);

Expand Down
5 changes: 5 additions & 0 deletions gnucash/import-export/qif-imp/gnc-plugin-qif-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};

struct _GncPluginQifImport
{
GncPlugin gnc_plugin;
};

typedef struct GncPluginQifImportPrivate
{
gpointer dummy;
Expand Down

0 comments on commit 1255d61

Please sign in to comment.