Popup menu missing from sx template transactions window

This commit is contained in:
Robert Fewell 2023-03-22 10:38:39 +00:00
parent 37587253c9
commit 5fc74256af
3 changed files with 93 additions and 2 deletions

View File

@ -1359,6 +1359,8 @@ schedXact_editor_create_ledger (GncSxEditorDialog *sxed)
/* Now create the register plugin page. */
sxed->plugin_page = gnc_plugin_page_register_new_ledger (sxed->ledger);
gnc_plugin_page_merge_actions (sxed->plugin_page);
gtk_widget_insert_action_group (GTK_WIDGET(sxed->embed_window),
gnc_plugin_page_get_simple_action_group_name (sxed->plugin_page),
G_ACTION_GROUP(gnc_plugin_page_get_action_group (sxed->plugin_page)));

View File

@ -928,9 +928,19 @@ gnc_plugin_page_register_ui_update (gpointer various,
trans = gnc_split_register_get_current_trans (reg);
if (cursor_class == CURSOR_CLASS_SPLIT)
gnc_plugin_page_set_menu_popup_qualifier (GNC_PLUGIN_PAGE(page), "split");
{
if (GNC_IS_MAIN_WINDOW(GNC_PLUGIN_PAGE(page)->window))
gnc_plugin_page_set_menu_popup_qualifier (GNC_PLUGIN_PAGE(page), "split");
else
gnc_plugin_page_set_menu_popup_qualifier (GNC_PLUGIN_PAGE(page), "split-sx");
}
else
gnc_plugin_page_set_menu_popup_qualifier (GNC_PLUGIN_PAGE(page), "trans");
{
if (GNC_IS_MAIN_WINDOW(GNC_PLUGIN_PAGE(page)->window))
gnc_plugin_page_set_menu_popup_qualifier (GNC_PLUGIN_PAGE(page), "trans");
else
gnc_plugin_page_set_menu_popup_qualifier (GNC_PLUGIN_PAGE(page), "trans-sx");
}
/* If the register is not read only, make any modifying action active
* to start with */

View File

@ -568,6 +568,85 @@
</menu>
<menu id="mainwin-popup-trans-sx">
<section>
<item>
<attribute name="label" translatable="yes">Dup_licate Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.DuplicateTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Make a copy of the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Delete Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.DeleteTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Delete the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Remo_ve Other Splits</attribute>
<attribute name="action">GncPluginPageRegisterActions.RemoveTransactionSplitsAction</attribute>
<attribute name="tooltip" translatable="yes">Remove all splits in the current transaction</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Enter Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.RecordTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Record the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Ca_ncel Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.CancelTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Cancel the current transaction</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Blank Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.BlankTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Move to the blank transaction at the bottom of the register</attribute>
</item>
</section>
</menu>
<menu id="mainwin-popup-split-sx">
<section>
<item>
<attribute name="label" translatable="yes">Dup_licate Split</attribute>
<attribute name="action">GncPluginPageRegisterActions.DuplicateTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Make a copy of the current split</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Delete Split</attribute>
<attribute name="action">GncPluginPageRegisterActions.DeleteTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Delete the current split</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Remo_ve Other Splits</attribute>
<attribute name="action">GncPluginPageRegisterActions.RemoveTransactionSplitsAction</attribute>
<attribute name="tooltip" translatable="yes">Remove all splits in the current transaction</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Enter Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.RecordTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Record the current transaction</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Ca_ncel Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.CancelTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Cancel the current transaction</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Blank Transaction</attribute>
<attribute name="action">GncPluginPageRegisterActions.BlankTransactionAction</attribute>
<attribute name="tooltip" translatable="yes">Move to the blank transaction at the bottom of the register</attribute>
</item>
</section>
</menu>
<object class="GtkToolbar" id="mainwin-toolbar">
<property name="visible">True</property>
<property name="can-focus">False</property>