diff --git a/src/gnome/gnc-plugin-page-register.c b/src/gnome/gnc-plugin-page-register.c index e804ed646a..bdbc4da9cc 100644 --- a/src/gnome/gnc-plugin-page-register.c +++ b/src/gnome/gnc-plugin-page-register.c @@ -906,6 +906,7 @@ gnc_plugin_page_register_ui_update (gpointer various, GncPluginPageRegister *pag GtkAction *action; gboolean expanded, voided; Transaction *trans; + const char *uri; /* Set 'Split Transaction' */ priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(page); @@ -931,6 +932,12 @@ gnc_plugin_page_register_ui_update (gpointer various, GncPluginPageRegister *pag "UnvoidTransactionAction"); gtk_action_set_sensitive (GTK_ACTION(action), voided); + /* Set 'ExecAssociated' */ + uri = xaccTransGetAssociation(trans); + action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page), + "ExecAssociatedTransactionAction"); + gtk_action_set_sensitive (GTK_ACTION(action), uri ? TRUE:FALSE); + /* If we are in a readonly book, make any modifying action inactive */ if (qof_book_is_readonly(gnc_get_current_book())) { @@ -3456,6 +3463,7 @@ gnc_plugin_page_register_cmd_associate_file_transaction (GtkAction *action, priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page); gsr_default_associate_handler_file(priv->gsr, NULL); + gnc_plugin_page_register_ui_update (NULL, plugin_page); LEAVE(" "); } @@ -3472,6 +3480,7 @@ gnc_plugin_page_register_cmd_associate_location_transaction (GtkAction *action, priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page); gsr_default_associate_handler_location(priv->gsr, NULL); + gnc_plugin_page_register_ui_update (NULL, plugin_page); LEAVE(" "); } diff --git a/src/gnome/gnc-split-reg.c b/src/gnome/gnc-split-reg.c index 9e18a4d5cf..b9d198a1e2 100644 --- a/src/gnome/gnc-split-reg.c +++ b/src/gnome/gnc-split-reg.c @@ -1096,9 +1096,9 @@ gsr_default_associate_handler_location( GNCSplitReg *gsr, gpointer data ) if (is_trans_readonly_and_warn(trans)) return; - dialog = gtk_file_chooser_dialog_new ("Associate Location with Transaction", + dialog = gtk_dialog_new_with_buttons ("Associate Location with Transaction", GTK_WINDOW(gsr->window), - GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);