mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Register rewrite Update, revised removal update for next release. This update adds a configure option --enable-register2 which will enable the register2 changes at compile time, there are also some changes to use the Gnucash --extra parameter that displays some of the new register2 functionality for testing. Author: Robert Fewell
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23330 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
4455afbf04
commit
5490605de2
10
configure.ac
10
configure.ac
@ -651,6 +651,16 @@ AC_ARG_ENABLE( profile,
|
||||
CFLAGS="${CFLAGS} -pg"
|
||||
LDFLAGS="${LDFLAGS} -pg")
|
||||
|
||||
### --------------------------------------------------------------------------
|
||||
### Register2
|
||||
AC_ARG_ENABLE( register2,
|
||||
[AS_HELP_STRING([--enable-register2],[compile with register2 enabled])],
|
||||
if test x$enableval = xyes; then
|
||||
AC_DEFINE(REGISTER2_ENABLED,1,We are using Register2)
|
||||
else
|
||||
AC_DEFINE(REGISTER2_ENABLED,0,We are not using Register2)
|
||||
fi)
|
||||
|
||||
### --------------------------------------------------------------------------
|
||||
### OFX
|
||||
want_ofx=auto
|
||||
|
@ -325,6 +325,7 @@ src/gnome-utils/gtkbuilder/dialog-file-access.glade
|
||||
src/gnome-utils/gtkbuilder/dialog-object-references.glade
|
||||
src/gnome-utils/gtkbuilder/dialog-options.glade
|
||||
src/gnome-utils/gtkbuilder/dialog-preferences.glade
|
||||
src/gnome-utils/gtkbuilder/dialog-preferences2.glade
|
||||
src/gnome-utils/gtkbuilder/dialog-query-view.glade
|
||||
src/gnome-utils/gtkbuilder/dialog-reset-warnings.glade
|
||||
src/gnome-utils/gtkbuilder/dialog-tax-table.glade
|
||||
|
@ -70,7 +70,7 @@ static QofLogModule log_module = GNC_MOD_GUI;
|
||||
static int is_development_version = TRUE;
|
||||
#else
|
||||
static int is_development_version = FALSE;
|
||||
#define GNUCASH_SCM 0
|
||||
#define GNUCASH_SCM ""
|
||||
#endif
|
||||
|
||||
/* Command-line option variables */
|
||||
|
@ -1071,17 +1071,31 @@ gnc_preferences_dialog_create(void)
|
||||
DEBUG("Opening dialog-preferences.glade:");
|
||||
builder = gtk_builder_new();
|
||||
|
||||
#ifdef REGISTER2_ENABLED
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "auto_decimal_places_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "autosave_interval_minutes_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "save_on_close_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "date_backmonth_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "max_transactions_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "key_length_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "new_search_limit_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "retain_days_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "tab_width_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "date_formats");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences2.glade", "GnuCash Preferences");
|
||||
#else
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "auto_decimal_places_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "autosave_interval_minutes_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "save_on_close_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "date_backmonth_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "max_transactions_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "key_length_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "new_search_limit_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "retain_days_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "tab_width_adj");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "date_formats");
|
||||
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "GnuCash Preferences");
|
||||
#endif
|
||||
|
||||
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "GnuCash Preferences"));
|
||||
|
||||
label = GTK_WIDGET(gtk_builder_get_object (builder, "sample_account"));
|
||||
|
@ -8,6 +8,7 @@ gtkbuilder_DATA = \
|
||||
dialog-object-references.glade \
|
||||
dialog-options.glade \
|
||||
dialog-preferences.glade \
|
||||
dialog-preferences2.glade \
|
||||
dialog-query-view.glade \
|
||||
dialog-reset-warnings.glade \
|
||||
dialog-tax-table.glade \
|
||||
|
@ -1311,6 +1311,57 @@ many months before the current month:</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label50">
|
||||
<property name="visible">True</property>
|
||||
@ -1782,15 +1833,6 @@ many months before the current month:</property>
|
||||
<property name="x_padding">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label84">
|
||||
<property name="visible">True</property>
|
||||
@ -1858,48 +1900,6 @@ many months before the current month:</property>
|
||||
<property name="x_padding">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="pref/general/save-on-close-expires">
|
||||
<property name="label" translatable="yes">Enable timeout on "Save changes on closing" question</property>
|
||||
@ -1919,6 +1919,12 @@ many months before the current month:</property>
|
||||
<property name="x_padding">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label15">
|
||||
<property name="visible">True</property>
|
||||
@ -1987,12 +1993,6 @@ many months before the current month:</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label19">
|
||||
<property name="visible">True</property>
|
||||
@ -2563,7 +2563,7 @@ many months before the current month:</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="n_rows">15</property>
|
||||
<property name="n_rows">10</property>
|
||||
<property name="n_columns">4</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
@ -2589,12 +2589,6 @@ many months before the current month:</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label63">
|
||||
<property name="visible">True</property>
|
||||
@ -2810,131 +2804,6 @@ many months before the current month:</property>
|
||||
<property name="x_padding">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label14">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Number of _characters for auto complete:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">pref/general.register/key-length</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">10</property>
|
||||
<property name="bottom_attach">11</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"/>
|
||||
<property name="x_padding">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="pref/general.register/key-length">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip_markup">This sets the number of characters before auto complete starts for description, notes and memo fields.</property>
|
||||
<property name="tooltip_text" translatable="yes">This sets the number of characters before auto complete starts for description, notes and memo fields.</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="adjustment">key_length_adj</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="snap_to_ticks">True</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="update_policy">if-valid</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">10</property>
|
||||
<property name="bottom_attach">11</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"/>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="pref/general.register/show-extra-dates">
|
||||
<property name="label" translatable="yes">Show the _entered and reconcile dates</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_markup">Show the date when the transaction was entered below the posted date and reconciled date on split row.</property>
|
||||
<property name="tooltip_text" translatable="yes">Show the date when the transaction was entered below the posted date and reconciled date on split row.</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">11</property>
|
||||
<property name="bottom_attach">12</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"/>
|
||||
<property name="x_padding">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="pref/general.register/show-calendar-buttons">
|
||||
<property name="label" translatable="yes">Show the calendar b_uttons</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_markup">Show the calendar buttons Cancel, Today and Select.</property>
|
||||
<property name="tooltip_text" translatable="yes">Show the calendar buttons Cancel, Today and Select.</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">13</property>
|
||||
<property name="bottom_attach">14</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"/>
|
||||
<property name="x_padding">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="pref/general.register/selection-to-blank-on-expand">
|
||||
<property name="label" translatable="yes">_Move the selection to the blank split on expand</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_markup">This will move the selection to the blank split when the transaction is expanded.</property>
|
||||
<property name="tooltip_text" translatable="yes">This will move the selection to the blank split when the transaction is expanded.</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">14</property>
|
||||
<property name="bottom_attach">15</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"/>
|
||||
<property name="x_padding">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="pref/general.register/show-extra-dates-on-selection">
|
||||
<property name="label" translatable="yes">_Show entered and reconciled dates on selection</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_markup">Show the entered date and reconciled date on transaction selection.</property>
|
||||
<property name="tooltip_text" translatable="yes">Show the entered date and reconciled date on transaction selection.</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">12</property>
|
||||
<property name="bottom_attach">13</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"/>
|
||||
<property name="x_padding">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
3684
src/gnome-utils/gtkbuilder/dialog-preferences2.glade
Normal file
3684
src/gnome-utils/gtkbuilder/dialog-preferences2.glade
Normal file
File diff suppressed because it is too large
Load Diff
@ -45,6 +45,8 @@
|
||||
#include "gnc-ui-util.h"
|
||||
#include "Query.h"
|
||||
#include "qof.h"
|
||||
#include "gnc-ledger-display.h"
|
||||
#include "gnc-plugin-page-register.h"
|
||||
/*################## Added for Reg2 #################*/
|
||||
#include "gnc-ledger-display2.h"
|
||||
#include "gnc-plugin-page-register2.h"
|
||||
@ -1008,7 +1010,11 @@ gnc_ui_sx_since_last_run_dialog(GncSxInstanceModel *sx_instances, GList *auto_cr
|
||||
static void
|
||||
_show_created_transactions(GncSxSinceLastRunDialog *app_dialog, GList *created_txn_guids)
|
||||
{
|
||||
#ifdef REGISTER2_ENABLED
|
||||
GNCLedgerDisplay2 *ledger;
|
||||
#else
|
||||
GNCLedgerDisplay *ledger;
|
||||
#endif
|
||||
GncPluginPage *page;
|
||||
Query *book_query, *guid_query, *query;
|
||||
GList *guid_iter;
|
||||
@ -1021,12 +1027,19 @@ _show_created_transactions(GncSxSinceLastRunDialog *app_dialog, GList *created_t
|
||||
xaccQueryAddGUIDMatch(guid_query, (GncGUID*)guid_iter->data, GNC_ID_TRANS, QOF_QUERY_OR);
|
||||
}
|
||||
query = qof_query_merge(book_query, guid_query, QOF_QUERY_AND);
|
||||
#ifdef REGISTER2_ENABLED
|
||||
/*################## Added for Reg2 #################*/
|
||||
// inspired by dialog-find-transactions:do_find_cb:
|
||||
ledger = gnc_ledger_display2_query(query, SEARCH_LEDGER2, REG2_STYLE_JOURNAL);
|
||||
gnc_ledger_display2_refresh(ledger);
|
||||
page = gnc_plugin_page_register2_new_ledger(ledger);
|
||||
/*################## Added for Reg2 #################*/
|
||||
#else
|
||||
// inspired by dialog-find-transactions:do_find_cb:
|
||||
ledger = gnc_ledger_display_query(query, SEARCH_LEDGER, REG_STYLE_JOURNAL);
|
||||
gnc_ledger_display_refresh(ledger);
|
||||
page = gnc_plugin_page_register_new_ledger(ledger);
|
||||
#endif
|
||||
g_object_set(G_OBJECT(page), "page-name", _("Created Transactions"), NULL);
|
||||
gnc_main_window_open_page(NULL, page);
|
||||
|
||||
|
@ -624,10 +624,14 @@ gnc_main_window_cmd_tools_close_book (GtkAction *action, GncMainWindowActionData
|
||||
static void
|
||||
gnc_main_window_cmd_tools_find_transactions (GtkAction *action, GncMainWindowActionData *data)
|
||||
{
|
||||
// gnc_ui_find_transactions_dialog_create (NULL);
|
||||
|
||||
#ifdef REGISTER2_ENABLED
|
||||
/*################## Added for Reg2 #################*/
|
||||
gnc_ui_find_transactions_dialog_create2 (NULL);
|
||||
/*################## Added for Reg2 #################*/
|
||||
#else
|
||||
gnc_ui_find_transactions_dialog_create (NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -169,6 +169,7 @@ static GtkActionEntry gnc_plugin_page_account_tree_actions [] =
|
||||
N_("Extend the current book by merging with new account type categories"),
|
||||
G_CALLBACK (gnc_plugin_page_account_tree_cmd_file_new_hierarchy)
|
||||
},
|
||||
#ifdef REGISTER2_ENABLED
|
||||
{
|
||||
"FileOpenAccount2Action", GNC_STOCK_OPEN_ACCOUNT, N_("Open _Account"), NULL,
|
||||
N_("Open the selected account"),
|
||||
@ -179,6 +180,15 @@ static GtkActionEntry gnc_plugin_page_account_tree_actions [] =
|
||||
N_("Open the old style register selected account"),
|
||||
G_CALLBACK (gnc_plugin_page_account_tree_cmd_open_account)
|
||||
},
|
||||
#else
|
||||
{
|
||||
"FileOpenAccountAction", GNC_STOCK_OPEN_ACCOUNT, N_("Open _Account"), NULL,
|
||||
N_("Open the selected account"),
|
||||
G_CALLBACK (gnc_plugin_page_account_tree_cmd_open_account)
|
||||
},
|
||||
#endif
|
||||
|
||||
#ifdef REGISTER2_ENABLED
|
||||
{
|
||||
"FileOpenSubaccounts2Action", GNC_STOCK_OPEN_ACCOUNT, N_("Open _SubAccounts"), NULL,
|
||||
N_("Open the selected account and all its subaccounts"),
|
||||
@ -189,6 +199,13 @@ static GtkActionEntry gnc_plugin_page_account_tree_actions [] =
|
||||
N_("Open the old style register selected account and all its subaccounts"),
|
||||
G_CALLBACK (gnc_plugin_page_account_tree_cmd_open_subaccounts)
|
||||
},
|
||||
#else
|
||||
{
|
||||
"FileOpenSubaccountsAction", GNC_STOCK_OPEN_ACCOUNT, N_("Open _SubAccounts"), NULL,
|
||||
N_("Open the selected account and all its subaccounts"),
|
||||
G_CALLBACK (gnc_plugin_page_account_tree_cmd_open_subaccounts)
|
||||
},
|
||||
#endif
|
||||
|
||||
/* Edit menu */
|
||||
{
|
||||
@ -255,6 +272,18 @@ static GtkActionEntry gnc_plugin_page_account_tree_actions [] =
|
||||
N_("Check for and repair unbalanced transactions and orphan splits " "in all accounts"),
|
||||
G_CALLBACK (gnc_plugin_page_account_tree_cmd_scrub_all)
|
||||
},
|
||||
/* Extensions Menu */
|
||||
{ "Register2TestAction", NULL, N_("_Register2"), NULL, NULL, NULL },
|
||||
{
|
||||
"Register2TestAccountAction", GNC_STOCK_OPEN_ACCOUNT, N_("Open _Account"), NULL,
|
||||
N_("Open the selected account"),
|
||||
G_CALLBACK (gnc_plugin_page_account_tree_cmd_open2_account)
|
||||
},
|
||||
{
|
||||
"Register2TestSubAccountAction", GNC_STOCK_OPEN_ACCOUNT, N_("Open _SubAccounts"), NULL,
|
||||
N_("Open the selected account and all its subaccounts"),
|
||||
G_CALLBACK (gnc_plugin_page_account_tree_cmd_open2_subaccounts)
|
||||
},
|
||||
};
|
||||
/** The number of actions provided by this plugin. */
|
||||
static guint gnc_plugin_page_account_tree_n_actions = G_N_ELEMENTS (gnc_plugin_page_account_tree_actions);
|
||||
@ -276,7 +305,9 @@ static const gchar *actions_requiring_account_rw[] =
|
||||
static const gchar *actions_requiring_account_always[] =
|
||||
{
|
||||
"FileOpenAccountAction",
|
||||
#ifdef REGISTER2_ENABLED
|
||||
"FileOpenAccount2Action",
|
||||
#endif
|
||||
"FileOpenSubaccountsAction",
|
||||
"ActionsLotsAction",
|
||||
NULL
|
||||
@ -304,7 +335,9 @@ static const gchar* readonly_inactive_actions[] =
|
||||
static action_toolbar_labels toolbar_labels[] =
|
||||
{
|
||||
{ "FileOpenAccountAction", N_("Open") },
|
||||
#ifdef REGISTER2_ENABLED
|
||||
{ "FileOpenAccount2Action", N_("Open2") },
|
||||
#endif
|
||||
{ "EditEditAccountAction", N_("Edit") },
|
||||
{ "FileNewAccountAction", N_("New") },
|
||||
{ "EditDeleteAccountAction", N_("Delete") },
|
||||
@ -396,11 +429,19 @@ gnc_plugin_page_account_tree_init (GncPluginPageAccountTree *plugin_page)
|
||||
|
||||
/* Init parent declared variables */
|
||||
parent = GNC_PLUGIN_PAGE(plugin_page);
|
||||
#ifdef REGISTER2_ENABLED
|
||||
g_object_set(G_OBJECT(plugin_page),
|
||||
"page-name", _("Accounts"),
|
||||
"page-uri", "default:",
|
||||
"ui-description", "gnc-plugin-page-account-tree2-ui.xml",
|
||||
NULL);
|
||||
#else
|
||||
g_object_set(G_OBJECT(plugin_page),
|
||||
"page-name", _("Accounts"),
|
||||
"page-uri", "default:",
|
||||
"ui-description", "gnc-plugin-page-account-tree-ui.xml",
|
||||
NULL);
|
||||
#endif
|
||||
g_signal_connect (G_OBJECT (plugin_page), "selected",
|
||||
G_CALLBACK (gnc_plugin_page_account_tree_selected), plugin_page);
|
||||
|
||||
@ -839,7 +880,11 @@ gnc_plugin_page_account_tree_double_click_cb (GtkTreeView *treeview,
|
||||
{
|
||||
/* It's an account without any children, so open its register */
|
||||
Account *account = gnc_tree_view_account_get_account_from_path (GNC_TREE_VIEW_ACCOUNT(treeview), path);
|
||||
#ifdef REGISTER2_ENABLED
|
||||
gppat_open2_account_common (page, account, FALSE);
|
||||
#else
|
||||
gppat_open_account_common (page, account, FALSE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1018,6 +1018,7 @@ gnc_plugin_page_register_create_widget (GncPluginPage *plugin_page)
|
||||
ENTER("page %p", plugin_page);
|
||||
page = GNC_PLUGIN_PAGE_REGISTER (plugin_page);
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(page);
|
||||
|
||||
if (priv->widget != NULL)
|
||||
{
|
||||
LEAVE("existing widget %p", priv->widget);
|
||||
@ -1116,7 +1117,8 @@ gnc_plugin_page_register_create_widget (GncPluginPage *plugin_page)
|
||||
gtk_widget_show_all(plugin_page->summarybar);
|
||||
gtk_box_pack_start(GTK_BOX (priv->widget), plugin_page->summarybar,
|
||||
FALSE, FALSE, 0);
|
||||
gnc_plugin_page_register_summarybar_position_changed(NULL, NULL, page);
|
||||
|
||||
gnc_plugin_page_register_summarybar_position_changed (NULL, NULL, page);
|
||||
gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
|
||||
GNC_PREF_SUMMARYBAR_POSITION_TOP,
|
||||
gnc_plugin_page_register_summarybar_position_changed,
|
||||
@ -1168,7 +1170,6 @@ gnc_plugin_page_register_destroy_widget (GncPluginPage *plugin_page)
|
||||
GNC_PREF_SUMMARYBAR_POSITION_BOTTOM,
|
||||
gnc_plugin_page_register_summarybar_position_changed,
|
||||
page);
|
||||
|
||||
if (priv->widget == NULL)
|
||||
return;
|
||||
|
||||
@ -1732,23 +1733,29 @@ gnc_plugin_page_register_get_long_name (GncPluginPage *plugin_page)
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_plugin_page_register_summarybar_position_changed(gpointer prefs, gchar* pref, gpointer user_data)
|
||||
gnc_plugin_page_register_summarybar_position_changed (gpointer prefs, gchar* pref, gpointer user_data)
|
||||
{
|
||||
GncPluginPage *plugin_page;
|
||||
GncPluginPageRegister *page;
|
||||
GncPluginPageRegisterPrivate *priv;
|
||||
GtkPositionType position = GTK_POS_BOTTOM;
|
||||
|
||||
g_return_if_fail(user_data != NULL);
|
||||
g_return_if_fail (user_data != NULL);
|
||||
|
||||
plugin_page = GNC_PLUGIN_PAGE(user_data);
|
||||
if (!GNC_IS_PLUGIN_PAGE (user_data))
|
||||
return;
|
||||
|
||||
plugin_page = GNC_PLUGIN_PAGE (user_data);
|
||||
page = GNC_PLUGIN_PAGE_REGISTER (user_data);
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(page);
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
|
||||
|
||||
if (priv == NULL)
|
||||
return;
|
||||
|
||||
if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_SUMMARYBAR_POSITION_TOP))
|
||||
position = GTK_POS_TOP;
|
||||
|
||||
gtk_box_reorder_child(GTK_BOX(priv->widget),
|
||||
gtk_box_reorder_child (GTK_BOX (priv->widget),
|
||||
plugin_page->summarybar,
|
||||
(position == GTK_POS_TOP ? 0 : -1) );
|
||||
}
|
||||
|
@ -1805,16 +1805,22 @@ gnc_plugin_page_register2_summarybar_position_changed (gpointer prefs, gchar* pr
|
||||
GncPluginPageRegister2Private *priv;
|
||||
GtkPositionType position = GTK_POS_BOTTOM;
|
||||
|
||||
g_return_if_fail(user_data != NULL);
|
||||
g_return_if_fail (user_data != NULL);
|
||||
|
||||
if (!GNC_IS_PLUGIN_PAGE (user_data))
|
||||
return;
|
||||
|
||||
plugin_page = GNC_PLUGIN_PAGE (user_data);
|
||||
page = GNC_PLUGIN_PAGE_REGISTER2 (user_data);
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
|
||||
|
||||
if (priv == NULL)
|
||||
return;
|
||||
|
||||
if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_SUMMARYBAR_POSITION_TOP))
|
||||
position = GTK_POS_TOP;
|
||||
|
||||
gtk_box_reorder_child(GTK_BOX(priv->widget),
|
||||
gtk_box_reorder_child (GTK_BOX (priv->widget),
|
||||
plugin_page->summarybar,
|
||||
(position == GTK_POS_TOP ? 0 : -1) );
|
||||
}
|
||||
|
@ -133,22 +133,26 @@ static GtkActionEntry gnc_plugin_page_sx_list_actions [] =
|
||||
"SxListNewAction", GNC_STOCK_NEW_ACCOUNT, N_("_New"), NULL,
|
||||
N_("Create a new scheduled transaction"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_new)
|
||||
},
|
||||
#ifdef REGISTER2_ENABLED
|
||||
/*################## Added for Reg2 #################*/
|
||||
{
|
||||
"SxListNewAction2", GNC_STOCK_NEW_ACCOUNT, N_("_New 2"), NULL,
|
||||
N_("Create a new scheduled transaction 2"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_new2)
|
||||
},
|
||||
/*################## Added for Reg2 #################*/
|
||||
#endif
|
||||
{
|
||||
"SxListEditAction", GNC_STOCK_EDIT_ACCOUNT, N_("_Edit"), NULL,
|
||||
N_("Edit the selected scheduled transaction"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_edit)
|
||||
},
|
||||
#ifdef REGISTER2_ENABLED
|
||||
/*################## Added for Reg2 #################*/
|
||||
{
|
||||
"SxListEditAction2", GNC_STOCK_EDIT_ACCOUNT, N_("_Edit 2"), NULL,
|
||||
N_("Edit the selected scheduled transaction 2"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_edit2)
|
||||
},
|
||||
/*################## Added for Reg2 #################*/
|
||||
#endif
|
||||
{
|
||||
"SxListDeleteAction", GNC_STOCK_DELETE_ACCOUNT, N_("_Delete"), NULL,
|
||||
N_("Delete the selected scheduled transaction"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_delete)
|
||||
@ -226,11 +230,19 @@ gnc_plugin_page_sx_list_init (GncPluginPageSxList *plugin_page)
|
||||
|
||||
/* Init parent declared variables */
|
||||
parent = GNC_PLUGIN_PAGE(plugin_page);
|
||||
#ifdef REGISTER2_ENABLED
|
||||
g_object_set(G_OBJECT(plugin_page),
|
||||
"page-name", _("Scheduled Transactions"),
|
||||
"page-uri", "default:",
|
||||
"ui-description", "gnc-plugin-page-sx-list2-ui.xml",
|
||||
NULL);
|
||||
#else
|
||||
g_object_set(G_OBJECT(plugin_page),
|
||||
"page-name", _("Scheduled Transactions"),
|
||||
"page-uri", "default:",
|
||||
"ui-description", "gnc-plugin-page-sx-list-ui.xml",
|
||||
NULL);
|
||||
#endif
|
||||
|
||||
gnc_plugin_page_add_book(parent, gnc_get_current_book());
|
||||
action_group =
|
||||
|
@ -50,9 +50,15 @@ static void gnc_plugin_register_cmd_general_ledger (GtkAction *action, GncMainWi
|
||||
static GtkActionEntry gnc_plugin_actions [] =
|
||||
{
|
||||
{
|
||||
#ifdef REGISTER2_ENABLED
|
||||
"ToolsGeneralLedgerAction", NULL, N_("Old St_yle General Ledger"), NULL,
|
||||
N_("Open an old style general ledger window"),
|
||||
G_CALLBACK (gnc_plugin_register_cmd_general_ledger)
|
||||
#else
|
||||
"ToolsGeneralLedgerAction", NULL, N_("_General Ledger"), NULL,
|
||||
N_("Open general ledger window"),
|
||||
G_CALLBACK (gnc_plugin_register_cmd_general_ledger)
|
||||
#endif
|
||||
},
|
||||
};
|
||||
static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
|
||||
|
@ -44,15 +44,29 @@ static void gnc_plugin_register2_remove_from_window (GncPlugin *plugin, GncMainW
|
||||
static void gnc_plugin_register2_cmd_general_ledger (GtkAction *action, GncMainWindowActionData *data);
|
||||
|
||||
#define PLUGIN_ACTIONS_NAME "gnc-plugin-register2-actions"
|
||||
#define PLUGIN_UI_FILENAME "gnc-plugin-register2-ui.xml"
|
||||
|
||||
#ifdef REGISTER2_ENABLED
|
||||
#define PLUGIN_UI_FILENAME "gnc-plugin-register2-ui.xml"
|
||||
#else
|
||||
#define PLUGIN_UI_FILENAME "gnc-plugin-register22-ui.xml"
|
||||
#endif
|
||||
static GtkActionEntry gnc_plugin_actions [] =
|
||||
{
|
||||
#ifdef REGISTER2_ENABLED
|
||||
{
|
||||
"ToolsGeneralLedger2Action", NULL, N_("_General Ledger"), NULL,
|
||||
N_("Open a general ledger window"),
|
||||
G_CALLBACK (gnc_plugin_register2_cmd_general_ledger)
|
||||
},
|
||||
#endif
|
||||
|
||||
/* Extensions Menu */
|
||||
{ "Register2TestAction", NULL, N_("_Register2"), NULL, NULL, NULL },
|
||||
{
|
||||
"Register2TestGLAction", NULL, N_("Register2 Open GL Account"), NULL,
|
||||
N_("Register2 Open GL Account"),
|
||||
G_CALLBACK (gnc_plugin_register2_cmd_general_ledger)
|
||||
},
|
||||
};
|
||||
static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
|
||||
|
||||
|
@ -9,9 +9,11 @@ ui_DATA = \
|
||||
gnc-plugin-file-history-ui.xml \
|
||||
gnc-plugin-register-ui.xml \
|
||||
gnc-plugin-register2-ui.xml \
|
||||
gnc-plugin-register22-ui.xml \
|
||||
gnc-plugin-page-register-ui.xml \
|
||||
gnc-plugin-page-register2-ui.xml \
|
||||
gnc-plugin-page-sx-list-ui.xml \
|
||||
gnc-plugin-page-sx-list2-ui.xml \
|
||||
gnc-plugin-page-sxregister-ui.xml \
|
||||
gnc-sxed-to-create-window-ui.xml \
|
||||
gnc-reconcile-window-ui.xml \
|
||||
|
@ -29,6 +29,14 @@
|
||||
</menu>
|
||||
</placeholder>
|
||||
</menu>
|
||||
<menu name="Extensions" action="ExtensionsAction">
|
||||
<placeholder name="ExtensionsPlaceholder">
|
||||
<menu name="Register2Test" action="Register2TestAction">
|
||||
<menuitem name="Register2TestAccount" action="Register2TestAccountAction"/>
|
||||
<menuitem name="Register2TestSubAccount" action="Register2TestSubAccountAction"/>
|
||||
</menu>
|
||||
</placeholder>
|
||||
</menu>
|
||||
</menubar>
|
||||
|
||||
<popup name="MainPopup" action="FakeToplevel">
|
||||
|
@ -31,6 +31,14 @@
|
||||
</menu>
|
||||
</placeholder>
|
||||
</menu>
|
||||
<menu name="Extensions" action="ExtensionsAction">
|
||||
<placeholder name="ExtensionsPlaceholder">
|
||||
<menu name="Register2Test" action="Register2TestAction">
|
||||
<menuitem name="Register2TestAccount" action="Register2TestAccountAction"/>
|
||||
<menuitem name="Register2TestSubAccount" action="Register2TestSubAccountAction"/>
|
||||
</menu>
|
||||
</placeholder>
|
||||
</menu>
|
||||
</menubar>
|
||||
|
||||
<popup name="MainPopup" action="FakeToplevel">
|
||||
|
@ -3,9 +3,7 @@
|
||||
<placeholder name="AdditionalMenusPlaceholder">
|
||||
<menu action="SxListAction">
|
||||
<menuitem name="SxListNew" action="SxListNewAction"/>
|
||||
<menuitem name="SxListNew2" action="SxListNewAction2"/>
|
||||
<menuitem name="SxListEdit" action="SxListEditAction"/>
|
||||
<menuitem name="SxListEdit2" action="SxListEditAction2"/>
|
||||
<menuitem name="SxListDelete" action="SxListDeleteAction"/>
|
||||
</menu>
|
||||
</placeholder>
|
||||
|
22
src/gnome/ui/gnc-plugin-page-sx-list2-ui.xml
Normal file
22
src/gnome/ui/gnc-plugin-page-sx-list2-ui.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<ui>
|
||||
<menubar>
|
||||
<placeholder name="AdditionalMenusPlaceholder">
|
||||
<menu action="SxListAction">
|
||||
<menuitem name="SxListNew" action="SxListNewAction"/>
|
||||
<menuitem name="SxListNew2" action="SxListNewAction2"/>
|
||||
<menuitem name="SxListEdit" action="SxListEditAction"/>
|
||||
<menuitem name="SxListEdit2" action="SxListEditAction2"/>
|
||||
<menuitem name="SxListDelete" action="SxListDeleteAction"/>
|
||||
</menu>
|
||||
</placeholder>
|
||||
</menubar>
|
||||
|
||||
<toolbar name="DefaultToolbar">
|
||||
<placeholder name="DefaultToolbarPlaceholder">
|
||||
<separator name="ToolbarSep2" />
|
||||
<toolitem name="SxListToolbarNew" action="SxListNewAction"/>
|
||||
<toolitem name="SxListToolbarEdit" action="SxListEditAction"/>
|
||||
<toolitem name="SxListToolbarDelete" action="SxListDeleteAction"/>
|
||||
</placeholder>
|
||||
</toolbar>
|
||||
</ui>
|
@ -5,5 +5,13 @@
|
||||
<menuitem name="ToolsGeneralLedger2" action="ToolsGeneralLedger2Action"/>
|
||||
</placeholder>
|
||||
</menu>
|
||||
|
||||
<menu name="Extensions" action="ExtensionsAction">
|
||||
<placeholder name="ExtensionsPlaceholder">
|
||||
<menu name="Register2Test" action="Register2TestAction">
|
||||
<menuitem name="Register2TestGL" action="Register2TestGLAction"/>
|
||||
</menu>
|
||||
</placeholder>
|
||||
</menu>
|
||||
</menubar>
|
||||
</ui>
|
||||
|
11
src/gnome/ui/gnc-plugin-register22-ui.xml
Normal file
11
src/gnome/ui/gnc-plugin-register22-ui.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<ui>
|
||||
<menubar>
|
||||
<menu name="Extensions" action="ExtensionsAction">
|
||||
<placeholder name="ExtensionsPlaceholder">
|
||||
<menu name="Register2Test" action="Register2TestAction">
|
||||
<menuitem name="Register2TestGL" action="Register2TestGLAction"/>
|
||||
</menu>
|
||||
</placeholder>
|
||||
</menu>
|
||||
</menubar>
|
||||
</ui>
|
Loading…
Reference in New Issue
Block a user