GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-plugin-customer_import.c
1 /*
2  * gnc-plugin-customer_import.c --
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of
7  * the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, contact:
16  *
17  * Free Software Foundation Voice: +1-617-542-5942
18  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
19  * Boston, MA 02110-1301, USA [email protected]
20  */
21 
29 #include "config.h"
30 
31 //#include <glade/glade.h>
32 //#include <glade/glade-xml.h>
33 #include <glib/gi18n.h>
34 
35 #include "dialog-utils.h"
36 
39 
40 /* This static indicates the debugging module that this .o belongs to. */
41 static QofLogModule log_module = G_LOG_DOMAIN;
42 
43 static void gnc_plugin_customer_import_class_init (GncPlugincustomer_importClass *klass);
44 static void gnc_plugin_customer_import_init (GncPlugincustomer_import *plugin);
45 static void gnc_plugin_customer_import_finalize (GObject *object);
46 
47 /* Command callbacks */
48 static void gnc_plugin_customer_import_cmd_test (GtkAction *action, GncMainWindowActionData *data);
49 
50 #define PLUGIN_ACTIONS_NAME "gnc-plugin-customer_import-actions"
51 #define PLUGIN_UI_FILENAME "gnc-plugin-customer_import-ui.xml"
52 
53 static GtkActionEntry gnc_plugin_actions [] =
54 {
55  /* Menu Items */
56  { "ImportMenuAction", NULL, N_("I_mport"), NULL, NULL, NULL },
57  { "customer_importAction", NULL, N_("Import Customers and Vendors"), NULL, N_("customer_import tooltip"), G_CALLBACK(gnc_plugin_customer_import_cmd_test) },
58 };
59 static guint gnc_plugin_n_actions = G_N_ELEMENTS(gnc_plugin_actions);
60 
61 
62 /************************************************************
63  * Object Implementation *
64  ************************************************************/
65 
66 G_DEFINE_TYPE(GncPlugincustomer_import, gnc_plugin_customer_import, GNC_TYPE_PLUGIN);
67 
68 GncPlugin *
70 {
71  return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_customer_import, (gchar*) NULL));
72 }
73 
74 static void
75 gnc_plugin_customer_import_class_init (GncPlugincustomer_importClass *klass)
76 {
77  GObjectClass *object_class = G_OBJECT_CLASS (klass);
78  GncPluginClass *plugin_class = GNC_PLUGIN_CLASS(klass);
79 
80  object_class->finalize = gnc_plugin_customer_import_finalize;
81 
82  /* plugin info */
83  plugin_class->plugin_name = GNC_PLUGIN_customer_import_NAME;
84 
85  /* widget addition/removal */
86  plugin_class->actions_name = PLUGIN_ACTIONS_NAME;
87  plugin_class->actions = gnc_plugin_actions;
88  plugin_class->n_actions = gnc_plugin_n_actions;
89  plugin_class->ui_filename = PLUGIN_UI_FILENAME;
90 }
91 
92 static void
93 gnc_plugin_customer_import_init (GncPlugincustomer_import *plugin)
94 {
95 }
96 
97 static void
98 gnc_plugin_customer_import_finalize (GObject *object)
99 {
100 }
101 
102 /************************************************************
103  * Command Callbacks *
104  ************************************************************/
105 
106 static void
107 gnc_plugin_customer_import_cmd_test (GtkAction *action, GncMainWindowActionData *data)
108 {
109  ENTER ("action %p, main window data %p", action, data);
110  g_message ("customer_import");
111 
113 
114  LEAVE (" ");
115 }
GncPlugin * gnc_plugin_customer_import_new(void)
Plugin registration of the customer_import module.
#define G_LOG_DOMAIN
Functions providing the SX List as a plugin page.
#define ENTER(format, args...)
Definition: qoflog.h:261
const gchar * ui_filename
Definition: gnc-plugin.h:137
GtkActionEntry * actions
Definition: gnc-plugin.h:122
GUI handling for customer import plugin.
const gchar * actions_name
Definition: gnc-plugin.h:119
CustomerImportGui * gnc_plugin_customer_import_showGUI(void)
const gchar * plugin_name
Definition: gnc-plugin.h:112
#define PLUGIN_ACTIONS_NAME
#define LEAVE(format, args...)
Definition: qoflog.h:271
#define PLUGIN_UI_FILENAME
const gchar * QofLogModule
Definition: qofid.h:89