gnucash master: Multiple changes pushed
Robert Fewell
bobit at code.gnucash.org
Fri Jun 26 10:37:17 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/a019bb2f (commit)
via https://github.com/Gnucash/gnucash/commit/2c62ae41 (commit)
via https://github.com/Gnucash/gnucash/commit/98cfad8c (commit)
via https://github.com/Gnucash/gnucash/commit/47f0959f (commit)
from https://github.com/Gnucash/gnucash/commit/af51e737 (commit)
commit a019bb2f2d6579f65307da4a94b782e2bb805729
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Fri Jun 26 15:28:15 2020 +0100
Revert the changes made to save Register default layouts as discussed in PR #743
diff --git a/gnucash/gnome/dialog-sx-editor.c b/gnucash/gnome/dialog-sx-editor.c
index c69f02c5f..4eda90060 100644
--- a/gnucash/gnome/dialog-sx-editor.c
+++ b/gnucash/gnome/dialog-sx-editor.c
@@ -168,7 +168,6 @@ static GtkActionEntry gnc_sxed_menu_entries [] =
{ "TransactionAction", NULL, N_("_Transaction"), NULL, NULL, NULL },
{ "ViewAction", NULL, N_("_View"), NULL, NULL, NULL },
{ "ActionsAction", NULL, N_("_Actions"), NULL, NULL, NULL },
- { "WindowsAction", NULL, N_("_Windows"), NULL, NULL, NULL },
};
static guint gnc_sxed_menu_n_entries = G_N_ELEMENTS (gnc_sxed_menu_entries);
diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 072c9c788..508469ec3 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -253,10 +253,6 @@ static void gnc_plugin_page_register_cmd_account_report (GtkAction* action,
GncPluginPageRegister* plugin_page);
static void gnc_plugin_page_register_cmd_transaction_report (GtkAction* action,
GncPluginPageRegister* plugin_page);
-static void gnc_plugin_page_register_cmd_save_layout (GtkAction *action,
- GncPluginPageRegister *plugin_page);
-static void gnc_plugin_page_register_cmd_reset_layout (GtkAction *action,
- GncPluginPageRegister *plugin_page);
static void gnc_plugin_page_register_cmd_associate_transaction (GtkAction *action,
GncPluginPageRegister *plugin_page);
static void gnc_plugin_page_register_cmd_associate_transaction_open (GtkAction *action,
@@ -519,18 +515,6 @@ static GtkActionEntry gnc_plugin_page_register_actions [] =
N_ ("Open a register report for the selected Transaction"),
G_CALLBACK (gnc_plugin_page_register_cmd_transaction_report)
},
-
- /* Windows menu */
- {
- "WindowsSaveLayoutAction", NULL, "_Use as Default Layout for this Register Group", NULL,
- N_("Use the current layout as default for all registers in the group 'Currency account registers'"),
- G_CALLBACK (gnc_plugin_page_register_cmd_save_layout)
- },
- {
- "WindowsResetLayoutAction", NULL, "_Reset Default Layout for this Register Group", NULL,
- N_("Reset default layout for all registers in the group 'Currency account registers' back to built-in defaults and update page accordingly"),
- G_CALLBACK (gnc_plugin_page_register_cmd_reset_layout)
- },
};
static guint gnc_plugin_page_register_n_actions = G_N_ELEMENTS (
@@ -655,8 +639,6 @@ typedef struct GncPluginPageRegisterPrivate
GtkWidget* widget;
- const gchar *page_state_name; /* Used for loading state information */
-
gint event_handler_id;
gint component_manager_id;
GncGUID key; /* The guid of the Account we're watching */
@@ -925,7 +907,6 @@ gnc_plugin_page_register_init (GncPluginPageRegister* plugin_page)
priv->enable_refresh = TRUE;
priv->search_query = NULL;
priv->filter_query = NULL;
- priv->page_state_name = NULL;
}
static void
@@ -1220,26 +1201,6 @@ gnc_plugin_page_register_ui_update (gpointer various,
}
}
}
-
- // update the register default layouts actions
- {
- gboolean has_default = FALSE;
- const gchar *group = gnc_split_reg_get_register_state_group (priv->gsr);
- GtkAction *layout_action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "WindowsSaveLayoutAction");
- gchar *tt = g_strdup_printf (gettext ("Use the current layout as default for all registers in the group '%s'"), _(group));
- gtk_action_set_tooltip (layout_action, tt);
- g_free (tt);
-
- layout_action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), "WindowsResetLayoutAction");
- tt = g_strdup_printf (gettext ("Reset default layout for all registers in the group '%s' back to built-in defaults and update page accordingly"), _(group));
- gtk_action_set_tooltip (layout_action, tt);
- g_free (tt);
-
- // if there is no default layout do not enable reset action
- if (gnc_split_reg_register_has_user_state (priv->gsr))
- has_default = TRUE;
- gtk_action_set_sensitive (layout_action, has_default);
- }
}
static void
@@ -1382,7 +1343,7 @@ gnc_plugin_page_register_create_widget (GncPluginPage* plugin_page)
gnc_window = GNC_WINDOW(GNC_PLUGIN_PAGE(page)->window);
gsr = gnc_split_reg_new (priv->ledger,
gnc_window_get_gtk_window (gnc_window),
- numRows, priv->read_only, priv->page_state_name);
+ numRows, priv->read_only);
priv->gsr = (GNCSplitReg *)gsr;
gtk_widget_show (gsr);
@@ -1745,9 +1706,6 @@ gnc_plugin_page_register_save_page (GncPluginPage* plugin_page,
g_key_file_set_boolean (key_file, group_name, KEY_DOUBLE_LINE,
reg->use_double_line);
- // save the open table layout
- gnc_table_save_state (reg->table, group_name);
-
LEAVE(" ");
}
@@ -1885,7 +1843,6 @@ gnc_plugin_page_register_recreate_page (GtkWidget* window,
* sort/filter updates and double line/style changes */
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE (page);
priv->enable_refresh = FALSE;
- priv->page_state_name = group_name;
/* Recreate page in given window */
gnc_plugin_page_set_use_new_window (page, FALSE);
@@ -5011,46 +4968,6 @@ gnc_plugin_page_register_cmd_transaction_report (GtkAction* action,
LEAVE (" ");
}
-static void
-gnc_plugin_page_register_cmd_save_layout (GtkAction *action, GncPluginPageRegister *plugin_page)
-{
- GNCSplitReg *gsr;
- GtkAction *layout_action;
-
- ENTER("(action %p, plugin_page %p)", action, plugin_page);
-
- g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER(plugin_page));
-
- gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE(plugin_page));
-
- gnc_split_reg_save_register_layout_to_user_state (gsr);
-
- layout_action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(plugin_page),
- "WindowsResetLayoutAction");
- gtk_action_set_sensitive (layout_action, TRUE);
- LEAVE(" ");
-}
-
-static void
-gnc_plugin_page_register_cmd_reset_layout (GtkAction *action, GncPluginPageRegister *plugin_page)
-{
- GNCSplitReg *gsr;
- GtkAction *layout_action;
-
- ENTER("(action %p, plugin_page %p)", action, plugin_page);
-
- g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER(plugin_page));
-
- gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE(plugin_page));
-
- gnc_split_reg_reset_register_layout_and_clear_user_state (gsr);
-
- layout_action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(plugin_page),
- "WindowsResetLayoutAction");
- gtk_action_set_sensitive (layout_action, FALSE);
- LEAVE(" ");
-}
-
/************************************************************/
/* Auxiliary functions */
/************************************************************/
diff --git a/gnucash/gnome/gnc-split-reg.c b/gnucash/gnome/gnc-split-reg.c
index 5cae8dac6..ed0d7cd5d 100644
--- a/gnucash/gnome/gnc-split-reg.c
+++ b/gnucash/gnome/gnc-split-reg.c
@@ -330,8 +330,7 @@ GtkWidget*
gnc_split_reg_new( GNCLedgerDisplay *ld,
GtkWindow *parent,
gint numberOfLines,
- gboolean read_only,
- const gchar *group_name )
+ gboolean read_only )
{
GNCSplitReg *gsrToRet;
@@ -346,8 +345,6 @@ gnc_split_reg_new( GNCLedgerDisplay *ld,
gsrToRet->ledger = ld;
gsrToRet->window = GTK_WIDGET(parent);
- gsrToRet->page_state_name = group_name;
-
gnc_split_reg_init2( gsrToRet );
LEAVE("%p", gsrToRet);
@@ -367,7 +364,6 @@ gnc_split_reg_init( GNCSplitReg *gsr )
gsr->height = -1;
gsr->numRows = 10;
gsr->read_only = FALSE;
- gsr->page_state_name = NULL;
}
static void
@@ -411,56 +407,12 @@ gsr_setup_table( GNCSplitReg *gsr )
LEAVE(" ");
}
-const gchar *
-gnc_split_reg_get_register_state_group (GNCSplitReg *gsr)
-{
- SplitRegister *split_reg = gnc_ledger_display_get_split_register (gsr->ledger);
-
- switch (gnc_split_register_get_register_group (split_reg))
- {
- case REG_TYPE_GROUP_CURRENCY:
- {
- return N_("Currency account registers");
- break;
- }
- case REG_TYPE_GROUP_APAR:
- {
- return N_("Business account registers");
- break;
- }
- case REG_TYPE_GROUP_JOURNAL:
- {
- return N_("Journal registers");
- break;
- }
- case REG_TYPE_GROUP_STOCK:
- {
- return N_("Stock account registers");
- break;
- }
- case REG_TYPE_GROUP_PORTFOLIO:
- {
- return N_("Portfolio registers");
- break;
- }
- default:
- {
- return N_("Register group Unknown");
- break;
- }
- }
-}
-
static void
-gsr_drop_register_width_state (GNCSplitReg *gsr, GKeyFile* state_file, const gchar *state_section)
+gsr_move_sort_and_filter_to_state_file (GNCSplitReg *gsr, GKeyFile* state_file, const gchar *state_section)
{
GNCLedgerDisplayType ledger_type;
GNCLedgerDisplay* ld;
- gboolean sort_reversed = FALSE;
- gchar* sort_text = NULL;
- gchar* filter_text = NULL;
-
// Look for any old kvp entries and add them to .gcm file
ledger_type = gnc_ledger_display_type (gsr->ledger);
@@ -500,31 +452,6 @@ gsr_drop_register_width_state (GNCSplitReg *gsr, GKeyFile* state_file, const gch
xaccAccountSetSortReversed (leader, FALSE);
}
}
-
- sort_reversed = g_key_file_get_boolean (state_file, state_section,
- KEY_PAGE_SORT_REV, NULL);
-
- sort_text = g_key_file_get_string (state_file, state_section,
- KEY_PAGE_SORT, NULL);
-
- filter_text = g_key_file_get_string (state_file, state_section,
- KEY_PAGE_FILTER, NULL);
-
- // drop the register state widths
- gnc_state_drop_sections_for (state_section);
-
- if (filter_text)
- g_key_file_set_string (state_file, state_section, KEY_PAGE_FILTER,
- filter_text);
- if (sort_text)
- g_key_file_set_string (state_file, state_section, KEY_PAGE_SORT, sort_text);
-
- if (sort_reversed)
- g_key_file_set_boolean (state_file, state_section, KEY_PAGE_SORT_REV,
- sort_reversed);
-
- g_free (filter_text);
- g_free (sort_text);
}
static
@@ -539,9 +466,6 @@ gsr_create_table( GNCSplitReg *gsr )
gchar guidstr[GUID_ENCODING_LENGTH+1];
GKeyFile* state_file = gnc_state_get_current();
gchar *register_state_section;
- const gchar *default_state_section;
- const gchar *group;
- gboolean has_date_width = FALSE;
guid_to_string_buff (guid, guidstr);
@@ -550,23 +474,7 @@ gsr_create_table( GNCSplitReg *gsr )
ENTER("gsr=%p", gsr);
sr = gnc_ledger_display_get_split_register (gsr->ledger);
- default_state_section = gnc_split_reg_get_register_state_group (gsr);
-
- // see if register group has the date_width key, old format pre 4.0
- has_date_width = g_key_file_has_key (state_file, register_state_section, "date_width", NULL);
- // if this is from a page recreate and no register state use those settings,
- // register state width information is dropped at the end of function.
- if (gsr->page_state_name && !has_date_width)
- group = gsr->page_state_name;
- else
- {
- // if no default state, use register state if available
- if (gnc_split_reg_register_has_user_state (gsr))
- group = default_state_section;
- else
- group = register_state_section;
- }
gnc_ledger_display_set_user_data( gsr->ledger, (gpointer)gsr );
gnc_ledger_display_set_handlers( gsr->ledger,
gnc_split_reg_ld_destroy,
@@ -574,7 +482,7 @@ gsr_create_table( GNCSplitReg *gsr )
/* FIXME: We'd really rather pass this down... */
sr = gnc_ledger_display_get_split_register( gsr->ledger );
- register_widget = gnucash_register_new( sr->table, group );
+ register_widget = gnucash_register_new( sr->table, register_state_section );
gsr->reg = GNUCASH_REGISTER( register_widget );
gtk_box_pack_start (GTK_BOX (gsr), GTK_WIDGET(gsr->reg), TRUE, TRUE, 0);
@@ -594,15 +502,8 @@ gsr_create_table( GNCSplitReg *gsr )
g_signal_connect (gsr->reg, "show_popup_menu",
G_CALLBACK(gsr_emit_show_popup_menu), gsr);
- // if no default state and register has state, copy it.
- if (has_date_width) // we have old register state section
- {
- if (!gnc_split_reg_register_has_user_state (gsr))
- gnc_table_save_state (sr->table, default_state_section);
+ gsr_move_sort_and_filter_to_state_file (gsr, state_file, register_state_section);
- // drop the register width state information
- gsr_drop_register_width_state (gsr, state_file, register_state_section);
- }
g_free (register_state_section);
LEAVE(" ");
}
@@ -884,11 +785,30 @@ static void
gnc_split_reg_ld_destroy( GNCLedgerDisplay *ledger )
{
GNCSplitReg *gsr = gnc_ledger_display_get_user_data( ledger );
+ Account * account = gnc_ledger_display_leader(ledger);
+ const GncGUID * guid = xaccAccountGetGUID(account);
+ gchar guidstr[GUID_ENCODING_LENGTH+1];
+ gchar *state_section;
+ guid_to_string_buff(guid, guidstr);
+
+ state_section = g_strconcat (STATE_SECTION_REG_PREFIX, " ", guidstr, NULL);
+
+ if (gsr)
+ {
+ SplitRegister *reg;
+
+ reg = gnc_ledger_display_get_split_register (ledger);
+
+ if (reg && reg->table)
+ gnc_table_save_state (reg->table, state_section);
+
+ /*
+ * Don't destroy the window here any more. The register no longer
+ * owns it.
+ */
+ }
+ g_free (state_section);
- /*
- * Don't destroy the window here any more. The register no longer
- * owns it.
- */
gnc_ledger_display_set_user_data (ledger, NULL);
g_object_unref (gsr);
}
@@ -1890,44 +1810,6 @@ gnc_split_reg_set_sheet_focus (GNCSplitReg *gsr, gboolean has_focus)
gnucash_sheet_set_has_focus (sheet, has_focus);
}
-/* Save user state layout information to the register group that
- * this register belongs to so it can be used as the default
- * user layout
- */
-void
-gnc_split_reg_save_register_layout_to_user_state (GNCSplitReg *gsr)
-{
- SplitRegister *split_reg = gnc_ledger_display_get_split_register (gsr->ledger);
- const gchar *group = gnc_split_reg_get_register_state_group (gsr);
-
- gnc_table_save_state (split_reg->table, group);
-}
-
-/* Removes the user state layout information for the register group
- * that this register belongs to and also resets the current layout to
- * the built-in defaults
- */
-void
-gnc_split_reg_reset_register_layout_and_clear_user_state (GNCSplitReg *gsr)
-{
- GnucashRegister *reg = gsr->reg;
- const gchar *group = gnc_split_reg_get_register_state_group (gsr);
-
- gnucash_register_reset_sheet_layout (reg);
- gnc_state_drop_sections_for (group);
-}
-
-/* Checks to see if there is user state layout information for the
- * register group that this register belongs to.
- */
-gboolean
-gnc_split_reg_register_has_user_state (GNCSplitReg *gsr)
-{
- GKeyFile *state_file = gnc_state_get_current ();
- const gchar *group = gnc_split_reg_get_register_state_group (gsr);
- return g_key_file_has_group (state_file, group);
-}
-
void
gnc_split_reg_balancing_entry(GNCSplitReg *gsr, Account *account,
time64 statement_date, gnc_numeric balancing_amount)
diff --git a/gnucash/gnome/gnc-split-reg.h b/gnucash/gnome/gnc-split-reg.h
index 70110593d..410c0fed6 100644
--- a/gnucash/gnome/gnc-split-reg.h
+++ b/gnucash/gnome/gnc-split-reg.h
@@ -88,8 +88,6 @@ struct _GNCSplitReg
/** The actual gnucash register widget. **/
GnucashRegister *reg;
- const gchar *page_state_name; /* Used for loading open state information */
-
gint numRows;
guint sort_type;
@@ -184,13 +182,11 @@ GType gnc_split_reg_get_type(void);
* @param parent The containing window.
* @param numberOfLines The initial number of lines for the register.
* @param read_only If the contained register should be setup read-only.
- * @param group_name The group name of the page state section for this page
**/
GtkWidget* gnc_split_reg_new( GNCLedgerDisplay *ld,
GtkWindow *parent,
gint numberOfLines,
- gboolean read_only,
- const gchar *group_name );
+ gboolean read_only );
/**
* Returns the GnucashRegister in effect for this GNCSplitReg.
@@ -268,14 +264,6 @@ gboolean gnc_split_reg_clear_filter_for_split (GNCSplitReg *gsr, Split *split);
void gnc_split_reg_focus_on_sheet (GNCSplitReg *gsr);
void gnc_split_reg_set_sheet_focus (GNCSplitReg *gsr, gboolean has_focus);
-/**
- * Save/Reset/Has functions used for the user default register layouts.
- **/
-void gnc_split_reg_save_register_layout_to_user_state (GNCSplitReg *gsr);
-void gnc_split_reg_reset_register_layout_and_clear_user_state (GNCSplitReg *gsr);
-gboolean gnc_split_reg_register_has_user_state (GNCSplitReg *gsr);
-const gchar *gnc_split_reg_get_register_state_group (GNCSplitReg *gsr);
-
/*
* Create a transaction entry with given amount and date. One account is
* specified, the other is undefined i.e. it defaults to orphan account.
diff --git a/gnucash/ui/gnc-plugin-page-register-ui.xml b/gnucash/ui/gnc-plugin-page-register-ui.xml
index d2393375a..fba5e1262 100644
--- a/gnucash/ui/gnc-plugin-page-register-ui.xml
+++ b/gnucash/ui/gnc-plugin-page-register-ui.xml
@@ -66,13 +66,6 @@
<menuitem name="ReportsAcctTransReport" action="ReportsAcctTransReportAction"/>
</placeholder>
</menu>
-
- <menu name="Windows" action="WindowsAction">
- <placeholder name="WindowsLayoutPlaceholder">
- <menuitem name="WindowsSaveLayout" action="WindowsSaveLayoutAction"/>
- <menuitem name="WindowsResetLayout" action="WindowsResetLayoutAction"/>
- </placeholder>
- </menu>
</menubar>
<toolbar name="DefaultToolbar">
diff --git a/gnucash/ui/gnc-sxed-window-ui-full.xml b/gnucash/ui/gnc-sxed-window-ui-full.xml
index 8ec9760f7..2c1776cde 100644
--- a/gnucash/ui/gnc-sxed-window-ui-full.xml
+++ b/gnucash/ui/gnc-sxed-window-ui-full.xml
@@ -32,14 +32,6 @@
<menuitem name="BlankTransaction" action="BlankTransactionAction"/>
</placeholder>
</menu>
-
- <menu name="Windows" action="WindowsAction">
- <placeholder name="WindowsLayoutPlaceholder">
- <menuitem name="WindowsSaveLayout" action="WindowsSaveLayoutAction"/>
- <menuitem name="WindowsResetLayout" action="WindowsResetLayoutAction"/>
- </placeholder>
- </menu>
-
</menubar>
<toolbar name="DefaultToolbar">
diff --git a/gnucash/ui/gnc-windows-menu-ui.xml b/gnucash/ui/gnc-windows-menu-ui.xml
index 59d1c507f..d9a15c560 100644
--- a/gnucash/ui/gnc-windows-menu-ui.xml
+++ b/gnucash/ui/gnc-windows-menu-ui.xml
@@ -5,8 +5,6 @@
<menu name="Windows" action="WindowsAction">
<menuitem name="WindowNew" action="WindowNewAction"/>
<menuitem name="WindowMovePage" action="WindowMovePageAction"/>
- <separator name="ViewSep5"/>
- <placeholder name="WindowsLayoutPlaceholder"/>
<separator name="ViewSep4"/>
<menuitem name="Window0" action="Window0Action"/>
<menuitem name="Window1" action="Window1Action"/>
commit 2c62ae418b8f8dff011537904e8c7ccbc3abbf53
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Fri Jun 26 15:26:24 2020 +0100
Setting a sheet column width to 1 when resizing by dragging
Column widths of 0 are not saved by the table and so revert back to
calculated widths when reloaded. This change sets the column width to
1 when the right border is dragged to the left border to hide columns.
By doing this, a visual indication of a hidden column is seen as the
column border is now wider by 1px.
diff --git a/gnucash/register/register-gnome/gnucash-header.c b/gnucash/register/register-gnome/gnucash-header.c
index fd40e9821..34255a24c 100644
--- a/gnucash/register/register-gnome/gnucash-header.c
+++ b/gnucash/register/register-gnome/gnucash-header.c
@@ -470,9 +470,11 @@ gnc_header_event (GtkWidget *widget, GdkEvent *event)
if (event->button.button != 1)
break;
-
if (header->in_resize)
{
+ if (header->resize_col_width == 0)
+ header->resize_col_width = 1;
+
gnc_header_resize_column
(header,
header->resize_col,
commit 98cfad8cd70a876d8419da4c62a440f5c9d4b371
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Fri Jun 26 15:25:40 2020 +0100
Move the menu options for saving Business layouts
Move the menu options for saving/resetting Business layouts to the
'View' menu from the 'Windows' menu.
diff --git a/gnucash/gnome/gnc-plugin-page-invoice.c b/gnucash/gnome/gnc-plugin-page-invoice.c
index 099d9aba8..b68421c17 100644
--- a/gnucash/gnome/gnc-plugin-page-invoice.c
+++ b/gnucash/gnome/gnc-plugin-page-invoice.c
@@ -163,6 +163,16 @@ static GtkActionEntry gnc_plugin_page_invoice_actions [] =
N_("Refresh this window"),
G_CALLBACK (gnc_plugin_page_invoice_cmd_refresh)
},
+ {
+ "ViewSaveLayoutAction", NULL, "_Use as Default Layout for Customer Documents", NULL,
+ "Use the current layout as default for all customer invoices and credit notes",
+ G_CALLBACK (gnc_plugin_page_invoice_cmd_save_layout)
+ },
+ {
+ "ViewResetLayoutAction", NULL, "_Reset Default Layout for Customer Documents", NULL,
+ "Reset default layout for all customer invoices and credit notes back to built-in defaults and update the current page accordingly",
+ G_CALLBACK (gnc_plugin_page_invoice_cmd_reset_layout)
+ },
/* Actions menu */
{
@@ -234,18 +244,6 @@ static GtkActionEntry gnc_plugin_page_invoice_actions [] =
"Open a company report window for the owner of this invoice",
G_CALLBACK (gnc_plugin_page_invoice_cmd_company_report)
},
-
- /* Windows menu */
- {
- "WindowsSaveLayoutAction", NULL, "_Use as Default Layout for Customer Documents", NULL,
- "Use the current layout as default for all customer invoices and credit notes",
- G_CALLBACK (gnc_plugin_page_invoice_cmd_save_layout)
- },
- {
- "WindowsResetLayoutAction", NULL, "_Reset Default Layout for Customer Documents", NULL,
- "Reset default layout for all customer invoices and credit notes back to built-in defaults and update the current page accordingly",
- G_CALLBACK (gnc_plugin_page_invoice_cmd_reset_layout)
- },
};
static guint gnc_plugin_page_invoice_n_actions = G_N_ELEMENTS (gnc_plugin_page_invoice_actions);
@@ -316,8 +314,8 @@ static action_toolbar_labels invoice_action_labels[] =
static action_toolbar_labels invoice_action_layout_labels[] =
{
- {"WindowsSaveLayoutAction", N_("_Use as Default Layout for Customer Documents")},
- {"WindowsResetLayoutAction", N_("_Reset Default Layout for Customer Documents")},
+ {"ViewSaveLayoutAction", N_("_Use as Default Layout for Customer Documents")},
+ {"ViewResetLayoutAction", N_("_Reset Default Layout for Customer Documents")},
{NULL, NULL},
};
@@ -338,8 +336,8 @@ static action_toolbar_labels bill_action_labels[] =
static action_toolbar_labels bill_action_layout_labels[] =
{
- {"WindowsSaveLayoutAction", N_("_Use as Default Layout for Vendor Documents")},
- {"WindowsResetLayoutAction", N_("_Reset Default Layout for Vendor Documents")},
+ {"ViewSaveLayoutAction", N_("_Use as Default Layout for Vendor Documents")},
+ {"ViewResetLayoutAction", N_("_Reset Default Layout for Vendor Documents")},
{NULL, NULL},
};
@@ -360,8 +358,8 @@ static action_toolbar_labels voucher_action_labels[] =
static action_toolbar_labels voucher_action_layout_labels[] =
{
- {"WindowsSaveLayoutAction", N_("_Use as Default Layout for Employee Documents")},
- {"WindowsResetLayoutAction", N_("_Reset Default Layout for Employee Documents")},
+ {"ViewSaveLayoutAction", N_("_Use as Default Layout for Employee Documents")},
+ {"ViewResetLayoutAction", N_("_Reset Default Layout for Employee Documents")},
{NULL, NULL},
};
@@ -398,8 +396,8 @@ static action_toolbar_labels invoice_action_tooltips[] = {
};
static action_toolbar_labels invoice_action_layout_tooltips[] = {
- {"WindowsSaveLayoutAction", N_("Use the current layout as default for all customer invoices and credit notes")},
- {"WindowsResetLayoutAction", N_("Reset default layout for all customer invoices and credit notes back to built-in defaults and update the current page accordingly")},
+ {"ViewSaveLayoutAction", N_("Use the current layout as default for all customer invoices and credit notes")},
+ {"ViewResetLayoutAction", N_("Reset default layout for all customer invoices and credit notes back to built-in defaults and update the current page accordingly")},
{NULL, NULL},
};
@@ -420,8 +418,8 @@ static action_toolbar_labels bill_action_tooltips[] = {
};
static action_toolbar_labels bill_action_layout_tooltips[] = {
- {"WindowsSaveLayoutAction", N_("Use the current layout as default for all vendor bills and credit notes")},
- {"WindowsResetLayoutAction", N_("Reset default layout for all vendor bills and credit notes back to built-in defaults and update the current page accordingly")},
+ {"ViewSaveLayoutAction", N_("Use the current layout as default for all vendor bills and credit notes")},
+ {"ViewResetLayoutAction", N_("Reset default layout for all vendor bills and credit notes back to built-in defaults and update the current page accordingly")},
{NULL, NULL},
};
@@ -442,8 +440,8 @@ static action_toolbar_labels voucher_action_tooltips[] = {
};
static action_toolbar_labels voucher_action_layout_tooltips[] = {
- {"WindowsSaveLayoutAction", N_("Use the current layout as default for all employee vouchers and credit notes")},
- {"WindowsResetLayoutAction", N_("Reset default layout for all employee vouchers and credit notes back to built-in defaults and update the current page accordingly")},
+ {"ViewSaveLayoutAction", N_("Use the current layout as default for all employee vouchers and credit notes")},
+ {"ViewResetLayoutAction", N_("Reset default layout for all employee vouchers and credit notes back to built-in defaults and update the current page accordingly")},
{NULL, NULL},
};
@@ -656,7 +654,7 @@ gnc_plugin_page_update_reset_layout_action (GncPluginPage *page)
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(page);
- layout_action = gnc_plugin_page_get_action (page, "WindowsResetLayoutAction");
+ layout_action = gnc_plugin_page_get_action (page, "ViewResetLayoutAction");
if (gnc_invoice_window_document_has_user_state (priv->iw))
has_default = TRUE;
gtk_action_set_sensitive (layout_action, has_default);
@@ -1329,7 +1327,7 @@ gnc_plugin_page_invoice_cmd_save_layout (GtkAction *action,
gnc_invoice_window_save_document_layout_to_user_state (priv->iw);
layout_action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(plugin_page),
- "WindowsResetLayoutAction");
+ "ViewResetLayoutAction");
gtk_action_set_sensitive (layout_action, TRUE);
LEAVE(" ");
@@ -1350,7 +1348,7 @@ gnc_plugin_page_invoice_cmd_reset_layout (GtkAction *action,
gnc_invoice_window_reset_document_layout_and_clear_user_state (priv->iw);
layout_action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(plugin_page),
- "WindowsResetLayoutAction");
+ "ViewResetLayoutAction");
gtk_action_set_sensitive (layout_action, FALSE);
LEAVE(" ");
diff --git a/gnucash/ui/gnc-plugin-page-invoice-ui.xml b/gnucash/ui/gnc-plugin-page-invoice-ui.xml
index 45ce7eea8..cfbab6992 100644
--- a/gnucash/ui/gnc-plugin-page-invoice-ui.xml
+++ b/gnucash/ui/gnc-plugin-page-invoice-ui.xml
@@ -11,6 +11,10 @@
<menu name="View" action="ViewAction">
<placeholder name="ViewPlaceholder">
+ <separator name="ViewSep44"/>
+ <menuitem name="ViewSaveLayout" action="ViewSaveLayoutAction"/>
+ <menuitem name="ViewResetLayout" action="ViewResetLayoutAction"/>
+ <separator name="ViewSep45"/>
<menu name="SortOrder" action="SortOrderAction">
<menuitem name="SortStandard" action="SortStandardAction"/>
<separator name="ViewSep43"/>
@@ -54,14 +58,6 @@
<menuitem name="ReportsCompanyReport" action="ReportsCompanyReportAction"/>
</placeholder>
</menu>
-
- <menu name="Windows" action="WindowsAction">
- <placeholder name="WindowsLayoutPlaceholder">
- <menuitem name="WindowsSaveLayout" action="WindowsSaveLayoutAction"/>
- <menuitem name="WindowsResetLayout" action="WindowsResetLayoutAction"/>
- </placeholder>
- </menu>
-
</menubar>
<toolbar name="DefaultToolbar">
commit 47f0959f466f75c97240e6dc88276cd9c50bcced
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Fri Jun 26 15:24:46 2020 +0100
Disable showing glyphs for associations on MacOS
Currently there are problems showing glyphs on MacOS so always return
FALSE for the gcn_assoc_cell_set_use_glyphs for MacOS
diff --git a/gnucash/register/register-core/assoccell.c b/gnucash/register/register-core/assoccell.c
index c91a5d640..1fb212afb 100644
--- a/gnucash/register/register-core/assoccell.c
+++ b/gnucash/register/register-core/assoccell.c
@@ -263,6 +263,9 @@ gnc_assoc_cell_set_read_only (AssocCell *cell, gboolean read_only)
void
gnc_assoc_cell_set_use_glyphs (AssocCell *cell)
{
+#ifdef MAC_INTEGRATION
+ cell->use_glyphs = FALSE;
+#else
gboolean use_glyphs = TRUE;
gchar *test_text;
GtkWidget *label;
@@ -286,4 +289,5 @@ gnc_assoc_cell_set_use_glyphs (AssocCell *cell)
g_free (test_text);
cell->use_glyphs = use_glyphs;
+#endif
}
Summary of changes:
gnucash/gnome/dialog-sx-editor.c | 1 -
gnucash/gnome/gnc-plugin-page-invoice.c | 52 ++++---
gnucash/gnome/gnc-plugin-page-register.c | 85 +----------
gnucash/gnome/gnc-split-reg.c | 172 ++++-------------------
gnucash/gnome/gnc-split-reg.h | 14 +-
gnucash/register/register-core/assoccell.c | 4 +
gnucash/register/register-gnome/gnucash-header.c | 4 +-
gnucash/ui/gnc-plugin-page-invoice-ui.xml | 12 +-
gnucash/ui/gnc-plugin-page-register-ui.xml | 7 -
gnucash/ui/gnc-sxed-window-ui-full.xml | 8 --
gnucash/ui/gnc-windows-menu-ui.xml | 2 -
11 files changed, 65 insertions(+), 296 deletions(-)
More information about the gnucash-changes
mailing list